; assembly | /* r2dec pseudo code output */ | /* bdlc_flathashset.t/none @ 0x449880 */ | #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_CustomerProfile__CustomerProfile__BloombergLP::bdlc::FlatHashSet_EntryUtil_CustomerProfile___CustomerProfileHash__CustomerProfileEqual_.indexOfKey_bool__CustomerProfile_const__unsigned_long_ () | int64_t method_BloombergLP::bdlc::FlatHashTable_CustomerProfile_CustomerProfile_BloombergLP::bdlc::FlatHashSet_EntryUtil_CustomerProfile_CustomerProfileHash_CustomerProfileEqual_indexOfKey_bool_CustomerProfile_const_unsigned_long_ (int64_t arg4, int64_t arg3, int64_t arg2, uint32_t arg1, uint32_t arg9, int64_t arg10) { | int64_t var_8h; | int64_t var_10h; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | xmm2 = arg9; | xmm3 = arg10; | /* BloombergLP::bdlc::FlatHashTable, CustomerProfileHash, CustomerProfileEqual>::indexOfKey(bool*, CustomerProfile const&, unsigned long) */ 0x00449880 push rbp | 0x00449881 push r15 | 0x00449883 push r14 | 0x00449885 push r13 | 0x00449887 push r12 | 0x00449889 push rbx | 0x0044988a sub rsp, 0x18 | 0x0044988e mov rbx, rcx | rbx = rcx; 0x00449891 mov r14, rdi | r14 = rdi; 0x00449894 mov rdi, qword [rdi + 0x18] | rdi = *((rdi + 0x18)); 0x00449898 test rdi, rdi | | if (rdi == 0) { 0x0044989b je 0x449a00 | goto label_2; | } 0x004498a1 mov r10d, ebx | r10d = ebx; 0x004498a4 and r10b, 0x7f | r10b &= 0x7f; 0x004498a8 mov cl, byte [r14 + 0x20] | cl = *((r14 + 0x20)); 0x004498ac mov rax, rbx | rax = rbx; 0x004498af shr rax, cl | rax >>= cl; 0x004498b2 shl rax, 4 | rax <<= 4; 0x004498b6 mov r8, qword [r14] | r8 = *(r14); 0x004498b9 mov r9, qword [r14 + 8] | r9 = *((r14 + 8)); 0x004498bd movzx ecx, r10b | ecx = (int32_t) r10b; 0x004498c1 movd xmm0, ecx | xmm0 = ecx; 0x004498c5 pxor xmm1, xmm1 | xmm1 = 0; 0x004498c9 pshufb xmm0, xmm1 | __asm ("pshufb xmm0, xmm1"); 0x004498ce mov r10d, dword [rdx] | r10d = *(rdx); 0x004498d1 mov r11d, dword [rdx + 4] | r11d = *((rdx + 4)); 0x004498d5 mov r13d, dword [rdx + 8] | r13d = *((rdx + 8)); 0x004498d9 lea r15, [rdi - 1] | r15 = rdi - 1; 0x004498dd xor ebp, ebp | ebp = 0; 0x004498df movdqa xmm1, xmmword [rip + 0x35aa9] | __asm ("movdqa xmm1, xmmword [0x0047f390]"); | label_0: 0x004498e7 movdqu xmm2, xmmword [r9 + rax] | __asm ("movdqu xmm2, xmmword [r9 + rax]"); 0x004498ed movdqa xmm3, xmm0 | __asm ("movdqa xmm3, xmm0"); 0x004498f1 pcmpeqb xmm3, xmm2 | __asm ("pcmpeqb xmm3, xmm2"); 0x004498f5 pmovmskb ecx, xmm3 | __asm ("pmovmskb ecx, xmm3"); 0x004498f9 test cx, cx | | if (cx == 0) { 0x004498fc je 0x449950 | goto label_3; | } 0x004498fe lea rdx, [rax + rax*2] | rdx = rax * 3; 0x00449902 lea rdx, [r8 + rdx*4] | rdx = r8 + rdx*4; 0x00449906 movzx r12d, cx | r12d = (int32_t) cx; 0x0044990a mov qword [rsp + 0x10], r15 | *((rsp + 0x10)) = r15; 0x0044990f mov qword [rsp + 8], rbp | *((rsp + 8)) = rbp; | do { 0x00449914 bsf ecx, r12d | __asm ("bsf ecx, r12d"); 0x00449918 lea rbp, [rcx + rcx*2] | rbp = rcx * 3; 0x0044991c cmp dword [rdx + rbp*4 + 4], r11d | | if (*((rdx + rbp*4 + 4)) == r11d) { 0x00449921 jne 0x449932 | 0x00449923 lea r15, [rdx + rbp*4] | r15 = rdx + rbp*4; 0x00449927 cmp dword [r15], r10d | | if (*(r15) != r10d) { 0x0044992a jne 0x449932 | goto label_4; | } 0x0044992c cmp dword [r15 + 8], r13d | | if (*((r15 + 8)) == r13d) { 0x00449930 je 0x449973 | goto label_5; | } | } | label_4: 0x00449932 mov ebp, 0xfffffffe | 0x00449937 rol ebp, cl | ebp = rotate_left32 (ebp, cl); 0x00449939 and r12d, ebp | r12d &= ebp; 0x0044993c mov r15, qword [rsp + 0x10] | r15 = *((rsp + 0x10)); 0x00449941 mov rbp, qword [rsp + 8] | rbp = *((rsp + 8)); 0x00449946 jne 0x449914 | | } while (r12d != 0); 0x00449948 nop dword [rax + rax] | | label_3: 0x00449950 pcmpeqb xmm2, xmm1 | __asm ("pcmpeqb xmm2, xmm1"); 0x00449954 pmovmskb ecx, xmm2 | __asm ("pmovmskb ecx, xmm2"); 0x00449958 test cx, cx | | if (cx != 0) { 0x0044995b jne 0x449981 | goto label_1; | } 0x0044995d add rax, 0x10 | rax += 0x10; 0x00449961 and rax, r15 | rax &= r15; 0x00449964 add rbp, 0x10 | rbp += 0x10; 0x00449968 cmp rbp, rdi | | if (rbp < rdi) { 0x0044996b jb 0x4498e7 | goto label_0; | } 0x00449971 jmp 0x449981 | goto label_1; | label_5: 0x00449973 mov ecx, ecx | 0x00449975 add rax, rcx | rax += rcx; 0x00449978 cmp rax, rdi | | if (rax != rdi) { 0x0044997b jne 0x449a0b | goto label_6; | } | label_1: 0x00449981 mov byte [rsi], 1 | *(rsi) = 1; 0x00449984 mov rax, qword [r14 + 0x18] | rax = *((r14 + 0x18)); 0x00449988 mov rcx, rax | rcx = *((r14 + 0x18)); 0x0044998b shr rcx, 3 | rcx >>= 3; 0x0044998f lea rdx, [rcx*8] | rdx = rcx*8; 0x00449997 sub rdx, rcx | rdx -= rcx; 0x0044999a cmp qword [r14 + 0x10], rdx | | if (*((r14 + 0x10)) >= rdx) { 0x0044999e jb 0x4499bc | 0x004499a0 lea rcx, [rax + rax] | rcx = rax + rax; 0x004499a4 test rax, rax | 0x004499a7 mov esi, 0x20 | esi = 0x20; | if (rax != 0) { 0x004499ac cmovne rsi, rcx | rsi = rcx; | } 0x004499b0 mov rdi, r14 | 0x004499b3 call 0x449a30 | BloombergLP::bdlc::FlatHashTable,CustomerProfileHash,CustomerProfileEqual>::rehashRaw(unsigned long) (r14, rsi, rdx); 0x004499b8 mov rax, qword [r14 + 0x18] | rax = *((r14 + 0x18)); | } 0x004499bc test rax, rax | | if (rax == 0) { 0x004499bf je 0x449a10 | goto label_7; | } 0x004499c1 mov cl, byte [r14 + 0x20] | cl = *((r14 + 0x20)); 0x004499c5 shr rbx, cl | rbx >>= cl; 0x004499c8 mov rcx, qword [r14 + 8] | rcx = *((r14 + 8)); 0x004499cc shl rbx, 4 | rbx <<= 4; 0x004499d0 lea rdx, [rax - 1] | rdx = rax - 1; 0x004499d4 xor esi, esi | esi = 0; 0x004499d6 nop word cs:[rax + rax] | | do { 0x004499e0 movdqu xmm0, xmmword [rcx + rbx] | __asm ("movdqu xmm0, xmmword [rcx + rbx]"); 0x004499e5 pmovmskb edi, xmm0 | __asm ("pmovmskb edi, xmm0"); 0x004499e9 test di, di | | if (di != 0) { 0x004499ec jne 0x449a14 | goto label_8; | } 0x004499ee add rbx, 0x10 | rbx += 0x10; 0x004499f2 and rbx, rdx | rbx &= rdx; 0x004499f5 add rsi, 0x10 | rsi += 0x10; 0x004499f9 cmp rsi, rax | 0x004499fc jb 0x4499e0 | | } while (rsi < rax); 0x004499fe jmp 0x449a20 | goto label_9; | label_2: 0x00449a00 xor eax, eax | eax = 0; 0x00449a02 cmp rax, rdi | | if (rax == rdi) { 0x00449a05 je 0x449981 | goto label_1; | } | label_6: 0x00449a0b mov byte [rsi], 0 | *(rsi) = 0; 0x00449a0e jmp 0x449a20 | goto label_9; | label_7: 0x00449a10 xor eax, eax | eax = 0; 0x00449a12 jmp 0x449a20 | goto label_9; | label_8: 0x00449a14 movzx eax, di | eax = (int32_t) di; 0x00449a17 bsf eax, eax | __asm ("bsf eax, eax"); 0x00449a1a add rbx, rax | rbx += rax; 0x00449a1d mov rax, rbx | rax = rbx; | label_9: 0x00449a20 add rsp, 0x18 | 0x00449a24 pop rbx | 0x00449a25 pop r12 | 0x00449a27 pop r13 | 0x00449a29 pop r14 | 0x00449a2b pop r15 | 0x00449a2d pop rbp | 0x00449a2e ret | return rax; | }