; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x47c290 */ | #include | ; (fcn) method.int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::s_baltst::Choice2__BloombergLP::bdlat_TypeCategory.Choice__bool__BloombergLP::baljsn::Formatter__std::__1::basic_ostream_char__std::__1::char_traits_char_____std::__1::b () | uint64_t method_int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::s_baltst::Choice2_BloombergLP::bdlat_TypeCategory_Choice_bool_BloombergLP::baljsn::Formatter_std::_1::basic_ostream_char_std::_1::char_traits_char_std::_1::b (int64_t arg_70h, int64_t arg_78h, int64_t arg6, int64_t arg5, int64_t arg4, int64_t arg3, int64_t arg2, uint32_t arg1) { | uint32_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::s_baltst::Choice2 const&, int, BloombergLP::baljsn::EncoderOptions const&, bool, BloombergLP::bdlat_TypeCategory::Choice) */ 0x0047c290 push rbp | 0x0047c291 push r15 | 0x0047c293 push r14 | 0x0047c295 push r13 | 0x0047c297 push r12 | 0x0047c299 push rbx | 0x0047c29a sub rsp, 0x38 | 0x0047c29e mov ebp, r9d | 0x0047c2a1 mov r15, r8 | r15 = r8; 0x0047c2a4 mov r14, rcx | r14 = rcx; 0x0047c2a7 mov r12, rdx | r12 = rdx; 0x0047c2aa mov r13, rsi | r13 = rsi; 0x0047c2ad mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x0047c2b2 mov rdi, rdx | 0x0047c2b5 mov rsi, r8 | rsi = r8; 0x0047c2b8 call 0x47c440 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice2const&) (rdx); 0x0047c2bd mov ebx, eax | ebx = eax; 0x0047c2bf test eax, eax | | if (eax != 0) { 0x0047c2c1 jne 0x47c3f6 | goto label_0; | } 0x0047c2c7 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c2cd jne 0x47c309 | 0x0047c2cf movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x0047c2d4 mov rdi, r13 | 0x0047c2d7 mov rsi, r12 | 0x0047c2da mov rdx, r14 | 0x0047c2dd 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); 0x0047c2e2 mov ebx, eax | ebx = eax; 0x0047c2e4 test eax, eax | | if (eax != 0) { 0x0047c2e6 jne 0x47c3f6 | goto label_0; | } 0x0047c2ec mov rdi, r12 | 0x0047c2ef mov rsi, r15 | rsi = r15; 0x0047c2f2 call 0x47c440 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice2const&) (r12); 0x0047c2f7 mov ebx, eax | ebx = eax; 0x0047c2f9 test eax, eax | | if (eax != 0) { 0x0047c2fb jne 0x47c35b | goto label_1; | } 0x0047c2fd mov rdi, r13 | 0x0047c300 call 0x48c6b0 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x0047c305 mov al, 1 | al = 1; 0x0047c307 jmp 0x47c327 | | } else { 0x0047c309 mov rdi, r12 | 0x0047c30c mov rsi, r15 | rsi = r15; 0x0047c30f call 0x47c440 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice2const&) (r12); 0x0047c314 mov ebx, eax | ebx = eax; 0x0047c316 test eax, eax | | if (eax != 0) { 0x0047c318 jne 0x47c35b | goto label_1; | } 0x0047c31a test ebp, 0x10000 | 0x0047c320 sete al | al = ((ebp & 0x10000) == 0) ? 1 : 0; 0x0047c323 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x0047c327 mov rcx, qword [rsp + 0x70] | rcx = *((rsp + 0x70)); 0x0047c32c mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x0047c331 mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x0047c336 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x0047c33b mov qword [rsp + 0x28], rcx | *((rsp + 0x28)) = rcx; 0x0047c340 mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x0047c344 lea rsi, [rsp + 0x10] | 0x0047c349 mov rdi, r15 | 0x0047c34c call 0x47c4d0 | eax = intBloombergLP::s_baltst::Choice2::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x0047c351 test eax, eax | | if (eax == 0) { 0x0047c353 je 0x47c407 | goto label_2; | } 0x0047c359 mov ebx, eax | ebx = eax; | label_1: 0x0047c35b mov esi, 0x5441fb | 0x0047c360 mov edx, 0x22 | 0x0047c365 mov rdi, r12 | 0x0047c368 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); 0x0047c36d mov esi, 0x54421e | 0x0047c372 mov edx, 8 | 0x0047c377 mov rdi, rax | 0x0047c37a call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047c37f mov rsi, qword [r14] | 0x0047c382 mov rdx, qword [r14 + 8] | 0x0047c386 mov rdi, rax | 0x0047c389 call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x0047c38e mov esi, 0x6675eb | 0x0047c393 mov edx, 2 | 0x0047c398 mov rdi, rax | 0x0047c39b call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x6675eb, 2); 0x0047c3a0 mov rbp, rax | 0x0047c3a3 mov rax, qword [rax] | rax = *(rax); 0x0047c3a6 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047c3aa add rsi, rbp | rsi += rbp; 0x0047c3ad lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0047c3b2 mov rdi, r14 | rdi = r14; 0x0047c3b5 call 0x405930 | std::_1::ios_base::getloc()const (); 0x0047c3ba mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047c3bf mov rdi, r14 | rdi = r14; 0x0047c3c2 call 0x405a20 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047c3c7 mov rcx, qword [rax] | rcx = *(rax); 0x0047c3ca mov rdi, rax | rdi = rax; 0x0047c3cd mov esi, 0xa | esi = 0xa; 0x0047c3d2 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047c3d5 mov r14d, eax | r14d = eax; 0x0047c3d8 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0047c3dd call 0x405ac0 | std::_1::locale::~locale() (); 0x0047c3e2 movsx esi, r14b | esi = (int32_t) r14b; 0x0047c3e6 mov rdi, rbp | rdi = rbp; 0x0047c3e9 call 0x4056b0 | std::_1::basic_ostream>::put(char) (); 0x0047c3ee mov rdi, rbp | rdi = rbp; 0x0047c3f1 call 0x4058f0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047c3f6 mov eax, ebx | eax = ebx; 0x0047c3f8 add rsp, 0x38 | 0x0047c3fc pop rbx | 0x0047c3fd pop r12 | 0x0047c3ff pop r13 | 0x0047c401 pop r14 | 0x0047c403 pop r15 | 0x0047c405 pop rbp | 0x0047c406 ret | return rax; | label_2: 0x0047c407 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c40d jne 0x47c41b | 0x0047c40f mov rdi, r13 | 0x0047c412 call 0x48c760 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x0047c417 xor eax, eax | eax = 0; 0x0047c419 jmp 0x47c41f | | } else { 0x0047c41b mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0047c41f mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0047c424 mov byte [rcx], al | *(rcx) = al; 0x0047c426 xor ebx, ebx | ebx = 0; 0x0047c428 jmp 0x47c3f6 | | } while (1); | }