; assembly | /* r2dec pseudo code output */ | /* bslmt_latch.t/none @ 0x4096f0 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Latch__HalfClock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::Latch__std::__1::chrono::time_point_HalfClock__std::__1::chrono::dur () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Latch_HalfClock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::Latch_std::_1::chrono::time_point_HalfClock_std::_1::chrono::dur (uint32_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_10h; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::bslmt::ChronoUtil::timedWait > >(BloombergLP::bslmt::Latch*, std::__1::chrono::time_point > > const&) */ 0x004096f0 push rbp | 0x004096f1 push r15 | 0x004096f3 push r14 | 0x004096f5 push r13 | 0x004096f7 push r12 | 0x004096f9 push rbx | 0x004096fa sub rsp, 0x28 | 0x004096fe mov rbx, rsi | rbx = rsi; 0x00409701 mov r14, rdi | r14 = rdi; 0x00409704 call 0x403d30 | rax = std::_1::chrono::steady_clock::now() (); 0x00409709 mov r15, rax | r15 = rax; 0x0040970c shr r15, 0x3f | r15 >>= 0x3f; 0x00409710 add r15, rax | r15 += rax; 0x00409713 sar r15, 1 | r15 >>= 1; 0x00409716 mov eax, 0xffffffff | eax = 0xffffffff; 0x0040971b cmp r15, qword [rbx] | | if (r15 >= *(rbx)) { 0x0040971e jge 0x4097e3 | goto label_0; | } 0x00409724 movabs r13, 0x112e0be826d694b3 | r13 = 0x112e0be826d694b3; 0x0040972e mov r12, rsp | r12 = rsp; 0x00409731 lea rbp, [rsp + 0x10] | rbp = rsp + 0x10; 0x00409736 nop word cs:[rax + rax] | | do { 0x00409740 mov eax, dword [r14 + 0x58] | eax = *((r14 + 0x58)); 0x00409744 test eax, eax | | if (eax != 0) { 0x00409746 je 0x409760 | 0x00409748 cmp eax, 1 | | if (eax != 1) { 0x0040974b jne 0x409770 | goto label_1; | } 0x0040974d call 0x431140 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00409752 jmp 0x409765 | | } else { 0x00409760 call 0x4311d0 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00409765 jmp 0x409774 | goto label_2; | label_1: 0x00409770 xor edx, edx | edx = 0; 0x00409772 xor eax, eax | eax = 0; | label_2: 0x00409774 mov qword [rsp], rax | *(rsp) = rax; 0x00409778 mov dword [rsp + 8], edx | *((rsp + 8)) = edx; 0x0040977c mov rcx, qword [rbx] | rcx = *(rbx); 0x0040977f sub rcx, r15 | rcx -= r15; 0x00409782 mov rax, rcx | rax = rcx; 0x00409785 imul r13 | rdx:rax = rax * r13; 0x00409788 mov rax, rdx | rax = rdx; 0x0040978b shr rax, 0x3f | rax >>= 0x3f; 0x0040978f sar rdx, 0x1a | rdx >>= 0x1a; 0x00409793 add rdx, rax | rdx += rax; 0x00409796 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x0040979c add ecx, eax | ecx += eax; 0x0040979e mov rdi, r12 | 0x004097a1 mov rsi, rdx | 0x004097a4 mov edx, ecx | 0x004097a6 call 0x4312f0 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r12, rdx, ecx); 0x004097ab movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x004097ae movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x004097b3 mov rdi, r14 | 0x004097b6 mov rsi, rbp | 0x004097b9 call 0x409d30 | eax = BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r14, rbp); 0x004097be cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x004097c1 jne 0x4097e3 | goto label_0; | } 0x004097c3 call 0x403d30 | rax = std::_1::chrono::steady_clock::now() (); 0x004097c8 mov r15, rax | r15 = rax; 0x004097cb shr r15, 0x3f | r15 >>= 0x3f; 0x004097cf add r15, rax | r15 += rax; 0x004097d2 sar r15, 1 | r15 >>= 1; 0x004097d5 cmp r15, qword [rbx] | 0x004097d8 jl 0x409740 | | } while (r15 < *(rbx)); 0x004097de mov eax, 0xffffffff | eax = 0xffffffff; | label_0: 0x004097e3 add rsp, 0x28 | 0x004097e7 pop rbx | 0x004097e8 pop r12 | 0x004097ea pop r13 | 0x004097ec pop r14 | 0x004097ee pop r15 | 0x004097f0 pop rbp | 0x004097f1 ret | return rax; | }