; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x464050 */ | #include | ; (fcn) sym._ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst26MySequenceWithChoiceChoiceENS_18bdlat_TypeCategory () | uint64_t ZN11BloombergLP6baljsn22Encoder_EncodeImplUtil12encodeMemberINS_8s_baltst26MySequenceWithChoiceChoiceENS_18bdlat_TypeCategory (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; | int64_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; 0x00464050 push rbp | 0x00464051 push r15 | 0x00464053 push r14 | 0x00464055 push r13 | 0x00464057 push r12 | 0x00464059 push rbx | 0x0046405a sub rsp, 0x48 | 0x0046405e mov r12d, r9d | r12d = r9d; 0x00464061 mov r15, r8 | r15 = r8; 0x00464064 mov r14, rcx | r14 = rcx; 0x00464067 mov rbp, rdx | 0x0046406a mov r13, rsi | r13 = rsi; 0x0046406d mov qword [rsp], rdi | *(rsp) = rdi; 0x00464071 mov rdi, rdx | 0x00464074 mov rsi, r8 | rsi = r8; 0x00464077 call 0x464260 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::MySequenceWithChoiceChoiceconst&) (rdx); 0x0046407c mov ebx, eax | ebx = eax; 0x0046407e test eax, eax | | if (eax != 0) { 0x00464080 jne 0x4641f1 | goto label_0; | } 0x00464086 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x0046408d jne 0x4640af | 0x0046408f movzx ecx, byte [rsp + 0x88] | ecx = *((rsp + 0x88)); 0x00464097 mov rdi, r13 | 0x0046409a mov rsi, rbp | 0x0046409d mov rdx, r14 | 0x004640a0 call 0x4642f0 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (r13, rbp, r14, rcx); 0x004640a5 mov ebx, eax | ebx = eax; 0x004640a7 test eax, eax | | if (eax != 0) { 0x004640a9 jne 0x4641f1 | goto label_0; | } | } 0x004640af mov rdi, rbp | 0x004640b2 mov rsi, r15 | rsi = r15; 0x004640b5 call 0x464260 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::MySequenceWithChoiceChoiceconst&) (rbp); 0x004640ba mov ebx, eax | ebx = eax; 0x004640bc test eax, eax | | if (eax != 0) { 0x004640be jne 0x464156 | goto label_1; | } 0x004640c4 test r12d, 0x10000 | 0x004640cb sete al | al = ((r12d & 0x10000) == 0) ? 1 : 0; 0x004640ce test r12d, 0x10000 | | if ((r12d & 0x10000) != 0) { 0x004640d5 jne 0x4640ef | goto label_2; | } 0x004640d7 mov rdi, r13 | 0x004640da call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x004640df mov al, 1 | al = 1; 0x004640e1 cmp dword [r15 + 4], 0 | | if (*((r15 + 4)) == 0) { 0x004640e6 je 0x4640fd | goto label_3; | } | do { 0x004640e8 mov ebx, 0xffffffff | ebx = 0xffffffff; 0x004640ed jmp 0x464156 | goto label_1; | label_2: 0x004640ef or al, byte [rsp + 0x88] | al |= *((rsp + 0x88)); 0x004640f6 cmp dword [r15 + 4], 0 | 0x004640fb jne 0x4640e8 | | } while (*((r15 + 4)) != 0); | label_3: 0x004640fd mov rcx, qword [rsp + 0x80] | rcx = *((rsp + 0x80)); 0x00464105 mov rdx, qword [rip + 0x1e469c] | rdx = *(str.choiceA); 0x0046410c movsxd rsi, dword [rip + 0x1e469d] | rsi = *(0x006487b0); 0x00464113 mov edi, dword [rip + 0x1e46a7] | edi = *(0x006487c0); 0x00464119 mov byte [rsp + 8], 0 | *((rsp + 8)) = 0; 0x0046411e mov qword [rsp + 0x10], r13 | *((rsp + 0x10)) = r13; 0x00464123 mov qword [rsp + 0x18], rbp | *((rsp + 0x18)) = rbp; 0x00464128 mov qword [rsp + 0x20], rdx | *((rsp + 0x20)) = rdx; 0x0046412d mov qword [rsp + 0x28], rsi | *((rsp + 0x28)) = rsi; 0x00464132 mov dword [rsp + 0x30], edi | *((rsp + 0x30)) = edi; 0x00464136 mov qword [rsp + 0x38], rcx | *((rsp + 0x38)) = rcx; 0x0046413b mov byte [rsp + 0x40], al | *((rsp + 0x40)) = al; 0x0046413f lea rsi, [rsp + 8] | 0x00464144 mov rdi, r15 | 0x00464147 call 0x4643d0 | eax = intBloombergLP::bdlat_TypeCategoryUtil::accessByCategory(intconst&,BloombergLP::baljsn::Encoder_SelectionDispatcher&) (r15, rsp + 8); 0x0046414c test eax, eax | | if (eax == 0) { 0x0046414e je 0x464202 | goto label_4; | } 0x00464154 mov ebx, eax | ebx = eax; | label_1: 0x00464156 mov esi, 0x5435e1 | 0x0046415b mov edx, 0x22 | 0x00464160 mov rdi, rbp | 0x00464163 call 0x428b40 | 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); 0x00464168 mov esi, 0x543604 | 0x0046416d mov edx, 8 | 0x00464172 mov rdi, rax | 0x00464175 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0046417a mov rsi, qword [r14] | 0x0046417d mov rdx, qword [r14 + 8] | 0x00464181 mov rdi, rax | 0x00464184 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x00464189 mov esi, 0x667b0d | 0x0046418e mov edx, 2 | 0x00464193 mov rdi, rax | 0x00464196 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x0046419b mov rbp, rax | 0x0046419e mov rax, qword [rax] | rax = *(rax); 0x004641a1 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x004641a5 add rsi, rbp | rsi += rbp; 0x004641a8 lea r14, [rsp + 8] | r14 = rsp + 8; 0x004641ad mov rdi, r14 | rdi = r14; 0x004641b0 call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x004641b5 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x004641ba mov rdi, r14 | rdi = r14; 0x004641bd call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x004641c2 mov rcx, qword [rax] | rcx = *(rax); 0x004641c5 mov rdi, rax | rdi = rax; 0x004641c8 mov esi, 0xa | esi = 0xa; 0x004641cd call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x004641d0 mov r14d, eax | r14d = eax; 0x004641d3 lea rdi, [rsp + 8] | rdi = rsp + 8; 0x004641d8 call 0x405a70 | std::_1::locale::~locale() (); 0x004641dd movsx esi, r14b | esi = (int32_t) r14b; 0x004641e1 mov rdi, rbp | rdi = rbp; 0x004641e4 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x004641e9 mov rdi, rbp | rdi = rbp; 0x004641ec call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x004641f1 mov eax, ebx | eax = ebx; 0x004641f3 add rsp, 0x48 | 0x004641f7 pop rbx | 0x004641f8 pop r12 | 0x004641fa pop r13 | 0x004641fc pop r14 | 0x004641fe pop r15 | 0x00464200 pop rbp | 0x00464201 ret | return rax; | label_4: 0x00464202 mov bpl, byte [rsp + 8] | bpl = *((rsp + 8)); 0x00464207 mov al, 1 | al = 1; 0x00464209 test r12d, 0x10000 | | if ((r12d & 0x10000) == 0) { 0x00464210 jne 0x46421c | 0x00464212 mov rdi, r13 | 0x00464215 call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x0046421a xor eax, eax | eax = 0; | } 0x0046421c and r12d, 0x10000 | r12d &= 0x10000; 0x00464223 xor ebx, ebx | ebx = 0; 0x00464225 test bpl, bpl | 0x00464228 movzx eax, al | eax = (int32_t) al; | if (bpl == 0) { 0x0046422b cmove eax, ebx | eax = ebx; | } 0x0046422e test r12d, r12d | | if (r12d == 0) { 0x00464231 cmove eax, r12d | eax = r12d; | } 0x00464235 mov rcx, qword [rsp] | rcx = *(rsp); 0x00464239 mov byte [rcx], al | *(rcx) = al; 0x0046423b jmp 0x4641f1 | | } while (1); | }