; assembly | /* r2dec pseudo code output */ | /* bdlde_charconvertutf16.t/assume @ 0x42f840 */ | #include | ; (fcn) method.BloombergLP::bdlde::CharConvertUtf16.utf16ToUtf8_bsl::vector_char__bsl::allocator_char_____wchar_t_const__unsigned_long__char__BloombergLP::bdlde::ByteOrder::Enum_ () | int64_t method_BloombergLP::bdlde::CharConvertUtf16_utf16ToUtf8_bsl::vector_char_bsl::allocator_char_wchar_t_const_unsigned_long_char_BloombergLP::bdlde::ByteOrder::Enum_ (int64_t arg5, int64_t arg4, uint32_t arg3, int64_t arg2, char * arg1) { | r8 = arg5; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlde::CharConvertUtf16::utf16ToUtf8(bsl::vector >*, wchar_t const*, unsigned long*, char, BloombergLP::bdlde::ByteOrder::Enum) */ 0x0042f840 push rbp | 0x0042f841 push r15 | 0x0042f843 push r14 | 0x0042f845 push r13 | 0x0042f847 push r12 | 0x0042f849 push rbx | 0x0042f84a push rax | 0x0042f84b mov r12d, ecx | r12d = ecx; 0x0042f84e mov r14, rdx | r14 = rdx; 0x0042f851 mov r15, rsi | r15 = rsi; 0x0042f854 mov r13, rdi | r13 = rdi; 0x0042f857 mov eax, dword [rsi] | eax = *(rsi); 0x0042f859 xor ebp, ebp | ebp = 0; 0x0042f85b test r8d, r8d | | if (r8d == 0) { 0x0042f85e je 0x42f933 | goto label_4; | } 0x0042f864 test eax, eax | | if (eax == 0) { 0x0042f866 je 0x42f8fa | goto label_5; | } 0x0042f86c mov ecx, 0xfc0000 | ecx = 0xfc0000; 0x0042f871 mov rdx, r15 | rdx = r15; 0x0042f874 jmp 0x42f897 | goto label_6; | label_0: 0x0042f880 cmp edi, 0x800 | 0x0042f886 sbb rbp, 0 | 0x0042f88a add rbp, 3 | rbp += 3; | do { | label_2: 0x0042f88e mov eax, dword [rsi] | eax = *(rsi); 0x0042f890 mov rdx, rsi | rdx = rsi; 0x0042f893 test eax, eax | | if (eax == 0) { 0x0042f895 je 0x42f8fa | goto label_5; | } | label_6: 0x0042f897 mov esi, eax | esi = eax; 0x0042f899 shr esi, 0x18 | esi >>= 0x18; 0x0042f89c mov edi, eax | edi = eax; 0x0042f89e shr edi, 8 | edi >>= 8; 0x0042f8a1 and edi, 0xff00 | edi &= 0xff00; 0x0042f8a7 or edi, esi | edi |= esi; 0x0042f8a9 cmp edi, 0x7f | | if (edi > 0x7f) { 0x0042f8ac ja 0x42f8c0 | goto label_7; | } 0x0042f8ae add rdx, 4 | rdx += 4; 0x0042f8b2 inc rbp | rbp++; | label_1: 0x0042f8b5 mov rsi, rdx | rsi = rdx; 0x0042f8b8 jmp 0x42f88e | | } while (1); | label_7: 0x0042f8c0 mov ebx, eax | ebx = eax; 0x0042f8c2 and ebx, 0xf80000 | ebx &= 0xf80000; 0x0042f8c8 lea rsi, [rdx + 4] | rsi = rdx + 4; 0x0042f8cc cmp ebx, 0xd80000 | | if (ebx != 0xd80000) { 0x0042f8d2 jne 0x42f880 | goto label_0; | } 0x0042f8d4 and eax, 0xfc0000 | eax &= 0xfc0000; 0x0042f8d9 cmp eax, 0xd80000 | | if (eax == 0xd80000) { 0x0042f8de jne 0x42f8f5 | 0x0042f8e0 mov eax, dword [rsi] | eax = *(rsi); 0x0042f8e2 and eax, ecx | eax &= ecx; 0x0042f8e4 cmp eax, 0xdc0000 | | if (eax != 0xdc0000) { 0x0042f8e9 jne 0x42f8f5 | goto label_8; | } 0x0042f8eb add rdx, 8 | rdx += 8; 0x0042f8ef add rbp, 4 | rbp += 4; 0x0042f8f3 jmp 0x42f8b5 | goto label_1; | } | label_8: 0x0042f8f5 inc rbp | rbp++; 0x0042f8f8 jmp 0x42f88e | goto label_2; | label_5: 0x0042f8fa inc rbp | rbp++; 0x0042f8fd mov rdi, qword [r13] | rdi = *(r13); 0x0042f901 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x0042f905 sub rax, rdi | rax -= rdi; 0x0042f908 cmp rbp, rax | | if (rbp > rax) { 0x0042f90b jbe 0x42f91c | 0x0042f90d mov rdi, r13 | 0x0042f910 mov rsi, rbp | 0x0042f913 call 0x443080 | bsl::vector>::resize(unsigned long) (r13, rbp); 0x0042f918 mov rdi, qword [r13] | rdi = *(r13); | } 0x0042f91c movsx r8d, r12b | r8d = (int32_t) r12b; 0x0042f920 mov rcx, rsp | rcx = rsp; 0x0042f923 mov rsi, r15 | rsi = r15; 0x0042f926 mov rdx, r14 | rdx = r14; 0x0042f929 call 0x433900 | eax = int(anonymousnamespace)::localUtf16ToUtf8,(anonymousnamespace)::Swapper>(char*,(anonymousnamespace)::NoOpCapacity,wchar_tconst*,(anonymousnamespace)::Utf16::ZeroBasedEnd,(anonymousnamespace)::Swapper,unsigned long*,unsigned long*,char) (); 0x0042f92e jmp 0x42f9fe | goto label_9; | label_4: 0x0042f933 test eax, eax | | if (eax == 0) { 0x0042f935 je 0x42f9ca | goto label_10; | } 0x0042f93b mov ecx, 0xfc00 | ecx = 0xfc00; 0x0042f940 mov rdx, r15 | rdx = r15; 0x0042f943 jmp 0x42f966 | | while (edi != 0xd800) { 0x0042f950 cmp eax, 0x800 | 0x0042f955 sbb rbp, 0 | 0x0042f959 add rbp, 3 | rbp += 3; | label_3: 0x0042f95d mov eax, dword [rsi] | eax = *(rsi); 0x0042f95f mov rdx, rsi | rdx = rsi; 0x0042f962 test eax, eax | | if (eax == 0) { 0x0042f964 je 0x42f9ca | goto label_10; | } 0x0042f966 cmp eax, 0x7f | | if (eax <= 0x7f) { 0x0042f969 ja 0x42f980 | 0x0042f96b add rdx, 4 | rdx += 4; 0x0042f96f inc rbp | rbp++; 0x0042f972 jmp 0x42f9c0 | goto label_11; | } 0x0042f980 mov edi, eax | edi = eax; 0x0042f982 and edi, 0xf800 | edi &= 0xf800; 0x0042f988 lea rsi, [rdx + 4] | rsi = rdx + 4; 0x0042f98c cmp edi, 0xd800 | 0x0042f992 jne 0x42f950 | | } 0x0042f994 and eax, 0xfc00 | eax &= 0xfc00; 0x0042f999 cmp eax, 0xd800 | | if (eax == 0xd800) { 0x0042f99e jne 0x42f9c5 | 0x0042f9a0 mov eax, dword [rsi] | eax = *(rsi); 0x0042f9a2 and eax, ecx | eax &= ecx; 0x0042f9a4 cmp eax, 0xdc00 | | if (eax != 0xdc00) { 0x0042f9a9 jne 0x42f9c5 | goto label_12; | } 0x0042f9ab add rdx, 8 | rdx += 8; 0x0042f9af add rbp, 4 | rbp += 4; 0x0042f9b3 nop word cs:[rax + rax] | 0x0042f9bd nop dword [rax] | | label_11: 0x0042f9c0 mov rsi, rdx | rsi = rdx; 0x0042f9c3 jmp 0x42f95d | goto label_3; | } | label_12: 0x0042f9c5 inc rbp | rbp++; 0x0042f9c8 jmp 0x42f95d | goto label_3; | label_10: 0x0042f9ca inc rbp | rbp++; 0x0042f9cd mov rdi, qword [r13] | rdi = *(r13); 0x0042f9d1 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x0042f9d5 sub rax, rdi | rax -= rdi; 0x0042f9d8 cmp rbp, rax | | if (rbp > rax) { 0x0042f9db jbe 0x42f9ec | 0x0042f9dd mov rdi, r13 | 0x0042f9e0 mov rsi, rbp | 0x0042f9e3 call 0x443080 | bsl::vector>::resize(unsigned long) (r13, rbp); 0x0042f9e8 mov rdi, qword [r13] | rdi = *(r13); | } 0x0042f9ec movsx r8d, r12b | r8d = (int32_t) r12b; 0x0042f9f0 mov rcx, rsp | rcx = rsp; 0x0042f9f3 mov rsi, r15 | rsi = r15; 0x0042f9f6 mov rdx, r14 | rdx = r14; 0x0042f9f9 call 0x433750 | eax = int(anonymousnamespace)::localUtf16ToUtf8,(anonymousnamespace)::NoOpSwapper>(char*,(anonymousnamespace)::NoOpCapacity,wchar_tconst*,(anonymousnamespace)::Utf16::ZeroBasedEnd,(anonymousnamespace)::NoOpSwapper,unsigned long*,unsigned long*,char) (); | label_9: 0x0042f9fe mov ebx, eax | ebx = eax; 0x0042fa00 mov rsi, qword [rsp] | rsi = *(rsp); 0x0042fa04 cmp rsi, rbp | 0x0042fa07 mov rax, qword [r13 + 8] | rax = *((r13 + 8)); 0x0042fa0b sub rax, qword [r13] | rax -= *(r13); 0x0042fa0f cmp rax, rsi | | if (rax != rsi) { 0x0042fa12 je 0x42fa1c | 0x0042fa14 mov rdi, r13 | 0x0042fa17 call 0x443080 | bsl::vector>::resize(unsigned long) (r13, rsi); | } 0x0042fa1c mov eax, ebx | eax = ebx; 0x0042fa1e add rsp, 8 | 0x0042fa22 pop rbx | 0x0042fa23 pop r12 | 0x0042fa25 pop r13 | 0x0042fa27 pop r14 | 0x0042fa29 pop r15 | 0x0042fa2b pop rbp | 0x0042fa2c ret | return rax; | }