; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x4825f0 */ | #include | ; (fcn) method.int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::balb::Choice1__BloombergLP::bdlat_TypeCategory.Choice__bool__BloombergLP::baljsn::Formatter__std::__1::basic_ostream_char__std::__1::char_traits_char_____std::__1::basic () | uint64_t method_int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::balb::Choice1_BloombergLP::bdlat_TypeCategory_Choice_bool_BloombergLP::baljsn::Formatter_std::_1::basic_ostream_char_std::_1::char_traits_char_std::_1::basic (int64_t arg_70h, int64_t arg_78h, int64_t arg6, int64_t arg5, int64_t arg4, int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_7h; | int64_t var_8h; | int64_t var_10h; | int64_t var_18h; | int64_t var_20h; | int64_t var_28h; | int64_t var_30h; | r9 = arg6; | r8 = arg5; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* int BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember(bool*, BloombergLP::baljsn::Formatter*, std::__1::basic_ostream >*, std::__1::basic_string_view > const&, BloombergLP::balb::Choice1 const&, int, BloombergLP::baljsn::EncoderOptions const&, bool, BloombergLP::bdlat_TypeCategory::Choice) */ 0x004825f0 push rbp | 0x004825f1 push r15 | 0x004825f3 push r14 | 0x004825f5 push r13 | 0x004825f7 push r12 | 0x004825f9 push rbx | 0x004825fa sub rsp, 0x38 | 0x004825fe mov ebp, r9d | 0x00482601 mov r15, r8 | r15 = r8; 0x00482604 mov r14, rcx | r14 = rcx; 0x00482607 mov r12, rdx | r12 = rdx; 0x0048260a mov r13, rsi | r13 = rsi; 0x0048260d mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x00482612 mov rdi, rdx | 0x00482615 mov rsi, r8 | rsi = r8; 0x00482618 call 0x4806e0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice1const&) (rdx); 0x0048261d mov ebx, eax | ebx = eax; 0x0048261f test eax, eax | | if (eax != 0) { 0x00482621 jne 0x482753 | goto label_0; | } 0x00482627 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0048262d jne 0x48264c | 0x0048262f movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x00482634 mov rdi, r13 | 0x00482637 mov rsi, r12 | 0x0048263a mov rdx, r14 | 0x0048263d call 0x4642f0 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (r13, r12, r14, rcx); 0x00482642 mov ebx, eax | ebx = eax; 0x00482644 test eax, eax | | if (eax != 0) { 0x00482646 jne 0x482753 | goto label_0; | } | } 0x0048264c test ebp, 0x10000 | 0x00482652 sete byte [rsp + 7] | rsp + 7 = ((ebp & 0x10000) == 0) ? 1 : 0; 0x00482657 mov rdi, r12 | 0x0048265a mov rsi, r15 | rsi = r15; 0x0048265d call 0x4806e0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice1const&) (r12); 0x00482662 mov ebx, eax | ebx = eax; 0x00482664 test eax, eax | | if (eax == 0) { 0x00482666 jne 0x4826b8 | 0x00482668 mov al, byte [rsp + 7] | al = *((rsp + 7)); 0x0048266c mov rbx, qword [rsp + 0x70] | rbx = *((rsp + 0x70)); 0x00482671 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x00482677 jne 0x482685 | 0x00482679 mov rdi, r13 | 0x0048267c call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x00482681 mov al, 1 | al = 1; 0x00482683 jmp 0x482689 | | } else { 0x00482685 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x00482689 mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x0048268e mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x00482693 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x00482698 mov qword [rsp + 0x28], rbx | *((rsp + 0x28)) = rbx; 0x0048269d mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x004826a1 lea rsi, [rsp + 0x10] | 0x004826a6 mov rdi, r15 | 0x004826a9 call 0x480770 | eax = intBloombergLP::balb::Choice1::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x004826ae test eax, eax | | if (eax == 0) { 0x004826b0 je 0x482764 | goto label_1; | } 0x004826b6 mov ebx, eax | ebx = eax; | } 0x004826b8 mov esi, 0x5435e1 | 0x004826bd mov edx, 0x22 | 0x004826c2 mov rdi, r12 | 0x004826c5 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (r12, "Unable to encode value of element ", 0x22); 0x004826ca mov esi, 0x543604 | 0x004826cf mov edx, 8 | 0x004826d4 mov rdi, rax | 0x004826d7 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x004826dc mov rsi, qword [r14] | 0x004826df mov rdx, qword [r14 + 8] | 0x004826e3 mov rdi, rax | 0x004826e6 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x004826eb mov esi, 0x667b0d | 0x004826f0 mov edx, 2 | 0x004826f5 mov rdi, rax | 0x004826f8 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x004826fd mov rbp, rax | 0x00482700 mov rax, qword [rax] | rax = *(rax); 0x00482703 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x00482707 add rsi, rbp | rsi += rbp; 0x0048270a lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0048270f mov rdi, r14 | rdi = r14; 0x00482712 call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x00482717 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0048271c mov rdi, r14 | rdi = r14; 0x0048271f call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x00482724 mov rcx, qword [rax] | rcx = *(rax); 0x00482727 mov rdi, rax | rdi = rax; 0x0048272a mov esi, 0xa | esi = 0xa; 0x0048272f call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x00482732 mov r14d, eax | r14d = eax; 0x00482735 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0048273a call 0x405a70 | std::_1::locale::~locale() (); 0x0048273f movsx esi, r14b | esi = (int32_t) r14b; 0x00482743 mov rdi, rbp | rdi = rbp; 0x00482746 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x0048274b mov rdi, rbp | rdi = rbp; 0x0048274e call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x00482753 mov eax, ebx | eax = ebx; 0x00482755 add rsp, 0x38 | 0x00482759 pop rbx | 0x0048275a pop r12 | 0x0048275c pop r13 | 0x0048275e pop r14 | 0x00482760 pop r15 | 0x00482762 pop rbp | 0x00482763 ret | return rax; | label_1: 0x00482764 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0048276a jne 0x482778 | 0x0048276c mov rdi, r13 | 0x0048276f call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x00482774 xor eax, eax | eax = 0; 0x00482776 jmp 0x48277c | | } else { 0x00482778 mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0048277c mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x00482781 mov byte [rcx], al | *(rcx) = al; 0x00482783 xor ebx, ebx | ebx = 0; 0x00482785 jmp 0x482753 | | } while (1); | }