; assembly | /* r2dec pseudo code output */ | /* bdlmt_eventscheduler.t/assume @ 0x426810 */ | #include | ; (fcn) method.void_BloombergLP::bdlmt::EventScheduler::scheduleEventRaw_std::__1::chrono::system_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000l______BloombergLP::bdlmt::EventScheduler::Event__std::__1::chrono::time_point_std::__1::ch () | int64_t method_void_BloombergLP::bdlmt::EventScheduler::scheduleEventRaw_std::_1::chrono::system_clock_std::_1::chrono::duration_long_long_std::_1_ratio_1l_1000000l_BloombergLP::bdlmt::EventScheduler::Event_std::_1::chrono::time_point_std::_1::ch (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&) */ 0x00426810 push r15 | 0x00426812 push r14 | 0x00426814 push r12 | 0x00426816 push rbx | 0x00426817 sub rsp, 0x108 | 0x0042681e mov r15, rcx | r15 = rcx; 0x00426821 mov r14, rsi | r14 = rsi; 0x00426824 mov r12, rdi | r12 = rdi; 0x00426827 cmp dword [rdi + 0x24c], 0 | | if (*((rdi + 0x24c)) != 0) { 0x0042682e je 0x426937 | 0x00426834 mov rbx, qword [rdx] | rbx = *(rdx); 0x00426837 mov qword [rsp + 8], rbx | *((rsp + 8)) = rbx; 0x0042683c mov rax, qword [rip + 0x27ae45] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x00426843 test rax, rax | | if (rax == 0) { 0x00426846 jne 0x42684d | 0x00426848 call 0x438150 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0042684d mov qword [rsp + 0x40], rax | *((rsp + 0x40)) = rax; 0x00426852 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00426855 movups xmmword [rsp + 0x48], xmm0 | __asm ("movups xmmword [rsp + 0x48], xmm0"); 0x0042685a lea rdi, [rsp + 0x10] | 0x0042685f mov esi, 0x10 | 0x00426864 call 0x43bd60 | BloombergLP::bslstl::Function_Rep::allocateBuf(unsigned long) (rsp + 0x10, 0x10); 0x00426869 mov qword [rsp + 0x48], 0x42b650 | *((rsp + 0x48)) = method.BloombergLP::bslstl::Function_Rep::ManagerRet_BloombergLP::bslstl::Function_Rep::functionManager_BloombergLP::bdlf::Bind_BloombergLP::bslmf.Nil__long_long____std::__1::chrono::time_point_std::__1::chrono::system_clock__std::__1::chrono::duration_; 0x00426872 mov qword [rsp + 0x10], 0x429d20 | *((rsp + 0x10)) = method.long_long_BloombergLP::bdlmt::EventScheduler::timeUntilTrigger_std::__1::chrono::system_clock__std::__1::chrono::duration_long_long__std::__1.ratio_1l__1000000l______std::__1::chrono::time_point_std::__1::chrono::system_clock__std::__1::chrono::du; 0x0042687b mov qword [rsp + 0x18], rbx | *((rsp + 0x18)) = rbx; 0x00426880 mov qword [rsp + 0x50], 0x42b640 | *((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::system_clock__std::__1::chrono::duration_long_long__std::__1::ratio_1l; 0x00426889 lea rdi, [rsp + 0x60] | 0x0042688e lea rdx, [rsp + 0x10] | 0x00426893 mov rsi, r15 | 0x00426896 call 0x4283e0 | BloombergLP::bdlmt::EventScheduler::EventData::EventData(bsl::functionconst&,bsl::functionconst&) (rsp + 0x60, r15, rsp + 0x10); 0x0042689b lea r15, [r12 + 0x50] | r15 = r12 + 0x50; 0x004268a0 mov rdi, r15 | 0x004268a3 call 0x435eb0 | eax = BloombergLP::bdlcc::SkipList_RandomLevelGenerator::randomLevel() (r15); 0x004268a8 lea rdx, [rsp + 8] | 0x004268ad lea rcx, [rsp + 0x60] | 0x004268b2 mov rdi, r15 | 0x004268b5 mov esi, eax | 0x004268b7 call 0x42b300 | rax = BloombergLP::bdlcc::SkipList::allocateNode(int,long longconst&,BloombergLP::bdlmt::EventScheduler::EventDataconst&) (r15, eax, rsp + 8, rsp + 0x60); 0x004268bc mov rbx, rax | rbx = rax; 0x004268bf mov rdi, rax | 0x004268c2 call 0x435e40 | BloombergLP::bdlcc::SkipList_Control::incrementRefCount() (rax); 0x004268c7 mov qword [r14], rbx | *(r14) = rbx; 0x004268ca lea rsi, [rsp + 7] | 0x004268cf mov rdi, r15 | 0x004268d2 mov rdx, rbx | 0x004268d5 mov ecx, 1 | ecx = 1; 0x004268da call 0x42b420 | BloombergLP::bdlcc::SkipList::addNodeImpR(bool*,BloombergLP::bdlcc::SkipList_Node*,bool) (r15, rsp + 7, rbx); 0x004268df lea rdi, [rsp + 0xb0] | 0x004268e7 call 0x43bd00 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0xb0); 0x004268ec lea rdi, [rsp + 0x60] | 0x004268f1 call 0x43bd00 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x60); 0x004268f6 lea rdi, [rsp + 0x10] | 0x004268fb call 0x43bd00 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x10); 0x00426900 cmp byte [rsp + 7], 0 | | if (*((rsp + 7)) == 0) { 0x00426905 je 0x4269ec | goto label_0; | } 0x0042690b lea rbx, [r12 + 0x198] | rbx = r12 + 0x198; 0x00426913 mov rdi, rbx | rdi = rbx; 0x00426916 call 0x4046c0 | pthread_mutex_lock (); 0x0042691b add r12, 0x1c0 | r12 += 0x1c0; 0x00426922 mov rdi, r12 | rdi = r12; 0x00426925 call 0x404080 | pthread_cond_signal (); 0x0042692a mov rdi, rbx | rdi = rbx; 0x0042692d call 0x404790 | pthread_mutex_unlock (); 0x00426932 jmp 0x4269ec | | } else { 0x00426937 mov rcx, qword [rdx] | rcx = *(rdx); 0x0042693a movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00426944 mov rax, rcx | rax = rcx; 0x00426947 imul rdx | rdx:rax = rax * rdx; 0x0042694a mov rax, rdx | rax = rdx; 0x0042694d shr rax, 0x3f | rax >>= 0x3f; 0x00426951 sar rdx, 0x12 | rdx >>= 0x12; 0x00426955 add rdx, rax | rdx += rax; 0x00426958 imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x0042695e add ecx, eax | ecx += eax; 0x00426960 imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x00426966 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x0042696b lea ecx, [rax + 0x3b9ac9ff] | ecx = rax + 0x3b9ac9ff; 0x00426971 cmp ecx, 0x773593ff | | if (ecx >= 0x773593ff) { 0x00426977 jb 0x4269a3 | 0x00426979 movsxd rcx, eax | rcx = (int64_t) eax; 0x0042697c imul rcx, rcx, 0x44b82fa1 | rcx *= 0x44b82fa1; 0x00426983 mov rsi, rcx | rsi = rcx; 0x00426986 shr rsi, 0x3f | rsi >>= 0x3f; 0x0042698a sar rcx, 0x3c | rcx >>= 0x3c; 0x0042698e add ecx, esi | ecx += esi; 0x00426990 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x00426993 add rdx, rcx | rdx += rcx; 0x00426996 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x0042699b imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x004269a1 sub eax, ecx | eax -= ecx; | } 0x004269a3 mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; 0x004269a7 test rdx, rdx | | if (rdx > 0) { 0x004269aa jle 0x4269bf | 0x004269ac test eax, eax | | if (eax >= 0) { 0x004269ae jns 0x4269d9 | goto label_1; | } 0x004269b0 dec rdx | rdx--; 0x004269b3 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x004269b8 add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x004269bd jmp 0x4269d5 | | } else { 0x004269bf test eax, eax | | if (eax <= 0) { 0x004269c1 jle 0x4269d9 | goto label_1; | } 0x004269c3 test rdx, rdx | | if (rdx == 0) { 0x004269c6 je 0x4269d9 | goto label_1; | } 0x004269c8 inc rdx | rdx++; 0x004269cb mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x004269d0 add eax, 0xc4653600 | eax += 0xc4653600; | } 0x004269d5 mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; | label_1: 0x004269d9 lea rdx, [rsp + 0x60] | 0x004269de mov rdi, r12 | 0x004269e1 mov rsi, r14 | 0x004269e4 mov rcx, r15 | 0x004269e7 call 0x433790 | BloombergLP::bdlmt::EventScheduler::scheduleEventRaw(BloombergLP::bdlmt::EventScheduler::Event**,BloombergLP::bsls::TimeIntervalconst&,bsl::functionconst&) (r12, r14, rsp + 0x60, r15); | } | label_0: 0x004269ec add rsp, 0x108 | 0x004269f3 pop rbx | 0x004269f4 pop r12 | 0x004269f6 pop r14 | 0x004269f8 pop r15 | 0x004269fa ret | return rax; | }