; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x482210 */ | #include | ; (fcn) method.int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::balb::Choice2__BloombergLP::bdlat_TypeCategory.Choice__bool__BloombergLP::baljsn::Formatter__std::__1::basic_ostream_char__std::__1::char_traits_char_____std::__1::basic () | uint64_t method_int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::balb::Choice2_BloombergLP::bdlat_TypeCategory_Choice_bool_BloombergLP::baljsn::Formatter_std::_1::basic_ostream_char_std::_1::char_traits_char_std::_1::basic (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_7h; | int64_t var_8h; | int64_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; | /* int BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember(bool*, BloombergLP::baljsn::Formatter*, std::__1::basic_ostream >*, std::__1::basic_string_view > const&, BloombergLP::balb::Choice2 const&, int, BloombergLP::baljsn::EncoderOptions const&, bool, BloombergLP::bdlat_TypeCategory::Choice) */ 0x00482210 push rbp | 0x00482211 push r15 | 0x00482213 push r14 | 0x00482215 push r13 | 0x00482217 push r12 | 0x00482219 push rbx | 0x0048221a sub rsp, 0x38 | 0x0048221e mov ebp, r9d | 0x00482221 mov r15, r8 | r15 = r8; 0x00482224 mov r14, rcx | r14 = rcx; 0x00482227 mov r12, rdx | r12 = rdx; 0x0048222a mov r13, rsi | r13 = rsi; 0x0048222d mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x00482232 mov rdi, rdx | 0x00482235 mov rsi, r8 | rsi = r8; 0x00482238 call 0x4823c0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice2const&) (rdx); 0x0048223d mov ebx, eax | ebx = eax; 0x0048223f test eax, eax | | if (eax != 0) { 0x00482241 jne 0x482373 | goto label_0; | } 0x00482247 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0048224d jne 0x48226c | 0x0048224f movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x00482254 mov rdi, r13 | 0x00482257 mov rsi, r12 | 0x0048225a mov rdx, r14 | 0x0048225d call 0x4642f0 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (r13, r12, r14, rcx); 0x00482262 mov ebx, eax | ebx = eax; 0x00482264 test eax, eax | | if (eax != 0) { 0x00482266 jne 0x482373 | goto label_0; | } | } 0x0048226c test ebp, 0x10000 | 0x00482272 sete byte [rsp + 7] | rsp + 7 = ((ebp & 0x10000) == 0) ? 1 : 0; 0x00482277 mov rdi, r12 | 0x0048227a mov rsi, r15 | rsi = r15; 0x0048227d call 0x4823c0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice2const&) (r12); 0x00482282 mov ebx, eax | ebx = eax; 0x00482284 test eax, eax | | if (eax == 0) { 0x00482286 jne 0x4822d8 | 0x00482288 mov al, byte [rsp + 7] | al = *((rsp + 7)); 0x0048228c mov rbx, qword [rsp + 0x70] | rbx = *((rsp + 0x70)); 0x00482291 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x00482297 jne 0x4822a5 | 0x00482299 mov rdi, r13 | 0x0048229c call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x004822a1 mov al, 1 | al = 1; 0x004822a3 jmp 0x4822a9 | | } else { 0x004822a5 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x004822a9 mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x004822ae mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x004822b3 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x004822b8 mov qword [rsp + 0x28], rbx | *((rsp + 0x28)) = rbx; 0x004822bd mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x004822c1 lea rsi, [rsp + 0x10] | 0x004822c6 mov rdi, r15 | 0x004822c9 call 0x482450 | eax = intBloombergLP::balb::Choice2::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x004822ce test eax, eax | | if (eax == 0) { 0x004822d0 je 0x482384 | goto label_1; | } 0x004822d6 mov ebx, eax | ebx = eax; | } 0x004822d8 mov esi, 0x5435e1 | 0x004822dd mov edx, 0x22 | 0x004822e2 mov rdi, r12 | 0x004822e5 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (r12, "Unable to encode value of element ", 0x22); 0x004822ea mov esi, 0x543604 | 0x004822ef mov edx, 8 | 0x004822f4 mov rdi, rax | 0x004822f7 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x004822fc mov rsi, qword [r14] | 0x004822ff mov rdx, qword [r14 + 8] | 0x00482303 mov rdi, rax | 0x00482306 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x0048230b mov esi, 0x667b0d | 0x00482310 mov edx, 2 | 0x00482315 mov rdi, rax | 0x00482318 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x0048231d mov rbp, rax | 0x00482320 mov rax, qword [rax] | rax = *(rax); 0x00482323 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x00482327 add rsi, rbp | rsi += rbp; 0x0048232a lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0048232f mov rdi, r14 | rdi = r14; 0x00482332 call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x00482337 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0048233c mov rdi, r14 | rdi = r14; 0x0048233f call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x00482344 mov rcx, qword [rax] | rcx = *(rax); 0x00482347 mov rdi, rax | rdi = rax; 0x0048234a mov esi, 0xa | esi = 0xa; 0x0048234f call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x00482352 mov r14d, eax | r14d = eax; 0x00482355 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0048235a call 0x405a70 | std::_1::locale::~locale() (); 0x0048235f movsx esi, r14b | esi = (int32_t) r14b; 0x00482363 mov rdi, rbp | rdi = rbp; 0x00482366 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x0048236b mov rdi, rbp | rdi = rbp; 0x0048236e call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x00482373 mov eax, ebx | eax = ebx; 0x00482375 add rsp, 0x38 | 0x00482379 pop rbx | 0x0048237a pop r12 | 0x0048237c pop r13 | 0x0048237e pop r14 | 0x00482380 pop r15 | 0x00482382 pop rbp | 0x00482383 ret | return rax; | label_1: 0x00482384 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0048238a jne 0x482398 | 0x0048238c mov rdi, r13 | 0x0048238f call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x00482394 xor eax, eax | eax = 0; 0x00482396 jmp 0x48239c | | } else { 0x00482398 mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0048239c mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x004823a1 mov byte [rcx], al | *(rcx) = al; 0x004823a3 xor ebx, ebx | ebx = 0; 0x004823a5 jmp 0x482373 | | } while (1); | }