; assembly | /* r2dec pseudo code output */ | /* bslalg_rbtreeutil.t/assume @ 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 r15, rsi | r15 = rsi; 0x0040ea54 mov r14, rdi | r14 = 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 [r15] | rsi = *(r15); 0x0040ea81 test rsi, rsi | | if (rsi != 0) { 0x0040ea84 je 0x40ea98 | 0x0040ea86 mov rdi, qword [r15 + 0x10] | rdi = *((r15 + 0x10)); 0x0040ea8a mov rax, qword [rdi] | rax = *(rdi); 0x0040ea8d call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); 0x0040ea90 mov dword [r15 + 8], 0 | *((r15 + 8)) = 0; | } 0x0040ea98 movsxd r13, ebp | r13 = (int64_t) ebp; 0x0040ea9b mov rdi, qword [r15 + 0x10] | rdi = *((r15 + 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 [r15], rax | *(r15) = 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 0x48fa20 | BloombergLP::bslalg::ArrayPrimitives_Imp::bitwiseFillN(char*,unsigned long,unsigned long) (rax, 0x20, r13); 0x0040eac9 mov dword [r15 + 8], ebp | *((r15 + 8)) = ebp; 0x0040eacd mov bl, byte [r12] | bl = *(r12); 0x0040ead1 test bl, bl | | if (bl == 0) { 0x0040ead3 je 0x40eb6c | goto label_2; | } 0x0040ead9 call 0x401d10 | rax = ctype_b_loc (); 0x0040eade mov rax, qword [rax] | rax = *(rax); 0x0040eae1 mov rdx, qword [rsp + 8] | rdx = *((rsp + 8)); 0x0040eae6 nop word cs:[rax + 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 0x40eb71 | 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 0x40eb71 | goto label_3; | label_1: 0x0040eb0a mov bl, byte [r12] | bl = *(r12); 0x0040eb0e test bl, bl | | if (bl == 0) { 0x0040eb10 je 0x40ec6d | 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 0x40eb4a | goto label_5; | } 0x0040eb3b movzx ebx, byte [rcx] | ebx = *(rcx); 0x0040eb3e inc rcx | rcx++; 0x0040eb41 test bl, bl | 0x0040eb43 jne 0x40eb30 | | } while (bl != 0); 0x0040eb45 jmp 0x40ec6d | goto label_4; | label_5: 0x0040eb4a cmp bl, 0x2e | | if (bl != 0x2e) { 0x0040eb4d jne 0x40ec6d | goto label_4; | } 0x0040eb53 mov qword [r14 + 8], 0 | *((r14 + 8)) = 0; 0x0040eb5b mov qword [r14 + 0x10], r14 | *((r14 + 0x10)) = r14; 0x0040eb5f mov dword [r14 + 0x18], 0 | *((r14 + 0x18)) = 0; 0x0040eb67 jmp 0x40ec5e | goto label_6; | label_2: 0x0040eb6c mov rdx, qword [rsp + 8] | rdx = *((rsp + 8)); | label_3: 0x0040eb71 mov rax, qword [r15] | rax = *(r15); 0x0040eb74 mov qword [rsp + 0x10], rax | *((rsp + 0x10)) = rax; 0x0040eb79 lea rdi, [rsp + 0x10] | rdi = rsp + 0x10; 0x0040eb7e mov rsi, r12 | rsi = r12; 0x0040eb81 call 0x487af0 | rax = char const*ggParseNode(IntNode**,char const*,void(*const&)(IntNode*,int)) (); 0x0040eb86 mov bl, byte [rax] | bl = *(rax); 0x0040eb88 test bl, bl | | if (bl == 0) { 0x0040eb8a je 0x40ebb9 | goto label_7; | } 0x0040eb8c mov r12, rax | r12 = rax; 0x0040eb8f call 0x401d10 | rax = ctype_b_loc (); 0x0040eb94 mov rax, qword [rax] | rax = *(rax); 0x0040eb97 mov rcx, r12 | rcx = r12; 0x0040eb9a inc rcx | rcx++; 0x0040eb9d nop dword [rax] | | do { 0x0040eba0 movsx rdx, bl | rdx = (int64_t) bl; 0x0040eba4 test byte [rax + rdx*2 + 1], 0x20 | | if ((*((rax + rdx*2 + 1)) & 0x20) == 0) { 0x0040eba9 je 0x40ec74 | goto label_8; | } 0x0040ebaf movzx ebx, byte [rcx] | ebx = *(rcx); 0x0040ebb2 inc rcx | rcx++; 0x0040ebb5 test bl, bl | 0x0040ebb7 jne 0x40eba0 | | } while (bl != 0); | label_7: 0x0040ebb9 mov rbx, qword [r15] | rbx = *(r15); 0x0040ebbc mov rdi, rbx | 0x0040ebbf call 0x490660 | rax = BloombergLP::bslalg::RbTreeUtil::leftmost(BloombergLP::bslalg::RbTreeNodeconst*) (*(r15)); 0x0040ebc4 mov qword [r14 + 8], rbx | *((r14 + 8)) = rbx; 0x0040ebc8 mov qword [r14 + 0x10], rax | *((r14 + 0x10)) = rax; 0x0040ebcc mov dword [r14 + 0x18], ebp | *((r14 + 0x18)) = ebp; 0x0040ebd0 mov rax, qword [rbx] | rax = *(rbx); 0x0040ebd3 and eax, 1 | eax &= 1; 0x0040ebd6 or rax, r14 | rax |= r14; 0x0040ebd9 mov qword [rbx], rax | *(rbx) = rax; 0x0040ebdc mov rdi, qword [r14 + 8] | rdi = *((r14 + 8)); 0x0040ebe0 mov rbx, qword [r14 + 0x10] | rbx = *((r14 + 0x10)); 0x0040ebe4 test rdi, rdi | | if (rdi != 0) { 0x0040ebe7 je 0x40ec0a | 0x0040ebe9 call 0x490660 | rax = BloombergLP::bslalg::RbTreeUtil::leftmost(BloombergLP::bslalg::RbTreeNodeconst*) (rdi); 0x0040ebee cmp rbx, rax | | if (rbx != rax) { 0x0040ebf1 jne 0x40ec35 | goto label_9; | } 0x0040ebf3 mov rax, qword [r14 + 8] | rax = *((r14 + 8)); 0x0040ebf7 test rax, rax | | if (rax == 0) { 0x0040ebfa je 0x40ec0f | goto label_10; | } 0x0040ebfc mov rax, qword [rax] | rax = *(rax); 0x0040ebff and rax, 0xfffffffffffffffe | rax &= 0xfffffffffffffffe; 0x0040ec03 cmp r14, rax | | if (r14 != rax) { 0x0040ec06 jne 0x40ec35 | goto label_9; | } 0x0040ec08 jmp 0x40ec0f | | } else { 0x0040ec0a cmp rbx, r14 | | if (rbx != r14) { 0x0040ec0d jne 0x40ec35 | goto label_9; | } | } | label_10: 0x0040ec0f mov rax, qword [r14 + 0x10] | rax = *((r14 + 0x10)); 0x0040ec13 xor ebx, ebx | ebx = 0; 0x0040ec15 cmp r14, rax | | if (r14 == rax) { 0x0040ec18 je 0x40ec2f | goto label_11; | } 0x0040ec1a nop word [rax + rax] | | do { 0x0040ec20 inc ebx | ebx++; 0x0040ec22 mov rdi, rax | 0x0040ec25 call 0x490680 | rax = BloombergLP::bslalg::RbTreeUtil::next(BloombergLP::bslalg::RbTreeNodeconst*) (rax); 0x0040ec2a cmp r14, rax | 0x0040ec2d jne 0x40ec20 | | } while (r14 != rax); | label_11: 0x0040ec2f cmp ebx, dword [r14 + 0x18] | | if (ebx != *((r14 + 0x18))) { 0x0040ec33 je 0x40ec5e | | label_9: 0x0040ec35 mov edi, 0x49757c | 0x0040ec3a mov edx, 0x49764a | edx = "isWellFormedAnchor(*tree)"; 0x0040ec3f mov esi, 0x6d9 | esi = 0x6d9; 0x0040ec44 xor eax, eax | eax = 0; 0x0040ec46 call 0x401b60 | printf ("Error /home/parsa/experiments/assumptions/crush/ccm-assume/groups/bsl/bslalg/bslalg_rbtreeutil.t.cpp(%d): %s (failed)\n"); 0x0040ec4b mov eax, dword [rip + 0x299df7] | eax = (anonymous namespace)::testStatus; 0x0040ec51 cmp eax, 0x64 | | if (eax > 0x64) { 0x0040ec54 ja 0x40ec5e | goto label_6; | } 0x0040ec56 inc eax | eax++; 0x0040ec58 mov dword [rip + 0x299dea], eax | *(obj._anonymous_namespace_::testStatus) = eax; | } | label_6: 0x0040ec5e add rsp, 0x18 | 0x0040ec62 pop rbx | 0x0040ec63 pop r12 | 0x0040ec65 pop r13 | 0x0040ec67 pop r14 | 0x0040ec69 pop r15 | 0x0040ec6b pop rbp | 0x0040ec6c ret | return rax; | label_4: 0x0040ec6d mov edi, 0x497606 | edi = "Parse error '.' == *ltrim(spec): %s\n"; 0x0040ec72 jmp 0x40ec79 | goto label_12; | label_8: 0x0040ec74 mov edi, 0x49762b | | label_12: 0x0040ec79 mov rsi, r12 | rsi = r12; 0x0040ec7c xor eax, eax | eax = 0; 0x0040ec7e call 0x401b60 | rax = printf ("Parse error !*ltrim(spec): %s\n"); 0x0040ec83 nop word cs:[rax + rax] | 0x0040ec8d nop dword [rax] | | }