; assembly | /* r2dec pseudo code output */ | /* bslmt_latch.t/assume @ 0x4092b0 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Latch__std::__1::chrono::system_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000l______BloombergLP::bslmt::Latch__std::__1::chrono::time_point_std::__1::chro () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Latch_std::_1::chrono::system_clock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000l_BloombergLP::bslmt::Latch_std::_1::chrono::time_point_std::_1::chro (int64_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&) */ 0x004092b0 push rbp | 0x004092b1 push r15 | 0x004092b3 push r14 | 0x004092b5 push r13 | 0x004092b7 push r12 | 0x004092b9 push rbx | 0x004092ba sub rsp, 0x28 | 0x004092be mov rbp, rsi | 0x004092c1 mov r13, rdi | r13 = rdi; 0x004092c4 cmp dword [rdi + 0x58], 0 | | if (*((rdi + 0x58)) == 0) { 0x004092c8 je 0x409387 | goto label_0; | } 0x004092ce call 0x403e10 | rax = std::_1::chrono::system_clock::now() (); 0x004092d3 mov rbx, rax | rbx = rax; 0x004092d6 mov eax, 0xffffffff | eax = 0xffffffff; 0x004092db cmp rbx, qword [rbp] | | if (rbx >= *(rbp)) { 0x004092df jge 0x409431 | goto label_1; | } 0x004092e5 movabs r14, 0x431bde82d7b634db | r14 = 0x431bde82d7b634db; 0x004092ef lea r15, [rsp + 0x18] | r15 = rsp + 0x18; 0x004092f4 mov r12, rsp | r12 = rsp; 0x004092f7 nop word [rax + rax] | | do { 0x00409300 cmp dword [r13 + 0x58], 1 | | if (*((r13 + 0x58)) == 1) { 0x00409305 jne 0x409310 | 0x00409307 call 0x430f80 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x0040930c jmp 0x409315 | | } else { 0x00409310 call 0x431010 | rax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00409315 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x0040931a mov dword [rsp + 0x20], edx | *((rsp + 0x20)) = edx; 0x0040931e mov rcx, qword [rbp] | rcx = *(rbp); 0x00409322 sub rcx, rbx | rcx -= rbx; 0x00409325 mov rax, rcx | rax = rcx; 0x00409328 imul r14 | rdx:rax = rax * r14; 0x0040932b mov rax, rdx | rax = rdx; 0x0040932e shr rax, 0x3f | rax >>= 0x3f; 0x00409332 sar rdx, 0x12 | rdx >>= 0x12; 0x00409336 add rdx, rax | rdx += rax; 0x00409339 imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x0040933f add ecx, eax | ecx += eax; 0x00409341 imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x00409347 mov rdi, r15 | 0x0040934a mov rsi, rdx | 0x0040934d mov edx, eax | 0x0040934f call 0x431130 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, eax); 0x00409354 movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00409357 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x0040935b mov rdi, r13 | 0x0040935e mov rsi, r12 | 0x00409361 call 0x409bc0 | eax = BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, r12); 0x00409366 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00409369 jne 0x409431 | goto label_1; | } 0x0040936f call 0x403e10 | rax = std::_1::chrono::system_clock::now() (); 0x00409374 mov rbx, rax | rbx = rax; 0x00409377 cmp rax, qword [rbp] | 0x0040937b jl 0x409300 | | } while (rax < *(rbp)); 0x0040937d mov eax, 0xffffffff | eax = 0xffffffff; 0x00409382 jmp 0x409431 | goto label_1; | label_0: 0x00409387 mov rcx, qword [rbp] | rcx = *(rbp); 0x0040938b movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00409395 mov rax, rcx | rax = rcx; 0x00409398 imul rdx | rdx:rax = rax * rdx; 0x0040939b mov rax, rdx | rax = rdx; 0x0040939e shr rax, 0x3f | rax >>= 0x3f; 0x004093a2 sar rdx, 0x12 | rdx >>= 0x12; 0x004093a6 add rdx, rax | rdx += rax; 0x004093a9 imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x004093af add ecx, eax | ecx += eax; 0x004093b1 imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x004093b7 mov qword [rsp], rdx | *(rsp) = rdx; 0x004093bb lea ecx, [rax + 0x3b9ac9ff] | ecx = rax + 0x3b9ac9ff; 0x004093c1 cmp ecx, 0x773593ff | | if (ecx >= 0x773593ff) { 0x004093c7 jb 0x4093f2 | 0x004093c9 movsxd rcx, eax | rcx = (int64_t) eax; 0x004093cc imul rcx, rcx, 0x44b82fa1 | rcx *= 0x44b82fa1; 0x004093d3 mov rsi, rcx | rsi = rcx; 0x004093d6 shr rsi, 0x3f | rsi >>= 0x3f; 0x004093da sar rcx, 0x3c | rcx >>= 0x3c; 0x004093de add ecx, esi | ecx += esi; 0x004093e0 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x004093e3 add rdx, rcx | rdx += rcx; 0x004093e6 mov qword [rsp], rdx | *(rsp) = rdx; 0x004093ea imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x004093f0 sub eax, ecx | eax -= ecx; | } 0x004093f2 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; 0x004093f6 test rdx, rdx | | if (rdx > 0) { 0x004093f9 jle 0x40940d | 0x004093fb test eax, eax | | if (eax >= 0) { 0x004093fd jns 0x409426 | goto label_2; | } 0x004093ff dec rdx | rdx--; 0x00409402 mov qword [rsp], rdx | *(rsp) = rdx; 0x00409406 add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x0040940b jmp 0x409422 | | } else { 0x0040940d test eax, eax | | if (eax <= 0) { 0x0040940f jle 0x409426 | goto label_2; | } 0x00409411 test rdx, rdx | | if (rdx == 0) { 0x00409414 je 0x409426 | goto label_2; | } 0x00409416 inc rdx | rdx++; 0x00409419 mov qword [rsp], rdx | *(rsp) = rdx; 0x0040941d add eax, 0xc4653600 | eax += 0xc4653600; | } 0x00409422 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; | label_2: 0x00409426 mov rsi, rsp | 0x00409429 mov rdi, r13 | 0x0040942c call 0x409bc0 | BloombergLP::bslmt::Latch::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, rsp); | label_1: 0x00409431 add rsp, 0x28 | 0x00409435 pop rbx | 0x00409436 pop r12 | 0x00409438 pop r13 | 0x0040943a pop r14 | 0x0040943c pop r15 | 0x0040943e pop rbp | 0x0040943f ret | return rax; | }