; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x482490 */ | #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_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) */ 0x00482490 push rbp | 0x00482491 push r15 | 0x00482493 push r14 | 0x00482495 push r13 | 0x00482497 push r12 | 0x00482499 push rbx | 0x0048249a sub rsp, 0x38 | 0x0048249e mov ebp, r9d | 0x004824a1 mov r15, r8 | r15 = r8; 0x004824a4 mov r14, rcx | r14 = rcx; 0x004824a7 mov r12, rdx | r12 = rdx; 0x004824aa mov r13, rsi | r13 = rsi; 0x004824ad mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x004824b2 mov rdi, rdx | 0x004824b5 mov rsi, r8 | rsi = r8; 0x004824b8 call 0x480580 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice1const&) (rdx); 0x004824bd mov ebx, eax | ebx = eax; 0x004824bf test eax, eax | | if (eax != 0) { 0x004824c1 jne 0x4825f6 | goto label_0; | } 0x004824c7 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x004824cd jne 0x482509 | 0x004824cf movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x004824d4 mov rdi, r13 | 0x004824d7 mov rsi, r12 | 0x004824da mov rdx, r14 | 0x004824dd call 0x464340 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (r13, r12, r14, rcx); 0x004824e2 mov ebx, eax | ebx = eax; 0x004824e4 test eax, eax | | if (eax != 0) { 0x004824e6 jne 0x4825f6 | goto label_0; | } 0x004824ec mov rdi, r12 | 0x004824ef mov rsi, r15 | rsi = r15; 0x004824f2 call 0x480580 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice1const&) (r12); 0x004824f7 mov ebx, eax | ebx = eax; 0x004824f9 test eax, eax | | if (eax != 0) { 0x004824fb jne 0x48255b | goto label_1; | } 0x004824fd mov rdi, r13 | 0x00482500 call 0x48c6b0 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x00482505 mov al, 1 | al = 1; 0x00482507 jmp 0x482527 | | } else { 0x00482509 mov rdi, r12 | 0x0048250c mov rsi, r15 | rsi = r15; 0x0048250f call 0x480580 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice1const&) (r12); 0x00482514 mov ebx, eax | ebx = eax; 0x00482516 test eax, eax | | if (eax != 0) { 0x00482518 jne 0x48255b | goto label_1; | } 0x0048251a test ebp, 0x10000 | 0x00482520 sete al | al = ((ebp & 0x10000) == 0) ? 1 : 0; 0x00482523 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x00482527 mov rcx, qword [rsp + 0x70] | rcx = *((rsp + 0x70)); 0x0048252c mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x00482531 mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x00482536 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x0048253b mov qword [rsp + 0x28], rcx | *((rsp + 0x28)) = rcx; 0x00482540 mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x00482544 lea rsi, [rsp + 0x10] | 0x00482549 mov rdi, r15 | 0x0048254c call 0x480610 | eax = intBloombergLP::balb::Choice1::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x00482551 test eax, eax | | if (eax == 0) { 0x00482553 je 0x482607 | goto label_2; | } 0x00482559 mov ebx, eax | ebx = eax; | label_1: 0x0048255b mov esi, 0x5441fb | 0x00482560 mov edx, 0x22 | 0x00482565 mov rdi, r12 | 0x00482568 call 0x428ba0 | 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); 0x0048256d mov esi, 0x54421e | 0x00482572 mov edx, 8 | 0x00482577 mov rdi, rax | 0x0048257a call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0048257f mov rsi, qword [r14] | 0x00482582 mov rdx, qword [r14 + 8] | 0x00482586 mov rdi, rax | 0x00482589 call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x0048258e mov esi, 0x6675eb | 0x00482593 mov edx, 2 | 0x00482598 mov rdi, rax | 0x0048259b call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x6675eb, 2); 0x004825a0 mov rbp, rax | 0x004825a3 mov rax, qword [rax] | rax = *(rax); 0x004825a6 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x004825aa add rsi, rbp | rsi += rbp; 0x004825ad lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x004825b2 mov rdi, r14 | rdi = r14; 0x004825b5 call 0x405930 | std::_1::ios_base::getloc()const (); 0x004825ba mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x004825bf mov rdi, r14 | rdi = r14; 0x004825c2 call 0x405a20 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x004825c7 mov rcx, qword [rax] | rcx = *(rax); 0x004825ca mov rdi, rax | rdi = rax; 0x004825cd mov esi, 0xa | esi = 0xa; 0x004825d2 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x004825d5 mov r14d, eax | r14d = eax; 0x004825d8 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x004825dd call 0x405ac0 | std::_1::locale::~locale() (); 0x004825e2 movsx esi, r14b | esi = (int32_t) r14b; 0x004825e6 mov rdi, rbp | rdi = rbp; 0x004825e9 call 0x4056b0 | std::_1::basic_ostream>::put(char) (); 0x004825ee mov rdi, rbp | rdi = rbp; 0x004825f1 call 0x4058f0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x004825f6 mov eax, ebx | eax = ebx; 0x004825f8 add rsp, 0x38 | 0x004825fc pop rbx | 0x004825fd pop r12 | 0x004825ff pop r13 | 0x00482601 pop r14 | 0x00482603 pop r15 | 0x00482605 pop rbp | 0x00482606 ret | return rax; | label_2: 0x00482607 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0048260d jne 0x48261b | 0x0048260f mov rdi, r13 | 0x00482612 call 0x48c760 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x00482617 xor eax, eax | eax = 0; 0x00482619 jmp 0x48261f | | } else { 0x0048261b mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0048261f mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x00482624 mov byte [rcx], al | *(rcx) = al; 0x00482626 xor ebx, ebx | ebx = 0; 0x00482628 jmp 0x4825f6 | | } while (1); | }