; assembly | /* r2dec pseudo code output */ | /* bslmt_sluice.t/assume @ 0x4063d0 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::TimedSemaphore__std::__1::chrono::steady_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::TimedSemaphore__std::__1::chrono::time () | int64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::TimedSemaphore_std::_1::chrono::steady_clock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::TimedSemaphore_std::_1::chrono::time (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::TimedSemaphore*, std::__1::chrono::time_point > > const&) */ 0x004063d0 push rbp | 0x004063d1 push r15 | 0x004063d3 push r14 | 0x004063d5 push r13 | 0x004063d7 push r12 | 0x004063d9 push rbx | 0x004063da sub rsp, 0x28 | 0x004063de mov rbp, rsi | 0x004063e1 mov r13, rdi | r13 = rdi; 0x004063e4 cmp dword [rdi + 0x20], 1 | | if (*((rdi + 0x20)) == 1) { 0x004063e8 jne 0x406479 | 0x004063ee mov rcx, qword [rbp] | rcx = *(rbp); 0x004063f2 movabs rdx, 0x112e0be826d694b3 | rdx = 0x112e0be826d694b3; 0x004063fc mov rax, rcx | rax = rcx; 0x004063ff imul rdx | rdx:rax = rax * rdx; 0x00406402 mov rax, rdx | rax = rdx; 0x00406405 shr rax, 0x3f | rax >>= 0x3f; 0x00406409 sar rdx, 0x1a | rdx >>= 0x1a; 0x0040640d add rdx, rax | rdx += rax; 0x00406410 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x00406416 mov qword [rsp], rdx | *(rsp) = rdx; 0x0040641a lea esi, [rax + rcx + 0x3b9ac9ff] | esi = rax + rcx + 0x3b9ac9ff; 0x00406421 add eax, ecx | eax += ecx; 0x00406423 cmp esi, 0x773593ff | | if (esi >= 0x773593ff) { 0x00406429 jb 0x406453 | 0x0040642b cdqe | rax = (int64_t) eax; 0x0040642d imul rcx, rax, 0x44b82fa1 | rcx = rax * 0x44b82fa1; 0x00406434 mov rsi, rcx | rsi = rcx; 0x00406437 shr rsi, 0x3f | rsi >>= 0x3f; 0x0040643b sar rcx, 0x3c | rcx >>= 0x3c; 0x0040643f add ecx, esi | ecx += esi; 0x00406441 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x00406444 add rdx, rcx | rdx += rcx; 0x00406447 mov qword [rsp], rdx | *(rsp) = rdx; 0x0040644b imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x00406451 sub eax, ecx | eax -= ecx; | } 0x00406453 mov dword [rsp + 8], eax | *((rsp + 8)) = eax; 0x00406457 test rdx, rdx | | if (rdx <= 0) { 0x0040645a jle 0x40652a | goto label_0; | } 0x00406460 test eax, eax | | if (eax >= 0) { 0x00406462 jns 0x406543 | goto label_1; | } 0x00406468 dec rdx | rdx--; 0x0040646b mov qword [rsp], rdx | *(rsp) = rdx; 0x0040646f add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x00406474 jmp 0x40653f | goto label_2; | } 0x00406479 call 0x403840 | rax = std::_1::chrono::steady_clock::now() (); 0x0040647e mov rbx, rax | rbx = rax; 0x00406481 mov eax, 0xffffffff | eax = 0xffffffff; 0x00406486 cmp rbx, qword [rbp] | | if (rbx >= *(rbp)) { 0x0040648a jge 0x40654e | goto label_3; | } 0x00406490 movabs r14, 0x112e0be826d694b3 | r14 = 0x112e0be826d694b3; 0x0040649a lea r15, [rsp + 0x18] | r15 = rsp + 0x18; 0x0040649f mov r12, rsp | r12 = rsp; 0x004064a2 nop word cs:[rax + rax] | 0x004064ac nop dword [rax] | | do { 0x004064b0 cmp dword [r13 + 0x20], 1 | | if (*((r13 + 0x20)) == 1) { 0x004064b5 jne 0x4064c0 | 0x004064b7 call 0x42db40 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x004064bc jmp 0x4064c5 | | } else { 0x004064c0 call 0x42dbd0 | rax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x004064c5 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x004064ca mov dword [rsp + 0x20], edx | *((rsp + 0x20)) = edx; 0x004064ce mov rcx, qword [rbp] | rcx = *(rbp); 0x004064d2 sub rcx, rbx | rcx -= rbx; 0x004064d5 mov rax, rcx | rax = rcx; 0x004064d8 imul r14 | rdx:rax = rax * r14; 0x004064db mov rax, rdx | rax = rdx; 0x004064de shr rax, 0x3f | rax >>= 0x3f; 0x004064e2 sar rdx, 0x1a | rdx >>= 0x1a; 0x004064e6 add rdx, rax | rdx += rax; 0x004064e9 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x004064ef add ecx, eax | ecx += eax; 0x004064f1 mov rdi, r15 | 0x004064f4 mov rsi, rdx | 0x004064f7 mov edx, ecx | 0x004064f9 call 0x42dcf0 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, ecx); 0x004064fe movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00406501 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x00406505 mov rdi, r13 | 0x00406508 mov rsi, r12 | 0x0040650b call 0x407810 | eax = BloombergLP::bslmt::TimedSemaphoreImpl::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, r12); 0x00406510 cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00406513 jne 0x40654e | goto label_3; | } 0x00406515 call 0x403840 | rax = std::_1::chrono::steady_clock::now() (); 0x0040651a mov rbx, rax | rbx = rax; 0x0040651d cmp rax, qword [rbp] | 0x00406521 jl 0x4064b0 | | } while (rax < *(rbp)); 0x00406523 mov eax, 0xffffffff | eax = 0xffffffff; 0x00406528 jmp 0x40654e | goto label_3; | label_0: 0x0040652a test eax, eax | | if (eax > 0) { 0x0040652c jle 0x406543 | 0x0040652e test rdx, rdx | | if (rdx == 0) { 0x00406531 je 0x406543 | goto label_1; | } 0x00406533 inc rdx | rdx++; 0x00406536 mov qword [rsp], rdx | *(rsp) = rdx; 0x0040653a add eax, 0xc4653600 | eax += 0xc4653600; | label_2: 0x0040653f mov dword [rsp + 8], eax | *((rsp + 8)) = eax; | } | label_1: 0x00406543 mov rsi, rsp | 0x00406546 mov rdi, r13 | 0x00406549 call 0x407810 | BloombergLP::bslmt::TimedSemaphoreImpl::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, rsp); | label_3: 0x0040654e add rsp, 0x28 | 0x00406552 pop rbx | 0x00406553 pop r12 | 0x00406555 pop r13 | 0x00406557 pop r14 | 0x00406559 pop r15 | 0x0040655b pop rbp | 0x0040655c ret | return rax; | }