; assembly | /* r2dec pseudo code output */ | /* bdlmt_eventscheduler.t/assume @ 0x426a40 */ | #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&) */ 0x00426a40 push r15 | 0x00426a42 push r14 | 0x00426a44 push r12 | 0x00426a46 push rbx | 0x00426a47 sub rsp, 0x108 | 0x00426a4e mov r15, rcx | r15 = rcx; 0x00426a51 mov r14, rsi | r14 = rsi; 0x00426a54 mov r12, rdi | r12 = rdi; 0x00426a57 cmp dword [rdi + 0x24c], 1 | | if (*((rdi + 0x24c)) == 1) { 0x00426a5e jne 0x426af1 | 0x00426a64 mov rcx, qword [rdx] | rcx = *(rdx); 0x00426a67 movabs rdx, 0x112e0be826d694b3 | rdx = 0x112e0be826d694b3; 0x00426a71 mov rax, rcx | rax = rcx; 0x00426a74 imul rdx | rdx:rax = rax * rdx; 0x00426a77 mov rax, rdx | rax = rdx; 0x00426a7a shr rax, 0x3f | rax >>= 0x3f; 0x00426a7e sar rdx, 0x1a | rdx >>= 0x1a; 0x00426a82 add rdx, rax | rdx += rax; 0x00426a85 imul eax, edx, 0xc4653600 | eax = edx * 0xc4653600; 0x00426a8b mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426a90 lea esi, [rax + rcx + 0x3b9ac9ff] | esi = rax + rcx + 0x3b9ac9ff; 0x00426a97 add eax, ecx | eax += ecx; 0x00426a99 cmp esi, 0x773593ff | | if (esi >= 0x773593ff) { 0x00426a9f jb 0x426aca | 0x00426aa1 cdqe | rax = (int64_t) eax; 0x00426aa3 imul rcx, rax, 0x44b82fa1 | rcx = rax * 0x44b82fa1; 0x00426aaa mov rsi, rcx | rsi = rcx; 0x00426aad shr rsi, 0x3f | rsi >>= 0x3f; 0x00426ab1 sar rcx, 0x3c | rcx >>= 0x3c; 0x00426ab5 add ecx, esi | ecx += esi; 0x00426ab7 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x00426aba add rdx, rcx | rdx += rcx; 0x00426abd mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426ac2 imul ecx, ecx, 0x3b9aca00 | ecx *= 0x3b9aca00; 0x00426ac8 sub eax, ecx | eax -= ecx; | } 0x00426aca mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; 0x00426ace test rdx, rdx | | if (rdx > 0) { 0x00426ad1 jle 0x426c0b | 0x00426ad7 test eax, eax | | if (eax >= 0) { 0x00426ad9 jns 0x426c25 | goto label_0; | } 0x00426adf dec rdx | rdx--; 0x00426ae2 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426ae7 add eax, 0x3b9aca00 | eax += 0x3b9aca00; 0x00426aec jmp 0x426c21 | | } else { 0x00426af1 mov rbx, qword [rdx] | rbx = *(rdx); 0x00426af4 movabs rcx, 0x20c49ba5e353f7cf | rcx = 0x20c49ba5e353f7cf; 0x00426afe mov rax, rbx | rax = rbx; 0x00426b01 imul rcx | rdx:rax = rax * rcx; 0x00426b04 mov rax, rdx | rax = rdx; 0x00426b07 shr rax, 0x3f | rax >>= 0x3f; 0x00426b0b sar rdx, 7 | rdx >>= 7; 0x00426b0f add rdx, rax | rdx += rax; 0x00426b12 mov qword [rsp + 8], rdx | *((rsp + 8)) = rdx; 0x00426b17 mov rax, qword [rip + 0x27ab6a] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x00426b1e test rax, rax | | if (rax == 0) { 0x00426b21 jne 0x426b28 | 0x00426b23 call 0x438150 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x00426b28 mov qword [rsp + 0x40], rax | *((rsp + 0x40)) = rax; 0x00426b2d xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00426b30 movups xmmword [rsp + 0x48], xmm0 | __asm ("movups xmmword [rsp + 0x48], xmm0"); 0x00426b35 lea rdi, [rsp + 0x10] | 0x00426b3a mov esi, 0x10 | 0x00426b3f call 0x43bd60 | BloombergLP::bslstl::Function_Rep::allocateBuf(unsigned long) (rsp + 0x10, 0x10); 0x00426b44 mov qword [rsp + 0x48], 0x42b6a0 | *((rsp + 0x48)) = sym._ZN11BloombergLP6bslstl12Function_Rep15functionManagerINS_4bdlf4BindINS_5bslmf3NilEPFxRKNSt3__16chrono10time_pointINS8_12stead; 0x00426b4d mov qword [rsp + 0x10], 0x42a460 | *((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:; 0x00426b56 mov qword [rsp + 0x18], rbx | *((rsp + 0x18)) = rbx; 0x00426b5b mov qword [rsp + 0x50], 0x42b690 | *((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; 0x00426b64 lea rdi, [rsp + 0x60] | 0x00426b69 lea rdx, [rsp + 0x10] | 0x00426b6e mov rsi, r15 | 0x00426b71 call 0x4283e0 | BloombergLP::bdlmt::EventScheduler::EventData::EventData(bsl::functionconst&,bsl::functionconst&) (rsp + 0x60, r15, rsp + 0x10); 0x00426b76 lea r15, [r12 + 0x50] | r15 = r12 + 0x50; 0x00426b7b mov rdi, r15 | 0x00426b7e call 0x435eb0 | eax = BloombergLP::bdlcc::SkipList_RandomLevelGenerator::randomLevel() (r15); 0x00426b83 lea rdx, [rsp + 8] | 0x00426b88 lea rcx, [rsp + 0x60] | 0x00426b8d mov rdi, r15 | 0x00426b90 mov esi, eax | 0x00426b92 call 0x42b300 | rax = BloombergLP::bdlcc::SkipList::allocateNode(int,long longconst&,BloombergLP::bdlmt::EventScheduler::EventDataconst&) (r15, eax, rsp + 8, rsp + 0x60); 0x00426b97 mov rbx, rax | rbx = rax; 0x00426b9a mov rdi, rax | 0x00426b9d call 0x435e40 | BloombergLP::bdlcc::SkipList_Control::incrementRefCount() (rax); 0x00426ba2 mov qword [r14], rbx | *(r14) = rbx; 0x00426ba5 lea rsi, [rsp + 7] | 0x00426baa mov rdi, r15 | 0x00426bad mov rdx, rbx | 0x00426bb0 mov ecx, 1 | ecx = 1; 0x00426bb5 call 0x42b420 | BloombergLP::bdlcc::SkipList::addNodeImpR(bool*,BloombergLP::bdlcc::SkipList_Node*,bool) (r15, rsp + 7, rbx); 0x00426bba lea rdi, [rsp + 0xb0] | 0x00426bc2 call 0x43bd00 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0xb0); 0x00426bc7 lea rdi, [rsp + 0x60] | 0x00426bcc call 0x43bd00 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x60); 0x00426bd1 lea rdi, [rsp + 0x10] | 0x00426bd6 call 0x43bd00 | BloombergLP::bslstl::Function_Rep::~Function_Rep() (rsp + 0x10); 0x00426bdb cmp byte [rsp + 7], 0 | | if (*((rsp + 7)) == 0) { 0x00426be0 je 0x426c38 | goto label_1; | } 0x00426be2 lea rbx, [r12 + 0x198] | rbx = r12 + 0x198; 0x00426bea mov rdi, rbx | rdi = rbx; 0x00426bed call 0x4046c0 | pthread_mutex_lock (); 0x00426bf2 add r12, 0x1c0 | r12 += 0x1c0; 0x00426bf9 mov rdi, r12 | rdi = r12; 0x00426bfc call 0x404080 | pthread_cond_signal (); 0x00426c01 mov rdi, rbx | rdi = rbx; 0x00426c04 call 0x404790 | eax = pthread_mutex_unlock (); 0x00426c09 jmp 0x426c38 | goto label_1; | } 0x00426c0b test eax, eax | | if (eax <= 0) { 0x00426c0d jle 0x426c25 | goto label_0; | } 0x00426c0f test rdx, rdx | | if (rdx == 0) { 0x00426c12 je 0x426c25 | goto label_0; | } 0x00426c14 inc rdx | rdx++; 0x00426c17 mov qword [rsp + 0x60], rdx | *((rsp + 0x60)) = rdx; 0x00426c1c add eax, 0xc4653600 | eax += 0xc4653600; | } 0x00426c21 mov dword [rsp + 0x68], eax | *((rsp + 0x68)) = eax; | label_0: 0x00426c25 lea rdx, [rsp + 0x60] | 0x00426c2a mov rdi, r12 | 0x00426c2d mov rsi, r14 | 0x00426c30 mov rcx, r15 | 0x00426c33 call 0x433790 | BloombergLP::bdlmt::EventScheduler::scheduleEventRaw(BloombergLP::bdlmt::EventScheduler::Event**,BloombergLP::bsls::TimeIntervalconst&,bsl::functionconst&) (r12, r14, rsp + 0x60, r15); | label_1: 0x00426c38 add rsp, 0x108 | 0x00426c3f pop rbx | 0x00426c40 pop r12 | 0x00426c42 pop r14 | 0x00426c44 pop r15 | 0x00426c46 ret | return rax; | }