; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x484850 */ | #include | ; (fcn) method.BloombergLP::baljsn::Encoder_EncodeImplUtil.encodeCharArray_BloombergLP::baljsn::Formatter__bsl::vector_char__bsl::allocator_char____const__BloombergLP::baljsn::EncoderOptions_const_ () | int64_t method_BloombergLP::baljsn::Encoder_EncodeImplUtil_encodeCharArray_BloombergLP::baljsn::Formatter_bsl::vector_char_bsl::allocator_char_const_BloombergLP::baljsn::EncoderOptions_const_ (int64_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_20h; | uint32_t var_28h; | int64_t var_30h; | int64_t var_3ch; | int64_t var_40h; | int64_t var_44h; | int64_t var_54h; | int64_t var_58h; | int64_t var_60h; | int64_t var_6ch; | rsi = arg2; | rdi = arg1; | /* BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeCharArray(BloombergLP::baljsn::Formatter*, bsl::vector > const&, BloombergLP::baljsn::EncoderOptions const&) */ 0x00484850 push r15 | 0x00484852 push r14 | 0x00484854 push rbx | 0x00484855 sub rsp, 0x70 | 0x00484859 mov r15, rsi | r15 = rsi; 0x0048485c mov r14, rdi | r14 = rdi; 0x0048485f mov qword [rsp + 8], 0 | *((rsp + 8)) = 0; 0x00484868 movaps xmm0, xmmword [rip + 0xb8dc1] | xmm0 = .comment; 0x0048486f movups xmmword [rsp + 0x20], xmm0 | __asm ("movups xmmword [rsp + 0x20], xmm0"); 0x00484874 mov rax, qword [rip + 0x44882d] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0048487b test rax, rax | | if (rax != 0) { 0x0048487e je 0x48488c | 0x00484880 lea rcx, [rsp + 8] | rcx = rsp + 8; 0x00484885 mov qword [rsp + 0x30], rax | *((rsp + 0x30)) = rax; 0x0048488a jmp 0x4848aa | | } else { 0x0048488c call 0x518150 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); 0x00484891 cmp qword [rsp + 0x28], 0x17 | 0x00484897 mov qword [rsp + 0x30], rax | *((rsp + 0x30)) = rax; | if (*((rsp + 0x28)) != 0x17) { 0x0048489c je 0x4848a5 | 0x0048489e mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x004848a3 jmp 0x4848aa | | } else { 0x004848a5 lea rcx, [rsp + 8] | rcx = rsp + 8; | } | } 0x004848aa mov byte [rcx], 0 | *(rcx) = 0; 0x004848ad mov byte [rsp + 0x40], 0 | *((rsp + 0x40)) = 0; 0x004848b2 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x004848b5 movups xmmword [rsp + 0x44], xmm0 | __asm ("movups xmmword [rsp + 0x44], xmm0"); 0x004848ba mov dword [rsp + 0x54], 0 | *((rsp + 0x54)) = 0; 0x004848c2 mov eax, dword [r15 + 8] | eax = *((r15 + 8)); 0x004848c6 sub eax, dword [r15] | eax -= *(r15); 0x004848c9 add eax, 2 | eax += 2; 0x004848cc cdqe | rax = (int64_t) eax; 0x004848ce imul rax, rax, 0x55555556 | rax *= 0x55555556; 0x004848d5 mov rcx, rax | rcx = rax; 0x004848d8 shr rcx, 0x3f | rcx >>= 0x3f; 0x004848dc shr rax, 0x20 | rax >>= 0x20; 0x004848e0 add eax, ecx | eax += ecx; 0x004848e2 shl eax, 2 | eax <<= 2; 0x004848e5 movsxd rsi, eax | rsi = (int64_t) eax; 0x004848e8 lea rbx, [rsp + 8] | rbx = rsp + 8; 0x004848ed mov rdi, rbx | 0x004848f0 xor edx, edx | 0x004848f2 call 0x51bfb0 | bsl::basic_string,bsl::allocator>::privateResizeRaw(unsigned long,char) (rbx, rsi, 0); 0x004848f7 cmp qword [rsp + 0x28], 0x17 | | if (*((rsp + 0x28)) != 0x17) { 0x004848fd je 0x484904 | 0x004848ff mov rbx, qword [rsp + 8] | rbx = *((rsp + 8)); | } 0x00484904 mov r8, qword [r15] | 0x00484907 mov r9, qword [r15 + 8] | 0x0048490b mov dword [rsp], 0xffffffff | *(rsp) = 0xffffffff; 0x00484912 lea rdi, [rsp + 0x40] | 0x00484917 lea rdx, [rsp + 0x3c] | 0x0048491c lea rcx, [rsp + 0x6c] | 0x00484921 mov rsi, rbx | 0x00484924 call 0x484e50 | eax = intBloombergLP::bdlde::Base64Encoder::convert(char*,int*,int*,char const*,char const*,int) (rsp + 0x40, rbx, rsp + 0x3c, rsp + 0x6c, *(r15), *((r15 + 8))); 0x00484929 mov ebx, eax | ebx = eax; 0x0048492b test eax, eax | | if (eax >= 0) { 0x0048492d js 0x4849ce | 0x00484933 cmp qword [rsp + 0x28], 0x17 | | if (*((rsp + 0x28)) != 0x17) { 0x00484939 je 0x484942 | 0x0048493b mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x00484940 jmp 0x484947 | | } else { 0x00484942 lea rax, [rsp + 8] | rax = rsp + 8; | } 0x00484947 movsxd rsi, dword [rsp + 0x3c] | rsi = *((rsp + 0x3c)); 0x0048494c add rsi, rax | rsi += rax; 0x0048494f lea rdi, [rsp + 0x40] | 0x00484954 lea rdx, [rsp + 0x58] | 0x00484959 mov ecx, 0xffffffff | 0x0048495e call 0x4850e0 | eax = intBloombergLP::bdlde::Base64Encoder::endConvert(char*,int*,int) (rsp + 0x40, rsi, rsp + 0x58, 0xffffffff); 0x00484963 mov ebx, eax | ebx = eax; 0x00484965 test eax, eax | | if (eax < 0) { 0x00484967 js 0x4849ce | goto label_0; | } 0x00484969 cmp byte [r14 + 8], 0 | | if (*((r14 + 8)) != 0) { 0x0048496e je 0x48499c | 0x00484970 mov rax, qword [r14 + 0x18] | rax = *((r14 + 0x18)); 0x00484974 mov rcx, qword [r14 + 0x38] | rcx = *((r14 + 0x38)); 0x00484978 dec rcx | rcx--; 0x0048497b mov rdx, rcx | rdx = rcx; 0x0048497e shr rdx, 6 | rdx >>= 6; 0x00484982 mov rax, qword [rax + rdx*8] | rax = *((rax + rdx*8)); 0x00484986 bt rax, rcx | | if (((rax >> rcx) & 1) >= 0) { 0x0048498a jae 0x48499c | goto label_1; | } 0x0048498c mov rdi, qword [r14] | 0x0048498f mov esi, dword [r14 + 0xc] | 0x00484993 mov edx, dword [r14 + 0x10] | edx = *((r14 + 0x10)); 0x00484997 call 0x4d7f10 | BloombergLP::bdlb::Print::indent(std::_1::basic_ostream>&,int,int) (*(r14), *((r14 + 0xc))); | } | label_1: 0x0048499c mov rdi, qword [r14] | rdi = *(r14); 0x0048499f mov rax, qword [rsp + 0x20] | rax = *((rsp + 0x20)); 0x004849a4 cmp qword [rsp + 0x28], 0x17 | | if (*((rsp + 0x28)) != 0x17) { 0x004849aa je 0x4849b3 | 0x004849ac mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x004849b1 jmp 0x4849b8 | | } else { 0x004849b3 lea rcx, [rsp + 8] | rcx = rsp + 8; | } 0x004849b8 mov qword [rsp + 0x58], rcx | *((rsp + 0x58)) = rcx; 0x004849bd mov qword [rsp + 0x60], rax | *((rsp + 0x60)) = rax; 0x004849c2 lea rsi, [rsp + 0x58] | 0x004849c7 call 0x48ca40 | eax = BloombergLP::baljsn::PrintUtil::printString(std::_1::basic_ostream>&,std::_1::basic_string_view>const&) (rdi, rsp + 0x58); 0x004849cc mov ebx, eax | ebx = eax; | } | label_0: 0x004849ce lea rdi, [rsp + 0x40] | rdi = rsp + 0x40; 0x004849d3 call 0x4da050 | BloombergLP::bdlde::Base64Encoder::~Base64Encoder() (); 0x004849d8 cmp qword [rsp + 0x28], 0x17 | | if (*((rsp + 0x28)) != 0x17) { 0x004849de je 0x4849f0 | 0x004849e0 mov rsi, qword [rsp + 8] | rsi = *((rsp + 8)); 0x004849e5 mov rdi, qword [rsp + 0x30] | rdi = *((rsp + 0x30)); 0x004849ea mov rax, qword [rdi] | rax = *(rdi); 0x004849ed call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x004849f0 mov eax, ebx | eax = ebx; 0x004849f2 add rsp, 0x70 | 0x004849f6 pop rbx | 0x004849f7 pop r14 | 0x004849f9 pop r15 | 0x004849fb ret | return rax; | }