; assembly | /* r2dec pseudo code output */ | /* bdlc_flathashset.t/assume @ 0x44ebf0 */ | #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_int__int__BloombergLP::bdlc::FlatHashSet_EntryUtil_int___SeedIsHash_int___bsl::equal_to_int___.rehashRaw_unsigned_long_ () | uint64_t method_BloombergLP::bdlc::FlatHashTable_int_int_BloombergLP::bdlc::FlatHashSet_EntryUtil_int_SeedIsHash_int_bsl::equal_to_int_rehashRaw_unsigned_long_ (int64_t arg2, void ** s) { | int64_t var_8h; | int64_t var_10h; | rsi = arg2; | rdi = s; | /* BloombergLP::bdlc::FlatHashTable, SeedIsHash, bsl::equal_to >::rehashRaw(unsigned long) */ 0x0044ebf0 push rbp | 0x0044ebf1 push r15 | 0x0044ebf3 push r14 | 0x0044ebf5 push r13 | 0x0044ebf7 push r12 | 0x0044ebf9 push rbx | 0x0044ebfa sub rsp, 0x18 | 0x0044ebfe mov rbx, rsi | rbx = rsi; 0x0044ec01 mov r15, rdi | r15 = rdi; 0x0044ec04 mov r14, qword [rdi + 0x28] | r14 = *((rdi + 0x28)); 0x0044ec08 mov rdi, qword [rdi + 0x38] | rdi = *((rdi + 0x38)); 0x0044ec0c test rdi, rdi | | if (rdi == 0) { 0x0044ec0f jne 0x44ec25 | 0x0044ec11 mov rdi, qword [rip + 0x253e70] | rdi = BloombergLP::bslma::Default::s_defaultAllocator; 0x0044ec18 test rdi, rdi | | if (rdi != 0) { 0x0044ec1b jne 0x44ec25 | goto label_5; | } 0x0044ec1d call 0x457e60 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); 0x0044ec22 mov rdi, rax | rdi = rax; | } | label_5: 0x0044ec25 test rbx, rbx | 0x0044ec28 mov qword [rsp], rdi | *(rsp) = rdi; | if (rbx != 0) { 0x0044ec2c je 0x44ecb7 | 0x0044ec32 mov r13d, 0x20 | r13d = 0x20; 0x0044ec38 cmp rbx, 0x21 | | if (rbx >= 0x21) { 0x0044ec3c jb 0x44ec63 | 0x0044ec3e dec rbx | rbx--; 0x0044ec41 or rbx, 1 | rbx |= 1; 0x0044ec45 bsr rax, rbx | __asm ("bsr rax, rbx"); 0x0044ec49 xor rax, 0x3f | rax ^= 0x3f; 0x0044ec4d mov ecx, eax | ecx = eax; 0x0044ec4f neg cl | cl = -cl; 0x0044ec51 mov r13d, 1 | r13d = 1; 0x0044ec57 shl r13, cl | r13 <<= cl; 0x0044ec5a test rax, rax | | if (rax == 0) { 0x0044ec5d je 0x44ede6 | goto label_6; | } | } | label_4: 0x0044ec63 lea rsi, [r13*4] | rsi = r13*4; 0x0044ec6b mov rax, qword [rdi] | rax = *(rdi); 0x0044ec6e mov rbx, rdi | rbx = rdi; 0x0044ec71 call qword [rax + 0x10] | rax = uint64_t (*rax + 0x10)() (); 0x0044ec74 mov r12, rax | r12 = rax; 0x0044ec77 mov rax, qword [rbx] | rax = *(rbx); 0x0044ec7a mov rdi, rbx | rdi = rbx; 0x0044ec7d mov rsi, r13 | rsi = r13; 0x0044ec80 call qword [rax + 0x10] | rax = uint64_t (*rax + 0x10)() (); 0x0044ec83 mov rbx, rax | rbx = rax; 0x0044ec86 mov rax, r13 | rax = r13; 0x0044ec89 shr rax, 4 | rax >>= 4; 0x0044ec8d dec rax | rax--; 0x0044ec90 mov rcx, rax | rcx = rax; 0x0044ec93 or rcx, 1 | rcx |= 1; 0x0044ec97 bsr rbp, rcx | __asm ("bsr rbp, rcx"); 0x0044ec9b xor ebp, 0x3f | ebp ^= 0x3f; 0x0044ec9e cmp rax, 1 | 0x0044eca2 adc ebp, 0 | ebp += 0; 0x0044eca5 mov rdi, rbx | 0x0044eca8 mov esi, 0x80 | 0x0044ecad mov rdx, r13 | 0x0044ecb0 call 0x403820 | memset (rbx, 0x80, r13); 0x0044ecb5 jmp 0x44ecc1 | | } else { 0x0044ecb7 xor ebp, ebp | ebp = 0; 0x0044ecb9 xor r13d, r13d | r13d = 0; 0x0044ecbc xor ebx, ebx | ebx = 0; 0x0044ecbe xor r12d, r12d | r12d = 0; | } 0x0044ecc1 mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x0044ecc5 test rax, rax | 0x0044ecc8 mov qword [rsp + 8], rbp | *((rsp + 8)) = rbp; | if (rax == 0) { 0x0044eccd je 0x44eda2 | goto label_7; | } 0x0044ecd3 mov r9, r14 | r9 = r14; 0x0044ecd6 mov ecx, ebp | ecx = ebp; 0x0044ecd8 shr r9, cl | r9 >>= cl; 0x0044ecdb shl r9, 4 | r9 <<= 4; 0x0044ecdf lea rdx, [r13 - 1] | rdx = r13 - 1; 0x0044ece3 and r14b, 0x7f | r14b &= 0x7f; 0x0044ece7 xor esi, esi | esi = 0; 0x0044ece9 xor ebp, ebp | ebp = 0; 0x0044eceb jmp 0x44ed06 | goto label_8; | label_0: 0x0044ecf0 mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x0044ecf4 mov rsi, qword [rsp + 0x10] | rsi = *((rsp + 0x10)); | do { 0x0044ecf9 add rsi, 0x10 | rsi += 0x10; 0x0044ecfd cmp rsi, rax | | if (rsi >= rax) { 0x0044ed00 jae 0x44eda4 | goto label_9; | } | label_8: 0x0044ed06 mov r10, qword [r15 + 8] | r10 = *((r15 + 8)); 0x0044ed0a movdqu xmm0, xmmword [r10 + rsi] | __asm ("movdqu xmm0, xmmword [r10 + rsi]"); 0x0044ed10 pmovmskb ecx, xmm0 | __asm ("pmovmskb ecx, xmm0"); 0x0044ed14 cmp cx, 0xffff | 0x0044ed18 je 0x44ecf9 | | } while (cx == 0xffff); 0x0044ed1a add r10, rsi | r10 += rsi; 0x0044ed1d mov qword [rsp + 0x10], rsi | *((rsp + 0x10)) = rsi; 0x0044ed22 lea r11, [rsi*4] | r11 = rsi*4; 0x0044ed2a add r11, qword [r15] | r11 += *(r15); 0x0044ed2d not ecx | ecx = ~ecx; 0x0044ed2f movzx eax, cx | eax = (int32_t) cx; 0x0044ed32 jmp 0x44ed64 | goto label_10; | label_2: 0x0044ed40 movzx esi, r8w | esi = (int32_t) r8w; 0x0044ed44 bsf esi, esi | __asm ("bsf esi, esi"); 0x0044ed47 add rdi, rsi | rdi += rsi; | label_1: 0x0044ed4a mov esi, dword [r11 + rcx*4] | esi = *((r11 + rcx*4)); 0x0044ed4e mov dword [r12 + rdi*4], esi | *((r12 + rdi*4)) = esi; 0x0044ed52 mov byte [rbx + rdi], r14b | *((rbx + rdi)) = r14b; 0x0044ed56 inc rbp | rbp++; 0x0044ed59 mov esi, 0xfffffffe | esi = 0xfffffffe; 0x0044ed5e rol esi, cl | esi = rotate_left32 (esi, cl); 0x0044ed60 and eax, esi | eax &= esi; | if (eax == 0) { 0x0044ed62 je 0x44ecf0 | goto label_0; | } | label_10: 0x0044ed64 bsf ecx, eax | __asm ("bsf ecx, eax"); 0x0044ed67 mov byte [r10 + rcx], 0xc0 | *((r10 + rcx)) = 0xc0; 0x0044ed6c dec qword [r15 + 0x10] | *((r15 + 0x10))--; 0x0044ed70 test r13, r13 | | if (r13 == 0) { 0x0044ed73 je 0x44ed4a | goto label_1; | } 0x0044ed75 mov rdi, r9 | rdi = r9; 0x0044ed78 xor esi, esi | esi = 0; 0x0044ed7a nop word [rax + rax] | | label_3: 0x0044ed80 movdqu xmm0, xmmword [rbx + rdi] | __asm ("movdqu xmm0, xmmword [rbx + rdi]"); 0x0044ed85 pmovmskb r8d, xmm0 | __asm ("pmovmskb r8d, xmm0"); 0x0044ed8a test r8w, r8w | | if (r8w != 0) { 0x0044ed8e jne 0x44ed40 | goto label_2; | } 0x0044ed90 add rdi, 0x10 | rdi += 0x10; 0x0044ed94 and rdi, rdx | rdi &= rdx; 0x0044ed97 add rsi, 0x10 | rsi += 0x10; 0x0044ed9b cmp rsi, r13 | | if (rsi < r13) { 0x0044ed9e jb 0x44ed80 | goto label_3; | } 0x0044eda0 jmp 0x44ed4a | goto label_1; | label_7: 0x0044eda2 xor ebp, ebp | ebp = 0; | label_9: 0x0044eda4 mov rsi, qword [r15] | rsi = *(r15); 0x0044eda7 mov rdi, qword [r15 + 0x38] | rdi = *((r15 + 0x38)); 0x0044edab mov rax, qword [rdi] | rax = *(rdi); 0x0044edae call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x0044edb1 mov rsi, qword [r15 + 8] | rsi = *((r15 + 8)); 0x0044edb5 mov rdi, qword [r15 + 0x38] | rdi = *((r15 + 0x38)); 0x0044edb9 mov rax, qword [rdi] | rax = *(rdi); 0x0044edbc call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x0044edbf mov qword [r15], r12 | *(r15) = r12; 0x0044edc2 mov qword [r15 + 8], rbx | *((r15 + 8)) = rbx; 0x0044edc6 mov qword [r15 + 0x10], rbp | *((r15 + 0x10)) = rbp; 0x0044edca mov qword [r15 + 0x18], r13 | *((r15 + 0x18)) = r13; 0x0044edce mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x0044edd3 mov dword [r15 + 0x20], eax | *((r15 + 0x20)) = eax; 0x0044edd7 add rsp, 0x18 | 0x0044eddb pop rbx | 0x0044eddc pop r12 | 0x0044edde pop r13 | 0x0044ede0 pop r14 | 0x0044ede2 pop r15 | 0x0044ede4 pop rbp | 0x0044ede5 ret | return rax; | label_6: 0x0044ede6 xor r13d, r13d | r13d = 0; 0x0044ede9 jmp 0x44ec63 | goto label_4; | }