; assembly | /* r2dec pseudo code output */ | /* ball_recordjsonformatter.t/assume @ 0x419980 */ | #include | ; (fcn) method.BloombergLP::ball._anonymous_namespace_::TimestampFormatter::format_BloombergLP::baljsn::SimpleFormatter__BloombergLP::ball::Record_const_ () | int64_t method_BloombergLP::ball_anonymous_namespace_::TimestampFormatter::format_BloombergLP::baljsn::SimpleFormatter_BloombergLP::ball::Record_const_ (int64_t arg3, int64_t arg2, uint32_t arg1) { | int64_t var_8h; | int64_t var_10h; | int64_t var_18h; | int64_t var_20h; | int64_t var_28h; | char * var_30h; | char * var_38h; | int64_t var_40h; | char * var_48h; | int64_t var_50h; | int64_t var_58h; | int64_t var_60h; | int64_t var_68h; | int64_t var_70h; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::ball::(anonymous namespace)::TimestampFormatter::format(BloombergLP::baljsn::SimpleFormatter*, BloombergLP::ball::Record const&) */ 0x00419980 push r15 | 0x00419982 push r14 | 0x00419984 push r12 | 0x00419986 push rbx | 0x00419987 sub rsp, 0x78 | 0x0041998b mov rbx, rdx | rbx = rdx; 0x0041998e mov r14, rsi | r14 = rsi; 0x00419991 mov r15, rdi | r15 = rdi; 0x00419994 mov dword [rsp + 0x20], 0 | *((rsp + 0x20)) = 0; 0x0041999c mov qword [rsp + 0x28], 0 | *((rsp + 0x28)) = 0; 0x004199a5 cmp dword [rdi + 0x3c], 0 | | if (*((rdi + 0x3c)) == 0) { 0x004199a9 jne 0x4199f7 | 0x004199ab lea rdi, [rbx + 0x18] | rdi = rbx + 0x18; 0x004199af mov rax, qword [rip + 0x2c85ea] | rax = BloombergLP::bdlt::LocalTimeOffset::s_localTimeOffsetCallback_p; 0x004199b6 call rax | rax = void (*rax)() (); 0x004199b8 mov rcx, rax | rcx = rax; 0x004199bb movabs rdx, 0x1845c8a0ce512957 | rdx = 0x1845c8a0ce512957; 0x004199c5 imul rdx | rdx:rax = rax * rdx; 0x004199c8 mov rax, rdx | rax = rdx; 0x004199cb shr rax, 0x3f | rax >>= 0x3f; 0x004199cf sar rdx, 0xd | rdx >>= 0xd; 0x004199d3 add rdx, rax | rdx += rax; 0x004199d6 imul rax, rdx, 0x15180 | rax = rdx * 0x15180; 0x004199dd sub rcx, rax | rcx -= rax; 0x004199e0 imul rax, rcx, 0xf4240 | rax = rcx * 0xf4240; 0x004199e7 lea rdi, [rsp + 0x20] | 0x004199ec mov rsi, rdx | 0x004199ef mov rdx, rax | 0x004199f2 call 0x43e200 | BloombergLP::bdlt::DatetimeInterval::assign(long long,long long) (rsp + 0x20, rdx, rax); | } 0x004199f7 movabs r12, 0x8000000000000000 | r12 = 0x8000000000000000; 0x00419a01 mov rbx, qword [rbx + 0x18] | rbx = *((rbx + 0x18)); 0x00419a05 test rbx, rbx | 0x00419a08 jns 0x419bac | | while (1) { 0x00419a0e movabs rax, 0x1ffffffc00 | rax = 0x1ffffffc00; 0x00419a18 mov rcx, rbx | rcx = rbx; 0x00419a1b and rcx, rax | rcx &= rax; 0x00419a1e movabs rdx, 0xffffffebe228a000 | rdx = 0xffffffebe228a000; 0x00419a28 add rdx, rcx | rdx += rcx; 0x00419a2b shr rdx, 0xa | rdx >>= 0xa; 0x00419a2f mov rsi, rbx | rsi = rbx; 0x00419a32 shr rsi, 0x25 | rsi >>= 0x25; 0x00419a36 and esi, 0x3ffffff | esi &= 0x3ffffff; 0x00419a3c movabs rdi, 0x141dd76000 | rdi = 0x141dd76000; 0x00419a46 imul rsi, rdi | rsi *= rdi; 0x00419a4a or rax, 0x3ff | rax |= 0x3ff; 0x00419a50 and rax, rbx | rax &= rbx; 0x00419a53 xor ecx, ecx | ecx = 0; 0x00419a55 cmp rdx, 0x35a4e9 | | if (rdx >= 0x35a4e9) { 0x00419a5c cmovae rcx, rax | rcx = rax; | } 0x00419a60 add rcx, rsi | rcx += rsi; 0x00419a63 movsxd rax, dword [rsp + 0x20] | rax = *((rsp + 0x20)); 0x00419a68 imul ebx, eax, 0x5a0 | ebx = eax * 0x5a0; 0x00419a6e imul rax, rdi | rax *= rdi; 0x00419a72 mov rsi, qword [rsp + 0x28] | rsi = *((rsp + 0x28)); 0x00419a77 add rcx, rsi | rcx += rsi; 0x00419a7a add rcx, rax | rcx += rax; 0x00419a7d movabs rdx, 0x32e73fb956a1b897 | rdx = 0x32e73fb956a1b897; 0x00419a87 mov rax, rcx | rax = rcx; 0x00419a8a mul rdx | rdx:rax = rax * rdx; 0x00419a8d shr rdx, 0x22 | rdx >>= 0x22; 0x00419a91 mov rax, rdx | rax = rdx; 0x00419a94 shl rax, 0x25 | rax <<= 0x25; 0x00419a98 imul rdx, rdi | rdx *= rdi; 0x00419a9c sub rcx, rdx | rcx -= rdx; 0x00419a9f or rcx, rax | rcx |= rax; 0x00419aa2 or rcx, r12 | rcx |= r12; 0x00419aa5 movabs rdx, 0x8f2a633943a6d729 | rdx = 0x8f2a633943a6d729; 0x00419aaf mov rax, rsi | rax = rsi; 0x00419ab2 imul rdx | rdx:rax = rax * rdx; 0x00419ab5 add rdx, rsi | rdx += rsi; 0x00419ab8 mov rax, rdx | rax = rdx; 0x00419abb shr rax, 0x3f | rax >>= 0x3f; 0x00419abf shr rdx, 0x19 | rdx >>= 0x19; 0x00419ac3 add edx, eax | edx += eax; 0x00419ac5 add edx, ebx | edx += ebx; 0x00419ac7 mov qword [rsp + 0x68], rcx | *((rsp + 0x68)) = rcx; 0x00419acc mov dword [rsp + 0x70], edx | *((rsp + 0x70)) = edx; 0x00419ad0 cmp dword [r15 + 0x38], 1 | | if (*((r15 + 0x38)) == 1) { 0x00419ad5 jne 0x419b4f | 0x00419ad7 mov dword [rsp + 8], 3 | *((rsp + 8)) = 3; 0x00419adf mov esi, dword [r15 + 0x40] | 0x00419ae3 lea rdi, [rsp + 8] | 0x00419ae8 call 0x442780 | BloombergLP::bdlt::Iso8601UtilConfiguration::setFractionalSecondPrecision(int) (rsp + 8, *((r15 + 0x40))); 0x00419aed lea rdi, [rsp + 8] | 0x00419af2 mov esi, 1 | 0x00419af7 call 0x4427a0 | BloombergLP::bdlt::Iso8601UtilConfiguration::setUseZAbbreviationForUtc(bool) (rsp + 8, 1); 0x00419afc lea rbx, [rsp + 0x30] | rbx = rsp + 0x30; 0x00419b01 lea rsi, [rsp + 0x68] | 0x00419b06 lea rdx, [rsp + 8] | 0x00419b0b mov rdi, rbx | 0x00419b0e call 0x440920 | rax = BloombergLP::bdlt::Iso8601Util::generateRaw(char*,BloombergLP::bdlt::DatetimeTzconst&,BloombergLP::bdlt::Iso8601UtilConfigurationconst&) (rbx, rsp + 0x68, rsp + 8); 0x00419b13 lea rcx, [r15 + 8] | rcx = r15 + 8; 0x00419b17 cmp qword [r15 + 0x28], 0x17 | | if (*((r15 + 0x28)) != 0x17) { 0x00419b1c je 0x419b21 | 0x00419b1e mov rcx, qword [rcx] | rcx = *(rcx); | } 0x00419b21 mov rdx, qword [r15 + 0x20] | rdx = *((r15 + 0x20)); 0x00419b25 mov qword [rsp + 0x10], rcx | *((rsp + 0x10)) = rcx; 0x00419b2a mov qword [rsp + 0x18], rdx | *((rsp + 0x18)) = rdx; 0x00419b2f cdqe | rax = (int64_t) eax; 0x00419b31 mov qword [rsp + 0x58], rbx | *((rsp + 0x58)) = rbx; 0x00419b36 mov qword [rsp + 0x60], rax | *((rsp + 0x60)) = rax; 0x00419b3b lea rsi, [rsp + 0x10] | 0x00419b40 lea rdx, [rsp + 0x58] | 0x00419b45 mov rdi, r14 | 0x00419b48 call 0x41b6d0 | intBloombergLP::baljsn::SimpleFormatter::addValue>>(std::_1::basic_string_view>const&,std::_1::basic_string_view>const&) (r14, rsp + 0x10, rsp + 0x58); 0x00419b4d jmp 0x419b9a | | } else { 0x00419b4f mov qword [rsp + 0x10], rcx | *((rsp + 0x10)) = rcx; 0x00419b54 mov ecx, dword [r15 + 0x40] | 0x00419b58 lea rdi, [rsp + 0x10] | 0x00419b5d lea rsi, [rsp + 0x30] | 0x00419b62 mov edx, 0x20 | 0x00419b67 call 0x43dee0 | BloombergLP::bdlt::Datetime::printToBuffer(char*,int,int)const (rsp + 0x10, rsp + 0x30, 0x20, *((r15 + 0x40))); 0x00419b6c lea rax, [r15 + 8] | rax = r15 + 8; 0x00419b70 cmp qword [r15 + 0x28], 0x17 | | if (*((r15 + 0x28)) != 0x17) { 0x00419b75 je 0x419b7a | 0x00419b77 mov rax, qword [rax] | rax = *(rax); | } 0x00419b7a mov rcx, qword [r15 + 0x20] | rcx = *((r15 + 0x20)); 0x00419b7e mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x00419b83 mov qword [rsp + 0x18], rcx | *((rsp + 0x18)) = rcx; 0x00419b88 lea rsi, [rsp + 0x10] | 0x00419b8d lea rdx, [rsp + 0x30] | 0x00419b92 mov rdi, r14 | 0x00419b95 call 0x41b790 | eax = intBloombergLP::baljsn::SimpleFormatter::addValue(std::_1::basic_string_view>const&,char const(&)[32]) (r14, rsp + 0x10, rsp + 0x30); | } 0x00419b9a test eax, eax | | if (eax == 0) { 0x00419b9c jne 0x419ba0 | 0x00419b9e xor eax, eax | eax = 0; | } 0x00419ba0 add rsp, 0x78 | 0x00419ba4 pop rbx | 0x00419ba5 pop r12 | 0x00419ba7 pop r14 | 0x00419ba9 pop r15 | 0x00419bab ret | return rax; 0x00419bac mov edi, 0x6eb930 | 0x00419bb1 call 0x472c80 | eax = BloombergLP::bsls::Review::updateCount(BloombergLP::bsls::Atomic_TypeTraits::Int*) (method.BloombergLP::bdlt::Datetime.validateAndTraceLogRepresentation___const::lambda__1::operator_____const::count); 0x00419bb6 mov qword [rsp + 0x30], 0x499775 | *((rsp + 0x30)) = "detected invalid 'bdlt::Datetime'; see TEAM 579660115"; 0x00419bbf mov qword [rsp + 0x38], 0x4997ab | *((rsp + 0x38)) = "/home/parsa/experiments/assumptions/crush/ccm-assume/groups/bdl/bdlt/bdlt_datetime.h"; 0x00419bc8 mov dword [rsp + 0x40], 0x466 | *((rsp + 0x40)) = 0x466; 0x00419bd0 mov qword [rsp + 0x48], 0x4b9339 | *((rsp + 0x48)) = "R-INV"; 0x00419bd9 mov dword [rsp + 0x50], eax | *((rsp + 0x50)) = eax; 0x00419bdd lea rdi, [rsp + 0x30] | rdi = rsp + 0x30; 0x00419be2 call 0x472ca0 | BloombergLP::bsls::Review::invokeHandler(BloombergLP::bsls::ReviewViolationconst&) (); 0x00419be7 mov rax, rbx | rax = rbx; 0x00419bea shr rax, 0x20 | rax >>= 0x20; 0x00419bee shl rbx, 0x25 | rbx <<= 0x25; 0x00419bf2 movabs rcx, 0x7fffffe000000000 | rcx = 0x7fffffe000000000; 0x00419bfc add rcx, rbx | rcx += rbx; 0x00419bff imul rbx, rax, 0x3e8 | rbx = rax * 0x3e8; 0x00419c06 or rbx, rcx | rbx |= rcx; 0x00419c09 or rbx, r12 | rbx |= r12; 0x00419c0c jmp 0x419a0e | | } | }