; assembly | /* r2dec pseudo code output */ | /* bslmt_latch.t/assume @ 0x409440 */ | #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&) */ 0x00409440 push rbp | 0x00409441 push r15 | 0x00409443 push r14 | 0x00409445 push r13 | 0x00409447 push r12 | 0x00409449 push rbx | 0x0040944a sub rsp, 0x28 | 0x0040944e mov rbp, rsi | 0x00409451 mov r13, rdi | r13 = rdi; 0x00409454 cmp dword [rdi + 0x58], 1 | | if (*((rdi + 0x58)) == 1) { 0x00409458 jne 0x4094e9 | 0x0040945e mov rcx, qword [rbp] | rcx = *(rbp); 0x00409462 movabs rdx, 0x112e0be826d694b3 | rdx = 0x112e0be826d694b3; 0x0040946c mov rax, rcx | rax = rcx; 0x0040946f imul rdx | rdx:rax = rax * rdx; 0x00409472 mov rax, rdx | rax = rdx; 0x00409475 shr rax, 0x3f | rax >>= 0x3f; 0x00409479 sar rdx, 0x1a | rdx >>= 0x1a; 0x0040947d add rdx, rax | rdx += rax; 0x00409480 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x00409486 mov qword [rsp], rdx | *(rsp) = rdx; 0x0040948a lea esi, [rax + rcx + 0x3b9ac9ff] | esi = rax + rcx + 0x3b9ac9ff; 0x00409491 add eax, ecx | eax += ecx; 0x00409493 cmp esi, 0x773593ff | | if (esi >= 0x773593ff) { 0x00409499 jb 0x4094c3 | 0x0040949b cdqe | rax = (int64_t) eax; 0x0040949d imul rcx, rax, 0x44b82fa1 | rcx = rax * 0x44b82fa1; 0x004094a4 mov rsi, rcx | rsi = rcx; 0x004094a7 shr rsi, 0x3f | rsi >>= 0x3f; 0x004094ab sar rcx, 0x3c | rcx >>= 0x3c; 0x004094af add ecx, esi | ecx += esi; 0x004094b1 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x004094b4 add rdx, rcx | rdx += rcx; 0x004094b7 mov qword [rsp], rdx | *(rsp) = rdx; 0x004094bb imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x004094c1 sub eax, ecx | eax -= ecx; | } 0x004094c3 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; 0x004094c7 test rdx, rdx | | if (rdx <= 0) { 0x004094ca jle 0x40959a | goto label_0; | } 0x004094d0 test eax, eax | | if (eax >= 0) { 0x004094d2 jns 0x4095b3 | goto label_1; | } 0x004094d8 dec rdx | rdx--; 0x004094db mov qword [rsp], rdx | *(rsp) = rdx; 0x004094df add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x004094e4 jmp 0x4095af | goto label_2; | } 0x004094e9 call 0x403d30 | rax = std::_1::chrono::steady_clock::now() (); 0x004094ee mov rbx, rax | rbx = rax; 0x004094f1 mov eax, 0xffffffff | eax = 0xffffffff; 0x004094f6 cmp rbx, qword [rbp] | | if (rbx >= *(rbp)) { 0x004094fa jge 0x4095be | goto label_3; | } 0x00409500 movabs r14, 0x112e0be826d694b3 | r14 = 0x112e0be826d694b3; 0x0040950a lea r15, [rsp + 0x18] | r15 = rsp + 0x18; 0x0040950f mov r12, rsp | r12 = rsp; 0x00409512 nop word cs:[rax + rax] | 0x0040951c nop dword [rax] | | do { 0x00409520 cmp dword [r13 + 0x58], 1 | | if (*((r13 + 0x58)) == 1) { 0x00409525 jne 0x409530 | 0x00409527 call 0x430f80 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x0040952c jmp 0x409535 | | } else { 0x00409530 call 0x431010 | rax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00409535 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x0040953a mov dword [rsp + 0x20], edx | *((rsp + 0x20)) = edx; 0x0040953e mov rcx, qword [rbp] | rcx = *(rbp); 0x00409542 sub rcx, rbx | rcx -= rbx; 0x00409545 mov rax, rcx | rax = rcx; 0x00409548 imul r14 | rdx:rax = rax * r14; 0x0040954b mov rax, rdx | rax = rdx; 0x0040954e shr rax, 0x3f | rax >>= 0x3f; 0x00409552 sar rdx, 0x1a | rdx >>= 0x1a; 0x00409556 add rdx, rax | rdx += rax; 0x00409559 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x0040955f add ecx, eax | ecx += eax; 0x00409561 mov rdi, r15 | 0x00409564 mov rsi, rdx | 0x00409567 mov edx, ecx | 0x00409569 call 0x431130 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, ecx); 0x0040956e movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00409571 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00409575 mov rdi, r13 | 0x00409578 mov rsi, r12 | 0x0040957b call 0x409bc0 | eax = BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, r12); 0x00409580 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00409583 jne 0x4095be | goto label_3; | } 0x00409585 call 0x403d30 | rax = std::_1::chrono::steady_clock::now() (); 0x0040958a mov rbx, rax | rbx = rax; 0x0040958d cmp rax, qword [rbp] | 0x00409591 jl 0x409520 | | } while (rax < *(rbp)); 0x00409593 mov eax, 0xffffffff | eax = 0xffffffff; 0x00409598 jmp 0x4095be | goto label_3; | label_0: 0x0040959a test eax, eax | | if (eax > 0) { 0x0040959c jle 0x4095b3 | 0x0040959e test rdx, rdx | | if (rdx == 0) { 0x004095a1 je 0x4095b3 | goto label_1; | } 0x004095a3 inc rdx | rdx++; 0x004095a6 mov qword [rsp], rdx | *(rsp) = rdx; 0x004095aa add eax, 0xc4653600 | eax += 0xc4653600; | label_2: 0x004095af mov dword [rsp + 8], eax | *((rsp + 8)) = eax; | } | label_1: 0x004095b3 mov rsi, rsp | 0x004095b6 mov rdi, r13 | 0x004095b9 call 0x409bc0 | BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, rsp); | label_3: 0x004095be add rsp, 0x28 | 0x004095c2 pop rbx | 0x004095c3 pop r12 | 0x004095c5 pop r13 | 0x004095c7 pop r14 | 0x004095c9 pop r15 | 0x004095cb pop rbp | 0x004095cc ret | return rax; | }