; assembly | /* r2dec pseudo code output */ | /* bdlcc_objectpool.t/none @ 0x4108e0 */ | #include | ; (fcn) method.BloombergLP::bdlcc.ObjectPool__anonymous_namespace_::UsesAllocatorType__bsl::function_void__void__BloombergLP::bslma::Allocator____BloombergLP::bdlcc::ObjectPoolFunctors::Nil__anonymous_namespace_::UsesAllocatorType___::getObject__ () | int64_t method_BloombergLP::bdlcc_ObjectPool_anonymous_namespace_::UsesAllocatorType_bsl::function_void_void_BloombergLP::bslma::Allocator_BloombergLP::bdlcc::ObjectPoolFunctors::Nil_anonymous_namespace_::UsesAllocatorType_::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)::UsesAllocatorType, bsl::function, BloombergLP::bdlcc::ObjectPoolFunctors::Nil<(anonymous namespace)::UsesAllocatorType> >::getObject() */ 0x004108e0 push rbp | 0x004108e1 push r15 | 0x004108e3 push r14 | 0x004108e5 push r13 | 0x004108e7 push r12 | 0x004108e9 push rbx | 0x004108ea sub rsp, 0x28 | 0x004108ee mov r13, rdi | r13 = rdi; 0x004108f1 lea r14, [rdi + 0x90] | r14 = rdi + 0x90; 0x004108f8 lea r15, [rdi + 0x78] | r15 = rdi + 0x78; 0x004108fc lea r12, [rdi + 0x10] | r12 = rdi + 0x10; | label_1: 0x00410900 mov rbx, qword [r13 + 8] | rbx = *((r13 + 8)); 0x00410904 test rbx, rbx | | if (rbx == 0) { 0x00410907 je 0x410972 | goto label_4; | } | label_2: 0x00410909 mov eax, 2 | eax = 2; 0x0041090e lock xadd dword [rbx + 8], eax | __asm ("lock xadd dword [rbx + 8], eax"); 0x00410913 test eax, eax | | if (eax != 0) { 0x00410915 jne 0x410990 | goto label_5; | } | label_3: 0x00410917 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x0041091b mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x00410920 mov rax, qword [rsp + 0x10] | rax = *((rsp + 0x10)); 0x00410925 cmp rax, rbx | | if (rax != rbx) { 0x00410928 jne 0x41095a | goto label_0; | } 0x0041092a mov rax, qword [rsp + 0x10] | rax = *((rsp + 0x10)); 0x0041092f mov rcx, qword [rax] | rcx = *(rax); 0x00410932 mov rax, rbx | rax = rbx; 0x00410935 lock cmpxchg qword [r13 + 8], rcx | __asm ("lock cmpxchg qword [r13 + 8], rcx"); 0x0041093b cmp rbx, rax | | if (rbx == rax) { 0x0041093e je 0x410a8f | goto label_6; | } 0x00410944 jmp 0x41095a | | while ((cl & 1) != 0) { 0x00410946 mov edx, ecx | edx = ecx; 0x00410948 xor edx, 1 | edx ^= 1; 0x0041094b mov eax, ecx | eax = ecx; 0x0041094d lock cmpxchg dword [rbx + 8], edx | __asm ("lock cmpxchg dword [rbx + 8], edx"); 0x00410952 cmp ecx, eax | | if (ecx == eax) { 0x00410954 je 0x410a8f | goto label_6; | } | label_0: 0x0041095a mov ecx, dword [rbx + 8] | ecx = *((rbx + 8)); 0x0041095d test cl, 1 | 0x00410960 jne 0x410946 | | } 0x00410962 lea edx, [rcx - 2] | edx = rcx - 2; 0x00410965 mov eax, ecx | eax = ecx; 0x00410967 lock cmpxchg dword [rbx + 8], edx | __asm ("lock cmpxchg dword [rbx + 8], edx"); 0x0041096c cmp ecx, eax | | if (ecx != eax) { 0x0041096e jne 0x41095a | goto label_0; | } 0x00410970 jmp 0x410900 | goto label_1; | label_4: 0x00410972 mov rdi, r14 | rdi = r14; 0x00410975 call 0x4042b0 | pthread_mutex_lock (); 0x0041097a mov rbx, qword [r13 + 8] | rbx = *((r13 + 8)); 0x0041097e test rbx, rbx | | if (rbx == 0) { 0x00410981 je 0x4109b3 | goto label_7; | } 0x00410983 mov rdi, r14 | rdi = r14; 0x00410986 call 0x404380 | pthread_mutex_unlock (); 0x0041098b jmp 0x410909 | goto label_2; | label_5: 0x00410990 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x00410994 cmp rbx, rax | | if (rbx != rax) { 0x00410997 jne 0x410917 | goto label_3; | } 0x0041099d mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x004109a1 cmp rbx, rax | | if (rbx != rax) { 0x004109a4 jne 0x410917 | goto label_3; | } 0x004109aa mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x004109ae jmp 0x410917 | goto label_3; | label_7: 0x004109b3 mov ebp, dword [r13 + 0x64] | ebp = *((r13 + 0x64)); 0x004109b7 mov ebx, ebp | ebx = *((r13 + 0x64)); 0x004109b9 neg ebx | ebx = -ebx; | if (rbx < rax) { 0x004109bb cmovl ebx, ebp | ebx = ebp; | } 0x004109be mov eax, ebx | eax = ebx; 0x004109c0 shl eax, 5 | eax <<= 5; 0x004109c3 or eax, 0x10 | eax |= 0x10; 0x004109c6 movsxd rsi, eax | rsi = (int64_t) eax; 0x004109c9 mov rdi, r15 | 0x004109cc call 0x416a30 | BloombergLP::bdlma::InfrequentDeleteBlockList::allocate(unsigned long) (r15, rsi); 0x004109d1 mov rcx, qword [r13 + 0x70] | rcx = *((r13 + 0x70)); 0x004109d5 mov qword [rax], rcx | *(rax) = rcx; 0x004109d8 mov dword [rsp + 0xc], ebx | *((rsp + 0xc)) = ebx; 0x004109dc mov dword [rax + 8], ebx | *((rax + 8)) = ebx; 0x004109df lea rbx, [rax + 0x10] | rbx = rax + 0x10; 0x004109e3 mov qword [rsp + 0x20], rbx | *((rsp + 0x20)) = rbx; 0x004109e8 test ebp, ebp | | if (ebp == 0) { 0x004109ea je 0x410a35 | goto label_8; | } 0x004109ec mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x004109f1 mov rbx, rax | rbx = rax; 0x004109f4 add rbx, 0x30 | rbx += 0x30; 0x004109f8 mov ebp, dword [rsp + 0xc] | ebp = *((rsp + 0xc)); | do { 0x004109fc mov qword [rbx - 0x20], rbx | *((rbx - 0x20)) = rbx; 0x00410a00 mov dword [rbx - 0x18], 0 | *((rbx - 0x18)) = 0; 0x00410a07 mov rax, qword [r13 + 0x50] | rax = *((r13 + 0x50)); 0x00410a0b test rax, rax | | if (rax == 0) { 0x00410a0e je 0x410ab1 | goto label_9; | } 0x00410a14 mov rdx, qword [r13 + 0x88] | rdx = *((r13 + 0x88)); 0x00410a1b lea rsi, [rbx - 0x10] | rsi = rbx - 0x10; 0x00410a1f mov rdi, r12 | rdi = r12; 0x00410a22 call rax | void (*rax)() (); 0x00410a24 add rbx, 0x20 | rbx += 0x20; 0x00410a28 dec ebp | ebp--; 0x00410a2a jne 0x4109fc | | } while (ebp != 0); 0x00410a2c add rbx, 0xffffffffffffffe0 | rbx += 0xffffffffffffffe0; 0x00410a30 mov rax, qword [rsp + 0x18] | rax = *((rsp + 0x18)); | label_8: 0x00410a35 mov dword [rbx - 0x18], 0 | *((rbx - 0x18)) = 0; 0x00410a3c mov qword [r13 + 0x70], rax | *((r13 + 0x70)) = rax; 0x00410a40 mov rdx, qword [rsp + 0x20] | rdx = *((rsp + 0x20)); | do { 0x00410a45 mov rcx, qword [r13 + 8] | rcx = *((r13 + 8)); 0x00410a49 mov qword [rbx - 0x20], rcx | *((rbx - 0x20)) = rcx; 0x00410a4d mov rax, rcx | rax = rcx; 0x00410a50 lock cmpxchg qword [r13 + 8], rdx | __asm ("lock cmpxchg qword [r13 + 8], rdx"); 0x00410a56 cmp rcx, rax | 0x00410a59 jne 0x410a45 | | } while (rcx != rax); 0x00410a5b mov eax, dword [rsp + 0xc] | eax = *((rsp + 0xc)); 0x00410a5f lock add dword [r13 + 0x6c], eax | *((r13 + 0x6c)) += eax; 0x00410a64 lock add dword [r13 + 0x68], eax | *((r13 + 0x68)) += eax; 0x00410a69 mov eax, dword [r13 + 0x64] | eax = *((r13 + 0x64)); 0x00410a6d test eax, eax | | if (eax < 0) { 0x00410a6f jns 0x410a82 | 0x00410a71 mov ecx, eax | ecx = eax; 0x00410a73 neg ecx | ecx = -ecx; 0x00410a75 lea edx, [rax + rax] | edx = rax + rax; 0x00410a78 cmp eax, 0xffffffe0 | | if (eax <= 0xffffffe0) { 0x00410a7b cmovle edx, ecx | edx = ecx; | } 0x00410a7e mov dword [r13 + 0x64], edx | *((r13 + 0x64)) = edx; | } 0x00410a82 mov rdi, r14 | rdi = r14; 0x00410a85 call 0x404380 | pthread_mutex_unlock (); 0x00410a8a jmp 0x410900 | goto label_1; | label_6: 0x00410a8f mov qword [rbx], 0 | *(rbx) = 0; 0x00410a96 lock dec dword [r13 + 0x68] | *((r13 + 0x68))--; 0x00410a9b add rbx, 0x10 | rbx += 0x10; 0x00410a9f mov rax, rbx | rax = rbx; 0x00410aa2 add rsp, 0x28 | 0x00410aa6 pop rbx | 0x00410aa7 pop r12 | 0x00410aa9 pop r13 | 0x00410aab pop r14 | 0x00410aad pop r15 | 0x00410aaf pop rbp | 0x00410ab0 ret | return rax; | label_9: 0x00410ab1 mov edi, 8 | edi = 8; 0x00410ab6 call 0x403e40 | cxa_allocate_exception (); 0x00410abb mov qword [rax], 0x4417f0 | *(rax) = fcn.004041c0; 0x00410ac2 mov esi, 0x4417c8 | 0x00410ac7 mov edx, 0x4041c0 | 0x00410acc mov rdi, rax | 0x00410acf call 0x403f10 | return cxa_throw (rax, obj.typeinfo_for_std::__1::bad_function_call, fcn.004041c0); | }