; assembly | /* r2dec pseudo code output */ | /* bdlc_flathashmap.t/assume @ 0x44ebc0 */ | #include | | uint32_t rotate_left32 (uint32_t value, uint32_t count) { | const uint32_t mask = (CHAR_BIT * sizeof (value)) - 1; | count &= mask; | return (value << count) | (value >> (-count & mask)); | } | ; (fcn) method.BloombergLP::bdlc::FlatHashTable_bsl::basic_string_char__std::__1::char_traits_char___bsl::allocator_char_____bsl::pair_bsl::basic_string_char__std::__1::char_traits_char___bsl::allocator_char_____int___BloombergLP::bdlc::FlatHashMap_EntryUtil_bsl () | int64_t method_BloombergLP::bdlc::FlatHashTable_bsl::basic_string_char_std::_1::char_traits_char_bsl::allocator_char_bsl::pair_bsl::basic_string_char_std::_1::char_traits_char_bsl::allocator_char_int_BloombergLP::bdlc::FlatHashMap_EntryUtil_bsl (int64_t arg2, int64_t arg1) { | int64_t var_8h; | void ** s; | int64_t var_18h; | int64_t var_20h; | int64_t var_28h; | int64_t var_30h; | int64_t var_38h; | int64_t var_40h; | int64_t var_48h; | int64_t var_50h; | int64_t var_58h; | int64_t var_60h; | int64_t var_68h; | int64_t var_128h; | int64_t var_188h; | int64_t var_190h; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlc::FlatHashTable, bsl::allocator >, bsl::pair, bsl::allocator >, int>, BloombergLP::bdlc::FlatHashMap_EntryUtil, bsl::allocator >, int, bsl::pair, bsl::allocator >, int> >, BloombergLP::bslh::FibonacciBadHashWrapper, bsl::allocator > > >, bsl::equal_to, bsl::allocator > > >::rehashRaw(unsigned long) */ 0x0044ebc0 push rbp | 0x0044ebc1 push r15 | 0x0044ebc3 push r14 | 0x0044ebc5 push r13 | 0x0044ebc7 push r12 | 0x0044ebc9 push rbx | 0x0044ebca sub rsp, 0x198 | 0x0044ebd1 mov rbx, rsi | rbx = rsi; 0x0044ebd4 mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0044ebd8 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x0044ebdd test rax, rax | | if (rax == 0) { 0x0044ebe0 jne 0x44ebf7 | 0x0044ebe2 mov rax, qword [rip + 0x25d25f] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0044ebe9 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x0044ebee test rax, rax | | if (rax == 0) { 0x0044ebf1 je 0x44ec8f | goto label_5; | } | } 0x0044ebf7 test rbx, rbx | | if (rbx == 0) { 0x0044ebfa je 0x44eca8 | goto label_6; | } | do { 0x0044ec00 mov ebp, 0x20 | 0x0044ec05 cmp rbx, 0x21 | | if (rbx >= 0x21) { 0x0044ec09 jb 0x44ec2f | 0x0044ec0b dec rbx | rbx--; 0x0044ec0e or rbx, 1 | rbx |= 1; 0x0044ec12 bsr rax, rbx | __asm ("bsr rax, rbx"); 0x0044ec16 xor rax, 0x3f | rax ^= 0x3f; 0x0044ec1a mov ecx, eax | ecx = eax; 0x0044ec1c neg cl | cl = -cl; 0x0044ec1e mov ebp, 1 | 0x0044ec23 shl rbp, cl | rbp <<= cl; 0x0044ec26 test rax, rax | | if (rax == 0) { 0x0044ec29 je 0x44eefb | goto label_7; | } | } | label_4: 0x0044ec2f mov r14, rdi | r14 = rdi; 0x0044ec32 imul rsi, rbp, 0x38 | rsi = rbp * 0x38; 0x0044ec36 mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); 0x0044ec3b mov rax, qword [rbx] | rax = *(rbx); 0x0044ec3e mov rdi, rbx | rdi = rbx; 0x0044ec41 call qword [rax + 0x10] | rax = uint64_t (*rax + 0x10)() (); 0x0044ec44 mov qword [rsp + 8], rax | *((rsp + 8)) = rax; 0x0044ec49 mov rax, qword [rbx] | rax = *(rbx); 0x0044ec4c mov rdi, rbx | rdi = rbx; 0x0044ec4f mov rsi, rbp | rsi = rbp; 0x0044ec52 call qword [rax + 0x10] | rax = uint64_t (*rax + 0x10)() (); 0x0044ec55 mov r12, rax | r12 = rax; 0x0044ec58 mov rbx, rbp | rbx = rbp; 0x0044ec5b mov rax, rbp | rax = rbp; 0x0044ec5e shr rax, 4 | rax >>= 4; 0x0044ec62 dec rax | rax--; 0x0044ec65 mov rcx, rax | rcx = rax; 0x0044ec68 or rcx, 1 | rcx |= 1; 0x0044ec6c bsr rbp, rcx | __asm ("bsr rbp, rcx"); 0x0044ec70 xor ebp, 0x3f | ebp ^= 0x3f; 0x0044ec73 cmp rax, 1 | 0x0044ec77 adc ebp, 0 | ebp += 0; 0x0044ec7a mov rdi, r12 | 0x0044ec7d mov esi, 0x80 | 0x0044ec82 mov rdx, rbx | 0x0044ec85 call 0x4038e0 | memset (r12, 0x80, rbx); 0x0044ec8a mov rdi, r14 | rdi = r14; 0x0044ec8d jmp 0x44ecb6 | goto label_8; | label_5: 0x0044ec8f mov rbp, rdi | 0x0044ec92 call 0x460860 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); 0x0044ec97 mov rdi, rbp | rdi = rbp; 0x0044ec9a mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x0044ec9f test rbx, rbx | 0x0044eca2 jne 0x44ec00 | | } while (rbx != 0); | label_6: 0x0044eca8 xor ebp, ebp | ebp = 0; 0x0044ecaa xor ebx, ebx | ebx = 0; 0x0044ecac xor r12d, r12d | r12d = 0; 0x0044ecaf xor eax, eax | eax = 0; 0x0044ecb1 mov qword [rsp + 8], rax | *((rsp + 8)) = rax; | label_8: 0x0044ecb6 mov rax, qword [rdi + 0x18] | rax = *((rdi + 0x18)); 0x0044ecba test rax, rax | 0x0044ecbd mov qword [rsp + 0x18], r12 | *((rsp + 0x18)) = r12; 0x0044ecc2 mov qword [rsp + 0x30], rbp | *((rsp + 0x30)) = rbp; | if (rax == 0) { 0x0044ecc7 je 0x44eeac | goto label_9; | } 0x0044eccd mov ecx, ebp | ecx = ebp; 0x0044eccf mov qword [rsp + 0x40], rcx | *((rsp + 0x40)) = rcx; 0x0044ecd4 lea r14, [rbx - 1] | r14 = rbx - 1; 0x0044ecd8 xor edx, edx | edx = 0; 0x0044ecda lea r8, [rsp + 0x68] | r8 = rsp + 0x68; 0x0044ecdf xor ebp, ebp | ebp = 0; 0x0044ece1 mov qword [rsp + 0x48], rdi | *((rsp + 0x48)) = rdi; 0x0044ece6 jmp 0x44ed06 | goto label_10; | label_0: 0x0044ecf0 mov rax, qword [rdi + 0x18] | rax = *((rdi + 0x18)); 0x0044ecf4 mov rdx, qword [rsp + 0x38] | rdx = *((rsp + 0x38)); | do { 0x0044ecf9 add rdx, 0x10 | rdx += 0x10; 0x0044ecfd cmp rdx, rax | | if (rdx >= rax) { 0x0044ed00 jae 0x44eeae | goto label_11; | } | label_10: 0x0044ed06 mov rsi, qword [rdi + 8] | rsi = *((rdi + 8)); 0x0044ed0a movdqu xmm0, xmmword [rsi + rdx] | __asm ("movdqu xmm0, xmmword [rsi + rdx]"); 0x0044ed0f pmovmskb ecx, xmm0 | __asm ("pmovmskb ecx, xmm0"); 0x0044ed13 cmp cx, 0xffff | 0x0044ed17 je 0x44ecf9 | | } while (cx == 0xffff); 0x0044ed19 add rsi, rdx | rsi += rdx; 0x0044ed1c mov qword [rsp + 0x38], rdx | *((rsp + 0x38)) = rdx; 0x0044ed21 imul rdx, rdx, 0x38 | rdx *= 0x38; 0x0044ed25 add rdx, qword [rdi] | rdx += *(rdi); 0x0044ed28 not ecx | ecx = ~ecx; 0x0044ed2a movzx r15d, cx | r15d = (int32_t) cx; 0x0044ed2e mov qword [rsp + 0x50], rsi | *((rsp + 0x50)) = rsi; 0x0044ed33 jmp 0x44edad | goto label_12; | label_2: 0x0044ed40 movzx ecx, si | ecx = (int32_t) si; 0x0044ed43 bsf ecx, ecx | __asm ("bsf ecx, ecx"); 0x0044ed46 add rdx, rcx | rdx += rcx; | label_1: 0x0044ed49 imul rcx, rdx, 0x38 | rcx = rdx * 0x38; 0x0044ed4d mov rsi, qword [r12 + 0x30] | rsi = *((r12 + 0x30)); 0x0044ed52 mov rdi, qword [rsp + 8] | rdi = *((rsp + 8)); 0x0044ed57 mov qword [rdi + rcx + 0x30], rsi | *((rdi + rcx + 0x30)) = rsi; 0x0044ed5c movdqu xmm0, xmmword [r12] | __asm ("movdqu xmm0, xmmword [r12]"); 0x0044ed62 movups xmm1, xmmword [r12 + 0x10] | __asm ("movups xmm1, xmmword [r12 + 0x10]"); 0x0044ed68 movups xmm2, xmmword [r12 + 0x20] | __asm ("movups xmm2, xmmword [r12 + 0x20]"); 0x0044ed6e movups xmmword [rdi + rcx + 0x20], xmm2 | __asm ("movups xmmword [rdi + rcx + 0x20], xmm2"); 0x0044ed73 movups xmmword [rdi + rcx + 0x10], xmm1 | __asm ("movups xmmword [rdi + rcx + 0x10], xmm1"); 0x0044ed78 movdqu xmmword [rdi + rcx], xmm0 | __asm ("movdqu xmmword [rdi + rcx], xmm0"); 0x0044ed7d and al, 0x7f | al &= 0x7f; 0x0044ed7f mov r12, qword [rsp + 0x18] | r12 = *((rsp + 0x18)); 0x0044ed84 mov byte [r12 + rdx], al | *((r12 + rdx)) = al; 0x0044ed88 inc rbp | rbp++; 0x0044ed8b mov eax, 0xfffffffe | eax = 0xfffffffe; 0x0044ed90 mov rcx, qword [rsp + 0x58] | rcx = *((rsp + 0x58)); 0x0044ed95 rol eax, cl | eax = rotate_left32 (eax, cl); 0x0044ed97 and r15d, eax | r15d &= eax; 0x0044ed9a mov rdi, qword [rsp + 0x48] | rdi = *((rsp + 0x48)); 0x0044ed9f mov rsi, qword [rsp + 0x50] | rsi = *((rsp + 0x50)); 0x0044eda4 mov rdx, r13 | rdx = r13; | if (r15d == 0) { 0x0044eda7 je 0x44ecf0 | goto label_0; | } | label_12: 0x0044edad mov qword [rsp + 0x20], rbp | *((rsp + 0x20)) = rbp; 0x0044edb2 bsf ecx, r15d | __asm ("bsf ecx, r15d"); 0x0044edb6 imul rax, rcx, 0x38 | rax = rcx * 0x38; 0x0044edba lea r12, [rdx + rax] | r12 = rdx + rax; 0x0044edbe mov qword [rsp + 0x58], rcx | *((rsp + 0x58)) = rcx; 0x0044edc3 mov byte [rsi + rcx], 0xc0 | *((rsi + rcx)) = 0xc0; 0x0044edc7 dec qword [rdi + 0x10] | *((rdi + 0x10))--; 0x0044edcb mov qword [rsp + 0x188], 0 | *((rsp + 0x188)) = 0; 0x0044edd7 mov byte [rsp + 0x190], 0 | *((rsp + 0x190)) = 0; 0x0044eddf movdqa xmm0, xmmword [rip + 0x38e59] | __asm ("movdqa xmm0, xmmword [0x00487c40]"); 0x0044ede7 movdqu xmmword [rsp + 0x128], xmm0 | __asm ("movdqu xmmword [rsp + 0x128], xmm0"); 0x0044edf0 cmp qword [rdx + rax + 0x20], 0x17 | 0x0044edf6 mov rsi, r12 | rsi = r12; | if (*((rdx + rax + 0x20)) != 0x17) { 0x0044edf9 je 0x44edff | 0x0044edfb mov rsi, qword [rdx + rax] | | } 0x0044edff mov r13, rdx | r13 = rdx; 0x0044ee02 mov rdx, qword [rdx + rax + 0x18] | 0x0044ee07 mov rdi, r8 | rdi = r8; 0x0044ee0a mov rbp, r8 | 0x0044ee0d call 0x45f7a0 | BloombergLP::bslh::SpookyHashAlgorithmImp::update(voidconst*,unsigned long) (rdi, *((rdx + rax)), *((rdx + rax + 0x18))); 0x0044ee12 mov rax, qword [r12 + 0x18] | rax = *((r12 + 0x18)); 0x0044ee17 mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0044ee1c mov edx, 8 | 0x0044ee21 mov rdi, rbp | 0x0044ee24 lea rsi, [rsp + 0x28] | 0x0044ee29 call 0x45f7a0 | BloombergLP::bslh::SpookyHashAlgorithmImp::update(voidconst*,unsigned long) (rbp, rsp + 0x28, 8); 0x0044ee2e mov rdi, rbp | 0x0044ee31 lea rsi, [rsp + 0x28] | 0x0044ee36 lea rdx, [rsp + 0x60] | 0x0044ee3b call 0x45ed20 | BloombergLP::bslh::SpookyHashAlgorithmImp::finalize(unsigned long long*,unsigned long long*) (rbp, rsp + 0x28, rsp + 0x60); 0x0044ee40 mov rax, qword [rsp + 0x28] | rax = *((rsp + 0x28)); 0x0044ee45 movabs rcx, 0x9e3779b97f4a7c15 | rcx = 0x9e3779b97f4a7c15; 0x0044ee4f imul rax, rcx | rax *= rcx; 0x0044ee53 test rbx, rbx | 0x0044ee56 mov r8, rbp | r8 = rbp; 0x0044ee59 mov rbp, qword [rsp + 0x20] | rbp = *((rsp + 0x20)); | if (rbx == 0) { 0x0044ee5e je 0x44ed49 | goto label_1; | } 0x0044ee64 mov rdx, rax | rdx = rax; 0x0044ee67 mov rcx, qword [rsp + 0x40] | rcx = *((rsp + 0x40)); 0x0044ee6c shr rdx, cl | rdx >>= cl; 0x0044ee6f shl rdx, 4 | rdx <<= 4; 0x0044ee73 xor ecx, ecx | ecx = 0; 0x0044ee75 nop word cs:[rax + rax] | 0x0044ee7f nop | | label_3: 0x0044ee80 mov rsi, qword [rsp + 0x18] | rsi = *((rsp + 0x18)); 0x0044ee85 movdqu xmm0, xmmword [rsi + rdx] | __asm ("movdqu xmm0, xmmword [rsi + rdx]"); 0x0044ee8a pmovmskb esi, xmm0 | __asm ("pmovmskb esi, xmm0"); 0x0044ee8e test si, si | | if (si != 0) { 0x0044ee91 jne 0x44ed40 | goto label_2; | } 0x0044ee97 add rdx, 0x10 | rdx += 0x10; 0x0044ee9b and rdx, r14 | rdx &= r14; 0x0044ee9e add rcx, 0x10 | rcx += 0x10; 0x0044eea2 cmp rcx, rbx | | if (rcx < rbx) { 0x0044eea5 jb 0x44ee80 | goto label_3; | } 0x0044eea7 jmp 0x44ed49 | goto label_1; | label_9: 0x0044eeac xor ebp, ebp | ebp = 0; | label_11: 0x0044eeae mov rsi, qword [rdi] | rsi = *(rdi); 0x0044eeb1 mov r14, rdi | r14 = rdi; 0x0044eeb4 mov rdi, qword [rdi + 0x28] | rdi = *((rdi + 0x28)); 0x0044eeb8 mov rax, qword [rdi] | rax = *(rdi); 0x0044eebb call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x0044eebe mov rsi, qword [r14 + 8] | rsi = *((r14 + 8)); 0x0044eec2 mov rdi, qword [r14 + 0x28] | rdi = *((r14 + 0x28)); 0x0044eec6 mov rax, qword [rdi] | rax = *(rdi); 0x0044eec9 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x0044eecc mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x0044eed1 mov qword [r14], rax | *(r14) = rax; 0x0044eed4 mov qword [r14 + 8], r12 | *((r14 + 8)) = r12; 0x0044eed8 mov qword [r14 + 0x10], rbp | *((r14 + 0x10)) = rbp; 0x0044eedc mov qword [r14 + 0x18], rbx | *((r14 + 0x18)) = rbx; 0x0044eee0 mov rax, qword [rsp + 0x30] | rax = *((rsp + 0x30)); 0x0044eee5 mov dword [r14 + 0x20], eax | *((r14 + 0x20)) = eax; 0x0044eee9 add rsp, 0x198 | 0x0044eef0 pop rbx | 0x0044eef1 pop r12 | 0x0044eef3 pop r13 | 0x0044eef5 pop r14 | 0x0044eef7 pop r15 | 0x0044eef9 pop rbp | 0x0044eefa ret | return rax; | label_7: 0x0044eefb xor ebp, ebp | ebp = 0; 0x0044eefd jmp 0x44ec2f | goto label_4; | }