; assembly | /* r2dec pseudo code output */ | /* bslstl_ostringstream.t/assume @ 0x41e1d0 */ | #include | ; (fcn) method.bsl::basic_stringbuf_char__std::__1::char_traits_char___BloombergLP::bsltf::StdStatefulAllocator_char__true__true__true__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_true_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) */ 0x0041e1d0 cmp edx, 1 | | if (edx == 1) { 0x0041e1d3 jne 0x41e1ea | 0x0041e1d5 mov eax, ecx | eax = ecx; 0x0041e1d7 and eax, 0x18 | eax &= 0x18; 0x0041e1da mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e1e1 cmp eax, 0x18 | | if (eax == 0x18) { 0x0041e1e4 je 0x41e3a8 | goto label_0; | } | } 0x0041e1ea mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e1f1 test cl, 8 | | if ((cl & 8) != 0) { 0x0041e1f4 je 0x41e294 | 0x0041e1fa test byte [rdi + 0x78], 8 | | if ((*((rdi + 0x78)) & 8) == 0) { 0x0041e1fe je 0x41e294 | goto label_1; | } 0x0041e204 cmp edx, 2 | | if (edx != 2) { 0x0041e207 je 0x41e21b | 0x0041e209 cmp edx, 1 | | if (edx == 1) { 0x0041e20c jne 0x41e23a | 0x0041e20e mov rax, qword [rdi + 0x18] | rax = *((rdi + 0x18)); 0x0041e212 add rax, rsi | rax += rsi; 0x0041e215 mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041e219 jmp 0x41e242 | | } else { 0x0041e21b mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041e21f mov rax, qword [rdi + 0x30] | rax = *((rdi + 0x30)); 0x0041e223 sub rax, qword [rdi + 0x28] | rax -= *((rdi + 0x28)); 0x0041e227 mov r8, qword [rdi + 0x70] | r8 = *((rdi + 0x70)); 0x0041e22b cmp r8, rax | | if (r8 >= rax) { 0x0041e22e cmovge rax, r8 | rax = r8; | } 0x0041e232 add rax, r9 | rax += r9; 0x0041e235 add rax, rsi | rax += rsi; 0x0041e238 jmp 0x41e242 | | } else { 0x0041e23a mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041e23e lea rax, [r9 + rsi] | rax = r9 + rsi; | } | } 0x0041e242 mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e249 cmp rax, r9 | | if (rax < r9) { 0x0041e24c jb 0x41e3a8 | goto label_0; | } 0x0041e252 mov r10, qword [rdi + 0x30] | r10 = *((rdi + 0x30)); 0x0041e256 mov r11, qword [rdi + 0x70] | r11 = *((rdi + 0x70)); 0x0041e25a sub r10, qword [rdi + 0x28] | r10 -= *((rdi + 0x28)); 0x0041e25e cmp r11, r10 | | if (r11 >= r10) { 0x0041e261 cmovge r10, r11 | r10 = r11; | } 0x0041e265 add r9, r10 | r9 += r10; 0x0041e268 cmp rax, r9 | | if (rax > r9) { 0x0041e26b ja 0x41e3a8 | goto label_0; | } 0x0041e271 lea r8, [rdi + 0x40] | r8 = rdi + 0x40; 0x0041e275 cmp qword [rdi + 0x60], 0x17 | | if (*((rdi + 0x60)) != 0x17) { 0x0041e27a je 0x41e27f | 0x0041e27c mov r8, qword [r8] | r8 = *(r8); | } 0x0041e27f add r10, r8 | r10 += r8; 0x0041e282 mov qword [rdi + 0x10], r8 | *((rdi + 0x10)) = r8; 0x0041e286 mov qword [rdi + 0x18], rax | *((rdi + 0x18)) = rax; 0x0041e28a mov qword [rdi + 0x20], r10 | *((rdi + 0x20)) = r10; 0x0041e28e sub rax, r8 | rax -= r8; 0x0041e291 mov r8, rax | r8 = rax; | } | label_1: 0x0041e294 test cl, 0x10 | | if ((cl & 0x10) != 0) { 0x0041e297 je 0x41e3a8 | 0x0041e29d test byte [rdi + 0x78], 0x10 | | if ((*((rdi + 0x78)) & 0x10) == 0) { 0x0041e2a1 je 0x41e3a8 | goto label_0; | } 0x0041e2a7 cmp edx, 2 | | if (edx != 2) { 0x0041e2aa je 0x41e2bb | 0x0041e2ac cmp edx, 1 | | if (edx == 1) { 0x0041e2af jne 0x41e2d9 | 0x0041e2b1 add rsi, qword [rdi + 0x30] | rsi += *((rdi + 0x30)); 0x0041e2b5 mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041e2b9 jmp 0x41e2e0 | | } else { 0x0041e2bb mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041e2bf mov rcx, qword [rdi + 0x30] | rcx = *((rdi + 0x30)); 0x0041e2c3 sub rcx, rax | rcx -= rax; 0x0041e2c6 mov rdx, qword [rdi + 0x70] | rdx = *((rdi + 0x70)); 0x0041e2ca cmp rdx, rcx | | if (rdx >= rcx) { 0x0041e2cd cmovge rcx, rdx | rcx = rdx; | } 0x0041e2d1 add rcx, rax | rcx += rax; 0x0041e2d4 add rsi, rcx | rsi += rcx; 0x0041e2d7 jmp 0x41e2e0 | | } else { 0x0041e2d9 mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041e2dd add rsi, rax | rsi += rax; | } | } 0x0041e2e0 mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e2e7 cmp rsi, rax | | if (rsi < rax) { 0x0041e2ea jb 0x41e3a8 | goto label_0; | } 0x0041e2f0 mov rcx, qword [rdi + 0x30] | rcx = *((rdi + 0x30)); 0x0041e2f4 mov rdx, qword [rdi + 0x70] | rdx = *((rdi + 0x70)); 0x0041e2f8 sub rcx, rax | rcx -= rax; 0x0041e2fb cmp rdx, rcx | | if (rdx >= rcx) { 0x0041e2fe cmovge rcx, rdx | rcx = rdx; | } 0x0041e302 add rcx, rax | rcx += rax; 0x0041e305 cmp rsi, rcx | | if (rsi > rcx) { 0x0041e308 ja 0x41e3a8 | goto label_0; | } 0x0041e30e lea r8, [rdi + 0x40] | r8 = rdi + 0x40; 0x0041e312 cmp qword [rdi + 0x60], 0x17 | | if (*((rdi + 0x60)) != 0x17) { 0x0041e317 je 0x41e31c | 0x0041e319 mov r8, qword [r8] | r8 = *(r8); | } 0x0041e31c sub rsi, r8 | rsi -= r8; 0x0041e31f mov rax, qword [rdi + 0x58] | rax = *((rdi + 0x58)); 0x0041e323 add rax, r8 | rax += r8; 0x0041e326 mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; 0x0041e32a mov qword [rdi + 0x28], r8 | *((rdi + 0x28)) = r8; 0x0041e32e mov qword [rdi + 0x38], rax | *((rdi + 0x38)) = rax; 0x0041e332 mov eax, 0x80000000 | eax = 0x80000000; 0x0041e337 cmp rsi, rax | | if (rsi >= rax) { 0x0041e33a jl 0x41e394 | 0x0041e33c mov eax, 0xfffffffe | eax = 0xfffffffe; 0x0041e341 cmp rsi, rax | | if (rsi < rax) { 0x0041e344 cmovl rax, rsi | rax = rsi; | } 0x0041e348 neg rax | rax = -rax; 0x0041e34b lea rcx, [rsi + rax + 0x7ffffffe] | rcx = rsi + rax + 0x7ffffffe; 0x0041e353 movabs rdx, 0x200000005 | rdx = 0x200000005; 0x0041e35d mov rax, rcx | rax = rcx; 0x0041e360 mul rdx | rdx:rax = rax * rdx; 0x0041e363 sub rcx, rdx | rcx -= rdx; 0x0041e366 shr rcx, 1 | rcx >>= 1; 0x0041e369 add rcx, rdx | rcx += rdx; 0x0041e36c shr rcx, 0x1e | rcx >>= 0x1e; 0x0041e370 mov rdx, rcx | rdx = rcx; 0x0041e373 shl rdx, 0x1f | rdx <<= 0x1f; 0x0041e377 sub rdx, rcx | rdx -= rcx; 0x0041e37a lea r8, [rdx + r8 + 0x7fffffff] | r8 = rdx + r8 + 0x7fffffff; 0x0041e382 mov rax, rsi | rax = rsi; 0x0041e385 sub rax, rdx | rax -= rdx; 0x0041e388 add rax, 0xffffffff80000001 | rax += 0xffffffff80000001; 0x0041e38e mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; 0x0041e392 jmp 0x41e397 | | } else { 0x0041e394 mov rax, rsi | rax = rsi; | } 0x0041e397 test rax, rax | | if (rax != 0) { 0x0041e39a je 0x41e3a5 | 0x0041e39c cdqe | rax = (int64_t) eax; 0x0041e39e add r8, rax | r8 += rax; 0x0041e3a1 mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; | } 0x0041e3a5 mov r8, rsi | r8 = rsi; | } | label_0: 0x0041e3a8 xor eax, eax | eax = 0; 0x0041e3aa mov rdx, r8 | rdx = r8; 0x0041e3ad ret | return rax; | }