; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x47e6b0 */ | #include | ; (fcn) sym._ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst27SequenceWithAnonymityChoiceENS_18bdlat_TypeCategor () | uint64_t ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst27SequenceWithAnonymityChoiceENS_18bdlat_TypeCategor (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; 0x0047e6b0 push rbp | 0x0047e6b1 push r15 | 0x0047e6b3 push r14 | 0x0047e6b5 push r13 | 0x0047e6b7 push r12 | 0x0047e6b9 push rbx | 0x0047e6ba sub rsp, 0x38 | 0x0047e6be mov r15d, r9d | r15d = r9d; 0x0047e6c1 mov r14, r8 | r14 = r8; 0x0047e6c4 mov r12, rcx | r12 = rcx; 0x0047e6c7 mov rbp, rdx | 0x0047e6ca mov r13, rsi | r13 = rsi; 0x0047e6cd mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x0047e6d2 mov rdi, rdx | 0x0047e6d5 mov rsi, r8 | rsi = r8; 0x0047e6d8 call 0x47e880 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoiceconst&) (rdx); 0x0047e6dd mov ebx, eax | ebx = eax; 0x0047e6df test eax, eax | | if (eax != 0) { 0x0047e6e1 jne 0x47e818 | goto label_0; | } 0x0047e6e7 test r15d, 0x10000 | | if ((r15d & 0x10000) == 0) { 0x0047e6ee jne 0x47e728 | 0x0047e6f0 movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x0047e6f5 mov rdi, r13 | 0x0047e6f8 mov rsi, rbp | 0x0047e6fb mov rdx, r12 | 0x0047e6fe 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); 0x0047e703 mov ebx, eax | ebx = eax; 0x0047e705 test eax, eax | | if (eax != 0) { 0x0047e707 jne 0x47e818 | goto label_0; | } 0x0047e70d mov rdi, rbp | 0x0047e710 mov rsi, r14 | rsi = r14; 0x0047e713 call 0x47e880 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoiceconst&) (rbp); 0x0047e718 mov ebx, eax | ebx = eax; 0x0047e71a test eax, eax | | if (eax != 0) { 0x0047e71c jne 0x47e77b | goto label_1; | } 0x0047e71e mov rdi, r13 | 0x0047e721 call 0x48c6b0 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x0047e726 jmp 0x47e739 | | } else { 0x0047e728 mov rdi, rbp | 0x0047e72b mov rsi, r14 | rsi = r14; 0x0047e72e call 0x47e880 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoiceconst&) (rbp); 0x0047e733 mov ebx, eax | ebx = eax; 0x0047e735 test eax, eax | | if (eax != 0) { 0x0047e737 jne 0x47e77b | goto label_1; | } | } 0x0047e739 mov rax, qword [rsp + 0x70] | rax = *((rsp + 0x70)); 0x0047e73e test r15d, 0x10000 | 0x0047e745 sete cl | cl = ((r15d & 0x10000) == 0) ? 1 : 0; 0x0047e748 or cl, byte [rsp + 0x78] | cl |= *((rsp + 0x78)); 0x0047e74c mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x0047e751 mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x0047e756 mov qword [rsp + 0x20], rbp | *((rsp + 0x20)) = rbp; 0x0047e75b mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0047e760 mov byte [rsp + 0x30], cl | *((rsp + 0x30)) = cl; 0x0047e764 lea rsi, [rsp + 0x10] | 0x0047e769 mov rdi, r14 | 0x0047e76c call 0x47e910 | eax = intBloombergLP::s_baltst::SequenceWithAnonymityChoice::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r14, rsp + 0x10); 0x0047e771 test eax, eax | | if (eax == 0) { 0x0047e773 je 0x47e829 | goto label_2; | } 0x0047e779 mov ebx, eax | ebx = eax; | label_1: 0x0047e77b mov esi, 0x5441fb | 0x0047e780 mov edx, 0x22 | 0x0047e785 mov rdi, rbp | 0x0047e788 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); 0x0047e78d mov esi, 0x54421e | 0x0047e792 mov edx, 8 | 0x0047e797 mov rdi, rax | 0x0047e79a call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047e79f mov rsi, qword [r12] | 0x0047e7a3 mov rdx, qword [r12 + 8] | 0x0047e7a8 mov rdi, rax | 0x0047e7ab call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r12), *((r12 + 8))); 0x0047e7b0 mov esi, 0x6675eb | 0x0047e7b5 mov edx, 2 | 0x0047e7ba mov rdi, rax | 0x0047e7bd call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x6675eb, 2); 0x0047e7c2 mov rbp, rax | 0x0047e7c5 mov rax, qword [rax] | rax = *(rax); 0x0047e7c8 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047e7cc add rsi, rbp | rsi += rbp; 0x0047e7cf lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0047e7d4 mov rdi, r14 | rdi = r14; 0x0047e7d7 call 0x405930 | std::_1::ios_base::getloc()const (); 0x0047e7dc mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047e7e1 mov rdi, r14 | rdi = r14; 0x0047e7e4 call 0x405a20 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047e7e9 mov rcx, qword [rax] | rcx = *(rax); 0x0047e7ec mov rdi, rax | rdi = rax; 0x0047e7ef mov esi, 0xa | esi = 0xa; 0x0047e7f4 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047e7f7 mov r14d, eax | r14d = eax; 0x0047e7fa lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0047e7ff call 0x405ac0 | std::_1::locale::~locale() (); 0x0047e804 movsx esi, r14b | esi = (int32_t) r14b; 0x0047e808 mov rdi, rbp | rdi = rbp; 0x0047e80b call 0x4056b0 | std::_1::basic_ostream>::put(char) (); 0x0047e810 mov rdi, rbp | rdi = rbp; 0x0047e813 call 0x4058f0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047e818 mov eax, ebx | eax = ebx; 0x0047e81a add rsp, 0x38 | 0x0047e81e pop rbx | 0x0047e81f pop r12 | 0x0047e821 pop r13 | 0x0047e823 pop r14 | 0x0047e825 pop r15 | 0x0047e827 pop rbp | 0x0047e828 ret | return rax; | label_2: 0x0047e829 mov al, 1 | al = 1; 0x0047e82b test r15d, 0x10000 | | if ((r15d & 0x10000) == 0) { 0x0047e832 jne 0x47e83e | 0x0047e834 mov rdi, r13 | 0x0047e837 call 0x48c760 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x0047e83c xor eax, eax | eax = 0; | } 0x0047e83e and r15d, 0x10000 | r15d &= 0x10000; 0x0047e845 xor ebx, ebx | ebx = 0; 0x0047e847 cmp byte [rsp + 0x10], 0 | 0x0047e84c movzx eax, al | eax = (int32_t) al; | if (*((rsp + 0x10)) == 0) { 0x0047e84f cmove eax, ebx | eax = ebx; | } 0x0047e852 test r15d, r15d | | if (r15d == 0) { 0x0047e855 cmove eax, r15d | eax = r15d; | } 0x0047e859 mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0047e85e mov byte [rcx], al | *(rcx) = al; 0x0047e860 jmp 0x47e818 | | } while (1); | }