; assembly | /* r2dec pseudo code output */ | /* bslmt_condition.t/assume @ 0x402de0 */ | #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&) */ 0x00402de0 push rbp | 0x00402de1 push r15 | 0x00402de3 push r14 | 0x00402de5 push r13 | 0x00402de7 push r12 | 0x00402de9 push rbx | 0x00402dea sub rsp, 0x28 | 0x00402dee mov rbp, rdx | 0x00402df1 mov r14, rsi | r14 = rsi; 0x00402df4 mov rbx, rdi | rbx = rdi; 0x00402df7 cmp dword [rdi + 0x30], 0 | | if (*((rdi + 0x30)) == 0) { 0x00402dfb je 0x402eb8 | goto label_0; | } 0x00402e01 call 0x4014e0 | rax = std::_1::chrono::system_clock::now() (); 0x00402e06 mov r15, rax | r15 = rax; 0x00402e09 mov eax, 0xffffffff | eax = 0xffffffff; 0x00402e0e cmp r15, qword [rbp] | | if (r15 >= *(rbp)) { 0x00402e12 jge 0x402f65 | goto label_1; | } 0x00402e18 lea r12, [rsp + 0x18] | r12 = rsp + 0x18; 0x00402e1d mov r13, rsp | r13 = rsp; | do { 0x00402e20 cmp dword [rbx + 0x30], 1 | | if (*((rbx + 0x30)) == 1) { 0x00402e24 jne 0x402e30 | 0x00402e26 call 0x403570 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00402e2b jmp 0x402e35 | | } else { 0x00402e30 call 0x403600 | rax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00402e35 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x00402e3a mov dword [rsp + 0x20], edx | *((rsp + 0x20)) = edx; 0x00402e3e mov rcx, qword [rbp] | rcx = *(rbp); 0x00402e42 sub rcx, r15 | rcx -= r15; 0x00402e45 mov rax, rcx | rax = rcx; 0x00402e48 movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00402e52 imul rdx | rdx:rax = rax * rdx; 0x00402e55 mov rax, rdx | rax = rdx; 0x00402e58 shr rax, 0x3f | rax >>= 0x3f; 0x00402e5c sar rdx, 0x12 | rdx >>= 0x12; 0x00402e60 add rdx, rax | rdx += rax; 0x00402e63 imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x00402e69 add ecx, eax | ecx += eax; 0x00402e6b imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x00402e71 mov rdi, r12 | 0x00402e74 mov rsi, rdx | 0x00402e77 mov edx, eax | 0x00402e79 call 0x403720 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r12, rdx, eax); 0x00402e7e movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00402e81 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00402e85 mov rdi, rbx | 0x00402e88 mov rsi, r14 | 0x00402e8b mov rdx, r13 | 0x00402e8e call 0x403190 | eax = BloombergLP::bslmt::ConditionImpl::timedWait(BloombergLP::bslmt::Mutex*,BloombergLP::bsls::TimeIntervalconst&) (rbx, r14, r13); 0x00402e93 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00402e96 jne 0x402f65 | goto label_1; | } 0x00402e9c call 0x4014e0 | rax = std::_1::chrono::system_clock::now() (); 0x00402ea1 mov r15, rax | r15 = rax; 0x00402ea4 cmp rax, qword [rbp] | 0x00402ea8 jl 0x402e20 | | } while (rax < *(rbp)); 0x00402eae mov eax, 0xffffffff | eax = 0xffffffff; 0x00402eb3 jmp 0x402f65 | goto label_1; | label_0: 0x00402eb8 mov rcx, qword [rbp] | rcx = *(rbp); 0x00402ebc movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00402ec6 mov rax, rcx | rax = rcx; 0x00402ec9 imul rdx | rdx:rax = rax * rdx; 0x00402ecc mov rax, rdx | rax = rdx; 0x00402ecf shr rax, 0x3f | rax >>= 0x3f; 0x00402ed3 sar rdx, 0x12 | rdx >>= 0x12; 0x00402ed7 add rdx, rax | rdx += rax; 0x00402eda imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x00402ee0 add ecx, eax | ecx += eax; 0x00402ee2 imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x00402ee8 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402eec lea ecx, [rax + 0x3b9ac9ff] | ecx = rax + 0x3b9ac9ff; 0x00402ef2 cmp ecx, 0x773593ff | | if (ecx >= 0x773593ff) { 0x00402ef8 jb 0x402f23 | 0x00402efa movsxd rcx, eax | rcx = (int64_t) eax; 0x00402efd imul rcx, rcx, 0x44b82fa1 | rcx *= 0x44b82fa1; 0x00402f04 mov rsi, rcx | rsi = rcx; 0x00402f07 shr rsi, 0x3f | rsi >>= 0x3f; 0x00402f0b sar rcx, 0x3c | rcx >>= 0x3c; 0x00402f0f add ecx, esi | ecx += esi; 0x00402f11 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x00402f14 add rdx, rcx | rdx += rcx; 0x00402f17 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f1b imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x00402f21 sub eax, ecx | eax -= ecx; | } 0x00402f23 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; 0x00402f27 test rdx, rdx | | if (rdx > 0) { 0x00402f2a jle 0x402f3e | 0x00402f2c test eax, eax | | if (eax >= 0) { 0x00402f2e jns 0x402f57 | goto label_2; | } 0x00402f30 dec rdx | rdx--; 0x00402f33 mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f37 add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x00402f3c jmp 0x402f53 | | } else { 0x00402f3e test eax, eax | | if (eax <= 0) { 0x00402f40 jle 0x402f57 | goto label_2; | } 0x00402f42 test rdx, rdx | | if (rdx == 0) { 0x00402f45 je 0x402f57 | goto label_2; | } 0x00402f47 inc rdx | rdx++; 0x00402f4a mov qword [rsp], rdx | *(rsp) = rdx; 0x00402f4e add eax, 0xc4653600 | eax += 0xc4653600; | } 0x00402f53 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; | label_2: 0x00402f57 mov rdx, rsp | 0x00402f5a mov rdi, rbx | 0x00402f5d mov rsi, r14 | 0x00402f60 call 0x403190 | BloombergLP::bslmt::ConditionImpl::timedWait(BloombergLP::bslmt::Mutex*,BloombergLP::bsls::TimeIntervalconst&) (rbx, r14, rsp); | label_1: 0x00402f65 add rsp, 0x28 | 0x00402f69 pop rbx | 0x00402f6a pop r12 | 0x00402f6c pop r13 | 0x00402f6e pop r14 | 0x00402f70 pop r15 | 0x00402f72 pop rbp | 0x00402f73 ret | return rax; | }