; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x47eab0 */ | #include | ; (fcn) sym._ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst28SequenceWithAnonymityChoice1ENS_18bdlat_TypeCatego () | uint64_t ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst28SequenceWithAnonymityChoice1ENS_18bdlat_TypeCatego (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; | uint32_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; 0x0047eab0 push rbp | 0x0047eab1 push r15 | 0x0047eab3 push r14 | 0x0047eab5 push r13 | 0x0047eab7 push r12 | 0x0047eab9 push rbx | 0x0047eaba sub rsp, 0x38 | 0x0047eabe mov r15d, r9d | r15d = r9d; 0x0047eac1 mov r14, r8 | r14 = r8; 0x0047eac4 mov r12, rcx | r12 = rcx; 0x0047eac7 mov rbp, rdx | 0x0047eaca mov r13, rsi | r13 = rsi; 0x0047eacd mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x0047ead2 mov rdi, rdx | 0x0047ead5 mov rsi, r8 | rsi = r8; 0x0047ead8 call 0x47ec80 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoice1const&) (rdx); 0x0047eadd mov ebx, eax | ebx = eax; 0x0047eadf test eax, eax | | if (eax != 0) { 0x0047eae1 jne 0x47ec18 | goto label_0; | } 0x0047eae7 test r15d, 0x10000 | | if ((r15d & 0x10000) == 0) { 0x0047eaee jne 0x47eb28 | 0x0047eaf0 movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x0047eaf5 mov rdi, r13 | 0x0047eaf8 mov rsi, rbp | 0x0047eafb mov rdx, r12 | 0x0047eafe call 0x464340 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (r13, rbp, r12, rcx); 0x0047eb03 mov ebx, eax | ebx = eax; 0x0047eb05 test eax, eax | | if (eax != 0) { 0x0047eb07 jne 0x47ec18 | goto label_0; | } 0x0047eb0d mov rdi, rbp | 0x0047eb10 mov rsi, r14 | rsi = r14; 0x0047eb13 call 0x47ec80 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoice1const&) (rbp); 0x0047eb18 mov ebx, eax | ebx = eax; 0x0047eb1a test eax, eax | | if (eax != 0) { 0x0047eb1c jne 0x47eb7b | goto label_1; | } 0x0047eb1e mov rdi, r13 | 0x0047eb21 call 0x48c6b0 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x0047eb26 jmp 0x47eb39 | | } else { 0x0047eb28 mov rdi, rbp | 0x0047eb2b mov rsi, r14 | rsi = r14; 0x0047eb2e call 0x47ec80 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoice1const&) (rbp); 0x0047eb33 mov ebx, eax | ebx = eax; 0x0047eb35 test eax, eax | | if (eax != 0) { 0x0047eb37 jne 0x47eb7b | goto label_1; | } | } 0x0047eb39 mov rax, qword [rsp + 0x70] | rax = *((rsp + 0x70)); 0x0047eb3e test r15d, 0x10000 | 0x0047eb45 sete cl | cl = ((r15d & 0x10000) == 0) ? 1 : 0; 0x0047eb48 or cl, byte [rsp + 0x78] | cl |= *((rsp + 0x78)); 0x0047eb4c mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x0047eb51 mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x0047eb56 mov qword [rsp + 0x20], rbp | *((rsp + 0x20)) = rbp; 0x0047eb5b mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0047eb60 mov byte [rsp + 0x30], cl | *((rsp + 0x30)) = cl; 0x0047eb64 lea rsi, [rsp + 0x10] | 0x0047eb69 mov rdi, r14 | 0x0047eb6c call 0x47ed10 | eax = intBloombergLP::s_baltst::SequenceWithAnonymityChoice1::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r14, rsp + 0x10); 0x0047eb71 test eax, eax | | if (eax == 0) { 0x0047eb73 je 0x47ec29 | goto label_2; | } 0x0047eb79 mov ebx, eax | ebx = eax; | label_1: 0x0047eb7b mov esi, 0x5441fb | 0x0047eb80 mov edx, 0x22 | 0x0047eb85 mov rdi, rbp | 0x0047eb88 call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rbp, "Unable to encode value of element ", 0x22); 0x0047eb8d mov esi, 0x54421e | 0x0047eb92 mov edx, 8 | 0x0047eb97 mov rdi, rax | 0x0047eb9a call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047eb9f mov rsi, qword [r12] | 0x0047eba3 mov rdx, qword [r12 + 8] | 0x0047eba8 mov rdi, rax | 0x0047ebab call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r12), *((r12 + 8))); 0x0047ebb0 mov esi, 0x6675eb | 0x0047ebb5 mov edx, 2 | 0x0047ebba mov rdi, rax | 0x0047ebbd call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x6675eb, 2); 0x0047ebc2 mov rbp, rax | 0x0047ebc5 mov rax, qword [rax] | rax = *(rax); 0x0047ebc8 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047ebcc add rsi, rbp | rsi += rbp; 0x0047ebcf lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0047ebd4 mov rdi, r14 | rdi = r14; 0x0047ebd7 call 0x405930 | std::_1::ios_base::getloc()const (); 0x0047ebdc mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047ebe1 mov rdi, r14 | rdi = r14; 0x0047ebe4 call 0x405a20 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047ebe9 mov rcx, qword [rax] | rcx = *(rax); 0x0047ebec mov rdi, rax | rdi = rax; 0x0047ebef mov esi, 0xa | esi = 0xa; 0x0047ebf4 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047ebf7 mov r14d, eax | r14d = eax; 0x0047ebfa lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0047ebff call 0x405ac0 | std::_1::locale::~locale() (); 0x0047ec04 movsx esi, r14b | esi = (int32_t) r14b; 0x0047ec08 mov rdi, rbp | rdi = rbp; 0x0047ec0b call 0x4056b0 | std::_1::basic_ostream>::put(char) (); 0x0047ec10 mov rdi, rbp | rdi = rbp; 0x0047ec13 call 0x4058f0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047ec18 mov eax, ebx | eax = ebx; 0x0047ec1a add rsp, 0x38 | 0x0047ec1e pop rbx | 0x0047ec1f pop r12 | 0x0047ec21 pop r13 | 0x0047ec23 pop r14 | 0x0047ec25 pop r15 | 0x0047ec27 pop rbp | 0x0047ec28 ret | return rax; | label_2: 0x0047ec29 mov al, 1 | al = 1; 0x0047ec2b test r15d, 0x10000 | | if ((r15d & 0x10000) == 0) { 0x0047ec32 jne 0x47ec3e | 0x0047ec34 mov rdi, r13 | 0x0047ec37 call 0x48c760 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x0047ec3c xor eax, eax | eax = 0; | } 0x0047ec3e and r15d, 0x10000 | r15d &= 0x10000; 0x0047ec45 xor ebx, ebx | ebx = 0; 0x0047ec47 cmp byte [rsp + 0x10], 0 | 0x0047ec4c movzx eax, al | eax = (int32_t) al; | if (*((rsp + 0x10)) == 0) { 0x0047ec4f cmove eax, ebx | eax = ebx; | } 0x0047ec52 test r15d, r15d | | if (r15d == 0) { 0x0047ec55 cmove eax, r15d | eax = r15d; | } 0x0047ec59 mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0047ec5e mov byte [rcx], al | *(rcx) = al; 0x0047ec60 jmp 0x47ec18 | | } while (1); | }