// File: /workspace/github_c_makefile_star2_O0/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: rb_tree_remove
void *rb_tree_remove(rb_tree *tree, const void *data) {

    rb_node *granpa   = NULL;   // We need to store the last 3 levels //
    rb_node *parent   = NULL;   //                                    //
    rb_node *sister   = NULL;   //            granpa                  //
    rb_node *node     = NULL;   //              |                     //
    rb_node *old_node = NULL;   //            parent                  //
    void    *old_data = NULL;   //            /    \   <- comp_n      //
    int      comp_n   = 0;      //        sister  node                //
    int      comp     = 0;      //                / \  <- comp        //

    // Sanity Checks:
    assert(tree != NULL);
    assert(data != NULL);

    // Initialize the search at the root node:
    node = tree->root;
    if (node == NULL) { return NULL; }
    
    // Look for a leaf:
    while (node != NULL) {

        // At this point node is BLACK, if sister exists is BLACK and if parent 
        // exists is RED. We want to paint node RED and repair any violation.

        // Case 1: Node has two BLACK children
        if (IS_BLACK(node->left) && IS_BLACK(node->right)) {

            // Easy case: the node is the root node
            if (parent == NULL) { node->color = RED; }

            // General case:
            else {

                // Case 1.0: Node has no sister
                if (sister == NULL) {
                    node->color   = RED;
                    parent->color = BLACK;
                    
                // Case 1.1: Sister has 2 BLACK children
                } else if (IS_BLACK(sister->left) && IS_BLACK(sister->right)){
                    node->color   = RED;
                    sister->color = RED;
                    parent->color = BLACK;

                // Case 1.2: Sister has at least 1 RED children
                } else {

                    // If sister->left is RED:
                    if (IS_RED(sister->left)) {

                        // If sister == parent->right: Double rotation
                        if (comp < 0) {

                            if  (granpa == NULL) { tree->root    = sister->left; }
                            else if (comp_n < 0) { granpa->left  = sister->left; }
                            else                 { granpa->right = sister->left; }
                            granpa = sister->left;
                            
                            parent->right = granpa->left;
                            granpa->left  = parent;

                            sister->left  = granpa->right;
                            granpa->right = sister;
                            sister        = parent->right;
                            
                            node->color   = RED;
                            parent->color = BLACK;
                        }

                        // If sister == parent->left: Single rotation
                        else {

                            if  (granpa == NULL) { tree->root    = sister; }
                            else if (comp_n < 0) { granpa->left  = sister; }
                            else                 { granpa->right = sister; }
                            granpa = sister;
                            
                            parent->left  = granpa->right;
                            granpa->right = parent;
                            sister        = parent->left;
                            
                            node->color   = RED;
                            granpa->color = RED;
                            parent->color = BLACK;
                            granpa->left->color = BLACK;
                        }
                    }

                    // If sister->right is RED:
                    else {

                        // If sister == parent->left: Double rotation
                        if (comp > 0) {

                            if  (granpa == NULL) { tree->root    = sister->right; }
                            else if (comp_n < 0) { granpa->left  = sister->right; }
                            else                 { granpa->right = sister->right; }
                            granpa = sister->right;
                            
                            parent->left  = granpa->right;
                            granpa->right = parent;

                            sister->right = granpa->left;
                            granpa->left  = sister;
                            sister        = parent->left;
                            
                            node->color   = RED;
                            parent->color = BLACK;
                        }

                        // If sister == parent->right: Single rotation
                        else {

                            if  (granpa == NULL) { tree->root    = sister; }
                            else if (comp_n < 0) { granpa->left  = sister; }
                            else                 { granpa->right = sister; }
                            granpa = sister;
                            
                            parent->right = granpa->left;
                            granpa->left  = parent;
                            sister        = parent->right;

                            node->color   = RED;
                            granpa->color = RED;
                            parent->color = BLACK;
                            granpa->right->color = BLACK;
                        }
                    }
                }
            }
        }

        // We compare the data now because we need the information for "Case 2"

        // Compare data unless you already know where to go:
        comp_n = comp;
        comp   = (old_data == NULL) ? (tree->comp)(data, node->data) : (-1);

        // If we have found the node to remove: Remember it!
        if (comp == 0) {
            old_data = node->data;
            old_node = node;
            comp     = +1;   // ...and search the successor
        }
        
        // Case 2: Node has at least one RED children
        if (IS_RED(node->left) || IS_RED(node->right)) {

            // Again node is BLACK, if sister exists is BLACK and if parent
            // exists is RED. We paint node RED and repair any violation.

            // Case 2.1: We are moving to the RED node
            if ((comp < 0 && IS_RED(node->left )) ||
                (comp > 0 && IS_RED(node->right)) ){

                // Move and compare again for free!
                granpa = parent;
                parent = node;
                if (comp < 0) {
                    node   = parent->left;
                    sister = parent->right;
                } else if (comp > 0) {
                    node   = parent->right;
                    sister = parent->left;
                }
                comp_n = comp;
                comp   = (old_data == NULL) ? (tree->comp)(data, node->data) : (-1);
                if (comp == 0) {
                    old_data = node->data;
                    old_node = node;
                    comp     = +1;
                }
            }
            
            // Case 2.2: We are moving to the BLACK node
            else {
                // If we are moving to the left: Single left-rotation
                if (comp < 0) {
                    if  (parent == NULL) { tree->root    = node->right; }
                    else if (comp_n < 0) { parent->left  = node->right; }
                    else                 { parent->right = node->right; }
                    granpa        = parent;
                    parent        = node->right;
                    sister        = parent->right;
                    node->right   = parent->left;
                    parent->left  = node;
                                        
                    node->color   = RED;
                    parent->color = BLACK;

                    comp_n = -1;
                }

                // If we are moving to the right: Single right-rotation
                else {
                    if  (parent == NULL) { tree->root    = node->left; }
                    else if (comp_n < 0) { parent->left  = node->left; }
                    else                 { parent->right = node->left; }
                    granpa        = parent;
                    parent        = node->left;
                    sister        = parent->left;
                    node->left    = parent->right;
                    parent->right = node;
                                        
                    node->color   = RED;
                    parent->color = BLACK;

                    comp_n = 1;
                }                
            }
        }

        // ...and finally move!
        granpa = parent;
        parent = node;
        if (comp < 0) {
            node   = parent->left;
            sister = parent->right;
        } else if (comp > 0) {
            node   = parent->right;
            sister = parent->left;
        }
    }

    // Erase "parent", which should be RED:
    if (old_node != NULL) {
        old_node->data = parent->data;
        if      (granpa       == NULL)   { tree->root    = parent->right; }
        else if (granpa->left == parent) { granpa->left  = parent->right; }
        else                             { granpa->right = parent->right; }
        free(parent);
    }
    
    // Before leaving: Make sure that the root is BLACK!
    if (tree->root != NULL) { tree->root->color = BLACK; }

    // And return old_data (which will be NULL unless data was already here)
    return old_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x10ff7
jmp 0x11016
leaq 0x5274(%rip), %rdi      # 0x16272
leaq 0x51f7(%rip), %rsi      # 0x161fc
movl $0xb0b, %edx            # imm = 0xB0B
leaq 0x58fc(%rip), %rcx      # 0x1690d
callq 0x1060
cmpq $0x0, -0x18(%rbp)
je 0x1101f
jmp 0x1103e
leaq 0x52cb(%rip), %rdi      # 0x162f1
leaq 0x51cf(%rip), %rsi      # 0x161fc
movl $0xb0c, %edx            # imm = 0xB0C
leaq 0x58d4(%rip), %rcx      # 0x1690d
callq 0x1060
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1105d
movq $0x0, -0x8(%rbp)
jmp 0x11782
jmp 0x1105f
cmpq $0x0, -0x38(%rbp)
je 0x116fd
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1108a
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x0, %eax
jne 0x113d8
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x110aa
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x0, %eax
jne 0x113d8
cmpq $0x0, -0x28(%rbp)
jne 0x110be
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
jmp 0x113d6
cmpq $0x0, -0x30(%rbp)
jne 0x110da
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
jmp 0x113d4
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x110f6
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x0, %eax
jne 0x1112f
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x11112
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x0, %eax
jne 0x1112f
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x30(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
jmp 0x113d2
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x11293
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x11293
cmpl $0x0, -0x50(%rbp)
jge 0x11204
cmpq $0x0, -0x20(%rbp)
jne 0x11175
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1119f
cmpl $0x0, -0x4c(%rbp)
jge 0x1118d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1119d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1119f
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
jmp 0x1128e
cmpq $0x0, -0x20(%rbp)
jne 0x11218
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1123a
cmpl $0x0, -0x4c(%rbp)
jge 0x1122c
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x11238
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1123a
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x0, 0x18(%rax)
jmp 0x113d0
cmpl $0x0, -0x50(%rbp)
jle 0x11344
cmpq $0x0, -0x20(%rbp)
jne 0x112b5
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x112df
cmpl $0x0, -0x4c(%rbp)
jge 0x112cd
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x112dd
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x112df
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
jmp 0x113ce
cmpq $0x0, -0x20(%rbp)
jne 0x11358
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1137a
cmpl $0x0, -0x4c(%rbp)
jge 0x1136c
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x11378
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1137a
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movb $0x0, 0x18(%rax)
jmp 0x113d0
jmp 0x113d2
jmp 0x113d4
jmp 0x113d6
jmp 0x113d8
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x113ff
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movl %eax, -0x54(%rbp)
jmp 0x11409
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x54(%rbp)
jmp 0x11409
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
jne 0x1142f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x1, -0x50(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1144b
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
je 0x1146f
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x116a8
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x116a8
cmpl $0x0, -0x50(%rbp)
jge 0x11491
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x11491
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
je 0x114bf
cmpl $0x0, -0x50(%rbp)
jle 0x1156b
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1156b
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movsbl 0x18(%rax), %eax
cmpl $0x1, %eax
jne 0x1156b
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x50(%rbp)
jge 0x114ef
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x1150f
cmpl $0x0, -0x50(%rbp)
jle 0x1150d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x1150f
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x11536
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movl %eax, -0x58(%rbp)
jmp 0x11540
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x58(%rbp)
jmp 0x11540
movl -0x58(%rbp), %eax
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
jne 0x11566
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x116a6
cmpl $0x0, -0x50(%rbp)
jge 0x1160f
cmpq $0x0, -0x28(%rbp)
jne 0x1158d
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x115b7
cmpl $0x0, -0x4c(%rbp)
jge 0x115a5
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x115b5
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x115b7
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
movl $0xffffffff, -0x4c(%rbp) # imm = 0xFFFFFFFF
jmp 0x116a4
cmpq $0x0, -0x28(%rbp)
jne 0x11627
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x11651
cmpl $0x0, -0x4c(%rbp)
jge 0x1163f
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1164f
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x11651
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
movb $0x1, 0x18(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x18(%rax)
movl $0x1, -0x4c(%rbp)
jmp 0x116a6
jmp 0x116a8
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x50(%rbp)
jge 0x116d8
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x116f8
cmpl $0x0, -0x50(%rbp)
jle 0x116f6
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x116f8
jmp 0x1105f
cmpq $0x0, -0x40(%rbp)
je 0x11765
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x20(%rbp)
jne 0x1172a
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1175c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x1174a
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1175a
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1175c
movq -0x28(%rbp), %rdi
callq 0x10e0
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1177a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x0, 0x18(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)