; assembly | /* r2dec pseudo code output */ | /* bdlde_charconvertutf16.t/assume @ 0x42b7c0 */ | #include | ; (fcn) method.BloombergLP::bdlde::CharConvertUtf16.utf8ToUtf16_std::__1::vector_unsigned_short__std::__1::allocator_unsigned_short_____std::__1::basic_string_view_char__std::__1::char_traits_char____const__unsigned_long__unsigned_short__BloombergLP::bdlde::B () | uint64_t method_BloombergLP::bdlde::CharConvertUtf16_utf8ToUtf16_std::_1::vector_unsigned_short_std::_1::allocator_unsigned_short_std::_1::basic_string_view_char_std::_1::char_traits_char_const_unsigned_long_unsigned_short_BloombergLP::bdlde::B (int64_t arg5, int64_t arg4, int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_8h; | int64_t var_10h; | r8 = arg5; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlde::CharConvertUtf16::utf8ToUtf16(std::__1::vector >*, std::__1::basic_string_view > const&, unsigned long*, unsigned short, BloombergLP::bdlde::ByteOrder::Enum) */ 0x0042b7c0 push rbp | 0x0042b7c1 push r15 | 0x0042b7c3 push r14 | 0x0042b7c5 push r13 | 0x0042b7c7 push r12 | 0x0042b7c9 push rbx | 0x0042b7ca sub rsp, 0x18 | 0x0042b7ce mov ebp, r8d | 0x0042b7d1 mov r13d, ecx | r13d = ecx; 0x0042b7d4 mov qword [rsp + 8], rdx | *((rsp + 8)) = rdx; 0x0042b7d9 mov r15, rsi | r15 = rsi; 0x0042b7dc mov r12, rdi | r12 = rdi; 0x0042b7df mov rdi, qword [rsi] | rdi = *(rsi); 0x0042b7e2 mov rbx, qword [rsi + 8] | rbx = *((rsi + 8)); 0x0042b7e6 add rbx, rdi | rbx += rdi; 0x0042b7e9 mov rsi, rbx | rsi = rbx; 0x0042b7ec call 0x430bc0 | rax = unsigned long(anonymousnamespace)::utf16BufferLength<(anonymousnamespace)::Utf8::PtrBasedEnd>(char const*,(anonymousnamespace)::Utf8::PtrBasedEnd) (); 0x0042b7f1 mov r14, rax | r14 = rax; 0x0042b7f4 mov rdi, qword [r12] | rdi = *(r12); 0x0042b7f8 mov rax, qword [r12 + 8] | rax = *((r12 + 8)); 0x0042b7fd sub rax, rdi | rax -= rdi; 0x0042b800 sar rax, 1 | rax >>= 1; 0x0042b803 mov rsi, r14 | rsi = r14; 0x0042b806 sub rsi, rax | rsi -= rax; | if (rsi > 0) { 0x0042b809 jbe 0x42b817 | 0x0042b80b mov rdi, r12 | 0x0042b80e call 0x429470 | std::_1::vector>::_append(unsigned long) (r12, rsi); 0x0042b813 mov rdi, qword [r12] | rdi = *(r12); | } 0x0042b817 mov rsi, qword [r15] | rsi = *(r15); 0x0042b81a movzx r9d, r13w | r9d = (int32_t) r13w; 0x0042b81e lea r8, [rsp + 0x10] | r8 = rsp + 0x10; 0x0042b823 mov rdx, rbx | rdx = rbx; 0x0042b826 test ebp, ebp | | if (ebp != 0) { 0x0042b828 je 0x42b836 | 0x0042b82a mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0042b82f call 0x432240 | int(anonymousnamespace)::localUtf8ToUtf16>(unsignedshort*,(anonymousnamespace)::NoOpCapacity,char const*,(anonymousnamespace)::Utf8::PtrBasedEnd,(anonymousnamespace)::Swapper,unsigned long*,unsigned long*,unsignedshort) (); 0x0042b834 jmp 0x42b840 | | } else { 0x0042b836 mov rcx, qword [rsp + 8] | rcx = *((rsp + 8)); 0x0042b83b call 0x431e70 | eax = int(anonymousnamespace)::localUtf8ToUtf16>(unsignedshort*,(anonymousnamespace)::NoOpCapacity,char const*,(anonymousnamespace)::Utf8::PtrBasedEnd,(anonymousnamespace)::NoOpSwapper,unsigned long*,unsigned long*,unsignedshort) (); | } 0x0042b840 mov ebx, eax | ebx = eax; 0x0042b842 mov rax, qword [rsp + 0x10] | rax = *((rsp + 0x10)); 0x0042b847 cmp rax, r14 | 0x0042b84a mov rcx, qword [r12] | rcx = *(r12); 0x0042b84e mov rdx, qword [r12 + 8] | rdx = *((r12 + 8)); 0x0042b853 sub rdx, rcx | rdx -= rcx; 0x0042b856 sar rdx, 1 | rdx >>= 1; 0x0042b859 mov rsi, rax | rsi = rax; 0x0042b85c sub rsi, rdx | rsi -= rdx; | if (rsi != 0) { 0x0042b85f je 0x42b87b | | if (rsi > 0) { 0x0042b861 jbe 0x42b86d | 0x0042b863 mov rdi, r12 | 0x0042b866 call 0x429470 | rax = std::_1::vector>::_append(unsigned long) (r12, rsi); 0x0042b86b jmp 0x42b87b | | } else { 0x0042b86d cmp rax, rdx | | if (rax >= rdx) { 0x0042b870 jae 0x42b87b | goto label_0; | } 0x0042b872 lea rax, [rcx + rax*2] | rax = rcx + rax*2; 0x0042b876 mov qword [r12 + 8], rax | *((r12 + 8)) = rax; | } | } | label_0: 0x0042b87b mov eax, ebx | eax = ebx; 0x0042b87d add rsp, 0x18 | 0x0042b881 pop rbx | 0x0042b882 pop r12 | 0x0042b884 pop r13 | 0x0042b886 pop r14 | 0x0042b888 pop r15 | 0x0042b88a pop rbp | 0x0042b88b ret | return rax; | }