; assembly | /* r2dec pseudo code output */ | /* bslmt_condition.t/none @ 0x402e00 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Condition__BloombergLP::bslmt::Mutex__std::__1::chrono::system_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000l______BloombergLP::bslmt::Condition__Bloomber () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Condition_BloombergLP::bslmt::Mutex_std::_1::chrono::system_clock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000l_BloombergLP::bslmt::Condition_Bloomber (uint32_t arg3, int64_t arg2, uint32_t arg1) { | int64_t var_8h; | int64_t var_18h; | int64_t var_20h; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::bslmt::ChronoUtil::timedWait > >(BloombergLP::bslmt::Condition*, BloombergLP::bslmt::Mutex*, std::__1::chrono::time_point > > const&) */ 0x00402e00 push rbp | 0x00402e01 push r15 | 0x00402e03 push r14 | 0x00402e05 push r13 | 0x00402e07 push r12 | 0x00402e09 push rbx | 0x00402e0a sub rsp, 0x28 | 0x00402e0e mov rbp, rdx | 0x00402e11 mov r14, rsi | r14 = rsi; 0x00402e14 mov rbx, rdi | rbx = rdi; 0x00402e17 cmp dword [rdi + 0x30], 0 | | if (*((rdi + 0x30)) == 0) { 0x00402e1b je 0x402ef7 | goto label_0; | } 0x00402e21 call 0x4014e0 | rax = std::_1::chrono::system_clock::now() (); 0x00402e26 mov r15, rax | r15 = rax; 0x00402e29 mov eax, 0xffffffff | eax = 0xffffffff; 0x00402e2e cmp r15, qword [rbp] | | if (r15 >= *(rbp)) { 0x00402e32 jge 0x402fa4 | goto label_1; | } 0x00402e38 lea r12, [rsp + 0x18] | r12 = rsp + 0x18; 0x00402e3d mov r13, rsp | r13 = rsp; | do { 0x00402e40 mov eax, dword [rbx + 0x30] | eax = *((rbx + 0x30)); 0x00402e43 test eax, eax | | if (eax != 0) { 0x00402e45 je 0x402e60 | 0x00402e47 cmp eax, 1 | | if (eax != 1) { 0x00402e4a jne 0x402e70 | goto label_2; | } 0x00402e4c call 0x4035f0 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00402e51 jmp 0x402e65 | | } else { 0x00402e60 call 0x403680 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00402e65 jmp 0x402e74 | goto label_3; | label_2: 0x00402e70 xor edx, edx | edx = 0; 0x00402e72 xor eax, eax | eax = 0; | label_3: 0x00402e74 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x00402e79 mov dword [rsp + 0x20], edx | *((rsp + 0x20)) = edx; 0x00402e7d mov rcx, qword [rbp] | rcx = *(rbp); 0x00402e81 sub rcx, r15 | rcx -= r15; 0x00402e84 mov rax, rcx | rax = rcx; 0x00402e87 movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00402e91 imul rdx | rdx:rax = rax * rdx; 0x00402e94 mov rax, rdx | rax = rdx; 0x00402e97 shr rax, 0x3f | rax >>= 0x3f; 0x00402e9b sar rdx, 0x12 | rdx >>= 0x12; 0x00402e9f add rdx, rax | rdx += rax; 0x00402ea2 imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x00402ea8 add ecx, eax | ecx += eax; 0x00402eaa imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x00402eb0 mov rdi, r12 | 0x00402eb3 mov rsi, rdx | 0x00402eb6 mov edx, eax | 0x00402eb8 call 0x4037a0 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r12, rdx, eax); 0x00402ebd movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00402ec0 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00402ec4 mov rdi, rbx | 0x00402ec7 mov rsi, r14 | 0x00402eca mov rdx, r13 | 0x00402ecd call 0x403210 | eax = BloombergLP::bslmt::ConditionImpl::timedWait(BloombergLP::bslmt::Mutex*,BloombergLP::bsls::TimeIntervalconst&) (rbx, r14, r13); 0x00402ed2 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00402ed5 jne 0x402fa4 | goto label_1; | } 0x00402edb call 0x4014e0 | rax = std::_1::chrono::system_clock::now() (); 0x00402ee0 mov r15, rax | r15 = rax; 0x00402ee3 cmp rax, qword [rbp] | 0x00402ee7 jl 0x402e40 | | } while (rax < *(rbp)); 0x00402eed mov eax, 0xffffffff | eax = 0xffffffff; 0x00402ef2 jmp 0x402fa4 | goto label_1; | label_0: 0x00402ef7 mov rcx, qword [rbp] | rcx = *(rbp); 0x00402efb movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00402f05 mov rax, rcx | rax = rcx; 0x00402f08 imul rdx | rdx:rax = rax * rdx; 0x00402f0b mov rax, rdx | rax = rdx; 0x00402f0e shr rax, 0x3f | rax >>= 0x3f; 0x00402f12 sar rdx, 0x12 | rdx >>= 0x12; 0x00402f16 add rdx, rax | rdx += rax; 0x00402f19 imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x00402f1f add ecx, eax | ecx += eax; 0x00402f21 imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x00402f27 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f2b lea ecx, [rax + 0x3b9ac9ff] | ecx = rax + 0x3b9ac9ff; 0x00402f31 cmp ecx, 0x773593ff | | if (ecx >= 0x773593ff) { 0x00402f37 jb 0x402f62 | 0x00402f39 movsxd rcx, eax | rcx = (int64_t) eax; 0x00402f3c imul rcx, rcx, 0x44b82fa1 | rcx *= 0x44b82fa1; 0x00402f43 mov rsi, rcx | rsi = rcx; 0x00402f46 shr rsi, 0x3f | rsi >>= 0x3f; 0x00402f4a sar rcx, 0x3c | rcx >>= 0x3c; 0x00402f4e add ecx, esi | ecx += esi; 0x00402f50 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x00402f53 add rdx, rcx | rdx += rcx; 0x00402f56 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f5a imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x00402f60 sub eax, ecx | eax -= ecx; | } 0x00402f62 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; 0x00402f66 test rdx, rdx | | if (rdx > 0) { 0x00402f69 jle 0x402f7d | 0x00402f6b test eax, eax | | if (eax >= 0) { 0x00402f6d jns 0x402f96 | goto label_4; | } 0x00402f6f dec rdx | rdx--; 0x00402f72 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f76 add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x00402f7b jmp 0x402f92 | | } else { 0x00402f7d test eax, eax | | if (eax <= 0) { 0x00402f7f jle 0x402f96 | goto label_4; | } 0x00402f81 test rdx, rdx | | if (rdx == 0) { 0x00402f84 je 0x402f96 | goto label_4; | } 0x00402f86 inc rdx | rdx++; 0x00402f89 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f8d add eax, 0xc4653600 | eax += 0xc4653600; | } 0x00402f92 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; | label_4: 0x00402f96 mov rdx, rsp | 0x00402f99 mov rdi, rbx | 0x00402f9c mov rsi, r14 | 0x00402f9f call 0x403210 | BloombergLP::bslmt::ConditionImpl::timedWait(BloombergLP::bslmt::Mutex*,BloombergLP::bsls::TimeIntervalconst&) (rbx, r14, rsp); | label_1: 0x00402fa4 add rsp, 0x28 | 0x00402fa8 pop rbx | 0x00402fa9 pop r12 | 0x00402fab pop r13 | 0x00402fad pop r14 | 0x00402faf pop r15 | 0x00402fb1 pop rbp | 0x00402fb2 ret | return rax; | }