; assembly | /* r2dec pseudo code output */ | /* bslstl_map.t/none @ 0x402d90 */ | #include | ; (fcn) method.UsageExample::TradeMatcher.placeSellOrder_double__int_ () | int64_t method_UsageExample::TradeMatcher_placeSellOrder_double_int_ (int64_t arg2, int64_t arg1, int64_t arg7) { | int64_t var_ch; | rsi = arg2; | rdi = arg1; | xmm0 = arg7; | /* UsageExample::TradeMatcher::placeSellOrder(double, int) */ 0x00402d90 push rbp | 0x00402d91 push r15 | 0x00402d93 push r14 | 0x00402d95 push r12 | 0x00402d97 push rbx | 0x00402d98 sub rsp, 0x10 | 0x00402d9c movsd qword [rsp], xmm0 | *(rsp) = xmm0; 0x00402da1 test esi, esi | | if (esi == 0) { 0x00402da3 je 0x402e9c | goto label_1; | } 0x00402da9 mov r12d, esi | r12d = esi; 0x00402dac mov r14, rdi | r14 = rdi; 0x00402daf lea r15, [rdi + 0x60] | r15 = rdi + 0x60; 0x00402db3 mov rbx, qword [rdi + 0x70] | rbx = *((rdi + 0x70)); 0x00402db7 nop word [rax + rax] | | label_0: 0x00402dc0 mov rax, qword [r14 + 0x68] | rax = *((r14 + 0x68)); 0x00402dc4 mov rcx, r15 | rcx = r15; 0x00402dc7 test rax, rax | | if (rax == 0) { 0x00402dca je 0x402df8 | goto label_2; | } 0x00402dcc movsd xmm0, qword [rsp] | xmm0 = *(rsp); 0x00402dd1 mov rcx, r15 | rcx = r15; 0x00402dd4 nop word cs:[rax + rax] | 0x00402dde nop | | do { 0x00402de0 xor edx, edx | edx = 0; 0x00402de2 ucomisd xmm0, qword [rax + 0x18] | __asm ("ucomisd xmm0, qword [rax + 0x18]"); | if (rax > 0) { 0x00402de7 cmova rcx, rax | rcx = rax; | } 0x00402deb setbe dl | dl = (rax <= 0) ? 1 : 0; 0x00402dee mov rax, qword [rax + rdx*8 + 8] | rax = *((rax + rdx*8 + 8)); 0x00402df3 test rax, rax | 0x00402df6 jne 0x402de0 | | } while (rax != 0); | label_2: 0x00402df8 cmp rbx, rcx | | if (rbx == rcx) { 0x00402dfb je 0x402e35 | goto label_3; | } 0x00402dfd mov eax, dword [rbx + 0x20] | eax = *((rbx + 0x20)); 0x00402e00 sub eax, r12d | eax -= r12d; | if (eax > 0) { 0x00402e03 jg 0x402e99 | goto label_4; | } 0x00402e09 mov rdi, rbx | 0x00402e0c call 0x6dc2b0 | rax = BloombergLP::bslalg::RbTreeUtil::next(BloombergLP::bslalg::RbTreeNodeconst*) (rbx); 0x00402e11 mov rbp, rax | 0x00402e14 mov rdi, r15 | 0x00402e17 mov rsi, rbx | 0x00402e1a call 0x6dc660 | BloombergLP::bslalg::RbTreeUtil::remove(BloombergLP::bslalg::RbTreeAnchor*,BloombergLP::bslalg::RbTreeNode*) (r15, rbx); 0x00402e1f mov rax, qword [r14 + 0x50] | rax = *((r14 + 0x50)); 0x00402e23 mov qword [rbx], rax | *(rbx) = rax; 0x00402e26 mov qword [r14 + 0x50], rbx | *((r14 + 0x50)) = rbx; 0x00402e2a mov rbx, rbp | rbx = rbp; 0x00402e2d sub r12d, dword [rbp + 0x20] | r12d -= *((rbp + 0x20)); | if (r12d != 0) { 0x00402e31 jne 0x402dc0 | goto label_0; | } 0x00402e33 jmp 0x402e9c | goto label_1; | label_3: 0x00402e35 test r12d, r12d | | if (r12d <= 0) { 0x00402e38 jle 0x402e9c | goto label_1; | } 0x00402e3a lea rsi, [r14 + 0x20] | rsi = r14 + 0x20; 0x00402e3e mov rcx, qword [r14 + 0x28] | rcx = *((r14 + 0x28)); 0x00402e42 test rcx, rcx | | if (rcx == 0) { 0x00402e45 je 0x402e7b | goto label_5; | } 0x00402e47 movsd xmm0, qword [rsp] | xmm0 = *(rsp); 0x00402e4c mov rax, rsi | rax = rsi; 0x00402e4f nop | | do { 0x00402e50 xor edx, edx | edx = 0; 0x00402e52 ucomisd xmm0, qword [rcx + 0x18] | __asm ("ucomisd xmm0, qword [rcx + 0x18]"); | if (rcx <= 0) { 0x00402e57 cmovbe rax, rcx | rax = rcx; | } 0x00402e5b seta dl | dl = (rcx > 0) ? 1 : 0; 0x00402e5e mov rcx, qword [rcx + rdx*8 + 8] | rcx = *((rcx + rdx*8 + 8)); 0x00402e63 test rcx, rcx | 0x00402e66 jne 0x402e50 | | } while (rcx != 0); 0x00402e68 cmp rax, rsi | | if (rax != rsi) { 0x00402e6b je 0x402e7b | 0x00402e6d movsd xmm1, qword [rax + 0x18] | xmm1 = *((rax + 0x18)); 0x00402e72 ucomisd xmm1, xmm0 | __asm ("ucomisd xmm1, xmm0"); 0x00402e76 mov rsi, rax | rsi = rax; | if (rax <= rsi) { 0x00402e79 jbe 0x402e93 | goto label_6; | } | } | label_5: 0x00402e7b mov dword [rsp + 0xc], 0 | *((rsp + 0xc)) = 0; 0x00402e83 mov rdx, rsp | 0x00402e86 lea rcx, [rsp + 0xc] | 0x00402e8b mov rdi, r14 | 0x00402e8e call 0x6918b0 | eax = BloombergLP::bslstl::TreeIterator,BloombergLP::bslstl::TreeNode>,long>bsl::map,bsl::allocator>>::emplace_hint(BloombergLP::bslstl::TreeIteratorconst,BloombergLP::bslstl::TreeNode>,long>,doubleconst&,int&&) (r14, rsi, rsp, rsp + 0xc); | label_6: 0x00402e93 add dword [rax + 0x20], r12d | *((rax + 0x20)) += r12d; 0x00402e97 jmp 0x402e9c | goto label_1; | label_4: 0x00402e99 mov dword [rbx + 0x20], eax | *((rbx + 0x20)) = eax; | label_1: 0x00402e9c add rsp, 0x10 | 0x00402ea0 pop rbx | 0x00402ea1 pop r12 | 0x00402ea3 pop r14 | 0x00402ea5 pop r15 | 0x00402ea7 pop rbp | 0x00402ea8 ret | return rax; | }