; assembly | /* r2dec pseudo code output */ | /* bslmt_fastpostsemaphore.t/none @ 0x4078b0 */ | #include | ; (fcn) method.int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::FastPostSemaphore__AnotherClock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bslmt::FastPostSemaphore__std::__1::chrono::time_point_Anoth () | uint64_t method_int_BloombergLP::bslmt::ChronoUtil::timedWait_BloombergLP::bslmt::FastPostSemaphore_AnotherClock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bslmt::FastPostSemaphore_std::_1::chrono::time_point_Anoth (int32_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_10h; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::bslmt::ChronoUtil::timedWait > >(BloombergLP::bslmt::FastPostSemaphore*, std::__1::chrono::time_point > > const&) */ 0x004078b0 push rbp | 0x004078b1 push r15 | 0x004078b3 push r14 | 0x004078b5 push r13 | 0x004078b7 push r12 | 0x004078b9 push rbx | 0x004078ba sub rsp, 0x28 | 0x004078be mov r13, rsi | r13 = rsi; 0x004078c1 mov rbx, rdi | rbx = rdi; 0x004078c4 call 0x4028a0 | rax = std::_1::chrono::steady_clock::now() (); 0x004078c9 mov rbp, rax | 0x004078cc add rbp, 0xffffffffffffd8f0 | rbp += 0xffffffffffffd8f0; 0x004078d3 mov r14d, 0xfffffffe | r14d = 0xfffffffe; 0x004078d9 cmp rbp, qword [r13] | | if (rbp >= *(r13)) { 0x004078dd jge 0x407a3a | goto label_0; | } 0x004078e3 movabs r14, 0x112e0be826d694b3 | r14 = 0x112e0be826d694b3; 0x004078ed mov r15, rsp | r15 = rsp; 0x004078f0 lea r12, [rsp + 0x10] | r12 = rsp + 0x10; 0x004078f5 nop word cs:[rax + rax] | 0x004078ff nop | | do { 0x00407900 mov eax, dword [rbx + 0x60] | eax = *((rbx + 0x60)); 0x00407903 test eax, eax | | if (eax != 0) { 0x00407905 je 0x407920 | 0x00407907 cmp eax, 1 | | if (eax != 1) { 0x0040790a jne 0x407930 | goto label_1; | } 0x0040790c call 0x422240 | BloombergLP::bsls::SystemTime::nowMonotonicClock() (); 0x00407911 jmp 0x407925 | | } else { 0x00407920 call 0x4222d0 | eax = BloombergLP::bsls::SystemTime::nowRealtimeClock() (); | } 0x00407925 jmp 0x407934 | goto label_2; | label_1: 0x00407930 xor edx, edx | edx = 0; 0x00407932 xor eax, eax | eax = 0; | label_2: 0x00407934 mov qword [rsp], rax | *(rsp) = rax; 0x00407938 mov dword [rsp + 8], edx | *((rsp + 8)) = edx; 0x0040793c mov rcx, qword [r13] | rcx = *(r13); 0x00407940 sub rcx, rbp | rcx -= rbp; 0x00407943 mov rax, rcx | rax = rcx; 0x00407946 imul r14 | rdx:rax = rax * r14; 0x00407949 mov rax, rdx | rax = rdx; 0x0040794c shr rax, 0x3f | rax >>= 0x3f; 0x00407950 sar rdx, 0x1a | rdx >>= 0x1a; 0x00407954 add rdx, rax | rdx += rax; 0x00407957 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x0040795d add ecx, eax | ecx += eax; 0x0040795f mov rdi, r15 | 0x00407962 mov rsi, rdx | 0x00407965 mov edx, ecx | 0x00407967 call 0x4223f0 | rax = BloombergLP::bsls::TimeInterval::addInterval(long long,int) (r15, rdx, ecx); 0x0040796c movups xmm0, xmmword [rax] | __asm ("movups xmm0, xmmword [rax]"); 0x0040796f movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x00407974 mov rax, 0xfffffffff0000000 | rax = 0xfffffffff0000000; 0x0040797b lock xadd qword [rbx], rax | __asm ("lock xadd qword [rbx], rax"); 0x00407980 test eax, 0x1000000 | | if ((eax & 0x1000000) != 0) { 0x00407985 jne 0x4079d8 | goto label_3; | } 0x00407987 lea rdx, [rax - 0x10000000] | rdx = rax - 0x10000000; 0x0040798e mov rcx, rdx | rcx = rdx; 0x00407991 sar rcx, 0x1c | rcx >>= 0x1c; 0x00407995 and eax, 0xffffff | eax &= 0xffffff; 0x0040799a cmp rcx, rax | | if (rcx >= rax) { 0x0040799d jge 0x407a32 | goto label_4; | } 0x004079a3 mov rdi, rbx | 0x004079a6 mov rsi, r12 | 0x004079a9 call 0x406df0 | eax = BloombergLP::bslmt::FastPostSemaphoreImpl::timedWaitSlowPath(BloombergLP::bsls::TimeIntervalconst&,long long) (rbx, r12, rdx); 0x004079ae cmp eax, 0xfffffffe | | if (eax != 0xfffffffe) { 0x004079b1 jne 0x407a37 | goto label_5; | } 0x004079b7 call 0x4028a0 | rax = std::_1::chrono::steady_clock::now() (); 0x004079bc mov rbp, rax | 0x004079bf add rbp, 0xffffffffffffd8f0 | rbp += 0xffffffffffffd8f0; 0x004079c6 cmp rbp, qword [r13] | 0x004079ca jl 0x407900 | | } while (rbp < *(r13)); 0x004079d0 mov r14d, 0xfffffffe | r14d = 0xfffffffe; 0x004079d6 jmp 0x407a3a | goto label_0; | label_3: 0x004079d8 mov eax, 0x10000000 | eax = 0x10000000; 0x004079dd lock xadd qword [rbx], rax | __asm ("lock xadd qword [rbx], rax"); 0x004079e2 mov r14d, 0xffffffff | r14d = 0xffffffff; 0x004079e8 test eax, 0xffffff | | if ((eax & 0xffffff) != 0) { 0x004079ed je 0x407a3a | 0x004079ef mov ecx, eax | ecx = eax; 0x004079f1 and ecx, 0x1000000 | ecx &= 0x1000000; 0x004079f7 test rcx, rcx | | if (rcx != 0) { 0x004079fa jne 0x407a3a | goto label_0; | } 0x004079fc add rax, 0x10000000 | rax += 0x10000000; 0x00407a02 and rax, 0xfffffffff0000000 | rax &= 0xfffffffff0000000; 0x00407a08 cmp rax, 0x10000000 | | if (rax != 0x10000000) { 0x00407a0e jne 0x407a3a | goto label_0; | } 0x00407a10 lea rbp, [rbx + 8] | rbp = rbx + 8; 0x00407a14 mov rdi, rbp | rdi = rbp; 0x00407a17 call 0x402970 | pthread_mutex_lock (); 0x00407a1c mov rdi, rbp | rdi = rbp; 0x00407a1f call 0x4029e0 | pthread_mutex_unlock (); 0x00407a24 add rbx, 0x30 | rbx += 0x30; 0x00407a28 mov rdi, rbx | rdi = rbx; 0x00407a2b call 0x4026b0 | eax = pthread_cond_signal (); 0x00407a30 jmp 0x407a3a | goto label_0; | label_4: 0x00407a32 xor r14d, r14d | r14d = 0; 0x00407a35 jmp 0x407a3a | goto label_0; | label_5: 0x00407a37 mov r14d, eax | r14d = eax; | } | label_0: 0x00407a3a mov eax, r14d | 0x00407a3d add rsp, 0x28 | 0x00407a41 pop rbx | 0x00407a42 pop r12 | 0x00407a44 pop r13 | 0x00407a46 pop r14 | 0x00407a48 pop r15 | 0x00407a4a pop rbp | 0x00407a4b ret | return rax; | }