; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x47c3a0 */ | #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) { | int64_t var_7h; | 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) */ 0x0047c3a0 push rbp | 0x0047c3a1 push r15 | 0x0047c3a3 push r14 | 0x0047c3a5 push r13 | 0x0047c3a7 push r12 | 0x0047c3a9 push rbx | 0x0047c3aa sub rsp, 0x38 | 0x0047c3ae mov ebp, r9d | 0x0047c3b1 mov r15, r8 | r15 = r8; 0x0047c3b4 mov r14, rcx | r14 = rcx; 0x0047c3b7 mov r12, rdx | r12 = rdx; 0x0047c3ba mov r13, rsi | r13 = rsi; 0x0047c3bd mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x0047c3c2 mov rdi, rdx | 0x0047c3c5 mov rsi, r8 | rsi = r8; 0x0047c3c8 call 0x47c550 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice2const&) (rdx); 0x0047c3cd mov ebx, eax | ebx = eax; 0x0047c3cf test eax, eax | | if (eax != 0) { 0x0047c3d1 jne 0x47c503 | goto label_0; | } 0x0047c3d7 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c3dd jne 0x47c3fc | 0x0047c3df movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x0047c3e4 mov rdi, r13 | 0x0047c3e7 mov rsi, r12 | 0x0047c3ea mov rdx, r14 | 0x0047c3ed 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); 0x0047c3f2 mov ebx, eax | ebx = eax; 0x0047c3f4 test eax, eax | | if (eax != 0) { 0x0047c3f6 jne 0x47c503 | goto label_0; | } | } 0x0047c3fc test ebp, 0x10000 | 0x0047c402 sete byte [rsp + 7] | rsp + 7 = ((ebp & 0x10000) == 0) ? 1 : 0; 0x0047c407 mov rdi, r12 | 0x0047c40a mov rsi, r15 | rsi = r15; 0x0047c40d call 0x47c550 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice2const&) (r12); 0x0047c412 mov ebx, eax | ebx = eax; 0x0047c414 test eax, eax | | if (eax == 0) { 0x0047c416 jne 0x47c468 | 0x0047c418 mov al, byte [rsp + 7] | al = *((rsp + 7)); 0x0047c41c mov rbx, qword [rsp + 0x70] | rbx = *((rsp + 0x70)); 0x0047c421 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c427 jne 0x47c435 | 0x0047c429 mov rdi, r13 | 0x0047c42c call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x0047c431 mov al, 1 | al = 1; 0x0047c433 jmp 0x47c439 | | } else { 0x0047c435 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x0047c439 mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x0047c43e mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x0047c443 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x0047c448 mov qword [rsp + 0x28], rbx | *((rsp + 0x28)) = rbx; 0x0047c44d mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x0047c451 lea rsi, [rsp + 0x10] | 0x0047c456 mov rdi, r15 | 0x0047c459 call 0x47c5e0 | eax = intBloombergLP::s_baltst::Choice2::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x0047c45e test eax, eax | | if (eax == 0) { 0x0047c460 je 0x47c514 | goto label_1; | } 0x0047c466 mov ebx, eax | ebx = eax; | } 0x0047c468 mov esi, 0x5435e1 | 0x0047c46d mov edx, 0x22 | 0x0047c472 mov rdi, r12 | 0x0047c475 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); 0x0047c47a mov esi, 0x543604 | 0x0047c47f mov edx, 8 | 0x0047c484 mov rdi, rax | 0x0047c487 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047c48c mov rsi, qword [r14] | 0x0047c48f mov rdx, qword [r14 + 8] | 0x0047c493 mov rdi, rax | 0x0047c496 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x0047c49b mov esi, 0x667b0d | 0x0047c4a0 mov edx, 2 | 0x0047c4a5 mov rdi, rax | 0x0047c4a8 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x0047c4ad mov rbp, rax | 0x0047c4b0 mov rax, qword [rax] | rax = *(rax); 0x0047c4b3 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047c4b7 add rsi, rbp | rsi += rbp; 0x0047c4ba lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0047c4bf mov rdi, r14 | rdi = r14; 0x0047c4c2 call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x0047c4c7 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047c4cc mov rdi, r14 | rdi = r14; 0x0047c4cf call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047c4d4 mov rcx, qword [rax] | rcx = *(rax); 0x0047c4d7 mov rdi, rax | rdi = rax; 0x0047c4da mov esi, 0xa | esi = 0xa; 0x0047c4df call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047c4e2 mov r14d, eax | r14d = eax; 0x0047c4e5 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0047c4ea call 0x405a70 | std::_1::locale::~locale() (); 0x0047c4ef movsx esi, r14b | esi = (int32_t) r14b; 0x0047c4f3 mov rdi, rbp | rdi = rbp; 0x0047c4f6 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x0047c4fb mov rdi, rbp | rdi = rbp; 0x0047c4fe call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047c503 mov eax, ebx | eax = ebx; 0x0047c505 add rsp, 0x38 | 0x0047c509 pop rbx | 0x0047c50a pop r12 | 0x0047c50c pop r13 | 0x0047c50e pop r14 | 0x0047c510 pop r15 | 0x0047c512 pop rbp | 0x0047c513 ret | return rax; | label_1: 0x0047c514 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c51a jne 0x47c528 | 0x0047c51c mov rdi, r13 | 0x0047c51f call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x0047c524 xor eax, eax | eax = 0; 0x0047c526 jmp 0x47c52c | | } else { 0x0047c528 mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0047c52c mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0047c531 mov byte [rcx], al | *(rcx) = al; 0x0047c533 xor ebx, ebx | ebx = 0; 0x0047c535 jmp 0x47c503 | | } while (1); | }