; assembly | /* r2dec pseudo code output */ | /* bslstl_ostringstream.t/none @ 0x41e1e0 */ | #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) */ 0x0041e1e0 cmp edx, 1 | | if (edx == 1) { 0x0041e1e3 jne 0x41e1fa | 0x0041e1e5 mov eax, ecx | eax = ecx; 0x0041e1e7 and eax, 0x18 | eax &= 0x18; 0x0041e1ea mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e1f1 cmp eax, 0x18 | | if (eax == 0x18) { 0x0041e1f4 je 0x41e3bc | goto label_0; | } | } 0x0041e1fa mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e201 test cl, 8 | | if ((cl & 8) != 0) { 0x0041e204 je 0x41e2a3 | 0x0041e20a test byte [rdi + 0x78], 8 | | if ((*((rdi + 0x78)) & 8) == 0) { 0x0041e20e je 0x41e2a3 | goto label_1; | } 0x0041e214 cmp edx, 2 | | if (edx != 2) { 0x0041e217 je 0x41e228 | 0x0041e219 cmp edx, 1 | | if (edx != 1) { 0x0041e21c je 0x41e241 | 0x0041e21e test edx, edx | | if (edx != 0) { 0x0041e220 jne 0x41e24a | goto label_2; | } 0x0041e222 mov r9, qword [rdi + 0x10] | r9 = *((rdi + 0x10)); 0x0041e226 jmp 0x41e245 | 0x0041e228 mov r9, qword [rdi + 0x30] | r9 = *((rdi + 0x30)); 0x0041e22c sub r9, qword [rdi + 0x28] | r9 -= *((rdi + 0x28)); 0x0041e230 mov rax, qword [rdi + 0x70] | rax = *((rdi + 0x70)); 0x0041e234 cmp rax, r9 | | } else { | } else { | if (rax >= r9) { 0x0041e237 cmovge r9, rax | r9 = rax; | } 0x0041e23b add r9, qword [rdi + 0x10] | r9 += *((rdi + 0x10)); 0x0041e23f jmp 0x41e245 | 0x0041e241 mov r9, qword [rdi + 0x18] | r9 = *((rdi + 0x18)); | } | } 0x0041e245 add r9, rsi | r9 += rsi; 0x0041e248 jmp 0x41e24d | goto label_3; | label_2: 0x0041e24a xor r9d, r9d | r9d = 0; | label_3: 0x0041e24d mov rax, qword [rdi + 0x10] | rax = *((rdi + 0x10)); 0x0041e251 mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e258 cmp r9, rax | | if (r9 < rax) { 0x0041e25b jb 0x41e3bc | goto label_0; | } 0x0041e261 mov r10, qword [rdi + 0x30] | r10 = *((rdi + 0x30)); 0x0041e265 mov r11, qword [rdi + 0x70] | r11 = *((rdi + 0x70)); 0x0041e269 sub r10, qword [rdi + 0x28] | r10 -= *((rdi + 0x28)); 0x0041e26d cmp r11, r10 | | if (r11 >= r10) { 0x0041e270 cmovge r10, r11 | r10 = r11; | } 0x0041e274 add rax, r10 | rax += r10; 0x0041e277 cmp r9, rax | | if (r9 > rax) { 0x0041e27a ja 0x41e3bc | goto label_0; | } 0x0041e280 lea r8, [rdi + 0x40] | r8 = rdi + 0x40; 0x0041e284 cmp qword [rdi + 0x60], 0x17 | | if (*((rdi + 0x60)) != 0x17) { 0x0041e289 je 0x41e28e | 0x0041e28b mov r8, qword [r8] | r8 = *(r8); | } 0x0041e28e add r10, r8 | r10 += r8; 0x0041e291 mov qword [rdi + 0x10], r8 | *((rdi + 0x10)) = r8; 0x0041e295 mov qword [rdi + 0x18], r9 | *((rdi + 0x18)) = r9; 0x0041e299 mov qword [rdi + 0x20], r10 | *((rdi + 0x20)) = r10; 0x0041e29d sub r9, r8 | r9 -= r8; 0x0041e2a0 mov r8, r9 | r8 = r9; | } | label_1: 0x0041e2a3 test cl, 0x10 | | if ((cl & 0x10) != 0) { 0x0041e2a6 je 0x41e3bc | 0x0041e2ac test byte [rdi + 0x78], 0x10 | | if ((*((rdi + 0x78)) & 0x10) == 0) { 0x0041e2b0 je 0x41e3bc | goto label_0; | } 0x0041e2b6 cmp edx, 2 | | if (edx != 2) { 0x0041e2b9 je 0x41e2ca | 0x0041e2bb cmp edx, 1 | | if (edx != 1) { 0x0041e2be je 0x41e2e8 | 0x0041e2c0 test edx, edx | | if (edx == 0) { 0x0041e2c2 jne 0x41e2ee | 0x0041e2c4 add rsi, qword [rdi + 0x28] | rsi += *((rdi + 0x28)); 0x0041e2c8 jmp 0x41e2f0 | | } else { 0x0041e2ca mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041e2ce mov rcx, qword [rdi + 0x30] | rcx = *((rdi + 0x30)); 0x0041e2d2 sub rcx, rax | rcx -= rax; 0x0041e2d5 mov rdx, qword [rdi + 0x70] | rdx = *((rdi + 0x70)); 0x0041e2d9 cmp rdx, rcx | | if (rdx >= rcx) { 0x0041e2dc cmovge rcx, rdx | rcx = rdx; | } 0x0041e2e0 add rcx, rax | rcx += rax; 0x0041e2e3 add rsi, rcx | rsi += rcx; 0x0041e2e6 jmp 0x41e2f0 | 0x0041e2e8 add rsi, qword [rdi + 0x30] | rsi += *((rdi + 0x30)); 0x0041e2ec jmp 0x41e2f0 | | } else { | } else { 0x0041e2ee xor esi, esi | esi = 0; | } | } | } 0x0041e2f0 mov rax, qword [rdi + 0x28] | rax = *((rdi + 0x28)); 0x0041e2f4 mov r8, 0xffffffffffffffff | r8 = 0xffffffffffffffff; 0x0041e2fb cmp rsi, rax | | if (rsi < rax) { 0x0041e2fe jb 0x41e3bc | goto label_0; | } 0x0041e304 mov rcx, qword [rdi + 0x30] | rcx = *((rdi + 0x30)); 0x0041e308 mov rdx, qword [rdi + 0x70] | rdx = *((rdi + 0x70)); 0x0041e30c sub rcx, rax | rcx -= rax; 0x0041e30f cmp rdx, rcx | | if (rdx >= rcx) { 0x0041e312 cmovge rcx, rdx | rcx = rdx; | } 0x0041e316 add rcx, rax | rcx += rax; 0x0041e319 cmp rsi, rcx | | if (rsi > rcx) { 0x0041e31c ja 0x41e3bc | goto label_0; | } 0x0041e322 lea r8, [rdi + 0x40] | r8 = rdi + 0x40; 0x0041e326 cmp qword [rdi + 0x60], 0x17 | | if (*((rdi + 0x60)) != 0x17) { 0x0041e32b je 0x41e330 | 0x0041e32d mov r8, qword [r8] | r8 = *(r8); | } 0x0041e330 sub rsi, r8 | rsi -= r8; 0x0041e333 mov rax, qword [rdi + 0x58] | rax = *((rdi + 0x58)); 0x0041e337 add rax, r8 | rax += r8; 0x0041e33a mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; 0x0041e33e mov qword [rdi + 0x28], r8 | *((rdi + 0x28)) = r8; 0x0041e342 mov qword [rdi + 0x38], rax | *((rdi + 0x38)) = rax; 0x0041e346 mov eax, 0x80000000 | eax = 0x80000000; 0x0041e34b cmp rsi, rax | | if (rsi >= rax) { 0x0041e34e jl 0x41e3a8 | 0x0041e350 mov eax, 0xfffffffe | eax = 0xfffffffe; 0x0041e355 cmp rsi, rax | | if (rsi < rax) { 0x0041e358 cmovl rax, rsi | rax = rsi; | } 0x0041e35c neg rax | rax = -rax; 0x0041e35f lea rcx, [rsi + rax + 0x7ffffffe] | rcx = rsi + rax + 0x7ffffffe; 0x0041e367 movabs rdx, 0x200000005 | rdx = 0x200000005; 0x0041e371 mov rax, rcx | rax = rcx; 0x0041e374 mul rdx | rdx:rax = rax * rdx; 0x0041e377 sub rcx, rdx | rcx -= rdx; 0x0041e37a shr rcx, 1 | rcx >>= 1; 0x0041e37d add rcx, rdx | rcx += rdx; 0x0041e380 shr rcx, 0x1e | rcx >>= 0x1e; 0x0041e384 mov rdx, rcx | rdx = rcx; 0x0041e387 shl rdx, 0x1f | rdx <<= 0x1f; 0x0041e38b sub rdx, rcx | rdx -= rcx; 0x0041e38e lea r8, [rdx + r8 + 0x7fffffff] | r8 = rdx + r8 + 0x7fffffff; 0x0041e396 mov rax, rsi | rax = rsi; 0x0041e399 sub rax, rdx | rax -= rdx; 0x0041e39c add rax, 0xffffffff80000001 | rax += 0xffffffff80000001; 0x0041e3a2 mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; 0x0041e3a6 jmp 0x41e3ab | | } else { 0x0041e3a8 mov rax, rsi | rax = rsi; | } 0x0041e3ab test rax, rax | | if (rax != 0) { 0x0041e3ae je 0x41e3b9 | 0x0041e3b0 cdqe | rax = (int64_t) eax; 0x0041e3b2 add r8, rax | r8 += rax; 0x0041e3b5 mov qword [rdi + 0x30], r8 | *((rdi + 0x30)) = r8; | } 0x0041e3b9 mov r8, rsi | r8 = rsi; | } | label_0: 0x0041e3bc xor eax, eax | eax = 0; 0x0041e3be mov rdx, r8 | rdx = r8; 0x0041e3c1 ret | return rax; | }