; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x47e7e0 */ | #include | ; (fcn) sym._ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst27SequenceWithAnonymityChoiceENS_18bdlat_TypeCategor () | uint64_t ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst27SequenceWithAnonymityChoiceENS_18bdlat_TypeCategor (int64_t arg_80h, int64_t arg_88h, 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; | uint32_t var_20h; | int64_t var_28h; | int64_t var_30h; | int64_t var_38h; | int64_t var_40h; | r9 = arg6; | r8 = arg5; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; 0x0047e7e0 push rbp | 0x0047e7e1 push r15 | 0x0047e7e3 push r14 | 0x0047e7e5 push r13 | 0x0047e7e7 push r12 | 0x0047e7e9 push rbx | 0x0047e7ea sub rsp, 0x48 | 0x0047e7ee mov r12d, r9d | r12d = r9d; 0x0047e7f1 mov r14, r8 | r14 = r8; 0x0047e7f4 mov r13, rcx | r13 = rcx; 0x0047e7f7 mov r15, rdx | r15 = rdx; 0x0047e7fa mov rbp, rsi | 0x0047e7fd mov qword [rsp + 0x18], rdi | *((rsp + 0x18)) = rdi; 0x0047e802 mov rdi, rdx | 0x0047e805 mov rsi, r8 | rsi = r8; 0x0047e808 call 0x47e9c0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoiceconst&) (rdx); 0x0047e80d mov ebx, eax | ebx = eax; 0x0047e80f test eax, eax | | if (eax != 0) { 0x0047e811 jne 0x47e95e | goto label_0; | } 0x0047e817 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0047e81e jne 0x47e840 | 0x0047e820 movzx ecx, byte [rsp + 0x88] | ecx = *((rsp + 0x88)); 0x0047e828 mov rdi, rbp | 0x0047e82b mov rsi, r15 | 0x0047e82e mov rdx, r13 | 0x0047e831 call 0x4642f0 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (rbp, r15, r13, rcx); 0x0047e836 mov ebx, eax | ebx = eax; 0x0047e838 test eax, eax | | if (eax != 0) { 0x0047e83a jne 0x47e95e | goto label_0; | } | } 0x0047e840 mov qword [rsp + 0x10], r13 | *((rsp + 0x10)) = r13; 0x0047e845 mov qword [rsp + 8], rbp | *((rsp + 8)) = rbp; 0x0047e84a test r12d, 0x10000 | 0x0047e851 sete r13b | r13b = ((r12d & 0x10000) == 0) ? 1 : 0; 0x0047e855 mov rdi, r15 | 0x0047e858 mov rsi, r14 | rsi = r14; 0x0047e85b call 0x47e9c0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoiceconst&) (r15); 0x0047e860 mov ebx, eax | ebx = eax; 0x0047e862 test eax, eax | | if (eax == 0) { 0x0047e864 jne 0x47e8be | 0x0047e866 mov rbx, qword [rsp + 0x80] | rbx = *((rsp + 0x80)); 0x0047e86e or r13b, byte [rsp + 0x88] | r13b |= *((rsp + 0x88)); 0x0047e876 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0047e87d jne 0x47e889 | 0x0047e87f mov rdi, qword [rsp + 8] | 0x0047e884 call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (*((rsp + 8))); | } 0x0047e889 mov byte [rsp + 0x20], 0 | *((rsp + 0x20)) = 0; 0x0047e88e mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x0047e893 mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0047e898 mov qword [rsp + 0x30], r15 | *((rsp + 0x30)) = r15; 0x0047e89d mov qword [rsp + 0x38], rbx | *((rsp + 0x38)) = rbx; 0x0047e8a2 mov byte [rsp + 0x40], r13b | *((rsp + 0x40)) = r13b; 0x0047e8a7 lea rsi, [rsp + 0x20] | 0x0047e8ac mov rdi, r14 | 0x0047e8af call 0x47ea50 | eax = intBloombergLP::s_baltst::SequenceWithAnonymityChoice::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r14, rsp + 0x20); 0x0047e8b4 test eax, eax | | if (eax == 0) { 0x0047e8b6 je 0x47e96f | goto label_1; | } 0x0047e8bc mov ebx, eax | ebx = eax; | } 0x0047e8be mov esi, 0x5435e1 | 0x0047e8c3 mov edx, 0x22 | 0x0047e8c8 mov rdi, r15 | 0x0047e8cb call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (r15, "Unable to encode value of element ", 0x22); 0x0047e8d0 mov esi, 0x543604 | 0x0047e8d5 mov edx, 8 | 0x0047e8da mov rdi, rax | 0x0047e8dd call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047e8e2 mov rcx, qword [rsp + 0x10] | rcx = *((rsp + 0x10)); 0x0047e8e7 mov rsi, qword [rcx] | 0x0047e8ea mov rdx, qword [rcx + 8] | 0x0047e8ee mov rdi, rax | 0x0047e8f1 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(rcx), *((rcx + 8))); 0x0047e8f6 mov esi, 0x667b0d | 0x0047e8fb mov edx, 2 | 0x0047e900 mov rdi, rax | 0x0047e903 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x0047e908 mov rbp, rax | 0x0047e90b mov rax, qword [rax] | rax = *(rax); 0x0047e90e mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047e912 add rsi, rbp | rsi += rbp; 0x0047e915 lea r14, [rsp + 0x20] | r14 = rsp + 0x20; 0x0047e91a mov rdi, r14 | rdi = r14; 0x0047e91d call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x0047e922 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047e927 mov rdi, r14 | rdi = r14; 0x0047e92a call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047e92f mov rcx, qword [rax] | rcx = *(rax); 0x0047e932 mov rdi, rax | rdi = rax; 0x0047e935 mov esi, 0xa | esi = 0xa; 0x0047e93a call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047e93d mov r14d, eax | r14d = eax; 0x0047e940 lea rdi, [rsp + 0x20] | rdi = rsp + 0x20; 0x0047e945 call 0x405a70 | std::_1::locale::~locale() (); 0x0047e94a movsx esi, r14b | esi = (int32_t) r14b; 0x0047e94e mov rdi, rbp | rdi = rbp; 0x0047e951 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x0047e956 mov rdi, rbp | rdi = rbp; 0x0047e959 call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047e95e mov eax, ebx | eax = ebx; 0x0047e960 add rsp, 0x48 | 0x0047e964 pop rbx | 0x0047e965 pop r12 | 0x0047e967 pop r13 | 0x0047e969 pop r14 | 0x0047e96b pop r15 | 0x0047e96d pop rbp | 0x0047e96e ret | return rax; | label_1: 0x0047e96f mov al, 1 | al = 1; 0x0047e971 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0047e978 jne 0x47e986 | 0x0047e97a mov rdi, qword [rsp + 8] | 0x0047e97f call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (*((rsp + 8))); 0x0047e984 xor eax, eax | eax = 0; | } 0x0047e986 and r12d, 0x10000 | r12d &= 0x10000; 0x0047e98d xor ebx, ebx | ebx = 0; 0x0047e98f cmp byte [rsp + 0x20], 0 | 0x0047e994 movzx eax, al | eax = (int32_t) al; | if (*((rsp + 0x20)) == 0) { 0x0047e997 cmove eax, ebx | eax = ebx; | } 0x0047e99a test r12d, r12d | | if (r12d == 0) { 0x0047e99d cmove eax, r12d | eax = r12d; | } 0x0047e9a1 mov rcx, qword [rsp + 0x18] | rcx = *((rsp + 0x18)); 0x0047e9a6 mov byte [rcx], al | *(rcx) = al; 0x0047e9a8 jmp 0x47e95e | | } while (1); | }