; assembly | /* r2dec pseudo code output */ | /* bslstl_ostringstream.t/assume @ 0x41ee10 */ | #include | ; (fcn) method.bsl::basic_stringbuf_char__std::__1::char_traits_char___BloombergLP::bsltf::StdStatefulAllocator_char__true__true__false__true___.seekoff_long_long__std::__1::ios_base::seekdir__unsigned_int_ () | int64_t method_bsl::basic_stringbuf_char_std::_1::char_traits_char_BloombergLP::bsltf::StdStatefulAllocator_char_true_true_false_true_seekoff_long_long_std::_1::ios_base::seekdir_unsigned_int_ (int64_t arg4, uint32_t arg3, int32_t arg2, uint32_t arg1) { | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* bsl::basic_stringbuf, BloombergLP::bsltf::StdStatefulAllocator >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) */ 0x0041ee10 cmp edx, 1 | | if (edx == 1) { 0x0041ee13 jne 0x41ee2a | 0x0041ee15 mov eax, ecx | eax = ecx; 0x0041ee17 and eax, 0x18 | eax &= 0x18; 0x0041ee1a mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041ee21 cmp eax, 0x18 | | if (eax == 0x18) { 0x0041ee24 je 0x41efe8 | goto label_0; | } | } 0x0041ee2a mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041ee31 test cl, 8 | | if ((cl & 8) != 0) { 0x0041ee34 je 0x41eed4 | 0x0041ee3a test byte [rdi + 0x78], 8 | | if ((*((rdi + 0x78)) & 8) == 0) { 0x0041ee3e je 0x41eed4 | goto label_1; | } 0x0041ee44 cmp edx, 2 | | if (edx != 2) { 0x0041ee47 je 0x41ee5b | 0x0041ee49 cmp edx, 1 | | if (edx == 1) { 0x0041ee4c jne 0x41ee7a | 0x0041ee4e mov rax, qword [rdi + 0x18] | rax = *((rdi + 0x18)); 0x0041ee52 add rax, rsi | rax += rsi; 0x0041ee55 mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041ee59 jmp 0x41ee82 | | } else { 0x0041ee5b mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041ee5f mov rax, qword [rdi + 0x30] | rax = *((rdi + 0x30)); 0x0041ee63 sub rax, qword [rdi + 0x28] | rax -= *((rdi + 0x28)); 0x0041ee67 mov r8, qword [rdi + 0x70] | r8 = *((rdi + 0x70)); 0x0041ee6b cmp r8, rax | | if (r8 >= rax) { 0x0041ee6e cmovge rax, r8 | rax = r8; | } 0x0041ee72 add rax, r9 | rax += r9; 0x0041ee75 add rax, rsi | rax += rsi; 0x0041ee78 jmp 0x41ee82 | | } else { 0x0041ee7a mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041ee7e lea rax, [r9 + rsi] | rax = r9 + rsi; | } | } 0x0041ee82 mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041ee89 cmp rax, r9 | | if (rax < r9) { 0x0041ee8c jb 0x41efe8 | goto label_0; | } 0x0041ee92 mov r10, qword [rdi + 0x30] | r10 = *((rdi + 0x30)); 0x0041ee96 mov r11, qword [rdi + 0x70] | r11 = *((rdi + 0x70)); 0x0041ee9a sub r10, qword [rdi + 0x28] | r10 -= *((rdi + 0x28)); 0x0041ee9e cmp r11, r10 | | if (r11 >= r10) { 0x0041eea1 cmovge r10, r11 | r10 = r11; | } 0x0041eea5 add r9, r10 | r9 += r10; 0x0041eea8 cmp rax, r9 | | if (rax > r9) { 0x0041eeab ja 0x41efe8 | goto label_0; | } 0x0041eeb1 lea r8, [rdi + 0x40] | r8 = rdi + 0x40; 0x0041eeb5 cmp qword [rdi + 0x60], 0x17 | | if (*((rdi + 0x60)) != 0x17) { 0x0041eeba je 0x41eebf | 0x0041eebc mov r8, qword [r8] | r8 = *(r8); | } 0x0041eebf add r10, r8 | r10 += r8; 0x0041eec2 mov qword [rdi + 0x10], r8 | *((rdi + 0x10)) = r8; 0x0041eec6 mov qword [rdi + 0x18], rax | *((rdi + 0x18)) = rax; 0x0041eeca mov qword [rdi + 0x20], r10 | *((rdi + 0x20)) = r10; 0x0041eece sub rax, r8 | rax -= r8; 0x0041eed1 mov r8, rax | r8 = rax; | } | label_1: 0x0041eed4 test cl, 0x10 | | if ((cl & 0x10) != 0) { 0x0041eed7 je 0x41efe8 | 0x0041eedd test byte [rdi + 0x78], 0x10 | | if ((*((rdi + 0x78)) & 0x10) == 0) { 0x0041eee1 je 0x41efe8 | goto label_0; | } 0x0041eee7 cmp edx, 2 | | if (edx != 2) { 0x0041eeea je 0x41eefb | 0x0041eeec cmp edx, 1 | | if (edx == 1) { 0x0041eeef jne 0x41ef19 | 0x0041eef1 add rsi, qword [rdi + 0x30] | rsi += *((rdi + 0x30)); 0x0041eef5 mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041eef9 jmp 0x41ef20 | | } else { 0x0041eefb mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041eeff mov rcx, qword [rdi + 0x30] | rcx = *((rdi + 0x30)); 0x0041ef03 sub rcx, rax | rcx -= rax; 0x0041ef06 mov rdx, qword [rdi + 0x70] | rdx = *((rdi + 0x70)); 0x0041ef0a cmp rdx, rcx | | if (rdx >= rcx) { 0x0041ef0d cmovge rcx, rdx | rcx = rdx; | } 0x0041ef11 add rcx, rax | rcx += rax; 0x0041ef14 add rsi, rcx | rsi += rcx; 0x0041ef17 jmp 0x41ef20 | | } else { 0x0041ef19 mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041ef1d add rsi, rax | rsi += rax; | } | } 0x0041ef20 mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041ef27 cmp rsi, rax | | if (rsi < rax) { 0x0041ef2a jb 0x41efe8 | goto label_0; | } 0x0041ef30 mov rcx, qword [rdi + 0x30] | rcx = *((rdi + 0x30)); 0x0041ef34 mov rdx, qword [rdi + 0x70] | rdx = *((rdi + 0x70)); 0x0041ef38 sub rcx, rax | rcx -= rax; 0x0041ef3b cmp rdx, rcx | | if (rdx >= rcx) { 0x0041ef3e cmovge rcx, rdx | rcx = rdx; | } 0x0041ef42 add rcx, rax | rcx += rax; 0x0041ef45 cmp rsi, rcx | | if (rsi > rcx) { 0x0041ef48 ja 0x41efe8 | goto label_0; | } 0x0041ef4e lea r8, [rdi + 0x40] | r8 = rdi + 0x40; 0x0041ef52 cmp qword [rdi + 0x60], 0x17 | | if (*((rdi + 0x60)) != 0x17) { 0x0041ef57 je 0x41ef5c | 0x0041ef59 mov r8, qword [r8] | r8 = *(r8); | } 0x0041ef5c sub rsi, r8 | rsi -= r8; 0x0041ef5f mov rax, qword [rdi + 0x58] | rax = *((rdi + 0x58)); 0x0041ef63 add rax, r8 | rax += r8; 0x0041ef66 mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; 0x0041ef6a mov qword [rdi + 0x28], r8 | *((rdi + 0x28)) = r8; 0x0041ef6e mov qword [rdi + 0x38], rax | *((rdi + 0x38)) = rax; 0x0041ef72 mov eax, 0x80000000 | eax = 0x80000000; 0x0041ef77 cmp rsi, rax | | if (rsi >= rax) { 0x0041ef7a jl 0x41efd4 | 0x0041ef7c mov eax, 0xfffffffe | eax = 0xfffffffe; 0x0041ef81 cmp rsi, rax | | if (rsi < rax) { 0x0041ef84 cmovl rax, rsi | rax = rsi; | } 0x0041ef88 neg rax | rax = -rax; 0x0041ef8b lea rcx, [rsi + rax + 0x7ffffffe] | rcx = rsi + rax + 0x7ffffffe; 0x0041ef93 movabs rdx, 0x200000005 | rdx = 0x200000005; 0x0041ef9d mov rax, rcx | rax = rcx; 0x0041efa0 mul rdx | rdx:rax = rax * rdx; 0x0041efa3 sub rcx, rdx | rcx -= rdx; 0x0041efa6 shr rcx, 1 | rcx >>= 1; 0x0041efa9 add rcx, rdx | rcx += rdx; 0x0041efac shr rcx, 0x1e | rcx >>= 0x1e; 0x0041efb0 mov rdx, rcx | rdx = rcx; 0x0041efb3 shl rdx, 0x1f | rdx <<= 0x1f; 0x0041efb7 sub rdx, rcx | rdx -= rcx; 0x0041efba lea r8, [rdx + r8 + 0x7fffffff] | r8 = rdx + r8 + 0x7fffffff; 0x0041efc2 mov rax, rsi | rax = rsi; 0x0041efc5 sub rax, rdx | rax -= rdx; 0x0041efc8 add rax, 0xffffffff80000001 | rax += 0xffffffff80000001; 0x0041efce mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; 0x0041efd2 jmp 0x41efd7 | | } else { 0x0041efd4 mov rax, rsi | rax = rsi; | } 0x0041efd7 test rax, rax | | if (rax != 0) { 0x0041efda je 0x41efe5 | 0x0041efdc cdqe | rax = (int64_t) eax; 0x0041efde add r8, rax | r8 += rax; 0x0041efe1 mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; | } 0x0041efe5 mov r8, rsi | r8 = rsi; | } | label_0: 0x0041efe8 xor eax, eax | eax = 0; 0x0041efea mov rdx, r8 | rdx = r8; 0x0041efed ret | return rax; | }