; assembly | /* r2dec pseudo code output */ | /* bslalg_rbtreeutil.t/none @ 0x40ea40 */ | #include | ; (fcn) sym.void_gg_IntNode__void____IntNode__int___BloombergLP::bslalg::RbTreeAnchor__Array_IntNode__bsl::allocator_IntNode_____char_const__void___const__IntNode__int__ () | int64_t void_gg_IntNode_void_IntNode_int_BloombergLP::bslalg::RbTreeAnchor_Array_IntNode_bsl::allocator_IntNode_char_const_void_const_IntNode_int_ (uint32_t arg4, int64_t arg3, uint32_t arg2, uint32_t arg1) { | uint32_t var_8h; | int64_t var_10h; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* void gg(BloombergLP::bslalg::RbTreeAnchor*, Array >*, char const*, void (* const&)(IntNode*, int)) */ 0x0040ea40 push rbp | 0x0040ea41 push r15 | 0x0040ea43 push r14 | 0x0040ea45 push r13 | 0x0040ea47 push r12 | 0x0040ea49 push rbx | 0x0040ea4a sub rsp, 0x18 | 0x0040ea4e mov r12, rdx | r12 = rdx; 0x0040ea51 mov r14, rsi | r14 = rsi; 0x0040ea54 mov r15, rdi | r15 = rdi; 0x0040ea57 xor ebp, ebp | ebp = 0; 0x0040ea59 mov rax, rdx | rax = rdx; 0x0040ea5c jmp 0x40ea65 | | while (dl == 0x3a) { 0x0040ea60 inc ebp | ebp++; | label_0: 0x0040ea62 inc rax | rax++; 0x0040ea65 movzx edx, byte [rax] | edx = *(rax); 0x0040ea68 cmp dl, 0x3a | 0x0040ea6b je 0x40ea60 | | } 0x0040ea6d test dl, dl | | if (dl != 0) { 0x0040ea6f jne 0x40ea62 | goto label_0; | } 0x0040ea71 test ebp, ebp | | if (ebp == 0) { 0x0040ea73 je 0x40eb0a | goto label_1; | } 0x0040ea79 mov qword [rsp + 8], rcx | *((rsp + 8)) = rcx; 0x0040ea7e mov rsi, qword [r14] | rsi = *(r14); 0x0040ea81 test rsi, rsi | | if (rsi != 0) { 0x0040ea84 je 0x40ea98 | 0x0040ea86 mov rdi, qword [r14 + 0x10] | rdi = *((r14 + 0x10)); 0x0040ea8a mov rax, qword [rdi] | rax = *(rdi); 0x0040ea8d call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x0040ea90 mov dword [r14 + 8], 0 | *((r14 + 8)) = 0; | } 0x0040ea98 movsxd r13, ebp | r13 = (int64_t) ebp; 0x0040ea9b mov rdi, qword [r14 + 0x10] | rdi = *((r14 + 0x10)); 0x0040ea9f shl r13, 5 | r13 <<= 5; 0x0040eaa3 mov rax, qword [rdi] | rax = *(rdi); 0x0040eaa6 mov rsi, r13 | rsi = r13; 0x0040eaa9 call qword [rax + 0x10] | rax = uint64_t (*rax + 0x10)() (); 0x0040eaac mov qword [r14], rax | *(r14) = rax; 0x0040eaaf xorps xmm0, xmm0 | __asm ("xorps xmm0, xmm0"); 0x0040eab2 movups xmmword [rax], xmm0 | __asm ("movups xmmword [rax], xmm0"); 0x0040eab5 movups xmmword [rax + 0x10], xmm0 | __asm ("movups xmmword [rax + 0x10], xmm0"); 0x0040eab9 mov esi, 0x20 | 0x0040eabe mov rdi, rax | 0x0040eac1 mov rdx, r13 | 0x0040eac4 call 0x48fcb0 | BloombergLP::bslalg::ArrayPrimitives_Imp::bitwiseFillN(char*,unsigned long,unsigned long) (rax, 0x20, r13); 0x0040eac9 mov dword [r14 + 8], ebp | *((r14 + 8)) = ebp; 0x0040eacd mov bl, byte [r12] | bl = *(r12); 0x0040ead1 test bl, bl | | if (bl == 0) { 0x0040ead3 je 0x40eb4e | goto label_2; | } 0x0040ead5 call 0x401d10 | rax = ctype_b_loc (); 0x0040eada mov rax, qword [rax] | rax = *(rax); 0x0040eadd mov rdx, qword [rsp + 8] | rdx = *((rsp + 8)); 0x0040eae2 nop word cs:[rax + rax] | 0x0040eaec nop dword [rax] | | do { 0x0040eaf0 movsx rcx, bl | rcx = (int64_t) bl; 0x0040eaf4 test byte [rax + rcx*2 + 1], 0x20 | | if ((*((rax + rcx*2 + 1)) & 0x20) == 0) { 0x0040eaf9 je 0x40eb53 | goto label_3; | } 0x0040eafb movzx ebx, byte [r12 + 1] | ebx = *((r12 + 1)); 0x0040eb01 inc r12 | r12++; 0x0040eb04 test bl, bl | 0x0040eb06 jne 0x40eaf0 | | } while (bl != 0); 0x0040eb08 jmp 0x40eb53 | goto label_3; | label_1: 0x0040eb0a mov bl, byte [r12] | bl = *(r12); 0x0040eb0e test bl, bl | | if (bl == 0) { 0x0040eb10 je 0x40ec55 | goto label_4; | } 0x0040eb16 call 0x401d10 | rax = ctype_b_loc (); 0x0040eb1b mov rax, qword [rax] | rax = *(rax); 0x0040eb1e lea rcx, [r12 + 1] | rcx = r12 + 1; 0x0040eb23 nop word cs:[rax + rax] | 0x0040eb2d nop dword [rax] | | do { 0x0040eb30 movsx rdx, bl | rdx = (int64_t) bl; 0x0040eb34 test byte [rax + rdx*2 + 1], 0x20 | | if ((*((rax + rdx*2 + 1)) & 0x20) == 0) { 0x0040eb39 je 0x40ec50 | goto label_5; | } 0x0040eb3f movzx ebx, byte [rcx] | ebx = *(rcx); 0x0040eb42 inc rcx | rcx++; 0x0040eb45 test bl, bl | 0x0040eb47 jne 0x40eb30 | | } while (bl != 0); 0x0040eb49 jmp 0x40ec55 | goto label_4; | label_2: 0x0040eb4e mov rdx, qword [rsp + 8] | rdx = *((rsp + 8)); | label_3: 0x0040eb53 mov rax, qword [r14] | rax = *(r14); 0x0040eb56 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x0040eb5b lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0040eb60 mov rsi, r12 | rsi = r12; 0x0040eb63 call 0x487ae0 | rax = char const*ggParseNode(IntNode**,char const*,void(*const&)(IntNode*,int)) (); 0x0040eb68 mov bl, byte [rax] | bl = *(rax); 0x0040eb6a test bl, bl | | if (bl == 0) { 0x0040eb6c je 0x40eba6 | goto label_6; | } 0x0040eb6e mov r12, rax | r12 = rax; 0x0040eb71 call 0x401d10 | rax = ctype_b_loc (); 0x0040eb76 mov rax, qword [rax] | rax = *(rax); 0x0040eb79 mov rcx, r12 | rcx = r12; 0x0040eb7c inc rcx | rcx++; 0x0040eb7f nop | | do { 0x0040eb80 movsx rdx, bl | rdx = (int64_t) bl; 0x0040eb84 test byte [rax + rdx*2 + 1], 0x20 | | if ((*((rax + rdx*2 + 1)) & 0x20) == 0) { 0x0040eb89 je 0x40eb97 | goto label_7; | } 0x0040eb8b movzx ebx, byte [rcx] | ebx = *(rcx); 0x0040eb8e inc rcx | rcx++; 0x0040eb91 test bl, bl | 0x0040eb93 jne 0x40eb80 | | } while (bl != 0); 0x0040eb95 jmp 0x40eba6 | goto label_6; | label_7: 0x0040eb97 mov edi, 0x497905 | 0x0040eb9c mov rsi, r12 | rsi = r12; 0x0040eb9f xor eax, eax | eax = 0; 0x0040eba1 call 0x401b60 | printf ("Parse error !*ltrim(spec): %s\n"); | label_6: 0x0040eba6 mov rbx, qword [r14] | rbx = *(r14); 0x0040eba9 mov rdi, rbx | 0x0040ebac call 0x490930 | rax = BloombergLP::bslalg::RbTreeUtil::leftmost(BloombergLP::bslalg::RbTreeNodeconst*) (*(r14)); 0x0040ebb1 mov qword [r15 + 8], rbx | *((r15 + 8)) = rbx; 0x0040ebb5 mov qword [r15 + 0x10], rax | *((r15 + 0x10)) = rax; 0x0040ebb9 mov dword [r15 + 0x18], ebp | *((r15 + 0x18)) = ebp; 0x0040ebbd mov rax, qword [rbx] | rax = *(rbx); 0x0040ebc0 and eax, 1 | eax &= 1; 0x0040ebc3 or rax, r15 | rax |= r15; 0x0040ebc6 mov qword [rbx], rax | *(rbx) = rax; 0x0040ebc9 mov rdi, qword [r15 + 8] | rdi = *((r15 + 8)); 0x0040ebcd mov rbx, qword [r15 + 0x10] | rbx = *((r15 + 0x10)); 0x0040ebd1 test rdi, rdi | | if (rdi != 0) { 0x0040ebd4 je 0x40ebf7 | 0x0040ebd6 call 0x490930 | rax = BloombergLP::bslalg::RbTreeUtil::leftmost(BloombergLP::bslalg::RbTreeNodeconst*) (rdi); 0x0040ebdb cmp rbx, rax | | if (rbx != rax) { 0x0040ebde jne 0x40ec25 | goto label_8; | } 0x0040ebe0 mov rax, qword [r15 + 8] | rax = *((r15 + 8)); 0x0040ebe4 test rax, rax | | if (rax == 0) { 0x0040ebe7 je 0x40ebfc | goto label_9; | } 0x0040ebe9 mov rax, qword [rax] | rax = *(rax); 0x0040ebec and rax, 0xfffffffffffffffe | rax &= 0xfffffffffffffffe; 0x0040ebf0 cmp r15, rax | | if (r15 != rax) { 0x0040ebf3 jne 0x40ec25 | goto label_8; | } 0x0040ebf5 jmp 0x40ebfc | | } else { 0x0040ebf7 cmp rbx, r15 | | if (rbx != r15) { 0x0040ebfa jne 0x40ec25 | goto label_8; | } | } | label_9: 0x0040ebfc mov rax, qword [r15 + 0x10] | rax = *((r15 + 0x10)); 0x0040ec00 xor ebx, ebx | ebx = 0; 0x0040ec02 cmp r15, rax | | if (r15 == rax) { 0x0040ec05 je 0x40ec1f | goto label_10; | } 0x0040ec07 nop word [rax + rax] | | do { 0x0040ec10 inc ebx | ebx++; 0x0040ec12 mov rdi, rax | 0x0040ec15 call 0x490950 | rax = BloombergLP::bslalg::RbTreeUtil::next(BloombergLP::bslalg::RbTreeNodeconst*) (rax); 0x0040ec1a cmp r15, rax | 0x0040ec1d jne 0x40ec10 | | } while (r15 != rax); | label_10: 0x0040ec1f cmp ebx, dword [r15 + 0x18] | | if (ebx != *((r15 + 0x18))) { 0x0040ec23 je 0x40ec78 | | label_8: 0x0040ec25 mov edi, 0x497858 | 0x0040ec2a mov edx, 0x497924 | edx = "isWellFormedAnchor(*tree)"; 0x0040ec2f mov esi, 0x6d9 | esi = 0x6d9; 0x0040ec34 xor eax, eax | eax = 0; 0x0040ec36 call 0x401b60 | printf ("Error /home/parsa/experiments/assumptions/crush/ccm-none/groups/bsl/bslalg/bslalg_rbtreeutil.t.cpp(%d): %s (failed)\n"); 0x0040ec3b mov eax, dword [rip + 0x299e07] | eax = (anonymous namespace)::testStatus; 0x0040ec41 cmp eax, 0x64 | | if (eax > 0x64) { 0x0040ec44 ja 0x40ec78 | goto label_11; | } 0x0040ec46 inc eax | eax++; 0x0040ec48 mov dword [rip + 0x299dfa], eax | *(obj._anonymous_namespace_::testStatus) = eax; 0x0040ec4e jmp 0x40ec78 | goto label_11; | label_5: 0x0040ec50 cmp bl, 0x2e | | if (bl != 0x2e) { 0x0040ec53 je 0x40ec64 | | label_4: 0x0040ec55 mov edi, 0x4978e0 | 0x0040ec5a mov rsi, r12 | rsi = r12; 0x0040ec5d xor eax, eax | eax = 0; 0x0040ec5f call 0x401b60 | printf ("Parse error '.' == *ltrim(spec): %s\n"); | } 0x0040ec64 mov qword [r15 + 8], 0 | *((r15 + 8)) = 0; 0x0040ec6c mov qword [r15 + 0x10], r15 | *((r15 + 0x10)) = r15; 0x0040ec70 mov dword [r15 + 0x18], 0 | *((r15 + 0x18)) = 0; | } | label_11: 0x0040ec78 add rsp, 0x18 | 0x0040ec7c pop rbx | 0x0040ec7d pop r12 | 0x0040ec7f pop r13 | 0x0040ec81 pop r14 | 0x0040ec83 pop r15 | 0x0040ec85 pop rbp | 0x0040ec86 ret | return rax; | }