; assembly | /* r2dec pseudo code output */ | /* balm_metricsample.t/assume @ 0x404640 */ | #include | ; (fcn) sym.gg_bsl::vector_BloombergLP::balm::MetricSampleGroup__bsl::allocator_BloombergLP::balm::MetricSampleGroup_____char_const__bsl::vector_BloombergLP::balm::MetricRecord__bsl::allocator_BloombergLP::balm::MetricRecord____const_ () | uint64_t gg_bsl::vector_BloombergLP::balm::MetricSampleGroup_bsl::allocator_BloombergLP::balm::MetricSampleGroup_char_const_bsl::vector_BloombergLP::balm::MetricRecord_bsl::allocator_BloombergLP::balm::MetricRecord_const_ (int64_t arg3, int64_t arg2, char * arg1) { | int64_t var_8h; | char * var_10h; | int64_t var_18h; | int64_t var_20h_2; | int64_t var_28h_2; | int64_t var_30h_2; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* gg(bsl::vector >*, char const*, bsl::vector > const&) */ 0x00404640 push rbp | 0x00404641 push r15 | 0x00404643 push r14 | 0x00404645 push r13 | 0x00404647 push r12 | 0x00404649 push rbx | 0x0040464a sub rsp, 0x38 | 0x0040464e mov qword [rsp + 0x10], rdi | *((rsp + 0x10)) = rdi; 0x00404653 mov al, byte [rsi] | al = *(rsi); 0x00404655 test al, al | | if (al == 0) { 0x00404657 je 0x4047c3 | goto label_0; | } 0x0040465d mov r14, rsi | r14 = rsi; 0x00404660 mov qword [rsp + 8], rdx | *((rsp + 8)) = rdx; 0x00404665 mov r12, qword [rdx] | r12 = *(rdx); 0x00404668 xor r13d, r13d | r13d = 0; 0x0040466b mov r15, rsi | r15 = rsi; 0x0040466e mov qword [rsp], r12 | *(rsp) = r12; 0x00404672 nop word cs:[rax + rax] | 0x0040467c nop dword [rax] | | do { 0x00404680 lea ecx, [rax + 3] | ecx = rax + 3; 0x00404683 cmp cl, 2 | | if (cl >= 2) { 0x00404686 jb 0x404693 | 0x00404688 cmp byte [r15 + 1], 0 | | if (*((r15 + 1)) != 0) { 0x0040468d jne 0x404720 | goto label_1; | } | } 0x00404693 mov edi, 0x672c28 | 0x00404698 mov esi, 0x43f5af | 0x0040469d mov edx, 0x27 | 0x004046a2 call 0x4128d0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (obj.std::__1::cout, "Invalid termination for specification: ", 0x27); 0x004046a7 mov rbx, rax | rbx = rax; 0x004046aa mov rdi, r14 | 0x004046ad call 0x403de0 | rax = strlen (r14); 0x004046b2 mov rdi, rbx | 0x004046b5 mov rbp, r14 | 0x004046b8 mov rsi, r14 | 0x004046bb mov rdx, rax | 0x004046be call 0x4128d0 | rax = std::_1::basic_ostream>&std::_1::_put_character_sequence>(std::_1::basic_ostream>&,char const*,unsigned long) (rbx, r14, rax); 0x004046c3 mov rbx, rax | rbx = rax; 0x004046c6 mov rax, qword [rax] | rax = *(rax); 0x004046c9 mov rsi, qword [rax - 0x18] | rsi = *((rax - 0x18)); 0x004046cd add rsi, rbx | rsi += rbx; 0x004046d0 lea r14, [rsp + 0x18] | r14 = rsp + 0x18; 0x004046d5 mov rdi, r14 | rdi = r14; 0x004046d8 call 0x404050 | std::_1::ios_base::getloc()const (); 0x004046dd mov esi, 0x672b70 | esi = obj.std::__1::ctype_char_::id; 0x004046e2 mov rdi, r14 | rdi = r14; 0x004046e5 call 0x4040e0 | rax = std::_1::locale::use_facet(std::_1::locale::id&)const (); 0x004046ea mov rcx, qword [rax] | rcx = *(rax); 0x004046ed mov rdi, rax | rdi = rax; 0x004046f0 mov esi, 0xa | esi = 0xa; 0x004046f5 call qword [rcx + 0x38] | eax = uint64_t (*rcx + 0x38)() (); 0x004046f8 mov r14d, eax | r14d = eax; 0x004046fb lea rdi, [rsp + 0x18] | rdi = rsp + 0x18; 0x00404700 call 0x404160 | std::_1::locale::~locale() (); 0x00404705 movsx esi, r14b | esi = (int32_t) r14b; 0x00404709 mov rdi, rbx | rdi = rbx; 0x0040470c call 0x403e80 | std::_1::basic_ostream>::put(char) (); 0x00404711 mov rdi, rbx | rdi = rbx; 0x00404714 call 0x404010 | std::_1::basic_ostream>::flush() (); 0x00404719 movzx eax, byte [r15] | eax = *(r15); 0x0040471d mov r14, rbp | r14 = rbp; | label_1: 0x00404720 cmp al, 0x52 | | if (al != 0x52) { 0x00404722 jne 0x4047d8 | goto label_2; | } 0x00404728 movsx rbx, byte [r15 + 1] | rbx = *((r15 + 1)); 0x0040472d lea eax, [rbx - 0x30] | eax = rbx - 0x30; 0x00404730 cmp al, 0xa | | if (al >= 0xa) { 0x00404732 jae 0x4047f9 | goto label_3; | } 0x00404738 cmp byte [r15 + 2], 0x45 | | if (*((r15 + 2)) != 0x45) { 0x0040473d jne 0x404805 | goto label_4; | } 0x00404743 movzx eax, byte [r15 + 3] | eax = *((r15 + 3)); 0x00404748 lea ecx, [rax - 0x30] | ecx = rax - 0x30; 0x0040474b cmp cl, 0xa | | if (cl >= 0xa) { 0x0040474e jae 0x404826 | goto label_5; | } 0x00404754 add rbx, 0xffffffffffffffd0 | rbx += 0xffffffffffffffd0; 0x00404758 mov rdx, qword [rsp + 8] | rdx = *((rsp + 8)); 0x0040475d mov rcx, qword [rdx + 8] | rcx = *((rdx + 8)); 0x00404761 sub rcx, qword [rdx] | rcx -= *(rdx); 0x00404764 add rax, 0xffffffffffffffd0 | rax += 0xffffffffffffffd0; 0x00404768 mov rsi, qword [rsp] | rsi = *(rsp); 0x0040476c add rcx, rsi | rcx += rsi; 0x0040476f mov rdx, rbx | rdx = rbx; 0x00404772 shl rdx, 3 | rdx <<= 3; 0x00404776 lea rbp, [rdx + rdx*4] | rbp = rdx * 5; 0x0040477a lea rdx, [r12 + rbp] | rdx = r12 + rbp; 0x0040477e cmp rcx, rdx | | if (rcx < rdx) { 0x00404781 cmovb r12, rsi | r12 = rsi; | } 0x00404785 mov qword [rsp + 0x18], r12 | *((rsp + 0x18)) = r12; 0x0040478a mov dword [rsp + 0x20], ebx | *((rsp + 0x20)) = ebx; 0x0040478e mov qword [rsp + 0x28], rax | *((rsp + 0x28)) = rax; 0x00404793 mov dword [rsp + 0x30], 0 | *((rsp + 0x30)) = 0; 0x0040479b mov rdi, qword [rsp + 0x10] | 0x004047a0 lea rsi, [rsp + 0x18] | 0x004047a5 call 0x411730 | bsl::vector>::push_back(BloombergLP::balm::MetricSampleGroup&&) (*((rsp + 0x10)), rsp + 0x18); 0x004047aa add r12, rbp | r12 += rbp; 0x004047ad add r13d, ebx | r13d += ebx; 0x004047b0 movzx eax, byte [r15 + 4] | eax = *((r15 + 4)); 0x004047b5 add r15, 4 | r15 += 4; 0x004047b9 test al, al | 0x004047bb jne 0x404680 | | } while (al != 0); 0x004047c1 jmp 0x4047c6 | goto label_6; | label_0: 0x004047c3 xor r13d, r13d | r13d = 0; | label_6: 0x004047c6 mov eax, r13d | eax = r13d; 0x004047c9 add rsp, 0x38 | 0x004047cd pop rbx | 0x004047ce pop r12 | 0x004047d0 pop r13 | 0x004047d2 pop r14 | 0x004047d4 pop r15 | 0x004047d6 pop rbp | 0x004047d7 ret | return rax; | label_2: 0x004047d8 mov edi, 0x672c28 | 0x004047dd mov esi, 0x43f5d7 | 0x004047e2 call 0x411660 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (obj.std::__1::cout, "Unexpected char in specification: "); 0x004047e7 mov rdi, rax | 0x004047ea mov rsi, r14 | 0x004047ed call 0x411660 | std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (rax, r14); 0x004047f2 mov esi, 0x43f5fa | esi = " expecting: 'R' found: '; 0x004047f7 jmp 0x404845 | goto label_7; | label_3: 0x004047f9 mov edi, 0x672c28 | edi = std::__1::cout; 0x004047fe mov esi, 0x43f616 | esi = "Invalid number of records in specification: "; 0x00404803 jmp 0x404830 | goto label_8; | label_4: 0x00404805 mov edi, 0x672c28 | 0x0040480a mov esi, 0x43f5d7 | 0x0040480f call 0x411660 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (obj.std::__1::cout, "Unexpected char in specification: "); 0x00404814 mov rdi, rax | 0x00404817 mov rsi, r14 | 0x0040481a call 0x411660 | std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (rax, r14); 0x0040481f mov esi, 0x43f643 | esi = " expecting: 'E' found: '; 0x00404824 jmp 0x404845 | goto label_7; | label_5: 0x00404826 mov edi, 0x672c28 | 0x0040482b mov esi, 0x43f65f | | label_8: 0x00404830 call 0x411660 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (obj.std::__1::cout, "Invalid elapsed time in specification: "); 0x00404835 mov rdi, rax | 0x00404838 mov rsi, r14 | 0x0040483b call 0x411660 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (rax, r14); 0x00404840 mov esi, 0x43f654 | | label_7: 0x00404845 mov rdi, rax | 0x00404848 call 0x411660 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (rax, 0x43f654); 0x0040484d movsx esi, byte [r15] | esi = *(r15); 0x00404851 mov rdi, rax | rdi = rax; 0x00404854 call 0x411690 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char) (); 0x00404859 mov esi, 0x43f65d | 0x0040485e mov rdi, rax | 0x00404861 call 0x411660 | rax = std::_1::basic_ostream>&std::_1::operator << >(std::_1::basic_ostream>&,char const*) (rax, 0x43f65d); 0x00404866 mov rdi, rax | 0x00404869 call 0x4116b0 | rax = std::_1::basic_ostream>&std::_1::endl>(std::_1::basic_ostream>&) (rax); 0x0040486e mov rbx, rax | rbx = rax; 0x00404871 lea rdi, [rsp + 0x18] | rdi = rsp + 0x18; 0x00404876 call 0x404160 | std::_1::locale::~locale() (); 0x0040487b mov rdi, rbx | rdi = rbx; 0x0040487e call 0x404220 | rax = Unwind_Resume (); 0x00404883 nop word cs:[rax + rax] | 0x0040488d nop dword [rax] | | }