; assembly | /* r2dec pseudo code output */ | /* bslmt_barrier.t/none @ 0x408f30 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Barrier__HalfClock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::Barrier__std::__1::chrono::time_point_HalfClock__std::__1::chrono: () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::Barrier_HalfClock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::Barrier_std::_1::chrono::time_point_HalfClock_std::_1::chrono_ (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&) */ 0x00408f30 push rbp | 0x00408f31 push r15 | 0x00408f33 push r14 | 0x00408f35 push r13 | 0x00408f37 push r12 | 0x00408f39 push rbx | 0x00408f3a sub rsp, 0x28 | 0x00408f3e mov rbx, rsi | rbx = rsi; 0x00408f41 mov r14, rdi | r14 = rdi; 0x00408f44 call 0x403660 | rax = std::_1::chrono::steady_clock::now() (); 0x00408f49 mov r15, rax | r15 = rax; 0x00408f4c shr r15, 0x3f | r15 >>= 0x3f; 0x00408f50 add r15, rax | r15 += rax; 0x00408f53 sar r15, 1 | r15 >>= 1; 0x00408f56 mov eax, 0xffffffff | eax = 0xffffffff; 0x00408f5b cmp r15, qword [rbx] | | if (r15 >= *(rbx)) { 0x00408f5e jge 0x409023 | goto label_0; | } 0x00408f64 movabs r13, 0x112e0be826d694b3 | r13 = 0x112e0be826d694b3; 0x00408f6e mov r12, rsp | r12 = rsp; 0x00408f71 lea rbp, [rsp + 0x10] | rbp = rsp + 0x10; 0x00408f76 nop word cs:[rax + rax] | | do { 0x00408f80 mov eax, dword [r14 + 0x58] | eax = *((r14 + 0x58)); 0x00408f84 test eax, eax | | if (eax != 0) { 0x00408f86 je 0x408fa0 | 0x00408f88 cmp eax, 1 | | if (eax != 1) { 0x00408f8b jne 0x408fb0 | goto label_1; | } 0x00408f8d call 0x42f1e0 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00408f92 jmp 0x408fa5 | | } else { 0x00408fa0 call 0x42f270 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00408fa5 jmp 0x408fb4 | goto label_2; | label_1: 0x00408fb0 xor edx, edx | edx = 0; 0x00408fb2 xor eax, eax | eax = 0; | label_2: 0x00408fb4 mov qword [rsp], rax | *(rsp) = rax; 0x00408fb8 mov dword [rsp + 8], edx | *((rsp + 8)) = edx; 0x00408fbc mov rcx, qword [rbx] | rcx = *(rbx); 0x00408fbf sub rcx, r15 | rcx -= r15; 0x00408fc2 mov rax, rcx | rax = rcx; 0x00408fc5 imul r13 | rdx:rax = rax * r13; 0x00408fc8 mov rax, rdx | rax = rdx; 0x00408fcb shr rax, 0x3f | rax >>= 0x3f; 0x00408fcf sar rdx, 0x1a | rdx >>= 0x1a; 0x00408fd3 add rdx, rax | rdx += rax; 0x00408fd6 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x00408fdc add ecx, eax | ecx += eax; 0x00408fde mov rdi, r12 | 0x00408fe1 mov rsi, rdx | 0x00408fe4 mov edx, ecx | 0x00408fe6 call 0x42f390 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r12, rdx, ecx); 0x00408feb movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x00408fee movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x00408ff3 mov rdi, r14 | 0x00408ff6 mov rsi, rbp | 0x00408ff9 call 0x4091d0 | eax = BloombergLP::bslmt::Barrier::timedWait(BloombergLP::bsls::TimeIntervalconst&) (r14, rbp); 0x00408ffe cmp eax, 0xffffffff | | if (eax != 0xffffffff) { 0x00409001 jne 0x409023 | goto label_0; | } 0x00409003 call 0x403660 | rax = std::_1::chrono::steady_clock::now() (); 0x00409008 mov r15, rax | r15 = rax; 0x0040900b shr r15, 0x3f | r15 >>= 0x3f; 0x0040900f add r15, rax | r15 += rax; 0x00409012 sar r15, 1 | r15 >>= 1; 0x00409015 cmp r15, qword [rbx] | 0x00409018 jl 0x408f80 | | } while (r15 < *(rbx)); 0x0040901e mov eax, 0xffffffff | eax = 0xffffffff; | label_0: 0x00409023 add rsp, 0x28 | 0x00409027 pop rbx | 0x00409028 pop r12 | 0x0040902a pop r13 | 0x0040902c pop r14 | 0x0040902e pop r15 | 0x00409030 pop rbp | 0x00409031 ret | return rax; | }