; assembly | /* r2dec pseudo code output */ | /* bslmt_latch.t/none @ 0x409540 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Latch__std::__1::chrono::steady_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::Latch__std::__1::chrono::time_point_std::__1::c () | int64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Latch_std::_1::chrono::steady_clock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::Latch_std::_1::chrono::time_point_std::_1::c (uint32_t arg2, uint32_t arg1) { | int64_t var_8h; | int64_t var_18h; | int64_t var_20h; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::bslmt::ChronoUtil::timedWait > >(BloombergLP::bslmt::Latch*, std::__1::chrono::time_point > > const&) */ 0x00409540 push rbp | 0x00409541 push r15 | 0x00409543 push r14 | 0x00409545 push r13 | 0x00409547 push r12 | 0x00409549 push rbx | 0x0040954a sub rsp, 0x28 | 0x0040954e mov rbp, rsi | 0x00409551 mov r13, rdi | r13 = rdi; 0x00409554 cmp dword [rdi + 0x58], 1 | | if (*((rdi + 0x58)) == 1) { 0x00409558 jne 0x4095e9 | 0x0040955e mov rcx, qword [rbp] | rcx = *(rbp); 0x00409562 movabs rdx, 0x112e0be826d694b3 | rdx = 0x112e0be826d694b3; 0x0040956c mov rax, rcx | rax = rcx; 0x0040956f imul rdx | rdx:rax = rax * rdx; 0x00409572 mov rax, rdx | rax = rdx; 0x00409575 shr rax, 0x3f | rax >>= 0x3f; 0x00409579 sar rdx, 0x1a | rdx >>= 0x1a; 0x0040957d add rdx, rax | rdx += rax; 0x00409580 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x00409586 mov qword [rsp], rdx | *(rsp) = rdx; 0x0040958a lea esi, [rax + rcx + 0x3b9ac9ff] | esi = rax + rcx + 0x3b9ac9ff; 0x00409591 add eax, ecx | eax += ecx; 0x00409593 cmp esi, 0x773593ff | | if (esi >= 0x773593ff) { 0x00409599 jb 0x4095c3 | 0x0040959b cdqe | rax = (int64_t) eax; 0x0040959d imul rcx, rax, 0x44b82fa1 | rcx = rax * 0x44b82fa1; 0x004095a4 mov rsi, rcx | rsi = rcx; 0x004095a7 shr rsi, 0x3f | rsi >>= 0x3f; 0x004095ab sar rcx, 0x3c | rcx >>= 0x3c; 0x004095af add ecx, esi | ecx += esi; 0x004095b1 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x004095b4 add rdx, rcx | rdx += rcx; 0x004095b7 mov qword [rsp], rdx | *(rsp) = rdx; 0x004095bb imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x004095c1 sub eax, ecx | eax -= ecx; | } 0x004095c3 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; 0x004095c7 test rdx, rdx | | if (rdx <= 0) { 0x004095ca jle 0x4096bd | goto label_0; | } 0x004095d0 test eax, eax | | if (eax >= 0) { 0x004095d2 jns 0x4096d6 | goto label_1; | } 0x004095d8 dec rdx | rdx--; 0x004095db mov qword [rsp], rdx | *(rsp) = rdx; 0x004095df add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x004095e4 jmp 0x4096d2 | goto label_2; | } 0x004095e9 call 0x403d30 | rax = std::_1::chrono::steady_clock::now() (); 0x004095ee mov rbx, rax | rbx = rax; 0x004095f1 mov eax, 0xffffffff | eax = 0xffffffff; 0x004095f6 cmp rbx, qword [rbp] | | if (rbx >= *(rbp)) { 0x004095fa jge 0x4096e1 | goto label_3; | } 0x00409600 movabs r14, 0x112e0be826d694b3 | r14 = 0x112e0be826d694b3; 0x0040960a lea r15, [rsp + 0x18] | r15 = rsp + 0x18; 0x0040960f mov r12, rsp | r12 = rsp; 0x00409612 nop word cs:[rax + rax] | 0x0040961c nop dword [rax] | | do { 0x00409620 mov eax, dword [r13 + 0x58] | eax = *((r13 + 0x58)); 0x00409624 test eax, eax | | if (eax != 0) { 0x00409626 je 0x409640 | 0x00409628 cmp eax, 1 | | if (eax != 1) { 0x0040962b jne 0x409650 | goto label_4; | } 0x0040962d call 0x431140 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00409632 jmp 0x409645 | | } else { 0x00409640 call 0x4311d0 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00409645 jmp 0x409654 | goto label_5; | label_4: 0x00409650 xor edx, edx | edx = 0; 0x00409652 xor eax, eax | eax = 0; | label_5: 0x00409654 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x00409659 mov dword [rsp + 0x20], edx | *((rsp + 0x20)) = edx; 0x0040965d mov rcx, qword [rbp] | rcx = *(rbp); 0x00409661 sub rcx, rbx | rcx -= rbx; 0x00409664 mov rax, rcx | rax = rcx; 0x00409667 imul r14 | rdx:rax = rax * r14; 0x0040966a mov rax, rdx | rax = rdx; 0x0040966d shr rax, 0x3f | rax >>= 0x3f; 0x00409671 sar rdx, 0x1a | rdx >>= 0x1a; 0x00409675 add rdx, rax | rdx += rax; 0x00409678 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x0040967e add ecx, eax | ecx += eax; 0x00409680 mov rdi, r15 | 0x00409683 mov rsi, rdx | 0x00409686 mov edx, ecx | 0x00409688 call 0x4312f0 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, ecx); 0x0040968d movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00409690 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00409694 mov rdi, r13 | 0x00409697 mov rsi, r12 | 0x0040969a call 0x409d30 | eax = BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, r12); 0x0040969f cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x004096a2 jne 0x4096e1 | goto label_3; | } 0x004096a4 call 0x403d30 | rax = std::_1::chrono::steady_clock::now() (); 0x004096a9 mov rbx, rax | rbx = rax; 0x004096ac cmp rax, qword [rbp] | 0x004096b0 jl 0x409620 | | } while (rax < *(rbp)); 0x004096b6 mov eax, 0xffffffff | eax = 0xffffffff; 0x004096bb jmp 0x4096e1 | goto label_3; | label_0: 0x004096bd test eax, eax | | if (eax > 0) { 0x004096bf jle 0x4096d6 | 0x004096c1 test rdx, rdx | | if (rdx == 0) { 0x004096c4 je 0x4096d6 | goto label_1; | } 0x004096c6 inc rdx | rdx++; 0x004096c9 mov qword [rsp], rdx | *(rsp) = rdx; 0x004096cd add eax, 0xc4653600 | eax += 0xc4653600; | label_2: 0x004096d2 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; | } | label_1: 0x004096d6 mov rsi, rsp | 0x004096d9 mov rdi, r13 | 0x004096dc call 0x409d30 | BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, rsp); | label_3: 0x004096e1 add rsp, 0x28 | 0x004096e5 pop rbx | 0x004096e6 pop r12 | 0x004096e8 pop r13 | 0x004096ea pop r14 | 0x004096ec pop r15 | 0x004096ee pop rbp | 0x004096ef ret | return rax; | }