; assembly | /* r2dec pseudo code output */ | /* bslmt_fastpostsemaphore.t/none @ 0x407710 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::FastPostSemaphore__HalfClock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::FastPostSemaphore__std::__1::chrono::time_point_HalfCloc () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::FastPostSemaphore_HalfClock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::FastPostSemaphore_std::_1::chrono::time_point_HalfCloc (int32_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_10h; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::bslmt::ChronoUtil::timedWait > >(BloombergLP::bslmt::FastPostSemaphore*, std::__1::chrono::time_point > > const&) */ 0x00407710 push rbp | 0x00407711 push r15 | 0x00407713 push r14 | 0x00407715 push r13 | 0x00407717 push r12 | 0x00407719 push rbx | 0x0040771a sub rsp, 0x28 | 0x0040771e mov rbp, rsi | 0x00407721 mov rbx, rdi | rbx = rdi; 0x00407724 call 0x4028a0 | rax = std::_1::chrono::steady_clock::now() (); 0x00407729 mov r14, rax | r14 = rax; 0x0040772c shr r14, 0x3f | r14 >>= 0x3f; 0x00407730 add r14, rax | r14 += rax; 0x00407733 sar r14, 1 | r14 >>= 1; 0x00407736 mov r15d, 0xfffffffe | r15d = 0xfffffffe; 0x0040773c cmp r14, qword [rbp] | | if (r14 >= *(rbp)) { 0x00407740 jge 0x40789d | goto label_0; | } 0x00407746 movabs r13, 0x112e0be826d694b3 | r13 = 0x112e0be826d694b3; 0x00407750 mov r15, rsp | r15 = rsp; 0x00407753 lea r12, [rsp + 0x10] | r12 = rsp + 0x10; 0x00407758 nop dword [rax + rax] | | do { 0x00407760 mov eax, dword [rbx + 0x60] | eax = *((rbx + 0x60)); 0x00407763 test eax, eax | | if (eax != 0) { 0x00407765 je 0x407780 | 0x00407767 cmp eax, 1 | | if (eax != 1) { 0x0040776a jne 0x407790 | goto label_1; | } 0x0040776c call 0x422240 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00407771 jmp 0x407785 | | } else { 0x00407780 call 0x4222d0 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00407785 jmp 0x407794 | goto label_2; | label_1: 0x00407790 xor edx, edx | edx = 0; 0x00407792 xor eax, eax | eax = 0; | label_2: 0x00407794 mov qword [rsp], rax | *(rsp) = rax; 0x00407798 mov dword [rsp + 8], edx | *((rsp + 8)) = edx; 0x0040779c mov rcx, qword [rbp] | rcx = *(rbp); 0x004077a0 sub rcx, r14 | rcx -= r14; 0x004077a3 mov rax, rcx | rax = rcx; 0x004077a6 imul r13 | rdx:rax = rax * r13; 0x004077a9 mov rax, rdx | rax = rdx; 0x004077ac shr rax, 0x3f | rax >>= 0x3f; 0x004077b0 sar rdx, 0x1a | rdx >>= 0x1a; 0x004077b4 add rdx, rax | rdx += rax; 0x004077b7 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x004077bd add ecx, eax | ecx += eax; 0x004077bf mov rdi, r15 | 0x004077c2 mov rsi, rdx | 0x004077c5 mov edx, ecx | 0x004077c7 call 0x4223f0 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, ecx); 0x004077cc movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x004077cf movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x004077d4 mov rax, 0xfffffffff0000000 | rax = 0xfffffffff0000000; 0x004077db lock xadd qword [rbx], rax | __asm ("lock xadd qword [rbx], rax"); 0x004077e0 test eax, 0x1000000 | | if ((eax & 0x1000000) != 0) { 0x004077e5 jne 0x40783b | goto label_3; | } 0x004077e7 lea rdx, [rax - 0x10000000] | rdx = rax - 0x10000000; 0x004077ee mov rcx, rdx | rcx = rdx; 0x004077f1 sar rcx, 0x1c | rcx >>= 0x1c; 0x004077f5 and eax, 0xffffff | eax &= 0xffffff; 0x004077fa cmp rcx, rax | | if (rcx >= rax) { 0x004077fd jge 0x407895 | goto label_4; | } 0x00407803 mov rdi, rbx | 0x00407806 mov rsi, r12 | 0x00407809 call 0x406df0 | eax = BloombergLP::bslmt::FastPostSemaphoreImpl::timedWaitSlowPath(BloombergLP::bsls::TimeIntervalconst&,long long) (rbx, r12, rdx); 0x0040780e cmp eax, 0xfffffffe | | if (eax != 0xfffffffe) { 0x00407811 jne 0x40789a | goto label_5; | } 0x00407817 call 0x4028a0 | rax = std::_1::chrono::steady_clock::now() (); 0x0040781c mov r14, rax | r14 = rax; 0x0040781f shr r14, 0x3f | r14 >>= 0x3f; 0x00407823 add r14, rax | r14 += rax; 0x00407826 sar r14, 1 | r14 >>= 1; 0x00407829 cmp r14, qword [rbp] | 0x0040782d jl 0x407760 | | } while (r14 < *(rbp)); 0x00407833 mov r15d, 0xfffffffe | r15d = 0xfffffffe; 0x00407839 jmp 0x40789d | goto label_0; | label_3: 0x0040783b mov eax, 0x10000000 | eax = 0x10000000; 0x00407840 lock xadd qword [rbx], rax | __asm ("lock xadd qword [rbx], rax"); 0x00407845 mov r15d, 0xffffffff | r15d = 0xffffffff; 0x0040784b test eax, 0xffffff | | if ((eax & 0xffffff) != 0) { 0x00407850 je 0x40789d | 0x00407852 mov ecx, eax | ecx = eax; 0x00407854 and ecx, 0x1000000 | ecx &= 0x1000000; 0x0040785a test rcx, rcx | | if (rcx != 0) { 0x0040785d jne 0x40789d | goto label_0; | } 0x0040785f add rax, 0x10000000 | rax += 0x10000000; 0x00407865 and rax, 0xfffffffff0000000 | rax &= 0xfffffffff0000000; 0x0040786b cmp rax, 0x10000000 | | if (rax != 0x10000000) { 0x00407871 jne 0x40789d | goto label_0; | } 0x00407873 lea rbp, [rbx + 8] | rbp = rbx + 8; 0x00407877 mov rdi, rbp | rdi = rbp; 0x0040787a call 0x402970 | pthread_mutex_lock (); 0x0040787f mov rdi, rbp | rdi = rbp; 0x00407882 call 0x4029e0 | pthread_mutex_unlock (); 0x00407887 add rbx, 0x30 | rbx += 0x30; 0x0040788b mov rdi, rbx | rdi = rbx; 0x0040788e call 0x4026b0 | eax = pthread_cond_signal (); 0x00407893 jmp 0x40789d | goto label_0; | label_4: 0x00407895 xor r15d, r15d | r15d = 0; 0x00407898 jmp 0x40789d | goto label_0; | label_5: 0x0040789a mov r15d, eax | r15d = eax; | } | label_0: 0x0040789d mov eax, r15d | 0x004078a0 add rsp, 0x28 | 0x004078a4 pop rbx | 0x004078a5 pop r12 | 0x004078a7 pop r13 | 0x004078a9 pop r14 | 0x004078ab pop r15 | 0x004078ad pop rbp | 0x004078ae ret | return rax; | }