; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x4caf90 */ | #include | ; (fcn) method.void_BloombergLP::bslalg::ArrayPrimitives_Imp::insert_BloombergLP::s_baltst::Choice3__BloombergLP::s_baltst::Choice3_const__bsl::allocator_BloombergLP::s_baltst.Choice3____BloombergLP::s_baltst::Choice3__BloombergLP::s_baltst::Choice3__Bloomber () | int64_t method_void_BloombergLP::bslalg::ArrayPrimitives_Imp::insert_BloombergLP::s_baltst::Choice3_BloombergLP::s_baltst::Choice3_const_bsl::allocator_BloombergLP::s_baltst_Choice3_BloombergLP::s_baltst::Choice3_BloombergLP::s_baltst::Choice3_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; | uint32_t var_30h; | r9 = arg6; | r8 = arg5; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* void BloombergLP::bslalg::ArrayPrimitives_Imp::insert >(BloombergLP::s_baltst::Choice3*, BloombergLP::s_baltst::Choice3*, BloombergLP::s_baltst::Choice3 const*, BloombergLP::s_baltst::Choice3 const*, unsigned long, bsl::allocator, BloombergLP::bslmf::MetaInt<1>*) */ 0x004caf90 push rbp | 0x004caf91 push r15 | 0x004caf93 push r14 | 0x004caf95 push r13 | 0x004caf97 push r12 | 0x004caf99 push rbx | 0x004caf9a sub rsp, 0x38 | 0x004caf9e mov qword [rsp + 8], r9 | *((rsp + 8)) = r9; 0x004cafa3 mov qword [rsp], rdx | *(rsp) = rdx; 0x004cafa7 test r8, r8 | | if (r8 == 0) { 0x004cafaa je 0x4cb0c6 | goto label_0; | } 0x004cafb0 mov r13, rsi | r13 = rsi; 0x004cafb3 mov r15, rdi | r15 = rdi; 0x004cafb6 mov r14, rsi | r14 = rsi; 0x004cafb9 sub r14, rdi | r14 -= rdi; 0x004cafbc mov rax, r14 | rax = r14; 0x004cafbf sar rax, 7 | rax >>= 7; 0x004cafc3 movabs rcx, 0xaaaaaaaaaaaaaaab | rcx = 0xaaaaaaaaaaaaaaab; 0x004cafcd imul rcx, rax | rcx *= rax; 0x004cafd1 cmp rcx, r8 | 0x004cafd4 mov rbp, r8 | 0x004cafd7 mov qword [rsp + 0x28], rcx | *((rsp + 0x28)) = rcx; | if (rcx < r8) { 0x004cafdc cmovb rbp, rcx | | } 0x004cafe0 mov qword [rsp + 0x30], r8 | *((rsp + 0x30)) = r8; 0x004cafe5 lea r12, [r8 + r8*2] | r12 = r8 * 3; 0x004cafe9 shl r12, 7 | r12 <<= 7; 0x004cafed lea rbx, [rdi + r12] | rbx = rdi + r12; 0x004caff1 test r14, r14 | | if (r14 != 0) { 0x004caff4 je 0x4cb004 | 0x004caff6 mov rdi, rbx | 0x004caff9 mov rsi, r15 | 0x004caffc mov rdx, r14 | 0x004cafff call 0x405860 | memmove (rbx, r15, r14); | } 0x004cb004 test rbp, rbp | | if (rbp == 0) { 0x004cb007 je 0x4cb07e | goto label_1; | } 0x004cb009 mov rax, r12 | rax = r12; 0x004cb00c mov r12, r15 | r12 = r15; 0x004cb00f mov qword [rsp + 0x20], r14 | *((rsp + 0x20)) = r14; 0x004cb014 mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x004cb019 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x004cb01e add rax, r13 | rax += r13; 0x004cb021 mov rcx, rbp | rcx = rbp; 0x004cb024 neg rcx | rcx = -rcx; 0x004cb027 lea r13, [rcx + rcx*2] | r13 = rcx * 3; 0x004cb02b shl r13, 7 | r13 <<= 7; 0x004cb02f add r13, rax | r13 += rax; 0x004cb032 shl rbp, 7 | rbp <<= 7; 0x004cb036 lea r15, [rbp + rbp*2] | r15 = rbp + rbp*2; 0x004cb03b xor ebp, ebp | ebp = 0; 0x004cb03d nop dword [rax] | | do { 0x004cb040 mov rax, qword [rsp] | rax = *(rsp); 0x004cb044 lea rsi, [rax + rbp] | 0x004cb048 lea r14, [r12 + rbp] | r14 = r12 + rbp; 0x004cb04c mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x004cb051 mov rdx, qword [rax] | 0x004cb054 mov rdi, r14 | 0x004cb057 call 0x4b8f60 | BloombergLP::s_baltst::Choice3::Choice3(BloombergLP::s_baltst::Choice3const&,BloombergLP::bslma::Allocator*) (r14, rax + rbp, *(rax)); 0x004cb05c add rbp, 0x180 | rbp += 0x180; 0x004cb063 cmp r15, rbp | 0x004cb066 jne 0x4cb040 | | } while (r15 != rbp); 0x004cb068 add qword [rsp], rbp | 0x004cb06c mov r14, qword [rsp + 0x20] | r14 = *((rsp + 0x20)); 0x004cb071 mov r15, r12 | r15 = r12; 0x004cb074 mov r13, qword [rsp + 0x18] | r13 = *((rsp + 0x18)); 0x004cb079 mov r12, qword [rsp + 0x10] | r12 = *((rsp + 0x10)); | label_1: 0x004cb07e mov rax, qword [rsp + 0x28] | rax = *((rsp + 0x28)); 0x004cb083 cmp rax, qword [rsp + 0x30] | | if (rax >= *((rsp + 0x30))) { 0x004cb088 jae 0x4cb0c6 | goto label_0; | } 0x004cb08a cmp rbx, r13 | | if (rbx == r13) { 0x004cb08d je 0x4cb0c6 | goto label_0; | } 0x004cb08f add r12, r15 | r12 += r15; 0x004cb092 sub r12, r13 | r12 -= r13; 0x004cb095 xor ebp, ebp | ebp = 0; 0x004cb097 nop word [rax + rax] | | do { 0x004cb0a0 mov rax, qword [rsp] | rax = *(rsp); 0x004cb0a4 lea rsi, [rax + rbp] | 0x004cb0a8 lea rdi, [r13 + rbp] | 0x004cb0ad mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x004cb0b2 mov rdx, qword [rax] | 0x004cb0b5 call 0x4b8f60 | BloombergLP::s_baltst::Choice3::Choice3(BloombergLP::s_baltst::Choice3const&,BloombergLP::bslma::Allocator*) (r13 + rbp, rax + rbp, *(rax)); 0x004cb0ba add rbp, 0x180 | rbp += 0x180; 0x004cb0c1 cmp r12, rbp | 0x004cb0c4 jne 0x4cb0a0 | | } while (r12 != rbp); | label_0: 0x004cb0c6 add rsp, 0x38 | 0x004cb0ca pop rbx | 0x004cb0cb pop r12 | 0x004cb0cd pop r13 | 0x004cb0cf pop r14 | 0x004cb0d1 pop r15 | 0x004cb0d3 pop rbp | 0x004cb0d4 ret | return rax; | }