; assembly | /* r2dec pseudo code output */ | /* bdlmt_eventscheduler.t/none @ 0x426a70 */ | #include | ; (fcn) method.void_BloombergLP::bdlmt::EventScheduler::scheduleEventRaw_std::__1::chrono::steady_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______BloombergLP::bdlmt::EventScheduler::Event__std::__1::chrono::time_point_std::__1: () | int64_t method_void_BloombergLP::bdlmt::EventScheduler::scheduleEventRaw_std::_1::chrono::steady_clock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000000l_BloombergLP::bdlmt::EventScheduler::Event_std::_1::chrono::time_point_std::_1_ (int64_t arg4, int64_t arg3, int64_t arg2, uint32_t arg1) { | uint32_t var_7h; | int64_t var_8h; | int64_t var_10h; | int64_t var_18h; | int64_t var_40h; | int64_t var_48h; | int64_t var_50h; | int64_t var_60h; | int64_t var_68h; | int64_t var_b0h; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* void BloombergLP::bdlmt::EventScheduler::scheduleEventRaw > >(BloombergLP::bdlmt::EventScheduler::Event**, std::__1::chrono::time_point > > const&, bsl::function const&) */ 0x00426a70 push r15 | 0x00426a72 push r14 | 0x00426a74 push r12 | 0x00426a76 push rbx | 0x00426a77 sub rsp, 0x108 | 0x00426a7e mov r15, rcx | r15 = rcx; 0x00426a81 mov r14, rsi | r14 = rsi; 0x00426a84 mov r12, rdi | r12 = rdi; 0x00426a87 cmp dword [rdi + 0x24c], 1 | | if (*((rdi + 0x24c)) == 1) { 0x00426a8e jne 0x426b21 | 0x00426a94 mov rcx, qword [rdx] | rcx = *(rdx); 0x00426a97 movabs rdx, 0x112e0be826d694b3 | rdx = 0x112e0be826d694b3; 0x00426aa1 mov rax, rcx | rax = rcx; 0x00426aa4 imul rdx | rdx:rax = rax * rdx; 0x00426aa7 mov rax, rdx | rax = rdx; 0x00426aaa shr rax, 0x3f | rax >>= 0x3f; 0x00426aae sar rdx, 0x1a | rdx >>= 0x1a; 0x00426ab2 add rdx, rax | rdx += rax; 0x00426ab5 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x00426abb mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426ac0 lea esi, [rax + rcx + 0x3b9ac9ff] | esi = rax + rcx + 0x3b9ac9ff; 0x00426ac7 add eax, ecx | eax += ecx; 0x00426ac9 cmp esi, 0x773593ff | | if (esi >= 0x773593ff) { 0x00426acf jb 0x426afa | 0x00426ad1 cdqe | rax = (int64_t) eax; 0x00426ad3 imul rcx, rax, 0x44b82fa1 | rcx = rax * 0x44b82fa1; 0x00426ada mov rsi, rcx | rsi = rcx; 0x00426add shr rsi, 0x3f | rsi >>= 0x3f; 0x00426ae1 sar rcx, 0x3c | rcx >>= 0x3c; 0x00426ae5 add ecx, esi | ecx += esi; 0x00426ae7 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x00426aea add rdx, rcx | rdx += rcx; 0x00426aed mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426af2 imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x00426af8 sub eax, ecx | eax -= ecx; | } 0x00426afa mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; 0x00426afe test rdx, rdx | | if (rdx > 0) { 0x00426b01 jle 0x426c40 | 0x00426b07 test eax, eax | | if (eax >= 0) { 0x00426b09 jns 0x426c5a | goto label_0; | } 0x00426b0f dec rdx | rdx--; 0x00426b12 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426b17 add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x00426b1c jmp 0x426c56 | | } else { 0x00426b21 mov rbx, qword [rdx] | rbx = *(rdx); 0x00426b24 movabs rcx, 0x20c49ba5e353f7cf | rcx = 0x20c49ba5e353f7cf; 0x00426b2e mov rax, rbx | rax = rbx; 0x00426b31 imul rcx | rdx:rax = rax * rcx; 0x00426b34 mov rax, rdx | rax = rdx; 0x00426b37 shr rax, 0x3f | rax >>= 0x3f; 0x00426b3b sar rdx, 7 | rdx >>= 7; 0x00426b3f add rdx, rax | rdx += rax; 0x00426b42 mov qword [rsp + 8], rdx | *((rsp + 8)) = rdx; 0x00426b47 mov rax, qword [rip + 0x27ab3a] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x00426b4e test rax, rax | | if (rax == 0) { 0x00426b51 jne 0x426b58 | 0x00426b53 call 0x4381c0 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x00426b58 mov qword [rsp + 0x40], rax | *((rsp + 0x40)) = rax; 0x00426b5d xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00426b60 movups xmmword [rsp + 0x48], xmm0 | __asm ("movups xmmword [rsp + 0x48], xmm0"); 0x00426b65 lea rdi, [rsp + 0x10] | 0x00426b6a mov esi, 0x10 | 0x00426b6f call 0x43be10 | BloombergLP::bslstl::Function_Rep::allocateBuf(unsigned long) (rsp + 0x10, 0x10); 0x00426b74 mov qword [rsp + 0x48], 0x42b730 | *((rsp + 0x48)) = sym._ZN11BloombergLP6bslstl12Function_Rep15functionManagerINS_4bdlf4BindINS_5bslmf3NilEPFxRKNSt3__16chrono10time_pointINS8_12stead; 0x00426b7d mov qword [rsp + 0x10], 0x42a4f0 | *((rsp + 0x10)) = method.long_long_BloombergLP::bdlmt::EventScheduler::timeUntilTrigger_std::__1::chrono::steady_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000000l______std::__1::chrono::time_point_std::__1::chrono::steady_clock__std::__1::chrono:; 0x00426b86 mov qword [rsp + 0x18], rbx | *((rsp + 0x18)) = rbx; 0x00426b8b mov qword [rsp + 0x50], 0x42b720 | *((rsp + 0x50)) = method.BloombergLP::bslstl.Function_InvokerUtil_Dispatch_4__long_long_____BloombergLP::bdlf::Bind_BloombergLP::bslmf::Nil__long_long____std::__1::chrono::time_point_std::__1::chrono::steady_clock__std::__1::chrono::duration_long_long__std::__1::ratio_1l; 0x00426b94 lea rdi, [rsp + 0x60] | 0x00426b99 lea rdx, [rsp + 0x10] | 0x00426b9e mov rsi, r15 | 0x00426ba1 call 0x428420 | BloombergLP::bdlmt::EventScheduler::EventData::EventData(bsl::functionconst&,bsl::functionconst&) (rsp + 0x60, r15, rsp + 0x10); 0x00426ba6 lea r15, [r12 + 0x50] | r15 = r12 + 0x50; 0x00426bab mov rdi, r15 | 0x00426bae call 0x436060 | eax = BloombergLP::bdlcc::SkipList_RandomLevelGenerator::randomLevel() (r15); 0x00426bb3 lea rdx, [rsp + 8] | 0x00426bb8 lea rcx, [rsp + 0x60] | 0x00426bbd mov rdi, r15 | 0x00426bc0 mov esi, eax | 0x00426bc2 call 0x42b390 | rax = BloombergLP::bdlcc::SkipList::allocateNode(int,long longconst&,BloombergLP::bdlmt::EventScheduler::EventDataconst&) (r15, eax, rsp + 8, rsp + 0x60); 0x00426bc7 mov rbx, rax | rbx = rax; 0x00426bca test r14, r14 | | if (r14 != 0) { 0x00426bcd je 0x426bda | 0x00426bcf mov rdi, rbx | 0x00426bd2 call 0x436000 | BloombergLP::bdlcc::SkipList_Control::incrementRefCount() (rbx); 0x00426bd7 mov qword [r14], rbx | *(r14) = rbx; | } 0x00426bda lea rsi, [rsp + 7] | 0x00426bdf mov rdi, r15 | 0x00426be2 mov rdx, rbx | 0x00426be5 mov ecx, 1 | ecx = 1; 0x00426bea call 0x42b4b0 | BloombergLP::bdlcc::SkipList::addNodeImpR(bool*,BloombergLP::bdlcc::SkipList_Node*,bool) (r15, rsp + 7, rbx); 0x00426bef lea rdi, [rsp + 0xb0] | 0x00426bf7 call 0x43bdb0 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0xb0); 0x00426bfc lea rdi, [rsp + 0x60] | 0x00426c01 call 0x43bdb0 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x60); 0x00426c06 lea rdi, [rsp + 0x10] | 0x00426c0b call 0x43bdb0 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x10); 0x00426c10 cmp byte [rsp + 7], 0 | | if (*((rsp + 7)) == 0) { 0x00426c15 je 0x426c6d | goto label_1; | } 0x00426c17 lea rbx, [r12 + 0x198] | rbx = r12 + 0x198; 0x00426c1f mov rdi, rbx | rdi = rbx; 0x00426c22 call 0x4046c0 | pthread_mutex_lock (); 0x00426c27 add r12, 0x1c0 | r12 += 0x1c0; 0x00426c2e mov rdi, r12 | rdi = r12; 0x00426c31 call 0x404080 | pthread_cond_signal (); 0x00426c36 mov rdi, rbx | rdi = rbx; 0x00426c39 call 0x404790 | eax = pthread_mutex_unlock (); 0x00426c3e jmp 0x426c6d | goto label_1; | } 0x00426c40 test eax, eax | | if (eax <= 0) { 0x00426c42 jle 0x426c5a | goto label_0; | } 0x00426c44 test rdx, rdx | | if (rdx == 0) { 0x00426c47 je 0x426c5a | goto label_0; | } 0x00426c49 inc rdx | rdx++; 0x00426c4c mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426c51 add eax, 0xc4653600 | eax += 0xc4653600; | } 0x00426c56 mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; | label_0: 0x00426c5a lea rdx, [rsp + 0x60] | 0x00426c5f mov rdi, r12 | 0x00426c62 mov rsi, r14 | 0x00426c65 mov rcx, r15 | 0x00426c68 call 0x433900 | BloombergLP::bdlmt::EventScheduler::scheduleEventRaw(BloombergLP::bdlmt::EventScheduler::Event**,BloombergLP::bsls::TimeIntervalconst&,bsl::functionconst&) (r12, r14, rsp + 0x60, r15); | label_1: 0x00426c6d add rsp, 0x108 | 0x00426c74 pop rbx | 0x00426c75 pop r12 | 0x00426c77 pop r14 | 0x00426c79 pop r15 | 0x00426c7b ret | return rax; | }