; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/none @ 0x4820b0 */ | #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_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) */ 0x004820b0 push rbp | 0x004820b1 push r15 | 0x004820b3 push r14 | 0x004820b5 push r13 | 0x004820b7 push r12 | 0x004820b9 push rbx | 0x004820ba sub rsp, 0x38 | 0x004820be mov ebp, r9d | 0x004820c1 mov r15, r8 | r15 = r8; 0x004820c4 mov r14, rcx | r14 = rcx; 0x004820c7 mov r12, rdx | r12 = rdx; 0x004820ca mov r13, rsi | r13 = rsi; 0x004820cd mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x004820d2 mov rdi, rdx | 0x004820d5 mov rsi, r8 | rsi = r8; 0x004820d8 call 0x482260 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice2const&) (rdx); 0x004820dd mov ebx, eax | ebx = eax; 0x004820df test eax, eax | | if (eax != 0) { 0x004820e1 jne 0x482216 | goto label_0; | } 0x004820e7 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x004820ed jne 0x482129 | 0x004820ef movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x004820f4 mov rdi, r13 | 0x004820f7 mov rsi, r12 | 0x004820fa mov rdx, r14 | 0x004820fd call 0x464340 | eax = BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMemberPrefix(BloombergLP::baljsn::Formatter*,std::_1::basic_ostream>*,std::_1::basic_string_view>const&,bool) (r13, r12, r14, rcx); 0x00482102 mov ebx, eax | ebx = eax; 0x00482104 test eax, eax | | if (eax != 0) { 0x00482106 jne 0x482216 | goto label_0; | } 0x0048210c mov rdi, r12 | 0x0048210f mov rsi, r15 | rsi = r15; 0x00482112 call 0x482260 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice2const&) (r12); 0x00482117 mov ebx, eax | ebx = eax; 0x00482119 test eax, eax | | if (eax != 0) { 0x0048211b jne 0x48217b | goto label_1; | } 0x0048211d mov rdi, r13 | 0x00482120 call 0x48c6b0 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x00482125 mov al, 1 | al = 1; 0x00482127 jmp 0x482147 | | } else { 0x00482129 mov rdi, r12 | 0x0048212c mov rsi, r15 | rsi = r15; 0x0048212f call 0x482260 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::balb::Choice2const&) (r12); 0x00482134 mov ebx, eax | ebx = eax; 0x00482136 test eax, eax | | if (eax != 0) { 0x00482138 jne 0x48217b | goto label_1; | } 0x0048213a test ebp, 0x10000 | 0x00482140 sete al | al = ((ebp & 0x10000) == 0) ? 1 : 0; 0x00482143 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x00482147 mov rcx, qword [rsp + 0x70] | rcx = *((rsp + 0x70)); 0x0048214c mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x00482151 mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x00482156 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x0048215b mov qword [rsp + 0x28], rcx | *((rsp + 0x28)) = rcx; 0x00482160 mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x00482164 lea rsi, [rsp + 0x10] | 0x00482169 mov rdi, r15 | 0x0048216c call 0x4822f0 | eax = intBloombergLP::balb::Choice2::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x00482171 test eax, eax | | if (eax == 0) { 0x00482173 je 0x482227 | goto label_2; | } 0x00482179 mov ebx, eax | ebx = eax; | label_1: 0x0048217b mov esi, 0x5441fb | 0x00482180 mov edx, 0x22 | 0x00482185 mov rdi, r12 | 0x00482188 call 0x428ba0 | 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); 0x0048218d mov esi, 0x54421e | 0x00482192 mov edx, 8 | 0x00482197 mov rdi, rax | 0x0048219a call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0048219f mov rsi, qword [r14] | 0x004821a2 mov rdx, qword [r14 + 8] | 0x004821a6 mov rdi, rax | 0x004821a9 call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x004821ae mov esi, 0x6675eb | 0x004821b3 mov edx, 2 | 0x004821b8 mov rdi, rax | 0x004821bb call 0x428ba0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x6675eb, 2); 0x004821c0 mov rbp, rax | 0x004821c3 mov rax, qword [rax] | rax = *(rax); 0x004821c6 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x004821ca add rsi, rbp | rsi += rbp; 0x004821cd lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x004821d2 mov rdi, r14 | rdi = r14; 0x004821d5 call 0x405930 | std::_1::ios_base::getloc()const (); 0x004821da mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x004821df mov rdi, r14 | rdi = r14; 0x004821e2 call 0x405a20 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x004821e7 mov rcx, qword [rax] | rcx = *(rax); 0x004821ea mov rdi, rax | rdi = rax; 0x004821ed mov esi, 0xa | esi = 0xa; 0x004821f2 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x004821f5 mov r14d, eax | r14d = eax; 0x004821f8 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x004821fd call 0x405ac0 | std::_1::locale::~locale() (); 0x00482202 movsx esi, r14b | esi = (int32_t) r14b; 0x00482206 mov rdi, rbp | rdi = rbp; 0x00482209 call 0x4056b0 | std::_1::basic_ostream>::put(char) (); 0x0048220e mov rdi, rbp | rdi = rbp; 0x00482211 call 0x4058f0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x00482216 mov eax, ebx | eax = ebx; 0x00482218 add rsp, 0x38 | 0x0048221c pop rbx | 0x0048221d pop r12 | 0x0048221f pop r13 | 0x00482221 pop r14 | 0x00482223 pop r15 | 0x00482225 pop rbp | 0x00482226 ret | return rax; | label_2: 0x00482227 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0048222d jne 0x48223b | 0x0048222f mov rdi, r13 | 0x00482232 call 0x48c760 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x00482237 xor eax, eax | eax = 0; 0x00482239 jmp 0x48223f | | } else { 0x0048223b mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0048223f mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x00482244 mov byte [rcx], al | *(rcx) = al; 0x00482246 xor ebx, ebx | ebx = 0; 0x00482248 jmp 0x482216 | | } while (1); | }