name
stringlengths
1
473k
code
stringlengths
7
647k
asm
stringlengths
4
3.39M
file
stringlengths
8
196
mergesort_2way_parallel(unsigned char**, unsigned long, unsigned char**)
static void mergesort_2way_parallel(unsigned char** strings, size_t n, unsigned char** tmp) { if (n < 32) { insertion_sort(strings, n, 0); return; } const size_t split0 = n/2; #pragma omp parallel sections { #pragma omp section mergesort_2way_parallel(strings, split0, tmp); #pragma omp section mergesort_2way_parallel(strings+split0, n-split0, tmp+split0); } merge_2way(strings, split0, strings+split0, n-split0, tmp); (void) memcpy(strings, tmp, n*sizeof(unsigned char*)); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpq $0x1f, %rsi ja 0x12542a cmpq $0x2, %rbx jl 0x12541b movq %r14, %rax movl %ebx, %ecx leal -0x1(%rcx), %ebx movq 0x8(%rax), %rdx addq $0x8, %rax movq %rax, %rsi cmpq %r14, %rsi jbe 0x125413 movq -0x8(%rsi), %r9 movb (%r9), %dil movb (%rdx), %r8b cmpb %r8b, %dil setne %r10b testb %dil, %dil sete %r11b orb %r10b, %r11b jne 0x125402 movl $0x1, %r10d movb (%r9,%r10), %dil movb (%rdx,%r10), %r8b testb %dil, %dil je 0x125402 incq %r10 cmpb %r8b, %dil je 0x1253ed cmpb %r8b, %dil jbe 0x12540e movq %r9, (%rsi) addq $-0x8, %rsi cmpb %r8b, %dil ja 0x1253c5 movq %rdx, (%rsi) cmpl $0x2, %ecx jg 0x1253b5 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdx, %r15 movq %rbx, %r12 shrq %r12 movq %r14, %rdi movq %r12, %rsi callq 0x125395 leaq (%r14,%r12,8), %r13 movq %rbx, %rbp subq %r12, %rbp leaq (%r15,%r12,8), %rdx movq %r13, %rdi movq %rbp, %rsi callq 0x125395 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbp, %rcx movq %r15, %r8 callq 0x127e88 shlq $0x3, %rbx movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1c240
/rantala[P]string-sorting/src/mergesort.cpp
void mergesort_losertree_parallel<128u>(unsigned char**, unsigned long, unsigned char**)
static void mergesort_losertree_parallel(unsigned char** strings, size_t n, unsigned char** tmp) { if (n < 0x10000) { mergesort_4way_parallel(strings, n, tmp); return; } debug() << __func__ << "(), n="<<n<<"\n"; const size_t split = size_t(double(n) / double(K)); std::array<std::pair<unsigned char**, size_t>, K> ranges; for (unsigned i=0; i < K-1; ++i) { ranges[i] = std::make_pair(strings+i*split, split); } ranges[K-1] = std::make_pair(strings+(K-1)*split, n-(K-1)*split); #pragma omp parallel for for (unsigned i=0; i < K; ++i) { mergesort_losertree_parallel<K>(ranges[i].first, ranges[i].second, tmp+(ranges[i].first-strings)); } unsigned char** result = tmp; loser_tree<unsigned char*> tree(ranges.begin(), ranges.end()); while (tree._nonempty_streams) { *result++ = tree.min(); } (void) memcpy(strings, tmp, n*sizeof(unsigned char*)); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x820, %rsp # imm = 0x820 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x134140 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x820, %rsp # imm = 0x820 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x127c77 movq 0xa36b29(%rip), %rsi # 0xb6ac70 movq 0xa36b2a(%rip), %rdx # 0xb6ac78 movq 0x65e9b(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r12 leaq 0x34d30(%rip), %rsi # 0x168e94 movl $0x1c, %edx movq %rax, %rdi callq 0x1c350 leaq 0x220f0(%rip), %rsi # 0x156268 movl $0x6, %edx movq %r12, %rdi callq 0x1c350 movq %r12, %rdi movq %r14, %rsi callq 0x1c200 leaq 0x20f9d(%rip), %rsi # 0x155134 movl $0x1, %edx movq %rax, %rdi callq 0x1c350 movq %r14, %xmm0 punpckldq 0x3326f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] subpd 0x33277(%rip), %xmm0 # 0x167430 movapd %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] addsd %xmm0, %xmm1 mulsd 0x347e3(%rip), %xmm1 # 0x1689b0 cvttsd2si %xmm1, %rax movq %rax, %rcx sarq $0x3f, %rcx subsd 0x3328f(%rip), %xmm1 # 0x167470 cvttsd2si %xmm1, %r12 andq %rcx, %r12 orq %rax, %r12 leaq 0x20(%rsp), %rdi movl $0x800, %edx # imm = 0x800 xorl %esi, %esi callq 0x1c180 leaq (,%r12,8), %rax movl $0x8, %ecx movq %r15, %rdx movq %rdx, 0x18(%rsp,%rcx) movq %r12, 0x20(%rsp,%rcx) addq %rax, %rdx addq $0x10, %rcx cmpq $0x7f8, %rcx # imm = 0x7F8 jne 0x13420d imulq $0x3f8, %r12, %rax # imm = 0x3F8 addq %r15, %rax movq %r12, %rcx shlq $0x7, %rcx subq %rcx, %r12 addq %r14, %r12 movq %rax, 0x810(%rsp) movq %r12, 0x818(%rsp) xorl %r12d, %r12d movq 0x20(%rsp,%r12), %rdi movq 0x28(%rsp,%r12), %rsi movq %rdi, %rdx subq %r15, %rdx addq %rbx, %rdx callq 0x134100 addq $0x10, %r12 cmpq $0x800, %r12 # imm = 0x800 jne 0x134251 leaq 0x820(%rsp), %rdx leaq 0x8(%rsp), %r12 leaq 0x20(%rsp), %rsi movq %r12, %rdi callq 0x1349c2 cmpl $0x0, 0x10(%r12) je 0x1342b7 leaq 0x8(%rsp), %r12 movq %rbx, %r13 movq %r12, %rdi callq 0x134aa2 movq %rax, (%r13) addq $0x8, %r13 cmpl $0x0, 0x18(%rsp) jne 0x1342a0 shlq $0x3, %r14 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1c240 leaq 0x8(%rsp), %rdi callq 0x134b38 addq $0x820, %rsp # imm = 0x820 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x134b38 movq %rbx, %rdi callq 0x1c540
/rantala[P]string-sorting/src/mergesort_losertree.cpp
mergesort_lcp_3way_parallel(unsigned char**, unsigned long)
void mergesort_lcp_3way_parallel(unsigned char** strings, size_t n) { debug() << __func__ << '\n'; lcp_t* lcp_input = (lcp_t*) malloc(n*sizeof(lcp_t)); lcp_t* lcp_tmp = (lcp_t*) malloc(n*sizeof(lcp_t)); unsigned char** input_tmp = (unsigned char**) malloc(n*sizeof(unsigned char*)); #pragma omp parallel { #pragma omp single { const MergeResult m = mergesort_lcp_3way_parallel<false>( strings, input_tmp, lcp_input, lcp_tmp, n); if (m == SortedInTemp) { (void) memcpy(strings, input_tmp, n*sizeof(unsigned char*)); } } } free(lcp_input); free(lcp_tmp); free(input_tmp); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0xa35c8b(%rip), %rsi # 0xb6ac98 movq 0xa35c8c(%rip), %rdx # 0xb6aca0 movq 0x64fd5(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r15 leaq 0x340e3(%rip), %rsi # 0x16910d movl $0x1b, %edx movq %rax, %rdi callq 0x1c350 leaq 0x7(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %r15, %rdi callq 0x1c350 leaq (,%r14,8), %r15 movq %r15, %rdi callq 0x1c3f0 movq %rax, %r12 movq %r15, %rdi callq 0x1c3f0 movq %rax, %r13 movq %r15, %rdi callq 0x1c3f0 movq %rax, %rbp movq %rbx, %rdi movq %rax, %rsi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 callq 0x140b1f cmpl $0x1, %eax jne 0x13509c movq %rbx, %rdi movq %rbp, %rsi movq %r15, %rdx callq 0x1c240 movq %r12, %rdi callq 0x1c380 movq %r13, %rdi callq 0x1c380 movq %rbp, %rdi callq 0x1c380 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/rantala[P]string-sorting/src/mergesort_lcp.cpp
mergesort_cache2_lcp_2way_parallel(unsigned char**, unsigned long)
void mergesort_cache2_lcp_2way_parallel(unsigned char** strings, size_t n) { mergesort_cache_lcp_2way_parallel<uint16_t>(strings, n); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %r12 leaq (,%rsi,8), %rbx movq %rbx, %rdi callq 0x1c3f0 movq %rax, 0x20(%rsp) movq %rbx, %rdi callq 0x1c3f0 movq %rax, 0x18(%rsp) movq %rbx, %rdi callq 0x1c3f0 movq %rax, %r13 leaq (%r14,%r14), %r15 movq %r15, %rdi callq 0x1c3f0 movq %rax, %rbp movq %r15, %rdi callq 0x1c3f0 movq %rax, %r15 movq %r14, (%rsp) movq 0x20(%rsp), %r14 movq %r12, 0x10(%rsp) movq %r12, %rdi movq 0x18(%rsp), %r12 movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq %rbp, %r8 movq %rax, %r9 callq 0x14d0ab cmpl $0x1, %eax jne 0x1354a5 movq 0x10(%rsp), %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x1c240 movq %r14, %rdi callq 0x1c380 movq %r12, %rdi callq 0x1c380 movq %r13, %rdi callq 0x1c380 movq %rbp, %rdi callq 0x1c380 movq %r15, %rdi addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1c380
/rantala[P]string-sorting/src/mergesort_lcp.cpp
to_str[abi:cxx11](unsigned char)
static std::string to_str(unsigned char c) { std::ostringstream strm; if (isprint(c)) strm << c; else strm << '<' << int(c) << '>'; return strm.str(); }
pushq %rbp pushq %rbx subq $0x188, %rsp # imm = 0x188 movl %esi, %ebp movq %rdi, %rbx leaq 0x10(%rsp), %rdi callq 0x1c400 movl %ebp, %edi callq 0x1c550 leaq 0xf(%rsp), %rsi testl %eax, %eax je 0x13d91d movb %bpl, (%rsi) leaq 0x10(%rsp), %rdi movl $0x1, %edx callq 0x1c350 jmp 0x13d94e movb $0x3c, (%rsi) leaq 0x10(%rsp), %rdi movl $0x1, %edx callq 0x1c350 movq %rax, %rdi movl %ebp, %esi callq 0x1c520 leaq 0xf(%rsp), %rsi movb $0x3e, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x1c4a0 movq 0x5c65e(%rip), %rsi # 0x199fc0 leaq 0x10(%rsp), %rdi callq 0x1c170 leaq 0x80(%rsp), %rdi callq 0x1c0c0 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %rbp retq movq %rax, %rbx movq 0x5c630(%rip), %rsi # 0x199fc0 leaq 0x10(%rsp), %rdi callq 0x1c170 leaq 0x80(%rsp), %rdi callq 0x1c0c0 movq %rbx, %rdi callq 0x1c540
/rantala[P]string-sorting/src/mergesort_lcp.cpp
void merge_lcp_2way_unstable<false>(unsigned char**, unsigned long*, unsigned long, unsigned char**, unsigned long*, unsigned long, unsigned char**, unsigned long*)
static void merge_lcp_2way_unstable( unsigned char** from0, lcp_t* restrict lcp_input0, size_t n0, unsigned char** from1, lcp_t* restrict lcp_input1, size_t n1, unsigned char** result, lcp_t* restrict lcp_result) { debug() << __func__ << "(): n0=" << n0 << ", n1=" << n1 << '\n'; check_input(from0, lcp_input0, n0); check_input(from1, lcp_input1, n1); lcp_t lcp0=0, lcp1=0; int cmp01; lcp_t lcp01; std::tie(cmp01, lcp01) = compare(*from0, *from1); if (cmp01 <= 0) { *result++ = *from0++; lcp0 = *lcp_input0++; lcp1 = lcp01; if (--n0 == 0) goto finish0; } else { *result++ = *from1++; lcp1 = *lcp_input1++; lcp0 = lcp01; if (--n1 == 0) goto finish1; } while (true) { debug() << "Starting loop, n0="<<n0<<", n1="<<n1<<" ...\n" << "\tprev = '" <<*(result-1)<<"'\n" << "\tfrom0 = '"<<*from0<<"'\n" << "\tfrom1 = '"<<*from1<<"'\n" << "\tlcp0 = " << lcp0 << "\n" << "\tlcp1 = " << lcp1 << "\n" << "\n"; check_lcps(*(result-1),*from0,lcp0,*from1,lcp1); if (lcp0 > lcp1) { assert(cmp(*from0, *from1) < 0); *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0; lcp0 = *lcp_input0++; if (--n0 == 0) goto finish0; } else if (lcp0 < lcp1) { assert(cmp(*from0, *from1) > 0); *result++ = *from1++; if (OutputLCP) *lcp_result++ = lcp1; lcp1 = *lcp_input1++; if (--n1 == 0) goto finish1; } else { int cmp01; lcp_t lcp01; std::tie(cmp01,lcp01) = compare(*from0, *from1, lcp0); if (cmp01 < 0) { *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0; lcp1 = lcp01; if (--n0 == 0) goto finish0; lcp0 = *lcp_input0++; } else if (cmp01 == 0) { assert(cmp(*from0, *from1)==0); assert(n0); assert(n1); if (OutputLCP) *lcp_result++ = lcp0; if (OutputLCP) *lcp_result++ = lcp01; *result++ = *from0++; *result++ = *from1++; --n0; --n1; lcp0 = *lcp_input0++; lcp1 = *lcp_input1++; if (n0 == 0) goto finish0; if (n1 == 0) goto finish1; } else { *result++ = *from1++; if (OutputLCP) *lcp_result++ = lcp0; lcp0 = lcp01; if (--n1 == 0) goto finish1; lcp1 = *lcp_input1++; } } } finish0: debug() << '~' << __func__ << "(): n0=" << n0 << ", n1=" << n1 << '\n'; assert(not n0); if (n1) { std::copy(from1, from1+n1, result); if (OutputLCP) *lcp_result++ = lcp1; if (OutputLCP) std::copy(lcp_input1, lcp_input1+n1, lcp_result); } return; finish1: debug() << '~' << __func__ << "(): n0=" << n0 << ", n1=" << n1 << '\n'; assert(not n1); if (n0) { std::copy(from0, from0+n0, result); if (OutputLCP) *lcp_result++ = lcp0; if (OutputLCP) std::copy(lcp_input0, lcp_input0+n0, lcp_result); } return; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %r14 movq %r8, 0x20(%rsp) movq %rcx, 0x8(%rsp) movq %rdx, %rbp movq %rsi, %r12 movq %rdi, %r15 movq 0xa2c28f(%rip), %rsi # 0xb6ac98 movq 0xa2c290(%rip), %rdx # 0xb6aca0 movq 0x5b5d9(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r13 leaq 0x2c8ce(%rip), %rsi # 0x16b2f4 movl $0x17, %edx movq %rax, %rdi callq 0x1c350 leaq 0x2a955(%rip), %rsi # 0x16938f movl $0x7, %edx movq %r13, %rdi callq 0x1c350 movq %r13, %rdi movq %rbp, %rsi callq 0x1c200 movq %rax, %r13 leaq 0x28df6(%rip), %rsi # 0x167852 movl $0x5, %edx movq %rax, %rdi callq 0x1c350 movq %r13, %rdi movq %r14, %rsi callq 0x1c200 leaq 0x30(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 movq %r15, %rdi movq %r12, %rbx movq %r12, %rsi movq 0x8(%rsp), %r12 movq %rbp, %rdx callq 0x13642d movq %r12, %rdi movq 0x20(%rsp), %rsi movq %r14, %rdx callq 0x13642d movq (%r15), %rsi movq (%r12), %rdx leaq 0x30(%rsp), %r13 movq %r13, %rdi xorl %ecx, %ecx callq 0x134d98 movq 0x90(%rsp), %rsi movq (%r13), %rax movq %rax, 0x48(%rsp) leaq 0x8(%rsi), %r10 cmpl $0x0, 0x8(%r13) jle 0x13eb1f movq 0x20(%rsp), %rdx movq %r15, %r13 movq (%r12), %rax movq %rax, (%rsi) decq %r14 je 0x13f04e movq %rbx, %rcx movq %r12, %r9 movq %r14, (%rsp) addq $0x8, %r9 movq %rdx, %rbx leaq 0x8(%rdx), %rax movq %rax, 0x18(%rsp) movq %rcx, 0x10(%rsp) leaq 0x48(%rsp), %r12 jmp 0x13eb54 movq %r14, (%rsp) movq (%r15), %rax addq $0x8, %r15 movq %rax, (%rsi) movq %rbx, %rcx leaq 0x8(%rbx), %rax movq %rax, 0x10(%rsp) decq %rbp movq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x48(%rsp), %rbx movq %r15, %r13 movq %r12, %r9 movq %rcx, %r12 movq (%rbx), %rbx movq (%r12), %rax movq %rax, 0x8(%rsp) movq %r10, %r15 movq %r9, 0x28(%rsp) xorl %r14d, %r14d movq (%rsp), %r12 movq %rbp, 0x40(%rsp) movq %r10, 0x50(%rsp) movq %r13, 0x20(%rsp) movq 0xa2c113(%rip), %rsi # 0xb6ac98 movq 0xa2c114(%rip), %rdx # 0xb6aca0 movq 0x5b45d(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r13 movl $0x12, %edx movq %rax, %rdi leaq 0x2b598(%rip), %rsi # 0x16a142 callq 0x1c350 movq %r13, %rdi movq %rbp, %rsi callq 0x1c200 movq %rax, %r13 movl $0x5, %edx movq %rax, %rdi leaq 0x28c86(%rip), %rsi # 0x167852 callq 0x1c350 movq %r13, %rdi movq %r12, (%rsp) movq %r12, %rsi callq 0x1c200 movq %rax, %rbp movl $0x5, %edx movq %rax, %rdi leaq 0x16599(%rip), %rsi # 0x15518b callq 0x1c350 movl $0xa, %edx movq %rbp, %rdi leaq 0x2c706(%rip), %rsi # 0x16b30c callq 0x1c350 movq -0x8(%r15,%r14), %r13 testq %r13, %r13 je 0x13ec2d movq %r13, %rdi callq 0x1c130 movq %rbp, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x1c350 jmp 0x13ec45 movq (%rbp), %rax movq -0x18(%rax), %rax leaq (%rax,%rbp), %rdi movl 0x20(%rbp,%rax), %esi orl $0x1, %esi callq 0x1c510 leaq 0x17635(%rip), %r12 # 0x156281 movq 0x28(%rsp), %r15 movl $0x2, %edx movq %rbp, %rdi movq %r12, %rsi callq 0x1c350 movl $0xa, %edx movq %rbp, %rdi leaq 0x2c6a7(%rip), %rsi # 0x16b317 callq 0x1c350 movq 0x20(%rsp), %rax movq (%rax), %r13 testq %r13, %r13 je 0x13ec9a movq %r13, %rdi callq 0x1c130 movq %rbp, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x1c350 jmp 0x13ecb2 movq (%rbp), %rax movq -0x18(%rax), %rax leaq (%rax,%rbp), %rdi movl 0x20(%rbp,%rax), %esi orl $0x1, %esi callq 0x1c510 movl $0x2, %edx movq %rbp, %rdi movq %r12, %rsi callq 0x1c350 movl $0xa, %edx movq %rbp, %rdi leaq 0x2c651(%rip), %rsi # 0x16b322 callq 0x1c350 movq (%r15,%r14), %r13 testq %r13, %r13 je 0x13ecf7 movq %r13, %rdi callq 0x1c130 movq %rbp, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x1c350 jmp 0x13ed11 movq (%rbp), %rax movq -0x18(%rax), %rax movq %rbp, %rdi addq %rax, %rdi movl 0x20(%rbp,%rax), %esi orl $0x1, %esi callq 0x1c510 movl $0x2, %edx movq %rbp, %rdi movq %r12, %rsi callq 0x1c350 movl $0x9, %edx movq %rbp, %rdi leaq 0x2c5fd(%rip), %rsi # 0x16b32d callq 0x1c350 movq %rbp, %rdi movq 0x8(%rsp), %rbp movq %rbp, %rsi callq 0x1c200 movq %rax, %r13 movl $0x1, %edx movq %rax, %rdi leaq 0x163dd(%rip), %r12 # 0x155134 movq %r12, %rsi callq 0x1c350 movl $0x9, %edx movq %r13, %rdi leaq 0x2c5c9(%rip), %rsi # 0x16b337 callq 0x1c350 movq %r13, %rdi movq %rbx, %rsi callq 0x1c200 movq %rax, %r13 movl $0x1, %edx movq %rax, %rdi movq %r12, %rsi callq 0x1c350 movl $0x1, %edx movq %r13, %rdi movq %r12, %rsi callq 0x1c350 movq 0x50(%rsp), %r12 movq -0x8(%r12,%r14), %rdi movq 0x20(%rsp), %r13 movq (%r13), %rsi movq (%r15,%r14), %rcx movq %rbp, %rdx movq %rbx, %r8 callq 0x13fd20 cmpq %rbx, %rbp ja 0x13ee23 movq 0x40(%rsp), %rbp jae 0x13ee97 movq (%r13), %rdi testq %rdi, %rdi je 0x13f201 movq (%r15,%r14), %rbx testq %rbx, %rbx je 0x13f220 movq %rbx, %rsi callq 0x1c420 testl %eax, %eax jle 0x13f23f movq %rbx, (%r12,%r14) movq 0x18(%rsp), %rax movq (%rax,%r14), %rbx addq $0x8, %r14 movq %r12, %r15 movq (%rsp), %r12 decq %r12 jne 0x13eb7e jmp 0x13f049 movq (%r13), %r13 testq %r13, %r13 movq 0x40(%rsp), %rbp je 0x13f201 movq (%r15,%r14), %rsi testq %rsi, %rsi je 0x13f220 movq %r13, %rdi callq 0x1c420 testl %eax, %eax jns 0x13f27d leaq (%r15,%r14), %r9 addq %r14, 0x18(%rsp) movq 0x20(%rsp), %rax addq $0x8, %rax leaq (%r12,%r14), %r10 addq $0x8, %r10 movq %r13, -0x8(%r10) movq %rax, %r13 movq 0x10(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x8(%rsp) addq $0x8, %rax movq %rax, 0x10(%rsp) decq %rbp jne 0x13eb60 jmp 0x13f122 movq (%r13), %rsi movq %r15, %rax addq %r14, %r15 movq (%rax,%r14), %rdx leaq 0x30(%rsp), %rdi movq 0x8(%rsp), %rcx callq 0x134d98 movq 0x30(%rsp), %rax movq 0x18(%rsp), %rcx addq %r14, %rcx cmpl $0x0, 0x38(%rsp) js 0x13ef0e movq (%r15), %rsi je 0x13ef49 movq 0x28(%rsp), %rdx leaq (%rdx,%r14), %r9 addq $0x8, %r9 leaq (%r12,%r14), %r10 addq $0x8, %r10 movq %rsi, -0x8(%r10) movq (%rsp), %rdx cmpq $0x1, %rdx jne 0x13efe5 movl $0x3, %edx movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq %rbx, %rax jmp 0x13f01e movq %r15, %r9 movq (%r13), %rdx addq $0x8, %r13 leaq (%r12,%r14), %r10 addq $0x8, %r10 movq %rdx, -0x8(%r10) decq %rbp je 0x13f005 movq 0x10(%rsp), %rdx movq (%rdx), %rsi movq %rsi, 0x8(%rsp) addq $0x8, %rdx movq %rdx, 0x10(%rsp) jmp 0x13f001 movq (%r13), %rbx testq %rbx, %rbx movq 0x28(%rsp), %r15 je 0x13f201 testq %rsi, %rsi je 0x13f220 movq %rbx, %rdi callq 0x1c420 testl %eax, %eax jne 0x13f29c testq %rbp, %rbp je 0x13f2c4 movq (%rsp), %r8 testq %r8, %r8 je 0x13f2bb addq $0x8, %r13 leaq (%r12,%r14), %r10 addq $0x10, %r10 movq %rbx, -0x10(%r10) leaq 0x8(%r15,%r14), %r9 movq -0x8(%r9), %rax movq %rax, -0x8(%r10) leaq -0x1(%r8), %rsi movq 0x10(%rsp), %rax leaq 0x8(%rax), %rdi movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rax leaq (%rax,%r14), %rcx addq $0x8, %rcx movq -0x8(%rcx), %rax decq %rbp je 0x13f00e xorl %edx, %edx cmpq $0x1, %r8 sete %dl leal (%rdx,%rdx,2), %edx movq %rdi, 0x10(%rsp) jmp 0x13f01a decq %rdx movq %rdx, (%rsp) movq 0x18(%rsp), %rcx addq %r14, %rcx addq $0x8, %rcx movq %rax, 0x8(%rsp) movq -0x8(%rcx), %rax xorl %edx, %edx jmp 0x13f01e movl $0x2, %edx xorl %ebp, %ebp jmp 0x13f01e movl $0x2, %edx movq %rdi, 0x10(%rsp) xorl %ebp, %ebp movq %rsi, (%rsp) movq %rcx, 0x18(%rsp) movq %rax, %rbx testl %edx, %edx je 0x13eb60 cmpl $0x1, %edx movq (%rsp), %r14 je 0x13f113 cmpl $0x3, %edx jne 0x13f134 movq %r10, %r15 jmp 0x13f054 addq %r14, %r15 jmp 0x13f051 movq %r10, %r15 xorl %r14d, %r14d movq 0xa2bc3d(%rip), %rsi # 0xb6ac98 movq 0xa2bc3e(%rip), %rdx # 0xb6aca0 movq 0x5af87(%rip), %rdi # 0x199ff0 callq 0x1c350 leaq 0x30(%rsp), %rbx movb $0x7e, (%rbx) movl $0x1, %edx movq %rax, %rdi movq %rbx, %rsi callq 0x1c350 movq %rax, %r12 leaq 0x2c264(%rip), %rsi # 0x16b2f4 movl $0x17, %edx movq %rax, %rdi callq 0x1c350 leaq 0x2a2eb(%rip), %rsi # 0x16938f movl $0x7, %edx movq %r12, %rdi callq 0x1c350 movq %r12, %rdi movq %rbp, %rsi callq 0x1c200 movq %rax, %r12 leaq 0x2878c(%rip), %rsi # 0x167852 movl $0x5, %edx movq %rax, %rdi callq 0x1c350 movq %r12, %rdi movq %r14, %rsi callq 0x1c200 movb $0xa, (%rbx) leaq 0x30(%rsp), %rsi movl $0x1, %edx movq %rax, %rdi callq 0x1c350 testq %r14, %r14 jne 0x13f25e testq %rbp, %rbp je 0x13f113 shlq $0x3, %rbp movq %r15, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1c4b0 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq %r14, %r15 leaq (%r12,%r14), %r13 addq $0x8, %r13 xorl %ebp, %ebp movq %r15, %r12 jmp 0x13f13a movq %r10, %r13 movq %r9, %r12 movq 0xa2bb57(%rip), %rsi # 0xb6ac98 movq 0xa2bb58(%rip), %rdx # 0xb6aca0 movq 0x5aea1(%rip), %rdi # 0x199ff0 callq 0x1c350 leaq 0x30(%rsp), %rbx movb $0x7e, (%rbx) movl $0x1, %edx movq %rax, %rdi movq %rbx, %rsi callq 0x1c350 movq %rax, %r15 leaq 0x2c17e(%rip), %rsi # 0x16b2f4 movl $0x17, %edx movq %rax, %rdi callq 0x1c350 leaq 0x2a205(%rip), %rsi # 0x16938f movl $0x7, %edx movq %r15, %rdi callq 0x1c350 movq %r15, %rdi movq %rbp, %rsi callq 0x1c200 movq %rax, %r15 leaq 0x286a6(%rip), %rsi # 0x167852 movl $0x5, %edx movq %rax, %rdi callq 0x1c350 movq %r15, %rdi movq (%rsp), %r14 movq %r14, %rsi callq 0x1c200 movb $0xa, (%rbx) leaq 0x30(%rsp), %rsi movl $0x1, %edx movq %rax, %rdi callq 0x1c350 testq %rbp, %rbp jne 0x13f2e3 testq %r14, %r14 je 0x13f113 movq %r12, %rsi movq %r13, %rdi shlq $0x3, %r14 movq %r14, %rdx jmp 0x13f10e leaq 0x17121(%rip), %rdi # 0x156329 leaq 0x29e41(%rip), %rsi # 0x169050 leaq 0x1711a(%rip), %rcx # 0x156330 movl $0x51, %edx callq 0x1c1e0 leaq 0x1713f(%rip), %rdi # 0x156366 leaq 0x29e22(%rip), %rsi # 0x169050 leaq 0x170fb(%rip), %rcx # 0x156330 movl $0x52, %edx callq 0x1c1e0 leaq 0x2a1f7(%rip), %rdi # 0x16943d leaq 0x29e03(%rip), %rsi # 0x169050 leaq 0x2c204(%rip), %rcx # 0x16b458 movl $0x655, %edx # imm = 0x655 callq 0x1c1e0 leaq 0x2a1f7(%rip), %rdi # 0x16945c leaq 0x29de4(%rip), %rsi # 0x169050 leaq 0x2c1e5(%rip), %rcx # 0x16b458 movl $0x684, %edx # imm = 0x684 callq 0x1c1e0 leaq 0x28ee4(%rip), %rdi # 0x168168 leaq 0x29dc5(%rip), %rsi # 0x169050 leaq 0x2c1c6(%rip), %rcx # 0x16b458 movl $0x64f, %edx # imm = 0x64F callq 0x1c1e0 leaq 0x2c14d(%rip), %rdi # 0x16b3f0 leaq 0x29da6(%rip), %rsi # 0x169050 leaq 0x2c1a7(%rip), %rcx # 0x16b458 movl $0x664, %edx # imm = 0x664 callq 0x1c1e0 leaq 0x2a19e(%rip), %rdi # 0x169460 jmp 0x13f2cb leaq 0x2a18e(%rip), %rdi # 0x169459 leaq 0x29d7e(%rip), %rsi # 0x169050 leaq 0x2c17f(%rip), %rcx # 0x16b458 movl $0x665, %edx # imm = 0x665 callq 0x1c1e0 leaq 0x2a16b(%rip), %rdi # 0x169455 leaq 0x29d5f(%rip), %rsi # 0x169050 leaq 0x2c160(%rip), %rcx # 0x16b458 movl $0x67b, %edx # imm = 0x67B callq 0x1c1e0
/rantala[P]string-sorting/src/mergesort_lcp.cpp
MergeResult mergesort_lcp_2way_parallel<false>(unsigned char**, unsigned char**, unsigned long*, unsigned long*, unsigned long)
MergeResult mergesort_lcp_2way_parallel( unsigned char** restrict strings_input, unsigned char** restrict strings_output, lcp_t* restrict lcp_input, lcp_t* restrict lcp_output, size_t n) { assert(n > 0); debug() << __func__ << "(): n=" << n << '\n'; if (n < 0x10000) return mergesort_lcp_2way<true>( strings_input, strings_output, lcp_input, lcp_output, n); const size_t split0 = n/2; MergeResult ml, mr; #pragma omp task shared(ml) ml = mergesort_lcp_2way_parallel<true>( strings_input, strings_output, lcp_input, lcp_output, split0); #pragma omp task shared(mr) mr = mergesort_lcp_2way_parallel<true>( strings_input+split0, strings_output+split0, lcp_input+split0, lcp_output+split0, n-split0); #pragma omp taskwait if (ml != mr) { if (ml == SortedInPlace) { std::copy(strings_output+split0, strings_output+n, strings_input+split0); std::copy(lcp_output+split0, lcp_output+n, lcp_input+split0); mr = SortedInPlace; } else { assert(0); abort(); } } if (ml == SortedInPlace) { merge_lcp_2way<OutputLCP>( strings_input, lcp_input, split0, strings_input+split0, lcp_input+split0, n-split0, strings_output, lcp_output); return SortedInTemp; } else { merge_lcp_2way<OutputLCP>( strings_output, lcp_output, split0, strings_output+split0, lcp_output+split0, n-split0, strings_input, lcp_input); return SortedInPlace; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp testq %r8, %r8 je 0x1403cb movq %r8, %rbx movq %rcx, %r12 movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r13 movq 0xa2aa53(%rip), %rsi # 0xb6ac98 movq 0xa2aa54(%rip), %rdx # 0xb6aca0 movq 0x59d9d(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r14 leaq 0x28eda(%rip), %rsi # 0x16913c movl $0x1b, %edx movq %rax, %rdi callq 0x1c350 leaq 0x2906b(%rip), %rsi # 0x1692e1 movl $0x6, %edx movq %r14, %rdi callq 0x1c350 movq %r14, %rdi movq %rbx, %rsi callq 0x1c200 leaq 0x17(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 cmpq $0xffff, %rbx # imm = 0xFFFF ja 0x1402c5 movq %r13, %rdi movq %r15, %rsi movq %rbp, %rdx movq %r12, %rcx movq %rbx, %r8 callq 0x141689 jmp 0x1403bc movq %r13, %r14 movq %rbp, %r13 movq %rbx, %rbp shrq %rbp movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx movq %rbp, %r8 callq 0x14191c movq %r15, %rcx movl %eax, %r15d movq %r14, 0x20(%rsp) leaq (%r14,%rbp,8), %rax movq %rcx, 0x28(%rsp) leaq (%rcx,%rbp,8), %r14 movq %r13, 0x38(%rsp) leaq (%r13,%rbp,8), %rdx movq %rax, %r13 movq %r12, 0x40(%rsp) leaq (%r12,%rbp,8), %r12 subq %rbp, %rbx movq %rax, %rdi movq %r14, %rsi movq %rdx, 0x18(%rsp) movq %r12, %rcx movq %rbx, %r8 callq 0x14191c cmpl %eax, %r15d je 0x140364 testl %r15d, %r15d jne 0x1403ea leaq (,%rbx,8), %rdx movq %rdx, 0x30(%rsp) movq %r13, %rdi movq %r14, %rsi callq 0x1c240 movq 0x18(%rsp), %rdi movq %r12, %rsi movq 0x30(%rsp), %rdx callq 0x1c240 testl %r15d, %r15d je 0x140391 movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rsi movq %rbp, %rdx movq %r14, %rcx movq %r12, %r8 movq %rbx, %r9 callq 0x1356d5 xorl %eax, %eax jmp 0x1403bc movq 0x28(%rsp), %rax movq %rax, (%rsp) movq 0x20(%rsp), %rdi movq 0x38(%rsp), %rsi movq %rbp, %rdx movq %r13, %rcx movq 0x18(%rsp), %r8 movq %rbx, %r9 callq 0x1356d5 movl $0x1, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x28e70(%rip), %rdi # 0x169242 leaq 0x28c77(%rip), %rsi # 0x169050 leaq 0x2912a(%rip), %rcx # 0x16950a movl $0x121, %edx # imm = 0x121 callq 0x1c1e0 leaq 0x27f9c(%rip), %rdi # 0x16838d leaq 0x28c58(%rip), %rsi # 0x169050 leaq 0x2910b(%rip), %rcx # 0x16950a movl $0x13c, %edx # imm = 0x13C callq 0x1c1e0
/rantala[P]string-sorting/src/mergesort_lcp.cpp
MergeResult mergesort_cache_lcp_2way<true, unsigned char>(unsigned char**, unsigned char**, unsigned long*, unsigned long*, unsigned char*, unsigned char*, unsigned long)
MergeResult mergesort_cache_lcp_2way( unsigned char** strings_input, unsigned char** strings_output, lcp_t* restrict lcp_input, lcp_t* restrict lcp_output, CharT* restrict cache_input, CharT* restrict cache_output, size_t n) { debug() << __func__ << "(): n=" << n << '\n'; if (n < 32) { insertion_sort(strings_input, n, 0); lcp_input[0] = lcp(strings_input[0], strings_input[1]); cache_input[0] = get_char<CharT>(strings_input[0], 0); for (unsigned i=1; i < n-1; ++i) { lcp_input[i] = lcp(strings_input[i], strings_input[i+1]); cache_input[i] = get_char<CharT>(strings_input[i], lcp_input[i-1]); } cache_input[n-1] = get_char<CharT>(strings_input[n-1], lcp_input[n-2]); check_input(strings_input, lcp_input, cache_input, n); return SortedInPlace; } const size_t split0 = n/2; MergeResult m0 = mergesort_cache_lcp_2way<true>( strings_input, strings_output, lcp_input, lcp_output, cache_input, cache_output, split0); if (m0==SortedInPlace) check_input(strings_input, lcp_input, cache_input, split0); else check_input(strings_output, lcp_output, cache_output, split0); MergeResult m1 = mergesort_cache_lcp_2way<true>( strings_input+split0, strings_output+split0, lcp_input+split0, lcp_output+split0, cache_input+split0, cache_output+split0, n-split0); if (m0==SortedInPlace) check_input(strings_input+split0, lcp_input+split0, cache_input+split0, n-split0); else check_input(strings_output+split0, lcp_output+split0, cache_output+split0, n-split0); if (m0 != m1) { debug() << "Warning: extra copying due to m0 != m1. n="<<n<<"\n"; if (m0 == SortedInPlace) { std::copy(strings_input, strings_input+split0, strings_output); std::copy(cache_input, cache_input+split0, cache_output); std::copy(lcp_input, lcp_input+split0, lcp_output); m0 = SortedInTemp; } else { std::copy(strings_output, strings_output+split0, strings_input); std::copy(cache_output, cache_output+split0, cache_input); std::copy(lcp_output, lcp_output+split0, lcp_input); m1 = SortedInTemp; } } assert(m0 == m1); if (m0 == SortedInPlace) { merge_cache_lcp_2way<OutputLCP>( strings_input, lcp_input, cache_input, split0, strings_input+split0, lcp_input+split0, cache_input+split0, n-split0, strings_output, lcp_output, cache_output); return SortedInTemp; } else { merge_cache_lcp_2way<OutputLCP>( strings_output, lcp_output, cache_output, split0, strings_output+split0, lcp_output+split0, cache_output+split0, n-split0, strings_input, lcp_input, cache_input); return SortedInPlace; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %r9, 0x10(%rsp) movq %r8, %rbx movq %rcx, 0x38(%rsp) movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %r15 movq 0xb0(%rsp), %r13 movq 0xa27eda(%rip), %rsi # 0xb6ac98 movq 0xa27edb(%rip), %rdx # 0xb6aca0 movq 0x57224(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r12 leaq 0x26fc7(%rip), %rsi # 0x169da2 movl $0x18, %edx movq %rax, %rdi callq 0x1c350 leaq 0x264f2(%rip), %rsi # 0x1692e1 movl $0x6, %edx movq %r12, %rdi callq 0x1c350 movq %r12, %rdi movq %r13, %rsi callq 0x1c200 leaq 0x1b(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 cmpq $0x1f, %r13 ja 0x142f77 cmpq $0x2, %r13 movq %rbx, %rdx jl 0x142e9b movl %r13d, %ecx movq %r15, %rax movl %ecx, %ebx leal -0x1(%rbx), %ecx movq 0x8(%rax), %rsi addq $0x8, %rax movq %rax, %rdi cmpq %r15, %rdi jbe 0x142e93 movq -0x8(%rdi), %r10 movb (%r10), %r8b movb (%rsi), %r9b cmpb %r9b, %r8b setne %r11b testb %r8b, %r8b sete %bpl orb %r11b, %bpl jne 0x142e82 movl $0x1, %r11d movb (%r10,%r11), %r8b movb (%rsi,%r11), %r9b testb %r8b, %r8b je 0x142e82 incq %r11 cmpb %r9b, %r8b je 0x142e6d cmpb %r9b, %r8b jbe 0x142e8e movq %r10, (%rdi) addq $-0x8, %rdi cmpb %r9b, %r8b ja 0x142e45 movq %rsi, (%rdi) cmpl $0x2, %ebx jg 0x142e35 movq (%r15), %rax movq 0x8(%r15), %rcx xorl %r9d, %r9d xorl %esi, %esi movb (%rax,%r9), %r8b testb %r8b, %r8b je 0x142ebe cmpb (%rcx,%r9), %r8b jne 0x142ebe incq %rsi movb $0x1, %r8b jmp 0x142ec4 xorl %r8d, %r8d movq %rsi, %rdi incq %r9 testb %r8b, %r8b jne 0x142ea7 movq %rdi, (%r14) testq %rax, %rax je 0x14324c movb (%rax), %al movb %al, (%rdx) leaq -0x1(%r13), %rax cmpq $0x2, %rax jb 0x142f49 movl $0x1, %ebx movl $0x1, %ecx movq (%r15,%rcx,8), %rdi leal 0x1(%rbx), %esi movq (%r15,%rsi,8), %r8 xorl %r9d, %r9d xorl %r10d, %r10d movb (%rdi,%r9), %bpl testb %bpl, %bpl je 0x142f18 cmpb (%r8,%r9), %bpl jne 0x142f18 incq %r10 movb $0x1, %bpl jmp 0x142f1d xorl %ebp, %ebp movq %r10, %r11 incq %r9 testb %bpl, %bpl jne 0x142f01 movq %r11, (%r14,%rcx,8) testq %rdi, %rdi je 0x14324c decl %ebx movq (%r14,%rbx,8), %r8 movb (%rdi,%r8), %dil movb %dil, (%rdx,%rcx) movl %esi, %ecx movl %esi, %ebx cmpq %rcx, %rax ja 0x142ef0 movq -0x8(%r15,%r13,8), %rax testq %rax, %rax je 0x14324c movq -0x10(%r14,%r13,8), %rcx movb (%rax,%rcx), %al movb %al, -0x1(%rdx,%r13) movq %r15, %rdi movq %r14, %rsi movq %r13, %rcx callq 0x13d44b jmp 0x14320d shrq %r13 subq $0x8, %rsp movq %r15, %rdi movq %rbp, %rsi movq %r14, %rdx movq 0x40(%rsp), %r12 movq %r12, %rcx movq %rbx, %r8 movq 0x18(%rsp), %r9 pushq %r13 callq 0x142d8b addq $0x10, %rsp movl %eax, 0xc(%rsp) testl %eax, %eax je 0x142fb7 movq %rbp, %rdi movq %r12, %rsi movq 0x10(%rsp), %rdx jmp 0x142fc0 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r13, %rcx callq 0x13d44b movq %rbx, %rax movq %rbx, 0x20(%rsp) leaq (%r15,%r13,8), %rbx movq %rbp, 0x60(%rsp) leaq (%rbp,%r13,8), %rbp movq %r13, %rdx leaq (%r14,%r13,8), %r13 leaq (%r12,%rdx,8), %rcx leaq (%rax,%rdx), %r12 movq 0x10(%rsp), %rax leaq (%rax,%rdx), %r9 movq 0xb0(%rsp), %rax movq %rdx, 0x70(%rsp) subq %rdx, %rax subq $0x8, %rsp movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movq %rcx, 0x30(%rsp) movq %r12, %r8 movq %r9, 0x70(%rsp) movq %rax, 0x38(%rsp) pushq %rax callq 0x142d8b addq $0x10, %rsp movl %eax, 0x1c(%rsp) cmpl $0x0, 0xc(%rsp) movq %r12, 0x58(%rsp) movq %rbx, 0x50(%rsp) movq %rbp, 0x48(%rsp) movq %r13, 0x40(%rsp) je 0x14306d movq %rbp, %rdi movq 0x28(%rsp), %rbp movq %rbp, %rsi movq 0x68(%rsp), %r12 movq %r12, %rdx movq 0x30(%rsp), %rcx callq 0x13d44b jmp 0x14308a movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq 0x30(%rsp), %rcx callq 0x13d44b movq 0x68(%rsp), %r12 movq 0x28(%rsp), %rbp movl 0xc(%rsp), %eax movl 0x1c(%rsp), %ecx cmpl %ecx, %eax movq 0x70(%rsp), %r13 jne 0x1430b9 movq 0x60(%rsp), %rbx movq 0x58(%rsp), %r10 movq 0x50(%rsp), %r8 movq 0x48(%rsp), %r11 movq 0x40(%rsp), %r9 jmp 0x1431cd movq 0xa27bd8(%rip), %rsi # 0xb6ac98 movq 0xa27bd9(%rip), %rdx # 0xb6aca0 movq 0x56f22(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %rbp leaq 0x26cde(%rip), %rsi # 0x169dbb movl $0x2a, %edx movq %rax, %rdi callq 0x1c350 movq %rbp, %rdi movq 0xb0(%rsp), %rsi callq 0x1c200 leaq 0x12033(%rip), %rsi # 0x155134 movl $0x1, %edx movq %rax, %rdi callq 0x1c350 leaq (,%r13,8), %rbp cmpl $0x0, 0xc(%rsp) je 0x143176 movq %r15, %rdi movq 0x60(%rsp), %rbx movq %rbx, %rsi movq %rbp, %rdx callq 0x1c4b0 movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi movq %r13, %rdx callq 0x1c240 movq %r14, %rdi movq 0x38(%rsp), %rsi movq %rbp, %rdx callq 0x1c240 movl 0xc(%rsp), %eax movl $0x1, %ecx movq 0x58(%rsp), %r10 movq 0x50(%rsp), %r8 movq 0x48(%rsp), %r11 movq 0x40(%rsp), %r9 movq 0x28(%rsp), %rbp jmp 0x1431cd movq 0x60(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x1c4b0 movq 0x10(%rsp), %rdi movq 0x20(%rsp), %rsi movq %r13, %rdx callq 0x1c240 movq 0x38(%rsp), %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1c240 movl $0x1, %eax movq 0x58(%rsp), %r10 movq 0x50(%rsp), %r8 movq 0x48(%rsp), %r11 movq 0x40(%rsp), %r9 movq 0x28(%rsp), %rbp movl 0x1c(%rsp), %ecx cmpl %ecx, %eax jne 0x14326b testl %eax, %eax movq 0x38(%rsp), %rax je 0x14321e subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rsi movq 0x18(%rsp), %rdx movq %r13, %rcx movq %r11, %r8 movq %rbp, %r9 pushq 0x28(%rsp) pushq %r14 pushq %r15 pushq 0x50(%rsp) pushq %r12 callq 0x144267 addq $0x30, %rsp xorl %eax, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq subq $0x8, %rsp movq %r15, %rdi movq %r14, %rsi movq 0x28(%rsp), %rdx movq %r13, %rcx pushq 0x18(%rsp) pushq %rax pushq %rbx pushq 0x50(%rsp) pushq %r10 callq 0x144267 addq $0x30, %rsp movl $0x1, %eax jmp 0x14320f leaq 0x1ee0f(%rip), %rdi # 0x162062 leaq 0x1ee0c(%rip), %rsi # 0x162066 leaq 0x1fb0d(%rip), %rcx # 0x162d6e movl $0x26, %edx callq 0x1c1e0 leaq 0x2643e(%rip), %rdi # 0x1696b0 leaq 0x25dd7(%rip), %rsi # 0x169050 leaq 0x26cea(%rip), %rcx # 0x169f6a movl $0x56e, %edx # imm = 0x56E callq 0x1c1e0
/rantala[P]string-sorting/src/mergesort_lcp.cpp
MergeResult mergesort_cache_lcp_2way<true, unsigned short>(unsigned char**, unsigned char**, unsigned long*, unsigned long*, unsigned short*, unsigned short*, unsigned long)
MergeResult mergesort_cache_lcp_2way( unsigned char** strings_input, unsigned char** strings_output, lcp_t* restrict lcp_input, lcp_t* restrict lcp_output, CharT* restrict cache_input, CharT* restrict cache_output, size_t n) { debug() << __func__ << "(): n=" << n << '\n'; if (n < 32) { insertion_sort(strings_input, n, 0); lcp_input[0] = lcp(strings_input[0], strings_input[1]); cache_input[0] = get_char<CharT>(strings_input[0], 0); for (unsigned i=1; i < n-1; ++i) { lcp_input[i] = lcp(strings_input[i], strings_input[i+1]); cache_input[i] = get_char<CharT>(strings_input[i], lcp_input[i-1]); } cache_input[n-1] = get_char<CharT>(strings_input[n-1], lcp_input[n-2]); check_input(strings_input, lcp_input, cache_input, n); return SortedInPlace; } const size_t split0 = n/2; MergeResult m0 = mergesort_cache_lcp_2way<true>( strings_input, strings_output, lcp_input, lcp_output, cache_input, cache_output, split0); if (m0==SortedInPlace) check_input(strings_input, lcp_input, cache_input, split0); else check_input(strings_output, lcp_output, cache_output, split0); MergeResult m1 = mergesort_cache_lcp_2way<true>( strings_input+split0, strings_output+split0, lcp_input+split0, lcp_output+split0, cache_input+split0, cache_output+split0, n-split0); if (m0==SortedInPlace) check_input(strings_input+split0, lcp_input+split0, cache_input+split0, n-split0); else check_input(strings_output+split0, lcp_output+split0, cache_output+split0, n-split0); if (m0 != m1) { debug() << "Warning: extra copying due to m0 != m1. n="<<n<<"\n"; if (m0 == SortedInPlace) { std::copy(strings_input, strings_input+split0, strings_output); std::copy(cache_input, cache_input+split0, cache_output); std::copy(lcp_input, lcp_input+split0, lcp_output); m0 = SortedInTemp; } else { std::copy(strings_output, strings_output+split0, strings_input); std::copy(cache_output, cache_output+split0, cache_input); std::copy(lcp_output, lcp_output+split0, lcp_input); m1 = SortedInTemp; } } assert(m0 == m1); if (m0 == SortedInPlace) { merge_cache_lcp_2way<OutputLCP>( strings_input, lcp_input, cache_input, split0, strings_input+split0, lcp_input+split0, cache_input+split0, n-split0, strings_output, lcp_output, cache_output); return SortedInTemp; } else { merge_cache_lcp_2way<OutputLCP>( strings_output, lcp_output, cache_output, split0, strings_output+split0, lcp_output+split0, cache_output+split0, n-split0, strings_input, lcp_input, cache_input); return SortedInPlace; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %rbp movq %r8, %rbx movq %rcx, 0x8(%rsp) movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %r15 movq 0xa25126(%rip), %rsi # 0xb6ac98 movq 0xa25127(%rip), %rdx # 0xb6aca0 movq 0x54470(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r12 leaq 0x24213(%rip), %rsi # 0x169da2 movl $0x18, %edx movq %rax, %rdi callq 0x1c350 leaq 0x2373e(%rip), %rsi # 0x1692e1 movl $0x6, %edx movq %r12, %rdi callq 0x1c350 movq %r12, %rdi movq 0xa0(%rsp), %r12 movq %r12, %rsi callq 0x1c200 leaq 0x7(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 cmpq $0x1f, %r12 ja 0x145cad cmpq $0x2, %r12 jl 0x145c54 movl %r12d, %ecx movq %r15, %rax movl %ecx, %edx leal -0x1(%rdx), %ecx movq 0x8(%rax), %rsi addq $0x8, %rax movq %rax, %rdi cmpq %r15, %rdi jbe 0x145c4c movq -0x8(%rdi), %r10 movb (%r10), %r8b movb (%rsi), %r9b cmpb %r9b, %r8b setne %r11b testb %r8b, %r8b sete %bpl orb %r11b, %bpl jne 0x145c3b movl $0x1, %r11d movb (%r10,%r11), %r8b movb (%rsi,%r11), %r9b testb %r8b, %r8b je 0x145c3b incq %r11 cmpb %r9b, %r8b je 0x145c26 cmpb %r9b, %r8b jbe 0x145c47 movq %r10, (%rdi) addq $-0x8, %rdi cmpb %r9b, %r8b ja 0x145bfe movq %rsi, (%rdi) cmpl $0x2, %edx jg 0x145bee movq (%r15), %rax movq 0x8(%r15), %rcx xorl %edx, %edx xorl %esi, %esi movb (%rax,%rdx), %r8b testb %r8b, %r8b je 0x145c76 cmpb (%rcx,%rdx), %r8b jne 0x145c76 incq %rsi movb $0x1, %r8b jmp 0x145c7c xorl %r8d, %r8d movq %rsi, %rdi incq %rdx testb %r8b, %r8b jne 0x145c5f movq %rdi, (%r14) testq %rax, %rax je 0x14602d movzbl (%rax), %ecx testw %cx, %cx je 0x145ec1 movzwl %cx, %ecx shll $0x8, %ecx movzbl 0x1(%rax), %eax orl %ecx, %eax jmp 0x145ec3 shrq %r12 subq $0x8, %rsp movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx movq 0x10(%rsp), %rcx movq %rbx, %r8 movq %rbp, %r9 pushq %r12 callq 0x145b49 addq $0x10, %rsp movl %eax, (%rsp) testl %eax, %eax je 0x145ce7 movq %r13, %rdi movq 0x8(%rsp), %rsi movq %rbp, %rdx jmp 0x145cf0 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r12, %rcx callq 0x13dacf movq %rbp, %rax leaq (%r15,%r12,8), %rdi movq %r13, 0x38(%rsp) leaq (,%r12,8), %rbp addq %r13, %rbp movq %r12, %rsi leaq (%r14,%r12,8), %r12 movq 0x8(%rsp), %rdx leaq (%rdx,%rsi,8), %rcx movq %rbx, 0x18(%rsp) leaq (%rbx,%rsi,2), %r8 movq %rax, 0x40(%rsp) leaq (%rax,%rsi,2), %r13 movq 0xa0(%rsp), %rbx movq %rsi, 0x60(%rsp) subq %rsi, %rbx subq $0x8, %rsp movq %rdi, 0x50(%rsp) movq %rbp, %rsi movq %r12, %rdx movq %rcx, 0x60(%rsp) movq %r8, 0x58(%rsp) movq %r13, %r9 pushq %rbx callq 0x145b49 addq $0x10, %rsp movl %eax, 0x14(%rsp) cmpl $0x0, (%rsp) movq %r13, 0x30(%rsp) movq %rbp, 0x28(%rsp) movq %r12, 0x20(%rsp) je 0x145d8d movq %rbp, %rdi movq 0x58(%rsp), %rsi movq %r13, %rdx jmp 0x145d9a movq 0x48(%rsp), %rdi movq %r12, %rsi movq 0x50(%rsp), %rdx movq %rbx, %rcx callq 0x13dacf movl (%rsp), %eax movl 0x14(%rsp), %ecx cmpl %ecx, %eax movq 0x60(%rsp), %r12 jne 0x145dbc movq 0x8(%rsp), %rbp jmp 0x145e67 movq 0xa24ed5(%rip), %rsi # 0xb6ac98 movq 0xa24ed6(%rip), %rdx # 0xb6aca0 movq 0x5421f(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %rbp leaq 0x23fdb(%rip), %rsi # 0x169dbb movl $0x2a, %edx movq %rax, %rdi callq 0x1c350 movq %rbp, %rdi movq 0xa0(%rsp), %rbp movq %rbp, %rsi callq 0x1c200 leaq 0xf32d(%rip), %rsi # 0x155134 movl $0x1, %edx movq %rax, %rdi callq 0x1c350 leaq (,%r12,8), %r13 andq $-0x2, %rbp cmpl $0x0, (%rsp) je 0x145fdb movq %r15, %rdi movq 0x38(%rsp), %rsi movq %r13, %rdx callq 0x1c4b0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rsi movq %rbp, %rdx callq 0x1c240 movq %r14, %rdi movq 0x8(%rsp), %rbp movq %rbp, %rsi movq %r13, %rdx callq 0x1c240 movl (%rsp), %eax movl $0x1, %ecx movq 0x30(%rsp), %r11 movq 0x28(%rsp), %r8 movq 0x20(%rsp), %r9 cmpl %ecx, %eax jne 0x14604c testl %eax, %eax movq 0x40(%rsp), %rax movq 0x38(%rsp), %r10 je 0x145f80 subq $0x8, %rsp movq %r10, %rdi movq %rbp, %rsi movq %rax, %rdx movq %r12, %rcx movq 0x60(%rsp), %r9 pushq 0x20(%rsp) pushq %r14 pushq %r15 pushq %rbx pushq %r11 callq 0x14734a addq $0x30, %rsp xorl %r12d, %r12d jmp 0x145fc9 xorl %eax, %eax movw %ax, (%rbx) leaq -0x1(%r12), %rax cmpq $0x2, %rax jb 0x145f4f movl $0x1, %edx movl $0x1, %ecx movl %edx, %edi movq (%r15,%rcx,8), %rsi leal 0x1(%rdi), %edx movq (%r15,%rdx,8), %r8 xorl %r9d, %r9d xorl %r10d, %r10d movb (%rsi,%r9), %bpl testb %bpl, %bpl je 0x145f05 cmpb (%r8,%r9), %bpl jne 0x145f05 incq %r10 movb $0x1, %bpl jmp 0x145f0a xorl %ebp, %ebp movq %r10, %r11 incq %r9 testb %bpl, %bpl jne 0x145eee movq %r11, (%r14,%rcx,8) testq %rsi, %rsi je 0x14602d decl %edi movq (%r14,%rdi,8), %rdi movzbl (%rsi,%rdi), %r8d testw %r8w, %r8w je 0x145f42 movzwl %r8w, %r8d shll $0x8, %r8d movzbl 0x1(%rsi,%rdi), %esi orl %r8d, %esi jmp 0x145f44 xorl %esi, %esi movw %si, (%rbx,%rcx,2) movl %edx, %ecx cmpq %rcx, %rax ja 0x145edb movq -0x8(%r15,%r12,8), %rax testq %rax, %rax je 0x14602d movq %r12, %rsi movq -0x10(%r14,%r12,8), %rcx movzbl (%rax,%rcx), %edx xorl %r12d, %r12d testw %dx, %dx je 0x145fb1 movzwl %dx, %edx shll $0x8, %edx movzbl 0x1(%rax,%rcx), %eax orl %edx, %eax jmp 0x145fb3 subq $0x8, %rsp movq %r15, %rdi movq %r14, %rsi movq 0x20(%rsp), %rdx movq %r12, %rcx movq 0x50(%rsp), %r8 pushq %rax pushq %rbp pushq %r10 pushq %rbx pushq 0x78(%rsp) callq 0x14734a addq $0x30, %rsp movl $0x1, %r12d jmp 0x145fc9 xorl %eax, %eax movq %rsi, %rcx movw %ax, -0x2(%rbx,%rsi,2) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x13dacf movl %r12d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x38(%rsp), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x1c4b0 movq 0x40(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rbp, %rdx callq 0x1c240 movq 0x8(%rsp), %rbp movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x1c240 movl $0x1, %eax movq 0x30(%rsp), %r11 movq 0x28(%rsp), %r8 movq 0x20(%rsp), %r9 movl 0x14(%rsp), %ecx jmp 0x145e76 leaq 0x1c02e(%rip), %rdi # 0x162062 leaq 0x1c02b(%rip), %rsi # 0x162066 leaq 0x1c083(%rip), %rcx # 0x1620c5 movl $0x2e, %edx callq 0x1c1e0 leaq 0x2365d(%rip), %rdi # 0x1696b0 leaq 0x22ff6(%rip), %rsi # 0x169050 leaq 0x244a1(%rip), %rcx # 0x16a502 movl $0x56e, %edx # imm = 0x56E callq 0x1c1e0
/rantala[P]string-sorting/src/mergesort_lcp.cpp
void merge_cache_lcp_2way<true, unsigned int>(unsigned char**, unsigned long*, unsigned int*, unsigned long, unsigned char**, unsigned long*, unsigned int*, unsigned long, unsigned char**, unsigned long*, unsigned int*)
void merge_cache_lcp_2way( unsigned char** from0, lcp_t* restrict lcp_input0, CharT* restrict cache_input0, size_t n0, unsigned char** from1, lcp_t* restrict lcp_input1, CharT* restrict cache_input1, size_t n1, unsigned char** result, lcp_t* restrict lcp_result, CharT* restrict cache_result) { debug() << __func__ << "(): n0=" << n0 << ", n1=" << n1 << '\n'; check_input(from0, lcp_input0, cache_input0, n0); check_input(from1, lcp_input1, cache_input1, n1); lcp_t lcp0=0, lcp1=0; CharT cache0 = *cache_input0++; CharT cache1 = *cache_input1++; { stat_try_cache(); if (cache0 < cache1) { assert(cmp(*from0, *from1) < 0); if (sizeof(CharT) > 1) { const int l = lcp(cache0, cache1); if (l > 0) { cache1 = get_char<CharT>(*from1, l); } *result++ = *from0++; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; lcp1 = l; cache0 = *cache_input0++; } else { *result++ = *from0++; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; cache0 = *cache_input0++; } if (--n0 == 0) goto finish0; } else if (cache0 > cache1) { assert(cmp(*from0, *from1) > 0); if (sizeof(CharT) > 1) { const int l = lcp(cache0, cache1); if (l > 0) { cache0 = get_char<CharT>(*from0, l); } *result++ = *from1++; if (OutputLCP) *cache_result++ = cache1; lcp0 = l; lcp1 = *lcp_input1++; cache1 = *cache_input1++; } else { *result++ = *from1++; if (OutputLCP) *cache_result++ = cache1; lcp1 = *lcp_input1++; cache1 = *cache_input1++; } if (--n1 == 0) goto finish1; } else { if (is_end(cache0)) { assert(cmp(*from0, *from1) == 0); if (sizeof(CharT) > 1) { const int l = lcp(cache0, cache1); *result++ = *from0++; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; lcp1 = l; cache0 = *cache_input0++; cache1 = 0; } else { *result++ = *from0++; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; cache0 = *cache_input0++; cache1 = 0; } if (--n0 == 0) goto finish0; } else { stat_cache_useless(); int cmp01; lcp_t lcp01; std::tie(cmp01, lcp01) = compare(*from0, *from1, sizeof(CharT)); if (cmp01 < 0) { *result++ = *from0++; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; lcp1 = lcp01; cache0 = *cache_input0++; cache1 = get_char<CharT>(*from1, lcp01); if (--n0 == 0) goto finish0; } else if (cmp01 == 0) { *result++ = *from0++; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; lcp1 = lcp01; cache0 = *cache_input0++; cache1 = 0; if (--n0 == 0) goto finish0; } else { *result++ = *from1++; if (OutputLCP) *cache_result++ = cache1; lcp0 = lcp01; lcp1 = *lcp_input1++; cache0 = get_char<CharT>(*from0, lcp01); cache1 = *cache_input1++; if (--n1 == 0) goto finish1; } } } } while (true) { debug() << "Starting loop, n0="<<n0<<", n1="<<n1<<" ...\n" << "\tprev = '"<<*(result-1)<<"'\n" << "\t*from0 = '"<<*from0<<"'\n" << "\t*from1 = '"<<*from1<<"'\n" << "\tlcp0 = " <<lcp0<<"\n" << "\tlcp1 = " <<lcp1<<"\n" << "\tcache0 = '"<<to_str(cache0)<<"'\n" << "\tcache1 = '"<<to_str(cache1)<<"'\n" << "\n"; check_lcp_and_cache(*(result-1),*from0,lcp0,cache0,*from1,lcp1,cache1); if (lcp0 > lcp1) { debug() << "\tlcp0 > lcp1\n"; assert(cmp(*from0, *from1) < 0); *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; cache0 = *cache_input0++; if (--n0 == 0) goto finish0; } else if (lcp0 < lcp1) { debug() << "\tlcp0 < lcp1\n"; assert(cmp(*from0, *from1) > 0); *result++ = *from1++; if (OutputLCP) *lcp_result++ = lcp1; if (OutputLCP) *cache_result++ = cache1; lcp1 = *lcp_input1++; cache1 = *cache_input1++; if (--n1 == 0) goto finish1; } else { debug() << "\tlcp0 == lcp1\n"; stat_try_cache(); // Both strings in the sorted sequences have the same // prefix than the latest string in output. Check // cached characters first. if (cache0 < cache1) { debug() << "\t\tcache0 < cache1\n"; assert(cmp(*from0, *from1) < 0); if (sizeof(CharT) > 1) { const int l = lcp(cache0, cache1); if (l > 0) { lcp1 += l; cache1 = get_char<CharT>(*from1, lcp1); } } *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0; if (OutputLCP) *cache_result++ = cache0; lcp0 = *lcp_input0++; cache0 = *cache_input0++; if (--n0 == 0) goto finish0; } else if (cache0 > cache1) { debug() << "\t\tcache0 > cache1\n"; assert(cmp(*from0, *from1) > 0); if (sizeof(CharT) > 1) { const int l = lcp(cache0, cache1); if (l > 0) { lcp0 += l; cache0 = get_char<CharT>(*from0, lcp0); } } *result++ = *from1++; if (OutputLCP) *lcp_result++ = lcp1; if (OutputLCP) *cache_result++ = cache1; lcp1 = *lcp_input1++; cache1 = *cache_input1++; if (--n1 == 0) goto finish1; } else { debug() << "\t\tcache0 == cache1\n"; if (is_end(cache0)) { assert(cmp(*from0, *from1) == 0); if (sizeof(CharT) > 1) { *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0 /* == lcp1 */; if (OutputLCP) *cache_result++ = cache0 /* == cache1 */; lcp0 = *lcp_input0++; lcp1 += lcp(cache0, cache1); cache0 = *cache_input0++; cache1 = 0; } else { *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0 /* == lcp1 */; if (OutputLCP) *cache_result++ = cache0 /* == cache1 */; lcp0 = *lcp_input0++; cache0 = *cache_input0++; } if (--n0 == 0) goto finish0; } else { stat_cache_useless(); int cmp01; lcp_t lcp01; std::tie(cmp01, lcp01) = compare(*from0, *from1, lcp0+sizeof(CharT)); if (cmp01 < 0) { *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0 /* == lcp1 */; if (OutputLCP) *cache_result++ = cache0 /* == cache1 */; lcp0 = *lcp_input0++; lcp1 = lcp01; cache0 = *cache_input0++; cache1 = get_char<CharT>(*from1, lcp01); if (--n0 == 0) goto finish0; } else if (cmp01 == 0) { *result++ = *from0++; if (OutputLCP) *lcp_result++ = lcp0 /* == lcp1 */; if (OutputLCP) *cache_result++ = cache0 /* == cache1 */; lcp0 = *lcp_input0++; lcp1 = lcp01; cache0 = *cache_input0++; cache1 = 0; if (--n0 == 0) goto finish0; } else { *result++ = *from1++; if (OutputLCP) *lcp_result++ = lcp0 /* == lcp1 */; if (OutputLCP) *cache_result++ = cache0 /* == cache1 */; lcp0 = lcp01; lcp1 = *lcp_input1++; cache0 = get_char<CharT>(*from0, lcp01); cache1 = *cache_input1++; if (--n1 == 0) goto finish1; } } } } } finish0: assert(n0==0); assert(n1); if (OutputLCP) *lcp_result++ = lcp1; if (OutputLCP) *cache_result++ = cache1; std::copy(from1, from1+n1, result); if (OutputLCP) std::copy(lcp_input1, lcp_input1+n1, lcp_result); if (OutputLCP) std::copy(cache_input1, cache_input1+n1, cache_result); debug() << '~' << __func__ << '\n'; return; finish1: assert(n0); assert(n1==0); if (OutputLCP) *lcp_result++ = lcp0; if (OutputLCP) *cache_result++ = cache0; std::copy(from0, from0+n0, result); if (OutputLCP) std::copy(lcp_input0, lcp_input0+n0, lcp_result); if (OutputLCP) std::copy(cache_input0, cache_input0+n0, cache_result); debug() << '~' << __func__ << '\n'; return; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %r9, 0x20(%rsp) movq %r8, %r13 movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %rbp movq 0x158(%rsp), %rax movq %rax, 0x68(%rsp) movq 0xa2008e(%rip), %rsi # 0xb6ac98 movq 0xa2008f(%rip), %rdx # 0xb6aca0 movq 0x4f3d8(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r14 leaq 0x1f40a(%rip), %rsi # 0x16a031 movl $0x14, %edx movq %rax, %rdi callq 0x1c350 leaq 0x1e754(%rip), %rsi # 0x16938f movl $0x7, %edx movq %r14, %rdi callq 0x1c350 movq %r14, %rdi movq %r12, %rsi callq 0x1c200 movq %rax, %r14 leaq 0x1cbf5(%rip), %rsi # 0x167852 movl $0x5, %edx movq %rax, %rdi callq 0x1c350 movq %r14, %rdi movq 0x20(%rsp), %r14 movq 0x148(%rsp), %rsi callq 0x1c200 leaq 0xc0(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 movq %rbp, 0x38(%rsp) movq %rbp, %rdi movq %rbx, %rbp movq %rbx, %rsi movq %r15, %rdx movq %r12, %rbx movq %r12, %rcx callq 0x13e221 movq %r13, %rdi movq %r14, %rsi movq 0x140(%rsp), %r12 movq %r12, %rdx movq 0x148(%rsp), %rcx movq %rcx, 0x30(%rsp) callq 0x13e221 leaq 0x4(%r15), %rdx movq %r15, 0x10(%rsp) movl (%r15), %eax leaq 0x4(%r12), %rdi movl (%r12), %ecx cmpl %ecx, %eax jae 0x14ae07 movq %rbp, 0xa8(%rsp) movq 0x38(%rsp), %rdx movq (%rdx), %r14 testq %r14, %r14 je 0x14c477 movq %rdi, 0x40(%rsp) movq (%r13), %r12 testq %r12, %r12 je 0x14c496 movq %rbx, %r15 movq %rcx, %rbx movl %eax, %ebp movq %r14, %rdi movq %r12, %rsi callq 0x1c420 testl %eax, %eax jns 0x14c531 movq %rbx, %r10 cmpl %r10d, %ebp movq 0x160(%rsp), %r11 movq 0x150(%rsp), %rdi je 0x14c4d4 movl %ebp, %esi movl $0xff000000, %eax # imm = 0xFF000000 movl %ebp, %ecx andl %eax, %ecx sete %dl andl %r10d, %eax cmpl %eax, %ecx setne %cl xorl %eax, %eax orb %dl, %cl movq %r15, %rbp jne 0x14adad movl $0xff0000, %eax # imm = 0xFF0000 movl %esi, %ecx andl %eax, %ecx sete %dl andl %r10d, %eax cmpl %eax, %ecx setne %cl movl $0x1, %eax orb %dl, %cl jne 0x14adad movl $0xff00, %eax # imm = 0xFF00 movl %esi, %ecx andl %eax, %ecx setne %dl andl %r10d, %eax cmpl %eax, %ecx sete %al andb %dl, %al movzbl %al, %eax orl $0x2, %eax movl %eax, %ebx testl %eax, %eax movq 0xa8(%rsp), %r15 je 0x14b219 movzbl (%r12,%rbx), %r10d testl %r10d, %r10d je 0x14b008 shll $0x18, %r10d movzbl 0x1(%r12,%rbx), %eax testl %eax, %eax je 0x14b219 shll $0x10, %eax orl %r10d, %eax movzbl 0x2(%r12,%rbx), %ecx testl %ecx, %ecx je 0x14b216 shll $0x8, %ecx movzbl 0x3(%r12,%rbx), %r10d orl %ecx, %r10d orl %eax, %r10d jmp 0x14b219 movq 0x38(%rsp), %r8 movq %rbp, %r15 movq %rbx, 0x88(%rsp) jbe 0x14af21 movq (%r8), %rbp testq %rbp, %rbp je 0x14c477 movq %r15, 0xa8(%rsp) movq %rdx, 0x60(%rsp) movq (%r13), %rsi testq %rsi, %rsi je 0x14c496 movq %r14, %r12 movq %rcx, %r14 movl %eax, %ebx movq %rbp, %rdi movq %rsi, %r15 callq 0x1c420 testl %eax, %eax jle 0x14c58e movq %r14, %rsi cmpl %esi, %ebx movq 0x160(%rsp), %r11 movq 0x150(%rsp), %rdi je 0x14c4d4 movl %ebx, %r9d movl $0xff000000, %eax # imm = 0xFF000000 movl %ebx, %ecx andl %eax, %ecx sete %dl andl %esi, %eax cmpl %eax, %ecx setne %cl xorl %eax, %eax orb %dl, %cl jne 0x14aece movl $0xff0000, %eax # imm = 0xFF0000 movl %r9d, %ecx andl %eax, %ecx sete %dl andl %esi, %eax cmpl %eax, %ecx setne %cl movl $0x1, %eax orb %dl, %cl jne 0x14aece movl $0xff00, %eax # imm = 0xFF00 movl %r9d, %ecx andl %eax, %ecx setne %dl andl %esi, %eax cmpl %eax, %ecx sete %al andb %dl, %al movzbl %al, %eax orl $0x2, %eax movl %eax, %r14d testl %eax, %eax je 0x14b153 movzbl (%rbp,%r14), %r9d testl %r9d, %r9d je 0x14b150 shll $0x18, %r9d movzbl 0x1(%rbp,%r14), %eax testl %eax, %eax je 0x14b153 shll $0x10, %eax orl %eax, %r9d movzbl 0x2(%rbp,%r14), %eax testl %eax, %eax je 0x14b153 shll $0x8, %eax movzbl 0x3(%rbp,%r14), %ecx orl %eax, %ecx orl %ecx, %r9d jmp 0x14b153 testb %al, %al movq %rdi, 0x40(%rsp) je 0x14b010 movq %rdx, 0x60(%rsp) movq %rcx, 0x48(%rsp) movq %r8, %rbp movl %eax, %r14d movq (%r8), %rsi movq (%r13), %rdx leaq 0xc0(%rsp), %r12 movl $0x4, %ecx movq %r12, %rdi callq 0x134d98 movl 0x8(%r12), %edx movq (%r12), %rbx testl %edx, %edx js 0x14b0d1 movq 0x150(%rsp), %r8 leaq 0x8(%r8), %rcx movq 0x160(%rsp), %rdi leaq 0x4(%rdi), %rax testl %edx, %edx movq 0x10(%rsp), %r10 je 0x14c1a3 movq (%r13), %rdx movq %rdx, (%r8) movq 0x48(%rsp), %rdx movl %edx, (%rdi) movq 0x38(%rsp), %rdx movq (%rdx), %rdx testq %rdx, %rdx movq 0x20(%rsp), %rdi je 0x14c5eb movzbl (%rdx,%rbx), %r9d testl %r9d, %r9d movq 0x88(%rsp), %rbp movq 0x140(%rsp), %r12 je 0x14c203 shll $0x18, %r9d movzbl 0x1(%rdx,%rbx), %esi testl %esi, %esi je 0x14c206 shll $0x10, %esi orl %esi, %r9d movzbl 0x2(%rdx,%rbx), %esi testl %esi, %esi je 0x14c206 shll $0x8, %esi movzbl 0x3(%rdx,%rbx), %edx orl %esi, %edx orl %edx, %r9d jmp 0x14c206 xorl %r10d, %r10d jmp 0x14b219 movq (%r8), %r12 testq %r12, %r12 je 0x14c477 movq (%r13), %rsi testq %rsi, %rsi je 0x14c496 movq %rcx, %rbx movl %eax, %ebp movq %r12, %rdi callq 0x1c420 testl %eax, %eax jne 0x14c60a movq %rbx, %r8 cmpl %r8d, %ebp setne %al testl %ebp, %ebp sete %cl orb %al, %cl movq 0x160(%rsp), %r11 movq 0x150(%rsp), %rdi je 0x14c4d4 movl %ebp, %esi movl $0xff000000, %eax # imm = 0xFF000000 movl %ebp, %ecx andl %eax, %ecx sete %dl andl %r8d, %eax cmpl %eax, %ecx setne %al xorl %r9d, %r9d orb %dl, %al movq 0x88(%rsp), %rbp jne 0x14b1db movl $0xff0000, %eax # imm = 0xFF0000 movl %esi, %ecx andl %eax, %ecx sete %dl andl %r8d, %eax cmpl %eax, %ecx setne %al movl $0x1, %ebx orb %dl, %al jne 0x14b1dd movl $0xff00, %eax # imm = 0xFF00 movl %esi, %ecx andl %eax, %ecx setne %dl andl %eax, %r8d cmpl %r8d, %ecx sete %al andb %dl, %al movzbl %al, %ebx orq $0x2, %rbx jmp 0x14b1dd movq (%rbp), %rax movq 0x150(%rsp), %rcx movq %rax, (%rcx) movq 0x160(%rsp), %r11 movl %r14d, (%r11) movq (%r13), %rax testq %rax, %rax movq 0x10(%rsp), %r10 je 0x14c5eb movzbl (%rax,%rbx), %r8d testl %r8d, %r8d movq 0x20(%rsp), %rdi movq 0x88(%rsp), %rbp je 0x14c249 shll $0x18, %r8d movzbl 0x1(%rax,%rbx), %ecx testl %ecx, %ecx je 0x14c260 shll $0x10, %ecx orl %r8d, %ecx movzbl 0x2(%rax,%rbx), %edx testl %edx, %edx je 0x14c25d shll $0x8, %edx movzbl 0x3(%rax,%rbx), %r8d orl %edx, %r8d orl %ecx, %r8d jmp 0x14c260 xorl %r9d, %r9d movq %r15, (%rdi) addq $0x8, %rdi movl %esi, (%r11) addq $0x4, %r11 movq 0x148(%rsp), %rax decq %rax je 0x14b1b8 movq %rax, 0x30(%rsp) addq $0x8, %r13 movq (%r12), %rbx addq $0x8, %r12 movq %r12, 0x20(%rsp) movq 0x140(%rsp), %rax movl 0x4(%rax), %r10d addq $0x8, %rax movq %rax, 0x40(%rsp) movq 0x88(%rsp), %rbp movq 0x38(%rsp), %rdx movq 0x60(%rsp), %rsi movq 0xa8(%rsp), %r15 jmp 0x14b24d movq $0x0, 0x30(%rsp) movq 0x88(%rsp), %rbp movq 0x60(%rsp), %rsi movq 0xa8(%rsp), %r15 jmp 0x14c417 xorl %ebx, %ebx movq %r12, (%rdi) addq $0x8, %rdi movl %esi, (%r11) addq $0x4, %r11 decq %rbp je 0x14c1e8 movq 0x38(%rsp), %rdx addq $0x8, %rdx movq (%r15), %r14 addq $0x8, %r15 movq 0x10(%rsp), %rsi movl 0x4(%rsi), %r9d addq $0x8, %rsi xorl %r10d, %r10d jmp 0x14b24d movl %eax, %r10d movq %r14, (%rdi) addq $0x8, %rdi movl %esi, (%r11) addq $0x4, %r11 decq %rbp je 0x14c0ba movq 0x38(%rsp), %rdx addq $0x8, %rdx movq (%r15), %r14 addq $0x8, %r15 movq 0x10(%rsp), %rsi movl 0x4(%rsi), %r9d addq $0x8, %rsi movq %r14, 0x10(%rsp) movq %rbx, 0x28(%rsp) leaq 0xb023(%rip), %r12 # 0x156281 movq %rsi, %rcx movq %r15, %rax movq %rdx, %rbx movq %r10, 0x48(%rsp) movq 0x68(%rsp), %r14 movq %r11, %r8 movq %rbp, %rdx movq %rcx, %rsi movq %rax, %r11 movq %r13, 0xb8(%rsp) movq %rdx, %rax decq %rdx xorl %r10d, %r10d xorl %r15d, %r15d movq %r14, 0x78(%rsp) movq %r8, %rbp movq %rsi, 0x60(%rsp) movq %r11, 0xa8(%rsp) movq %rbx, %rcx movq %rdi, 0x50(%rsp) movq %rsi, 0x90(%rsp) movq %r11, 0x70(%rsp) movq %rbx, 0x80(%rsp) movq %r8, 0x58(%rsp) movq %rbp, 0xe0(%rsp) movq %r10, 0xb0(%rsp) movq %r12, %rbx movq %rcx, 0x38(%rsp) movq %rax, 0x88(%rsp) movl %r9d, 0x1c(%rsp) movq %rdx, 0x98(%rsp) leaq 0x1(%rdx), %rbp movq 0xa1f998(%rip), %rsi # 0xb6ac98 movq 0xa1f999(%rip), %rdx # 0xb6aca0 movq %rdi, %r12 movq 0x4ecdf(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r13 movl $0x12, %edx movq %rax, %rdi leaq 0x1ee1a(%rip), %rsi # 0x16a142 callq 0x1c350 movq %r13, %rdi movq %rbp, 0xa0(%rsp) movq %rbp, %rsi callq 0x1c200 movq %rax, %r13 movl $0x5, %edx movq %rax, %rdi leaq 0x1c500(%rip), %rsi # 0x167852 callq 0x1c350 movq %r13, %rdi movq 0x30(%rsp), %rsi callq 0x1c200 movq %rax, %rbp movl $0x5, %edx movq %rax, %rdi leaq 0x9e15(%rip), %rsi # 0x15518b callq 0x1c350 movl $0xb, %edx movq %rbp, %rdi leaq 0x1edcb(%rip), %rsi # 0x16a155 callq 0x1c350 movq -0x8(%r12,%r15), %r13 testq %r13, %r13 je 0x14b3b1 movq %r13, %rdi callq 0x1c130 movq %rbp, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x1c350 jmp 0x14b3c9 movq (%rbp), %rax movq -0x18(%rax), %rax leaq (%rax,%rbp), %rdi movl 0x20(%rbp,%rax), %esi orl $0x1, %esi callq 0x1c510 movq %rbx, %r12 movl $0x2, %edx movq %rbp, %rdi movq %rbx, %rsi callq 0x1c350 movl $0xb, %edx movq %rbp, %rdi leaq 0x1ed76(%rip), %rsi # 0x16a161 callq 0x1c350 movq 0x80(%rsp), %rbx movq (%rbx,%r15), %r13 testq %r13, %r13 je 0x14b419 movq %r13, %rdi callq 0x1c130 movq %rbp, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x1c350 jmp 0x14b431 movq (%rbp), %rax movq -0x18(%rax), %rax leaq (%rax,%rbp), %rdi movl 0x20(%rbp,%rax), %esi orl $0x1, %esi callq 0x1c510 movl $0x2, %edx movq %rbp, %rdi movq %r12, %rsi callq 0x1c350 movl $0xb, %edx movq %rbp, %rdi leaq 0x1ed1d(%rip), %rsi # 0x16a16d callq 0x1c350 movq 0xb8(%rsp), %rax movq (%rax), %r13 testq %r13, %r13 je 0x14b47d movq %r13, %rdi callq 0x1c130 movq %rbp, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x1c350 jmp 0x14b497 movq (%rbp), %rax movq -0x18(%rax), %rax movq %rbp, %rdi addq %rax, %rdi movl 0x20(%rbp,%rax), %esi orl $0x1, %esi callq 0x1c510 movl $0x2, %edx movq %rbp, %rdi movq %r12, %rsi callq 0x1c350 movl $0xa, %edx movq %rbp, %rdi leaq 0x1ecc3(%rip), %rsi # 0x16a179 callq 0x1c350 movq %rbp, %rdi movq 0x10(%rsp), %rsi callq 0x1c200 movq %rax, %r13 movl $0x1, %edx movq %rax, %rdi leaq 0x9c5a(%rip), %rbp # 0x155134 movq %rbp, %rsi callq 0x1c350 movl $0xa, %edx movq %r13, %rdi leaq 0x1ec93(%rip), %rsi # 0x16a184 callq 0x1c350 movq %r13, %rdi movq 0x28(%rsp), %rsi callq 0x1c200 movq %rax, %r13 movl $0x1, %edx movq %rax, %rdi movq %rbp, %rsi callq 0x1c350 movl $0xb, %edx movq %r13, %rdi leaq 0x1ec6a(%rip), %rsi # 0x16a18f callq 0x1c350 leaq 0xc0(%rsp), %rdi movl 0x1c(%rsp), %esi callq 0x13e717 movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx movq %r13, %rdi callq 0x1c350 movq %rax, %rbp movl $0x2, %edx movq %rax, %rdi movq %r12, %rsi callq 0x1c350 movl $0xb, %edx movq %rbp, %rdi leaq 0x1ec26(%rip), %rsi # 0x16a19b callq 0x1c350 leaq 0xe8(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x13e717 movq 0xb8(%rsp), %r13 movq 0xe8(%rsp), %rsi movq 0xf0(%rsp), %rdx movq %rbp, %rdi callq 0x1c350 movq %rax, %rbp movl $0x2, %edx movq %rax, %rdi movq %r12, %rsi callq 0x1c350 movl $0x1, %edx movq %rbp, %rdi leaq 0x9b66(%rip), %rsi # 0x155134 callq 0x1c350 movq 0xe8(%rsp), %rdi leaq 0xf8(%rsp), %rax cmpq %rax, %rdi je 0x14b5ed callq 0x1c2c0 movq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rax cmpq %rax, %rdi je 0x14b607 callq 0x1c2c0 movq 0x50(%rsp), %rax movq -0x8(%rax,%r15), %rdi movq (%rbx,%r15), %rsi movq %r13, %r12 movq (%r13), %r8 movq 0x48(%rsp), %rax movl %eax, (%rsp) movq 0x10(%rsp), %r13 movq %r13, %rdx movl 0x1c(%rsp), %ecx movq 0x28(%rsp), %rbp movq %rbp, %r9 callq 0x13e841 cmpq %rbp, %r13 jbe 0x14b740 movq 0xa1f64b(%rip), %rsi # 0xb6ac98 movq 0xa1f64c(%rip), %rdx # 0xb6aca0 movq 0x4e995(%rip), %rdi # 0x199ff0 callq 0x1c350 movl $0xd, %edx movq %rax, %rdi leaq 0x1eb38(%rip), %rsi # 0x16a1a7 callq 0x1c350 movq (%rbx,%r15), %rbp testq %rbp, %rbp je 0x14c477 movq (%r12), %rsi testq %rsi, %rsi je 0x14c496 movq %r12, %r13 movq %rbp, %rdi callq 0x1c420 testl %eax, %eax leaq 0xabdf(%rip), %r12 # 0x156281 jns 0x14c4b5 movq 0x50(%rsp), %rdi movq %rbp, (%rdi,%r15) movq 0x38(%rsp), %rcx addq $0x8, %rcx addq $0x8, %r14 movq 0x10(%rsp), %rax movq 0x78(%rsp), %rdx movq %rax, (%rdx,%r15) movq 0xe0(%rsp), %rbp addq $0x4, %rbp movl 0x1c(%rsp), %eax movq 0x58(%rsp), %r8 movq 0xb0(%rsp), %r10 movl %eax, (%r8,%r10) addq $0x8, 0xa8(%rsp) movq 0x70(%rsp), %r11 movq (%r11,%r15), %rax movq %rax, 0x10(%rsp) addq $0x4, 0x60(%rsp) movq 0x90(%rsp), %rsi movl (%rsi,%r10), %r9d movq 0x88(%rsp), %rax decq %rax addq $0x8, %r15 addq $0x4, %r10 movq 0x98(%rsp), %rdx addq $-0x1, %rdx jb 0x14b2c8 jmp 0x14c08d movq 0xa1f551(%rip), %rsi # 0xb6ac98 movq 0xa1f552(%rip), %rdx # 0xb6aca0 movq 0x4e89b(%rip), %rdi # 0x199ff0 callq 0x1c350 movq 0x10(%rsp), %rcx cmpq 0x28(%rsp), %rcx jb 0x14baa3 movl $0xe, %edx movq %rax, %rdi leaq 0x1ea4a(%rip), %rsi # 0x16a1c3 callq 0x1c350 movl 0x1c(%rsp), %ebx movq 0x48(%rsp), %r14 cmpl %r14d, %ebx movq 0xb0(%rsp), %rbp jae 0x14b8d0 movq 0xa1f4f9(%rip), %rsi # 0xb6ac98 movq 0xa1f4fa(%rip), %rdx # 0xb6aca0 movq 0x4e843(%rip), %rdi # 0x199ff0 callq 0x1c350 movl $0x12, %edx movq %rax, %rdi leaq 0x1ea11(%rip), %rsi # 0x16a1d2 callq 0x1c350 movq 0x80(%rsp), %rax movq (%rax,%r15), %r13 testq %r13, %r13 je 0x14c477 movq 0xb8(%rsp), %rax movq (%rax), %r14 testq %r14, %r14 movq 0x28(%rsp), %rbx leaq 0xaa8c(%rip), %r12 # 0x156281 je 0x14c496 movq %r13, %rdi movq %r14, %rsi callq 0x1c420 testl %eax, %eax jns 0x14c550 xorl %eax, %eax movl 0x1c(%rsp), %esi movl %esi, %ecx movl $0xff000000, %r8d # imm = 0xFF000000 andl %r8d, %ecx movq 0x48(%rsp), %r10 movq 0x50(%rsp), %rdi movq 0x70(%rsp), %r11 je 0x14b877 movl %r10d, %edx andl %r8d, %edx cmpl %edx, %ecx jne 0x14b877 movl %esi, %ecx movl $0x1, %eax movl $0xff0000, %r8d # imm = 0xFF0000 andl %r8d, %ecx je 0x14b877 movl %r10d, %edx andl %r8d, %edx cmpl %edx, %ecx jne 0x14b877 movl %esi, %eax movl $0xff00, %r8d # imm = 0xFF00 andl %r8d, %eax setne %cl movl %r10d, %edx andl %r8d, %edx cmpl %edx, %eax sete %al andb %cl, %al movzbl %al, %eax orl $0x2, %eax testl %eax, %eax je 0x14b9dc movl %eax, %eax addq %rax, %rbx movzbl (%r14,%rbx), %r10d testl %r10d, %r10d movq 0x58(%rsp), %r8 je 0x14ba27 shll $0x18, %r10d movzbl 0x1(%r14,%rbx), %eax testl %eax, %eax je 0x14ba2a shll $0x10, %eax orl %eax, %r10d movzbl 0x2(%r14,%rbx), %eax testl %eax, %eax je 0x14ba2a shll $0x8, %eax movzbl 0x3(%r14,%rbx), %ecx orl %eax, %ecx orl %ecx, %r10d jmp 0x14ba2a movq 0xa1f3c1(%rip), %rsi # 0xb6ac98 movq 0xa1f3c2(%rip), %rdx # 0xb6aca0 movq 0x4e70b(%rip), %rdi # 0x199ff0 callq 0x1c350 cmpl %r14d, %ebx movq %r12, %r13 ja 0x14bb99 movl $0x13, %edx movq %rax, %rdi leaq 0x1e8f3(%rip), %rsi # 0x16a1f8 callq 0x1c350 testb %bl, %bl leaq 0xa96e(%rip), %r12 # 0x156281 jne 0x14bcb1 movq 0x80(%rsp), %rax movq (%rax,%r15), %r14 testq %r14, %r14 je 0x14c477 movq (%r13), %rsi testq %rsi, %rsi movq 0x28(%rsp), %rbx je 0x14c496 movq %r14, %rdi callq 0x1c420 testl %eax, %eax jne 0x14c56f movq 0x50(%rsp), %rax movq %r14, (%rax,%r15) movq 0x10(%rsp), %rax movq 0x78(%rsp), %r14 movq %rax, (%r14,%r15) movl 0x1c(%rsp), %esi movq 0x58(%rsp), %rax movl %esi, (%rax,%rbp) movq 0x70(%rsp), %r11 movq (%r11,%r15), %r8 testl %esi, %esi movq 0x48(%rsp), %rdi movl $0xff000000, %eax # imm = 0xFF000000 je 0x14b992 cmpl %edi, %esi je 0x14c4d4 movl %esi, %ecx andl %eax, %ecx je 0x14b9e3 movl %edi, %edx andl %eax, %edx movl $0x0, %eax cmpl %edx, %ecx jne 0x14b9e5 movl %esi, %ecx movl $0x1, %eax movl $0xff0000, %r9d # imm = 0xFF0000 andl %r9d, %ecx je 0x14b9e5 movl %edi, %edx andl %r9d, %edx cmpl %edx, %ecx jne 0x14b9e5 movl $0xff00, %ecx # imm = 0xFF00 andl %ecx, %esi setne %al andl %ecx, %edi cmpl %edi, %esi sete %cl andb %al, %cl movzbl %cl, %eax orq $0x2, %rax jmp 0x14b9e5 movq 0x58(%rsp), %r8 jmp 0x14ba2a xorl %eax, %eax addq %rax, %rbx movq 0x98(%rsp), %rdx testq %rdx, %rdx je 0x14c327 movq %r8, 0x10(%rsp) movq %rbx, 0x28(%rsp) movq 0x50(%rsp), %rdi addq %r15, %rdi addq $0x8, %rdi addq %r15, %r14 addq $0x8, %r14 movq 0x58(%rsp), %r8 addq %rbp, %r8 addq $0x4, %r8 xorl %r10d, %r10d jmp 0x14ba72 xorl %r10d, %r10d movq %r13, (%rdi,%r15) movq 0x10(%rsp), %rax movq 0x78(%rsp), %r14 movq %rax, (%r14,%r15) movl %esi, (%r8,%rbp) movq 0x98(%rsp), %rdx testq %rdx, %rdx je 0x14c2f7 movq %rbx, 0x28(%rsp) addq %r15, %rdi addq $0x8, %rdi leaq 0x8(%r14,%r15), %r14 addq %rbp, %r8 addq $0x4, %r8 movq (%r11,%r15), %rax movq %rax, 0x10(%rsp) movq %r10, 0x48(%rsp) movq 0x80(%rsp), %rbx addq %r15, %rbx addq $0x8, %rbx leaq 0x8(%r11,%r15), %r11 movq 0x90(%rsp), %rsi addq %rbp, %rsi addq $0x4, %rsi movl -0x4(%rsi), %r9d jmp 0x14b285 movl $0xd, %edx movq %rax, %rdi leaq 0x1e703(%rip), %rsi # 0x16a1b5 callq 0x1c350 movq (%rbx,%r15), %rdi testq %rdi, %rdi je 0x14c477 movq (%r12), %rbp testq %rbp, %rbp je 0x14c496 movq %r12, %r13 movq %rbp, %rsi callq 0x1c420 testl %eax, %eax leaq 0xa79c(%rip), %r12 # 0x156281 jle 0x14c629 movq 0x50(%rsp), %rsi leaq (%rsi,%r15), %rdi addq $0x8, %rdi movq %rbp, -0x8(%rdi) movq 0x78(%rsp), %rax leaq 0x8(%rax,%r15), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x68(%rsp) movq %rax, -0x8(%rcx) addq %r15, %rbx movq 0x98(%rsp), %rbp incq %rbp movq 0x90(%rsp), %r8 movq 0xb0(%rsp), %rcx addq %rcx, %r8 movq 0x70(%rsp), %r9 addq %r15, %r9 addq $0x8, %r13 movq 0x58(%rsp), %rax leaq (%rax,%rcx), %r11 addq $0x4, %r11 movq 0x48(%rsp), %rax movl %eax, -0x4(%r11) movq 0x20(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x28(%rsp) addq $0x8, %rax movq %rax, 0x20(%rsp) movq 0x40(%rsp), %rax movl (%rax), %r10d addq $0x4, %rax movq %rax, 0x40(%rsp) movq %r8, %rcx movq %r9, %rax decq 0x30(%rsp) movl 0x1c(%rsp), %r9d jne 0x14b267 jmp 0x14c35d movl $0x12, %edx movq %rax, %rdi leaq 0x1e63d(%rip), %rsi # 0x16a1e5 callq 0x1c350 movq 0x80(%rsp), %rbp movq (%rbp,%r15), %r14 testq %r14, %r14 movq 0x28(%rsp), %rbx leaq 0xa6b8(%rip), %r12 # 0x156281 je 0x14c477 movq (%r13), %r13 testq %r13, %r13 je 0x14c496 movq %r14, %rdi movq %r13, %rsi callq 0x1c420 testl %eax, %eax jle 0x14c648 xorl %eax, %eax movl 0x1c(%rsp), %r9d movl %r9d, %ecx movl $0xff000000, %edi # imm = 0xFF000000 andl %edi, %ecx movq 0x48(%rsp), %rsi movq 0x70(%rsp), %r10 je 0x14bc4b movl %esi, %edx andl %edi, %edx cmpl %edx, %ecx movl $0xff0000, %edi # imm = 0xFF0000 jne 0x14bc4b movl %r9d, %ecx movl $0x1, %eax andl %edi, %ecx je 0x14bc4b movl %esi, %edx andl %edi, %edx cmpl %edx, %ecx jne 0x14bc4b movl %r9d, %eax movl $0xff00, %edi # imm = 0xFF00 andl %edi, %eax setne %cl movl %esi, %edx andl %edi, %edx cmpl %edx, %eax sete %al andb %cl, %al movzbl %al, %eax orl $0x2, %eax testl %eax, %eax je 0x14bdb8 movl %eax, %eax movq 0x10(%rsp), %rcx addq %rax, %rcx movzbl (%r14,%rcx), %r9d testl %r9d, %r9d movq 0x50(%rsp), %rdi movq %rcx, 0x10(%rsp) je 0x14be54 shll $0x18, %r9d movzbl 0x1(%r14,%rcx), %eax testl %eax, %eax je 0x14be4f shll $0x10, %eax orl %eax, %r9d movzbl 0x2(%r14,%rcx), %eax testl %eax, %eax je 0x14be4f movq %rbx, %r8 shll $0x8, %eax movzbl 0x3(%r14,%rcx), %ecx orl %eax, %ecx orl %ecx, %r9d jmp 0x14be5a movq 0x80(%rsp), %r14 movq %rbp, %rbx leaq (%r14,%r15), %rax movq %rax, 0x48(%rsp) movq (%r14,%r15), %rsi movq (%r13), %rdx movq 0x10(%rsp), %rbp leaq 0x4(%rbp), %rcx leaq 0xc0(%rsp), %rdi callq 0x134d98 movq 0xc0(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x90(%rsp), %rax leaq (%rax,%rbx), %rcx movq 0x70(%rsp), %rax addq %r15, %rax cmpl $0x0, 0xc8(%rsp) js 0x14bdc5 movq 0x50(%rsp), %r8 leaq 0x8(%r8,%r15), %rdi movq 0x78(%rsp), %r10 leaq 0x8(%r10,%r15), %rdx movq %rdx, 0x68(%rsp) movq 0x58(%rsp), %r9 leaq 0x4(%r9,%rbx), %r11 movl 0x1c(%rsp), %esi je 0x14bef4 movq %rdi, 0x38(%rsp) movq (%r13), %rdx movq %rdx, (%r8,%r15) movq %rbp, (%r10,%r15) movl %esi, (%r9,%rbx) movq 0x48(%rsp), %r14 movq (%r14), %rdx testq %rdx, %rdx je 0x14c5eb movq 0x28(%rsp), %rbx movzbl (%rdx,%rbx), %r9d testl %r9d, %r9d movq 0x30(%rsp), %rdi movq 0x20(%rsp), %r8 je 0x14bf56 shll $0x18, %r9d movzbl 0x1(%rdx,%rbx), %esi testl %esi, %esi je 0x14bf59 shll $0x10, %esi orl %esi, %r9d movzbl 0x2(%rdx,%rbx), %esi testl %esi, %esi je 0x14bf59 shll $0x8, %esi movzbl 0x3(%rdx,%rbx), %edx orl %esi, %edx orl %edx, %r9d jmp 0x14bf59 movq %rbx, %r8 movq 0x50(%rsp), %rdi jmp 0x14be5a movq (%r14,%r15), %rax movq 0x50(%rsp), %rdi movq %rax, (%rdi,%r15) movq 0x78(%rsp), %r9 movq %rbp, (%r9,%r15) movl 0x1c(%rsp), %eax movq 0x58(%rsp), %rcx movl %eax, (%rcx,%rbx) movq (%r13), %rax testq %rax, %rax je 0x14c5eb movq 0x28(%rsp), %rbx movzbl (%rax,%rbx), %r10d testl %r10d, %r10d movq 0x98(%rsp), %rsi movq 0x80(%rsp), %r8 je 0x14bfb6 shll $0x18, %r10d movzbl 0x1(%rax,%rbx), %ecx testl %ecx, %ecx je 0x14bfbe shll $0x10, %ecx orl %r10d, %ecx movzbl 0x2(%rax,%rbx), %edx testl %edx, %edx je 0x14bfbb shll $0x8, %edx movzbl 0x3(%rax,%rbx), %r10d orl %edx, %r10d orl %ecx, %r10d jmp 0x14bfbe movq %rbx, %r8 jmp 0x14be5a movq %rbx, %r8 xorl %r9d, %r9d leaq (%r15,%rbp), %rbx movq 0x98(%rsp), %rax leaq 0x1(%rax), %rbp movq 0xb0(%rsp), %r14 movq 0x90(%rsp), %rax leaq (%rax,%r14), %rcx leaq (%r10,%r15), %rax movq 0xb8(%rsp), %rdx addq $0x8, %rdx addq %r15, %rdi addq $0x8, %rdi movq %r13, -0x8(%rdi) movq %rdx, %r13 movq 0x78(%rsp), %rdx leaq 0x8(%rdx,%r15), %rdx movq %rdx, 0x68(%rsp) movq %r8, -0x8(%rdx) movq 0x58(%rsp), %r8 leaq 0x4(%r8,%r14), %r11 movl %esi, -0x4(%r11) movq 0x20(%rsp), %rdx movq (%rdx), %rsi movq %rsi, 0x28(%rsp) addq $0x8, %rdx movq %rdx, 0x20(%rsp) movq 0x40(%rsp), %rdx movl (%rdx), %r10d addq $0x4, %rdx movq %rdx, 0x40(%rsp) decq 0x30(%rsp) jne 0x14b267 jmp 0x14c39f movq 0x80(%rsp), %rax leaq (%rax,%r15), %r14 addq $0x8, %r14 movq -0x8(%r14), %rax movq %rax, (%r8,%r15) movq %rbp, (%r10,%r15) movl %esi, (%r9,%rbx) movq 0x70(%rsp), %rax leaq 0x8(%rax,%r15), %rax movq -0x8(%rax), %rdx movq 0x90(%rsp), %rcx addq %rbx, %rcx addq $0x4, %rcx movl -0x4(%rcx), %r9d xorl %r10d, %r10d movq 0x98(%rsp), %rsi testq %rsi, %rsi je 0x14c02c movq %rsi, %r8 movq 0x28(%rsp), %rsi jmp 0x14c013 xorl %r9d, %r9d addq $0x8, %r13 movq (%r8), %rsi addq $0x8, %r8 movq %r8, 0x20(%rsp) movq 0x40(%rsp), %rdx movl (%rdx), %r10d addq $0x4, %rdx movq %rdx, 0x40(%rsp) decq %rdi je 0x14bf91 movq %rdi, 0x30(%rsp) movq %rbx, %rdx movq 0x38(%rsp), %rdi jmp 0x14c01b movq %r14, %r8 movl $0x3, %edx movq $0x0, 0x30(%rsp) movq %rbx, 0x10(%rsp) movq %rsi, 0x28(%rsp) movq 0x38(%rsp), %rdi jmp 0x14c045 xorl %r10d, %r10d jmp 0x14bfbe movl %ecx, %r10d leaq (%r8,%r15), %r14 addq $0x8, %r14 leaq 0x8(%rdi,%r15), %rdi leaq 0x8(%r9,%r15), %rax movq %rax, 0x68(%rsp) movq 0x58(%rsp), %rax movq 0xb0(%rsp), %r8 leaq 0x4(%rax,%r8), %r11 movq 0x70(%rsp), %rax leaq 0x8(%rax,%r15), %rax movq -0x8(%rax), %rdx movq 0x90(%rsp), %rcx addq %r8, %rcx addq $0x4, %rcx movl -0x4(%rcx), %r9d testq %rsi, %rsi je 0x14c02c movq %rsi, %r8 movq %rbx, %rsi movq %r8, 0xa0(%rsp) movq %r14, %r8 movq %rdx, 0x10(%rsp) xorl %edx, %edx movq %rsi, 0x28(%rsp) jmp 0x14c045 movq %r14, %r8 movq %rdx, 0x10(%rsp) movl $0x2, %edx movq $0x0, 0xa0(%rsp) testl %edx, %edx movq 0xa0(%rsp), %rbp movq %r8, %rbx je 0x14b267 cmpl $0x1, %edx movq 0x28(%rsp), %rbx movq 0x10(%rsp), %r14 je 0x14c191 cmpl $0x2, %edx jne 0x14c404 movq 0x20(%rsp), %r12 movq 0x68(%rsp), %r15 movq 0x30(%rsp), %rbp movq 0xa0(%rsp), %r9 jmp 0x14c0d2 addq %r15, %rdi movq 0x78(%rsp), %rax addq %r15, %rax addq %r10, %r8 xorl %r9d, %r9d movq %rax, %r15 movq %r8, %r11 movq 0x30(%rsp), %rbp movq 0x20(%rsp), %r12 movq 0x48(%rsp), %r10 movq 0x28(%rsp), %rbx jmp 0x14c0d2 xorl %r9d, %r9d movq 0x20(%rsp), %r12 movq 0x158(%rsp), %r15 movq 0x148(%rsp), %rbp testq %r9, %r9 jne 0x14c4f3 testq %rbp, %rbp movq 0x40(%rsp), %r14 je 0x14c512 movq %rbx, (%r15) addq $0x8, %r15 movl %r10d, (%r11) addq $0x4, %r11 leaq (,%rbp,8), %rbx movq %r13, %rsi movq %rbx, %rdx movq %r11, %r13 callq 0x1c4b0 movq %r15, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x1c4b0 shlq $0x2, %rbp movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1c4b0 movq 0xa1eb64(%rip), %rsi # 0xb6ac98 movq 0xa1eb65(%rip), %rdx # 0xb6aca0 movq 0x4deae(%rip), %rdi # 0x199ff0 callq 0x1c350 leaq 0xc0(%rsp), %rbx movb $0x7e, (%rbx) movl $0x1, %edx movq %rax, %rdi movq %rbx, %rsi callq 0x1c350 movq %rax, %r14 leaq 0x1dec5(%rip), %rsi # 0x16a031 movl $0x14, %edx movq %rax, %rdi callq 0x1c350 movb $0xa, (%rbx) leaq 0xc0(%rsp), %rsi movl $0x1, %edx movq %r14, %rdi callq 0x1c350 addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x38(%rsp), %rsi movq (%rsi), %rdx addq $0x8, %rsi movq %rsi, 0x38(%rsp) movq %rdx, (%r8) movl %r14d, (%rdi) movq (%r15), %r14 addq $0x8, %r15 movl 0x4(%r10), %r9d addq $0x8, %r10 xorl %r8d, %r8d movq 0x88(%rsp), %rbp decq %rbp movq 0x20(%rsp), %rdi je 0x14c24e movq 0x40(%rsp), %r12 jmp 0x14c292 xorl %r10d, %r10d movq 0x158(%rsp), %r15 movq 0x148(%rsp), %rbp movq %r14, %r12 jmp 0x14c0d2 xorl %r9d, %r9d addq $0x8, %r13 movq (%rdi), %rsi addq $0x8, %rdi movl 0x4(%r12), %r8d addq $0x8, %r12 decq 0x30(%rsp) je 0x14c226 movq %rbx, %r14 jmp 0x14c29a movq %rdi, 0x20(%rsp) movq $0x0, 0x30(%rsp) movl $0x3, %edx movq %r12, 0x40(%rsp) movq %rcx, %rdi movq %rax, %r11 movq %rbx, %r14 jmp 0x14c2ac xorl %r8d, %r8d jmp 0x14c260 movl $0x2, %edx movq %rcx, %rdi movq %rax, %r11 xorl %ebp, %ebp jmp 0x14c2c0 movl %ecx, %r8d addq $0x8, 0x38(%rsp) movq 0x150(%rsp), %rcx addq $0x8, %rcx addq $0x4, %r11 movq (%r15), %r14 addq $0x8, %r15 movl 0x4(%r10), %r9d addq $0x8, %r10 decq %rbp je 0x14c2b6 movq 0x40(%rsp), %r12 movq %r11, %rax movq %rbx, %rsi movq %r10, 0x60(%rsp) movq %rdi, 0x20(%rsp) xorl %edx, %edx movq %r12, 0x40(%rsp) movq %rcx, %rdi movq %rax, %r11 movq %rsi, %rbx movq 0x60(%rsp), %rsi jmp 0x14c2c3 movq %rcx, %rdi xorl %ebp, %ebp movl $0x2, %edx movq %r10, %rsi movl %edx, %eax leaq 0x1cd74(%rip), %rcx # 0x169040 movslq (%rcx,%rax,4), %rax addq %rcx, %rax movq %r8, %r10 movq 0x38(%rsp), %rdx jmpq *%rax movq %rbp, %r9 movq 0x20(%rsp), %r12 movq 0x158(%rsp), %r15 movq 0x30(%rsp), %rbp jmp 0x14c0d2 addq %r15, %rdi addq $0x8, %rdi addq %r14, %r15 addq $0x8, %r15 leaq (%r8,%rbp), %r11 addq $0x4, %r11 xorl %r9d, %r9d movq 0x30(%rsp), %rbp movq 0x20(%rsp), %r12 movq 0xb8(%rsp), %r13 jmp 0x14c0d2 movq 0x50(%rsp), %rax leaq (%rax,%r15), %rdi addq $0x8, %rdi addq %r14, %r15 addq $0x8, %r15 movq 0x58(%rsp), %rax leaq (%rax,%rbp), %r11 addq $0x4, %r11 xorl %r10d, %r10d xorl %r9d, %r9d movq 0x30(%rsp), %rbp movq 0x20(%rsp), %r12 jmp 0x14c0d2 addq $0x8, %r14 movq 0xe0(%rsp), %r11 addq $0x4, %r11 leaq (%rsi,%r15), %rdi addq $0x8, %rdi movq $0x0, 0x30(%rsp) movq %r14, 0x68(%rsp) movq 0x10(%rsp), %r14 movq 0x88(%rsp), %rbp movq 0xa8(%rsp), %r15 movq 0x60(%rsp), %rsi jmp 0x14c417 movq 0x50(%rsp), %rax leaq (%rax,%r15), %rdi addq $0x8, %rdi movq 0x78(%rsp), %rax leaq 0x8(%rax,%r15), %rax movq %rax, 0x68(%rsp) leaq (%r8,%r14), %r11 addq $0x4, %r11 movq 0x98(%rsp), %rbp incq %rbp movq 0x90(%rsp), %rsi addq %r14, %rsi movq 0x70(%rsp), %rcx addq %r15, %rcx movq 0x80(%rsp), %rax addq %r15, %rax movq $0x0, 0x30(%rsp) movq %rcx, %r15 movq %rax, 0x38(%rsp) movq 0x10(%rsp), %r14 jmp 0x14c417 movq 0xa0(%rsp), %rbp movq %rcx, %rsi movq %rax, %r15 movq %r8, 0x38(%rsp) testq %rbp, %rbp je 0x14c5ad cmpq $0x0, 0x30(%rsp) jne 0x14c5cc movq %rsi, %r13 movq 0x68(%rsp), %rbx movq %r14, (%rbx) addq $0x8, %rbx movl %r9d, (%r11) addq $0x4, %r11 leaq (,%rbp,8), %r12 movq 0x38(%rsp), %rsi movq %r12, %rdx movq %r11, %r14 callq 0x1c4b0 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1c4b0 shlq $0x2, %rbp movq %r14, %rdi movq %r13, %rsi jmp 0x14c125 leaq 0x9eab(%rip), %rdi # 0x156329 leaq 0x1cbcb(%rip), %rsi # 0x169050 leaq 0x9ea4(%rip), %rcx # 0x156330 movl $0x51, %edx callq 0x1c1e0 leaq 0x9ec9(%rip), %rdi # 0x156366 leaq 0x1cbac(%rip), %rsi # 0x169050 leaq 0x9e85(%rip), %rcx # 0x156330 movl $0x52, %edx callq 0x1c1e0 leaq 0x1bcac(%rip), %rdi # 0x168168 leaq 0x1cb8d(%rip), %rsi # 0x169050 leaq 0x1e56c(%rip), %rcx # 0x16aa36 movl $0x4ae, %edx # imm = 0x4AE callq 0x1c1e0 leaq 0x1e1ec(%rip), %rdi # 0x16a6c7 leaq 0x1cb6e(%rip), %rsi # 0x169050 leaq 0x1b280(%rip), %rcx # 0x167769 movl $0x3ff, %edx # imm = 0x3FF callq 0x1c1e0 leaq 0x1dd12(%rip), %rdi # 0x16a20c leaq 0x1cb4f(%rip), %rsi # 0x169050 leaq 0x1e52e(%rip), %rcx # 0x16aa36 movl $0x51d, %edx # imm = 0x51D callq 0x1c1e0 leaq 0x1cf47(%rip), %rdi # 0x169460 leaq 0x1cb30(%rip), %rsi # 0x169050 leaq 0x1e50f(%rip), %rcx # 0x16aa36 movl $0x51e, %edx # imm = 0x51E callq 0x1c1e0 leaq 0x1bc30(%rip), %rdi # 0x168168 leaq 0x1cb11(%rip), %rsi # 0x169050 leaq 0x1e4f0(%rip), %rcx # 0x16aa36 movl $0x449, %edx # imm = 0x449 callq 0x1c1e0 leaq 0x1bc11(%rip), %rdi # 0x168168 leaq 0x1caf2(%rip), %rsi # 0x169050 leaq 0x1e4d1(%rip), %rcx # 0x16aa36 movl $0x4c6, %edx # imm = 0x4C6 callq 0x1c1e0 leaq 0x1bf9f(%rip), %rdi # 0x168515 leaq 0x1cad3(%rip), %rsi # 0x169050 leaq 0x1e4b2(%rip), %rcx # 0x16aa36 movl $0x4e7, %edx # imm = 0x4E7 callq 0x1c1e0 leaq 0x1cea8(%rip), %rdi # 0x16943d leaq 0x1cab4(%rip), %rsi # 0x169050 leaq 0x1e493(%rip), %rcx # 0x16aa36 movl $0x45c, %edx # imm = 0x45C callq 0x1c1e0 leaq 0x1cea5(%rip), %rdi # 0x169459 leaq 0x1ca95(%rip), %rsi # 0x169050 leaq 0x1e474(%rip), %rcx # 0x16aa36 movl $0x527, %edx # imm = 0x527 callq 0x1c1e0 leaq 0x1dc3f(%rip), %rdi # 0x16a212 leaq 0x1ca76(%rip), %rsi # 0x169050 leaq 0x1e455(%rip), %rcx # 0x16aa36 movl $0x528, %edx # imm = 0x528 callq 0x1c1e0 leaq 0x15a70(%rip), %rdi # 0x162062 leaq 0x15a6d(%rip), %rsi # 0x162066 leaq 0x19492(%rip), %rcx # 0x165a92 movl $0x38, %edx callq 0x1c1e0 leaq 0x1bf04(%rip), %rdi # 0x168515 leaq 0x1ca38(%rip), %rsi # 0x169050 leaq 0x1e417(%rip), %rcx # 0x16aa36 movl $0x470, %edx # imm = 0x470 callq 0x1c1e0 leaq 0x1ce0d(%rip), %rdi # 0x16943d leaq 0x1ca19(%rip), %rsi # 0x169050 leaq 0x1e3f8(%rip), %rcx # 0x16aa36 movl $0x4b7, %edx # imm = 0x4B7 callq 0x1c1e0 leaq 0x1cdee(%rip), %rdi # 0x16943d leaq 0x1c9fa(%rip), %rsi # 0x169050 leaq 0x1e3d9(%rip), %rcx # 0x16aa36 movl $0x4d6, %edx # imm = 0x4D6 callq 0x1c1e0 jmp 0x14c669 movq %rax, %rbx jmp 0x14c68b movq %rax, %rbx movq 0xe8(%rsp), %rdi leaq 0xf8(%rsp), %rax cmpq %rax, %rdi je 0x14c68b callq 0x1c2c0 movq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rax cmpq %rax, %rdi je 0x14c6a5 callq 0x1c2c0 movq %rbx, %rdi callq 0x1c540
/rantala[P]string-sorting/src/mergesort_lcp.cpp
MergeResult mergesort_cache_lcp_2way_parallel<true, unsigned short>(unsigned char**, unsigned char**, unsigned long*, unsigned long*, unsigned short*, unsigned short*, unsigned long)
MergeResult mergesort_cache_lcp_2way_parallel( unsigned char** strings_input, unsigned char** strings_output, lcp_t* restrict lcp_input, lcp_t* restrict lcp_output, CharT* restrict cache_input, CharT* restrict cache_output, size_t n) { debug() << __func__ << "(): n=" << n << '\n'; if (n < 32) { insertion_sort(strings_input, n, 0); lcp_input[0] = lcp(strings_input[0], strings_input[1]); cache_input[0] = get_char<CharT>(strings_input[0], 0); for (unsigned i=1; i < n-1; ++i) { lcp_input[i] = lcp(strings_input[i], strings_input[i+1]); cache_input[i] = get_char<CharT>(strings_input[i], lcp_input[i-1]); } cache_input[n-1] = get_char<CharT>(strings_input[n-1], lcp_input[n-2]); check_input(strings_input, lcp_input, cache_input, n); return SortedInPlace; } const size_t split0 = n/2; MergeResult m0, m1; m0 = mergesort_cache_lcp_2way_parallel<true>( strings_input, strings_output, lcp_input, lcp_output, cache_input, cache_output, split0); if (m0==SortedInPlace) check_input(strings_input, lcp_input, cache_input, split0); else check_input(strings_output, lcp_output, cache_output, split0); m1 = mergesort_cache_lcp_2way_parallel<true>( strings_input+split0, strings_output+split0, lcp_input+split0, lcp_output+split0, cache_input+split0, cache_output+split0, n-split0); if (m0==SortedInPlace) check_input(strings_input+split0, lcp_input+split0, cache_input+split0, n-split0); else check_input(strings_output+split0, lcp_output+split0, cache_output+split0, n-split0); if (m0 != m1) { debug() << "Warning: extra copying due to m0 != m1. n="<<n<<"\n"; if (m0 == SortedInPlace) { std::copy(strings_input, strings_input+split0, strings_output); std::copy(cache_input, cache_input+split0, cache_output); std::copy(lcp_input, lcp_input+split0, lcp_output); m0 = SortedInTemp; } else { std::copy(strings_output, strings_output+split0, strings_input); std::copy(cache_output, cache_output+split0, cache_input); std::copy(lcp_output, lcp_output+split0, lcp_input); m1 = SortedInTemp; } } assert(m0 == m1); if (m0 == SortedInPlace) { merge_cache_lcp_2way<OutputLCP>( strings_input, lcp_input, cache_input, split0, strings_input+split0, lcp_input+split0, cache_input+split0, n-split0, strings_output, lcp_output, cache_output); return SortedInTemp; } else { merge_cache_lcp_2way<OutputLCP>( strings_output, lcp_output, cache_output, split0, strings_output+split0, lcp_output+split0, cache_output+split0, n-split0, strings_input, lcp_input, cache_input); return SortedInPlace; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %rbp movq %r8, %rbx movq %rcx, 0x8(%rsp) movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %r15 movq 0xa1d6a2(%rip), %rsi # 0xb6ac98 movq 0xa1d6a3(%rip), %rdx # 0xb6aca0 movq 0x4c9ec(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %r12 leaq 0x1d699(%rip), %rsi # 0x16acac movl $0x21, %edx movq %rax, %rdi callq 0x1c350 leaq 0x1bcba(%rip), %rsi # 0x1692e1 movl $0x6, %edx movq %r12, %rdi callq 0x1c350 movq %r12, %rdi movq 0xa0(%rsp), %r12 movq %r12, %rsi callq 0x1c200 leaq 0x7(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0x1c350 cmpq $0x1f, %r12 ja 0x14d731 cmpq $0x2, %r12 jl 0x14d6d8 movl %r12d, %ecx movq %r15, %rax movl %ecx, %edx leal -0x1(%rdx), %ecx movq 0x8(%rax), %rsi addq $0x8, %rax movq %rax, %rdi cmpq %r15, %rdi jbe 0x14d6d0 movq -0x8(%rdi), %r10 movb (%r10), %r8b movb (%rsi), %r9b cmpb %r9b, %r8b setne %r11b testb %r8b, %r8b sete %bpl orb %r11b, %bpl jne 0x14d6bf movl $0x1, %r11d movb (%r10,%r11), %r8b movb (%rsi,%r11), %r9b testb %r8b, %r8b je 0x14d6bf incq %r11 cmpb %r9b, %r8b je 0x14d6aa cmpb %r9b, %r8b jbe 0x14d6cb movq %r10, (%rdi) addq $-0x8, %rdi cmpb %r9b, %r8b ja 0x14d682 movq %rsi, (%rdi) cmpl $0x2, %edx jg 0x14d672 movq (%r15), %rax movq 0x8(%r15), %rcx xorl %edx, %edx xorl %esi, %esi movb (%rax,%rdx), %r8b testb %r8b, %r8b je 0x14d6fa cmpb (%rcx,%rdx), %r8b jne 0x14d6fa incq %rsi movb $0x1, %r8b jmp 0x14d700 xorl %r8d, %r8d movq %rsi, %rdi incq %rdx testb %r8b, %r8b jne 0x14d6e3 movq %rdi, (%r14) testq %rax, %rax je 0x14dab1 movzbl (%rax), %ecx testw %cx, %cx je 0x14d945 movzwl %cx, %ecx shll $0x8, %ecx movzbl 0x1(%rax), %eax orl %ecx, %eax jmp 0x14d947 shrq %r12 subq $0x8, %rsp movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx movq 0x10(%rsp), %rcx movq %rbx, %r8 movq %rbp, %r9 pushq %r12 callq 0x14d5cd addq $0x10, %rsp movl %eax, (%rsp) testl %eax, %eax je 0x14d76b movq %r13, %rdi movq 0x8(%rsp), %rsi movq %rbp, %rdx jmp 0x14d774 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r12, %rcx callq 0x13dacf movq %rbp, %rax leaq (%r15,%r12,8), %rdi movq %r13, 0x38(%rsp) leaq (,%r12,8), %rbp addq %r13, %rbp movq %r12, %rsi leaq (%r14,%r12,8), %r12 movq 0x8(%rsp), %rdx leaq (%rdx,%rsi,8), %rcx movq %rbx, 0x18(%rsp) leaq (%rbx,%rsi,2), %r8 movq %rax, 0x40(%rsp) leaq (%rax,%rsi,2), %r13 movq 0xa0(%rsp), %rbx movq %rsi, 0x60(%rsp) subq %rsi, %rbx subq $0x8, %rsp movq %rdi, 0x50(%rsp) movq %rbp, %rsi movq %r12, %rdx movq %rcx, 0x60(%rsp) movq %r8, 0x58(%rsp) movq %r13, %r9 pushq %rbx callq 0x14d5cd addq $0x10, %rsp movl %eax, 0x14(%rsp) cmpl $0x0, (%rsp) movq %r13, 0x30(%rsp) movq %rbp, 0x28(%rsp) movq %r12, 0x20(%rsp) je 0x14d811 movq %rbp, %rdi movq 0x58(%rsp), %rsi movq %r13, %rdx jmp 0x14d81e movq 0x48(%rsp), %rdi movq %r12, %rsi movq 0x50(%rsp), %rdx movq %rbx, %rcx callq 0x13dacf movl (%rsp), %eax movl 0x14(%rsp), %ecx cmpl %ecx, %eax movq 0x60(%rsp), %r12 jne 0x14d840 movq 0x8(%rsp), %rbp jmp 0x14d8eb movq 0xa1d451(%rip), %rsi # 0xb6ac98 movq 0xa1d452(%rip), %rdx # 0xb6aca0 movq 0x4c79b(%rip), %rdi # 0x199ff0 callq 0x1c350 movq %rax, %rbp leaq 0x1c557(%rip), %rsi # 0x169dbb movl $0x2a, %edx movq %rax, %rdi callq 0x1c350 movq %rbp, %rdi movq 0xa0(%rsp), %rbp movq %rbp, %rsi callq 0x1c200 leaq 0x78a9(%rip), %rsi # 0x155134 movl $0x1, %edx movq %rax, %rdi callq 0x1c350 leaq (,%r12,8), %r13 andq $-0x2, %rbp cmpl $0x0, (%rsp) je 0x14da5f movq %r15, %rdi movq 0x38(%rsp), %rsi movq %r13, %rdx callq 0x1c4b0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rsi movq %rbp, %rdx callq 0x1c240 movq %r14, %rdi movq 0x8(%rsp), %rbp movq %rbp, %rsi movq %r13, %rdx callq 0x1c240 movl (%rsp), %eax movl $0x1, %ecx movq 0x30(%rsp), %r11 movq 0x28(%rsp), %r8 movq 0x20(%rsp), %r9 cmpl %ecx, %eax jne 0x14dad0 testl %eax, %eax movq 0x40(%rsp), %rax movq 0x38(%rsp), %r10 je 0x14da04 subq $0x8, %rsp movq %r10, %rdi movq %rbp, %rsi movq %rax, %rdx movq %r12, %rcx movq 0x60(%rsp), %r9 pushq 0x20(%rsp) pushq %r14 pushq %r15 pushq %rbx pushq %r11 callq 0x14734a addq $0x30, %rsp xorl %r12d, %r12d jmp 0x14da4d xorl %eax, %eax movw %ax, (%rbx) leaq -0x1(%r12), %rax cmpq $0x2, %rax jb 0x14d9d3 movl $0x1, %edx movl $0x1, %ecx movl %edx, %edi movq (%r15,%rcx,8), %rsi leal 0x1(%rdi), %edx movq (%r15,%rdx,8), %r8 xorl %r9d, %r9d xorl %r10d, %r10d movb (%rsi,%r9), %bpl testb %bpl, %bpl je 0x14d989 cmpb (%r8,%r9), %bpl jne 0x14d989 incq %r10 movb $0x1, %bpl jmp 0x14d98e xorl %ebp, %ebp movq %r10, %r11 incq %r9 testb %bpl, %bpl jne 0x14d972 movq %r11, (%r14,%rcx,8) testq %rsi, %rsi je 0x14dab1 decl %edi movq (%r14,%rdi,8), %rdi movzbl (%rsi,%rdi), %r8d testw %r8w, %r8w je 0x14d9c6 movzwl %r8w, %r8d shll $0x8, %r8d movzbl 0x1(%rsi,%rdi), %esi orl %r8d, %esi jmp 0x14d9c8 xorl %esi, %esi movw %si, (%rbx,%rcx,2) movl %edx, %ecx cmpq %rcx, %rax ja 0x14d95f movq -0x8(%r15,%r12,8), %rax testq %rax, %rax je 0x14dab1 movq %r12, %rsi movq -0x10(%r14,%r12,8), %rcx movzbl (%rax,%rcx), %edx xorl %r12d, %r12d testw %dx, %dx je 0x14da35 movzwl %dx, %edx shll $0x8, %edx movzbl 0x1(%rax,%rcx), %eax orl %edx, %eax jmp 0x14da37 subq $0x8, %rsp movq %r15, %rdi movq %r14, %rsi movq 0x20(%rsp), %rdx movq %r12, %rcx movq 0x50(%rsp), %r8 pushq %rax pushq %rbp pushq %r10 pushq %rbx pushq 0x78(%rsp) callq 0x14734a addq $0x30, %rsp movl $0x1, %r12d jmp 0x14da4d xorl %eax, %eax movq %rsi, %rcx movw %ax, -0x2(%rbx,%rsi,2) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x13dacf movl %r12d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x38(%rsp), %rdi movq %r15, %rsi movq %r13, %rdx callq 0x1c4b0 movq 0x40(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rbp, %rdx callq 0x1c240 movq 0x8(%rsp), %rbp movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x1c240 movl $0x1, %eax movq 0x30(%rsp), %r11 movq 0x28(%rsp), %r8 movq 0x20(%rsp), %r9 movl 0x14(%rsp), %ecx jmp 0x14d8fa leaq 0x145aa(%rip), %rdi # 0x162062 leaq 0x145a7(%rip), %rsi # 0x162066 leaq 0x145ff(%rip), %rcx # 0x1620c5 movl $0x2e, %edx callq 0x1c1e0 leaq 0x1bbd9(%rip), %rdi # 0x1696b0 leaq 0x1b572(%rip), %rsi # 0x169050 leaq 0x1d45c(%rip), %rcx # 0x16af41 movl $0x5e2, %edx # imm = 0x5E2 callq 0x1c1e0
/rantala[P]string-sorting/src/mergesort_lcp.cpp
routine_cmp
static int routine_cmp(const void *a, const void *b) { const struct routine *aa = *(const struct routine **)a; const struct routine *bb = *(const struct routine **)b; if (aa->f == bb->f) return 0; if (aa->multicore < bb->multicore) return -1; if (aa->multicore > bb->multicore) return 1; return strcmp(aa->name, bb->name); }
movq (%rdi), %rcx movq (%rsi), %rdx movq (%rcx), %rax cmpq (%rdx), %rax je 0x14ed38 movb 0x18(%rcx), %sil andb $0x1, %sil movb 0x18(%rdx), %dil andb $0x1, %dil movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpb %dil, %sil jb 0x14ed37 movl $0x1, %eax jbe 0x14ed3b retq xorl %eax, %eax retq movq 0x8(%rcx), %rdi movq 0x8(%rdx), %rsi jmp 0x1c420
/rantala[P]string-sorting/src/routines.c
status_entry
static char * status_entry(const char *key) { char *result = NULL; char *line = NULL; size_t line_n = 0; FILE *fp; fp = fopen("/proc/self/status", "r"); if (!fp) goto done; while (getline(&line, &line_n, fp) != -1) { char *v; v = strchr(line, ':'); if (!v || *v == '\0') continue; *v = '\0'; if (strcmp(line, key) != 0) continue; ++v; while (*v == ' ' || *v == '\t') ++v; if (strlen(v) > 1) v[strlen(v)-1] = '\0'; if (*v == '\0') goto done; result = line; while ((*line++ = *v++)) ; goto done; } done: if (!result) free(line); if (fp) fclose(fp); return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, 0x8(%rsp) xorl %ebx, %ebx movq %rbx, (%rsp) movq %rbx, 0x10(%rsp) leaq 0x1c717(%rip), %rdi # 0x16b6f5 leaq 0x13606(%rip), %rsi # 0x1625eb callq 0x1c370 movq %rax, %r14 testq %rax, %rax je 0x14f09e xorl %ebx, %ebx movq %rsp, %r12 leaq 0x10(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1c3d0 cmpq $-0x1, %rax je 0x14f09e movq (%rsp), %rdi movl $0x3a, %esi callq 0x1c110 movb $0x1, %r15b testq %rax, %rax je 0x14f095 movq %rax, %rbp cmpb $0x0, (%rax) je 0x14f095 movb $0x0, (%rbp) movq (%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x1c420 testl %eax, %eax jne 0x14f095 incq %rbp movzbl (%rbp), %eax cmpl $0x20, %eax je 0x14f04c cmpl $0x9, %eax je 0x14f04c movq %rbp, %rdi callq 0x1c130 cmpq $0x2, %rax jb 0x14f070 movb $0x0, -0x1(%rbp,%rax) cmpb $0x0, (%rbp) je 0x14f092 movq (%rsp), %rbx movb (%rbp), %al incq %rbp movq (%rsp), %rcx leaq 0x1(%rcx), %rdx movq %rdx, (%rsp) movb %al, (%rcx) testb %al, %al jne 0x14f07a xorl %r15d, %r15d testb %r15b, %r15b jne 0x14f000 testq %rbx, %rbx jne 0x14f0ac movq (%rsp), %rdi callq 0x1c380 testq %r14, %r14 je 0x14f0b9 movq %r14, %rdi callq 0x1c2f0 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/rantala[P]string-sorting/src/util/cpus_allowed.c
mkqsort
void mkqsort(unsigned char **a, int n, int depth) { int d, r, partval; unsigned char **pa, **pb, **pc, **pd, **pl, **pm, **pn, *t; if (n < 20) { inssort(a, n, depth); return; } pl = a; pm = a + (n/2); pn = a + (n-1); if (n > 30) { /* On big arrays, pseudomedian of 9 */ d = (n/8); pl = med3(pl, pl+d, pl+2*d); pm = med3(pm-d, pm, pm+d); pn = med3(pn-2*d, pn-d, pn); } pm = med3(pl, pm, pn); swap2(a, pm); partval = ptr2char(a); pa = pb = a + 1; pc = pd = a + n-1; for (;;) { while (pb <= pc && (r = ptr2char(pb)-partval) <= 0) { if (r == 0) { swap2(pa, pb); pa++; } pb++; } while (pb <= pc && (r = ptr2char(pc)-partval) >= 0) { if (r == 0) { swap2(pc, pd); pd--; } pc--; } if (pb > pc) break; swap2(pb, pc); pb++; pc--; } pn = a + n; r = min(pa-a, pb-pa); vecswap2(a, pb-r, r); r = min(pd-pc, pn-pd-1); vecswap2(pb, pn-r, r); if ((r = pb-pa) > 1) mkqsort(a, r, depth); if (ptr2char(a + r) != 0) mkqsort(a + r, pa-a + pn-pd-1, depth+1); if ((r = pd-pc) > 1) mkqsort(a + n-r, r, depth); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %r13d movq %rdi, %r14 movq %rdx, (%rsp) movslq %edx, %rbx cmpl $0x13, %r13d jle 0x15035d movl %r13d, %eax shrl %eax leaq (%r14,%rax,8), %r15 movl %r13d, %eax leaq (%r14,%rax,8), %r12 addq $-0x8, %r12 cmpl $0x1f, %r13d jl 0x150186 movl %r13d, %ebp andl $-0x8, %ebp leaq (%r14,%rbp), %rsi shrl $0x2, %r13d andl $-0x2, %r13d leaq (%r14,%r13,8), %rdx shlq $0x3, %r13 movq %r14, %rdi movq (%rsp), %rcx movq %rax, 0x10(%rsp) callq 0x150078 movq %rax, 0x8(%rsp) movq %r15, %rdi subq %rbp, %rdi leaq (%r15,%rbp), %rdx movq %r15, %rsi movq (%rsp), %rcx callq 0x150078 movq %rax, %r15 movq %r12, %rdi subq %r13, %rdi movq (%rsp), %r13 movq %r12, %rsi subq %rbp, %rsi movq %r12, %rdx movl %r13d, %ecx callq 0x150078 movq 0x8(%rsp), %rdi movq %rax, %rdx movq 0x10(%rsp), %rax jmp 0x150190 movq %r14, %rdi movq %r12, %rdx movq (%rsp), %r13 leaq (%r14,%rax,8), %rax movq %rax, 0x10(%rsp) movq %r15, %rsi movl %r13d, %ecx callq 0x150078 movq (%r14), %rcx movq (%rax), %rdx movq %rdx, (%r14) movq %rcx, (%rax) movq (%r14), %rax movb (%rax,%rbx), %cl leaq 0x8(%r14), %r15 movq %r15, %rax movq %r12, %rbp cmpq %r12, %rax ja 0x1501e2 movq (%rax), %rdx cmpb %cl, (%rdx,%rbx) ja 0x1501e2 jne 0x1501dc movq (%r15), %rsi movq %rdx, (%r15) movq %rsi, (%rax) addq $0x8, %r15 addq $0x8, %rax jmp 0x1501c0 cmpq %r12, %rax seta %dl ja 0x150248 movq (%r12), %rsi movb (%rsi,%rbx), %dil cmpb %cl, %dil jb 0x150225 cmpb %cl, %dil jne 0x15020c movq (%rbp), %rdx movq %rdx, (%r12) movq %rsi, (%rbp) addq $-0x8, %rbp leaq -0x8(%r12), %r8 cmpq %r8, %rax seta %dl ja 0x150244 movq (%r8), %rsi movb (%rsi,%rbx), %dil movq %r8, %r12 jmp 0x1501f2 testb %dl, %dl jne 0x150248 movq (%rax), %rdx movq (%r12), %rsi movq %rsi, (%rax) movq %rdx, (%r12) addq $0x8, %rax addq $-0x8, %r12 jmp 0x1501c0 addq $-0x8, %r12 movq %rax, %r10 subq %r15, %r10 subq %r14, %r15 movq %r15, %rdx sarq $0x3, %rdx movq %r10, %rsi sarq $0x3, %rsi cmpq %rsi, %rdx cmovgeq %rsi, %rdx testl %edx, %edx jle 0x15029b movl %edx, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF shlq $0x3, %rdi movq %rax, %rcx subq %rdi, %rcx incl %edx xorl %edi, %edi movq (%r14,%rdi), %r8 movq (%rcx,%rdi), %r9 movq %r9, (%r14,%rdi) movq %r8, (%rcx,%rdi) addq $0x8, %rdi decl %edx cmpl $0x1, %edx jg 0x150280 movq %rbp, %r13 subq %r12, %r13 sarq $0x3, %r13 movq 0x10(%rsp), %r12 movq %r12, %rcx subq %rbp, %rcx sarq $0x3, %rcx leaq -0x1(%rcx), %rdx cmpq %rcx, %r13 cmovlq %r13, %rdx testl %edx, %edx jle 0x1502f4 movl %edx, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF shlq $0x3, %rdi movq %r12, %rcx subq %rdi, %rcx incl %edx xorl %edi, %edi movq (%rax,%rdi), %r8 movq (%rcx,%rdi), %r9 movq %r9, (%rax,%rdi) movq %r8, (%rcx,%rdi) addq $0x8, %rdi decl %edx cmpl $0x1, %edx jg 0x1502d9 cmpl $0x2, %esi jl 0x15030f movq %r14, %rdi movq (%rsp), %rdx movq %r10, 0x8(%rsp) callq 0x1500d4 movq 0x8(%rsp), %r10 shrq $0x3, %r10 movslq %r10d, %rax movq (%r14,%rax,8), %rcx cmpb $0x0, (%rcx,%rbx) je 0x150340 leaq (%r14,%rax,8), %rdi addq %r12, %r15 subq %rbp, %r15 shrq $0x3, %r15 decl %r15d movq (%rsp), %rax leal 0x1(%rax), %edx movl %r15d, %esi callq 0x1500d4 cmpl $0x2, %r13d jl 0x15037a movl %r13d, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF shlq $0x3, %rax subq %rax, %r12 movq %r12, %r14 jmp 0x1500ef movq %r14, %rdi movl %r13d, %esi movq (%rsp), %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x151efa addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/rantala[P]string-sorting/external/mkqsort.c
cradix_rantala
void cradix_rantala(LPPSTR a, UINT n) { UINT kbsd, kbsd1, i, j, stage, d, MEMSIZE; UINT *cptr, gs, count[AS]; LPSTR tj, tk, ax, tl, kb, ss, tt, GrpKB[AS]; LPPSTR GrpKP[AS], ak, ta, tc, t; if (sizeof(LPPSTR)>sizeof(unsigned char)*BS) MEMSIZE=sizeof(LPPSTR); else MEMSIZE=sizeof(unsigned char)*BS; /* workspace */ ta = (LPPSTR)malloc(n * MEMSIZE); /* memory for key buffers */ tk = (LPBYTE)malloc(n * sizeof(unsigned char) * BS); tj=tk; push(a, tk, n, 0); for (i=AL; i<AH; i++) count[i]=0; while (!stackempty()) { pop(a, tk, n, stage); if (tk) { /* set the counters and fill the key buffers if necessary */ if ((d=stage%BS)!=0) for (i=0, tl=tk; i<n; i++, tl+=(BS-d)) count[*tl]++; else { if (n>KBC) FillKeyBuffer(a, tk, count, n, stage); else { RDFK(GrpKP, a, n, ta, count, stage); continue; } } /* check if there is only 1 group */ cptr=&count[AL]; while (*cptr<1) cptr++; if (*cptr<n) gs=n; else gs=0; /* calculate both key ptr and key buffer addresses */ kbsd=BS-d, kbsd1=kbsd-1; GrpKP[AL]=a; GrpKB[AL]=tk; for (ak=a, ax=tk, i=AL; i<AH; i++) { GrpKP[i+1]=ak+=count[i]; GrpKB[i+1]=ax+=count[i]*kbsd1; } /* permute the key ptrs */ memcpy(ta, a, sizeof(LPSTR)*gs); for (i=0, ax=tk, tc=ta; i<gs; i++, ax+=kbsd, tc++) { *GrpKP[*ax]=*tc; GrpKP[*ax]++; } /* permute the key buffers */ memcpy(ta, tk, sizeof(unsigned char)*n*kbsd); for (i=0, kb=(LPBYTE)ta; i<n; i++, *t+=kbsd1) { t=&GrpKB[*kb]; ss=*t; tt=kb+1; for (j=0; j<kbsd1; j++) { *ss=*tt; ss++; tt++; } kb+=kbsd; } /* down 1 level */ for (ak=a, ax=tk, i=AL; i<AH; i++) { if (splittable(i)) { push(ak, ax, count[i], stage+1); } else if (count[i]>1 && i>0) insertion_sort(ak, count[i], stage); ak+=count[i]; ax+=count[i]*(kbsd1); count[i]=0; } } else RDFK(GrpKP, a, n, ta, count, stage); } free((void*)ta); free((void*)tj); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1848, %rsp # imm = 0x1848 movq %rsi, %rbx movq %rdi, %r14 leaq (,%rsi,8), %rdi callq 0x1c3f0 movq %rax, %r15 leaq (,%rbx,4), %rdi callq 0x1c3f0 movq 0x49545(%rip), %rcx # 0x19a320 movq %r14, (%rcx) movq %rax, 0x28(%rsp) movq %rax, 0x8(%rcx) movl %ebx, 0x10(%rcx) leaq 0x18(%rcx), %rbx movq %rbx, 0x4952b(%rip) # 0x19a320 movl $0x0, 0x14(%rcx) leaq 0x40(%rsp), %r13 movl $0x7f8, %edx # imm = 0x7F8 movq %r13, %rdi xorl %esi, %esi callq 0x1c180 leaq 0xa33ac9(%rip), %rax # 0xb848e0 cmpq %rax, %rbx jbe 0x1510f5 movq %r15, %rax incq %rax movq %rax, 0x30(%rsp) movq %r15, 0x8(%rsp) leaq -0x18(%rbx), %rax movq %rax, 0x494e5(%rip) # 0x19a320 movq -0x18(%rbx), %rbp movq -0x10(%rbx), %r14 movslq -0x8(%rbx), %r12 movslq -0x4(%rbx), %r9 testq %r14, %r14 je 0x1510c5 movq %r9, %r8 andq $0x3, %r8 je 0x150e82 testl %r12d, %r12d je 0x150eda movl $0x4, %eax subq %r8, %rax movq %r12, %rcx movq %r14, %rdx movzbl (%rdx), %esi incq 0x40(%rsp,%rsi,8) addq %rax, %rdx decq %rcx jne 0x150e70 jmp 0x150eda cmpl $0x81, %r12d jb 0x1510c5 movq %r14, %rax xorl %ecx, %ecx movq (%rbp,%rcx,8), %rdx addq %r9, %rdx xorl %esi, %esi movb (%rdx,%rsi), %dil movb %dil, (%rax,%rsi) testb %dil, %dil je 0x150eb6 incq %rsi cmpq $0x4, %rsi jne 0x150e9e jmp 0x150eba movb $0x0, (%rax,%rsi) incq %rcx addq $0x4, %rax cmpq %r12, %rcx jne 0x150e94 xorl %eax, %eax movzbl (%r14,%rax,4), %ecx incq 0x40(%rsp,%rcx,8) incq %rax cmpq %rax, %r12 jne 0x150ec8 movq %r9, 0x20(%rsp) movq %r13, %rax movq (%rax), %r13 addq $0x8, %rax testq %r13, %r13 je 0x150ee2 movq %r15, %r9 cmpq %r12, %r13 movl $0x0, %ebx cmovbq %r12, %rbx movq %r8, %rdi xorq $0x3, %rdi movq %rbp, 0x840(%rsp) movq %r14, 0x1040(%rsp) movq %rbp, %rax movq %r14, %rcx xorl %edx, %edx movq 0x40(%rsp,%rdx,8), %rsi leaq (%rax,%rsi,8), %rax movq %rax, 0x848(%rsp,%rdx,8) imulq %rdi, %rsi addq %rsi, %rcx movq %rcx, 0x1048(%rsp,%rdx,8) leaq 0x1(%rdx), %rsi movq %rsi, %rdx cmpq $0xff, %rsi jne 0x150f1c movq %rdi, (%rsp) movl $0x4, %r15d movq %r8, 0x18(%rsp) subq %r8, %r15 leaq (,%rbx,8), %rdx movq %r9, %rdi movq %rbp, %rsi callq 0x1c240 movq 0x8(%rsp), %rdi cmpq %r12, %r13 jae 0x150fb1 cmpq $0x1, %rbx adcq $0x0, %rbx movq %r14, %rax xorl %ecx, %ecx movq (%rdi,%rcx,8), %rdx movzbl (%rax), %esi movq 0x840(%rsp,%rsi,8), %rsi movq %rdx, (%rsi) movzbl (%rax), %edx addq $0x8, 0x840(%rsp,%rdx,8) incq %rcx addq %r15, %rax cmpq %rcx, %rbx jne 0x150f88 movq %r15, %rdx imulq %r12, %rdx movq %r15, 0x10(%rsp) movq %r14, %rsi callq 0x1c240 movq 0x10(%rsp), %rcx testl %r12d, %r12d movq 0x18(%rsp), %rax movq (%rsp), %rdx je 0x151030 cmpq $0x1, %rdx movq %rdx, %rsi adcq $0x0, %rsi movq %rsi, 0x38(%rsp) movq 0x30(%rsp), %rbx movzbl -0x1(%rbx), %r15d movq 0x1040(%rsp,%r15,8), %r13 cmpl $0x3, %eax je 0x15101d movq %r13, %rdi movq %rbx, %rsi movq 0x38(%rsp), %rdx callq 0x1c240 movq 0x10(%rsp), %rcx movq (%rsp), %rdx movq 0x18(%rsp), %rax addq %rdx, %r13 movq %r13, 0x1040(%rsp,%r15,8) addq %rcx, %rbx decq %r12 jne 0x150fed movq 0x20(%rsp), %rax leal 0x1(%rax), %ebx xorl %r12d, %r12d movq 0x8(%rsp), %r15 leaq 0x40(%rsp), %r13 testq %r12, %r12 je 0x151076 movq 0x40(%rsp,%r12,8), %rax cmpq $0x15, %rax jb 0x151076 movq 0x492c4(%rip), %rcx # 0x19a320 movq %rbp, (%rcx) movq %r14, 0x8(%rcx) movl %eax, 0x10(%rcx) leaq 0x18(%rcx), %rax movq %rax, 0x492af(%rip) # 0x19a320 movl %ebx, 0x14(%rcx) jmp 0x15109d testq %r12, %r12 sete %al movq 0x40(%rsp,%r12,8), %rsi cmpq $0x2, %rsi setb %cl orb %al, %cl jne 0x15109d movq %rbp, %rdi movq 0x20(%rsp), %rdx callq 0x1512fd movq (%rsp), %rdx movq 0x40(%rsp,%r12,8), %rax leaq (%rbp,%rax,8), %rbp imulq %rdx, %rax addq %rax, %r14 movq $0x0, 0x40(%rsp,%r12,8) incq %r12 cmpq $0xff, %r12 jne 0x151045 jmp 0x1510de leaq 0x840(%rsp), %rdi movq %rbp, %rsi movq %r12, %rdx movq %r15, %rcx movq %r13, %r8 callq 0x151119 movq 0x4923b(%rip), %rbx # 0x19a320 leaq 0xa337f4(%rip), %rax # 0xb848e0 cmpq %rax, %rbx ja 0x150e30 movq %r15, %rdi callq 0x1c380 movq 0x28(%rsp), %rdi callq 0x1c380 addq $0x1848, %rsp # imm = 0x1848 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/rantala[P]string-sorting/external/cradix-improved.c
parallel_string_radix_sort::ParallelStringRadixSort<unsigned char const*>::Sort16Parallel(unsigned long, unsigned long, unsigned long, bool)
void ParallelStringRadixSort<StringType> ::Sort16Parallel(size_t bgn, size_t end, size_t depth, bool flip) { size_t cnt[1 << 16] = {}; StringType *src = (flip ? temp_ : data_) + bgn; StringType *dst = (flip ? data_ : temp_) + bgn; uint16_t *let = letters16_ + bgn; size_t n = end - bgn; #ifdef _OPENMP #pragma omp parallel for schedule(static) #endif for (size_t i = 0; i < n; ++i) { uint16_t x = src[i][depth]; let[i] = x == 0 ? 0 : ((x << 8) | src[i][depth + 1]); } for (size_t i = 0; i < n; ++i) { ++cnt[let[i]]; } { size_t s = 0; for (int i = 0; i < 1 << 16; ++i) { std::swap(cnt[i], s); s += cnt[i]; } } for (size_t i = 0; i < n; ++i) { std::swap(dst[cnt[let[i]]++], src[i]); } if (flip == false) { #ifdef _OPENMP #pragma omp parallel for schedule(static) #endif for (int i = 0; i < 1 << 8; ++i) { size_t b = i == 0 ? 0 : cnt[(i << 8) - 1]; size_t e = cnt[i << 8]; for (size_t j = b; j < e; ++j) { src[j] = dst[j]; } } } #ifdef _OPENMP #pragma omp parallel for schedule(dynamic) #endif for (size_t i = 1; i < 1 << 16; ++i) { if ((i & 0xFF) != 0 && cnt[i] - cnt[i - 1] >= 1) { Recurse(bgn + cnt[i - 1], bgn + cnt[i], depth + 2, !flip); } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x80018, %rsp # imm = 0x80018 movl %r8d, %ebx movq %rcx, %r14 movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r12 leaq 0x10(%rsp), %r13 movl $0x80000, %edx # imm = 0x80000 movq %r13, %rdi xorl %esi, %esi callq 0x1c180 movq 0x8(%r12), %rcx movq 0x10(%r12), %rsi testl %ebx, %ebx movq %rcx, %rax cmovneq %rsi, %rax cmovneq %rcx, %rsi movq 0x20(%r12), %rcx cmpq %r15, %rbp je 0x1536fc movq %r15, %rdx movq (%rax,%rdx,8), %rdi movzbl (%rdi,%r14), %r8d testw %r8w, %r8w je 0x1536ee movzwl %r8w, %r8d shll $0x8, %r8d movzbl 0x1(%rdi,%r14), %edi orl %r8d, %edi jmp 0x1536f0 xorl %edi, %edi movw %di, (%rcx,%rdx,2) incq %rdx cmpq %rdx, %rbp jne 0x1536cc cmpq %r15, %rbp je 0x153715 movq %r15, %rdx movzwl (%rcx,%rdx,2), %edi incq 0x10(%rsp,%rdi,8) incq %rdx cmpq %rdx, %rbp jne 0x153704 leaq (%rax,%r15,8), %rdx leaq (%rsi,%r15,8), %rsi xorl %edi, %edi xorl %r8d, %r8d movq 0x10(%rsp,%rdi,8), %r9 addq %r8, %r9 movq %r8, 0x10(%rsp,%rdi,8) incq %rdi movq %r9, %r8 cmpq $0x10000, %rdi # imm = 0x10000 jne 0x153722 cmpq %r15, %rbp je 0x153771 movq %r15, %rdi movzwl (%rcx,%rdi,2), %r8d movq 0x10(%rsp,%r8,8), %r9 leaq 0x1(%r9), %r10 movq %r10, 0x10(%rsp,%r8,8) movq (%rsi,%r9,8), %r8 movq (%rax,%rdi,8), %r10 movq %r10, (%rsi,%r9,8) movq %r8, (%rax,%rdi,8) incq %rdi cmpq %rdi, %rbp jne 0x153746 testb %bl, %bl jne 0x1537b8 xorl %eax, %eax testq %rax, %rax je 0x15378a movq %rax, %rcx shlq $0xb, %rcx movq -0x8(%rcx,%r13), %rcx jmp 0x15378c xorl %ecx, %ecx movq %rax, %rdi shlq $0xb, %rdi movq 0x10(%rsp,%rdi), %rdi cmpq %rdi, %rcx jae 0x1537ad movq (%rsi,%rcx,8), %r8 movq %r8, (%rdx,%rcx,8) incq %rcx cmpq %rcx, %rdi jne 0x15379d incq %rax cmpq $0x100, %rax # imm = 0x100 jne 0x153777 addq $0x2, %r14 movl %ebx, %eax xorb $0x1, %al movl $0x1, %ebp movzbl %al, %r13d movq %r15, 0x8(%rsp) movl %r13d, 0x4(%rsp) testb %bpl, %bpl je 0x1537ea movq 0x8(%rsp,%rbp,8), %rsi movq 0x10(%rsp,%rbp,8), %rdx movq %rdx, %rax subq %rsi, %rax jne 0x1537fb incq %rbp cmpq $0x10000, %rbp # imm = 0x10000 jne 0x1537d3 jmp 0x1538c9 addq %r15, %rsi addq %r15, %rdx cmpq $0x63, %r14 ja 0x153829 cmpq $0x1e, %rax jbe 0x153829 movq %r12, %rdi movq %r14, %rcx movl %r13d, %r8d cmpq $0xffff, %rax # imm = 0xFFFF ja 0x1538bf callq 0x1538dc jmp 0x1537ea cmpq %rdx, %rsi setae %cl orb %bl, %cl jne 0x15385b movq %rax, %rcx movq %rsi, %rdi movq 0x8(%r12), %r8 movq 0x10(%r12), %r9 movq (%r8,%rdi,8), %r10 movq (%r9,%rdi,8), %r11 movq %r11, (%r8,%rdi,8) movq %r10, (%r9,%rdi,8) incq %rdi decq %rcx jne 0x153839 cmpq $0x2, %rax jb 0x1537ea movq 0x8(%r12), %rax leaq (%rax,%rdx,8), %r13 shlq $0x3, %rdx leaq (,%rsi,8), %rcx subq %rcx, %rdx movl %ebx, %r15d leaq (%rax,%rsi,8), %rbx sarq $0x3, %rdx bsrq %rdx, %rdx xorl $0x3f, %edx addl %edx, %edx xorq $0x7e, %rdx movq %rbx, %rdi movq %r13, %rsi movl %r14d, %ecx callq 0x153d87 movq %rbx, %rdi movl %r15d, %ebx movq 0x8(%rsp), %r15 movq %r13, %rsi movl 0x4(%rsp), %r13d movl %r14d, %edx callq 0x153e44 jmp 0x1537ea callq 0x153b00 jmp 0x1537ea addq $0x80018, %rsp # imm = 0x80018 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/rantala[P]string-sorting/external/parallel_string_radix_sort.h
parallel_string_radix_sort::ParallelStringRadixSort<unsigned char const*>::Sort16(unsigned long, unsigned long, unsigned long, bool)
void ParallelStringRadixSort<StringType> ::Sort16(size_t bgn, size_t end, size_t depth, bool flip) { size_t *cnt = new size_t[1 << 16](); PSRS_CHECK(cnt != NULL); StringType *src = (flip ? temp_ : data_) + bgn; StringType *dst = (flip ? data_ : temp_) + bgn; uint16_t *let = letters16_ + bgn; size_t n = end - bgn; for (size_t i = 0; i < n; ++i) { uint16_t x = src[i][depth]; let[i] = x == 0 ? 0 : ((x << 8) | src[i][depth + 1]); } for (size_t i = 0; i < n; ++i) { ++cnt[let[i]]; } size_t s = 0; for (int i = 0; i < 1 << 16; ++i) { std::swap(cnt[i], s); s += cnt[i]; } for (size_t i = 0; i < n; ++i) { std::swap(dst[cnt[let[i]]++], src[i]); } if (flip == false) { for (int i = 0; i < 1 << 8; ++i) { size_t b = i == 0 ? 0 : cnt[(i << 8) - 1]; size_t e = cnt[i << 8]; for (size_t j = b; j < e; ++j) { std::swap(src[j], dst[j]); } } } for (size_t i = 1; i < 1 << 16; ++i) { if ((i & 0xFF) != 0 && cnt[i] - cnt[i - 1] >= 1) { Recurse(bgn + cnt[i - 1], bgn + cnt[i], depth + 2, !flip); } } delete [] cnt; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %ebx movq %rcx, %r14 movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r12 movl $0x80000, %edi # imm = 0x80000 callq 0x1c030 movq %rax, %r13 movl $0x80000, %edx # imm = 0x80000 movq %rax, %rdi xorl %esi, %esi callq 0x1c180 movq 0x8(%r12), %rcx movq 0x10(%r12), %rsi testl %ebx, %ebx movq %rcx, %rax cmovneq %rsi, %rax cmovneq %rcx, %rsi movq 0x20(%r12), %rcx movq %r15, 0x8(%rsp) cmpq %r15, %rbp je 0x153b94 movq 0x8(%rsp), %rdx movq (%rax,%rdx,8), %rdi movzbl (%rdi,%r14), %r8d testw %r8w, %r8w je 0x153b86 movzwl %r8w, %r8d shll $0x8, %r8d movzbl 0x1(%rdi,%r14), %edi orl %r8d, %edi jmp 0x153b88 xorl %edi, %edi movw %di, (%rcx,%rdx,2) incq %rdx cmpq %rdx, %rbp jne 0x153b64 cmpq 0x8(%rsp), %rbp je 0x153bb1 movq 0x8(%rsp), %rdx movzwl (%rcx,%rdx,2), %edi incq (%r13,%rdi,8) incq %rdx cmpq %rdx, %rbp jne 0x153ba0 movq 0x8(%rsp), %rdi leaq (%rax,%rdi,8), %rdx leaq (%rsi,%rdi,8), %rsi xorl %edi, %edi xorl %r8d, %r8d movq (%r13,%rdi,8), %r9 addq %r8, %r9 movq %r8, (%r13,%rdi,8) incq %rdi movq %r9, %r8 cmpq $0x10000, %rdi # imm = 0x10000 jne 0x153bc3 cmpq 0x8(%rsp), %rbp je 0x153c16 movq 0x8(%rsp), %rdi movzwl (%rcx,%rdi,2), %r8d movq (%r13,%r8,8), %r9 leaq 0x1(%r9), %r10 movq %r10, (%r13,%r8,8) movq (%rsi,%r9,8), %r8 movq (%rax,%rdi,8), %r10 movq %r10, (%rsi,%r9,8) movq %r8, (%rax,%rdi,8) incq %rdi cmpq %rdi, %rbp jne 0x153beb testb %bl, %bl jne 0x153c65 xorl %eax, %eax testq %rax, %rax je 0x153c2f movq %rax, %rcx shlq $0xb, %rcx movq -0x8(%r13,%rcx), %rcx jmp 0x153c31 xorl %ecx, %ecx movq %rax, %rdi shlq $0xb, %rdi movq (%r13,%rdi), %rdi cmpq %rdi, %rcx jae 0x153c5a movq (%rdx,%rcx,8), %r8 movq (%rsi,%rcx,8), %r9 movq %r9, (%rdx,%rcx,8) movq %r8, (%rsi,%rcx,8) incq %rcx cmpq %rcx, %rdi jne 0x153c42 incq %rax cmpq $0x100, %rax # imm = 0x100 jne 0x153c1c addq $0x2, %r14 movl %ebx, %eax xorb $0x1, %al movl $0x1, %r15d movzbl %al, %ebp movl %ebx, 0x14(%rsp) movl %ebp, 0x10(%rsp) testb %r15b, %r15b je 0x153c95 movq -0x8(%r13,%r15,8), %rsi movq (%r13,%r15,8), %rdx movq %rdx, %rax subq %rsi, %rax jne 0x153ca6 incq %r15 cmpq $0x10000, %r15 # imm = 0x10000 jne 0x153c7e jmp 0x153d71 movq 0x8(%rsp), %rcx addq %rcx, %rsi addq %rcx, %rdx cmpq $0x63, %r14 ja 0x153cd9 cmpq $0x1e, %rax jbe 0x153cd9 movq %r12, %rdi movq %r14, %rcx movl %ebp, %r8d cmpq $0xffff, %rax # imm = 0xFFFF ja 0x153d67 callq 0x1538dc jmp 0x153c95 cmpq %rdx, %rsi setae %cl orb %bl, %cl jne 0x153d0b movq %rax, %rcx movq %rsi, %rdi movq 0x8(%r12), %r8 movq 0x10(%r12), %r9 movq (%r8,%rdi,8), %r10 movq (%r9,%rdi,8), %r11 movq %r11, (%r8,%rdi,8) movq %r10, (%r9,%rdi,8) incq %rdi decq %rcx jne 0x153ce9 cmpq $0x2, %rax jb 0x153c95 movq 0x8(%r12), %rax leaq (%rax,%rdx,8), %rbx shlq $0x3, %rdx leaq (,%rsi,8), %rcx subq %rcx, %rdx leaq (%rax,%rsi,8), %rbp sarq $0x3, %rdx bsrq %rdx, %rdx xorl $0x3f, %edx addl %edx, %edx xorq $0x7e, %rdx movq %rbp, %rdi movq %rbx, %rsi movl %r14d, %ecx callq 0x153d87 movq %rbp, %rdi movl 0x10(%rsp), %ebp movq %rbx, %rsi movl 0x14(%rsp), %ebx movl %r14d, %edx callq 0x153e44 jmp 0x153c95 callq 0x153b00 jmp 0x153c95 movq %r13, %rdi addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1c3e0
/rantala[P]string-sorting/external/parallel_string_radix_sort.h
(anonymous namespace)::PrintTypeErrorMessage(char const*)
void PrintTypeErrorMessage(const char* option) { std::ostringstream error_message; error_message << "The argument for the -" << option << " option must be numeric"; sptk::PrintErrorMessage("sopr", error_message); }
pushq %r14 pushq %rbx subq $0x198, %rsp # imm = 0x198 movq %rdi, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x4350 leaq 0x96cd(%rip), %rsi # 0xf262 movl $0x16, %edx movq %r14, %rdi callq 0x42f0 testq %rbx, %rbx je 0x5bc1 movq %rbx, %rdi callq 0x4130 leaq 0x20(%rsp), %rdi movq %rbx, %rsi movq %rax, %rdx callq 0x42f0 jmp 0x5bdd movq 0x20(%rsp), %rax movq -0x18(%rax), %rax leaq (%rsp,%rax), %rdi addq $0x20, %rdi movl 0x20(%rdi), %esi orl $0x1, %esi callq 0x4410 leaq 0x9695(%rip), %rsi # 0xf279 leaq 0x20(%rsp), %rdi movl $0x17, %edx callq 0x42f0 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x95b0(%rip), %rsi # 0xf1b3 leaq 0x95ad(%rip), %rdx # 0xf1b7 movq %rsp, %rdi callq 0x6dc4 movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x9c20 movq (%rsp), %rdi cmpq %r14, %rdi je 0x5c2d callq 0x4290 movq 0x1135c(%rip), %rsi # 0x16f90 leaq 0x20(%rsp), %rdi callq 0x4180 leaq 0x90(%rsp), %rdi callq 0x40e0 addq $0x198, %rsp # imm = 0x198 popq %rbx popq %r14 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x5c6e callq 0x4290 jmp 0x5c6e jmp 0x5c6b movq %rax, %rbx movq 0x1131b(%rip), %rsi # 0x16f90 leaq 0x20(%rsp), %rdi callq 0x4180 leaq 0x90(%rsp), %rdi callq 0x40e0 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/main/sopr.cc
(anonymous namespace)::PrintUsage(std::ostream*)
void PrintUsage(std::ostream* stream) { // clang-format off *stream << std::endl; *stream << " sopr - perform scalar operations" << std::endl; *stream << std::endl; *stream << " usage:" << std::endl; *stream << " sopr [ options ] [ infile ] > stdout" << std::endl; *stream << " options:" << std::endl; *stream << " -a a : addition (double)[ N/A][ x + a ]" << std::endl; // NOLINT *stream << " -s s : subtraction (double)[ N/A][ x - s ]" << std::endl; // NOLINT *stream << " -m m : multiplication (double)[ N/A][ x * m ]" << std::endl; // NOLINT *stream << " -d d : division (double)[ N/A][ x / d ]" << std::endl; // NOLINT *stream << " -r r : modulo (double)[ N/A][ x % r ]" << std::endl; // NOLINT *stream << " -p p : power (double)[ N/A][ x ^ p ]" << std::endl; // NOLINT *stream << " -l l : lower bounding (double)[ N/A][ max(x, l) ]" << std::endl; // NOLINT *stream << " -u u : upper bounding (double)[ N/A][ min(x, u) ]" << std::endl; // NOLINT *stream << " -ABS : absolute [ |x| ]" << std::endl; // NOLINT *stream << " -INV : inverse [ 1 / x ]" << std::endl; // NOLINT *stream << " -SQR : square [ x ^ 2 ]" << std::endl; // NOLINT *stream << " -SQRT : square root [ x ^ 0.5 ]" << std::endl; // NOLINT *stream << " -LN : natural logarithm [ ln(x) ]" << std::endl; // NOLINT *stream << " -LOG2 : base 2 logarithm [ log2(x) ]" << std::endl; // NOLINT *stream << " -LOG10 : base 10 logarithm [ log10(x) ]" << std::endl; // NOLINT *stream << " -LOGX X : base X logarithm (double)[ N/A][ logX(x) ]" << std::endl; // NOLINT *stream << " -EXP : exponential [ e ^ x ]" << std::endl; // NOLINT *stream << " -POW2 : power of 2 [ 2 ^ x ]" << std::endl; // NOLINT *stream << " -POW10 : power of 10 [ 10 ^ x ]" << std::endl; // NOLINT *stream << " -POWX X : power of X (double)[ N/A][ X ^ x ]" << std::endl; // NOLINT *stream << " -FLOOR : flooring [ floor(x) ]" << std::endl; // NOLINT *stream << " -CEIL : ceiling [ ceil(x) ]" << std::endl; // NOLINT *stream << " -ROUND : rounding [ round(x) ]" << std::endl; // NOLINT *stream << " -ROUNDUP : rounding up [ roundup(x) ]" << std::endl; // NOLINT *stream << " -ROUNDDOWN : rounding down [ int(x) ]" << std::endl; // NOLINT *stream << " -UNIT : unit step [ u(x) ]" << std::endl; // NOLINT *stream << " -RAMP : rectifier [ x * u(x) ]" << std::endl; // NOLINT *stream << " -SIGN : sign [ sgn(x) ]" << std::endl; // NOLINT *stream << " -SIN : sine [ sin(x) ]" << std::endl; // NOLINT *stream << " -COS : cosine [ cos(x) ]" << std::endl; // NOLINT *stream << " -TAN : tangent [ tan(x) ]" << std::endl; // NOLINT *stream << " -ASIN : arcsine [ asin(x) ]" << std::endl; // NOLINT *stream << " -ACOS : arccosine [ acos(x) ]" << std::endl; // NOLINT *stream << " -ATAN : arctangent [ atan(x) ]" << std::endl; // NOLINT *stream << " -TANH : hyperbolic tangent [ tanh(x) ]" << std::endl; // NOLINT *stream << " -ATANH : hyperbolic arctangent [ atanh(x) ]" << std::endl; // NOLINT *stream << " -magic magic : remove magic number (double)[ N/A][ ]" << std::endl; // NOLINT *stream << " -MAGIC MAGIC : replace magic number (double)[ N/A][ MAGIC ]" << std::endl; // NOLINT *stream << " -h : print this message" << std::endl; *stream << "" << std::endl; *stream << " the following strings can be used as the argument of -a, -s, -m," << std::endl; // NOLINT *stream << " -d, -p, -l, -u, -magic, or -MAGIC option:" << std::endl; *stream << "" << std::endl; *stream << " pi : 3.14159265..." << std::endl; *stream << " dB : 20 / ln(10)" << std::endl; *stream << " cent : 1200 / ln(2)" << std::endl; *stream << " semitone : 12 / ln(2)" << std::endl; *stream << " octave : 1 / ln(2)" << std::endl; *stream << " sqrtX : sqrt(X) [ 0.0 <= X <= ]" << std::endl; // NOLINT *stream << " lnX : ln(X) [ 0.0 < X <= ]" << std::endl; // NOLINT *stream << " expX : exp(X) [ <= X <= ]" << std::endl; // NOLINT *stream << "" << std::endl; *stream << " they are case-insensitive" << std::endl; *stream << "" << std::endl; *stream << " infile:" << std::endl; *stream << " data sequence (double)[stdin]" << std::endl; // NOLINT *stream << " stdout:" << std::endl; *stream << " data sequence after operations (double)" << std::endl; *stream << " notice:" << std::endl; *stream << " if -MAGIC is given before -magic is given, return error" << std::endl; // NOLINT *stream << std::endl; *stream << " SPTK: version " << sptk::kVersion << std::endl; *stream << std::endl; // clang-format on }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94c5(%rip), %rsi # 0xf2ae movl $0x21, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9485(%rip), %rsi # 0xf2d0 movl $0x8, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9453(%rip), %rsi # 0xf2d9 movl $0x2b, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9444(%rip), %rsi # 0xf305 movl $0xa, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9414(%rip), %rsi # 0xf310 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9422(%rip), %rsi # 0xf359 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9430(%rip), %rsi # 0xf3a2 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x943e(%rip), %rsi # 0xf3eb movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x944c(%rip), %rsi # 0xf434 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x945a(%rip), %rsi # 0xf47d movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9468(%rip), %rsi # 0xf4c6 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9476(%rip), %rsi # 0xf50f movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9484(%rip), %rsi # 0xf558 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9492(%rip), %rsi # 0xf5a1 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94a0(%rip), %rsi # 0xf5ea movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94ae(%rip), %rsi # 0xf633 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94bc(%rip), %rsi # 0xf67c movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94ca(%rip), %rsi # 0xf6c5 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94d8(%rip), %rsi # 0xf70e movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94e6(%rip), %rsi # 0xf757 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94f4(%rip), %rsi # 0xf7a0 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9502(%rip), %rsi # 0xf7e9 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9510(%rip), %rsi # 0xf832 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x951e(%rip), %rsi # 0xf87b movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x952c(%rip), %rsi # 0xf8c4 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x953a(%rip), %rsi # 0xf90d movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9548(%rip), %rsi # 0xf956 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9556(%rip), %rsi # 0xf99f movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9564(%rip), %rsi # 0xf9e8 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9572(%rip), %rsi # 0xfa31 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9580(%rip), %rsi # 0xfa7a movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x958e(%rip), %rsi # 0xfac3 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x959c(%rip), %rsi # 0xfb0c movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95aa(%rip), %rsi # 0xfb55 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95b8(%rip), %rsi # 0xfb9e movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95c6(%rip), %rsi # 0xfbe7 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95d4(%rip), %rsi # 0xfc30 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95e2(%rip), %rsi # 0xfc79 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95f0(%rip), %rsi # 0xfcc2 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95fe(%rip), %rsi # 0xfd0b movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x960c(%rip), %rsi # 0xfd54 movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x961a(%rip), %rsi # 0xfd9d movl $0x48, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9628(%rip), %rsi # 0xfde6 movl $0x28, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x99e6(%rip), %r14 # 0x101df movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95db(%rip), %rsi # 0xfe0f movl $0x47, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95e8(%rip), %rsi # 0xfe57 movl $0x30, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x95aa(%rip), %rsi # 0xfe88 movl $0x23, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9593(%rip), %rsi # 0xfeac movl $0x23, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x957c(%rip), %rsi # 0xfed0 movl $0x22, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9564(%rip), %rsi # 0xfef3 movl $0x22, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x954c(%rip), %rsi # 0xff16 movl $0x22, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9534(%rip), %rsi # 0xff39 movl $0x35, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x952f(%rip), %rsi # 0xff6f movl $0x35, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x952a(%rip), %rsi # 0xffa5 movl $0x35, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94f1(%rip), %rsi # 0xffdb movl $0x20, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x94a3(%rip), %rsi # 0xfffc movl $0x9, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9472(%rip), %rsi # 0x10006 movl $0x3a, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9472(%rip), %rsi # 0x10041 movl $0x9, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9441(%rip), %rsi # 0x1004b movl $0x33, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x943a(%rip), %rsi # 0x1007f movl $0x9, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x9409(%rip), %rsi # 0x10089 movl $0x3e, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 leaq 0x93e6(%rip), %rsi # 0x100c8 movl $0xf, %edx movq %rbx, %rdi callq 0x42f0 leaq 0x93e2(%rip), %rsi # 0x100d8 movl $0x3, %edx movq %rbx, %rdi callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi callq 0x41e0 movq (%rbx), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x42b0 movsbl %al, %esi movq %rbx, %rdi callq 0x4030 movq %rax, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x41e0
/sp-nitech[P]SPTK/src/main/sopr.cc
sptk::ScalarOperation::~ScalarOperation()
virtual ~ScalarOperation() { for (std::vector<ScalarOperation::ModuleInterface*>::iterator itr( modules_.begin()); itr != modules_.end(); ++itr) { delete (*itr); } }
pushq %r14 pushq %rbx pushq %rax leaq 0xf6bd(%rip), %rax # 0x16420 movq %rax, (%rdi) movq 0x10(%rdi), %rbx movq 0x18(%rdi), %rax cmpq %rax, %rbx je 0x6d95 movq %rdi, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x6d88 movq (%rdi), %rax callq *0x8(%rax) movq 0x18(%r14), %rax addq $0x8, %rbx cmpq %rax, %rbx jne 0x6d76 movq 0x10(%r14), %rbx testq %rbx, %rbx je 0x6da9 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x4290 addq $0x8, %rsp popq %rbx popq %r14 retq nop
/sp-nitech[P]SPTK/include/SPTK/math/scalar_operation.h
ya_getopt_internal(int, char* const*, char const*, option const*, int*, int)
static int ya_getopt_internal(int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex, int long_only) { static int start, end; if (ya_optopt == '?') { ya_optopt = 0; } if (posixly_correct == -1) { check_gnu_extension(optstring); } if (ya_optind == 0) { check_gnu_extension(optstring); ya_optind = 1; ya_optnext = NULL; } switch (optstring[0]) { case '+': case '-': optstring++; } if (ya_optnext == NULL && start != 0) { int last_pos = ya_optind - 1; ya_optind -= end - start; if (ya_optind <= 0) { ya_optind = 1; } while (start < end--) { int i; char *arg = argv[end]; for (i = end; i < last_pos; i++) { ((char **)argv)[i] = argv[i + 1]; } ((char const **)argv)[i] = arg; last_pos--; } start = 0; } if (ya_optind >= argc) { ya_optarg = NULL; return -1; } if (ya_optnext == NULL) { const char *arg = argv[ya_optind]; if (!is_option(arg)) { if (handle_nonopt_argv) { ya_optarg = argv[ya_optind++]; start = 0; return 1; } else if (posixly_correct) { ya_optarg = NULL; return -1; } else { int i; start = ya_optind; for (i = ya_optind + 1; i < argc; i++) { if (is_option(argv[i])) { end = i; break; } } if (i == argc) { ya_optarg = NULL; return -1; } ya_optind = i; arg = argv[ya_optind]; } } if (strcmp(arg, "--") == 0) { ya_optind++; return -1; } if (longopts != NULL && arg[1] == '-') { return ya_getopt_longopts(argc, argv, argv[ya_optind] + 2, optstring, longopts, longindex, NULL); } } if (ya_optnext == NULL) { ya_optnext = argv[ya_optind] + 1; } if (long_only) { int long_only_flag = 0; int rv = ya_getopt_longopts(argc, argv, ya_optnext, optstring, longopts, longindex, &long_only_flag); if (!long_only_flag) { ya_optnext = NULL; return rv; } } return ya_getopt_shortopts(argc, argv, optstring, long_only); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r10 movq %rcx, %r8 movq %rdx, %rbx movq %rsi, %r14 movl %edi, 0x14(%rsp) cmpl $0x3f, 0x103f5(%rip) # 0x17280 jne 0x6e97 movl $0x0, 0x103e9(%rip) # 0x17280 movl 0x103e7(%rip), %esi # 0x17284 movb (%rbx), %r12b cmpl $-0x1, %esi jne 0x6ee8 movl $0x1, %esi cmpb $0x2b, %r12b je 0x6ed7 leaq 0x926b(%rip), %rdi # 0x10122 movq %r8, %r15 movl %r9d, %r13d movq %r10, %rbp callq 0x4300 movq %rbp, %r10 movl %r13d, %r9d movq %r15, %r8 xorl %esi, %esi testq %rax, %rax setne %sil movl %esi, 0x103a7(%rip) # 0x17284 cmpb $0x2d, %r12b sete 0x103c0(%rip) # 0x172a8 movl 0x10389(%rip), %r15d # 0x17278 testl %r15d, %r15d jne 0x6f5f movl $0x1, %r15d movl $0x1, %esi cmpb $0x2b, %r12b je 0x6f36 leaq 0x9216(%rip), %rdi # 0x10122 movq %r8, %r13 movq %rbx, 0x18(%rsp) movl %r9d, %ebp movq %r10, %rbx callq 0x4300 movq %rbx, %r10 movl %ebp, %r9d movq 0x18(%rsp), %rbx movq %r13, %r8 xorl %esi, %esi testq %rax, %rax setne %sil cmpb $0x2d, %r12b sete 0x10367(%rip) # 0x172a8 movl %esi, 0x1033d(%rip) # 0x17284 movl $0x1, 0x10327(%rip) # 0x17278 movq $0x0, 0x10344(%rip) # 0x172a0 movb (%rbx), %r12b cmpb $0x2d, %r12b je 0x6f6e movzbl %r12b, %eax cmpl $0x2b, %eax jne 0x6f71 incq %rbx movq 0x10328(%rip), %rdx # 0x172a0 testq %rdx, %rdx sete %al movl 0x10314(%rip), %edi # 0x17298 testl %edi, %edi setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x702a movq %r10, 0x18(%rsp) movslq 0x102fc(%rip), %r13 # 0x1729c leal (%r15,%rdi), %eax subl %r13d, %eax cmpl $0x2, %eax movl $0x1, %ecx cmovgel %eax, %ecx movl %ecx, 0x102c0(%rip) # 0x17278 cmpl %r13d, %edi jge 0x702f movl %r9d, 0x24(%rsp) movq %r8, 0x28(%rsp) movslq %edi, %rdi leaq -0x1(%r13), %r9 leal -0x1(%r15), %eax movslq %eax, %r8 leaq 0x1(%r8), %r10 movq %r14, %r11 decl %r15d movq (%r14,%r9,8), %r12 movslq %r15d, %rbp movq %r9, %rax cmpq %rbp, %r9 jge 0x7005 movq %r13, %rax movq (%r11,%rax,8), %rbp movq %rbp, -0x8(%r11,%rax,8) incq %rax cmpq %rax, %r10 jne 0x6ff1 movq %r8, %rax cltq movq %r12, (%r14,%rax,8) leaq -0x1(%r9), %r12 decq %r8 addq $-0x8, %r11 cmpq %rdi, %r9 movq %r12, %r9 jg 0x6fdc movq 0x28(%rsp), %r8 movl 0x24(%rsp), %r9d jmp 0x7033 movl %r15d, %ecx jmp 0x7049 leal -0x1(%r13), %r12d movl %r12d, 0x10262(%rip) # 0x1729c movl $0x0, 0x10254(%rip) # 0x17298 movq 0x18(%rsp), %r10 cmpl 0x14(%rsp), %ecx jge 0x7157 testq %rdx, %rdx je 0x70a6 testl %r9d, %r9d je 0x70fe leaq 0x34(%rsp), %r15 movl $0x0, (%r15) movq %r15, (%rsp) movl 0x14(%rsp), %edi movq %r14, %rsi movq %rbx, %rcx movq %r10, %r9 callq 0x720e cmpl $0x0, (%r15) je 0x7146 movl 0x14(%rsp), %edi movq %r14, %rsi movq %rbx, %rdx movl $0x1, %ecx callq 0x73e5 jmp 0x7167 movslq %ecx, %rax movq (%r14,%rax,8), %rax cmpb $0x2d, (%rax) jne 0x711d cmpb $0x0, 0x1(%rax) je 0x711d cmpb $0x2d, 0x1(%rax) jne 0x70c8 cmpb $0x0, 0x2(%rax) je 0x71c6 testq %r8, %r8 je 0x7176 cmpb $0x2d, 0x1(%rax) jne 0x7176 addq $0x2, %rax movq $0x0, (%rsp) movl 0x14(%rsp), %edi movq %r14, %rsi movq %rax, %rdx movq %rbx, %rcx movq %r10, %r9 callq 0x720e jmp 0x7167 movl 0x14(%rsp), %edi movq %r14, %rsi movq %rbx, %rdx xorl %ecx, %ecx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x73e5 cmpb $0x1, 0x10184(%rip) # 0x172a8 jne 0x7153 incl %ecx movl %ecx, 0x1014a(%rip) # 0x17278 movq %rax, 0x1015b(%rip) # 0x17290 movl $0x0, 0x10159(%rip) # 0x17298 movl $0x1, %eax jmp 0x7167 movq $0x0, 0x1014f(%rip) # 0x172a0 jmp 0x7167 testl %esi, %esi je 0x7195 movq $0x0, 0x1012e(%rip) # 0x17290 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testq %rdx, %rdx jne 0x7058 movslq %ecx, %rax movq (%r14,%rax,8), %rdx incq %rdx movq %rdx, 0x10110(%rip) # 0x172a0 jmp 0x7058 movl %ecx, 0x100fd(%rip) # 0x17298 incl %ecx cmpl 0x14(%rsp), %ecx jge 0x71d6 movslq %ecx, %rax leaq (%r14,%rax,8), %rax movq (%rax), %rsi cmpb $0x2d, (%rsi) jne 0x71b8 cmpb $0x0, 0x1(%rsi) jne 0x71d0 incl %ecx addq $0x8, %rax cmpl %ecx, 0x14(%rsp) jne 0x71aa jmp 0x7157 incl %ecx movl %ecx, 0x100aa(%rip) # 0x17278 jmp 0x7162 movl %ecx, 0x100c6(%rip) # 0x1729c cmpl 0x14(%rsp), %ecx je 0x7157 movl %ecx, 0x10092(%rip) # 0x17278 movslq %ecx, %rax movq (%r14,%rax,8), %rax cmpb $0x2d, (%rax) je 0x70b8 jmp 0x70c8
/sp-nitech[P]SPTK/third_party/GETOPT/ya_getopt.cc
ya_getopt_longopts(int, char* const*, char*, char const*, option const*, int*, int*)
static int ya_getopt_longopts(int argc, char * const argv[], char *arg, const char *optstring, const struct option *longopts, int *longindex, int *long_only_flag) { char *val = NULL; const struct option *opt; size_t namelen; int idx; for (idx = 0; longopts[idx].name != NULL; idx++) { opt = &longopts[idx]; namelen = strlen(opt->name); if (strncmp(arg, opt->name, namelen) == 0) { switch (arg[namelen]) { case '\0': switch (opt->has_arg) { case ya_required_argument: ya_optind++; if (ya_optind == argc) { ya_optarg = NULL; ya_optopt = opt->val; ya_getopt_error(optstring, "%s: option '--%s' requires an argument\n", argv[0], opt->name); if (optstring[0] == ':') { return ':'; } else { return '?'; } } val = argv[ya_optind]; break; } goto found; case '=': if (opt->has_arg == ya_no_argument) { const char *hyphens = (argv[ya_optind][1] == '-') ? "--" : "-"; ya_optind++; ya_optarg = NULL; ya_optopt = opt->val; ya_getopt_error(optstring, "%s: option '%s%s' doesn't allow an argument\n", argv[0], hyphens, opt->name); return '?'; } val = arg + namelen + 1; goto found; } } } if (long_only_flag) { *long_only_flag = 1; } else { ya_getopt_error(optstring, "%s: unrecognized option '%s'\n", argv[0], argv[ya_optind]); ya_optind++; } return '?'; found: ya_optarg = val; ya_optind++; if (opt->flag) { *opt->flag = opt->val; } if (longindex) { *longindex = idx; } return opt->flag ? 0 : opt->val; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, 0x10(%rsp) movq %rcx, (%rsp) movq %rsi, %r12 movl %edi, 0xc(%rsp) movq (%r8), %r14 testq %r14, %r14 je 0x727e movq %r8, %rbx movq %rdx, %r13 addq $0x20, %rbx xorl %ebp, %ebp movq %r14, %rdi callq 0x4130 movq %rax, %r15 movq %r13, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x4140 testl %eax, %eax jne 0x7270 movzbl (%r13,%r15), %eax cmpl $0x3d, %eax je 0x732b testl %eax, %eax je 0x72cb movq (%rbx), %r14 addq $0x20, %rbx incl %ebp testq %r14, %r14 jne 0x7240 movq 0x50(%rsp), %rax testq %rax, %rax je 0x7290 movl $0x1, (%rax) jmp 0x72b7 movq (%r12), %rdx movslq 0xffdd(%rip), %rax # 0x17278 movq (%r12,%rax,8), %rcx leaq 0x8ee1(%rip), %rsi # 0x10187 movq (%rsp), %rdi xorl %eax, %eax callq 0x7591 incl 0xffc1(%rip) # 0x17278 movl $0x3f, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x1, -0x18(%rbx) movl 0xffa3(%rip), %eax # 0x17278 jne 0x7340 leal 0x1(%rax), %edx movl %edx, 0xff98(%rip) # 0x17278 cmpl 0xc(%rsp), %edx jne 0x73a0 movq $0x0, 0xff9b(%rip) # 0x17290 movl -0x8(%rbx), %eax movl %eax, 0xff82(%rip) # 0x17280 movq (%r12), %rdx movq -0x20(%rbx), %rcx leaq 0x8e25(%rip), %rsi # 0x10132 movq (%rsp), %rbx movq %rbx, %rdi xorl %eax, %eax callq 0x7591 xorl %eax, %eax cmpb $0x3a, (%rbx) setne %al leal (%rax,%rax,4), %eax addl $0x3a, %eax jmp 0x72bc cmpl $0x0, -0x18(%rbx) je 0x7344 leaq (%r15,%r13), %rcx incq %rcx movl 0xff3a(%rip), %eax # 0x17278 jmp 0x73a9 xorl %ecx, %ecx jmp 0x73a9 movslq 0xff2d(%rip), %rax # 0x17278 movq (%r12,%rax,8), %rcx cmpb $0x2d, 0x1(%rcx) leaq 0x8dc5(%rip), %rdx # 0x1011f leaq 0x7f16(%rip), %rcx # 0xf277 cmoveq %rdx, %rcx incl %eax movl %eax, 0xff0b(%rip) # 0x17278 movq $0x0, 0xff18(%rip) # 0x17290 movl -0x8(%rbx), %eax movl %eax, 0xfeff(%rip) # 0x17280 movq (%r12), %rdx movq -0x20(%rbx), %r8 leaq 0x8dca(%rip), %rsi # 0x1015a movq (%rsp), %rdi xorl %eax, %eax callq 0x7591 jmp 0x72b7 cltq movq 0x8(%r12,%rax,8), %rcx movl %edx, %eax movq %rcx, 0xfee0(%rip) # 0x17290 incl %eax movl %eax, 0xfec0(%rip) # 0x17278 movq -0x10(%rbx), %rcx testq %rcx, %rcx je 0x73c6 movl -0x8(%rbx), %eax movl %eax, (%rcx) movq 0x10(%rsp), %rax testq %rax, %rax je 0x73d2 movl %ebp, (%rax) xorl %eax, %eax testq %rcx, %rcx jne 0x72bc movl -0x8(%rbx), %eax jmp 0x72bc
/sp-nitech[P]SPTK/third_party/GETOPT/ya_getopt.cc
sptk::ScalarOperation::AddModuloOperation(double)
bool ScalarOperation::AddModuloOperation(double divisor) { if (0 == divisor) return false; modules_.push_back(new OperationPerformer(new Modulo(divisor))); return true; }
pushq %r14 pushq %rbx subq $0x18, %rsp xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x78bf jnp 0x7936 movq %rdi, %rbx movsd %xmm0, 0x8(%rsp) movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x10, %edi callq 0x42c0 leaq 0xecba(%rip), %rcx # 0x165a0 movq %rcx, (%rax) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x8(%rax) leaq 0xeba5(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, 0x10(%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x791b movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7932 addq $0x10, %rbx leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x8bd0 movsd 0x8(%rsp), %xmm0 xorpd %xmm1, %xmm1 cmpneqsd %xmm1, %xmm0 movq %xmm0, %rax andl $0x1, %eax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddLowerBoundingOperation(double)
bool ScalarOperation::AddLowerBoundingOperation(double lower_bound) { modules_.push_back(new OperationPerformer(new LowerBounding(lower_bound))); return true; }
pushq %r14 pushq %rbx subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x10, %edi callq 0x42c0 leaq 0xec02(%rip), %rcx # 0x16620 movq %rcx, (%rax) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x8(%rax) leaq 0xea6d(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, 0x10(%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x7a53 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7a64 addq $0x10, %rbx leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460 nop
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddAbsoluteOperation()
bool ScalarOperation::AddAbsoluteOperation() { modules_.push_back(new OperationPerformer(new Absolute())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xeb67(%rip), %rcx # 0x166a0 movq %rcx, (%rax) leaq 0xe95d(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x7b62 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7b71 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddReciprocalOperation()
bool ScalarOperation::AddReciprocalOperation() { modules_.push_back(new OperationPerformer(new Reciprocal())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xeb2d(%rip), %rcx # 0x166e0 movq %rcx, (%rax) leaq 0xe8e3(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x7bdc movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7beb addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddSquareRootOperation()
bool ScalarOperation::AddSquareRootOperation() { modules_.push_back(new OperationPerformer(new SquareRoot())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xeab9(%rip), %rcx # 0x16760 movq %rcx, (%rax) leaq 0xe7ef(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x7cd0 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7cdf addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddLogarithmOperation(double)
bool ScalarOperation::AddLogarithmOperation(double base) { if (base <= 0.0) return false; modules_.push_back(new OperationPerformer(new Logarithm(base))); return true; }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp xorpd %xmm1, %xmm1 ucomisd %xmm0, %xmm1 jae 0x7e16 movq %rdi, %rbx movsd %xmm0, (%rsp) movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x10, %edi callq 0x42c0 movq %rax, %r15 leaq 0xea2a(%rip), %rax # 0x167e0 movq %rax, (%r15) movsd (%rsp), %xmm0 callq 0x4240 movsd 0x8445(%rip), %xmm1 # 0x10210 divsd %xmm0, %xmm1 movsd %xmm1, 0x8(%r15) leaq 0xe6c4(%rip), %rax # 0x164a0 movq %rax, (%r14) movq %r15, 0x8(%r14) movq %r14, 0x8(%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x7dfc movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7e0d addq $0x10, %rbx leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x8bd0 movsd (%rsp), %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm0, %xmm1 setb %al addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddNaturalExponentialOperation()
bool ScalarOperation::AddNaturalExponentialOperation() { modules_.push_back(new OperationPerformer(new NaturalExponential())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe9c1(%rip), %rcx # 0x16820 movq %rcx, (%rax) leaq 0xe637(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x7e88 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x7e97 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddCeilingOperation()
bool ScalarOperation::AddCeilingOperation() { modules_.push_back(new OperationPerformer(new Ceiling())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe8fb(%rip), %rcx # 0x168e0 movq %rcx, (%rax) leaq 0xe4b1(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x800e movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x801d addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddRoundingOperation()
bool ScalarOperation::AddRoundingOperation() { modules_.push_back(new OperationPerformer(new Rounding())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe8c1(%rip), %rcx # 0x16920 movq %rcx, (%rax) leaq 0xe437(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x8088 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x8097 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddRoundingUpOperation()
bool ScalarOperation::AddRoundingUpOperation() { modules_.push_back(new OperationPerformer(new RoundingUp())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe887(%rip), %rcx # 0x16960 movq %rcx, (%rax) leaq 0xe3bd(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x8102 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x8111 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddRoundingDownOperation()
bool ScalarOperation::AddRoundingDownOperation() { modules_.push_back(new OperationPerformer(new RoundingDown())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe84d(%rip), %rcx # 0x169a0 movq %rcx, (%rax) leaq 0xe343(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x817c movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x818b addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddUnitStepOperation()
bool ScalarOperation::AddUnitStepOperation() { modules_.push_back(new OperationPerformer(new UnitStep())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe813(%rip), %rcx # 0x169e0 movq %rcx, (%rax) leaq 0xe2c9(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x81f6 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x8205 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddSignOperation()
bool ScalarOperation::AddSignOperation() { modules_.push_back(new OperationPerformer(new Sign())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe7d9(%rip), %rcx # 0x16a20 movq %rcx, (%rax) leaq 0xe24f(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x8270 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x827f addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddSineOperation()
bool ScalarOperation::AddSineOperation() { modules_.push_back(new OperationPerformer(new Sine())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe79f(%rip), %rcx # 0x16a60 movq %rcx, (%rax) leaq 0xe1d5(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x82ea movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x82f9 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddCosineOperation()
bool ScalarOperation::AddCosineOperation() { modules_.push_back(new OperationPerformer(new Cosine())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe765(%rip), %rcx # 0x16aa0 movq %rcx, (%rax) leaq 0xe15b(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x8364 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x8373 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddTangentOperation()
bool ScalarOperation::AddTangentOperation() { modules_.push_back(new OperationPerformer(new Tangent())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe72b(%rip), %rcx # 0x16ae0 movq %rcx, (%rax) leaq 0xe0e1(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x83de movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x83ed addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddArcsineOperation()
bool ScalarOperation::AddArcsineOperation() { modules_.push_back(new OperationPerformer(new Arcsine())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe6f1(%rip), %rcx # 0x16b20 movq %rcx, (%rax) leaq 0xe067(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x8458 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x8467 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddArccosineOperation()
bool ScalarOperation::AddArccosineOperation() { modules_.push_back(new OperationPerformer(new Arccosine())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe6b7(%rip), %rcx # 0x16b60 movq %rcx, (%rax) leaq 0xdfed(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x84d2 movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x84e1 addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddArctangentOperation()
bool ScalarOperation::AddArctangentOperation() { modules_.push_back(new OperationPerformer(new Arctangent())); return true; }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl $0x10, %edi callq 0x42c0 movq %rax, %r14 movl $0x8, %edi callq 0x42c0 leaq 0xe67d(%rip), %rcx # 0x16ba0 movq %rcx, (%rax) leaq 0xdf73(%rip), %rcx # 0x164a0 movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rsp) movq 0x18(%rbx), %rsi cmpq 0x20(%rbx), %rsi je 0x854c movq %r14, (%rsi) addq $0x8, 0x18(%rbx) jmp 0x855b addq $0x10, %rbx movq %rsp, %rdx movq %rbx, %rdi callq 0x8bd0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq %r14, %rdi callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::AddMagicNumberReplacer(double)
bool ScalarOperation::AddMagicNumberReplacer(double replacement_number) { if (!use_magic_number_) return false; modules_.push_back(new MagicNumberReplacer(replacement_number)); use_magic_number_ = false; return true; }
pushq %r14 pushq %rbx subq $0x18, %rsp movb 0x8(%rdi), %bl cmpb $0x1, %bl jne 0x873f movq %rdi, %r14 movl $0x10, %edi movsd %xmm0, 0x8(%rsp) callq 0x42c0 leaq 0xe59b(%rip), %rcx # 0x16ca0 movq %rcx, (%rax) movsd 0x8(%rsp), %xmm0 movsd %xmm0, 0x8(%rax) movq %rax, 0x10(%rsp) movq 0x18(%r14), %rsi cmpq 0x20(%r14), %rsi je 0x872c movq %rax, (%rsi) addq $0x8, 0x18(%r14) jmp 0x873a leaq 0x10(%r14), %rdi leaq 0x10(%rsp), %rdx callq 0x8bd0 movb $0x0, 0x8(%r14) movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r14 retq nop
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ScalarOperation::Run(double*, bool*) const
bool ScalarOperation::Run(double* number, bool* is_magic_number) const { if (NULL == number || NULL == is_magic_number) { return false; } *is_magic_number = false; for (std::vector<ScalarOperation::ModuleInterface*>::const_iterator itr( modules_.begin()); itr != modules_.end(); ++itr) { if (!(*itr)->Run(number, is_magic_number)) { return false; } } return true; }
testq %rsi, %rsi sete %al testq %rdx, %rdx sete %cl orb %al, %cl je 0x875d xorl %eax, %eax retq pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r15 movb $0x0, (%rdx) movq 0x10(%rdi), %r12 cmpq 0x18(%rdi), %r12 je 0x87a4 movq %rsi, %r14 addq $0x8, %r12 movq -0x8(%r12), %rdi movq (%rdi), %rax movq %r14, %rsi movq %rbx, %rdx callq *0x10(%rax) testb %al, %al je 0x87a6 leaq 0x8(%r12), %rcx cmpq 0x18(%r15), %r12 movq %rcx, %r12 jne 0x877f jmp 0x87a6 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/sp-nitech[P]SPTK/src/math/scalar_operation.cc
sptk::ReadStream(sptk::Matrix*, std::istream*)
bool ReadStream(sptk::Matrix* matrix_to_read, std::istream* input_stream) { if (NULL == matrix_to_read || 0 == matrix_to_read->GetNumRow() || 0 == matrix_to_read->GetNumColumn() || NULL == input_stream || input_stream->eof()) { return false; } const int type_byte(sizeof((*matrix_to_read)[0][0])); const int num_read_bytes(type_byte * matrix_to_read->GetNumRow() * matrix_to_read->GetNumColumn()); input_stream->read(reinterpret_cast<char*>(&((*matrix_to_read)[0][0])), num_read_bytes); return (num_read_bytes == input_stream->gcount()) ? !input_stream->fail() : false; }
testq %rdi, %rdi je 0x8d6f movl 0x8(%rdi), %eax testl %eax, %eax je 0x8d6f pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movl 0xc(%rdi), %ecx testl %ecx, %ecx sete %dl testq %rsi, %rsi sete %sil orb %dl, %sil jne 0x8d72 movq (%rbx), %rdx movq -0x18(%rdx), %rdx testb $0x2, 0x20(%rbx,%rdx) jne 0x8d72 imull %ecx, %eax shll $0x3, %eax movq 0x28(%rdi), %rcx movq (%rcx), %rsi movslq %eax, %r14 movq %rbx, %rdi movq %r14, %rdx callq 0x4310 cmpq %r14, 0x8(%rbx) jne 0x8d72 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al jmp 0x8d74 xorl %eax, %eax retq xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::ReadStream(sptk::SymmetricMatrix*, std::istream*)
bool ReadStream(sptk::SymmetricMatrix* matrix_to_read, std::istream* input_stream) { if (NULL == matrix_to_read) { return false; } const int dim(matrix_to_read->GetNumDimension()); sptk::Matrix matrix(dim, dim); if (!sptk::ReadStream(&matrix, input_stream)) { return false; } for (int i(0); i < dim; ++i) { for (int j(0); j <= i; ++j) { (*matrix_to_read)[i][j] = matrix[i][j]; } } return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp testq %rdi, %rdi je 0x8e47 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdi), %r14d leaq 0x38(%rsp), %r12 movq %r12, %rdi movl %r14d, %esi movl %r14d, %edx callq 0xd624 movq %r12, %rdi movq %r15, %rsi callq 0x8d08 movq %r14, 0x10(%rsp) testl %r14d, %r14d setle %dl movl %eax, 0xc(%rsp) movl %eax, %ecx xorb $0x1, %cl orb %dl, %cl jne 0x8e37 movl $0x1, %r13d xorl %ebp, %ebp leaq 0xdf0e(%rip), %r14 # 0x16cf0 leaq 0x20(%rsp), %r15 xorl %r12d, %r12d movq 0x60(%rsp), %rax movq (%rax,%rbp,8), %rax movsd (%rax,%r12,8), %xmm0 movsd %xmm0, 0x18(%rsp) movq %r14, 0x20(%rsp) movq %rbx, 0x28(%rsp) movl %ebp, 0x30(%rsp) movq %r15, %rdi movl %r12d, %esi callq 0xe47c movsd 0x18(%rsp), %xmm0 movsd %xmm0, (%rax) incq %r12 cmpq %r12, %r13 jne 0x8dea incq %rbp incq %r13 cmpq 0x10(%rsp), %rbp jne 0x8de7 leaq 0x38(%rsp), %rdi callq 0xc3f4 movl 0xc(%rsp), %eax jmp 0x8e49 xorl %eax, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x8e5a movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0xc3f4 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::SnPrintf<sptk::int24_t>(sptk::int24_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, char*)
bool SnPrintf(int24_t data, const std::string& print_format, std::size_t buffer_size, char* buffer) { if (print_format.empty() || 0 == buffer_size || NULL == buffer) { return false; } return (std::snprintf(buffer, buffer_size, print_format.c_str(), static_cast<int>(data)) < 0) ? false : true; }
xorl %eax, %eax testq %rcx, %rcx je 0x908e testq %rdx, %rdx je 0x908e cmpq $0x0, 0x8(%rsi) je 0x908e pushq %rax movq (%rsi), %rax movzbl 0x2(%rdi), %esi movl %esi, %r8d shll $0x10, %r8d movzbl 0x1(%rdi), %r9d shll $0x8, %r9d movzbl (%rdi), %edi orl %r8d, %edi leal (%rdi,%r9), %r10d leal (%r9,%rdi), %r8d addl $0xff000000, %r8d # imm = 0xFF000000 testb %sil, %sil cmovnsl %r10d, %r8d movq %rcx, %rdi movq %rdx, %rsi movq %rax, %rdx movl %r8d, %ecx xorl %eax, %eax callq 0x43d0 testl %eax, %eax setns %al addq $0x8, %rsp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::ConvertStringToInteger(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int*)
bool ConvertStringToInteger(const std::string& input, int* output) { if (input.empty() || NULL == output) { return false; } char* end; int converted_value(static_cast<int>(std::strtol(input.c_str(), &end, 10))); if (0 == input.compare(end) || '\0' != *end || ERANGE == errno) { return false; } *output = converted_value; return true; }
xorl %eax, %eax testq %rsi, %rsi je 0x9149 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 cmpq $0x0, 0x8(%rdi) je 0x913e movq %rsi, %rbx movq (%r14), %rdi movq %rsp, %r12 movq %r12, %rsi movl $0xa, %edx callq 0x4370 movq %rax, %r15 movq (%r12), %r12 movq %r14, %rdi movq %r12, %rsi callq 0x40d0 testl %eax, %eax je 0x913c cmpb $0x0, (%r12) jne 0x913c callq 0x4040 cmpl $0x22, (%rax) jne 0x914a xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl %r15d, (%rbx) movb $0x1, %al jmp 0x913e
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::ConvertStringToDouble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double*)
bool ConvertStringToDouble(const std::string& input, double* output) { if (input.empty() || NULL == output) { return false; } char* end; double converted_value(std::strtod(input.c_str(), &end)); if (0 == input.compare(end) || '\0' != *end || ERANGE == errno) { return false; } *output = converted_value; return true; }
xorl %eax, %eax testq %rsi, %rsi je 0x91b0 pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 cmpq $0x0, 0x8(%rdi) je 0x91a7 movq %rsi, %rbx movq (%r14), %rdi leaq 0x8(%rsp), %r15 movq %r15, %rsi callq 0x4210 movsd %xmm0, (%rsp) movq (%r15), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x40d0 testl %eax, %eax je 0x91a5 cmpb $0x0, (%r15) jne 0x91a5 callq 0x4040 cmpl $0x22, (%rax) jne 0x91b1 xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movsd (%rsp), %xmm0 movsd %xmm0, (%rbx) movb $0x1, %al jmp 0x91a7
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::AddInLogSpace(double, double)
double AddInLogSpace(double log_x, double log_y) { if (log_x == log_y) return log_x + kLogTwo; const double smaller((log_x < log_y) ? log_x : log_y); const double greater((log_x < log_y) ? log_y : log_x); const double diff(smaller - greater); if (diff < kThresholdOfInformationLossInLogSpace) return greater; return greater + std::log1p(std::exp(diff)); }
ucomisd %xmm1, %xmm0 jne 0x95e0 jp 0x95e0 addsd 0x70d6(%rip), %xmm0 # 0x106b0 movapd %xmm0, %xmm2 jmp 0x9623 movapd %xmm1, %xmm2 movapd %xmm0, %xmm1 minsd %xmm2, %xmm1 maxsd %xmm0, %xmm2 subsd %xmm2, %xmm1 movsd 0x70ac(%rip), %xmm0 # 0x106a8 ucomisd %xmm1, %xmm0 ja 0x9623 pushq %rax movapd %xmm1, %xmm0 movsd %xmm2, (%rsp) callq 0x4480 callq 0x44b0 movsd (%rsp), %xmm2 addsd %xmm0, %xmm2 addq $0x8, %rsp movapd %xmm2, %xmm0 retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::PrintDataType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::ostream*)
void PrintDataType(const std::string& symbol, std::ostream* stream) { std::string data_type(""); std::size_t data_size(0); if ("c" == symbol) { data_type = "char"; data_size = sizeof(std::int8_t); } else if ("s" == symbol) { data_type = "short"; data_size = sizeof(std::int16_t); } else if ("h" == symbol) { data_type = "int"; data_size = sizeof(int24_t); } else if ("i" == symbol) { data_type = "int"; data_size = sizeof(std::int32_t); } else if ("l" == symbol) { data_type = "long"; data_size = sizeof(std::int64_t); } else if ("C" == symbol) { data_type = "unsigned char"; data_size = sizeof(std::uint8_t); } else if ("S" == symbol) { data_type = "unsigned short"; data_size = sizeof(std::uint16_t); } else if ("H" == symbol) { data_type = "unsigned int"; data_size = sizeof(uint24_t); } else if ("I" == symbol) { data_type = "unsigned int"; data_size = sizeof(std::uint32_t); } else if ("L" == symbol) { data_type = "unsigned long"; data_size = sizeof(std::uint64_t); } else if ("f" == symbol) { data_type = "float"; data_size = sizeof(float); } else if ("d" == symbol) { data_type = "double"; data_size = sizeof(double); } else if ("e" == symbol) { data_type = "long double"; data_size = sizeof(long double); } else if ("a" == symbol) { data_type = "ascii"; } std::ostringstream oss; oss << std::setw(2) << std::left << symbol; if (0 < data_size) { oss << "(" << data_type << ", " << data_size << "byte)"; } else { oss << "(" << data_type << ")"; } *stream << std::setw(27) << std::left << oss.str(); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c0, %rsp # imm = 0x1C0 movq %rsi, %rbx movq %rdi, %r14 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x6a58(%rip), %rdx # 0x101df leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x6dc4 leaq 0x59cc(%rip), %rsi # 0xf167 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x98ee leaq 0x5a48(%rip), %rsi # 0xf1fa movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9916 leaq 0x59b6(%rip), %rsi # 0xf17f movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x993b leaq 0x6f5c(%rip), %rsi # 0x1073c movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9963 leaq 0x598c(%rip), %rsi # 0xf183 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9988 leaq 0x595f(%rip), %rsi # 0xf16d movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b25 leaq 0x58c1(%rip), %rsi # 0xf0e6 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b3b leaq 0x5925(%rip), %rsi # 0xf161 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b51 leaq 0x6ec1(%rip), %rsi # 0x10714 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b6d leaq 0x58bb(%rip), %rsi # 0xf125 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b76 leaq 0x6ea3(%rip), %rsi # 0x10724 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b7f leaq 0x686c(%rip), %rsi # 0x10104 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9b95 leaq 0x5967(%rip), %rsi # 0xf216 movq %r14, %rdi callq 0x40d0 testl %eax, %eax je 0x9bab leaq 0x599a(%rip), %rsi # 0xf260 movq %r14, %rdi callq 0x40d0 testl %eax, %eax jne 0x98e3 leaq 0x6e5f(%rip), %rsi # 0x10738 leaq 0x8(%rsp), %rdi callq 0x4360 xorl %r13d, %r13d xorl %r15d, %r15d jmp 0x99ae leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x6df5(%rip), %rcx # 0x106f3 movl $0x4, %r8d xorl %esi, %esi callq 0x43b0 movl $0x1, %r15d jmp 0x99ab leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x6ddb(%rip), %rcx # 0x10701 movl $0x5, %r8d xorl %esi, %esi callq 0x43b0 movl $0x2, %r15d jmp 0x99ab movl $0x3, %r15d movb $0x1, %r13b leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x6dbc(%rip), %rcx # 0x10710 movl $0x3, %r8d xorl %esi, %esi callq 0x43b0 jmp 0x99ae leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x6d9d(%rip), %rcx # 0x10710 movl $0x3, %r8d xorl %esi, %esi callq 0x43b0 movl $0x4, %r15d jmp 0x99ab leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x6d87(%rip), %rcx # 0x1071f movl $0x4, %r8d xorl %esi, %esi callq 0x43b0 movl $0x8, %r15d movb $0x1, %r13b leaq 0x48(%rsp), %rdi callq 0x4350 leaq 0x48(%rsp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rcx movq $0x2, 0x58(%rsp,%rcx) movq -0x18(%rax), %rax movl $0xffffff4f, %ecx # imm = 0xFFFFFF4F andl 0x60(%rsp,%rax), %ecx orl $0x20, %ecx movl %ecx, 0x60(%rsp,%rax) movq (%r14), %rsi movq 0x8(%r14), %rdx callq 0x42f0 testb %r13b, %r13b je 0x9a4d leaq 0x6d45(%rip), %rsi # 0x1073e leaq 0x48(%rsp), %rdi movl $0x1, %edx callq 0x42f0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x48(%rsp), %rdi callq 0x42f0 movq %rax, %r14 leaq 0x6d1a(%rip), %rsi # 0x10740 movl $0x2, %edx movq %rax, %rdi callq 0x42f0 movq %r14, %rdi movq %r15, %rsi callq 0x41d0 movl $0x5, %r14d leaq 0x6cf8(%rip), %rsi # 0x10743 jmp 0x9a84 leaq 0x6cea(%rip), %rsi # 0x1073e leaq 0x48(%rsp), %rdi movl $0x1, %r14d movl $0x1, %edx callq 0x42f0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x48(%rsp), %rdi callq 0x42f0 leaq 0x6d9d(%rip), %rsi # 0x10821 movq %rax, %rdi movq %r14, %rdx callq 0x42f0 movq (%rbx), %rax movq -0x18(%rax), %rcx movq $0x1b, 0x10(%rbx,%rcx) movq -0x18(%rax), %rax movl $0xffffff4f, %ecx # imm = 0xFFFFFF4F andl 0x18(%rbx,%rax), %ecx orl $0x20, %ecx movl %ecx, 0x18(%rbx,%rax) leaq 0x50(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0x43c0 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq %rbx, %rdi callq 0x42f0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9ae7 callq 0x4290 movq 0xd4a2(%rip), %rsi # 0x16f90 leaq 0x48(%rsp), %rdi callq 0x4180 leaq 0xb8(%rsp), %rdi callq 0x40e0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9b14 callq 0x4290 addq $0x1c0, %rsp # imm = 0x1C0 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x6bbe(%rip), %rsi # 0x106ea leaq 0x8(%rsp), %rdi callq 0x4360 jmp 0x990b leaq 0x6bb6(%rip), %rsi # 0x106f8 leaq 0x8(%rsp), %rdi callq 0x4360 jmp 0x9933 leaq 0x6baf(%rip), %rsi # 0x10707 leaq 0x8(%rsp), %rdi callq 0x4360 movl $0x3, %r15d jmp 0x99ab leaq 0x6b93(%rip), %rsi # 0x10707 jmp 0x9b86 leaq 0x6b99(%rip), %rsi # 0x10716 jmp 0x9b9c leaq 0x6ba0(%rip), %rsi # 0x10726 leaq 0x8(%rsp), %rdi callq 0x4360 jmp 0x9980 leaq 0x6b95(%rip), %rsi # 0x10731 leaq 0x8(%rsp), %rdi callq 0x4360 jmp 0x99a5 leaq 0x6b7a(%rip), %rsi # 0x1072c leaq 0x8(%rsp), %rdi callq 0x4360 movl $0x10, %r15d jmp 0x99ab jmp 0x9be3 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9beb callq 0x4290 jmp 0x9beb jmp 0x9be8 movq %rax, %rbx jmp 0x9c09 movq %rax, %rbx movq 0xd39e(%rip), %rsi # 0x16f90 leaq 0x48(%rsp), %rdi callq 0x4180 leaq 0xb8(%rsp), %rdi callq 0x40e0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9c18 callq 0x4290 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::WriteStream<unsigned int>(int, int, std::vector<unsigned int, std::allocator<unsigned int>> const&, std::ostream*, int*)
bool WriteStream(int write_point, int write_size, const std::vector<T>& sequence_to_write, std::ostream* output_stream, int* actual_write_size) { if (write_point < 0 || write_size <= 0 || NULL == output_stream) { return false; } const int end(write_point + write_size); if (sequence_to_write.size() < static_cast<std::size_t>(end)) { return false; } const int before((NULL == actual_write_size) ? 0 : static_cast<int>(output_stream->tellp())); output_stream->write( reinterpret_cast<const char*>(&(sequence_to_write[0]) + write_point), sizeof(sequence_to_write[0]) * write_size); // When output_stream is cout, actual_write_size is always zero. if (NULL != actual_write_size) { const int after(static_cast<int>(output_stream->tellp())); const int type_byte(sizeof(sequence_to_write[0])); *actual_write_size = (after - before) / type_byte; } return !output_stream->fail(); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx testl %edi, %edi sets %al testl %esi, %esi setle %cl orb %al, %cl testq %rbx, %rbx sete %al orb %cl, %al jne 0xbe07 movq %rdx, %r12 movl %esi, %r15d movl %edi, %r13d leal (%r15,%r13), %ecx movq (%rdx), %rax movq 0x8(%rdx), %rdx subq %rax, %rdx sarq $0x2, %rdx cmpq %rcx, %rdx jae 0xbe0b xorl %eax, %eax jmp 0xbe77 movq %r8, %r14 testq %r8, %r8 je 0xbe52 movq %rbx, %rdi callq 0x4270 movq %rax, %rbp movl %r13d, %esi shlq $0x2, %rsi addq (%r12), %rsi movl %r15d, %edx shlq $0x2, %rdx movq %rbx, %rdi callq 0x4320 movq %rbx, %rdi callq 0x4270 subl %ebp, %eax leal 0x3(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx sarl $0x2, %ecx movl %ecx, (%r14) jmp 0xbe68 movl %r13d, %ecx leaq (%rax,%rcx,4), %rsi movl %r15d, %edx shlq $0x2, %rdx movq %rbx, %rdi callq 0x4320 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::WriteStream<double>(int, int, std::vector<double, std::allocator<double>> const&, std::ostream*, int*)
bool WriteStream(int write_point, int write_size, const std::vector<T>& sequence_to_write, std::ostream* output_stream, int* actual_write_size) { if (write_point < 0 || write_size <= 0 || NULL == output_stream) { return false; } const int end(write_point + write_size); if (sequence_to_write.size() < static_cast<std::size_t>(end)) { return false; } const int before((NULL == actual_write_size) ? 0 : static_cast<int>(output_stream->tellp())); output_stream->write( reinterpret_cast<const char*>(&(sequence_to_write[0]) + write_point), sizeof(sequence_to_write[0]) * write_size); // When output_stream is cout, actual_write_size is always zero. if (NULL != actual_write_size) { const int after(static_cast<int>(output_stream->tellp())); const int type_byte(sizeof(sequence_to_write[0])); *actual_write_size = (after - before) / type_byte; } return !output_stream->fail(); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx testl %edi, %edi sets %al testl %esi, %esi setle %cl orb %al, %cl testq %rbx, %rbx sete %al orb %cl, %al jne 0xc050 movq %rdx, %r12 movl %esi, %r15d movl %edi, %r13d leal (%r15,%r13), %ecx movq (%rdx), %rax movq 0x8(%rdx), %rdx subq %rax, %rdx sarq $0x3, %rdx cmpq %rcx, %rdx jae 0xc054 xorl %eax, %eax jmp 0xc0c0 movq %r8, %r14 testq %r8, %r8 je 0xc09b movq %rbx, %rdi callq 0x4270 movq %rax, %rbp movl %r13d, %esi shlq $0x3, %rsi addq (%r12), %rsi movl %r15d, %edx shlq $0x3, %rdx movq %rbx, %rdi callq 0x4320 movq %rbx, %rdi callq 0x4270 subl %ebp, %eax leal 0x7(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx sarl $0x3, %ecx movl %ecx, (%r14) jmp 0xc0b1 movl %r13d, %ecx leaq (%rax,%rcx,8), %rsi movl %r15d, %edx shlq $0x3, %rdx movq %rbx, %rdi callq 0x4320 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::WriteStream<long double>(int, int, std::vector<long double, std::allocator<long double>> const&, std::ostream*, int*)
bool WriteStream(int write_point, int write_size, const std::vector<T>& sequence_to_write, std::ostream* output_stream, int* actual_write_size) { if (write_point < 0 || write_size <= 0 || NULL == output_stream) { return false; } const int end(write_point + write_size); if (sequence_to_write.size() < static_cast<std::size_t>(end)) { return false; } const int before((NULL == actual_write_size) ? 0 : static_cast<int>(output_stream->tellp())); output_stream->write( reinterpret_cast<const char*>(&(sequence_to_write[0]) + write_point), sizeof(sequence_to_write[0]) * write_size); // When output_stream is cout, actual_write_size is always zero. if (NULL != actual_write_size) { const int after(static_cast<int>(output_stream->tellp())); const int type_byte(sizeof(sequence_to_write[0])); *actual_write_size = (after - before) / type_byte; } return !output_stream->fail(); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx testl %edi, %edi sets %al testl %esi, %esi setle %cl orb %al, %cl testq %rbx, %rbx sete %al orb %cl, %al jne 0xc113 movq %rdx, %r12 movl %esi, %r15d movl %edi, %r13d leal (%r15,%r13), %eax movq (%rdx), %rsi movq 0x8(%rdx), %rcx subq %rsi, %rcx sarq $0x4, %rcx cmpq %rax, %rcx jae 0xc117 xorl %eax, %eax jmp 0xc186 movq %r8, %r14 testq %r8, %r8 je 0xc15e movq %rbx, %rdi callq 0x4270 movq %rax, %rbp movl %r13d, %esi shlq $0x4, %rsi addq (%r12), %rsi movl %r15d, %edx shlq $0x4, %rdx movq %rbx, %rdi callq 0x4320 movq %rbx, %rdi callq 0x4270 subl %ebp, %eax leal 0xf(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx sarl $0x4, %ecx movl %ecx, (%r14) jmp 0xc177 movl %r13d, %eax shlq $0x4, %rax addq %rax, %rsi movl %r15d, %edx shlq $0x4, %rdx movq %rbx, %rdi callq 0x4320 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::Matrix::~Matrix()
virtual ~Matrix() { }
pushq %rbx movq %rdi, %rbx leaq 0xa921(%rip), %rax # 0x16d20 movq %rax, (%rdi) movq 0x28(%rdi), %rdi testq %rdi, %rdi je 0xc410 callq 0x4290 movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0xc41f popq %rbx jmp 0x4290 popq %rbx retq nop
/sp-nitech[P]SPTK/include/SPTK/math/matrix.h
sptk::Matrix::Matrix(int, int, std::vector<double, std::allocator<double>> const&)
Matrix::Matrix(int num_row, int num_column, const std::vector<double>& vector) : num_row_(num_row < 0 ? 0 : num_row), num_column_(num_column < 0 ? 0 : num_column), data_(vector), index_(num_row_) { for (int i(0); i < num_row_; ++i) { index_[i] = &data_[i * num_column_]; } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 leaq 0x963f(%rip), %rax # 0x16d20 movq %rax, (%rdi) xorl %eax, %eax testl %esi, %esi cmovlel %eax, %esi movl %esi, 0x8(%rdi) testl %edx, %edx cmovgl %edx, %eax movl %eax, 0xc(%rdi) leaq 0x10(%rdi), %rbx movq %rbx, %rdi movq %rcx, %rsi callq 0xe12c leaq 0x28(%r15), %r14 movslq 0x8(%r15), %rsi leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0xe1ac movslq 0x8(%r15), %rax testq %rax, %rax jle 0xd747 movslq 0xc(%r15), %rcx shlq $0x3, %rcx xorl %edx, %edx xorl %esi, %esi movq (%rbx), %rdi addq %rdx, %rdi movq (%r14), %r8 movq %rdi, (%r8,%rsi,8) incq %rsi addq %rcx, %rdx cmpq %rsi, %rax jne 0xd72f addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0xd761 callq 0x4290 movq %r14, %rdi callq 0x4460 nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::Resize(int, int)
void Matrix::Resize(int num_row, int num_column) { num_row_ = num_row < 0 ? 0 : num_row; num_column_ = num_column < 0 ? 0 : num_column; data_.resize(num_row_ * num_column_); index_.resize(num_row_); Fill(0.0); for (int i(0); i < num_row_; ++i) { index_[i] = &data_[i * num_column_]; } }
pushq %r15 pushq %r14 pushq %rbx xorl %eax, %eax testl %esi, %esi cmovlel %eax, %esi movq %rdi, %r15 testl %edx, %edx cmovgl %edx, %eax movl %esi, 0x8(%rdi) movl %eax, 0xc(%rdi) leaq 0x10(%rdi), %rbx imull %eax, %esi movq %rbx, %rdi callq 0xb2e6 leaq 0x28(%r15), %r14 movslq 0x8(%r15), %rsi movq %r14, %rdi callq 0xe0fa movq 0x10(%r15), %rdi movq 0x18(%r15), %rdx cmpq %rdx, %rdi je 0xd8c4 subq %rdi, %rdx addq $-0x8, %rdx andq $-0x8, %rdx addq $0x8, %rdx xorl %esi, %esi callq 0x4190 movslq 0x8(%r15), %rax testq %rax, %rax jle 0xd8f1 movslq 0xc(%r15), %rcx shlq $0x3, %rcx xorl %edx, %edx xorl %esi, %esi movq (%rbx), %rdi addq %rdx, %rdi movq (%r14), %r8 movq %rdi, (%r8,%rsi,8) incq %rsi addq %rcx, %rdx cmpq %rsi, %rax jne 0xd8d9 popq %rbx popq %r14 popq %r15 retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::At(int, int)
double& Matrix::At(int row, int column) { if (row < 0 || num_row_ <= row || column < 0 || num_column_ <= column) { throw std::out_of_range(kErrorMessageForOutOfRange); } return index_[row][column]; }
pushq %r14 pushq %rbx pushq %rax testl %esi, %esi js 0xd9d4 testl %edx, %edx js 0xd9d4 cmpl %esi, 0x8(%rdi) jle 0xd9d4 cmpl %edx, 0xc(%rdi) jle 0xd9d4 movl %esi, %ecx movq 0x28(%rdi), %rsi movl %edx, %eax shlq $0x3, %rax addq (%rsi,%rcx,8), %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x4150 movq %rax, %rbx leaq 0x2e6a(%rip), %rsi # 0x10852 movq %rax, %rdi callq 0x4070 movq 0x95c1(%rip), %rsi # 0x16fb8 movq 0x95b2(%rip), %rdx # 0x16fb0 movq %rbx, %rdi callq 0x4420 movq %rax, %r14 movq %rbx, %rdi callq 0x4200 movq %r14, %rdi callq 0x4460 nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::At(int, int) const
const double& Matrix::At(int row, int column) const { if (row < 0 || num_row_ <= row || column < 0 || num_column_ <= column) { throw std::out_of_range(kErrorMessageForOutOfRange); } return index_[row][column]; }
pushq %r14 pushq %rbx pushq %rax testl %esi, %esi js 0xda48 testl %edx, %edx js 0xda48 cmpl %esi, 0x8(%rdi) jle 0xda48 cmpl %edx, 0xc(%rdi) jle 0xda48 movl %esi, %ecx movq 0x28(%rdi), %rsi movl %edx, %eax shlq $0x3, %rax addq (%rsi,%rcx,8), %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x4150 movq %rax, %rbx leaq 0x2df6(%rip), %rsi # 0x10852 movq %rax, %rdi callq 0x4070 movq 0x954d(%rip), %rsi # 0x16fb8 movq 0x953e(%rip), %rdx # 0x16fb0 movq %rbx, %rdi callq 0x4420 movq %rax, %r14 movq %rbx, %rdi callq 0x4200 movq %r14, %rdi callq 0x4460 nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator+=(sptk::Matrix const&)
Matrix& Matrix::operator+=(const Matrix& matrix) { if (num_row_ != matrix.num_row_ || num_column_ != matrix.num_column_) { throw std::logic_error(kErrorMessageForLogicError); } std::transform(data_.begin(), data_.end(), matrix.data_.begin(), data_.begin(), std::plus<double>()); return *this; }
pushq %r14 pushq %rbx pushq %rax movl 0x8(%rdi), %eax cmpl 0x8(%rsi), %eax jne 0xdad7 movl 0xc(%rdi), %eax cmpl 0xc(%rsi), %eax jne 0xdad7 movq 0x10(%rdi), %rax movq 0x18(%rdi), %rcx cmpq %rcx, %rax je 0xdacc movq 0x10(%rsi), %rdx movsd (%rax), %xmm0 addsd (%rdx), %xmm0 movsd %xmm0, (%rax) addq $0x8, %rax addq $0x8, %rdx cmpq %rcx, %rax jne 0xdab3 movq %rdi, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x4150 movq %rax, %rbx leaq 0x2ce5(%rip), %rsi # 0x107d0 movq %rax, %rdi callq 0x4380 movq 0x94ce(%rip), %rsi # 0x16fc8 movq 0x9497(%rip), %rdx # 0x16f98 movq %rbx, %rdi callq 0x4420 movq %rax, %r14 movq %rbx, %rdi callq 0x4200 movq %r14, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator-=(sptk::Matrix const&)
Matrix& Matrix::operator-=(const Matrix& matrix) { if (num_row_ != matrix.num_row_ || num_column_ != matrix.num_column_) { throw std::logic_error(kErrorMessageForLogicError); } std::transform(data_.begin(), data_.end(), matrix.data_.begin(), data_.begin(), std::minus<double>()); return *this; }
pushq %r14 pushq %rbx pushq %rax movl 0x8(%rdi), %eax cmpl 0x8(%rsi), %eax jne 0xdb65 movl 0xc(%rdi), %eax cmpl 0xc(%rsi), %eax jne 0xdb65 movq 0x10(%rdi), %rax movq 0x18(%rdi), %rcx cmpq %rcx, %rax je 0xdb5a movq 0x10(%rsi), %rdx movsd (%rax), %xmm0 subsd (%rdx), %xmm0 movsd %xmm0, (%rax) addq $0x8, %rax addq $0x8, %rdx cmpq %rcx, %rax jne 0xdb41 movq %rdi, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x4150 movq %rax, %rbx leaq 0x2c57(%rip), %rsi # 0x107d0 movq %rax, %rdi callq 0x4380 movq 0x9440(%rip), %rsi # 0x16fc8 movq 0x9409(%rip), %rdx # 0x16f98 movq %rbx, %rdi callq 0x4420 movq %rax, %r14 movq %rbx, %rdi callq 0x4200 movq %r14, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator-() const
Matrix Matrix::operator-() const { Matrix result(*this); result.Negate(); return result; }
pushq %rbx movq %rdi, %rbx callq 0xd76a movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx cmpq %rcx, %rax je 0xddcc movaps 0x2a07(%rip), %xmm0 # 0x107c0 movsd (%rax), %xmm1 xorps %xmm0, %xmm1 movlps %xmm1, (%rax) addq $0x8, %rax cmpq %rcx, %rax jne 0xddb9 movq %rbx, %rax popq %rbx retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::FillDiagonal(double)
void Matrix::FillDiagonal(double value) { Fill(0.0); const int num_ones(std::min(num_row_, num_column_)); for (int i(0); i < num_ones; ++i) { index_[i][i] = value; } }
pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rdi movq 0x18(%rbx), %rdx cmpq %rdx, %rdi je 0xde31 subq %rdi, %rdx addq $-0x8, %rdx andq $-0x8, %rdx addq $0x8, %rdx xorl %esi, %esi movsd %xmm0, 0x8(%rsp) callq 0x4190 movsd 0x8(%rsp), %xmm0 movl 0x8(%rbx), %ecx movl 0xc(%rbx), %eax cmpl %ecx, %eax cmovll %eax, %ecx testl %ecx, %ecx jle 0xde59 movq 0x28(%rbx), %rax movl %ecx, %ecx xorl %edx, %edx movq (%rax,%rdx,8), %rsi movsd %xmm0, (%rsi,%rdx,8) incq %rdx cmpq %rdx, %rcx jne 0xde48 addq $0x10, %rsp popq %rbx retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::GetDeterminant(double*) const
bool Matrix::GetDeterminant(double* determinant) const { if (num_row_ != num_column_ || num_row_ <= 0 || NULL == determinant) { return false; } const int num_dimension(num_row_); if (1 == num_dimension) { *determinant = index_[0][0]; return true; } const int num_order(num_dimension - 1); Matrix submatrix(num_order, num_order); *determinant = 0.0; for (int i(0); i < num_dimension; ++i) { for (int row(0), offset(0); row < num_order; ++row) { if (i == row) { offset = 1; } for (int column(0); column < num_order; ++column) { submatrix[row][column] = index_[row + offset][column + 1]; } } double determinant_of_submatrix; if (!submatrix.GetDeterminant(&determinant_of_submatrix)) { return false; } *determinant += ((0 == i % 2) ? index_[i][0] : -index_[i][0]) * determinant_of_submatrix; } return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl 0x8(%rdi), %edx cmpl 0xc(%rdi), %edx jne 0xdfe2 movq %rsi, %rbx testl %edx, %edx setle %al testq %rsi, %rsi sete %cl orb %al, %cl je 0xdff9 xorl %ebp, %ebp andb $0x1, %bpl movl %ebp, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdi, %r14 cmpl $0x1, %edx jne 0xe015 movq 0x28(%r14), %rax movq (%rax), %rax movsd (%rax), %xmm0 movsd %xmm0, (%rbx) movb $0x1, %bpl jmp 0xdfe4 movq %rdx, 0x8(%rsp) leal -0x1(%rdx), %r15d leaq 0x18(%rsp), %rdi movl %r15d, %esi movl %r15d, %edx callq 0xd624 movq $0x0, (%rbx) xorl %r13d, %r13d movl $0x1, %r12d xorl %ebp, %ebp movq 0x28(%r14), %rax movq 0x40(%rsp), %rcx xorl %edx, %edx xorl %esi, %esi cmpq %rdx, %r13 cmovel %r12d, %esi leal (%rdx,%rsi), %edi movslq %edi, %rdi movq (%rax,%rdi,8), %rdi movq (%rcx,%rdx,8), %r8 xorl %r9d, %r9d movsd 0x8(%rdi,%r9,8), %xmm0 movsd %xmm0, (%r8,%r9,8) leaq 0x1(%r9), %r10 movq %r10, %r9 cmpq %r10, %r15 jne 0xe065 incq %rdx cmpq %r15, %rdx jne 0xe04d leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xdfba testb %al, %al je 0xe0d6 movq 0x28(%r14), %rax movq (%rax,%r13,8), %rax movsd (%rax), %xmm0 testb $0x1, %r13b je 0xe0b3 xorpd 0x270d(%rip), %xmm0 # 0x107c0 mulsd 0x10(%rsp), %xmm0 addsd (%rbx), %xmm0 movsd %xmm0, (%rbx) incq %r13 cmpq 0x8(%rsp), %r13 setae %bpl jne 0xe040 movb $0x1, %bpl leaq 0x18(%rsp), %rdi callq 0xc3f4 jmp 0xdfe4 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0xc3f4 movq %rbx, %rdi callq 0x4460
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::SymmetricMatrix::SymmetricMatrix(int)
SymmetricMatrix::SymmetricMatrix(int num_dimension) : num_dimension_(num_dimension < 0 ? 0 : num_dimension) { data_.resize(num_dimension_ * (num_dimension_ + 1) / 2); index_.resize(num_dimension_); for (int i(0), j(0); i < num_dimension_; ++i, j += i) { index_[i] = &data_[j]; } }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r15 leaq 0x887d(%rip), %rax # 0x16d50 movq %rax, (%rdi) xorl %eax, %eax testl %esi, %esi cmovlel %eax, %esi movl %esi, 0x8(%rdi) leaq 0x10(%rdi), %rbx leaq 0x28(%rdi), %r14 leal 0x1(%rsi), %eax imull %eax, %esi shrl %esi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x30(%rdi) movq %rbx, %rdi callq 0xb2e6 movslq 0x8(%r15), %rsi movq %r14, %rdi callq 0xe0fa movslq 0x8(%r15), %rax testq %rax, %rax jle 0xe53a xorl %ecx, %ecx xorl %edx, %edx movl %edx, %esi shlq $0x3, %rsi addq (%rbx), %rsi movq (%r14), %rdi movq %rsi, (%rdi,%rcx,8) incq %rcx addl %ecx, %edx cmpq %rcx, %rax jne 0xe520 popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 movq (%r14), %rdi testq %rdi, %rdi je 0xe550 callq 0x4290 movq (%rbx), %rdi testq %rdi, %rdi je 0xe55d callq 0x4290 movq %r15, %rdi callq 0x4460 nop
/sp-nitech[P]SPTK/src/math/symmetric_matrix.cc
glfwCreateStandardCursor
GLFWAPI GLFWcursor* glfwCreateStandardCursor(int shape) { _GLFWcursor* cursor; _GLFW_REQUIRE_INIT_OR_RETURN(NULL); if (shape != GLFW_ARROW_CURSOR && shape != GLFW_IBEAM_CURSOR && shape != GLFW_CROSSHAIR_CURSOR && shape != GLFW_HAND_CURSOR && shape != GLFW_HRESIZE_CURSOR && shape != GLFW_VRESIZE_CURSOR) { _glfwInputError(GLFW_INVALID_ENUM, "Invalid standard cursor 0x%08X", shape); return NULL; } cursor = calloc(1, sizeof(_GLFWcursor)); cursor->next = _glfw.cursorListHead; _glfw.cursorListHead = cursor; if (!_glfwPlatformCreateStandardCursor(cursor, shape)) { glfwDestroyCursor((GLFWcursor*) cursor); return NULL; } return (GLFWcursor*) cursor; }
pushq %r15 pushq %r14 pushq %rbx leaq 0x3a8f0(%rip), %r15 # 0x538b8 cmpl $0x0, (%r15) je 0x18ff7 movl %edi, %r14d leal -0x36007(%r14), %eax cmpl $-0x7, %eax ja 0x19009 leaq 0x2d9b6(%rip), %rsi # 0x4699a xorl %ebx, %ebx movl $0x10003, %edi # imm = 0x10003 movl %r14d, %edx xorl %eax, %eax callq 0x17e61 jmp 0x19045 xorl %ebx, %ebx movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax callq 0x17e61 jmp 0x19045 movl $0x1, %edi movl $0x10, %esi callq 0x13790 movq %rax, %rbx movq 0x3e8(%r15), %rax movq %rax, (%rbx) movq %rbx, 0x3e8(%r15) movq %rbx, %rdi movl %r14d, %esi callq 0x23f1a testl %eax, %eax jne 0x19045 movq %rbx, %rdi callq 0x18f32 xorl %ebx, %ebx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
/anael-seghezzi[P]glfw/src/input.c
glfwShowWindow
GLFWAPI void glfwShowWindow(GLFWwindow* handle) { _GLFWwindow* window = (_GLFWwindow*) handle; assert(window != NULL); _GLFW_REQUIRE_INIT(); if (window->monitor) return; _glfwPlatformShowWindow(window); if (window->focusOnShow) _glfwPlatformFocusWindow(window); }
pushq %rbx testq %rdi, %rdi je 0x1c8c8 leaq 0x37027(%rip), %rax # 0x538b8 cmpl $0x0, (%rax) je 0x1c8a2 movq %rdi, %rbx cmpq $0x0, 0x40(%rdi) je 0x1c8b1 popq %rbx retq movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax popq %rbx jmp 0x17e61 movq %rbx, %rdi callq 0x20eda cmpl $0x0, 0x18(%rbx) je 0x1c8a0 movq %rbx, %rdi popq %rbx jmp 0x2209d leaq 0xe850(%rip), %rdi # 0x2b11f leaq 0x2b43c(%rip), %rsi # 0x47d12 leaq 0x2b9ff(%rip), %rcx # 0x482dc movl $0x2f1, %edx # imm = 0x2F1 callq 0x131f0
/anael-seghezzi[P]glfw/src/window.c
glfwHideWindow
GLFWAPI void glfwHideWindow(GLFWwindow* handle) { _GLFWwindow* window = (_GLFWwindow*) handle; assert(window != NULL); _GLFW_REQUIRE_INIT(); if (window->monitor) return; _glfwPlatformHideWindow(window); }
testq %rdi, %rdi je 0x1c956 leaq 0x36f81(%rip), %rax # 0x538b8 cmpl $0x0, (%rax) je 0x1c948 cmpq $0x0, 0x40(%rdi) je 0x21fcf retq movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax jmp 0x17e61 pushq %rax leaq 0xe7c1(%rip), %rdi # 0x2b11f leaq 0x2b3ad(%rip), %rsi # 0x47d12 leaq 0x2b9c0(%rip), %rcx # 0x4832c movl $0x30b, %edx # imm = 0x30B callq 0x131f0
/anael-seghezzi[P]glfw/src/window.c
glfwPlatformGetMonitorPos
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) { if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken) { XRRScreenResources* sr; XRRCrtcInfo* ci; sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root); ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc); if (xpos) *xpos = ci->x; if (ypos) *ypos = ci->y; XRRFreeCrtcInfo(ci); XRRFreeScreenResources(sr); } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx leaq 0x33c3c(%rip), %rax # 0x538b8 cmpl $0x0, 0x20560(%rax) je 0x1fd02 cmpl $0x0, 0x20584(%rax) jne 0x1fd02 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r12 movq 0x1fec0(%rax), %rdi movq 0x1fed0(%rax), %rsi movq %rax, %r13 callq *0x205d8(%rax) movq %rax, %r15 movq 0x1fec0(%r13), %rdi movq 0x90(%r12), %rdx movq %rax, %rsi movq %r13, %r12 callq *0x205c0(%r13) testq %r14, %r14 je 0x1fcd8 movl 0x8(%rax), %ecx movl %ecx, (%r14) testq %rbx, %rbx je 0x1fce2 movl 0xc(%rax), %ecx movl %ecx, (%rbx) movq %rax, %rdi callq *0x20590(%r12) movq %r15, %rdi movq %r12, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *0x205a8(%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/anael-seghezzi[P]glfw/src/x11_monitor.c
testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters( const std::string& str) { std::string output; output.reserve(str.size()); for (std::string::const_iterator it = str.begin(); it != str.end(); ++it) if (IsValidXmlCharacter(*it)) output.push_back(*it); return output; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movq %rsi, %r14 movb $0x0, 0x10(%rdi) movq 0x8(%rsi), %rsi callq 0x88a0 movq (%r14), %rax movl $0x2600, %ebp # imm = 0x2600 movq %rax, %r15 movq 0x8(%r14), %rcx addq %rax, %rcx cmpq %rcx, %r15 je 0x13add movb (%r15), %cl cmpb $0x1f, %cl jg 0x13aca cmpb $0xd, %cl ja 0x13ad8 movzbl %cl, %edx btl %edx, %ebp jae 0x13ad8 movsbl %cl, %esi movq %rbx, %rdi callq 0x83d0 movq (%r14), %rax incq %r15 jmp 0x13aa9 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest.cc
testing::internal::UnitTestImpl::RecordProperty(testing::TestProperty const&)
void UnitTestImpl::RecordProperty(const TestProperty& test_property) { std::string xml_element; TestResult* test_result; // TestResult appropriate for property recording. if (current_test_info_ != nullptr) { xml_element = "testcase"; test_result = &(current_test_info_->result_); } else if (current_test_suite_ != nullptr) { xml_element = "testsuite"; test_result = &(current_test_suite_->ad_hoc_test_result_); } else { xml_element = "testsuites"; test_result = &ad_hoc_test_result_; } test_result->RecordProperty(xml_element, test_property); }
pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movq %rdi, %r14 movb $0x0, (%rax) cmpq $0x0, 0x110(%rdi) je 0x16ca9 leaq 0xfd80(%rip), %rsi # 0x26a11 leaq 0x8(%rsp), %rdi callq 0x8a30 movl $0x90, %edi addq 0x110(%r14), %rdi jmp 0x16ced cmpq $0x0, 0x108(%r14) je 0x16cd2 leaq 0xfe12(%rip), %rsi # 0x26acc leaq 0x8(%rsp), %rdi callq 0x8a30 movl $0x88, %edi addq 0x108(%r14), %rdi jmp 0x16ced leaq 0xfe16(%rip), %rsi # 0x26aef leaq 0x8(%rsp), %rdi callq 0x8a30 addq $0x118, %r14 # imm = 0x118 movq %r14, %rdi leaq 0x8(%rsp), %r14 movq %r14, %rsi movq %rbx, %rdx callq 0x1094c movq %r14, %rdi callq 0x8670 addq $0x28, %rsp popq %rbx popq %r14 retq nop
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest.cc
testing::internal::UnitTestImpl::UnitTestImpl(testing::UnitTest*)
UnitTestImpl::UnitTestImpl(UnitTest* parent) : parent_(parent), GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */) default_global_test_part_result_reporter_(this), default_per_thread_test_part_result_reporter_(this), GTEST_DISABLE_MSC_WARNINGS_POP_() global_test_part_result_repoter_( &default_global_test_part_result_reporter_), per_thread_test_part_result_reporter_( &default_per_thread_test_part_result_reporter_), parameterized_test_registry_(), parameterized_tests_registered_(false), last_death_test_suite_(-1), current_test_suite_(nullptr), current_test_info_(nullptr), ad_hoc_test_result_(), os_stack_trace_getter_(nullptr), post_flag_parse_init_performed_(false), random_seed_(0), // Will be overridden by the flag before first use. random_(0), // Will be reseeded before first use. start_timestamp_(0), elapsed_time_(0), #if GTEST_HAS_DEATH_TEST death_test_factory_(new DefaultDeathTestFactory), #endif // Will be overridden by the flag before first use. catch_exceptions_(false) { listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x20127(%rip), %rax # 0x373b8 movq %rax, (%rdi) movq %rsi, 0x8(%rdi) addq $0x10, %rdi callq 0x1c39a leaq 0x30(%rbx), %rax leaq 0x1fe6c(%rip), %rcx # 0x37118 movq %rcx, 0x30(%rbx) movq %rbx, 0x38(%rbx) leaq 0x40(%rbx), %r14 leaq 0x1fe81(%rip), %rcx # 0x37140 movq %rcx, 0x40(%rbx) movq %rbx, 0x48(%rbx) movq %rax, 0x50(%rbx) leaq 0x58(%rbx), %rdi callq 0x1cff6 leaq 0x90(%rbx), %rdi movq %rsp, %rsi movq %r14, (%rsi) callq 0x1dbb4 xorl %ebp, %ebp movb %bpl, 0x100(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xf0(%rbx) movups %xmm0, 0xe0(%rbx) movups %xmm0, 0xd0(%rbx) movups %xmm0, 0xc0(%rbx) movups %xmm0, 0xb0(%rbx) movups %xmm0, 0xa0(%rbx) orl $-0x1, 0x104(%rbx) leaq 0x118(%rbx), %rdi movups %xmm0, 0x108(%rbx) callq 0x10890 leaq 0x198(%rbx), %r14 movq %r14, %rdi callq 0x16aa2 andq $0x0, 0x1b0(%rbx) movb %bpl, 0x1b8(%rbx) andq $0x0, 0x1bc(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x1c8(%rbx) andq $0x0, 0x1d8(%rbx) pushq $0x8 popq %r15 movq %r15, %rdi callq 0x8480 leaq 0x2027f(%rip), %rcx # 0x37600 movq %rcx, (%rax) movq %rax, 0x1e0(%rbx) leaq 0x1e8(%rbx), %rdi callq 0x1dbec movb %bpl, 0x1f8(%rbx) movq %r15, %rdi callq 0x8480 leaq 0x2014b(%rip), %rcx # 0x374f8 movq %rcx, (%rax) movq %r14, %rdi movq %rax, %rsi callq 0x16b0c addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest.cc
testing::internal::ParseInt32(testing::Message const&, char const*, int*)
bool ParseInt32(const Message& src_text, const char* str, Int32* value) { // Parses the environment variable as a decimal integer. char* end = nullptr; const long long_value = strtol(str, &end, 10); // NOLINT // Has strtol() consumed all characters in the string? if (*end != '\0') { // No - an invalid character was encountered. Message msg; msg << "WARNING: " << src_text << " is expected to be a 32-bit integer, but actually" << " has value \"" << str << "\".\n"; printf("%s", msg.GetString().c_str()); fflush(stdout); return false; } // Is the parsed value in the range of an Int32? const Int32 result = static_cast<Int32>(long_value); if (long_value == LONG_MAX || long_value == LONG_MIN || // The parsed value overflows as a long. (strtol() returns // LONG_MAX or LONG_MIN when the input overflows.) result != long_value // The parsed value overflows as an Int32. ) { Message msg; msg << "WARNING: " << src_text << " is expected to be a 32-bit integer, but actually" << " has value " << str << ", which overflows.\n"; printf("%s", msg.GetString().c_str()); fflush(stdout); return false; } *value = result; return true; }
pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdx, %rbx movq %rdi, %r14 movq %rsi, 0x8(%rsp) leaq 0x18(%rsp), %r15 andq $0x0, (%r15) pushq $0xa popq %rdx movq %rsi, %rdi movq %r15, %rsi callq 0x87c0 movq (%r15), %rcx cmpb $0x0, (%rcx) je 0x17f6c leaq 0x10(%rsp), %rbx movq %rbx, %rdi callq 0xe11a movq (%rbx), %r15 addq $0x10, %r15 leaq 0xf598(%rip), %rsi # 0x274b5 movq %r15, %rdi callq 0x8460 movq %r15, %rdi movq %r14, %rsi callq 0x23343 leaq 0xf588(%rip), %rsi # 0x274bf movq %r15, %rdi callq 0x8460 leaq 0xf5ab(%rip), %rsi # 0x274f1 movq %r15, %rdi callq 0x8460 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1c674 leaq 0xf59c(%rip), %rsi # 0x274fe movq %rax, %rdi callq 0x1c65e jmp 0x17fe5 movslq %eax, %rcx cmpq %rax, %rcx jne 0x17f7d movl %eax, (%rbx) movb $0x1, %al jmp 0x1802d leaq 0x10(%rsp), %rbx movq %rbx, %rdi callq 0xe11a movq (%rbx), %r15 addq $0x10, %r15 leaq 0xf51d(%rip), %rsi # 0x274b5 movq %r15, %rdi callq 0x8460 movq %r15, %rdi movq %r14, %rsi callq 0x23343 leaq 0xf50d(%rip), %rsi # 0x274bf movq %r15, %rdi callq 0x8460 leaq 0xf541(%rip), %rsi # 0x27502 movq %r15, %rdi callq 0x8460 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1c674 leaq 0xf531(%rip), %rsi # 0x2750e movq %rax, %rdi callq 0x1e968 movq (%rbx), %rsi leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0xe295 movq (%r14), %rsi leaq 0xef70(%rip), %rdi # 0x26f6f xorl %eax, %eax callq 0x8070 movq %r14, %rdi callq 0x8670 movq 0x1ff83(%rip), %rax # 0x37f98 movq (%rax), %rdi callq 0x85d0 movq (%rbx), %rdi testq %rdi, %rdi je 0x1802b movq (%rdi), %rax callq *0x8(%rax) xorl %eax, %eax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-port.cc
testing::internal::StreamingListener::OnTestEnd(testing::TestInfo const&)
void OnTestEnd(const TestInfo& test_info) override { SendLn("event=TestEnd&passed=" + FormatBool((test_info.result())->Passed()) + "&elapsed_time=" + StreamableToString((test_info.result())->elapsed_time()) + "ms"); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r13 movq %rdi, %r15 leaq 0x90(%rsi), %rdi callq 0x1d76a movzbl %al, %edx leaq 0x8(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x20288 leaq 0x7e62(%rip), %rsi # 0x27bd7 leaq 0x48(%rsp), %r14 movq %r14, %rdi movq %rbx, %rdx callq 0x1cf61 leaq 0x7e61(%rip), %rdx # 0x27bed leaq 0x68(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x1c3c0 movq 0x108(%r13), %rax movq %rsp, %rsi movq %rax, (%rsi) leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x1d787 leaq 0x88(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d856 leaq 0x7e29(%rip), %rdx # 0x27bfc leaq 0xa8(%rsp), %rbx movq %rbx, %rdi movq %rbp, %rsi callq 0x1c3c0 movq %r15, %rdi movq %rbx, %rsi callq 0x2022c movq %rbx, %rdi callq 0x8670 movq %rbp, %rdi callq 0x8670 movq %r13, %rdi callq 0x8670 movq %r12, %rdi callq 0x8670 movq %r14, %rdi callq 0x8670 leaq 0x8(%rsp), %rdi callq 0x8670 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-internal-inl.h
testing::internal::StreamingListener::OnTestCaseEnd(testing::TestSuite const&)
void OnTestCaseEnd(const TestCase& test_case) override { SendLn("event=TestCaseEnd&passed=" + FormatBool(test_case.Passed()) + "&elapsed_time=" + StreamableToString(test_case.elapsed_time()) + "ms"); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r13 movq %rdi, %r15 movq %rsi, %rdi callq 0x1f1e2 movzbl %al, %edx leaq 0x8(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x20288 leaq 0x7d90(%rip), %rsi # 0x27bff leaq 0x48(%rsp), %r14 movq %r14, %rdi movq %rbx, %rdx callq 0x1cf61 leaq 0x7d67(%rip), %rdx # 0x27bed leaq 0x68(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x1c3c0 movq 0x80(%r13), %rax movq %rsp, %rsi movq %rax, (%rsi) leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x1d787 leaq 0x88(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d856 leaq 0x7d2f(%rip), %rdx # 0x27bfc leaq 0xa8(%rsp), %rbx movq %rbx, %rdi movq %rbp, %rsi callq 0x1c3c0 movq %r15, %rdi movq %rbx, %rsi callq 0x2022c movq %rbx, %rdi callq 0x8670 movq %rbp, %rdi callq 0x8670 movq %r13, %rdi callq 0x8670 movq %r12, %rdi callq 0x8670 movq %r14, %rdi callq 0x8670 leaq 0x8(%rsp), %rdi callq 0x8670 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-internal-inl.h
testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int)
void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) override { SendLn("event=TestIterationEnd&passed=" + FormatBool(unit_test.Passed()) + "&elapsed_time=" + StreamableToString(unit_test.elapsed_time()) + "ms"); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r13 movq %rdi, %r15 movq %rsi, %rdi callq 0x12cde movzbl %al, %edx leaq 0x8(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x20288 leaq 0x7cb0(%rip), %rsi # 0x27c19 leaq 0x48(%rsp), %r14 movq %r14, %rdi movq %rbx, %rdx callq 0x1cf61 leaq 0x7c6d(%rip), %rdx # 0x27bed leaq 0x68(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x1c3c0 movq 0x40(%r13), %rax movq 0x1d0(%rax), %rax movq %rsp, %rsi movq %rax, (%rsi) leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x1d787 leaq 0x88(%rsp), %rbp movq %rbp, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d856 leaq 0x7c31(%rip), %rdx # 0x27bfc leaq 0xa8(%rsp), %rbx movq %rbx, %rdi movq %rbp, %rsi callq 0x1c3c0 movq %r15, %rdi movq %rbx, %rsi callq 0x2022c movq %rbx, %rdi callq 0x8670 movq %rbp, %rdi callq 0x8670 movq %r13, %rdi callq 0x8670 movq %r12, %rdi callq 0x8670 movq %r14, %rdi callq 0x8670 leaq 0x8(%rsp), %rdi callq 0x8670 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-internal-inl.h
testing::internal::StreamingListener::SocketWriter::Send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Send(const std::string& message) override { GTEST_CHECK_(sockfd_ != -1) << "Send() can be called only when there is a connection."; const auto len = static_cast<size_t>(message.length()); if (write(sockfd_, message.c_str(), len) != static_cast<ssize_t>(len)) { GTEST_LOG_(WARNING) << "stream_result_to: failed to stream to " << host_name_ << ":" << port_num_; } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movl 0x8(%rdi), %edi cmpl $-0x1, %edi jne 0x20142 leaq 0x7782(%rip), %rdx # 0x27882 leaq 0xc(%rsp), %r15 pushq $0x3 popq %rsi movq %r15, %rdi movl $0x440, %ecx # imm = 0x440 callq 0x1ad40 movq 0x17ecc(%rip), %rdi # 0x37fe8 leaq 0x7939(%rip), %rsi # 0x27a5c callq 0x8460 leaq 0x794e(%rip), %rsi # 0x27a7d movq %rax, %rdi callq 0x8460 movq %r15, %rdi callq 0x1adec movl 0x8(%rbx), %edi movq (%r14), %rsi movq 0x8(%r14), %r14 movq %r14, %rdx callq 0x8180 cmpq %r14, %rax je 0x201b7 leaq 0x7725(%rip), %rdx # 0x27882 leaq 0x8(%rsp), %r14 pushq $0x1 popq %rsi movq %r14, %rdi movl $0x445, %ecx # imm = 0x445 callq 0x1ad40 movq 0x17e6f(%rip), %rdi # 0x37fe8 leaq 0x7933(%rip), %rsi # 0x27ab3 callq 0x8460 leaq 0x10(%rbx), %rsi movq %rax, %rdi callq 0x8400 leaq 0x6b58(%rip), %rsi # 0x26cf0 movq %rax, %rdi callq 0x8460 addq $0x30, %rbx movq %rax, %rdi movq %rbx, %rsi callq 0x8400 movq %r14, %rdi callq 0x1adec addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq nop
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-internal-inl.h
testing::internal::CapturedStream::CapturedStream(int)
explicit CapturedStream(int fd) : fd_(fd), uncaptured_fd_(dup(fd)) { # if GTEST_OS_WINDOWS char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path); const UINT success = ::GetTempFileNameA(temp_dir_path, "gtest_redir", 0, // Generate unique file name. temp_file_path); GTEST_CHECK_(success != 0) << "Unable to create a temporary file in " << temp_dir_path; const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE); GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file " << temp_file_path; filename_ = temp_file_path; # else // There's no guarantee that a test has write access to the current // directory, so we create the temporary file in the /tmp directory // instead. We use /tmp on most systems, and /sdcard on Android. // That's because Android doesn't have /tmp. # if GTEST_OS_LINUX_ANDROID // Note: Android applications are expected to call the framework's // Context.getExternalStorageDirectory() method through JNI to get // the location of the world-writable SD Card directory. However, // this requires a Context handle, which cannot be retrieved // globally from native code. Doing so also precludes running the // code as part of a regular standalone executable, which doesn't // run in a Dalvik process (e.g. when running it through 'adb shell'). // // The location /data/local/tmp is directly accessible from native code. // '/sdcard' and other variants cannot be relied on, as they are not // guaranteed to be mounted, or may have a delay in mounting. char name_template[] = "/data/local/tmp/gtest_captured_stream.XXXXXX"; # else char name_template[] = "/tmp/captured_stream.XXXXXX"; # endif // GTEST_OS_LINUX_ANDROID const int captured_fd = mkstemp(name_template); if (captured_fd == -1) { GTEST_LOG_(WARNING) << "Failed to create tmp file " << name_template << " for test; does the test have access to the /tmp directory?"; } filename_ = name_template; # endif // GTEST_OS_WINDOWS fflush(nullptr); dup2(captured_fd, fd_); close(captured_fd); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movl %esi, (%rdi) movl %esi, %edi callq 0x8870 movl %eax, 0x4(%rbx) leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) andq $0x0, 0x10(%rbx) leaq 0x8(%rbx), %r14 movb $0x0, 0x18(%rbx) movups 0x7ffd(%rip), %xmm0 # 0x2866c leaq 0x10(%rsp), %rdi movups %xmm0, 0xc(%rdi) movaps 0x7fe1(%rip), %xmm0 # 0x28660 movaps %xmm0, (%rdi) callq 0x8160 movl %eax, %ebp cmpl $-0x1, %eax jne 0x206e1 leaq 0x6d5d(%rip), %rdx # 0x273f2 leaq 0xc(%rsp), %r15 pushq $0x1 popq %rsi movq %r15, %rdi movl $0x45a, %ecx # imm = 0x45A callq 0x1ad40 movq 0x17937(%rip), %rdi # 0x37fe8 leaq 0x7971(%rip), %rsi # 0x28029 callq 0x8460 leaq 0x10(%rsp), %rsi movq %rax, %rdi callq 0x8460 leaq 0x7973(%rip), %rsi # 0x28044 movq %rax, %rdi callq 0x8460 movq %r15, %rdi callq 0x1adec leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x8a30 xorl %edi, %edi callq 0x85d0 movl (%rbx), %esi movl %ebp, %edi callq 0x8440 movl %ebp, %edi callq 0x8a60 addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-port.cc
testing::internal::CapturedStream::GetCapturedString[abi:cxx11]()
std::string GetCapturedString() { if (uncaptured_fd_ != -1) { // Restores the original stream. fflush(nullptr); dup2(uncaptured_fd_, fd_); close(uncaptured_fd_); uncaptured_fd_ = -1; } FILE* const file = posix::FOpen(filename_.c_str(), "r"); if (file == nullptr) { GTEST_LOG_(FATAL) << "Failed to open tmp file " << filename_ << " for capturing stream."; } const std::string content = ReadEntireFile(file); posix::FClose(file); return content; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpl $-0x1, 0x4(%rsi) je 0x20745 xorl %edi, %edi callq 0x85d0 movl (%r14), %esi movl 0x4(%r14), %edi callq 0x8440 movl 0x4(%r14), %edi callq 0x8a60 orl $-0x1, 0x4(%r14) movq 0x8(%r14), %rdi leaq 0x642e(%rip), %rsi # 0x26b7e callq 0x85e0 movq %rax, %r15 testq %rax, %rax jne 0x207b2 addq $0x8, %r14 leaq 0x6c8a(%rip), %rdx # 0x273f2 leaq 0x4(%rsp), %r12 pushq $0x3 popq %rsi movq %r12, %rdi movl $0x474, %ecx # imm = 0x474 callq 0x1ad40 movq 0x17864(%rip), %rdi # 0x37fe8 leaq 0x78f5(%rip), %rsi # 0x28080 callq 0x8460 movq %rax, %rdi movq %r14, %rsi callq 0x8400 leaq 0x78f7(%rip), %rsi # 0x28099 movq %rax, %rdi callq 0x8460 movq %r12, %rdi callq 0x1adec movq %rbx, %rdi movq %r15, %rsi callq 0x1af1a movq %r15, %rdi callq 0x8470 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/wapm-packages[P]wabt/third_party/gtest/googletest/src/gtest-port.cc
testing::internal::StripTrailingSpaces(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
inline std::string StripTrailingSpaces(std::string str) { std::string::iterator it = str.end(); while (it != str.begin() && IsSpace(*--it)) it = str.erase(it); return str; }
pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rax movq 0x8(%rsi), %r15 addq %rax, %r15 cmpq %rax, %r15 je 0x20838 movsbl -0x1(%r15), %edi callq 0x208c2 testb %al, %al je 0x20838 decq %r15 movq %r14, %rdi movq %r15, %rsi callq 0x8660 movq %rax, %r15 movq (%r14), %rax jmp 0x2080f movq %rbx, %rdi movq %r14, %rsi callq 0x86f0 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/internal/gtest-port.h
testing::internal::GetPrefixUntilComma[abi:cxx11](char const*)
inline std::string GetPrefixUntilComma(const char* str) { const char* comma = strchr(str, ','); return comma == nullptr ? str : std::string(str, comma); }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx pushq $0x2c popq %rsi movq %r14, %rdi callq 0x81b0 testq %rax, %rax je 0x2087d leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0xc78a jmp 0x2088d leaq 0x7(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0xaaa4 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/internal/gtest-internal.h
testing::Message& testing::Message::operator<<<long long>(long long const&)
inline Message& operator <<(const T& val) { // Some libraries overload << for STL containers. These // overloads are defined in the global namespace instead of ::std. // // C++'s symbol lookup rule (i.e. Koenig lookup) says that these // overloads are visible in either the std namespace or the global // namespace, but not other namespaces, including the testing // namespace which Google Test's Message class is in. // // To allow STL containers (and other types that has a << operator // defined in the global namespace) to be used in Google Test // assertions, testing::Message must access the custom << operator // from the global namespace. With this using declaration, // overloads of << defined in the global namespace and those // visible via Koenig lookup are both exposed in this function. using ::operator <<; *ss_ << val; return *this; }
pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi addq $0x10, %rdi movq (%rsi), %rsi callq 0x81a0 movq %rbx, %rax popq %rbx retq
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/gtest-message.h
testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::GetOrCreateValue() const
T* GetOrCreateValue() const { ThreadLocalValueHolderBase* const holder = static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_)); if (holder != nullptr) { return CheckedDowncastToActualType<ValueHolder>(holder)->pointer(); } ValueHolder* const new_holder = default_factory_->MakeNewHolder(); ThreadLocalValueHolderBase* const holder_base = new_holder; GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base)); return new_holder->pointer(); }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 movl (%rdi), %edi callq 0x8850 testq %rax, %rax je 0x20c02 movq %rax, %rdi callq 0x20c80 movq %rax, %rbx jmp 0x20c70 movq 0x8(%r14), %rdi movq (%rdi), %rax callq *0x10(%rax) movq %rax, %rbx movl (%r14), %edi movq %rax, %rsi callq 0x80c0 testl %eax, %eax je 0x20c70 movl %eax, %ebp leaq 0x6a86(%rip), %rdx # 0x276ad leaq 0xc(%rsp), %r14 pushq $0x3 popq %rsi movq %r14, %rdi movl $0x702, %ecx # imm = 0x702 callq 0x1ad40 movq 0x173a5(%rip), %rdi # 0x37fe8 leaq 0x6d7e(%rip), %rsi # 0x279c8 callq 0x8460 leaq 0x6b02(%rip), %rsi # 0x27758 movq %rax, %rdi callq 0x8460 movq %rax, %rdi movl %ebp, %esi callq 0x8960 movq %r14, %rdi callq 0x1adec addq $0x8, %rbx movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/internal/gtest-port.h
testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder* testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolder, testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase*)
Derived* CheckedDowncastToActualType(Base* base) { #if GTEST_HAS_RTTI GTEST_CHECK_(typeid(*base) == typeid(Derived)); #endif #if GTEST_HAS_DOWNCAST_ return ::down_cast<Derived*>(base); #elif GTEST_HAS_RTTI return dynamic_cast<Derived*>(base); // NOLINT #else return static_cast<Derived*>(base); // Poor man's downcast. #endif }
pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x20cf9 movq %rdi, %rbx movq (%rdi), %rax movq -0x8(%rax), %rdi leaq 0x16eae(%rip), %rsi # 0x37b48 callq 0x1f9a0 testb %al, %al jne 0x20cda leaq 0x6a03(%rip), %rdx # 0x276ad leaq 0x4(%rsp), %r14 pushq $0x3 popq %rsi movq %r14, %rdi movl $0x44d, %ecx # imm = 0x44D callq 0x1ad40 movq 0x17322(%rip), %rdi # 0x37fe8 leaq 0x6d22(%rip), %rsi # 0x279ef callq 0x8460 movq %r14, %rdi callq 0x1adec leaq 0x16cf7(%rip), %rsi # 0x379d8 leaq 0x16e60(%rip), %rdx # 0x37b48 movq %rbx, %rdi xorl %ecx, %ecx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8570 callq 0x8530
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/internal/gtest-port.h
testing::Message& testing::Message::operator<<<double>(double const&)
inline Message& operator <<(const T& val) { // Some libraries overload << for STL containers. These // overloads are defined in the global namespace instead of ::std. // // C++'s symbol lookup rule (i.e. Koenig lookup) says that these // overloads are visible in either the std namespace or the global // namespace, but not other namespaces, including the testing // namespace which Google Test's Message class is in. // // To allow STL containers (and other types that has a << operator // defined in the global namespace) to be used in Google Test // assertions, testing::Message must access the custom << operator // from the global namespace. With this using declaration, // overloads of << defined in the global namespace and those // visible via Koenig lookup are both exposed in this function. using ::operator <<; *ss_ << val; return *this; }
pushq %rbx movq %rdi, %rbx movq (%rdi), %rdi addq $0x10, %rdi movsd (%rsi), %xmm0 callq 0x8900 movq %rbx, %rax popq %rbx retq nop
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/gtest-message.h
testing::internal::FloatingPoint<float>::AlmostEquals(testing::internal::FloatingPoint<float> const&) const
Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
movl (%rdi), %eax movl %eax, %ecx notl %ecx testl $0x7f800000, %ecx # imm = 0x7F800000 sete %cl testl $0x7fffff, %eax # imm = 0x7FFFFF setne %al testb %al, %cl jne 0x21686 movl (%rsi), %eax movl %eax, %ecx notl %ecx testl $0x7f800000, %ecx # imm = 0x7F800000 sete %cl testl $0x7fffff, %eax # imm = 0x7FFFFF setne %al testb %al, %cl je 0x21689 xorl %eax, %eax retq pushq %rax callq 0x2169a cmpl $0x5, %eax setb %al addq $0x8, %rsp retq
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/internal/gtest-internal.h
testing::TestPartResult::TestPartResult(testing::TestPartResult const&)
class GTEST_API_ TestPartResult { public: // The possible outcomes of a test part (i.e. an assertion or an // explicit SUCCEED(), FAIL(), or ADD_FAILURE()). enum Type { kSuccess, // Succeeded. kNonFatalFailure, // Failed but the test can continue. kFatalFailure, // Failed and the test should be terminated. kSkip // Skipped. }; // C'tor. TestPartResult does NOT have a default constructor. // Always use this constructor (with parameters) to create a // TestPartResult object. TestPartResult(Type a_type, const char* a_file_name, int a_line_number, const char* a_message) : type_(a_type), file_name_(a_file_name == nullptr ? "" : a_file_name), line_number_(a_line_number), summary_(ExtractSummary(a_message)), message_(a_message) {} // Gets the outcome of the test part. Type type() const { return type_; } // Gets the name of the source file where the test part took place, or // NULL if it's unknown. const char* file_name() const { return file_name_.empty() ? nullptr : file_name_.c_str(); } // Gets the line in the source file where the test part took place, // or -1 if it's unknown. int line_number() const { return line_number_; } // Gets the summary of the failure message. const char* summary() const { return summary_.c_str(); } // Gets the message associated with the test part. const char* message() const { return message_.c_str(); } // Returns true if and only if the test part was skipped. bool skipped() const { return type_ == kSkip; } // Returns true if and only if the test part passed. bool passed() const { return type_ == kSuccess; } // Returns true if and only if the test part non-fatally failed. bool nonfatally_failed() const { return type_ == kNonFatalFailure; } // Returns true if and only if the test part fatally failed. bool fatally_failed() const { return type_ == kFatalFailure; } // Returns true if and only if the test part failed. bool failed() const { return fatally_failed() || nonfatally_failed(); } private: Type type_; // Gets the summary of the failure message by omitting the stack // trace in it. static std::string ExtractSummary(const char* message); // The name of the source file where the test part took place, or // "" if the source file is unknown. std::string file_name_; // The line in the source file where the test part took place, or -1 // if the line number is unknown. int line_number_; std::string summary_; // The test failure summary. std::string message_; // The test failure message. }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl (%rsi), %eax movl %eax, (%rdi) addq $0x8, %rdi addq $0x8, %rsi callq 0x8780 movl 0x28(%rbx), %eax movl %eax, 0x28(%r14) leaq 0x30(%r14), %rdi leaq 0x30(%rbx), %rsi callq 0x8780 addq $0x50, %r14 addq $0x50, %rbx movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8780 nop
/wapm-packages[P]wabt/third_party/gtest/googletest/include/gtest/gtest-test-part.h
mbedtls_gcm_setkey
int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx, mbedtls_cipher_id_t cipher, const unsigned char *key, unsigned int keybits ) { int ret; const mbedtls_cipher_info_t *cipher_info; cipher_info = mbedtls_cipher_info_from_values( cipher, keybits, MBEDTLS_MODE_ECB ); if( cipher_info == NULL ) return( MBEDTLS_ERR_GCM_BAD_INPUT ); if( cipher_info->block_size != 16 ) return( MBEDTLS_ERR_GCM_BAD_INPUT ); mbedtls_cipher_free( &ctx->cipher_ctx ); if( ( ret = mbedtls_cipher_setup( &ctx->cipher_ctx, cipher_info ) ) != 0 ) return( ret ); if( ( ret = mbedtls_cipher_setkey( &ctx->cipher_ctx, key, keybits, MBEDTLS_ENCRYPT ) ) != 0 ) { return( ret ); } if( ( ret = gcm_gen_table( ctx ) ) != 0 ) return( ret ); return( 0 ); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl %ecx, %ebp movq %rdx, %r14 movq %rdi, %rbx pushq $0x1 popq %rdx movl %esi, %edi movl %ecx, %esi callq 0x7052 movq %rax, %r15 pushq $-0x14 popq %rax testq %r15, %r15 je 0x5cb2 cmpl $0x10, 0x20(%r15) jne 0x5cb2 movq %rbx, %rdi callq 0x709b movq %rbx, %rdi movq %r15, %rsi callq 0x70cb testl %eax, %eax jne 0x5cb2 pushq $0x1 popq %rcx movq %rbx, %rdi movq %r14, %rsi movl %ebp, %edx callq 0x7186 testl %eax, %eax jne 0x5cb2 leaq 0x10(%rsp), %r8 andq $0x0, (%r8) xorps %xmm0, %xmm0 movq %rsp, %rcx movaps %xmm0, (%rcx) pushq $0x10 popq %rdx movq %rbx, %rdi movq %rcx, %rsi callq 0x728d testl %eax, %eax jne 0x5cb2 movq (%rsp), %r14 movq 0x8(%rsp), %r15 bswapq %r14 bswapq %r15 movq %r15, 0x98(%rbx) movq %r14, 0x118(%rbx) pushq $0x2 popq %rbp movl %ebp, %edi callq 0x6b2c movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx je 0x5cbd addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq andq $0x0, 0xd8(%rbx) andq $0x0, 0x58(%rbx) pushq $0x4 popq %rax movabsq $-0x1f00000000000000, %rcx # imm = 0xE100000000000000 testl %eax, %eax je 0x5d0c movq %r15, %rdx shrdq $0x1, %r14, %rdx shrq %r14 testb $0x1, %r15b movl $0x0, %esi cmovneq %rcx, %rsi xorq %rsi, %r14 movl %eax, %esi movq %rdx, 0x58(%rbx,%rsi,8) movq %r14, 0xd8(%rbx,%rsi,8) shrl %eax movq %rdx, %r15 jmp 0x5cd7 leaq 0xe0(%rbx), %rcx xorl %eax, %eax cmpl $0x8, %ebp ja 0x5cb2 movl %ebp, %edx movq 0x58(%rbx,%rdx,8), %rsi movq 0xd8(%rbx,%rdx,8), %rdi leaq (%rcx,%rdx,8), %r8 decq %rdx xorl %r9d, %r9d cmpq %r9, %rdx je 0x5d55 movq (%rcx,%r9,8), %r10 xorq %rdi, %r10 movq %r10, (%r8,%r9,8) movq -0x80(%rcx,%r9,8), %r10 xorq %rsi, %r10 movq %r10, -0x80(%r8,%r9,8) incq %r9 jmp 0x5d33 addl %ebp, %ebp jmp 0x5d15
/project-everest[P]mbedtls/library/gcm.c
mbedtls_gcm_starts
int mbedtls_gcm_starts( mbedtls_gcm_context *ctx, int mode, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len ) { int ret; unsigned char work_buf[16]; size_t i; const unsigned char *p; size_t use_len, olen = 0; /* IV and AD are limited to 2^64 bits, so 2^61 bytes */ /* IV is not allowed to be zero length */ if( iv_len == 0 || ( (uint64_t) iv_len ) >> 61 != 0 || ( (uint64_t) add_len ) >> 61 != 0 ) { return( MBEDTLS_ERR_GCM_BAD_INPUT ); } memset( ctx->y, 0x00, sizeof(ctx->y) ); memset( ctx->buf, 0x00, sizeof(ctx->buf) ); ctx->mode = mode; ctx->len = 0; ctx->add_len = 0; if( iv_len == 12 ) { memcpy( ctx->y, iv, iv_len ); ctx->y[15] = 1; } else { memset( work_buf, 0x00, 16 ); PUT_UINT32_BE( iv_len * 8, work_buf, 12 ); p = iv; while( iv_len > 0 ) { use_len = ( iv_len < 16 ) ? iv_len : 16; for( i = 0; i < use_len; i++ ) ctx->y[i] ^= p[i]; gcm_mult( ctx, ctx->y, ctx->y ); iv_len -= use_len; p += use_len; } for( i = 0; i < 16; i++ ) ctx->y[i] ^= work_buf[i]; gcm_mult( ctx, ctx->y, ctx->y ); } if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ctx->base_ectr, &olen ) ) != 0 ) { return( ret ); } ctx->add_len = add_len; p = add; while( add_len > 0 ) { use_len = ( add_len < 16 ) ? add_len : 16; for( i = 0; i < use_len; i++ ) ctx->buf[i] ^= p[i]; gcm_mult( ctx, ctx->buf, ctx->buf ); add_len -= use_len; p += use_len; } return( 0 ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %rbp andq $0x0, 0x20(%rsp) leaq -0x1(%rcx), %rax movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF cmpq %rcx, %rax setae %al incq %rcx cmpq %rcx, %r9 setae %cl orb %al, %cl jne 0x5de3 movq %r9, %rbx movq %r8, %r14 movq %rdx, %r13 movq %rdi, %r15 leaq 0x178(%rdi), %rdx xorps %xmm0, %xmm0 movups %xmm0, 0x188(%rdi) movups %xmm0, 0x178(%rdi) movl %esi, 0x198(%rdi) movups %xmm0, 0x158(%rdi) cmpq $0xc, %rbp jne 0x5deb movl 0x8(%r13), %eax movl %eax, 0x8(%rdx) movq (%r13), %rax movq %rax, (%rdx) movb $0x1, 0x187(%r15) jmp 0x5e91 pushq $-0x14 popq %rax jmp 0x5f01 movq %rdx, 0x8(%rsp) movaps %xmm0, 0x10(%rsp) movl %ebp, %eax shrl $0x15, %eax movb %al, 0x1c(%rsp) movl %ebp, %eax shrl $0xd, %eax movb %al, 0x1d(%rsp) movl %ebp, %eax shrl $0x5, %eax movb %al, 0x1e(%rsp) leal (,%rbp,8), %eax movb %al, 0x1f(%rsp) testq %rbp, %rbp je 0x5e5d cmpq $0x10, %rbp pushq $0x10 popq %r12 cmovbq %rbp, %r12 xorl %eax, %eax movq 0x8(%rsp), %rsi cmpq %rax, %r12 je 0x5e4a movb (%r13,%rax), %cl xorb %cl, 0x178(%r15,%rax) incq %rax jmp 0x5e33 movq %r15, %rdi movq %rsi, %rdx callq 0x5f10 subq %r12, %rbp addq %r12, %r13 jmp 0x5e1b movl $0x178, %eax # imm = 0x178 movq 0x8(%rsp), %rsi cmpq $0x188, %rax # imm = 0x188 je 0x5e7f movb -0x168(%rsp,%rax), %cl xorb %cl, (%r15,%rax) incq %rax jmp 0x5e67 movq %r15, %rdi movq 0x8(%rsp), %rdx callq 0x5f10 movq 0x8(%rsp), %rdx leaq 0x168(%r15), %rcx pushq $0x10 popq %r12 leaq 0x20(%rsp), %r8 movq %r15, %rdi movq %rdx, %rsi movq %r12, %rdx callq 0x728d testl %eax, %eax jne 0x5f01 leaq 0x188(%r15), %rbp movq %rbx, 0x160(%r15) testq %rbx, %rbx je 0x5eff cmpq $0x10, %rbx movq %r12, %r13 cmovbq %rbx, %r13 xorl %eax, %eax cmpq %rax, %r13 je 0x5ee9 movb (%r14,%rax), %cl xorb %cl, 0x188(%r15,%rax) incq %rax jmp 0x5ed3 movq %r15, %rdi movq %rbp, %rsi movq %rbp, %rdx callq 0x5f10 subq %r13, %rbx addq %r13, %r14 jmp 0x5ec1 xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/project-everest[P]mbedtls/library/gcm.c
mbedtls_gcm_update
int mbedtls_gcm_update( mbedtls_gcm_context *ctx, size_t length, const unsigned char *input, unsigned char *output ) { int ret; unsigned char ectr[16]; size_t i; const unsigned char *p; unsigned char *out_p = output; size_t use_len, olen = 0; if( output > input && (size_t) ( output - input ) < length ) return( MBEDTLS_ERR_GCM_BAD_INPUT ); /* Total length is restricted to 2^39 - 256 bits, ie 2^36 - 2^5 bytes * Also check for possible overflow */ if( ctx->len + length < ctx->len || (uint64_t) ctx->len + length > 0xFFFFFFFE0ull ) { return( MBEDTLS_ERR_GCM_BAD_INPUT ); } ctx->len += length; p = input; while( length > 0 ) { use_len = ( length < 16 ) ? length : 16; for( i = 16; i > 12; i-- ) if( ++ctx->y[i - 1] != 0 ) break; if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctx->y, 16, ectr, &olen ) ) != 0 ) { return( ret ); } for( i = 0; i < use_len; i++ ) { if( ctx->mode == MBEDTLS_GCM_DECRYPT ) ctx->buf[i] ^= p[i]; out_p[i] = ectr[i] ^ p[i]; if( ctx->mode == MBEDTLS_GCM_ENCRYPT ) ctx->buf[i] ^= out_p[i]; } gcm_mult( ctx, ctx->buf, ctx->buf ); length -= use_len; p += use_len; out_p += use_len; } return( 0 ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %rbx movq %rdx, %r14 andq $0x0, 0x18(%rsp) movq %rcx, %rax subq %rdx, %rax seta %cl cmpq %rsi, %rax setb %dl pushq $-0x14 popq %rax testb %dl, %cl jne 0x61af movq %rsi, %r15 movq %rdi, %r12 movq 0x158(%rdi), %rsi addq %r15, %rsi setb %cl movabsq $0xfffffffe0, %rdx # imm = 0xFFFFFFFE0 cmpq %rdx, %rsi seta %dl orb %cl, %dl jne 0x61af movq %rsi, 0x158(%r12) leaq 0x178(%r12), %rax movq %rax, 0x10(%rsp) leaq 0x188(%r12), %rax movq %rax, 0x8(%rsp) pushq $0x10 popq %rdx testq %r15, %r15 je 0x61ab cmpq $0x10, %r15 movq %rdx, %rbp cmovbq %r15, %rbp movl $0x187, %eax # imm = 0x187 leaq -0x177(%rax), %rcx cmpq $0xd, %rcx jb 0x612b incb (%r12,%rax) leaq -0x1(%rax), %rax je 0x6114 movq %r12, %rdi movq 0x10(%rsp), %rsi movq %rdx, %r13 leaq 0x20(%rsp), %rcx leaq 0x18(%rsp), %r8 callq 0x728d testl %eax, %eax jne 0x61af xorl %eax, %eax cmpq %rax, %rbp je 0x618a cmpl $0x0, 0x198(%r12) jne 0x6167 movb (%r14,%rax), %cl xorb %cl, 0x188(%r12,%rax) movb (%r14,%rax), %cl xorb 0x20(%rsp,%rax), %cl movb %cl, (%rbx,%rax) cmpl $0x1, 0x198(%r12) jne 0x6185 xorb %cl, 0x188(%r12,%rax) incq %rax jmp 0x614b movq %r12, %rdi movq 0x8(%rsp), %rdx movq %rdx, %rsi callq 0x5f10 subq %rbp, %r15 addq %rbp, %r14 addq %rbp, %rbx movq %r13, %rdx jmp 0x60fb xorl %eax, %eax jmp 0x61af addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/project-everest[P]mbedtls/library/gcm.c
mbedtls_gcm_crypt_and_tag
int mbedtls_gcm_crypt_and_tag( mbedtls_gcm_context *ctx, int mode, size_t length, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len, const unsigned char *input, unsigned char *output, size_t tag_len, unsigned char *tag ) { int ret; if( ( ret = mbedtls_gcm_starts( ctx, mode, iv, iv_len, add, add_len ) ) != 0 ) return( ret ); if( ( ret = mbedtls_gcm_update( ctx, length, input, output ) ) != 0 ) return( ret ); if( ( ret = mbedtls_gcm_finish( ctx, tag, tag_len ) ) != 0 ) return( ret ); return( 0 ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rax movq %rdx, %r12 movq %rdi, %rbx movq 0x60(%rsp), %r15 movq 0x58(%rsp), %r14 movq 0x50(%rsp), %r13 movq 0x48(%rsp), %rbp movq 0x40(%rsp), %r9 movq %rcx, %rdx movq %r8, %rcx movq %rax, %r8 callq 0x5d59 testl %eax, %eax jne 0x6353 movq %rbx, %rdi movq %r12, %rsi movq %rbp, %rdx movq %r13, %rcx callq 0x6077 testl %eax, %eax je 0x6362 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x61be
/project-everest[P]mbedtls/library/gcm.c
mbedtls_gcm_auth_decrypt
int mbedtls_gcm_auth_decrypt( mbedtls_gcm_context *ctx, size_t length, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len, const unsigned char *tag, size_t tag_len, const unsigned char *input, unsigned char *output ) { int ret; unsigned char check_tag[16]; size_t i; int diff; if( ( ret = mbedtls_gcm_crypt_and_tag( ctx, MBEDTLS_GCM_DECRYPT, length, iv, iv_len, add, add_len, input, output, tag_len, check_tag ) ) != 0 ) { return( ret ); } /* Check tag in "constant-time" */ for( diff = 0, i = 0; i < tag_len; i++ ) diff |= tag[i] ^ check_tag[i]; if( diff != 0 ) { mbedtls_zeroize( output, length ); return( MBEDTLS_ERR_GCM_AUTH_FAILED ); } return( 0 ); }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %rax movq %r8, %r9 movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rbx movq 0x58(%rsp), %r14 movq 0x48(%rsp), %r15 subq $0x8, %rsp leaq 0x8(%rsp), %r10 xorl %r12d, %r12d xorl %esi, %esi movq %rbx, %rdx pushq %r10 pushq %r15 pushq %r14 pushq 0x70(%rsp) pushq %rax callq 0x62ff addq $0x30, %rsp testl %eax, %eax jne 0x63ff movq 0x40(%rsp), %rax xorl %ecx, %ecx cmpq %rcx, %r15 je 0x63e8 movb (%rsp,%rcx), %dl xorb (%rax,%rcx), %dl movzbl %dl, %edx orl %edx, %r12d incq %rcx jmp 0x63d2 testl %r12d, %r12d je 0x63fd movq %r14, %rdi movq %rbx, %rsi callq 0x640b pushq $-0x12 popq %rax jmp 0x63ff xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/project-everest[P]mbedtls/library/gcm.c
mbedtls_gcm_self_test
int mbedtls_gcm_self_test( int verbose ) { mbedtls_gcm_context ctx; unsigned char buf[64]; unsigned char tag_buf[16]; int i, j, ret; mbedtls_cipher_id_t cipher = MBEDTLS_CIPHER_ID_AES; for( j = 0; j < 3; j++ ) { int key_len = 128 + 64 * j; for( i = 0; i < MAX_TESTS; i++ ) { mbedtls_gcm_init( &ctx ); if( verbose != 0 ) mbedtls_printf( " AES-GCM-%3d #%d (%s): ", key_len, i, "enc" ); ret = mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); /* * AES-192 is an optional feature that may be unavailable when * there is an alternative underlying implementation i.e. when * MBEDTLS_AES_ALT is defined. */ if( ret == MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE && key_len == 192 ) { mbedtls_printf( "skipped\n" ); break; } else if( ret != 0 ) { goto exit; } ret = mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_ENCRYPT, pt_len[i], iv[iv_index[i]], iv_len[i], additional[add_index[i]], add_len[i], pt[pt_index[i]], buf, 16, tag_buf ); if( ret != 0 ) goto exit; if ( memcmp( buf, ct[j * 6 + i], pt_len[i] ) != 0 || memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) { ret = 1; goto exit; } mbedtls_gcm_free( &ctx ); if( verbose != 0 ) mbedtls_printf( "passed\n" ); mbedtls_gcm_init( &ctx ); if( verbose != 0 ) mbedtls_printf( " AES-GCM-%3d #%d (%s): ", key_len, i, "dec" ); ret = mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); if( ret != 0 ) goto exit; ret = mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_DECRYPT, pt_len[i], iv[iv_index[i]], iv_len[i], additional[add_index[i]], add_len[i], ct[j * 6 + i], buf, 16, tag_buf ); if( ret != 0 ) goto exit; if( memcmp( buf, pt[pt_index[i]], pt_len[i] ) != 0 || memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) { ret = 1; goto exit; } mbedtls_gcm_free( &ctx ); if( verbose != 0 ) mbedtls_printf( "passed\n" ); mbedtls_gcm_init( &ctx ); if( verbose != 0 ) mbedtls_printf( " AES-GCM-%3d #%d split (%s): ", key_len, i, "enc" ); ret = mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); if( ret != 0 ) goto exit; ret = mbedtls_gcm_starts( &ctx, MBEDTLS_GCM_ENCRYPT, iv[iv_index[i]], iv_len[i], additional[add_index[i]], add_len[i] ); if( ret != 0 ) goto exit; if( pt_len[i] > 32 ) { size_t rest_len = pt_len[i] - 32; ret = mbedtls_gcm_update( &ctx, 32, pt[pt_index[i]], buf ); if( ret != 0 ) goto exit; ret = mbedtls_gcm_update( &ctx, rest_len, pt[pt_index[i]] + 32, buf + 32 ); if( ret != 0 ) goto exit; } else { ret = mbedtls_gcm_update( &ctx, pt_len[i], pt[pt_index[i]], buf ); if( ret != 0 ) goto exit; } ret = mbedtls_gcm_finish( &ctx, tag_buf, 16 ); if( ret != 0 ) goto exit; if( memcmp( buf, ct[j * 6 + i], pt_len[i] ) != 0 || memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) { ret = 1; goto exit; } mbedtls_gcm_free( &ctx ); if( verbose != 0 ) mbedtls_printf( "passed\n" ); mbedtls_gcm_init( &ctx ); if( verbose != 0 ) mbedtls_printf( " AES-GCM-%3d #%d split (%s): ", key_len, i, "dec" ); ret = mbedtls_gcm_setkey( &ctx, cipher, key[key_index[i]], key_len ); if( ret != 0 ) goto exit; ret = mbedtls_gcm_starts( &ctx, MBEDTLS_GCM_DECRYPT, iv[iv_index[i]], iv_len[i], additional[add_index[i]], add_len[i] ); if( ret != 0 ) goto exit; if( pt_len[i] > 32 ) { size_t rest_len = pt_len[i] - 32; ret = mbedtls_gcm_update( &ctx, 32, ct[j * 6 + i], buf ); if( ret != 0 ) goto exit; ret = mbedtls_gcm_update( &ctx, rest_len, ct[j * 6 + i] + 32, buf + 32 ); if( ret != 0 ) goto exit; } else { ret = mbedtls_gcm_update( &ctx, pt_len[i], ct[j * 6 + i], buf ); if( ret != 0 ) goto exit; } ret = mbedtls_gcm_finish( &ctx, tag_buf, 16 ); if( ret != 0 ) goto exit; if( memcmp( buf, pt[pt_index[i]], pt_len[i] ) != 0 || memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) { ret = 1; goto exit; } mbedtls_gcm_free( &ctx ); if( verbose != 0 ) mbedtls_printf( "passed\n" ); } } if( verbose != 0 ) mbedtls_printf( "\n" ); ret = 0; exit: if( ret != 0 ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); mbedtls_gcm_free( &ctx ); } return( ret ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x278, %rsp # imm = 0x278 movl %edi, 0xc(%rsp) leaq 0x7734(%rip), %rax # 0xdb80 movq %rax, 0x78(%rsp) leaq 0x7bc8(%rip), %rax # 0xe020 movq %rax, 0x70(%rsp) leaq 0xd8(%rsp), %rbx leaq 0x76f4(%rip), %r14 # 0xdb60 pushq $0x1 popq %rax movl %eax, 0x8(%rsp) xorl %r12d, %r12d cmpq $0x3, %r12 je 0x6b13 movq %r12, 0x88(%rsp) shlq $0x6, %r12 subq $-0x80, %r12 movq 0x70(%rsp), %rbp movq 0x78(%rsp), %rax movq %rax, 0x28(%rsp) movq $0x0, 0x80(%rsp) pushq $-0x18 popq %r15 movq $0x0, 0x10(%rsp) movq %r12, 0x18(%rsp) testq %r15, %r15 je 0x6aba movl $0x1a0, %edx # imm = 0x1A0 movq %rbx, %r13 movq %rbx, %rdi xorl %esi, %esi callq 0x40c0 cmpl $0x0, 0xc(%rsp) je 0x64fc leaq 0x7319(%rip), %rdi # 0xd7ff movl %r12d, %esi movq 0x10(%rsp), %rdx leaq 0x7323(%rip), %rcx # 0xd818 xorl %eax, %eax callq 0x4090 cmpq $0xc0, %r12 sete %bl movq %r15, 0x58(%rsp) movslq 0x18(%r15,%r14), %r15 shlq $0x5, %r15 leaq 0x7335(%rip), %rax # 0xd850 addq %rax, %r15 movq %r13, %rdi pushq $0x2 popq %rsi movq %r15, %rdx movl %r12d, %ecx callq 0x5c00 cmpl $-0x23, %eax sete %cl andb %bl, %cl cmpb $0x1, %cl je 0x6aab testl %eax, %eax jne 0x6ad9 movq %rbp, 0x30(%rsp) leaq 0x73bc(%rip), %rax # 0xd910 movq 0x80(%rsp), %rcx movq (%rcx,%rax), %r12 leaq 0x73d9(%rip), %rax # 0xd940 movq 0x58(%rsp), %rdx movslq 0x18(%rdx,%rax), %rbp shlq $0x6, %rbp leaq 0x77a4(%rip), %rax # 0xdd20 addq %rax, %rbp leaq 0x73da(%rip), %rax # 0xd960 movq (%rcx,%rax), %r8 leaq 0x73ff(%rip), %rax # 0xd990 movslq 0x18(%rdx,%rax), %rbx shlq $0x6, %rbx leaq 0x78ff(%rip), %rax # 0xdea0 addq %rax, %rbx leaq 0x7405(%rip), %rax # 0xd9b0 movq (%rcx,%rax), %r11 movslq 0x18(%rdx,%r14), %r14 shlq $0x6, %r14 leaq 0x7421(%rip), %rax # 0xd9e0 leaq (%rax,%r14), %r10 subq $0x8, %rsp movq %r13, %rdi pushq $0x1 popq %rsi movq %r12, %rdx movq %rbp, %rcx movq %r8, 0x70(%rsp) movq %rbx, %r9 leaq 0x48(%rsp), %rax pushq %rax pushq $0x10 leaq 0xa8(%rsp), %r13 pushq %r13 movq %r10, 0x58(%rsp) pushq %r10 movq %r11, 0x88(%rsp) pushq %r11 callq 0x62ff addq $0x30, %rsp testl %eax, %eax jne 0x6ad9 movq %r13, %rdi movq 0x30(%rsp), %rsi movq %r12, %rdx callq 0x4170 testl %eax, %eax jne 0x6add movq 0x28(%rsp), %rax movdqu (%rax), %xmm0 pcmpeqb 0x40(%rsp), %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0x6add movq %r12, 0x20(%rsp) leaq 0xd8(%rsp), %r13 movq %r13, %rdi callq 0x641c cmpl $0x0, 0xc(%rsp) je 0x66a0 leaq 0x71d7(%rip), %rdi # 0xd83f callq 0x4060 movl $0x1a0, %edx # imm = 0x1A0 movq %r13, %rdi xorl %esi, %esi callq 0x40c0 leaq 0x717c(%rip), %rdi # 0xd7ff movq 0x18(%rsp), %r12 movl %r12d, %esi movq 0x10(%rsp), %rdx leaq 0x7185(%rip), %rcx # 0xd81c xorl %eax, %eax callq 0x4090 jmp 0x66b4 movl $0x1a0, %edx # imm = 0x1A0 movq %r13, %rdi xorl %esi, %esi callq 0x40c0 movq 0x18(%rsp), %r12 movq %r13, %rdi pushq $0x2 popq %rsi movq %r15, %rdx movl %r12d, %ecx callq 0x5c00 testl %eax, %eax jne 0x6ad9 subq $0x8, %rsp movq %r13, %rdi xorl %esi, %esi movq 0x28(%rsp), %r12 movq %r12, %rdx movq %rbp, %rcx movq 0x70(%rsp), %r8 movq %rbx, %r9 leaq 0x48(%rsp), %rax pushq %rax pushq $0x10 leaq 0xa8(%rsp), %r13 pushq %r13 pushq 0x50(%rsp) pushq 0x88(%rsp) callq 0x62ff addq $0x30, %rsp testl %eax, %eax jne 0x6ad9 movq %r13, %rdi movq 0x38(%rsp), %rsi movq %r12, %rdx callq 0x4170 testl %eax, %eax jne 0x6add movq 0x28(%rsp), %rax movdqu (%rax), %xmm0 pcmpeqb 0x40(%rsp), %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0x6add leaq 0xd8(%rsp), %r13 movq %r13, %rdi callq 0x641c cmpl $0x0, 0xc(%rsp) je 0x67a3 leaq 0x70d4(%rip), %rdi # 0xd83f callq 0x4060 movl $0x1a0, %edx # imm = 0x1A0 movq %r13, %rdi xorl %esi, %esi callq 0x40c0 leaq 0x709a(%rip), %rdi # 0xd820 movq 0x18(%rsp), %r12 movl %r12d, %esi movq 0x10(%rsp), %rdx leaq 0x707e(%rip), %rcx # 0xd818 xorl %eax, %eax callq 0x4090 jmp 0x67b7 movl $0x1a0, %edx # imm = 0x1A0 movq %r13, %rdi xorl %esi, %esi callq 0x40c0 movq 0x18(%rsp), %r12 movq %r13, %rdi pushq $0x2 popq %rsi movq %r15, %rdx movl %r12d, %ecx callq 0x5c00 testl %eax, %eax jne 0x6ad9 movq %r13, %rdi pushq $0x1 popq %rsi movq %rbp, %rdx movq 0x68(%rsp), %rcx movq %rbx, %r8 movq 0x60(%rsp), %r9 callq 0x5d59 testl %eax, %eax jne 0x6ad9 cmpq $0x2, 0x10(%rsp) jb 0x685d leaq 0xd8(%rsp), %r13 movq %r13, %rdi pushq $0x20 popq %rsi movq 0x38(%rsp), %rdx leaq 0x90(%rsp), %rcx callq 0x6077 testl %eax, %eax movq 0x20(%rsp), %r12 jne 0x6ad9 leaq -0x20(%r12), %rsi leaq 0x71ac(%rip), %rax # 0xd9e0 leaq (%r14,%rax), %rdx addq $0x20, %rdx movq %r13, %rdi leaq 0xb0(%rsp), %rcx callq 0x6077 testl %eax, %eax leaq 0x90(%rsp), %r14 je 0x688d jmp 0x6ad9 leaq 0xd8(%rsp), %r13 movq %r13, %rdi movq 0x20(%rsp), %r12 movq %r12, %rsi movq 0x38(%rsp), %rdx leaq 0x90(%rsp), %r14 movq %r14, %rcx callq 0x6077 testl %eax, %eax jne 0x6ad9 movq %r13, %rdi leaq 0x40(%rsp), %rsi pushq $0x10 popq %rdx callq 0x61be testl %eax, %eax jne 0x6ad9 movq %r14, %rdi movq 0x30(%rsp), %rsi movq %r12, %rdx callq 0x4170 testl %eax, %eax jne 0x6add movq 0x28(%rsp), %rax movdqu (%rax), %xmm0 pcmpeqb 0x40(%rsp), %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0x6add leaq 0xd8(%rsp), %r13 movq %r13, %rdi callq 0x641c cmpl $0x0, 0xc(%rsp) je 0x6938 leaq 0x6f46(%rip), %rdi # 0xd83f callq 0x4060 movl $0x1a0, %edx # imm = 0x1A0 movq %r13, %rdi xorl %esi, %esi callq 0x40c0 leaq 0x6f0c(%rip), %rdi # 0xd820 movq 0x18(%rsp), %r12 movl %r12d, %esi movq 0x10(%rsp), %rdx leaq 0x6ef4(%rip), %rcx # 0xd81c xorl %eax, %eax callq 0x4090 leaq 0x722a(%rip), %r14 # 0xdb60 jmp 0x6953 movl $0x1a0, %edx # imm = 0x1A0 movq %r13, %rdi xorl %esi, %esi callq 0x40c0 leaq 0x7212(%rip), %r14 # 0xdb60 movq 0x18(%rsp), %r12 movq %r13, %rdi pushq $0x2 popq %rsi movq %r15, %rdx movl %r12d, %ecx callq 0x5c00 testl %eax, %eax jne 0x6ad9 movq %r13, %rdi xorl %esi, %esi movq %rbp, %rdx movq 0x68(%rsp), %rcx movq %rbx, %r8 movq 0x60(%rsp), %r9 callq 0x5d59 testl %eax, %eax jne 0x6ad9 cmpq $0x2, 0x10(%rsp) jb 0x69ec leaq 0xd8(%rsp), %rbx movq %rbx, %rdi pushq $0x20 popq %rsi movq 0x30(%rsp), %rbp movq %rbp, %rdx leaq 0x90(%rsp), %rcx callq 0x6077 testl %eax, %eax movq 0x58(%rsp), %r15 jne 0x6ad9 movq 0x20(%rsp), %rax leaq -0x20(%rax), %rsi leaq 0x20(%rbp), %rdx movq %rbx, %rdi leaq 0xb0(%rsp), %rcx callq 0x6077 testl %eax, %eax je 0x6a1e jmp 0x6ad9 leaq 0xd8(%rsp), %rbx movq %rbx, %rdi movq 0x20(%rsp), %rsi movq 0x30(%rsp), %rbp movq %rbp, %rdx leaq 0x90(%rsp), %rcx callq 0x6077 testl %eax, %eax movq 0x58(%rsp), %r15 jne 0x6ad9 movq %rbx, %rdi leaq 0x40(%rsp), %rsi pushq $0x10 popq %rdx callq 0x61be testl %eax, %eax jne 0x6ad9 leaq 0x90(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x4170 testl %eax, %eax jne 0x6add movq 0x28(%rsp), %rax movdqu (%rax), %xmm0 pcmpeqb 0x40(%rsp), %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0x6add movq %rbx, %rdi callq 0x641c cmpl $0x0, 0xc(%rsp) je 0x6a8a leaq 0x6dba(%rip), %rdi # 0xd83f callq 0x4060 incq 0x10(%rsp) addq $0x4, %r15 addq $0x8, 0x80(%rsp) addq $0x10, 0x28(%rsp) addq $0x40, %rbp jmp 0x64bd leaq 0x6d94(%rip), %rdi # 0xd846 callq 0x4060 movq %r13, %rbx movq 0x88(%rsp), %r12 incq %r12 addq $0x60, 0x78(%rsp) addq $0x180, 0x70(%rsp) # imm = 0x180 jmp 0x6476 movl %eax, 0x8(%rsp) cmpl $0x0, 0xc(%rsp) je 0x6af0 leaq 0xa6c2(%rip), %rdi # 0x111ad callq 0x4060 leaq 0xd8(%rsp), %rdi callq 0x641c movl 0x8(%rsp), %eax addq $0x278, %rsp # imm = 0x278 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x0, 0x8(%rsp) cmpl $0x0, 0xc(%rsp) je 0x6afd pushq $0xa popq %rdi callq 0x4040 jmp 0x6afd
/project-everest[P]mbedtls/library/gcm.c
mbedtls_aesni_has_support
int mbedtls_aesni_has_support( unsigned int what ) { static int done = 0; static unsigned int c = 0; if( ! done ) { asm( "movl $1, %%eax \n\t" "cpuid \n\t" : "=c" (c) : : "eax", "ebx", "edx" ); done = 1; } return( ( c & what ) != 0 ); }
cmpb $0x1, 0xf5f5(%rip) # 0x16128 jne 0x6b3d movl 0xf5f1(%rip), %ecx # 0x1612c jmp 0x6b53 pushq %rbx movl $0x1, %eax cpuid movl %ecx, 0xf5e1(%rip) # 0x1612c movb $0x1, 0xf5d6(%rip) # 0x16128 popq %rbx xorl %eax, %eax testl %edi, %ecx setne %al retq
/project-everest[P]mbedtls/library/aesni.c
mbedtls_aesni_crypt_ecb
int mbedtls_aesni_crypt_ecb( mbedtls_aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16] ) { asm( "movdqu (%3), %%xmm0 \n\t" // load input "movdqu (%1), %%xmm1 \n\t" // load round key 0 "pxor %%xmm1, %%xmm0 \n\t" // round 0 "add $16, %1 \n\t" // point to next round key "subl $1, %0 \n\t" // normal rounds = nr - 1 "test %2, %2 \n\t" // mode? "jz 2f \n\t" // 0 = decrypt "1: \n\t" // encryption loop "movdqu (%1), %%xmm1 \n\t" // load round key AESENC xmm1_xmm0 "\n\t" // do round "add $16, %1 \n\t" // point to next round key "subl $1, %0 \n\t" // loop "jnz 1b \n\t" "movdqu (%1), %%xmm1 \n\t" // load round key AESENCLAST xmm1_xmm0 "\n\t" // last round "jmp 3f \n\t" "2: \n\t" // decryption loop "movdqu (%1), %%xmm1 \n\t" AESDEC xmm1_xmm0 "\n\t" // do round "add $16, %1 \n\t" "subl $1, %0 \n\t" "jnz 2b \n\t" "movdqu (%1), %%xmm1 \n\t" // load round key AESDECLAST xmm1_xmm0 "\n\t" // last round "3: \n\t" "movdqu %%xmm0, (%4) \n\t" // export output : : "r" (ctx->nr), "r" (ctx->rk), "r" (mode), "r" (input), "r" (output) : "memory", "cc", "xmm0", "xmm1" ); return( 0 ); }
movl (%rdi), %eax movq 0x8(%rdi), %rdi movdqu (%rdx), %xmm0 movdqu (%rdi), %xmm1 pxor %xmm1, %xmm0 addq $0x10, %rdi subl $0x1, %eax testl %esi, %esi je 0x6b95 movdqu (%rdi), %xmm1 aesenc %xmm1, %xmm0 addq $0x10, %rdi subl $0x1, %eax jne 0x6b78 movdqu (%rdi), %xmm1 aesenclast %xmm1, %xmm0 jmp 0x6bb0 movdqu (%rdi), %xmm1 aesdec %xmm1, %xmm0 addq $0x10, %rdi subl $0x1, %eax jne 0x6b95 movdqu (%rdi), %xmm1 aesdeclast %xmm1, %xmm0 movdqu %xmm0, (%rcx) xorl %eax, %eax retq
/project-everest[P]mbedtls/library/aesni.c
mbedtls_aesni_gcm_mult
void mbedtls_aesni_gcm_mult( unsigned char c[16], const unsigned char a[16], const unsigned char b[16] ) { unsigned char aa[16], bb[16], cc[16]; size_t i; /* The inputs are in big-endian order, so byte-reverse them */ for( i = 0; i < 16; i++ ) { aa[i] = a[15 - i]; bb[i] = b[15 - i]; } asm( "movdqu (%0), %%xmm0 \n\t" // a1:a0 "movdqu (%1), %%xmm1 \n\t" // b1:b0 /* * Caryless multiplication xmm2:xmm1 = xmm0 * xmm1 * using [CLMUL-WP] algorithm 1 (p. 13). */ "movdqa %%xmm1, %%xmm2 \n\t" // copy of b1:b0 "movdqa %%xmm1, %%xmm3 \n\t" // same "movdqa %%xmm1, %%xmm4 \n\t" // same PCLMULQDQ xmm0_xmm1 ",0x00 \n\t" // a0*b0 = c1:c0 PCLMULQDQ xmm0_xmm2 ",0x11 \n\t" // a1*b1 = d1:d0 PCLMULQDQ xmm0_xmm3 ",0x10 \n\t" // a0*b1 = e1:e0 PCLMULQDQ xmm0_xmm4 ",0x01 \n\t" // a1*b0 = f1:f0 "pxor %%xmm3, %%xmm4 \n\t" // e1+f1:e0+f0 "movdqa %%xmm4, %%xmm3 \n\t" // same "psrldq $8, %%xmm4 \n\t" // 0:e1+f1 "pslldq $8, %%xmm3 \n\t" // e0+f0:0 "pxor %%xmm4, %%xmm2 \n\t" // d1:d0+e1+f1 "pxor %%xmm3, %%xmm1 \n\t" // c1+e0+f1:c0 /* * Now shift the result one bit to the left, * taking advantage of [CLMUL-WP] eq 27 (p. 20) */ "movdqa %%xmm1, %%xmm3 \n\t" // r1:r0 "movdqa %%xmm2, %%xmm4 \n\t" // r3:r2 "psllq $1, %%xmm1 \n\t" // r1<<1:r0<<1 "psllq $1, %%xmm2 \n\t" // r3<<1:r2<<1 "psrlq $63, %%xmm3 \n\t" // r1>>63:r0>>63 "psrlq $63, %%xmm4 \n\t" // r3>>63:r2>>63 "movdqa %%xmm3, %%xmm5 \n\t" // r1>>63:r0>>63 "pslldq $8, %%xmm3 \n\t" // r0>>63:0 "pslldq $8, %%xmm4 \n\t" // r2>>63:0 "psrldq $8, %%xmm5 \n\t" // 0:r1>>63 "por %%xmm3, %%xmm1 \n\t" // r1<<1|r0>>63:r0<<1 "por %%xmm4, %%xmm2 \n\t" // r3<<1|r2>>62:r2<<1 "por %%xmm5, %%xmm2 \n\t" // r3<<1|r2>>62:r2<<1|r1>>63 /* * Now reduce modulo the GCM polynomial x^128 + x^7 + x^2 + x + 1 * using [CLMUL-WP] algorithm 5 (p. 20). * Currently xmm2:xmm1 holds x3:x2:x1:x0 (already shifted). */ /* Step 2 (1) */ "movdqa %%xmm1, %%xmm3 \n\t" // x1:x0 "movdqa %%xmm1, %%xmm4 \n\t" // same "movdqa %%xmm1, %%xmm5 \n\t" // same "psllq $63, %%xmm3 \n\t" // x1<<63:x0<<63 = stuff:a "psllq $62, %%xmm4 \n\t" // x1<<62:x0<<62 = stuff:b "psllq $57, %%xmm5 \n\t" // x1<<57:x0<<57 = stuff:c /* Step 2 (2) */ "pxor %%xmm4, %%xmm3 \n\t" // stuff:a+b "pxor %%xmm5, %%xmm3 \n\t" // stuff:a+b+c "pslldq $8, %%xmm3 \n\t" // a+b+c:0 "pxor %%xmm3, %%xmm1 \n\t" // x1+a+b+c:x0 = d:x0 /* Steps 3 and 4 */ "movdqa %%xmm1,%%xmm0 \n\t" // d:x0 "movdqa %%xmm1,%%xmm4 \n\t" // same "movdqa %%xmm1,%%xmm5 \n\t" // same "psrlq $1, %%xmm0 \n\t" // e1:x0>>1 = e1:e0' "psrlq $2, %%xmm4 \n\t" // f1:x0>>2 = f1:f0' "psrlq $7, %%xmm5 \n\t" // g1:x0>>7 = g1:g0' "pxor %%xmm4, %%xmm0 \n\t" // e1+f1:e0'+f0' "pxor %%xmm5, %%xmm0 \n\t" // e1+f1+g1:e0'+f0'+g0' // e0'+f0'+g0' is almost e0+f0+g0, ex\tcept for some missing // bits carried from d. Now get those\t bits back in. "movdqa %%xmm1,%%xmm3 \n\t" // d:x0 "movdqa %%xmm1,%%xmm4 \n\t" // same "movdqa %%xmm1,%%xmm5 \n\t" // same "psllq $63, %%xmm3 \n\t" // d<<63:stuff "psllq $62, %%xmm4 \n\t" // d<<62:stuff "psllq $57, %%xmm5 \n\t" // d<<57:stuff "pxor %%xmm4, %%xmm3 \n\t" // d<<63+d<<62:stuff "pxor %%xmm5, %%xmm3 \n\t" // missing bits of d:stuff "psrldq $8, %%xmm3 \n\t" // 0:missing bits of d "pxor %%xmm3, %%xmm0 \n\t" // e1+f1+g1:e0+f0+g0 "pxor %%xmm1, %%xmm0 \n\t" // h1:h0 "pxor %%xmm2, %%xmm0 \n\t" // x3+h1:x2+h0 "movdqu %%xmm0, (%2) \n\t" // done : : "r" (aa), "r" (bb), "r" (cc) : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" ); /* Now byte-reverse the outputs */ for( i = 0; i < 16; i++ ) c[i] = cc[15 - i]; return; }
movabsq $0x10, %rcx xorl %eax, %eax movq %rcx, %r8 subq $0x1, %r8 jb 0x6be6 movb -0x1(%rsi,%rcx), %r9b movb %r9b, -0x18(%rsp,%rax) movb -0x1(%rdx,%rcx), %cl movb %cl, -0x28(%rsp,%rax) incq %rax movq %r8, %rcx jmp 0x6bc6 leaq -0x18(%rsp), %rax leaq -0x28(%rsp), %rcx leaq -0x38(%rsp), %rdx movdqu (%rax), %xmm0 movdqu (%rcx), %xmm1 movdqa %xmm1, %xmm2 movdqa %xmm1, %xmm3 movdqa %xmm1, %xmm4 pclmulqdq $0x0, %xmm0, %xmm1 pclmulqdq $0x11, %xmm0, %xmm2 pclmulqdq $0x10, %xmm0, %xmm3 pclmulqdq $0x1, %xmm0, %xmm4 pxor %xmm3, %xmm4 movdqa %xmm4, %xmm3 psrldq $0x8, %xmm4 # xmm4 = xmm4[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero pslldq $0x8, %xmm3 # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7] pxor %xmm4, %xmm2 pxor %xmm3, %xmm1 movdqa %xmm1, %xmm3 movdqa %xmm2, %xmm4 psllq $0x1, %xmm1 psllq $0x1, %xmm2 psrlq $0x3f, %xmm3 psrlq $0x3f, %xmm4 movdqa %xmm3, %xmm5 pslldq $0x8, %xmm3 # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7] pslldq $0x8, %xmm4 # xmm4 = zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7] psrldq $0x8, %xmm5 # xmm5 = xmm5[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero por %xmm3, %xmm1 por %xmm4, %xmm2 por %xmm5, %xmm2 movdqa %xmm1, %xmm3 movdqa %xmm1, %xmm4 movdqa %xmm1, %xmm5 psllq $0x3f, %xmm3 psllq $0x3e, %xmm4 psllq $0x39, %xmm5 pxor %xmm4, %xmm3 pxor %xmm5, %xmm3 pslldq $0x8, %xmm3 # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7] pxor %xmm3, %xmm1 movdqa %xmm1, %xmm0 movdqa %xmm1, %xmm4 movdqa %xmm1, %xmm5 psrlq $0x1, %xmm0 psrlq $0x2, %xmm4 psrlq $0x7, %xmm5 pxor %xmm4, %xmm0 pxor %xmm5, %xmm0 movdqa %xmm1, %xmm3 movdqa %xmm1, %xmm4 movdqa %xmm1, %xmm5 psllq $0x3f, %xmm3 psllq $0x3e, %xmm4 psllq $0x39, %xmm5 pxor %xmm4, %xmm3 pxor %xmm5, %xmm3 psrldq $0x8, %xmm3 # xmm3 = xmm3[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero pxor %xmm3, %xmm0 pxor %xmm1, %xmm0 pxor %xmm2, %xmm0 movdqu %xmm0, (%rdx) movabsq $0x10, %rcx movq %rcx, %rax subq $0x1, %rax jb 0x6d1e movb -0x39(%rsp,%rcx), %cl movb %cl, (%rdi) incq %rdi movq %rax, %rcx jmp 0x6d0a retq
/project-everest[P]mbedtls/library/aesni.c
mbedtls_aesni_inverse_key
void mbedtls_aesni_inverse_key( unsigned char *invkey, const unsigned char *fwdkey, int nr ) { unsigned char *ik = invkey; const unsigned char *fk = fwdkey + 16 * nr; memcpy( ik, fk, 16 ); for( fk -= 16, ik += 16; fk > fwdkey; fk -= 16, ik += 16 ) asm( "movdqu (%0), %%xmm0 \n\t" AESIMC xmm0_xmm0 "\n\t" "movdqu %%xmm0, (%1) \n\t" : : "r" (fk), "r" (ik) : "memory", "xmm0" ); memcpy( ik, fk, 16 ); }
shll $0x4, %edx movslq %edx, %rax addq %rsi, %rax addq $-0x10, %rax movups 0x10(%rax), %xmm0 movups %xmm0, (%rdi) addq $0x10, %rdi cmpq %rsi, %rax jbe 0x6d53 movdqu (%rax), %xmm0 aesimc %xmm0, %xmm0 movdqu %xmm0, (%rdi) addq $0x10, %rdi addq $-0x10, %rax jmp 0x6d37 movups (%rax), %xmm0 movups %xmm0, (%rdi) retq
/project-everest[P]mbedtls/library/aesni.c
mbedtls_aesni_setkey_enc
int mbedtls_aesni_setkey_enc( unsigned char *rk, const unsigned char *key, size_t bits ) { switch( bits ) { case 128: aesni_setkey_enc_128( rk, key ); break; case 192: aesni_setkey_enc_192( rk, key ); break; case 256: aesni_setkey_enc_256( rk, key ); break; default : return( MBEDTLS_ERR_AES_INVALID_KEY_LENGTH ); } return( 0 ); }
cmpq $0x100, %rdx # imm = 0x100 je 0x6eea cmpq $0xc0, %rdx je 0x6e2b cmpq $0x80, %rdx jne 0x6fb0 movdqu (%rsi), %xmm0 movdqu %xmm0, (%rdi) jmp 0x6db8 pshufd $0xff, %xmm1, %xmm1 # xmm1 = xmm1[3,3,3,3] pxor %xmm0, %xmm1 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm0, %xmm1 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm0, %xmm1 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm1, %xmm0 addq $0x10, %rdi movdqu %xmm0, (%rdi) retq aeskeygenassist $0x1, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x2, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x4, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x8, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x10, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x20, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x40, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x80, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x1b, %xmm0, %xmm1 callq 0x6d8b aeskeygenassist $0x36, %xmm0, %xmm1 callq 0x6d8b jmp 0x6fad movdqu (%rsi), %xmm0 movdqu %xmm0, (%rdi) addq $0x10, %rdi movq 0x10(%rsi), %xmm1 movq %xmm1, (%rdi) addq $0x8, %rdi jmp 0x6e8d pshufd $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1] pxor %xmm0, %xmm2 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm0, %xmm2 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm0, %xmm2 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm2, %xmm0 movdqu %xmm0, (%rdi) addq $0x10, %rdi pshufd $0xff, %xmm0, %xmm2 # xmm2 = xmm0[3,3,3,3] pxor %xmm1, %xmm2 pslldq $0x4, %xmm1 # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm2, %xmm1 movq %xmm1, (%rdi) addq $0x8, %rdi retq aeskeygenassist $0x1, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x2, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x4, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x8, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x10, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x20, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x40, %xmm1, %xmm2 callq 0x6e46 aeskeygenassist $0x80, %xmm1, %xmm2 callq 0x6e46 jmp 0x6fad movdqu (%rsi), %xmm0 movdqu %xmm0, (%rdi) addq $0x10, %rdi movdqu 0x10(%rsi), %xmm1 movdqu %xmm1, (%rdi) jmp 0x6f60 pshufd $0xff, %xmm2, %xmm2 # xmm2 = xmm2[3,3,3,3] pxor %xmm0, %xmm2 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm0, %xmm2 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm0, %xmm2 pslldq $0x4, %xmm0 # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm2, %xmm0 addq $0x10, %rdi movdqu %xmm0, (%rdi) aeskeygenassist $0x0, %xmm0, %xmm2 pshufd $0xaa, %xmm2, %xmm2 # xmm2 = xmm2[2,2,2,2] pxor %xmm1, %xmm2 pslldq $0x4, %xmm1 # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm1, %xmm2 pslldq $0x4, %xmm1 # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm1, %xmm2 pslldq $0x4, %xmm1 # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11] pxor %xmm2, %xmm1 addq $0x10, %rdi movdqu %xmm1, (%rdi) retq aeskeygenassist $0x1, %xmm1, %xmm2 callq 0x6f01 aeskeygenassist $0x2, %xmm1, %xmm2 callq 0x6f01 aeskeygenassist $0x4, %xmm1, %xmm2 callq 0x6f01 aeskeygenassist $0x8, %xmm1, %xmm2 callq 0x6f01 aeskeygenassist $0x10, %xmm1, %xmm2 callq 0x6f01 aeskeygenassist $0x20, %xmm1, %xmm2 callq 0x6f01 aeskeygenassist $0x40, %xmm1, %xmm2 callq 0x6f01 xorl %eax, %eax retq pushq $-0x20 popq %rax retq
/project-everest[P]mbedtls/library/aesni.c
mbedtls_cipher_write_tag
int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx, unsigned char *tag, size_t tag_len ) { if( NULL == ctx || NULL == ctx->cipher_info || NULL == tag ) return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); if( MBEDTLS_ENCRYPT != ctx->operation ) return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) return mbedtls_gcm_finish( (mbedtls_gcm_context *) ctx->cipher_ctx, tag, tag_len ); return( 0 ); }
movl $0xffff9f00, %eax # imm = 0xFFFF9F00 testq %rdi, %rdi je 0x78ed movq (%rdi), %rcx testq %rcx, %rcx sete %r8b testq %rsi, %rsi sete %r9b orb %r8b, %r9b jne 0x78ed cmpl $0x1, 0xc(%rdi) jne 0x78ed xorl %eax, %eax cmpl $0x6, 0x4(%rcx) jne 0x78ed movq 0x50(%rdi), %rdi jmp 0x61be retq
/project-everest[P]mbedtls/library/cipher.c
mbedtls_cipher_check_tag
int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx, const unsigned char *tag, size_t tag_len ) { int ret; if( NULL == ctx || NULL == ctx->cipher_info || MBEDTLS_DECRYPT != ctx->operation ) { return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); } if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) { unsigned char check_tag[16]; size_t i; int diff; if( tag_len > sizeof( check_tag ) ) return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); if( 0 != ( ret = mbedtls_gcm_finish( (mbedtls_gcm_context *) ctx->cipher_ctx, check_tag, tag_len ) ) ) { return( ret ); } /* Check the tag in "constant-time" */ for( diff = 0, i = 0; i < tag_len; i++ ) diff |= tag[i] ^ check_tag[i]; if( diff != 0 ) return( MBEDTLS_ERR_CIPHER_AUTH_FAILED ); return( 0 ); } return( 0 ); }
movl $0xffff9f00, %eax # imm = 0xFFFF9F00 testq %rdi, %rdi je 0x7906 movq (%rdi), %rcx testq %rcx, %rcx je 0x7906 cmpl $0x0, 0xc(%rdi) je 0x7907 retq xorl %eax, %eax cmpl $0x6, 0x4(%rcx) jne 0x7906 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movl $0xffff9f00, %eax # imm = 0xFFFF9F00 cmpq $0x10, %rdx ja 0x795e movq %rsi, %r14 movq 0x50(%rdi), %rdi movq %rsp, %rsi movq %rbx, %rdx callq 0x61be testl %eax, %eax jne 0x795e xorl %eax, %eax xorl %ecx, %ecx cmpq %rax, %rbx je 0x7954 movb (%rsp,%rax), %dl xorb (%r14,%rax), %dl movzbl %dl, %edx orl %edx, %ecx incq %rax jmp 0x793e testl %ecx, %ecx movl $0xffff9d00, %eax # imm = 0xFFFF9D00 cmovel %ecx, %eax addq $0x18, %rsp popq %rbx popq %r14 retq
/project-everest[P]mbedtls/library/cipher.c
mbedtls_cipher_crypt
int mbedtls_cipher_crypt( mbedtls_cipher_context_t *ctx, const unsigned char *iv, size_t iv_len, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen ) { int ret; size_t finish_olen; if( ( ret = mbedtls_cipher_set_iv( ctx, iv, iv_len ) ) != 0 ) return( ret ); if( ( ret = mbedtls_cipher_reset( ctx ) ) != 0 ) return( ret ); if( ( ret = mbedtls_cipher_update( ctx, input, ilen, output, olen ) ) != 0 ) return( ret ); if( ( ret = mbedtls_cipher_finish( ctx, output + *olen, &finish_olen ) ) != 0 ) return( ret ); *olen += finish_olen; return( 0 ); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %r9, %rbx movq %r8, %r15 movq %rcx, %r13 movq %rdi, %r14 callq 0x71d9 testl %eax, %eax je 0x7996 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl $0xffff9f00, %eax # imm = 0xFFFF9F00 testq %r14, %r14 je 0x7988 cmpq $0x0, (%r14) je 0x7988 movq 0x40(%rsp), %r12 andq $0x0, 0x30(%r14) movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx movq %rbx, %rcx movq %r12, %r8 callq 0x728d testl %eax, %eax jne 0x7988 addq (%r12), %rbx leaq 0x8(%rsp), %rdx movq %r14, %rdi movq %rbx, %rsi callq 0x7593 testl %eax, %eax jne 0x7988 movq 0x8(%rsp), %rax addq %rax, (%r12) xorl %eax, %eax jmp 0x7988
/project-everest[P]mbedtls/library/cipher.c