; assembly | /* r2dec pseudo code output */ | /* baljsn_encoder.t/assume @ 0x47c810 */ | #include | ; (fcn) method.int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::s_baltst::Choice1__BloombergLP::bdlat_TypeCategory.Choice__bool__BloombergLP::baljsn::Formatter__std::__1::basic_ostream_char__std::__1::char_traits_char_____std::__1::b () | uint64_t method_int_BloombergLP::baljsn::Encoder_EncodeImplUtil::encodeMember_BloombergLP::s_baltst::Choice1_BloombergLP::bdlat_TypeCategory_Choice_bool_BloombergLP::baljsn::Formatter_std::_1::basic_ostream_char_std::_1::char_traits_char_std::_1::b (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::s_baltst::Choice1 const&, int, BloombergLP::baljsn::EncoderOptions const&, bool, BloombergLP::bdlat_TypeCategory::Choice) */ 0x0047c810 push rbp | 0x0047c811 push r15 | 0x0047c813 push r14 | 0x0047c815 push r13 | 0x0047c817 push r12 | 0x0047c819 push rbx | 0x0047c81a sub rsp, 0x38 | 0x0047c81e mov ebp, r9d | 0x0047c821 mov r15, r8 | r15 = r8; 0x0047c824 mov r14, rcx | r14 = rcx; 0x0047c827 mov r12, rdx | r12 = rdx; 0x0047c82a mov r13, rsi | r13 = rsi; 0x0047c82d mov qword [rsp + 8], rdi | *((rsp + 8)) = rdi; 0x0047c832 mov rdi, rdx | 0x0047c835 mov rsi, r8 | rsi = r8; 0x0047c838 call 0x478bc0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice1const&) (rdx); 0x0047c83d mov ebx, eax | ebx = eax; 0x0047c83f test eax, eax | | if (eax != 0) { 0x0047c841 jne 0x47c973 | goto label_0; | } 0x0047c847 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c84d jne 0x47c86c | 0x0047c84f movzx ecx, byte [rsp + 0x78] | ecx = *((rsp + 0x78)); 0x0047c854 mov rdi, r13 | 0x0047c857 mov rsi, r12 | 0x0047c85a mov rdx, r14 | 0x0047c85d 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); 0x0047c862 mov ebx, eax | ebx = eax; 0x0047c864 test eax, eax | | if (eax != 0) { 0x0047c866 jne 0x47c973 | goto label_0; | } | } 0x0047c86c test ebp, 0x10000 | 0x0047c872 sete byte [rsp + 7] | rsp + 7 = ((ebp & 0x10000) == 0) ? 1 : 0; 0x0047c877 mov rdi, r12 | 0x0047c87a mov rsi, r15 | rsi = r15; 0x0047c87d call 0x478bc0 | eax = intBloombergLP::baljsn::Encoder_EncodeImplUtil::validateChoice(std::_1::basic_ostream>*,BloombergLP::s_baltst::Choice1const&) (r12); 0x0047c882 mov ebx, eax | ebx = eax; 0x0047c884 test eax, eax | | if (eax == 0) { 0x0047c886 jne 0x47c8d8 | 0x0047c888 mov al, byte [rsp + 7] | al = *((rsp + 7)); 0x0047c88c mov rbx, qword [rsp + 0x70] | rbx = *((rsp + 0x70)); 0x0047c891 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c897 jne 0x47c8a5 | 0x0047c899 mov rdi, r13 | 0x0047c89c call 0x48c440 | BloombergLP::baljsn::Formatter::openObject() (r13); 0x0047c8a1 mov al, 1 | al = 1; 0x0047c8a3 jmp 0x47c8a9 | | } else { 0x0047c8a5 or al, byte [rsp + 0x78] | al |= *((rsp + 0x78)); | } 0x0047c8a9 mov byte [rsp + 0x10], 0 | *((rsp + 0x10)) = 0; 0x0047c8ae mov qword [rsp + 0x18], r13 | *((rsp + 0x18)) = r13; 0x0047c8b3 mov qword [rsp + 0x20], r12 | *((rsp + 0x20)) = r12; 0x0047c8b8 mov qword [rsp + 0x28], rbx | *((rsp + 0x28)) = rbx; 0x0047c8bd mov byte [rsp + 0x30], al | *((rsp + 0x30)) = al; 0x0047c8c1 lea rsi, [rsp + 0x10] | 0x0047c8c6 mov rdi, r15 | 0x0047c8c9 call 0x478c50 | eax = intBloombergLP::s_baltst::Choice1::accessSelection(BloombergLP::baljsn::Encoder_SelectionVisitor&)const (r15, rsp + 0x10); 0x0047c8ce test eax, eax | | if (eax == 0) { 0x0047c8d0 je 0x47c984 | goto label_1; | } 0x0047c8d6 mov ebx, eax | ebx = eax; | } 0x0047c8d8 mov esi, 0x5435e1 | 0x0047c8dd mov edx, 0x22 | 0x0047c8e2 mov rdi, r12 | 0x0047c8e5 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); 0x0047c8ea mov esi, 0x543604 | 0x0047c8ef mov edx, 8 | 0x0047c8f4 mov rdi, rax | 0x0047c8f7 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, "named: ', 8); 0x0047c8fc mov rsi, qword [r14] | 0x0047c8ff mov rdx, qword [r14 + 8] | 0x0047c903 mov rdi, rax | 0x0047c906 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, *(r14), *((r14 + 8))); 0x0047c90b mov esi, 0x667b0d | 0x0047c910 mov edx, 2 | 0x0047c915 mov rdi, rax | 0x0047c918 call 0x428b40 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rax, 0x667b0d, 2); 0x0047c91d mov rbp, rax | 0x0047c920 mov rax, qword [rax] | rax = *(rax); 0x0047c923 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x0047c927 add rsi, rbp | rsi += rbp; 0x0047c92a lea r14, [rsp + 0x10] | r14 = rsp + 0x10; 0x0047c92f mov rdi, r14 | rdi = r14; 0x0047c932 call 0x4058e0 | std::_1::ios_base::getloc()const (); 0x0047c937 mov esi, 0x8cce50 | esi = std::__1::ctype::id; 0x0047c93c mov rdi, r14 | rdi = r14; 0x0047c93f call 0x4059d0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0047c944 mov rcx, qword [rax] | rcx = *(rax); 0x0047c947 mov rdi, rax | rdi = rax; 0x0047c94a mov esi, 0xa | esi = 0xa; 0x0047c94f call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x0047c952 mov r14d, eax | r14d = eax; 0x0047c955 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0047c95a call 0x405a70 | std::_1::locale::~locale() (); 0x0047c95f movsx esi, r14b | esi = (int32_t) r14b; 0x0047c963 mov rdi, rbp | rdi = rbp; 0x0047c966 call 0x405660 | std::_1::basic_ostream>::put(char) (); 0x0047c96b mov rdi, rbp | rdi = rbp; 0x0047c96e call 0x4058a0 | std::_1::basic_ostream>::flush() (); | do { | label_0: 0x0047c973 mov eax, ebx | eax = ebx; 0x0047c975 add rsp, 0x38 | 0x0047c979 pop rbx | 0x0047c97a pop r12 | 0x0047c97c pop r13 | 0x0047c97e pop r14 | 0x0047c980 pop r15 | 0x0047c982 pop rbp | 0x0047c983 ret | return rax; | label_1: 0x0047c984 test ebp, 0x10000 | | if ((ebp & 0x10000) == 0) { 0x0047c98a jne 0x47c998 | 0x0047c98c mov rdi, r13 | 0x0047c98f call 0x48c4f0 | eax = BloombergLP::baljsn::Formatter::closeObject() (r13); 0x0047c994 xor eax, eax | eax = 0; 0x0047c996 jmp 0x47c99c | | } else { 0x0047c998 mov al, byte [rsp + 0x10] | al = *((rsp + 0x10)); | } 0x0047c99c mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0047c9a1 mov byte [rcx], al | *(rcx) = al; 0x0047c9a3 xor ebx, ebx | ebx = 0; 0x0047c9a5 jmp 0x47c973 | | } while (1); | }