; assembly | /* r2dec pseudo code output */ | /* bdlcc_objectpool.t/assume @ 0x410b00 */ | #include | ; (fcn) method.BloombergLP::bdlcc.ObjectPool__anonymous_namespace_::OtherType__bsl::function_void__void__BloombergLP::bslma::Allocator____BloombergLP::bdlcc::ObjectPoolFunctors::Nil__anonymous_namespace_::OtherType___::getObject__ () | int64_t method_BloombergLP::bdlcc_ObjectPool_anonymous_namespace_::OtherType_bsl::function_void_void_BloombergLP::bslma::Allocator_BloombergLP::bdlcc::ObjectPoolFunctors::Nil_anonymous_namespace_::OtherType_::getObject_ (int64_t arg1) { | int64_t var_ch; | int64_t var_10h; | int64_t var_18h; | int64_t var_20h; | rdi = arg1; | /* BloombergLP::bdlcc::ObjectPool<(anonymous namespace)::OtherType, bsl::function, BloombergLP::bdlcc::ObjectPoolFunctors::Nil<(anonymous namespace)::OtherType> >::getObject() */ 0x00410b00 push rbp | 0x00410b01 push r15 | 0x00410b03 push r14 | 0x00410b05 push r13 | 0x00410b07 push r12 | 0x00410b09 push rbx | 0x00410b0a sub rsp, 0x28 | 0x00410b0e mov r13, rdi | r13 = rdi; 0x00410b11 lea r14, [rdi + 0x90] | r14 = rdi + 0x90; 0x00410b18 lea r15, [rdi + 0x78] | r15 = rdi + 0x78; 0x00410b1c lea r12, [rdi + 0x10] | r12 = rdi + 0x10; | label_1: 0x00410b20 mov rbx, qword [r13 + 8] | rbx = *((r13 + 8)); 0x00410b24 test rbx, rbx | | if (rbx == 0) { 0x00410b27 je 0x410b92 | goto label_4; | } | label_2: 0x00410b29 mov eax, 2 | eax = 2; 0x00410b2e lock xadd dword [rbx + 8], eax | __asm ("lock xadd dword [rbx + 8], eax"); 0x00410b33 test eax, eax | | if (eax != 0) { 0x00410b35 jne 0x410bb0 | goto label_5; | } | label_3: 0x00410b37 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x00410b3b mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x00410b40 mov rax, qword [rsp + 0x10] | rax = *((rsp + 0x10)); 0x00410b45 cmp rax, rbx | | if (rax != rbx) { 0x00410b48 jne 0x410b7a | goto label_0; | } 0x00410b4a mov rax, qword [rsp + 0x10] | rax = *((rsp + 0x10)); 0x00410b4f mov rcx, qword [rax] | rcx = *(rax); 0x00410b52 mov rax, rbx | rax = rbx; 0x00410b55 lock cmpxchg qword [r13 + 8], rcx | __asm ("lock cmpxchg qword [r13 + 8], rcx"); 0x00410b5b cmp rbx, rax | | if (rbx == rax) { 0x00410b5e je 0x410cac | goto label_6; | } 0x00410b64 jmp 0x410b7a | | while ((cl & 1) != 0) { 0x00410b66 mov edx, ecx | edx = ecx; 0x00410b68 xor edx, 1 | edx ^= 1; 0x00410b6b mov eax, ecx | eax = ecx; 0x00410b6d lock cmpxchg dword [rbx + 8], edx | __asm ("lock cmpxchg dword [rbx + 8], edx"); 0x00410b72 cmp ecx, eax | | if (ecx == eax) { 0x00410b74 je 0x410cac | goto label_6; | } | label_0: 0x00410b7a mov ecx, dword [rbx + 8] | ecx = *((rbx + 8)); 0x00410b7d test cl, 1 | 0x00410b80 jne 0x410b66 | | } 0x00410b82 lea edx, [rcx - 2] | edx = rcx - 2; 0x00410b85 mov eax, ecx | eax = ecx; 0x00410b87 lock cmpxchg dword [rbx + 8], edx | __asm ("lock cmpxchg dword [rbx + 8], edx"); 0x00410b8c cmp ecx, eax | | if (ecx != eax) { 0x00410b8e jne 0x410b7a | goto label_0; | } 0x00410b90 jmp 0x410b20 | goto label_1; | label_4: 0x00410b92 mov rdi, r14 | rdi = r14; 0x00410b95 call 0x4042b0 | pthread_mutex_lock (); 0x00410b9a mov rbx, qword [r13 + 8] | rbx = *((r13 + 8)); 0x00410b9e test rbx, rbx | | if (rbx == 0) { 0x00410ba1 je 0x410bd3 | goto label_7; | } 0x00410ba3 mov rdi, r14 | rdi = r14; 0x00410ba6 call 0x404380 | pthread_mutex_unlock (); 0x00410bab jmp 0x410b29 | goto label_2; | label_5: 0x00410bb0 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x00410bb4 cmp rbx, rax | | if (rbx != rax) { 0x00410bb7 jne 0x410b37 | goto label_3; | } 0x00410bbd mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x00410bc1 cmp rbx, rax | | if (rbx != rax) { 0x00410bc4 jne 0x410b37 | goto label_3; | } 0x00410bca mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x00410bce jmp 0x410b37 | goto label_3; | label_7: 0x00410bd3 mov ebp, dword [r13 + 0x64] | ebp = *((r13 + 0x64)); 0x00410bd7 mov ebx, ebp | ebx = *((r13 + 0x64)); 0x00410bd9 neg ebx | ebx = -ebx; | if (rbx < rax) { 0x00410bdb cmovl ebx, ebp | ebx = ebp; | } 0x00410bde mov esi, ebx | 0x00410be0 shl esi, 5 | esi <<= 5; 0x00410be3 or esi, 0x10 | esi |= 0x10; 0x00410be6 mov rdi, r15 | 0x00410be9 call 0x4169b0 | BloombergLP::bdlma::InfrequentDeleteBlockList::allocate(unsigned long) (r15, ebx); 0x00410bee mov rcx, qword [r13 + 0x70] | rcx = *((r13 + 0x70)); 0x00410bf2 mov qword [rax], rcx | *(rax) = rcx; 0x00410bf5 mov dword [rsp + 0xc], ebx | *((rsp + 0xc)) = ebx; 0x00410bf9 mov dword [rax + 8], ebx | *((rax + 8)) = ebx; 0x00410bfc lea rbx, [rax + 0x10] | rbx = rax + 0x10; 0x00410c00 mov qword [rsp + 0x20], rbx | *((rsp + 0x20)) = rbx; 0x00410c05 test ebp, ebp | | if (ebp == 0) { 0x00410c07 je 0x410c52 | goto label_8; | } 0x00410c09 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x00410c0e mov rbx, rax | rbx = rax; 0x00410c11 add rbx, 0x30 | rbx += 0x30; 0x00410c15 mov ebp, dword [rsp + 0xc] | ebp = *((rsp + 0xc)); | do { 0x00410c19 mov qword [rbx - 0x20], rbx | *((rbx - 0x20)) = rbx; 0x00410c1d mov dword [rbx - 0x18], 0 | *((rbx - 0x18)) = 0; 0x00410c24 mov rax, qword [r13 + 0x50] | rax = *((r13 + 0x50)); 0x00410c28 test rax, rax | | if (rax == 0) { 0x00410c2b je 0x410cce | goto label_9; | } 0x00410c31 mov rdx, qword [r13 + 0x88] | rdx = *((r13 + 0x88)); 0x00410c38 lea rsi, [rbx - 0x10] | rsi = rbx - 0x10; 0x00410c3c mov rdi, r12 | rdi = r12; 0x00410c3f call rax | void (*rax)() (); 0x00410c41 add rbx, 0x20 | rbx += 0x20; 0x00410c45 dec ebp | ebp--; 0x00410c47 jne 0x410c19 | | } while (ebp != 0); 0x00410c49 add rbx, 0xffffffffffffffe0 | rbx += 0xffffffffffffffe0; 0x00410c4d mov rax, qword [rsp + 0x18] | rax = *((rsp + 0x18)); | label_8: 0x00410c52 mov dword [rbx - 0x18], 0 | *((rbx - 0x18)) = 0; 0x00410c59 mov qword [r13 + 0x70], rax | *((r13 + 0x70)) = rax; 0x00410c5d mov rdx, qword [rsp + 0x20] | rdx = *((rsp + 0x20)); | do { 0x00410c62 mov rcx, qword [r13 + 8] | rcx = *((r13 + 8)); 0x00410c66 mov qword [rbx - 0x20], rcx | *((rbx - 0x20)) = rcx; 0x00410c6a mov rax, rcx | rax = rcx; 0x00410c6d lock cmpxchg qword [r13 + 8], rdx | __asm ("lock cmpxchg qword [r13 + 8], rdx"); 0x00410c73 cmp rcx, rax | 0x00410c76 jne 0x410c62 | | } while (rcx != rax); 0x00410c78 mov eax, dword [rsp + 0xc] | eax = *((rsp + 0xc)); 0x00410c7c lock add dword [r13 + 0x6c], eax | *((r13 + 0x6c)) += eax; 0x00410c81 lock add dword [r13 + 0x68], eax | *((r13 + 0x68)) += eax; 0x00410c86 mov eax, dword [r13 + 0x64] | eax = *((r13 + 0x64)); 0x00410c8a test eax, eax | | if (eax < 0) { 0x00410c8c jns 0x410c9f | 0x00410c8e mov ecx, eax | ecx = eax; 0x00410c90 neg ecx | ecx = -ecx; 0x00410c92 lea edx, [rax + rax] | edx = rax + rax; 0x00410c95 cmp eax, 0xffffffe0 | | if (eax <= 0xffffffe0) { 0x00410c98 cmovle edx, ecx | edx = ecx; | } 0x00410c9b mov dword [r13 + 0x64], edx | *((r13 + 0x64)) = edx; | } 0x00410c9f mov rdi, r14 | rdi = r14; 0x00410ca2 call 0x404380 | pthread_mutex_unlock (); 0x00410ca7 jmp 0x410b20 | goto label_1; | label_6: 0x00410cac mov qword [rbx], 0 | *(rbx) = 0; 0x00410cb3 lock dec dword [r13 + 0x68] | *((r13 + 0x68))--; 0x00410cb8 add rbx, 0x10 | rbx += 0x10; 0x00410cbc mov rax, rbx | rax = rbx; 0x00410cbf add rsp, 0x28 | 0x00410cc3 pop rbx | 0x00410cc4 pop r12 | 0x00410cc6 pop r13 | 0x00410cc8 pop r14 | 0x00410cca pop r15 | 0x00410ccc pop rbp | 0x00410ccd ret | return rax; | label_9: 0x00410cce mov edi, 8 | edi = 8; 0x00410cd3 call 0x403e40 | cxa_allocate_exception (); 0x00410cd8 mov qword [rax], 0x441730 | *(rax) = fcn.004041c0; 0x00410cdf mov esi, 0x441708 | 0x00410ce4 mov edx, 0x4041c0 | 0x00410ce9 mov rdi, rax | 0x00410cec call 0x403f10 | return cxa_throw (rax, obj.typeinfo_for_std::__1::bad_function_call, fcn.004041c0); | }