; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x4caae0 */ | #include | ; (fcn) method.void_bsl::vector_BloombergLP::s_baltst::Choice3__bsl::allocator_BloombergLP::s_baltst::Choice3___::privateInsert_BloombergLP::s_baltst.Choice3_const__BloombergLP::s_baltst::Choice3_const__BloombergLP::s_baltst::Choice3_const__BloombergLP::s_bal () | int64_t method_void_bsl::vector_BloombergLP::s_baltst::Choice3_bsl::allocator_BloombergLP::s_baltst::Choice3_::privateInsert_BloombergLP::s_baltst_Choice3_const_BloombergLP::s_baltst::Choice3_const_BloombergLP::s_baltst::Choice3_const_BloombergLP::s_bal (int64_t arg4, int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_10h; | int64_t var_18h_2; | int64_t var_28h_2; | int64_t var_38h; | int64_t var_40h; | int64_t var_48h; | int64_t var_50h; | int64_t var_58h; | int64_t var_60h; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* void bsl::vector >::privateInsert(BloombergLP::s_baltst::Choice3 const*, BloombergLP::s_baltst::Choice3 const*, BloombergLP::s_baltst::Choice3 const*, std::__1::forward_iterator_tag const&) */ 0x004caae0 push rbp | 0x004caae1 push r15 | 0x004caae3 push r14 | 0x004caae5 push r13 | 0x004caae7 push r12 | 0x004caae9 push rbx | 0x004caaea sub rsp, 0x68 | 0x004caaee mov rbp, rdx | 0x004caaf1 mov r8, rsi | r8 = rsi; 0x004caaf4 mov r15, rdi | r15 = rdi; 0x004caaf7 movabs rdx, 0xaaaaaaaaaaaaaa | rdx = 0xaaaaaaaaaaaaaa; 0x004cab01 mov rdi, rcx | rdi = rcx; 0x004cab04 sub rdi, rbp | rdi -= rbp; 0x004cab07 mov r12, rdi | r12 = rdi; 0x004cab0a sar r12, 7 | r12 >>= 7; 0x004cab0e movabs rax, 0xaaaaaaaaaaaaaaab | rax = 0xaaaaaaaaaaaaaaab; 0x004cab18 imul r12, rax | r12 *= rax; 0x004cab1c mov rsi, qword [r15 + 8] | rsi = *((r15 + 8)); 0x004cab20 mov rbx, rsi | rbx = *((r15 + 8)); 0x004cab23 sub rbx, qword [r15] | rbx -= *(r15); 0x004cab26 sar rbx, 7 | rbx >>= 7; 0x004cab2a imul rbx, rax | rbx *= rax; 0x004cab2e mov rax, rdx | rax = rdx; 0x004cab31 sub rax, rbx | rax -= rbx; 0x004cab34 cmp r12, rax | | if (r12 > rax) { 0x004cab37 ja 0x4cad1f | goto label_1; | } 0x004cab3d add rbx, r12 | rbx += r12; 0x004cab40 mov rax, qword [r15 + 0x10] | rax = *((r15 + 0x10)); 0x004cab44 cmp rbx, rax | | if (rbx <= rax) { 0x004cab47 jbe 0x4cacbf | goto label_2; | } 0x004cab4d mov qword [rsp + 0x50], rbp | *((rsp + 0x50)) = rbp; 0x004cab52 mov qword [rsp + 0x58], rcx | *((rsp + 0x58)) = rcx; 0x004cab57 mov rdi, rbx | 0x004cab5a mov rsi, rax | 0x004cab5d mov qword [rsp + 0x40], r8 | *((rsp + 0x40)) = r8; 0x004cab62 call 0x5227c0 | rax = bsl::Vector_Util::computeNewCapacity(unsigned long,unsigned long,unsigned long) (rbx, rax, rdx); 0x004cab67 mov rbp, rax | 0x004cab6a mov rdi, qword [r15 + 0x18] | rdi = *((r15 + 0x18)); 0x004cab6e xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x004cab71 movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x004cab76 mov qword [rsp + 0x20], 0 | *((rsp + 0x20)) = 0; 0x004cab7f mov qword [rsp + 0x28], rdi | *((rsp + 0x28)) = rdi; 0x004cab84 shl rax, 7 | rax <<= 7; 0x004cab88 lea rsi, [rax + rax*2] | rsi = rax * 3; 0x004cab8c mov rax, qword [rdi] | rax = *(rdi); 0x004cab8f call qword [rax + 0x10] | rax = uint64_t (*rax + 0x10)() (); 0x004cab92 mov qword [rsp + 0x18], rax | *((rsp + 0x18)) = rax; 0x004cab97 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x004cab9c mov qword [rsp + 0x20], rbp | *((rsp + 0x20)) = rbp; 0x004caba1 mov rdx, qword [r15] | rdx = *(r15); 0x004caba4 mov r14, qword [r15 + 8] | r14 = *((r15 + 8)); 0x004caba8 mov rcx, qword [r15 + 0x18] | rcx = *((r15 + 0x18)); 0x004cabac mov rbp, qword [rsp + 0x40] | rbp = *((rsp + 0x40)); 0x004cabb1 mov qword [rsp + 0x48], rdx | *((rsp + 0x48)) = rdx; 0x004cabb6 sub rbp, rdx | rbp -= rdx; 0x004cabb9 mov r13, rax | r13 = rax; 0x004cabbc add r13, rbp | r13 += rbp; 0x004cabbf mov qword [rsp + 0x60], rcx | *((rsp + 0x60)) = rcx; 0x004cabc4 lea rcx, [rsp + 0x60] | 0x004cabc9 mov qword [rsp + 0x38], rax | *((rsp + 0x38)) = rax; 0x004cabce mov rdi, r13 | 0x004cabd1 mov rsi, qword [rsp + 0x50] | 0x004cabd6 mov rdx, qword [rsp + 0x58] | 0x004cabdb xor r8d, r8d | r8d = 0; 0x004cabde call 0x4c9ca0 | voidBloombergLP::bslalg::ArrayPrimitives_Imp::copyConstruct>(BloombergLP::s_baltst::Choice3*,BloombergLP::s_baltst::Choice3const*,BloombergLP::s_baltst::Choice3const*,bsl::allocator,BloombergLP::bslmf::MetaInt<0>*) (r13, *((rsp + 0x50)), *((rsp + 0x58)), rsp + 0x60); 0x004cabe3 mov rdi, qword [rsp + 0x38] | rdi = *((rsp + 0x38)); 0x004cabe8 mov rsi, qword [rsp + 0x40] | rsi = *((rsp + 0x40)); 0x004cabed sub r14, rsi | r14 -= rsi; | if (r14 != 0) { 0x004cabf0 je 0x4cac13 | 0x004cabf2 lea rax, [r12 + r12*2] | rax = r12 * 3; 0x004cabf6 shl rax, 7 | rax <<= 7; 0x004cabfa add r13, rax | r13 += rax; 0x004cabfd mov rdi, r13 | 0x004cac00 mov rdx, r14 | 0x004cac03 mov r14, rsi | r14 = rsi; 0x004cac06 call 0x405bd0 | memcpy (r13, rsi, r14); 0x004cac0b mov rdi, qword [rsp + 0x38] | rdi = *((rsp + 0x38)); 0x004cac10 mov rsi, r14 | rsi = r14; | } 0x004cac13 mov qword [r15 + 8], rsi | *((r15 + 8)) = rsi; 0x004cac17 test rbp, rbp | 0x004cac1a mov r14, qword [rsp + 0x48] | r14 = *((rsp + 0x48)); | if (rbp != 0) { 0x004cac1f je 0x4cac2c | 0x004cac21 mov rsi, r14 | 0x004cac24 mov rdx, rbp | 0x004cac27 call 0x405bd0 | memcpy (rdi, r14, rbp); | } 0x004cac2c mov qword [r15 + 8], r14 | *((r15 + 8)) = r14; 0x004cac30 lea rax, [rbx + rbx*2] | rax = rbx * 3; 0x004cac34 shl rax, 7 | rax <<= 7; 0x004cac38 add qword [rsp + 0x18], rax | *((rsp + 0x18)) += rax; 0x004cac3d lea rsi, [rsp + 0x10] | 0x004cac42 mov rdi, r15 | 0x004cac45 call 0x5227f0 | bsl::Vector_Util::swap(void*,void*) (r15, rsp + 0x10); 0x004cac4a mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); 0x004cac4f test rbx, rbx | | if (rbx == 0) { 0x004cac52 je 0x4cad10 | goto label_3; | } 0x004cac58 mov rbp, qword [rsp + 0x18] | rbp = *((rsp + 0x18)); 0x004cac5d cmp rbx, rbp | | if (rbx != rbp) { 0x004cac60 jne 0x4cac8e | goto label_4; | } 0x004cac62 jmp 0x4cad02 | goto label_5; 0x004cac70 mov rdi, rbx | 0x004cac73 call 0x4c4a50 | BloombergLP::s_baltst::Sequence6::~Sequence6() (rbx); | do { | label_0: 0x004cac78 mov dword [rbx + 0x170], 0xffffffff | *((rbx + 0x170)) = 0xffffffff; 0x004cac82 add rbx, 0x180 | rbx += 0x180; 0x004cac89 cmp rbp, rbx | | if (rbp == rbx) { 0x004cac8c je 0x4cacfd | goto label_6; | } | label_4: 0x004cac8e mov eax, dword [rbx + 0x170] | eax = *((rbx + 0x170)); 0x004cac94 cmp rax, 3 | 0x004cac98 ja 0x4cac78 | | } while (rax > 3); | /* switch table (4 cases) at 0x64a020 */ 0x004cac9a jmp qword [rax*8 + 0x64a020] | 0x004caca1 cmp qword [rbx + 0x20], 0x17 | | if (*((rbx + 0x20)) != 0x17) { 0x004caca6 je 0x4cacb5 | 0x004caca8 mov rsi, qword [rbx] | rsi = *(rbx); 0x004cacab mov rdi, qword [rbx + 0x28] | rdi = *((rbx + 0x28)); 0x004cacaf mov rax, qword [rdi] | rax = *(rdi); 0x004cacb2 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x004cacb5 mov qword [rbx + 0x18], 0xffffffffffffffff | *((rbx + 0x18)) = 0xffffffffffffffff; 0x004cacbd jmp 0x4cac78 | goto label_0; | label_2: 0x004cacbf test rdi, rdi | | if (rdi != 0) { 0x004cacc2 je 0x4cacec | 0x004cacc4 mov rax, qword [r15 + 0x18] | rax = *((r15 + 0x18)); 0x004cacc8 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x004caccd mov qword [rsp], 0 | *(rsp) = 0; 0x004cacd5 lea r9, [rsp + 0x10] | r9 = rsp + 0x10; 0x004cacda mov rdi, r8 | 0x004cacdd mov rdx, rbp | 0x004cace0 mov r8, r12 | 0x004cace3 call 0x4cadd0 | voidBloombergLP::bslalg::ArrayPrimitives_Imp::insert>(BloombergLP::s_baltst::Choice3*,BloombergLP::s_baltst::Choice3*,BloombergLP::s_baltst::Choice3const*,BloombergLP::s_baltst::Choice3const*,unsigned long,bsl::allocator,BloombergLP::bslmf::MetaInt<1>*) (r8, rsi, rbp, rcx, r12); 0x004cace8 mov rsi, qword [r15 + 8] | rsi = *((r15 + 8)); | } 0x004cacec lea rax, [r12 + r12*2] | rax = r12 * 3; 0x004cacf0 shl rax, 7 | rax <<= 7; 0x004cacf4 add rax, rsi | rax += rsi; 0x004cacf7 mov qword [r15 + 8], rax | *((r15 + 8)) = rax; 0x004cacfb jmp 0x4cad10 | goto label_3; | label_6: 0x004cacfd mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); | label_5: 0x004cad02 mov rdi, qword [rsp + 0x28] | rdi = *((rsp + 0x28)); 0x004cad07 mov rax, qword [rdi] | rax = *(rdi); 0x004cad0a mov rsi, rbx | rsi = rbx; 0x004cad0d call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | label_3: 0x004cad10 add rsp, 0x68 | 0x004cad14 pop rbx | 0x004cad15 pop r12 | 0x004cad17 pop r13 | 0x004cad19 pop r14 | 0x004cad1b pop r15 | 0x004cad1d pop rbp | 0x004cad1e ret | return rax; | label_1: 0x004cad1f mov edi, 0x54efad | 0x004cad24 call 0x518a10 | return BloombergLP::bslstl::StdExceptUtil::throwLengthError(char const*) ("vector<...>::insert(pos,first,last): vector too long"); | }