; assembly | /* r2dec pseudo code output */ | /* bdlde_charconvertutf16.t/assume @ 0x42b930 */ | #include | ; (fcn) method.BloombergLP::bdlde::CharConvertUtf16.utf8ToUtf16_std::__1::vector_unsigned_short__std::__1::allocator_unsigned_short_____char_const__unsigned_long__unsigned_short__BloombergLP::bdlde::ByteOrder::Enum_ () | uint64_t method_BloombergLP::bdlde::CharConvertUtf16_utf8ToUtf16_std::_1::vector_unsigned_short_std::_1::allocator_unsigned_short_char_const_unsigned_long_unsigned_short_BloombergLP::bdlde::ByteOrder::Enum_ (int64_t arg5, int64_t arg4, int64_t arg3, int64_t arg2, int64_t arg1) { | r8 = arg5; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlde::CharConvertUtf16::utf8ToUtf16(std::__1::vector >*, char const*, unsigned long*, unsigned short, BloombergLP::bdlde::ByteOrder::Enum) */ 0x0042b930 push rbp | 0x0042b931 push r15 | 0x0042b933 push r14 | 0x0042b935 push r13 | 0x0042b937 push r12 | 0x0042b939 push rbx | 0x0042b93a push rax | 0x0042b93b mov r13d, r8d | r13d = r8d; 0x0042b93e mov r12d, ecx | r12d = ecx; 0x0042b941 mov r15, rdx | r15 = rdx; 0x0042b944 mov rbp, rsi | 0x0042b947 mov rbx, rdi | rbx = rdi; 0x0042b94a mov rdi, rsi | rdi = rsi; 0x0042b94d call 0x431590 | rax = unsigned long(anonymousnamespace)::utf16BufferLength<(anonymousnamespace)::Utf8::ZeroBasedEnd>(char const*,(anonymousnamespace)::Utf8::ZeroBasedEnd) (); 0x0042b952 mov r14, rax | r14 = rax; 0x0042b955 mov rdi, qword [rbx] | rdi = *(rbx); 0x0042b958 mov rax, qword [rbx + 8] | rax = *((rbx + 8)); 0x0042b95c sub rax, rdi | rax -= rdi; 0x0042b95f sar rax, 1 | rax >>= 1; 0x0042b962 mov rsi, r14 | rsi = r14; 0x0042b965 sub rsi, rax | rsi -= rax; | if (rsi > 0) { 0x0042b968 jbe 0x42b975 | 0x0042b96a mov rdi, rbx | 0x0042b96d call 0x429470 | std::_1::vector>::_append(unsigned long) (rbx, rsi); 0x0042b972 mov rdi, qword [rbx] | rdi = *(rbx); | } 0x0042b975 movzx r8d, r12w | r8d = (int32_t) r12w; 0x0042b979 mov rcx, rsp | rcx = rsp; 0x0042b97c mov rsi, rbp | rsi = rbp; 0x0042b97f mov rdx, r15 | rdx = r15; 0x0042b982 test r13d, r13d | | if (r13d != 0) { 0x0042b985 je 0x42b98e | 0x0042b987 call 0x432a20 | int(anonymousnamespace)::localUtf8ToUtf16>(unsignedshort*,(anonymousnamespace)::NoOpCapacity,char const*,(anonymousnamespace)::Utf8::ZeroBasedEnd,(anonymousnamespace)::Swapper,unsigned long*,unsigned long*,unsignedshort) (); 0x0042b98c jmp 0x42b993 | | } else { 0x0042b98e call 0x432660 | eax = int(anonymousnamespace)::localUtf8ToUtf16>(unsignedshort*,(anonymousnamespace)::NoOpCapacity,char const*,(anonymousnamespace)::Utf8::ZeroBasedEnd,(anonymousnamespace)::NoOpSwapper,unsigned long*,unsigned long*,unsignedshort) (); | } 0x0042b993 mov ebp, eax | 0x0042b995 mov rax, qword [rsp] | rax = *(rsp); 0x0042b999 cmp rax, r14 | 0x0042b99c mov rcx, qword [rbx] | rcx = *(rbx); 0x0042b99f mov rdx, qword [rbx + 8] | rdx = *((rbx + 8)); 0x0042b9a3 sub rdx, rcx | rdx -= rcx; 0x0042b9a6 sar rdx, 1 | rdx >>= 1; 0x0042b9a9 mov rsi, rax | rsi = rax; 0x0042b9ac sub rsi, rdx | rsi -= rdx; | if (rsi != 0) { 0x0042b9af je 0x42b9ca | | if (rsi > 0) { 0x0042b9b1 jbe 0x42b9bd | 0x0042b9b3 mov rdi, rbx | 0x0042b9b6 call 0x429470 | rax = std::_1::vector>::_append(unsigned long) (rbx, rsi); 0x0042b9bb jmp 0x42b9ca | | } else { 0x0042b9bd cmp rax, rdx | | if (rax >= rdx) { 0x0042b9c0 jae 0x42b9ca | goto label_0; | } 0x0042b9c2 lea rax, [rcx + rax*2] | rax = rcx + rax*2; 0x0042b9c6 mov qword [rbx + 8], rax | *((rbx + 8)) = rax; | } | } | label_0: 0x0042b9ca mov eax, ebp | eax = ebp; 0x0042b9cc add rsp, 8 | 0x0042b9d0 pop rbx | 0x0042b9d1 pop r12 | 0x0042b9d3 pop r13 | 0x0042b9d5 pop r14 | 0x0042b9d7 pop r15 | 0x0042b9d9 pop rbp | 0x0042b9da ret | return rax; | }