; assembly | /* r2dec pseudo code output */ | /* ball_observeradapter.t/none @ 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 + 0x25f5e4] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0040464c test rax, rax | | if (rax == 0) { 0x0040464f jne 0x404656 | 0x00404651 call 0x40c670 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x00404656 mov qword [rsp + 0x78], rax | *((rsp + 0x78)) = rax; 0x0040465b mov qword [rsp + 0x1d0], 0x662cb8 | *((rsp + 0x1d0)) = 0x662cb8; 0x00404667 lea rbx, [rsp + 0x150] | rbx = rsp + 0x150; 0x0040466f lea rdx, [rsp + 0x78] | 0x00404674 mov rdi, rbx | 0x00404677 mov esi, 0x10 | 0x0040467c call 0x406750 | bsl::basic_stringbuf,bsl::allocator>::basic_stringbuf(unsignedint,bsl::allocatorconst&) (rbx, 0x10, rsp + 0x78); 0x00404681 mov qword [rsp + 0x148], 0x4331b8 | *((rsp + sym.imp.std::__1::basic_ostream_char__std::__1::char_traits_char___::basic_ostream__)) = 0x4331b8; 0x0040468d lea rdi, [rsp + 0x1d0] | rdi = rsp + 0x1d0; 0x00404695 mov qword [rsp + 0x1d0], 0x4331e0 | *((rsp + sym.imp.virtual_thunk_to_std::__1::basic_ostream_char__std::__1::char_traits_char___::basic_ostream__)) = 0x4331e0; 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], 0x433148 | *((rsp + sym.bsl::basic_ostringstream_char__std::__1::char_traits_char___bsl::allocator_char___::basic_ostringstream__)) = 0x433148; 0x004046cc mov qword [rsp + 0x1d0], 0x433170 | *((rsp + method.virtual_thunk_to_bsl::basic_ostringstream_char__std::__1::char_traits_char___bsl::allocator_char___.basic_ostringstream__)) = 0x433170; 0x004046d8 mov qword [rsp + 0x30], 0x4330c8 | *((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 0x407330 | BloombergLP::ball::RecordAttributes::RecordAttributes(BloombergLP::bslma::Allocator*) (rsp + 0x78, 0); 0x004046fa mov rax, qword [rip + 0x25f52f] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x00404701 test rax, rax | | if (rax == 0) { 0x00404704 jne 0x40470b | 0x00404706 call 0x40c670 | 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 r12, [rsp + 0x40] | r12 = 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_4; | } 0x0040474d call 0x409e80 | rax = BloombergLP::bdlt::DatetimeImpUtil::epoch_1970_01_01() (); 0x00404752 mov rbp, rax | 0x00404755 mov rax, qword [rip + 0x25ef14] | rax = BloombergLP::bdlt::CurrentTime::s_currenttimeCallback_p; 0x0040475c call rax | rax = void (*rax)() (); 0x0040475e mov r15, rax | r15 = 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_5; | } | 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, r15, 0xf4240 | rdx = r15 * 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 + 0x25f401] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0040482f test rax, rax | | if (rax == 0) { 0x00404832 jne 0x404839 | 0x00404834 call 0x40c670 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x00404839 mov rdi, r12 | 0x0040483c mov rsi, rax | 0x0040483f lea rdx, [rsp + 0x78] | 0x00404844 lea rcx, [rsp + 0x10] | 0x00404849 call 0x405410 | voidbsl::shared_ptr::createInplace(BloombergLP::bslma::Allocator*,BloombergLP::ball::RecordAttributes&,BloombergLP::ball::UserFields&) (r12, 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, r12 | rsi = r12; 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 0x40c7b0 | BloombergLP::bslma::SharedPtrRep::releaseRef() (rdi); 0x00404888 jmp 0x404740 | goto label_0; | label_5: 0x0040488d mov edi, 0x663c18 | 0x00404892 call 0x40d830 | 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], 0x432f7b | *((rsp + 0x40)) = "detected invalid 'bdlt::Datetime'; see TEAM 579660115"; 0x004048a0 mov qword [rsp + 0x48], 0x432fb1 | *((rsp + 0x48)) = "/home/parsa/experiments/assumptions/crush/ccm-none/groups/bdl/bdlt/bdlt_datetime.h"; 0x004048a9 mov dword [rsp + 0x50], 0x466 | *((rsp + 0x50)) = 0x466; 0x004048b1 mov qword [rsp + 0x58], 0x44b1d1 | *((rsp + 0x58)) = "R-INV"; 0x004048ba mov dword [rsp + 0x60], eax | *((rsp + 0x60)) = eax; 0x004048be mov rdi, r12 | rdi = r12; 0x004048c1 call 0x40d850 | 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_4: 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 0x406f00 | bsl::basic_stringbuf,bsl::allocator>::str()const (rsp + 0x40, rsp + 0x150); 0x0040491a lea rsi, [rsp + 0x40] | 0x0040491f mov edi, 0x663b68 | 0x00404924 call 0x4054d0 | 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, 0x663ab0 | 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_6; | } 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] | uint64_t (*rax + 0x18)() (); | } | label_6: 0x0040498f mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); 0x00404994 test rbx, rbx | | if (rbx == 0) { 0x00404997 je 0x404a17 | goto label_7; | } 0x00404999 mov rbp, qword [rsp + 0x18] | rbp = *((rsp + 0x18)); 0x0040499e cmp rbx, rbp | | if (rbx != rbp) { 0x004049a1 jne 0x4049c8 | goto label_8; | } 0x004049a3 jmp 0x404a09 | goto label_9; | label_3: 0x004049b0 mov qword [rbx + 0x18], 0xffffffffffffffff | *((rbx + 0x18)) = 0xffffffffffffffff; | label_2: 0x004049b8 mov dword [rbx + 0x30], 0 | *((rbx + 0x30)) = 0; | do { 0x004049bf add rbx, 0x40 | rbx += 0x40; 0x004049c3 cmp rbp, rbx | | if (rbp == rbx) { 0x004049c6 je 0x404a04 | goto label_10; | } | label_8: 0x004049c8 mov eax, dword [rbx + 0x30] | eax = *((rbx + 0x30)); 0x004049cb test eax, eax | 0x004049cd je 0x4049bf | | } while (eax == 0); 0x004049cf cmp eax, 5 | | if (eax == 5) { 0x004049d2 je 0x4049f0 | goto label_11; | } 0x004049d4 cmp eax, 3 | | if (eax != 3) { 0x004049d7 jne 0x4049b8 | goto label_2; | } 0x004049d9 cmp qword [rbx + 0x20], 0x17 | | if (*((rbx + 0x20)) == 0x17) { 0x004049de je 0x4049b0 | goto label_3; | } 0x004049e0 mov rsi, qword [rbx] | rsi = *(rbx); 0x004049e3 mov rdi, qword [rbx + 0x28] | rdi = *((rbx + 0x28)); 0x004049e7 mov rax, qword [rdi] | rax = *(rdi); 0x004049ea call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x004049ed jmp 0x4049b0 | goto label_3; | label_11: 0x004049f0 mov rsi, qword [rbx] | rsi = *(rbx); 0x004049f3 test rsi, rsi | | if (rsi == 0) { 0x004049f6 je 0x4049b8 | goto label_2; | } 0x004049f8 mov rdi, qword [rbx + 0x18] | rdi = *((rbx + 0x18)); 0x004049fc mov rax, qword [rdi] | rax = *(rdi); 0x004049ff call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x00404a02 jmp 0x4049b8 | goto label_2; | label_10: 0x00404a04 mov rbx, qword [rsp + 0x10] | rbx = *((rsp + 0x10)); | label_9: 0x00404a09 mov rdi, qword [rsp + 0x28] | rdi = *((rsp + 0x28)); 0x00404a0e mov rax, qword [rdi] | rax = *(rdi); 0x00404a11 mov rsi, rbx | rsi = rbx; 0x00404a14 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | label_7: 0x00404a17 lea rbx, [rsp + 0x100] | rbx = rsp + 0x100; 0x00404a1f mov qword [rsp + 0x100], 0x4339b8 | *((rsp + method.BloombergLP::bdlsb::MemOutStreamBuf.MemOutStreamBuf__)) = 0x4339b8; 0x00404a2b mov rsi, qword [rsp + 0x128] | rsi = *((rsp + 0x128)); 0x00404a33 mov rdi, qword [rsp + 0x140] | rdi = *((rsp + 0x140)); 0x00404a3b mov rax, qword [rdi] | rax = *(rdi); 0x00404a3e call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x00404a41 mov rdi, rbx | rdi = rbx; 0x00404a44 call 0x403cd0 | std::_1::basic_streambuf>::~basic_streambuf() (); 0x00404a49 cmp qword [rsp + 0xe8], 0x17 | | if (*((rsp + 0xe8)) != 0x17) { 0x00404a52 je 0x404a6a | 0x00404a54 mov rsi, qword [rsp + 0xc8] | rsi = *((rsp + 0xc8)); 0x00404a5c mov rdi, qword [rsp + 0xf0] | rdi = *((rsp + 0xf0)); 0x00404a64 mov rax, qword [rdi] | rax = *(rdi); 0x00404a67 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x00404a6a mov qword [rsp + 0xe0], 0xffffffffffffffff | *((rsp + 0xe0)) = 0xffffffffffffffff; 0x00404a76 cmp qword [rsp + 0xb0], 0x17 | 0x00404a7f lea rbx, [rsp + 0x150] | rbx = rsp + 0x150; | if (*((rsp + 0xb0)) != 0x17) { 0x00404a87 je 0x404a9f | 0x00404a89 mov rsi, qword [rsp + 0x90] | rsi = *((rsp + 0x90)); 0x00404a91 mov rdi, qword [rsp + 0xb8] | rdi = *((rsp + 0xb8)); 0x00404a99 mov rax, qword [rdi] | rax = *(rdi); 0x00404a9c call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x00404a9f lea rdi, [rsp + 0x30] | 0x00404aa4 call 0x407310 | BloombergLP::ball::ObserverAdapter::~ObserverAdapter() (rsp + 0x30); 0x00404aa9 lea rdi, [rsp + 0x148] | rdi = rsp + 0x148; 0x00404ab1 mov esi, 0x433188 | esi = 0x433188; 0x00404ab6 call 0x4041b0 | std::_1::basic_ostream>::~basic_ostream() (); 0x00404abb mov qword [rsp + 0x150], 0x4332d8 | *((rsp + method.bsl::basic_stringbuf_char__std::__1::char_traits_char___bsl::allocator_char___.virtual_0)) = 0x4332d8; 0x00404ac7 cmp qword [rsp + 0x1b0], 0x17 | | if (*((rsp + 0x1b0)) != 0x17) { 0x00404ad0 je 0x404ae8 | 0x00404ad2 mov rsi, qword [rsp + 0x190] | rsi = *((rsp + 0x190)); 0x00404ada mov rdi, qword [rsp + 0x1b8] | rdi = *((rsp + 0x1b8)); 0x00404ae2 mov rax, qword [rdi] | rax = *(rdi); 0x00404ae5 call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x00404ae8 mov qword [rsp + 0x1a8], 0xffffffffffffffff | *((rsp + 0x1a8)) = 0xffffffffffffffff; 0x00404af4 mov rdi, rbx | rdi = rbx; 0x00404af7 call 0x403cd0 | std::_1::basic_streambuf>::~basic_streambuf() (); 0x00404afc lea rdi, [rsp + 0x1d0] | rdi = rsp + 0x1d0; 0x00404b04 call 0x403c00 | eax = std::_1::basic_ios>::~basic_ios() (); 0x00404b09 xor eax, eax | eax = 0; 0x00404b0b add rsp, 0x268 | 0x00404b12 pop rbx | 0x00404b13 pop r12 | 0x00404b15 pop r13 | 0x00404b17 pop r14 | 0x00404b19 pop r15 | 0x00404b1b pop rbp | 0x00404b1c ret | return rax; | }