; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x4ca450 */ | #include | ; (fcn) method.void_BloombergLP::bslalg::ArrayPrimitives_Imp::insert_BloombergLP::s_baltst::Choice1__BloombergLP::s_baltst::Choice1_const__bsl::allocator_BloombergLP::s_baltst.Choice1____BloombergLP::s_baltst::Choice1__BloombergLP::s_baltst::Choice1__Bloomber () | int64_t method_void_BloombergLP::bslalg::ArrayPrimitives_Imp::insert_BloombergLP::s_baltst::Choice1_BloombergLP::s_baltst::Choice1_const_bsl::allocator_BloombergLP::s_baltst_Choice1_BloombergLP::s_baltst::Choice1_BloombergLP::s_baltst::Choice1_Bloomber (int64_t arg6, uint32_t arg5, int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_10h; | int64_t var_18h; | int64_t var_20h; | int64_t var_28h; | int64_t var_30h; | int64_t var_38h; | int64_t var_40h; | int64_t var_48h; | uint32_t var_50h; | r9 = arg6; | r8 = arg5; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* void BloombergLP::bslalg::ArrayPrimitives_Imp::insert >(BloombergLP::s_baltst::Choice1*, BloombergLP::s_baltst::Choice1*, BloombergLP::s_baltst::Choice1 const*, BloombergLP::s_baltst::Choice1 const*, unsigned long, bsl::allocator, BloombergLP::bslmf::MetaInt<1>*) */ 0x004ca450 push rbp | 0x004ca451 push r15 | 0x004ca453 push r14 | 0x004ca455 push r13 | 0x004ca457 push r12 | 0x004ca459 push rbx | 0x004ca45a sub rsp, 0x58 | 0x004ca45e test r8, r8 | | if (r8 == 0) { 0x004ca461 je 0x4ca5ce | goto label_0; | } 0x004ca467 mov r15, r9 | r15 = r9; 0x004ca46a mov r12, r8 | r12 = r8; 0x004ca46d mov rbx, rdx | rbx = rdx; 0x004ca470 mov r13, rsi | r13 = rsi; 0x004ca473 mov rbp, rdi | 0x004ca476 mov rdx, rsi | rdx = rsi; 0x004ca479 sub rdx, rdi | rdx -= rdi; 0x004ca47c mov rax, rdx | rax = rdx; 0x004ca47f sar rax, 3 | rax >>= 3; 0x004ca483 movabs rcx, 0xaaaaaaaaaaaaaaab | rcx = 0xaaaaaaaaaaaaaaab; 0x004ca48d imul rcx, rax | rcx *= rax; 0x004ca491 cmp rcx, r8 | 0x004ca494 mov rsi, r8 | rsi = r8; 0x004ca497 mov qword [rsp + 0x50], rcx | *((rsp + 0x50)) = rcx; | if (rcx < r8) { 0x004ca49c cmovb rsi, rcx | rsi = rcx; | } 0x004ca4a0 lea rax, [r8 + r8*2] | rax = r8 * 3; 0x004ca4a4 mov qword [rsp + 0x20], rax | *((rsp + 0x20)) = rax; 0x004ca4a9 lea r14, [rdi + rax*8] | r14 = rdi + rax*8; 0x004ca4ad test rdx, rdx | 0x004ca4b0 mov qword [rsp + 0x28], r13 | *((rsp + 0x28)) = r13; | if (rdx != 0) { 0x004ca4b5 je 0x4ca4cd | 0x004ca4b7 mov rdi, r14 | 0x004ca4ba mov r13, rsi | r13 = rsi; 0x004ca4bd mov rsi, rbp | 0x004ca4c0 call 0x405860 | memmove (r14, rbp, rdx); 0x004ca4c5 mov rsi, r13 | rsi = r13; 0x004ca4c8 mov r13, qword [rsp + 0x28] | r13 = *((rsp + 0x28)); | } 0x004ca4cd mov rax, qword [rsp + 0x20] | rax = *((rsp + 0x20)); 0x004ca4d2 lea rdi, [r13 + rax*8] | rdi = r13 + rax*8; 0x004ca4d7 test rsi, rsi | 0x004ca4da mov qword [rsp + 0x18], rdi | *((rsp + 0x18)) = rdi; 0x004ca4df mov qword [rsp + 0x10], r14 | *((rsp + 0x10)) = r14; | if (rsi == 0) { 0x004ca4e4 je 0x4ca558 | goto label_1; | } 0x004ca4e6 mov qword [rsp + 0x48], r12 | *((rsp + 0x48)) = r12; 0x004ca4eb mov rax, rsi | rax = rsi; 0x004ca4ee neg rax | rax = -rax; 0x004ca4f1 lea rax, [rax + rax*2] | rax *= 3; 0x004ca4f5 lea rax, [rdi + rax*8] | rax = rdi + rax*8; 0x004ca4f9 mov qword [rsp + 0x38], rax | *((rsp + 0x38)) = rax; 0x004ca4fe mov rdx, qword [r15] | 0x004ca501 mov qword [rsp + 0x40], rsi | *((rsp + 0x40)) = rsi; 0x004ca506 lea rax, [rsi + rsi*2] | rax = rsi * 3; 0x004ca50a lea r12, [rax*8 - 0x18] | r12 = rax*8 - 0x18; 0x004ca512 xor r14d, r14d | r14d = 0; 0x004ca515 mov qword [rsp + 0x30], rdx | *((rsp + 0x30)) = rdx; 0x004ca51a nop word [rax + rax] | | do { 0x004ca520 lea rsi, [rbx + r14] | 0x004ca524 lea r13, [rbp + r14] | r13 = rbp + r14; 0x004ca529 mov rdi, r13 | 0x004ca52c call 0x4b6c00 | BloombergLP::s_baltst::Choice1::Choice1(BloombergLP::s_baltst::Choice1const&,BloombergLP::bslma::Allocator*) (r13, rbx + r14, *(r15)); 0x004ca531 cmp r12, r14 | | if (r12 == r14) { 0x004ca534 je 0x4ca53f | goto label_2; | } 0x004ca536 mov rdx, qword [r15] | rdx = *(r15); 0x004ca539 add r14, 0x18 | r14 += 0x18; 0x004ca53d jmp 0x4ca520 | | } while (1); | label_2: 0x004ca53f lea rbx, [rbx + r14 + 0x18] | rbx = rbx + r14 + 0x18; 0x004ca544 mov r13, qword [rsp + 0x28] | r13 = *((rsp + 0x28)); 0x004ca549 mov rdi, qword [rsp + 0x18] | rdi = *((rsp + 0x18)); 0x004ca54e mov r14, qword [rsp + 0x10] | r14 = *((rsp + 0x10)); 0x004ca553 mov r12, qword [rsp + 0x48] | r12 = *((rsp + 0x48)); | label_1: 0x004ca558 cmp qword [rsp + 0x50], r12 | | if (*((rsp + 0x50)) >= r12) { 0x004ca55d jae 0x4ca5ce | goto label_0; | } 0x004ca55f mov r12, qword [r15] | r12 = *(r15); 0x004ca562 cmp r14, r13 | | if (r14 == r13) { 0x004ca565 je 0x4ca5a7 | goto label_3; | } 0x004ca567 mov rax, qword [rsp + 0x20] | rax = *((rsp + 0x20)); 0x004ca56c lea r14, [rbp + rax*8 - 0x18] | r14 = rbp + rax*8 - 0x18; 0x004ca571 mov rdx, r12 | 0x004ca574 mov rbp, r13 | 0x004ca577 nop word [rax + rax] | | do { 0x004ca580 mov rdi, rbp | 0x004ca583 mov rsi, rbx | 0x004ca586 call 0x4b6c00 | BloombergLP::s_baltst::Choice1::Choice1(BloombergLP::s_baltst::Choice1const&,BloombergLP::bslma::Allocator*) (rbp, rbx, r12); 0x004ca58b cmp r14, rbp | | if (r14 == rbp) { 0x004ca58e je 0x4ca59d | goto label_4; | } 0x004ca590 add rbp, 0x18 | rbp += 0x18; 0x004ca594 add rbx, 0x18 | rbx += 0x18; 0x004ca598 mov rdx, qword [r15] | rdx = *(r15); 0x004ca59b jmp 0x4ca580 | | } while (1); | label_4: 0x004ca59d mov r13, qword [rsp + 0x10] | r13 = *((rsp + 0x10)); 0x004ca5a2 mov rdi, qword [rsp + 0x18] | | label_3: 0x004ca5a7 mov qword [rsp + 8], r12 | *((rsp + 8)) = r12; 0x004ca5ac lea rdx, [rsp + 8] | rdx = rsp + 8; 0x004ca5b1 mov rsi, rdi | 0x004ca5b4 call 0x4c9d60 | voidBloombergLP::bslalg::ArrayDestructionPrimitives::destroy>(BloombergLP::s_baltst::Choice1*,BloombergLP::s_baltst::Choice1*,bsl::allocator) (*((rsp + 0x18)), rdi); 0x004ca5b9 mov qword [rsp + 8], r12 | *((rsp + 8)) = r12; 0x004ca5be lea rdx, [rsp + 8] | rdx = rsp + 8; 0x004ca5c3 mov rdi, r13 | rdi = r13; 0x004ca5c6 mov rsi, r13 | 0x004ca5c9 call 0x4c9d60 | voidBloombergLP::bslalg::ArrayDestructionPrimitives::destroy>(BloombergLP::s_baltst::Choice1*,BloombergLP::s_baltst::Choice1*,bsl::allocator) (rdi, r13); | label_0: 0x004ca5ce add rsp, 0x58 | 0x004ca5d2 pop rbx | 0x004ca5d3 pop r12 | 0x004ca5d5 pop r13 | 0x004ca5d7 pop r14 | 0x004ca5d9 pop r15 | 0x004ca5db pop rbp | 0x004ca5dc ret | return rax; | }