; assembly | /* r2dec pseudo code output */ | /* ball_recordjsonformatter.t/none @ 0x41b4f0 */ | #include | ; (fcn) method.BloombergLP::ball._anonymous_namespace_::FileFormatter::format_BloombergLP::baljsn::SimpleFormatter__BloombergLP::ball::Record_const_ () | uint64_t method_BloombergLP::ball_anonymous_namespace_::FileFormatter::format_BloombergLP::baljsn::SimpleFormatter_BloombergLP::ball::Record_const_ (int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_10h; | int64_t var_18h; | uint32_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; | int64_t var_58h; | int64_t var_60h; | int64_t var_68h; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::ball::(anonymous namespace)::FileFormatter::format(BloombergLP::baljsn::SimpleFormatter*, BloombergLP::ball::Record const&) */ 0x0041b4f0 push r15 | 0x0041b4f2 push r14 | 0x0041b4f4 push r13 | 0x0041b4f6 push r12 | 0x0041b4f8 push rbx | 0x0041b4f9 sub rsp, 0x70 | 0x0041b4fd mov rbx, rdx | rbx = rdx; 0x0041b500 mov r14, rsi | r14 = rsi; 0x0041b503 mov r13, rdi | r13 = rdi; 0x0041b506 mov eax, dword [rdi + 0x38] | eax = *((rdi + 0x38)); 0x0041b509 test eax, eax | | if (eax != 0) { 0x0041b50b je 0x41b53b | 0x0041b50d cmp eax, 1 | | if (eax != 1) { 0x0041b510 jne 0x41b56b | goto label_0; | } 0x0041b512 lea rax, [r13 + 8] | rax = r13 + 8; 0x0041b516 cmp qword [r13 + 0x28], 0x17 | | if (*((r13 + 0x28)) != 0x17) { 0x0041b51b je 0x41b520 | 0x0041b51d mov rax, qword [rax] | rax = *(rax); | } 0x0041b520 mov rcx, qword [r13 + 0x20] | rcx = *((r13 + 0x20)); 0x0041b524 mov qword [rsp + 0x30], rax | *((rsp + 0x30)) = rax; 0x0041b529 mov qword [rsp + 0x38], rcx | *((rsp + 0x38)) = rcx; 0x0041b52e cmp qword [rbx + 0x50], 0x17 | | if (*((rbx + 0x50)) != 0x17) { 0x0041b533 je 0x41b548 | 0x0041b535 mov rbx, qword [rbx + 0x30] | rbx = *((rbx + 0x30)); 0x0041b539 jmp 0x41b54c | | } else { 0x0041b53b cmp qword [rbx + 0x50], 0x17 | | if (*((rbx + 0x50)) == 0x17) { 0x0041b540 je 0x41b57b | goto label_1; | } 0x0041b542 mov rbx, qword [rbx + 0x30] | rbx = *((rbx + 0x30)); 0x0041b546 jmp 0x41b57f | goto label_2; | } 0x0041b548 add rbx, 0x30 | rbx += 0x30; | } 0x0041b54c mov qword [rsp], rbx | *(rsp) = rbx; 0x0041b550 lea rsi, [rsp + 0x30] | 0x0041b555 mov rdx, rsp | 0x0041b558 mov rdi, r14 | 0x0041b55b call 0x41cb50 | eax = intBloombergLP::baljsn::SimpleFormatter::addValue(std::_1::basic_string_view>const&,char const*const&) (r14, rsp + 0x30, rsp); 0x0041b560 mov ecx, eax | ecx = eax; 0x0041b562 mov eax, 0xffffffff | eax = 0xffffffff; 0x0041b567 test ecx, ecx | | if (ecx != 0) { 0x0041b569 jne 0x41b56d | goto label_3; | } | label_0: 0x0041b56b xor eax, eax | eax = 0; | do { | label_3: 0x0041b56d add rsp, 0x70 | 0x0041b571 pop rbx | 0x0041b572 pop r12 | 0x0041b574 pop r13 | 0x0041b576 pop r14 | 0x0041b578 pop r15 | 0x0041b57a ret | return rax; | label_1: 0x0041b57b add rbx, 0x30 | rbx += 0x30; | label_2: 0x0041b57f mov rax, qword [rip + 0x2d259a] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0041b586 test rax, rax | | if (rax == 0) { 0x0041b589 jne 0x41b590 | 0x0041b58b call 0x472d60 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0041b590 mov qword [rsp + 0x30], 0 | *((rsp + 0x30)) = 0; 0x0041b599 mov qword [rsp + 0x50], 0x17 | *((rsp + 0x50)) = 0x17; 0x0041b5a2 mov qword [rsp + 0x58], rax | *((rsp + 0x58)) = rax; 0x0041b5a7 mov rdi, rbx | 0x0041b5aa call 0x404740 | rax = strlen (rbx); 0x0041b5af mov qword [rsp + 0x48], 0 | *((rsp + 0x48)) = 0; 0x0041b5b8 lea r15, [rsp + 0x30] | r15 = rsp + 0x30; 0x0041b5bd mov ecx, 0x49b26a | 0x0041b5c2 mov rdi, r15 | 0x0041b5c5 mov rsi, rbx | 0x0041b5c8 mov rdx, rax | 0x0041b5cb call 0x476e40 | bsl::basic_string,bsl::allocator>::privateAppend(char const*,unsigned long,char const*) (r15, rbx, rax, "string<...>::assign(char*...): string too long"); 0x0041b5d0 mov byte [rsp], 0x2f | *(rsp) = 0x2f; 0x0041b5d4 mov r12, rsp | r12 = rsp; 0x0041b5d7 mov ecx, 1 | 0x0041b5dc mov rdi, r15 | 0x0041b5df mov rsi, r12 | 0x0041b5e2 mov rdx, 0xffffffffffffffff | 0x0041b5e9 call 0x479ca0 | rax = bsl::basic_string,bsl::allocator>::rfind(char const*,unsigned long,unsigned long)const (r15, r12, 0xffffffffffffffff, 1); 0x0041b5ee mov rbx, rax | rbx = rax; 0x0041b5f1 lea rax, [r13 + 8] | rax = r13 + 8; 0x0041b5f5 cmp qword [r13 + 0x28], 0x17 | | if (*((r13 + 0x28)) != 0x17) { 0x0041b5fa je 0x41b5ff | 0x0041b5fc mov rax, qword [rax] | rax = *(rax); | } 0x0041b5ff mov rcx, qword [r13 + 0x20] | rcx = *((r13 + 0x20)); 0x0041b603 mov qword [rsp + 0x60], rax | *((rsp + 0x60)) = rax; 0x0041b608 mov qword [rsp + 0x68], rcx | *((rsp + 0x68)) = rcx; 0x0041b60d cmp rbx, 0xffffffffffffffff | | if (rbx != -1) { 0x0041b611 je 0x41b65c | 0x0041b613 mov rax, qword [rip + 0x2d2506] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0041b61a test rax, rax | | if (rax == 0) { 0x0041b61d jne 0x41b624 | 0x0041b61f call 0x472d60 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0041b624 inc rbx | rbx++; 0x0041b627 mov qword [rsp], 0 | *(rsp) = 0; 0x0041b62f movaps xmm0, xmmword [rip + 0x7ddba] | xmm0 = .comment; 0x0041b636 movups xmmword [rsp + 0x18], xmm0 | __asm ("movups xmmword [rsp + 0x18], xmm0"); 0x0041b63b mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0041b640 mov rdi, rsp | 0x0041b643 lea rsi, [rsp + 0x30] | 0x0041b648 mov rdx, rbx | 0x0041b64b mov rcx, 0xffffffffffffffff | 0x0041b652 call 0x477fe0 | bsl::basic_string,bsl::allocator>::assign(bsl::basic_string,bsl::allocator>const&,unsigned long,unsigned long) (rsp, rsp + 0x30, rbx, 0xffffffffffffffff); 0x0041b657 jmp 0x41b6fe | | } else { 0x0041b65c mov rax, qword [rsp + 0x50] | rax = *((rsp + 0x50)); 0x0041b661 mov qword [rsp + 0x20], rax | *((rsp + 0x20)) = rax; 0x0041b666 movups xmm0, xmmword [rsp + 0x30] | __asm ("movups xmm0, xmmword [rsp + 0x30]"); 0x0041b66b movups xmm1, xmmword [rsp + 0x40] | __asm ("movups xmm1, xmmword [rsp + 0x40]"); 0x0041b670 movaps xmmword [rsp + 0x10], xmm1 | *((rsp + 0x10)) = xmm1; 0x0041b675 movaps xmmword [rsp], xmm0 | *(rsp) = xmm0; 0x0041b679 mov rax, qword [rip + 0x2d24a0] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0041b680 test rax, rax | | if (rax == 0) { 0x0041b683 jne 0x41b68a | 0x0041b685 call 0x472d60 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0041b68a mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0041b68f cmp qword [rsp + 0x20], 0x17 | | if (*((rsp + 0x20)) == 0x17) { 0x0041b695 je 0x41b6fe | goto label_4; | } 0x0041b697 mov rcx, qword [rsp + 0x48] | rcx = *((rsp + 0x48)); 0x0041b69c cmp rcx, 0x17 | 0x0041b6a0 mov esi, 0x17 | esi = 0x17; | if (rcx > 0x17) { 0x0041b6a5 cmova rsi, rcx | rsi = rcx; | } 0x0041b6a9 mov qword [rsp], 0 | *(rsp) = 0; 0x0041b6b1 mov qword [rsp + 0x18], rcx | *((rsp + 0x18)) = rcx; 0x0041b6b6 mov qword [rsp + 0x20], rsi | *((rsp + 0x20)) = rsi; 0x0041b6bb cmp rcx, 0x18 | | if (rcx >= 0x18) { 0x0041b6bf jb 0x41b6d9 | 0x0041b6c1 inc rsi | rsi++; 0x0041b6c4 mov rcx, qword [rax] | rcx = *(rax); 0x0041b6c7 mov rdi, rax | rdi = rax; 0x0041b6ca call qword [rcx + 0x10] | rax = uint64_t (*rcx + 0x10)() (); 0x0041b6cd mov qword [rsp], rax | *(rsp) = rax; 0x0041b6d1 cmp qword [rsp + 0x20], 0x17 | | if (*((rsp + 0x20)) != 0x17) { 0x0041b6d7 jne 0x41b6dc | goto label_5; | } | } 0x0041b6d9 mov rax, r12 | rax = r12; | label_5: 0x0041b6dc mov rdx, qword [rsp + 0x18] | rdx = *((rsp + 0x18)); 0x0041b6e1 inc rdx | rdx++; | if (rdx == 0) { 0x0041b6e4 je 0x41b6fe | goto label_4; | } 0x0041b6e6 cmp qword [rsp + 0x50], 0x17 | | if (*((rsp + 0x50)) != 0x17) { 0x0041b6ec je 0x41b6f3 | 0x0041b6ee mov r15, qword [rsp + 0x30] | r15 = *((rsp + 0x30)); | } 0x0041b6f3 mov rdi, rax | 0x0041b6f6 mov rsi, r15 | 0x0041b6f9 call 0x404ca0 | memcpy (rax, r15, rdx); | } | label_4: 0x0041b6fe lea rsi, [rsp + 0x60] | 0x0041b703 mov rdx, rsp | 0x0041b706 mov rdi, r14 | 0x0041b709 call 0x41cc20 | eax = intBloombergLP::baljsn::SimpleFormatter::addValue,bsl::allocator>>(std::_1::basic_string_view>const&,bsl::basic_string,bsl::allocator>const&) (r14, rsp + 0x60, rsp); 0x0041b70e mov ebx, eax | ebx = eax; 0x0041b710 cmp qword [rsp + 0x20], 0x17 | | if (*((rsp + 0x20)) != 0x17) { 0x0041b716 je 0x41b727 | 0x0041b718 mov rsi, qword [rsp] | rsi = *(rsp); 0x0041b71c mov rdi, qword [rsp + 0x28] | rdi = *((rsp + 0x28)); 0x0041b721 mov rax, qword [rdi] | rax = *(rdi); 0x0041b724 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x0041b727 cmp qword [rsp + 0x50], 0x17 | | if (*((rsp + 0x50)) != 0x17) { 0x0041b72d je 0x41b73f | 0x0041b72f mov rsi, qword [rsp + 0x30] | rsi = *((rsp + 0x30)); 0x0041b734 mov rdi, qword [rsp + 0x58] | rdi = *((rsp + 0x58)); 0x0041b739 mov rax, qword [rdi] | rax = *(rdi); 0x0041b73c call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x0041b73f mov eax, 0xffffffff | eax = 0xffffffff; 0x0041b744 test ebx, ebx | 0x0041b746 jne 0x41b56d | | } while (ebx != 0); 0x0041b74c jmp 0x41b56b | goto label_0; | }