; assembly | /* r2dec pseudo code output */ | /* ball_observeradapter.t/assume @ 0x404630 */ | #include | ; (fcn) method.USAGE_EXAMPLE_1.main_bool_ () | int64_t method_USAGE_EXAMPLE_1_main_bool_ (uint32_t arg1) { | int64_t var_4h; | int64_t var_8h; | uint32_t var_ch; | int64_t var_10h; | int64_t var_18h; | int64_t var_20h; | int64_t var_28h; | int64_t var_30h; | int64_t var_38h; | char * var_40h; | char * var_48h; | int64_t var_50h; | char * var_58h; | uint32_t var_60h; | char * var_68h; | int64_t var_78h; | int64_t var_90h; | uint32_t var_b0h; | int64_t var_b8h; | int64_t var_c8h; | int64_t var_e0h; | uint32_t var_e8h; | int64_t var_f0h; | int64_t var_100h; | int64_t var_128h; | int64_t var_140h; | int64_t var_148h; | int64_t var_150h; | int64_t var_190h; | int64_t var_1a8h; | uint32_t var_1b0h; | int64_t var_1b8h; | int64_t var_1d0h; | int64_t var_258h; | int64_t var_260h; | rdi = arg1; | /* USAGE_EXAMPLE_1::main(bool) */ 0x00404630 push rbp | 0x00404631 push r15 | 0x00404633 push r14 | 0x00404635 push r13 | 0x00404637 push r12 | 0x00404639 push rbx | 0x0040463a sub rsp, 0x268 | 0x00404641 mov dword [rsp + 0xc], edi | *((rsp + 0xc)) = edi; 0x00404645 mov rax, qword [rip + 0x25e5e4] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0040464c test rax, rax | | if (rax == 0) { 0x0040464f jne 0x404656 | 0x00404651 call 0x40c480 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x00404656 mov qword [rsp + 0x78], rax | *((rsp + 0x78)) = rax; 0x0040465b mov qword [rsp + 0x1d0], 0x661cb8 | *((rsp + 0x1d0)) = 0x661cb8; 0x00404667 lea rbx, [rsp + 0x150] | rbx = rsp + 0x150; 0x0040466b push rax | 0x0040466c add dword [rax], eax | *(rax) += eax; 0x0040466e add byte [rax - 0x73], cl | *((rax - 0x73)) += cl; 0x00404671 push rsp | 0x00404672 and al, 0x78 | al &= 0x78; 0x00404674 mov rdi, rbx | 0x00404677 mov esi, 0x10 | 0x0040467c call 0x406670 | bsl::basic_stringbuf,bsl::allocator>::basic_stringbuf(unsignedint,bsl::allocatorconst&) (rbx, 0x10, rdx); 0x00404681 mov qword [rsp + 0x148], 0x432fd8 | *((rsp + sym.imp.std::__1::basic_ostream_char__std::__1::char_traits_char___::basic_ostream__)) = 0x432fd8; 0x0040468d lea rdi, [rsp + 0x1d0] | rdi = rsp + 0x1d0; 0x00404695 mov qword [rsp + 0x1d0], 0x433000 | *((rsp + sym.imp.virtual_thunk_to_std::__1::basic_ostream_char__std::__1::char_traits_char___::basic_ostream__)) = 0x433000; 0x004046a1 mov rsi, rbx | rsi = rbx; 0x004046a4 call 0x403d70 | std::_1::ios_base::init(void*) (); 0x004046a9 mov qword [rsp + 0x258], 0 | *((rsp + 0x258)) = 0; 0x004046b5 mov dword [rsp + 0x260], 0xffffffff | *((rsp + 0x260)) = 0xffffffff; 0x004046c0 mov qword [rsp + 0x148], 0x432f68 | *((rsp + sym.bsl::basic_ostringstream_char__std::__1::char_traits_char___bsl::allocator_char___::basic_ostringstream__)) = 0x432f68; 0x004046cc mov qword [rsp + 0x1d0], 0x432f90 | *((rsp + method.virtual_thunk_to_bsl::basic_ostringstream_char__std::__1::char_traits_char___bsl::allocator_char___.basic_ostringstream__)) = 0x432f90; 0x004046d8 mov qword [rsp + 0x30], 0x432ee8 | *((rsp + 0x30)) = vtable.USAGE_EXAMPLE_1::MyOstreamObserver.0; 0x004046e1 lea rax, [rsp + 0x148] | rax = rsp + 0x148; 0x004046e9 mov qword [rsp + 0x38], rax | *((rsp + 0x38)) = rax; 0x004046ee lea rdi, [rsp + 0x78] | 0x004046f3 xor esi, esi | 0x004046f5 call 0x407180 | BloombergLP::ball::RecordAttributes::RecordAttributes(BloombergLP::bslma::Allocator*) (rsp + 0x78, 0); 0x004046fa mov rax, qword [rip + 0x25e52f] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x00404701 test rax, rax | | if (rax == 0) { 0x00404704 jne 0x40470b | 0x00404706 call 0x40c480 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0040470b movabs rcx, 0x1ffffffc00 | rcx = 0x1ffffffc00; 0x00404715 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00404718 movaps xmmword [rsp + 0x10], xmm0 | *((rsp + 0x10)) = xmm0; 0x0040471d mov qword [rsp + 0x20], 0 | *((rsp + 0x20)) = 0; 0x00404726 mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x0040472b xor r14d, r14d | r14d = 0; 0x0040472e lea r15, [rsp + 0x40] | r15 = rsp + 0x40; 0x00404733 lea rbx, [rcx + 0x3ff] | rbx = rcx + 0x3ff; 0x0040473a jmp 0x40474d | | while (rdi == 0) { | label_0: 0x00404740 inc r14d | r14d++; 0x00404743 cmp r14d, 3 | | if (r14d == 3) { 0x00404747 je 0x4048fd | goto label_2; | } 0x0040474d call 0x409cb0 | rax = BloombergLP::bdlt::DatetimeImpUtil::epoch_1970_01_01() (); 0x00404752 mov rbp, rax | 0x00404755 mov rax, qword [rip + 0x25df14] | rax = BloombergLP::bdlt::CurrentTime::s_currenttimeCallback_p; 0x0040475c call rax | rax = void (*rax)() (); 0x0040475e mov r12, rax | r12 = rax; 0x00404761 mov r13d, edx | r13d = edx; 0x00404764 mov rbp, qword [rbp] | rbp = *(rbp); 0x00404768 test rbp, rbp | | if (rbp >= 0) { 0x0040476b jns 0x40488d | goto label_3; | } | label_1: 0x00404771 mov rax, rbp | rax = rbp; 0x00404774 movabs rcx, 0x1ffffffc00 | rcx = 0x1ffffffc00; 0x0040477e and rax, rcx | rax &= rcx; 0x00404781 movabs rcx, 0xffffffebe228a000 | rcx = 0xffffffebe228a000; 0x0040478b add rax, rcx | rax += rcx; 0x0040478e shr rax, 0xa | rax >>= 0xa; 0x00404792 mov rcx, rbp | rcx = rbp; 0x00404795 shr rcx, 0x25 | rcx >>= 0x25; 0x00404799 and ecx, 0x3ffffff | ecx &= 0x3ffffff; 0x0040479f movabs rdi, 0x141dd76000 | rdi = 0x141dd76000; 0x004047a9 imul rcx, rdi | rcx *= rdi; 0x004047ad and rbp, rbx | rbp &= rbx; 0x004047b0 cmp rax, 0x35a4e9 | 0x004047b6 mov eax, 0 | eax = 0; | if (rax >= 0x35a4e9) { 0x004047bb cmovae rax, rbp | rax = rbp; | } 0x004047bf add rax, rcx | rax += rcx; 0x004047c2 imul rdx, r12, 0xf4240 | rdx = r12 * 0xf4240; 0x004047c9 movsxd rcx, r13d | rcx = (int64_t) r13d; 0x004047cc imul rcx, rcx, 0x10624dd3 | rcx *= 0x10624dd3; 0x004047d3 mov rsi, rcx | rsi = rcx; 0x004047d6 shr rsi, 0x3f | rsi >>= 0x3f; 0x004047da sar rcx, 0x26 | rcx >>= 0x26; 0x004047de add ecx, esi | ecx += esi; 0x004047e0 movsxd rcx, ecx | rcx = (int64_t) ecx; 0x004047e3 add rcx, rdx | rcx += rdx; 0x004047e6 add rcx, rax | rcx += rax; 0x004047e9 mov rax, rcx | rax = rcx; 0x004047ec movabs rdx, 0x32e73fb956a1b897 | rdx = 0x32e73fb956a1b897; 0x004047f6 mul rdx | rdx:rax = rax * rdx; 0x004047f9 shr rdx, 0x22 | rdx >>= 0x22; 0x004047fd mov rax, rdx | rax = rdx; 0x00404800 shl rax, 0x25 | rax <<= 0x25; 0x00404804 imul rdx, rdi | rdx *= rdi; 0x00404808 sub rcx, rdx | rcx -= rdx; 0x0040480b or rcx, rax | rcx |= rax; 0x0040480e movabs rax, 0x8000000000000000 | rax = 0x8000000000000000; 0x00404818 or rcx, rax | rcx |= rax; 0x0040481b mov qword [rsp + 0x78], rcx | *((rsp + 0x78)) = rcx; 0x00404820 xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x00404823 movaps xmmword [rsp + 0x40], xmm0 | *((rsp + 0x40)) = xmm0; 0x00404828 mov rax, qword [rip + 0x25e401] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0040482f test rax, rax | | if (rax == 0) { 0x00404832 jne 0x404839 | 0x00404834 call 0x40c480 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x00404839 mov rdi, r15 | 0x0040483c mov rsi, rax | 0x0040483f lea rdx, [rsp + 0x78] | 0x00404844 lea rcx, [rsp + 0x10] | 0x00404849 call 0x405370 | voidbsl::shared_ptr::createInplace(BloombergLP::bslma::Allocator*,BloombergLP::ball::RecordAttributes&,BloombergLP::ball::UserFields&) (r15, rax, rsp + 0x78, rsp + 0x10); 0x0040484e mov dword [rsp], 1 | 0x00404855 mov dword [rsp + 4], r14d | *((rsp + 4)) = r14d; 0x0040485a mov dword [rsp + 8], 3 | *((rsp + 8)) = 3; 0x00404862 mov rax, qword [rsp + 0x30] | rax = *((rsp + 0x30)); 0x00404867 lea rdi, [rsp + 0x30] | rdi = rsp + 0x30; 0x0040486c mov rsi, r15 | rsi = r15; 0x0040486f mov rdx, rsp | rdx = rsp; 0x00404872 call qword [rax + 0x18] | uint64_t (*rax + 0x18)(void) (1); 0x00404875 mov rdi, qword [rsp + 0x48] | rdi = *((rsp + 0x48)); 0x0040487a test rdi, rdi | 0x0040487d je 0x404740 | | } 0x00404883 call 0x40c5c0 | BloombergLP::bslma::SharedPtrRep::releaseRef() (rdi); 0x00404888 jmp 0x404740 | goto label_0; | label_3: 0x0040488d mov edi, 0x662c18 | 0x00404892 call 0x40d640 | eax = BloombergLP::bsls::Review::updateCount(BloombergLP::bsls::Atomic_TypeTraits::Int*) (method.BloombergLP::bdlt::Datetime.validateAndTraceLogRepresentation___const::lambda__1::operator_____const::count); 0x00404897 mov qword [rsp + 0x40], 0x432d9d | *((rsp + 0x40)) = "detected invalid 'bdlt::Datetime'; see TEAM 579660115"; 0x004048a0 mov qword [rsp + 0x48], 0x432dd3 | *((rsp + 0x48)) = "/home/parsa/experiments/assumptions/crush/ccm-assume/groups/bdl/bdlt/bdlt_datetime.h"; 0x004048a9 mov dword [rsp + 0x50], 0x466 | *((rsp + 0x50)) = 0x466; 0x004048b1 mov qword [rsp + 0x58], 0x44aff1 | *((rsp + 0x58)) = "R-INV"; 0x004048ba mov dword [rsp + 0x60], eax | *((rsp + 0x60)) = eax; 0x004048be mov rdi, r15 | rdi = r15; 0x004048c1 call 0x40d660 | BloombergLP::bsls::Review::invokeHandler(BloombergLP::bsls::ReviewViolationconst&) (); 0x004048c6 mov rax, rbp | rax = rbp; 0x004048c9 shr rax, 0x20 | rax >>= 0x20; 0x004048cd shl rbp, 0x25 | rbp <<= 0x25; 0x004048d1 movabs rcx, 0x7fffffe000000000 | rcx = 0x7fffffe000000000; 0x004048db add rbp, rcx | rbp += rcx; 0x004048de imul rax, rax, 0x3e8 | rax *= 0x3e8; 0x004048e5 or rax, rbp | rax |= rbp; 0x004048e8 movabs rcx, 0x8000000000000000 | rcx = 0x8000000000000000; 0x004048f2 or rax, rcx | rax |= rcx; 0x004048f5 mov rbp, rax | 0x004048f8 jmp 0x404771 | goto label_1; | label_2: 0x004048fd cmp byte [rsp + 0xc], 0 | | if (*((rsp + 0xc)) != 0) { 0x00404902 je 0x40498f | 0x00404908 lea rsi, [rsp + 0x150] | 0x00404910 lea rdi, [rsp + 0x40] | 0x00404915 call 0x406d50 | bsl::basic_stringbuf,bsl::allocator>::str()const (rsp + 0x40, rsp + 0x150); 0x0040491a lea rsi, [rsp + 0x40] | 0x0040491f mov edi, 0x662b68 | 0x00404924 call 0x405430 | rax = std::_1::basic_ostream>&bsl::operator << ,bsl::allocator>(std::_1::basic_ostream>&,bsl::basic_string,bsl::allocator>const&) (obj.std::__1::cout, rsp + 0x40); 0x00404929 mov rbx, rax | rbx = rax; 0x0040492c mov rax, qword [rax] | rax = *(rax); 0x0040492f mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x00404933 add rsi, rbx | rsi += rbx; 0x00404936 mov rdi, rsp | rdi = rsp; 0x00404939 call 0x404040 | std::_1::ios_base::getloc()const (); 0x0040493e mov rdi, rsp | rdi = rsp; 0x00404941 mov esi, 0x662ab0 | esi = std::__1::ctype::id; 0x00404946 call 0x4040e0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x0040494b mov rcx, qword [rax] | rcx = *(rax); 0x0040494e mov rdi, rax | rdi = rax; 0x00404951 mov esi, 0xa | esi = 0xa; 0x00404956 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x00404959 mov ebp, eax | 0x0040495b mov rdi, rsp | rdi = rsp; 0x0040495e call 0x404160 | std::_1::locale::~locale() (); 0x00404963 movsx esi, bpl | esi = (int32_t) bpl; 0x00404967 mov rdi, rbx | rdi = rbx; 0x0040496a call 0x403e60 | std::_1::basic_ostream>::put(char) (); 0x0040496f mov rdi, rbx | rdi = rbx; 0x00404972 call 0x404000 | std::_1::basic_ostream>::flush() (); 0x00404977 cmp qword [rsp + 0x60], 0x17 | | if (*((rsp + 0x60)) == 0x17) { 0x0040497d je 0x40498f | goto label_4; | } 0x0040497f mov rsi, qword [rsp + 0x40] | rsi = *((rsp + 0x40)); 0x00404984 mov rdi, qword [rsp + 0x68] | rdi = *((rsp + 0x68)); 0x00404989 mov rax, qword [rdi] | rax = *(rdi); 0x0040498c call qword [rax + 0x18] | rax = uint64_t (*rax + 0x18)() (); | } | label_4: 0x0040498f mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); 0x00404994 test rbx, rbx | | if (rbx == 0) { 0x00404997 je 0x4049d4 | goto label_5; | } 0x00404999 mov rbp, qword [rsp + 0x18] | rbp = *((rsp + 0x18)); 0x0040499e cmp rbx, rbp | | if (rbx == rbp) { 0x004049a1 je 0x4049c6 | goto label_6; | } 0x004049a3 nop word cs:[rax + rax] | 0x004049ad nop dword [rax] | | do { 0x004049b0 mov rdi, rbx | 0x004049b3 call 0x405980 | BloombergLP::bdlb::VariantImp,bsl::allocator>,BloombergLP::bdlt::DatetimeTz,bsl::vector>>>::reset() (rbx, rsi, rdx, rcx, r8, r9); 0x004049b8 add rbx, 0x40 | rbx += 0x40; 0x004049bc cmp rbp, rbx | 0x004049bf jne 0x4049b0 | | } while (rbp != rbx); 0x004049c1 mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); | label_6: 0x004049c6 mov rdi, qword [rsp + 0x28] | rdi = *((rsp + 0x28)); 0x004049cb mov rax, qword [rdi] | rax = *(rdi); 0x004049ce mov rsi, rbx | rsi = rbx; 0x004049d1 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | label_5: 0x004049d4 lea rbx, [rsp + 0x100] | rbx = rsp + 0x100; 0x004049dc mov qword [rsp + 0x100], 0x4337d8 | *((rsp + method.BloombergLP::bdlsb::MemOutStreamBuf.MemOutStreamBuf__)) = 0x4337d8; 0x004049e8 mov rsi, qword [rsp + 0x128] | rsi = *((rsp + 0x128)); 0x004049f0 mov rdi, qword [rsp + 0x140] | rdi = *((rsp + 0x140)); 0x004049f8 mov rax, qword [rdi] | rax = *(rdi); 0x004049fb call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x004049fe mov rdi, rbx | rdi = rbx; 0x00404a01 call 0x403cd0 | std::_1::basic_streambuf>::~basic_streambuf() (); 0x00404a06 cmp qword [rsp + 0xe8], 0x17 | | if (*((rsp + 0xe8)) != 0x17) { 0x00404a0f je 0x404a27 | 0x00404a11 mov rsi, qword [rsp + 0xc8] | rsi = *((rsp + 0xc8)); 0x00404a19 mov rdi, qword [rsp + 0xf0] | rdi = *((rsp + 0xf0)); 0x00404a21 mov rax, qword [rdi] | rax = *(rdi); 0x00404a24 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x00404a27 mov qword [rsp + 0xe0], 0xffffffffffffffff | *((rsp + 0xe0)) = 0xffffffffffffffff; 0x00404a33 cmp qword [rsp + 0xb0], 0x17 | 0x00404a3c lea rbx, [rsp + 0x150] | rbx = rsp + 0x150; | if (*((rsp + 0xb0)) != 0x17) { 0x00404a44 je 0x404a5c | 0x00404a46 mov rsi, qword [rsp + 0x90] | rsi = *((rsp + 0x90)); 0x00404a4e mov rdi, qword [rsp + 0xb8] | rdi = *((rsp + 0xb8)); 0x00404a56 mov rax, qword [rdi] | rax = *(rdi); 0x00404a59 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x00404a5c lea rdi, [rsp + 0x30] | 0x00404a61 call 0x407160 | BloombergLP::ball::ObserverAdapter::~ObserverAdapter() (rsp + 0x30); 0x00404a66 lea rdi, [rsp + 0x148] | rdi = rsp + 0x148; 0x00404a6e mov esi, 0x432fa8 | esi = 0x432fa8; 0x00404a73 call 0x4041b0 | std::_1::basic_ostream>::~basic_ostream() (); 0x00404a78 mov qword [rsp + 0x150], 0x4330f8 | *((rsp + method.bsl::basic_stringbuf_char__std::__1::char_traits_char___bsl::allocator_char___.virtual_0)) = 0x4330f8; 0x00404a84 cmp qword [rsp + 0x1b0], 0x17 | | if (*((rsp + 0x1b0)) != 0x17) { 0x00404a8d je 0x404aa5 | 0x00404a8f mov rsi, qword [rsp + 0x190] | rsi = *((rsp + 0x190)); 0x00404a97 mov rdi, qword [rsp + 0x1b8] | rdi = *((rsp + 0x1b8)); 0x00404a9f mov rax, qword [rdi] | rax = *(rdi); 0x00404aa2 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x00404aa5 mov qword [rsp + 0x1a8], 0xffffffffffffffff | *((rsp + 0x1a8)) = 0xffffffffffffffff; 0x00404ab1 mov rdi, rbx | rdi = rbx; 0x00404ab4 call 0x403cd0 | std::_1::basic_streambuf>::~basic_streambuf() (); 0x00404ab9 lea rdi, [rsp + 0x1d0] | rdi = rsp + 0x1d0; 0x00404ac1 call 0x403c00 | eax = std::_1::basic_ios>::~basic_ios() (); 0x00404ac6 xor eax, eax | eax = 0; 0x00404ac8 add rsp, 0x268 | 0x00404acf pop rbx | 0x00404ad0 pop r12 | 0x00404ad2 pop r13 | 0x00404ad4 pop r14 | 0x00404ad6 pop r15 | 0x00404ad8 pop rbp | 0x00404ad9 ret | return rax; | }