; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x47ebf0 */ | #include | ; (fcn) sym._ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst28SequenceWithAnonymityChoice1ENS_18bdlat_TypeCatego () | uint64_t ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst28SequenceWithAnonymityChoice1ENS_18bdlat_TypeCatego (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; 0x0047ebf0 push rbp | 0x0047ebf1 push r15 | 0x0047ebf3 push r14 | 0x0047ebf5 push r13 | 0x0047ebf7 push r12 | 0x0047ebf9 push rbx | 0x0047ebfa sub rsp, 0x48 | 0x0047ebfe mov r12d, r9d | r12d = r9d; 0x0047ec01 mov r14, r8 | r14 = r8; 0x0047ec04 mov r13, rcx | r13 = rcx; 0x0047ec07 mov r15, rdx | r15 = rdx; 0x0047ec0a mov rbp, rsi | 0x0047ec0d mov qword [rsp + 0x18], rdi | *((rsp + 0x18)) = rdi; 0x0047ec12 mov rdi, rdx | 0x0047ec15 mov rsi, r8 | rsi = r8; 0x0047ec18 call 0x47edd0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoice1const&) (rdx); 0x0047ec1d mov ebx, eax | ebx = eax; 0x0047ec1f test eax, eax | | if (eax != 0) { 0x0047ec21 jne 0x47ed6e | goto label_0; | } 0x0047ec27 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0047ec2e jne 0x47ec50 | 0x0047ec30 movzx ecx, byte [rsp + 0x88] | ecx = *((rsp + 0x88)); 0x0047ec38 mov rdi, rbp | 0x0047ec3b mov rsi, r15 | 0x0047ec3e mov rdx, r13 | 0x0047ec41 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); 0x0047ec46 mov ebx, eax | ebx = eax; 0x0047ec48 test eax, eax | | if (eax != 0) { 0x0047ec4a jne 0x47ed6e | goto label_0; | } | } 0x0047ec50 mov qword [rsp + 0x10], r13 | *((rsp + 0x10)) = r13; 0x0047ec55 mov qword [rsp + 8], rbp | *((rsp + 8)) = rbp; 0x0047ec5a test r12d, 0x10000 | 0x0047ec61 sete r13b | r13b = ((r12d & 0x10000) == 0) ? 1 : 0; 0x0047ec65 mov rdi, r15 | 0x0047ec68 mov rsi, r14 | rsi = r14; 0x0047ec6b call 0x47edd0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::SequenceWithAnonymityChoice1const&) (r15); 0x0047ec70 mov ebx, eax | ebx = eax; 0x0047ec72 test eax, eax | | if (eax == 0) { 0x0047ec74 jne 0x47ecce | 0x0047ec76 mov rbx, qword [rsp + 0x80] | rbx = *((rsp + 0x80)); 0x0047ec7e or r13b, byte [rsp + 0x88] | r13b |= *((rsp + 0x88)); 0x0047ec86 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0047ec8d jne 0x47ec99 | 0x0047ec8f mov rdi, qword [rsp + 8] | 0x0047ec94 call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (*((rsp + 8))); | } 0x0047ec99 mov byte [rsp + 0x20], 0 | *((rsp + 0x20)) = 0; 0x0047ec9e mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x0047eca3 mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0047eca8 mov qword [rsp + 0x30], r15 | *((rsp + 0x30)) = r15; 0x0047ecad mov qword [rsp + 0x38], rbx | *((rsp + 0x38)) = rbx; 0x0047ecb2 mov byte [rsp + 0x40], r13b | *((rsp + 0x40)) = r13b; 0x0047ecb7 lea rsi, [rsp + 0x20] | 0x0047ecbc mov rdi, r14 | 0x0047ecbf call 0x47ee60 | eax = intBloombergLP::s_baltst::SequenceWithAnonymityChoice1::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r14, rsp + 0x20); 0x0047ecc4 test eax, eax | | if (eax == 0) { 0x0047ecc6 je 0x47ed7f | goto label_1; | } 0x0047eccc mov ebx, eax | ebx = eax; | } 0x0047ecce mov esi, 0x5435e1 | 0x0047ecd3 mov edx, 0x22 | 0x0047ecd8 mov rdi, r15 | 0x0047ecdb 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); 0x0047ece0 mov esi, 0x543604 | 0x0047ece5 mov edx, 8 | 0x0047ecea mov rdi, rax | 0x0047eced call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047ecf2 mov rcx, qword [rsp + 0x10] | rcx = *((rsp + 0x10)); 0x0047ecf7 mov rsi, qword [rcx] | 0x0047ecfa mov rdx, qword [rcx + 8] | 0x0047ecfe mov rdi, rax | 0x0047ed01 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(rcx), *((rcx + 8))); 0x0047ed06 mov esi, 0x667b0d | 0x0047ed0b mov edx, 2 | 0x0047ed10 mov rdi, rax | 0x0047ed13 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x0047ed18 mov rbp, rax | 0x0047ed1b mov rax, qword [rax] | rax = *(rax); 0x0047ed1e mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047ed22 add rsi, rbp | rsi += rbp; 0x0047ed25 lea r14, [rsp + 0x20] | r14 = rsp + 0x20; 0x0047ed2a mov rdi, r14 | rdi = r14; 0x0047ed2d call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x0047ed32 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047ed37 mov rdi, r14 | rdi = r14; 0x0047ed3a call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047ed3f mov rcx, qword [rax] | rcx = *(rax); 0x0047ed42 mov rdi, rax | rdi = rax; 0x0047ed45 mov esi, 0xa | esi = 0xa; 0x0047ed4a call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047ed4d mov r14d, eax | r14d = eax; 0x0047ed50 lea rdi, [rsp + 0x20] | rdi = rsp + 0x20; 0x0047ed55 call 0x405a70 | std::_1::locale::~locale() (); 0x0047ed5a movsx esi, r14b | esi = (int32_t) r14b; 0x0047ed5e mov rdi, rbp | rdi = rbp; 0x0047ed61 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x0047ed66 mov rdi, rbp | rdi = rbp; 0x0047ed69 call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047ed6e mov eax, ebx | eax = ebx; 0x0047ed70 add rsp, 0x48 | 0x0047ed74 pop rbx | 0x0047ed75 pop r12 | 0x0047ed77 pop r13 | 0x0047ed79 pop r14 | 0x0047ed7b pop r15 | 0x0047ed7d pop rbp | 0x0047ed7e ret | return rax; | label_1: 0x0047ed7f mov al, 1 | al = 1; 0x0047ed81 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0047ed88 jne 0x47ed96 | 0x0047ed8a mov rdi, qword [rsp + 8] | 0x0047ed8f call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (*((rsp + 8))); 0x0047ed94 xor eax, eax | eax = 0; | } 0x0047ed96 and r12d, 0x10000 | r12d &= 0x10000; 0x0047ed9d xor ebx, ebx | ebx = 0; 0x0047ed9f cmp byte [rsp + 0x20], 0 | 0x0047eda4 movzx eax, al | eax = (int32_t) al; | if (*((rsp + 0x20)) == 0) { 0x0047eda7 cmove eax, ebx | eax = ebx; | } 0x0047edaa test r12d, r12d | | if (r12d == 0) { 0x0047edad cmove eax, r12d | eax = r12d; | } 0x0047edb1 mov rcx, qword [rsp + 0x18] | rcx = *((rsp + 0x18)); 0x0047edb6 mov byte [rcx], al | *(rcx) = al; 0x0047edb8 jmp 0x47ed6e | | } while (1); | }