; assembly | /* r2dec pseudo code output */ | /* bslmt_barrier.t/none @ 0x409040 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Barrier__AnotherClock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::Barrier__std::__1::chrono::time_point_AnotherClock__std::__1::c () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Barrier_AnotherClock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::Barrier_std::_1::chrono::time_point_AnotherClock_std::_1::c (uint32_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_10h; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::bslmt::ChronoUtil::timedWait > >(BloombergLP::bslmt::Barrier*, std::__1::chrono::time_point > > const&) */ 0x00409040 push rbp | 0x00409041 push r15 | 0x00409043 push r14 | 0x00409045 push r13 | 0x00409047 push r12 | 0x00409049 push rbx | 0x0040904a sub rsp, 0x28 | 0x0040904e mov rbx, rsi | rbx = rsi; 0x00409051 mov r13, rdi | r13 = rdi; 0x00409054 call 0x403660 | rax = std::_1::chrono::steady_clock::now() (); 0x00409059 mov rbp, rax | 0x0040905c add rbp, 0xffffffffffffd8f0 | rbp += 0xffffffffffffd8f0; 0x00409063 mov eax, 0xffffffff | eax = 0xffffffff; 0x00409068 cmp rbp, qword [rbx] | | if (rbp >= *(rbx)) { 0x0040906b jge 0x409130 | goto label_0; | } 0x00409071 movabs r14, 0x112e0be826d694b3 | r14 = 0x112e0be826d694b3; 0x0040907b mov r15, rsp | r15 = rsp; 0x0040907e lea r12, [rsp + 0x10] | r12 = rsp + 0x10; 0x00409083 nop word cs:[rax + rax] | 0x0040908d nop dword [rax] | | do { 0x00409090 mov eax, dword [r13 + 0x58] | eax = *((r13 + 0x58)); 0x00409094 test eax, eax | | if (eax != 0) { 0x00409096 je 0x4090b0 | 0x00409098 cmp eax, 1 | | if (eax != 1) { 0x0040909b jne 0x4090c0 | goto label_1; | } 0x0040909d call 0x42f1e0 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x004090a2 jmp 0x4090b5 | | } else { 0x004090b0 call 0x42f270 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x004090b5 jmp 0x4090c4 | goto label_2; | label_1: 0x004090c0 xor edx, edx | edx = 0; 0x004090c2 xor eax, eax | eax = 0; | label_2: 0x004090c4 mov qword [rsp], rax | *(rsp) = rax; 0x004090c8 mov dword [rsp + 8], edx | *((rsp + 8)) = edx; 0x004090cc mov rcx, qword [rbx] | rcx = *(rbx); 0x004090cf sub rcx, rbp | rcx -= rbp; 0x004090d2 mov rax, rcx | rax = rcx; 0x004090d5 imul r14 | rdx:rax = rax * r14; 0x004090d8 mov rax, rdx | rax = rdx; 0x004090db shr rax, 0x3f | rax >>= 0x3f; 0x004090df sar rdx, 0x1a | rdx >>= 0x1a; 0x004090e3 add rdx, rax | rdx += rax; 0x004090e6 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x004090ec add ecx, eax | ecx += eax; 0x004090ee mov rdi, r15 | 0x004090f1 mov rsi, rdx | 0x004090f4 mov edx, ecx | 0x004090f6 call 0x42f390 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, ecx); 0x004090fb movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x004090fe movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x00409103 mov rdi, r13 | 0x00409106 mov rsi, r12 | 0x00409109 call 0x4091d0 | eax = BloombergLP::bslmt::Barrier::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r13, r12); 0x0040910e cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00409111 jne 0x409130 | goto label_0; | } 0x00409113 call 0x403660 | rax = std::_1::chrono::steady_clock::now() (); 0x00409118 mov rbp, rax | 0x0040911b add rbp, 0xffffffffffffd8f0 | rbp += 0xffffffffffffd8f0; 0x00409122 cmp rbp, qword [rbx] | 0x00409125 jl 0x409090 | | } while (rbp < *(rbx)); 0x0040912b mov eax, 0xffffffff | eax = 0xffffffff; | label_0: 0x00409130 add rsp, 0x28 | 0x00409134 pop rbx | 0x00409135 pop r12 | 0x00409137 pop r13 | 0x00409139 pop r14 | 0x0040913b pop r15 | 0x0040913d pop rbp | 0x0040913e ret | return rax; | }