; assembly | /* r2dec pseudo code output */ | /* bdlmt_eventscheduler.t/none @ 0x426840 */ | #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&) */ 0x00426840 push r15 | 0x00426842 push r14 | 0x00426844 push r12 | 0x00426846 push rbx | 0x00426847 sub rsp, 0x108 | 0x0042684e mov r15, rcx | r15 = rcx; 0x00426851 mov r14, rsi | r14 = rsi; 0x00426854 mov r12, rdi | r12 = rdi; 0x00426857 cmp dword [rdi + 0x24c], 0 | | if (*((rdi + 0x24c)) != 0) { 0x0042685e je 0x42696c | 0x00426864 mov rbx, qword [rdx] | rbx = *(rdx); 0x00426867 mov qword [rsp + 8], rbx | *((rsp + 8)) = rbx; 0x0042686c mov rax, qword [rip + 0x27ae15] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x00426873 test rax, rax | | if (rax == 0) { 0x00426876 jne 0x42687d | 0x00426878 call 0x4381c0 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0042687d mov qword [rsp + 0x40], rax | *((rsp + 0x40)) = rax; 0x00426882 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00426885 movups xmmword [rsp + 0x48], xmm0 | __asm ("movups xmmword [rsp + 0x48], xmm0"); 0x0042688a lea rdi, [rsp + 0x10] | 0x0042688f mov esi, 0x10 | 0x00426894 call 0x43be10 | BloombergLP::bslstl::Function_Rep::allocateBuf(unsigned long) (rsp + 0x10, 0x10); 0x00426899 mov qword [rsp + 0x48], 0x42b6e0 | *((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_; 0x004268a2 mov qword [rsp + 0x10], 0x429db0 | *((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; 0x004268ab mov qword [rsp + 0x18], rbx | *((rsp + 0x18)) = rbx; 0x004268b0 mov qword [rsp + 0x50], 0x42b6d0 | *((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; 0x004268b9 lea rdi, [rsp + 0x60] | 0x004268be lea rdx, [rsp + 0x10] | 0x004268c3 mov rsi, r15 | 0x004268c6 call 0x428420 | BloombergLP::bdlmt::EventScheduler::EventData::EventData(bsl::functionconst&,bsl::functionconst&) (rsp + 0x60, r15, rsp + 0x10); 0x004268cb lea r15, [r12 + 0x50] | r15 = r12 + 0x50; 0x004268d0 mov rdi, r15 | 0x004268d3 call 0x436060 | eax = BloombergLP::bdlcc::SkipList_RandomLevelGenerator::randomLevel() (r15); 0x004268d8 lea rdx, [rsp + 8] | 0x004268dd lea rcx, [rsp + 0x60] | 0x004268e2 mov rdi, r15 | 0x004268e5 mov esi, eax | 0x004268e7 call 0x42b390 | rax = BloombergLP::bdlcc::SkipList::allocateNode(int,long longconst&,BloombergLP::bdlmt::EventScheduler::EventDataconst&) (r15, eax, rsp + 8, rsp + 0x60); 0x004268ec mov rbx, rax | rbx = rax; 0x004268ef test r14, r14 | | if (r14 != 0) { 0x004268f2 je 0x4268ff | 0x004268f4 mov rdi, rbx | 0x004268f7 call 0x436000 | BloombergLP::bdlcc::SkipList_Control::incrementRefCount() (rbx); 0x004268fc mov qword [r14], rbx | *(r14) = rbx; | } 0x004268ff lea rsi, [rsp + 7] | 0x00426904 mov rdi, r15 | 0x00426907 mov rdx, rbx | 0x0042690a mov ecx, 1 | ecx = 1; 0x0042690f call 0x42b4b0 | BloombergLP::bdlcc::SkipList::addNodeImpR(bool*,BloombergLP::bdlcc::SkipList_Node*,bool) (r15, rsp + 7, rbx); 0x00426914 lea rdi, [rsp + 0xb0] | 0x0042691c call 0x43bdb0 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0xb0); 0x00426921 lea rdi, [rsp + 0x60] | 0x00426926 call 0x43bdb0 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x60); 0x0042692b lea rdi, [rsp + 0x10] | 0x00426930 call 0x43bdb0 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x10); 0x00426935 cmp byte [rsp + 7], 0 | | if (*((rsp + 7)) == 0) { 0x0042693a je 0x426a21 | goto label_0; | } 0x00426940 lea rbx, [r12 + 0x198] | rbx = r12 + 0x198; 0x00426948 mov rdi, rbx | rdi = rbx; 0x0042694b call 0x4046c0 | pthread_mutex_lock (); 0x00426950 add r12, 0x1c0 | r12 += 0x1c0; 0x00426957 mov rdi, r12 | rdi = r12; 0x0042695a call 0x404080 | pthread_cond_signal (); 0x0042695f mov rdi, rbx | rdi = rbx; 0x00426962 call 0x404790 | pthread_mutex_unlock (); 0x00426967 jmp 0x426a21 | | } else { 0x0042696c mov rcx, qword [rdx] | rcx = *(rdx); 0x0042696f movabs rdx, 0x431bde82d7b634db | rdx = 0x431bde82d7b634db; 0x00426979 mov rax, rcx | rax = rcx; 0x0042697c imul rdx | rdx:rax = rax * rdx; 0x0042697f mov rax, rdx | rax = rdx; 0x00426982 shr rax, 0x3f | rax >>= 0x3f; 0x00426986 sar rdx, 0x12 | rdx >>= 0x12; 0x0042698a add rdx, rax | rdx += rax; 0x0042698d imul eax, edx, 0xfff0bdc0 | eax = edx * 0xfff0bdc0; 0x00426993 add ecx, eax | ecx += eax; 0x00426995 imul eax, ecx, 0x3e8 | eax = ecx * 0x3e8; 0x0042699b mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x004269a0 lea ecx, [rax + 0x3b9ac9ff] | ecx = rax + 0x3b9ac9ff; 0x004269a6 cmp ecx, 0x773593ff | | if (ecx >= 0x773593ff) { 0x004269ac jb 0x4269d8 | 0x004269ae movsxd rcx, eax | rcx = (int64_t) eax; 0x004269b1 imul rcx, rcx, 0x44b82fa1 | rcx *= 0x44b82fa1; 0x004269b8 mov rsi, rcx | rsi = rcx; 0x004269bb shr rsi, 0x3f | rsi >>= 0x3f; 0x004269bf sar rcx, 0x3c | rcx >>= 0x3c; 0x004269c3 add ecx, esi | ecx += esi; 0x004269c5 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x004269c8 add rdx, rcx | rdx += rcx; 0x004269cb mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x004269d0 imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x004269d6 sub eax, ecx | eax -= ecx; | } 0x004269d8 mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; 0x004269dc test rdx, rdx | | if (rdx > 0) { 0x004269df jle 0x4269f4 | 0x004269e1 test eax, eax | | if (eax >= 0) { 0x004269e3 jns 0x426a0e | goto label_1; | } 0x004269e5 dec rdx | rdx--; 0x004269e8 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x004269ed add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x004269f2 jmp 0x426a0a | | } else { 0x004269f4 test eax, eax | | if (eax <= 0) { 0x004269f6 jle 0x426a0e | goto label_1; | } 0x004269f8 test rdx, rdx | | if (rdx == 0) { 0x004269fb je 0x426a0e | goto label_1; | } 0x004269fd inc rdx | rdx++; 0x00426a00 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426a05 add eax, 0xc4653600 | eax += 0xc4653600; | } 0x00426a0a mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; | label_1: 0x00426a0e lea rdx, [rsp + 0x60] | 0x00426a13 mov rdi, r12 | 0x00426a16 mov rsi, r14 | 0x00426a19 mov rcx, r15 | 0x00426a1c call 0x433900 | BloombergLP::bdlmt::EventScheduler::scheduleEventRaw(BloombergLP::bdlmt::EventScheduler::Event**,BloombergLP::bsls::TimeIntervalconst&,bsl::functionconst&) (r12, r14, rsp + 0x60, r15); | } | label_0: 0x00426a21 add rsp, 0x108 | 0x00426a28 pop rbx | 0x00426a29 pop r12 | 0x00426a2b pop r14 | 0x00426a2d pop r15 | 0x00426a2f ret | return rax; | }