LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_min
void *sp_tree_min(sp_tree *tree) {

    // Sanity Check:
    assert(tree != NULL);

    // Trivial case: empty tree
    if (tree->root == NULL) { return NULL; }

    // General case: Move the smallest element to the root
    splay_left(tree);

    // And return a pointer to its data:
    return tree->root->data;
}

// Assembly:
subq $0x18, %rsp
testq %rdi, %rdi
je 0xbaaa
movq (%rdi), %rax
testq %rax, %rax
je 0xba87
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rcx
testq %rdx, %rdx
je 0xba8e
movq %rdx, %rsi
movq 0x10(%rdx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x10(%rsi)
cmpq $0x0, 0x8(%rsi)
je 0xba8b
movq %rsi, 0x8(%rcx)
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rdx
movq %rsi, %rcx
jmp 0xba5b
xorl %eax, %eax
jmp 0xbaa5
movq %rsi, %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%rdi)
movq (%rax), %rax
addq $0x18, %rsp
retq
leaq 0x27d2(%rip), %rdi      # 0xe283
leaq 0x2755(%rip), %rsi      # 0xe20d
leaq 0x31b9(%rip), %rcx      # 0xec78
movl $0x1322, %edx           # imm = 0x1322
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_insert_max
void *sp_tree_insert_max(sp_tree *tree, void *data) {

    sp_node *old_root;
    void    *old_data;
    int      comp = 1;
    
    // Sanity Checks:
    assert(tree != NULL);
    assert(data != NULL);

    // General case: Splay data to the root
    splay_right(tree);
    old_root = tree->root;

    // Compare the current root with data:
    if (old_root != NULL) { comp = (tree->comp)(data, old_root->data); }

    // If data is in the tree: overwrite it!
    if (comp == 0) {
        old_data = tree->root->data;
        tree->root->data = data;
        return old_data;
    }

    // Otherwise insert a new node as a root and link the previous root to it:
    tree->root = (sp_node *) malloc(sizeof(sp_node));
    if (tree->root == NULL) {
        fprintf(stderr, "ERROR: Unable to allocate sp_node\n");
        tree->root = old_root;
    } else {
        tree->root->data  = data;
        tree->root->left  = old_root;
        tree->root->right = NULL;
    }

    // Data was not here!
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0xbba1
movq %rsi, %rbx
testq %rsi, %rsi
je 0xbbc0
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq (%rdi), %rax
testq %rax, %rax
je 0xbb46
movq 0x10(%rax), %rdx
leaq 0x8(%rsp), %rcx
testq %rdx, %rdx
je 0xbb32
movq %rdx, %rsi
movq 0x8(%rdx), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%rsi)
cmpq $0x0, 0x10(%rsi)
je 0xbb2f
movq %rsi, 0x10(%rcx)
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
movq %rsi, %rcx
jmp 0xbb03
movq %rsi, %rax
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rcx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%r14)
movq (%r14), %r15
testq %r15, %r15
je 0xbb5c
movq (%r15), %rsi
movq %rbx, %rdi
callq *0x8(%r14)
testl %eax, %eax
je 0xbb81
movl $0x18, %edi
callq 0x10d0
movq %rax, (%r14)
testq %rax, %rax
je 0xbb94
movq %rbx, (%rax)
movq %r15, 0x8(%rax)
movq $0x0, 0x10(%rax)
xorl %eax, %eax
jmp 0xbb8a
movq (%r14), %rcx
movq (%rcx), %rax
movq %rbx, (%rcx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %r14, %rsi
callq 0x145c
jmp 0xbb7d
leaq 0x26db(%rip), %rdi      # 0xe283
leaq 0x265e(%rip), %rsi      # 0xe20d
leaq 0x3042(%rip), %rcx      # 0xebf8
movl $0x12d7, %edx           # imm = 0x12D7
callq 0x1080
leaq 0x273b(%rip), %rdi      # 0xe302
leaq 0x263f(%rip), %rsi      # 0xe20d
leaq 0x3023(%rip), %rcx      # 0xebf8
movl $0x12d8, %edx           # imm = 0x12D8
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_search
void *sp_tree_search(sp_tree *tree, const void *data) {

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

    // Trivial case: empty tree
    if (tree->root == NULL) { return NULL; }

    // General case: Splay data to the root
    splay(tree, data);

    // If data is in the tree return a pointer to it:
    if ((tree->comp)(data, tree->root->data) == 0) { return tree->root->data; }

    // Not found:
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0xc20a
movq %rsi, %r14
testq %rsi, %rsi
je 0xc229
movq %rdi, %rbx
movq (%rdi), %r13
testq %r13, %r13
je 0xc1f2
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %r15
movups %xmm0, 0x8(%r15)
movq %r15, %r12
movq (%r13), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
js 0xc179
je 0xc1bc
movq 0x10(%r13), %rax
testq %rax, %rax
je 0xc1bc
movq (%rax), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
jle 0xc16b
movq 0x10(%r13), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%r13)
movq %r13, 0x8(%rax)
cmpq $0x0, 0x10(%rax)
movq %rax, %r13
je 0xc1bf
movq %r13, 0x10(%r12)
leaq 0x10(%r13), %rax
movq %r13, %r12
jmp 0xc1b4
movq 0x8(%r13), %rax
testq %rax, %rax
je 0xc1bc
movq (%rax), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
jns 0xc1a9
movq 0x8(%r13), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%r13)
movq %r13, 0x10(%rax)
cmpq $0x0, 0x8(%rax)
movq %rax, %r13
je 0xc1bf
movq %r13, 0x8(%r15)
leaq 0x8(%r13), %rax
movq %r13, %r15
movq (%rax), %r13
jmp 0xc127
movq %r13, %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%r12)
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%r15)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%rbx)
movq (%rax), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
je 0xc1f6
xorl %eax, %eax
jmp 0xc1fc
movq (%rbx), %rax
movq (%rax), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2072(%rip), %rdi      # 0xe283
leaq 0x1ff5(%rip), %rsi      # 0xe20d
leaq 0x2a2b(%rip), %rcx      # 0xec4a
movl $0x130c, %edx           # imm = 0x130C
callq 0x1080
leaq 0x20d2(%rip), %rdi      # 0xe302
leaq 0x1fd6(%rip), %rsi      # 0xe20d
leaq 0x2a0c(%rip), %rcx      # 0xec4a
movl $0x130d, %edx           # imm = 0x130D
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_max
void *sp_tree_max(sp_tree *tree) {

    // Sanity Check:
    assert(tree != NULL);

    // Trivial case: empty tree
    if (tree->root == NULL) { return NULL; }

    // General case: Move the biggest element to the root
    splay_right(tree);

    // And return a pointer to its data:
    return tree->root->data;
}

// Assembly:
subq $0x18, %rsp
testq %rdi, %rdi
je 0xc2b7
movq (%rdi), %rax
testq %rax, %rax
je 0xc294
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq 0x10(%rax), %rdx
movq %rsp, %rcx
testq %rdx, %rdx
je 0xc29b
movq %rdx, %rsi
movq 0x8(%rdx), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%rsi)
cmpq $0x0, 0x10(%rsi)
je 0xc298
movq %rsi, 0x10(%rcx)
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
movq %rsi, %rcx
jmp 0xc268
xorl %eax, %eax
jmp 0xc2b2
movq %rsi, %rax
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rcx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rdi)
movq (%rax), %rax
addq $0x18, %rsp
retq
leaq 0x1fc5(%rip), %rdi      # 0xe283
leaq 0x1f48(%rip), %rsi      # 0xe20d
leaq 0x29c9(%rip), %rcx      # 0xec95
movl $0x1334, %edx           # imm = 0x1334
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_remove_min
void *sp_tree_remove_min(sp_tree *tree) {

    sp_node *old_root;
    void    *old_data;

    // Sanity check:
    assert(tree != NULL);

    // Avoid trivial case: empty tree
    old_data = NULL;
    if (tree->root != NULL) {

        // Splay the smallest node to the root:
        splay_left(tree);

        // Remove it!
        old_root   = tree->root;
        old_data   = tree->root->data;
        tree->root = tree->root->right;
        free(old_root);
    }

    // Return
    return old_data;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0xc708
movq (%rdi), %rax
testq %rax, %rax
je 0xc6d2
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rcx
testq %rdx, %rdx
je 0xc6d9
movq %rdx, %rsi
movq 0x10(%rdx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x10(%rsi)
cmpq $0x0, 0x8(%rsi)
je 0xc6d6
movq %rsi, 0x8(%rcx)
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rdx
movq %rsi, %rcx
jmp 0xc6a6
xorl %ebx, %ebx
jmp 0xc6ff
movq %rsi, %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%rdi)
movq (%rax), %rbx
movq 0x10(%rax), %rcx
movq %rcx, (%rdi)
movq %rax, %rdi
callq 0x1120
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x1b74(%rip), %rdi      # 0xe283
leaq 0x1af7(%rip), %rsi      # 0xe20d
leaq 0x261b(%rip), %rcx      # 0xed38
movl $0x13cc, %edx           # imm = 0x13CC
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_remove_max
void *sp_tree_remove_max(sp_tree *tree) {

    sp_node *old_root;
    void    *old_data;

    // Sanity check:
    assert(tree != NULL);

    // Avoid trivial case: empty tree
    old_data = NULL;
    if (tree->root != NULL) {

        // Splay the biggest node to the root:
        splay_right(tree);

        // Remove it!
        old_root   = tree->root;
        old_data   = tree->root->data;
        tree->root = tree->root->left;
        free(old_root);
    }

    // Return
    return old_data;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0xc7ac
movq (%rdi), %rax
testq %rax, %rax
je 0xc776
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq 0x10(%rax), %rdx
leaq 0x8(%rsp), %rcx
testq %rdx, %rdx
je 0xc77d
movq %rdx, %rsi
movq 0x8(%rdx), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%rsi)
cmpq $0x0, 0x10(%rsi)
je 0xc77a
movq %rsi, 0x10(%rcx)
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
movq %rsi, %rcx
jmp 0xc74a
xorl %ebx, %ebx
jmp 0xc7a3
movq %rsi, %rax
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rcx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rdi)
movq (%rax), %rbx
movq 0x8(%rax), %rcx
movq %rcx, (%rdi)
movq %rax, %rdi
callq 0x1120
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x1ad0(%rip), %rdi      # 0xe283
leaq 0x1a53(%rip), %rsi      # 0xe20d
leaq 0x259b(%rip), %rcx      # 0xed5c
movl $0x13e9, %edx           # imm = 0x13E9
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_remove_all
void sp_tree_remove_all(sp_tree *tree, void (* free_data) (void *)) {

    sp_node *root;
    sp_node *left;
    sp_node *right;

    // Sanity check:
    assert(tree != NULL);

    // Initialize:
    root = tree->root;
    tree->root = NULL;

    // While the tree is not empty:
    while (root != NULL) {

        // Unravel the tree: Rotate right "root" & "left"
        if (root->left != NULL) {
            left        = root->left;
            right       = left->right;
            left->right = root;
            root->left  = right;
            root        = left;

        // Erase the current "root" node:
        } else {
            right = root->right;
            if (free_data != NULL) { free_data(root->data); }
            free(root);
            root = right;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xc822
movq (%rdi), %r14
movq $0x0, (%rdi)
testq %r14, %r14
je 0xc81c
movq %rsi, %rbx
movq 0x8(%r14), %r15
testq %r15, %r15
je 0xc7fe
movq 0x10(%r15), %rax
movq %r14, 0x10(%r15)
movq %rax, 0x8(%r14)
jmp 0xc814
movq 0x10(%r14), %r15
testq %rbx, %rbx
je 0xc80c
movq (%r14), %rdi
callq *%rbx
movq %r14, %rdi
callq 0x1120
movq %r15, %r14
testq %r15, %r15
jne 0xc7e7
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1a5a(%rip), %rdi      # 0xe283
leaq 0x19dd(%rip), %rsi      # 0xe20d
leaq 0x2549(%rip), %rcx      # 0xed80
movl $0x1417, %edx           # imm = 0x1417
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_intersection
sp_tree *sp_tree_intersection(sp_tree *tree_1, sp_tree *tree_2) {

    sp_tree *tree;
    void    *data_1;
    void    *data_2;
    int      comp;

    // Sanity check:
    assert(tree_1 != NULL);
    assert(tree_2 != NULL);

    // Special case: Both trees are the same
    if (tree_1 == tree_2) { return sp_tree_copy(tree_1); }

    // Create a new tree:
    tree = new_sp_tree(tree_1->comp);
    if (tree == NULL) { return NULL; }

    // Special case: Some of them is empty
    if (sp_tree_is_empty(tree_1) == YES) { return tree; }
    if (sp_tree_is_empty(tree_2) == YES) { return tree; }
    
    // Get the smallest element of each tree:
    data_1 = sp_tree_min(tree_1);
    data_2 = sp_tree_min(tree_2);

    // Until we have exhausted at least one of the trees:
    while (data_1 != NULL && data_2 != NULL) {

        // compare both nodes:
        comp = (tree->comp)(data_1, data_2);

        if (comp < 0) {

            // advance data_1:
            data_1 = sp_tree_next(tree_1, data_1);

        } else if (comp > 0) {

            // advance data_2:
            data_2 = sp_tree_next(tree_2, data_2);

        } else {

            // insert data_1 in tree:
            sp_tree_insert_max(tree, data_1);

            // advance data_1:
            data_1 = sp_tree_next(tree_1, data_1);

            // advance data_2:
            data_2 = sp_tree_next(tree_2, data_2);

        }
    }

    // Return the resulting tree:
    return tree;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xcaa1
movq %rsi, %r15
testq %rsi, %rsi
je 0xcac0
movq %rdi, %r14
cmpq %r15, %rdi
je 0xca81
movq 0x8(%r14), %rdi
callq 0xb972
testq %rax, %rax
je 0xca92
movq %rax, %rbx
cmpq $0x0, (%r14)
je 0xca94
cmpq $0x0, (%r15)
je 0xca94
movq %r14, %rdi
callq 0xba3b
movq %rax, %r12
movq %r15, %rdi
callq 0xba3b
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xca94
movq %r12, %rdi
movq %r13, %rsi
callq *0x8(%rbx)
testl %eax, %eax
js 0xca67
jne 0xca57
movq %rbx, %rdi
movq %r12, %rsi
callq 0xbac9
movq %r14, %rdi
movq %r12, %rsi
callq 0xbbdf
movq %rax, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0xbbdf
movq %rax, %r13
jmp 0xca75
movq %r14, %rdi
movq %r12, %rsi
callq 0xbbdf
movq %rax, %r12
testq %r12, %r12
je 0xca94
testq %r13, %r13
jne 0xca2f
jmp 0xca94
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xb9cc
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1a6e(%rip), %rdi      # 0xe516
leaq 0x175e(%rip), %rsi      # 0xe20d
leaq 0x232c(%rip), %rcx      # 0xede2
movl $0x149d, %edx           # imm = 0x149D
callq 0x1080
leaq 0x1a97(%rip), %rdi      # 0xe55e
leaq 0x173f(%rip), %rsi      # 0xe20d
leaq 0x230d(%rip), %rcx      # 0xede2
movl $0x149e, %edx           # imm = 0x149E
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: is_sp_tree
int is_sp_tree(const sp_tree *tree) {

    // Basic Sanity Checks:
    if (tree == NULL) {
        fprintf(stderr, "ERROR: NULL pointer to sp_tree\n");
        return NO;
    }
    if (tree->comp == NULL) {
        fprintf(stderr, "ERROR: NULL comparing function in sp_tree\n");
        return NO;
    }

    // Trivial Case: empty tree
    if (tree->root == NULL) { return YES; }

    // General Case:
    return is_sp_subtree(tree, tree->root, NULL, NULL);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xcd92
cmpq $0x0, 0x8(%rdi)
je 0xcd99
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xcd8b
xorl %edx, %edx
xorl %ecx, %ecx
popq %rax
jmp 0xcda2
movl $0x1, %eax
jmp 0xcda0
callq 0x1527
jmp 0xcd9e
callq 0x150b
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: is_sp_subtree
static int is_sp_subtree(const sp_tree *tree, const sp_node *node,
                         const void *min, const void *max) {

    // Make sure that node is (strictly) between specified limits:
    if (min != NULL && (tree->comp)(min, node->data) >= 0) {
        fprintf(stderr,"ERROR: Symmetric order not satisfied in sp_tree\n");
        return NO;
    }
    if (max != NULL && (tree->comp)(node->data, max) >= 0) {
        fprintf(stderr,"ERROR: Symmetric order not satisfied in sp_tree\n");
        return NO;
    }

    // Check recursively the left subtree of node:
    if (node->left != NULL) {
        if (is_sp_subtree(tree, node->left, min, node->data) == NO) {
            return NO;
        }
    }

    // Check recursively the right subtree of node:
    if (node->right != NULL) {
        if (is_sp_subtree(tree, node->right, node->data, max) == NO) {
            return NO;
        }
    }

    // All test are fine:
    return YES;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
testq %rdx, %rdx
je 0xcdc9
movq (%r15), %rsi
movq %r12, %rdi
callq *0x8(%r14)
testl %eax, %eax
jns 0xce19
testq %rbx, %rbx
je 0xcddc
movq (%r15), %rdi
movq %rbx, %rsi
callq *0x8(%r14)
testl %eax, %eax
jns 0xce20
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0xcdf7
movq (%r15), %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0xcda2
testl %eax, %eax
je 0xce25
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0xce12
movq (%r15), %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0xcda2
testl %eax, %eax
je 0xce25
movl $0x1, %eax
jmp 0xce27
callq 0x1543
jmp 0xce25
callq 0x155f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: print_sp_tree
void print_sp_tree(const sp_tree *tree, void (* print_node) (const void *)) {

    // Avoid the trivial cases:
    if (tree != NULL && tree->root != NULL) {

        // Print right subtree recursively:
        if (tree->root->right != NULL) {
            print_sp_subtree(tree->root->right, YES, "     ", print_node);
        }

        // Print current node:
        fprintf(stdout, "----");
        if (print_node == NULL) { fprintf(stdout, "(#)"); }
        else { print_node(tree->root->data); }
        fprintf(stdout, "\n");

        // Print left subtree recursively:
        if (tree->root->left != NULL) {
            print_sp_subtree(tree->root->left, NO, "     ", print_node);
        }
    }

    // Empty the "stdout" buffer:
    fflush(stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xcee2
movq %rdi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0xcee2
movq %rsi, %rbx
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xce70
leaq 0x20f6(%rip), %rdx      # 0xef59
movl $0x1, %esi
movq %rbx, %rcx
callq 0xcef6
movq 0x5161(%rip), %r15      # 0x11fd8
movq (%r15), %rcx
leaq 0x20e8(%rip), %rdi      # 0xef69
movl $0x4, %esi
movl $0x1, %edx
callq 0x1100
testq %rbx, %rbx
je 0xce9f
movq (%r14), %rax
movq (%rax), %rdi
callq *%rbx
jmp 0xceb8
movq (%r15), %rcx
leaq 0x182e(%rip), %rdi      # 0xe6d7
movl $0x3, %esi
movl $0x1, %edx
callq 0x1100
movq (%r15), %rsi
movl $0xa, %edi
callq 0x1090
movq (%r14), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0xcee2
leaq 0x2081(%rip), %rdx      # 0xef59
xorl %esi, %esi
movq %rbx, %rcx
callq 0xcef6
movq 0x50ef(%rip), %rax      # 0x11fd8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O1/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: print_sp_subtree
static void print_sp_subtree(const sp_node *node, const int is_right,
                             char *indent, void (* print_node) (const void *)) {

    // Allocate memory:
    char *new_indent = (char *) malloc((6+strlen(indent)*sizeof(char)));
    assert(new_indent != NULL);

    // Print right subtree recursively:
    if (node->right != NULL) {
        if (is_right == YES) { sprintf(new_indent, "%s%s", indent, "      "); }
        else                 { sprintf(new_indent, "%s%s", indent, "|     "); }
        print_sp_subtree(node->right, YES, new_indent, print_node);
    }

    // Print current node:
    if (is_right) { fprintf(stdout, "%s,----",indent); }
    else          { fprintf(stdout, "%s`----",indent); }
    if (print_node == NULL)  { fprintf(stdout, "(#)"); }
    else                     { print_node(node->data); }
    printf("\n");

    // Print left subtree recursively:
    if (node->left != NULL) {
        if (is_right == YES) { sprintf(new_indent, "%s%s", indent, "|     "); }
        else                 { sprintf(new_indent, "%s%s", indent, "      "); }
        print_sp_subtree(node->left, NO, new_indent, print_node);
    }

    // Free memory:
    free(new_indent);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rdi
callq 0x1060
leaq 0x6(%rax), %rdi
callq 0x10d0
testq %rax, %rax
je 0xd01d
movq %rax, %r15
cmpq $0x0, 0x10(%r14)
je 0xcf6d
cmpl $0x1, %ebp
leaq 0x201e(%rip), %rax      # 0xef58
leaq 0x201e(%rip), %rcx      # 0xef5f
cmoveq %rax, %rcx
leaq 0x2007(%rip), %rsi      # 0xef53
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x10(%r14), %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xcef6
testl %ebp, %ebp
movq 0x5062(%rip), %r13      # 0x11fd8
movq (%r13), %rdi
leaq 0x1fed(%rip), %rax      # 0xef6e
leaq 0x1fde(%rip), %rsi      # 0xef66
cmoveq %rax, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10b0
testq %rbx, %rbx
je 0xcfa2
movq (%r14), %rdi
callq *%rbx
jmp 0xcfbc
movq (%r13), %rcx
leaq 0x172a(%rip), %rdi      # 0xe6d7
movl $0x3, %esi
movl $0x1, %edx
callq 0x1100
movl $0xa, %edi
callq 0x1030
cmpq $0x0, 0x8(%r14)
je 0xd007
cmpl $0x1, %ebp
leaq 0x1f88(%rip), %rax      # 0xef5f
leaq 0x1f7a(%rip), %rcx      # 0xef58
cmoveq %rax, %rcx
leaq 0x1f6a(%rip), %rsi      # 0xef53
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10f0
movq 0x8(%r14), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xcef6
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1120
leaq 0x1eca(%rip), %rdi      # 0xeeee
leaq 0x11e2(%rip), %rsi      # 0xe20d
leaq 0x2063(%rip), %rcx      # 0xf095
movl $0x15c3, %edx           # imm = 0x15C3
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/google[P]multichase/pingpong.c
// Function: locked_loop
inline int unlocked_xchg(atomic_t *p, atomic_t old, atomic_t new) {
  if (*(volatile atomic_t *)p == old) {
    *(volatile atomic_t *)p = new;
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x40206c
movl 0x80(%rbx), %ecx
movl 0x84(%rbx), %edx
movq 0xe913e(%rip), %rsi     # 0x4eb008
cmpl $0x0, 0xe912f(%rip)     # 0x4eb000
jne 0x401f3e
xorl %edi, %edi
movl %ecx, %eax
lock
cmpxchgl %edx, (%rsi)
jne 0x401f1b
cmpq $0x0, 0xe891b(%rip)     # 0x4ea800
je 0x401f01
movq 0xe891a(%rip), %rax     # 0x4ea808
xorl %r8d, %r8d
incq (%rax,%r8,8)
incq %r8
cmpq 0xe8901(%rip), %r8      # 0x4ea800
jb 0x401ef1
incl %edi
movl %edi, %eax
xorl $0x2710, %eax           # imm = 0x2710
orl %ecx, %eax
jne 0x401f1b
lock
addl $0x4e20, 0xe8ce7(%rip)  # imm = 0x4E20
xorl %edi, %edi
cmpq $0x0, 0xe61ed(%rip)     # 0x4e8110
je 0x401f35
xorl %eax, %eax
pause
incq %rax
cmpq 0xe61dd(%rip), %rax     # 0x4e8110
jb 0x401f27
cmpl $0x0, 0xe90c4(%rip)     # 0x4eb000
je 0x401ed5
xorl %edi, %edi
callq 0x41e550
// File: /workspace/github_c_makefile_star2_O1/google[P]multichase/pingpong.c
// Function: xadd_loop
static void *xadd_loop(void *data) {
  thread_args_t *args = (thread_args_t *)data;

  common_setup(args);
  uint64_t *xadder = (uint64_t *)pingpong_mutex;
  atomic_t me = args->me;
  uint64_t add_amt = (me == 0) ? 1 : (1ull << 32);
  uint32_t last_lo = 0;
  atomic_t nr = 0;

  while (1) {
    if (stop_loops) {
      pthread_exit(0);
    }

    uint64_t swap = __sync_fetch_and_add(xadder, add_amt);
    if (me == 1 && last_lo != (uint32_t)swap) {
      last_lo = swap;
      ++nr;
      if (nr == 10000) {
        __sync_fetch_and_add(&nr_pingpongs.x, 2 * nr);
        nr = 0;
      }
    }
    for (size_t i = 0; i < nr_relax; ++i) {
      cpu_relax();
    }
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x40206c
movq 0xe901b(%rip), %rax     # 0x4eb008
movl 0x80(%rbx), %ecx
testl %ecx, %ecx
movl $0x1, %esi
movabsq $0x100000000, %rdx      # imm = 0x100000000
cmoveq %rsi, %rdx
cmpl $0x0, 0xe8ff1(%rip)     # 0x4eb000
jne 0x402065
xorl %edi, %edi
xorl %esi, %esi
movq %rdx, %r8
lock
xaddq %r8, (%rax)
cmpl $0x1, %ecx
jne 0x402041
cmpl %r8d, %edi
je 0x402041
incl %esi
cmpl $0x2710, %esi           # imm = 0x2710
jne 0x40203e
lock
addl $0x4e20, 0xe8bc4(%rip)  # imm = 0x4E20
xorl %esi, %esi
movl %r8d, %edi
cmpq $0x0, 0xe60c7(%rip)     # 0x4e8110
je 0x40205c
xorl %r8d, %r8d
pause
incq %r8
cmpq 0xe60b6(%rip), %r8      # 0x4e8110
jb 0x40204e
cmpl $0x0, 0xe8f9d(%rip)     # 0x4eb000
je 0x402015
xorl %edi, %edi
callq 0x41e550
// File: /workspace/github_c_makefile_star2_O1/google[P]multichase/pingpong.c
// Function: common_setup
static void common_setup(thread_args_t *args) {
  // move to our target cpu
  if (sched_setaffinity(0, sizeof(cpu_set_t), &args->cpus)) {
    perror("sched_setaffinity");
    exit(1);
  }

  // test if we're supposed to allocate the pingpong_mutex memory
  if (args->me == 0) {
    pingpong_mutex = mmap(0, getpagesize(), PROT_READ | PROT_WRITE,
                          MAP_ANON | MAP_PRIVATE, -1, 0);
    if (pingpong_mutex == MAP_FAILED) {
      perror("mmap");
      exit(1);
    }
    *pingpong_mutex = args->me;
  }

  // ensure both threads are ready before we leave -- so that
  // both threads have a copy of pingpong_mutex.
  static pthread_mutex_t wait_mutex = PTHREAD_MUTEX_INITIALIZER;
  static pthread_cond_t wait_cond = PTHREAD_COND_INITIALIZER;
  static int wait_for_buddy = 1;
  pthread_mutex_lock(&wait_mutex);
  if (wait_for_buddy) {
    wait_for_buddy = 0;
    pthread_cond_wait(&wait_cond, &wait_mutex);
  } else {
    wait_for_buddy = 1;  // for next invocation
    pthread_cond_broadcast(&wait_cond);
  }
  pthread_mutex_unlock(&wait_mutex);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x80, %esi
xorl %edi, %edi
movq %rbx, %rdx
callq 0x456f10
testl %eax, %eax
jne 0x402118
cmpl $0x0, 0x80(%rbx)
jne 0x4020c7
callq 0x457f50
movslq %eax, %rsi
xorl %edi, %edi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x458050
movq %rax, 0xe8f4f(%rip)     # 0x4eb008
cmpq $-0x1, %rax
je 0x40211d
movl 0x80(%rbx), %ecx
movl %ecx, (%rax)
leaq 0xe8f42(%rip), %rdi     # 0x4eb010
callq 0x41fe60
cmpb $0x0, 0xe8f8e(%rip)     # 0x4eb068
je 0x4020f1
movb $0x0, 0xe8f85(%rip)     # 0x4eb068
leaq 0xe8f4e(%rip), %rdi     # 0x4eb038
callq 0x41bc10
jmp 0x40210b
movb $0x1, 0xe8f70(%rip)     # 0x4eb068
leaq 0xe8f39(%rip), %rdi     # 0x4eb038
leaq 0xe8f0a(%rip), %rsi     # 0x4eb010
callq 0x41c260
leaq 0xe8efe(%rip), %rdi     # 0x4eb010
popq %rbx
jmp 0x420d40
callq 0x40125e
callq 0x401273
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/tudurom[P]disputils/lsd.c
// Function: main
int
main(int argc, char *argv[])
{
	xcb_randr_get_output_info_reply_t *output_info;
	xcb_randr_get_crtc_info_reply_t   *output_crtc_info;
	int print_all = 0;
	if (argc > 1 && strcmp(argv[1], "-a") == 0)
		print_all = 1;

#ifdef __OpenBSD__
	if (pledge("stdio rpath unix", NULL) == -1)
		err(1, "pledge");
#endif
	if (argc > 1 && (argc == 2 && !print_all))
		usage(argv[0]);
	init_xcb(&conn);
	get_screen(conn, &scrn);

	xcb_randr_provider_t *providers;
	int p_len = get_providers(conn, scrn, &providers);

	for (int i = 0; i < p_len; i++) {
		xcb_randr_output_t *os;
		int o_len = get_outputs(conn, providers[i], &os);

		/* Print screens from providers */
		for (int j = 0; j < o_len; j++) {
			output_info = get_output_info(conn, os[j]);
			output_crtc_info = get_output_crtc_info(conn, output_info->crtc);
			/* Print screen only if in use */
			if (print_all || output_crtc_info != NULL) {
				print_output(conn, os[j]);
			}
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x2, %edi
jl 0x13a5
movq 0x8(%rbx), %rdi
leaq 0xc78(%rip), %rsi       # 0x2010
callq 0x1110
testl %eax, %eax
sete %r14b
jmp 0x13a8
xorl %r14d, %r14d
cmpl $0x2, %ebp
setne %al
orb %r14b, %al
je 0x1487
leaq 0x2d72(%rip), %rdi      # 0x4130
callq 0x14a0
movq 0x2d66(%rip), %rdi      # 0x4130
leaq 0x2d67(%rip), %rsi      # 0x4138
callq 0x14de
movq 0x2d53(%rip), %rdi      # 0x4130
movq 0x2d54(%rip), %rsi      # 0x4138
leaq 0x10(%rsp), %rdx
callq 0x150c
testl %eax, %eax
jle 0x1476
movl %eax, %r15d
xorl %r12d, %r12d
leaq 0x8(%rsp), %rbx
movq 0x2d28(%rip), %rdi      # 0x4130
movq 0x10(%rsp), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdx
callq 0x155e
testl %eax, %eax
jle 0x146e
movl %eax, %r13d
xorl %ebp, %ebp
movq 0x2d07(%rip), %rdi      # 0x4130
movq 0x8(%rsp), %rax
movl (%rax,%rbp,4), %esi
callq 0x15b0
movq 0x2cf3(%rip), %rdi      # 0x4130
movl 0xc(%rax), %esi
callq 0x165c
testq %rax, %rax
setne %al
orb %r14b, %al
cmpb $0x1, %al
jne 0x1466
movq 0x2cd7(%rip), %rdi      # 0x4130
movq 0x8(%rsp), %rax
movl (%rax,%rbp,4), %esi
callq 0x1345
incq %rbp
cmpq %rbp, %r13
jne 0x1422
incq %r12
cmpq %r15, %r12
jne 0x1401
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
leaq 0xb73(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x10c0
xorl %edi, %edi
callq 0x11f0
nop
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/golomb/encode.c
// Function: zerr
void zerr(int ret)
{
  fputs("zpipe: ", stderr);
  switch (ret) {
    case Z_ERRNO:
      if (ferror(stdin))
        fputs("error reading stdin\n", stderr);
      if (ferror(stdout))
        fputs("error writing stdout\n", stderr);
      break;
    case Z_STREAM_ERROR:
      fputs("invalid compression level\n", stderr);
      break;
    case Z_DATA_ERROR:
      fputs("invalid or incomplete deflate data\n", stderr);
      break;
    case Z_MEM_ERROR:
      fputs("out of memory\n", stderr);
      break;
    case Z_VERSION_ERROR:
      fputs("zlib version mismatch!\n", stderr);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x3deb(%rip), %r14      # 0x5ff8
movq (%r14), %rsi
leaq 0x219f(%rip), %rdi      # 0x43b6
callq 0x20a0
addl $0x6, %ebx
cmpl $0x5, %ebx
ja 0x225a
leaq 0x1eb5(%rip), %rax      # 0x40e0
movslq (%rax,%rbx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x3d9d(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
callq 0x2050
testl %eax, %eax
jne 0x2286
movq 0x3d82(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
callq 0x2050
testl %eax, %eax
jne 0x2297
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2180(%rip), %rdi      # 0x43e9
jmp 0x229e
leaq 0x21c5(%rip), %rdi      # 0x4437
jmp 0x229e
leaq 0x2189(%rip), %rdi      # 0x4404
jmp 0x229e
leaq 0x21a4(%rip), %rdi      # 0x4428
jmp 0x229e
movq (%r14), %rsi
leaq 0x212e(%rip), %rdi      # 0x43be
callq 0x20a0
jmp 0x2247
leaq 0x2135(%rip), %rdi      # 0x43d3
movq (%r14), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20a0
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/golomb/encode.c
// Function: get_run_length_decoding
int 
get_run_length_decoding (unsigned int *in,
    unsigned long size,
    unsigned char **out,
    unsigned long *outsize)
{
  int i;
  int currindex, bytecounter;
  unsigned char *currbyte;

  currindex = 0;
  bytecounter = 1;

  memset (rle_buf, 0, sizeof(unsigned int) * MAX_INPUT_SIZE);
  currbyte = (unsigned char*) rle_buf;

  //printf ("last at %d: %d\n", size, in[size-1]);

  for (i = 0; i < size; ++i) {
    currindex += in[i];
    while (currindex > 8) {
      currbyte++;
      currindex -= 8;
      bytecounter++;
    }
    *currbyte |= 1 << (8 - currindex);
    //printf ("setting bit %d of byte %d\n", 
        //currindex, bytecounter);
  }

  *outsize = bytecounter - 1;
  if ( !(*out= (unsigned char *) malloc (*outsize)) ) {
    perror ("RLD: cannot malloc: ");
    return 1;
  }

  if ( !(memcpy (*out, rle_buf, *outsize)) ) {
    perror ("RLD: cannot memcpy: ");
    free (*out);
    return 1;
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
leaq 0x4852(%rip), %rbp      # 0x6f20
xorl %ebx, %ebx
movl $0x1000000, %edx        # imm = 0x1000000
movq %rbp, %rdi
xorl %esi, %esi
callq 0x20c0
testq %r12, %r12
je 0x273a
movl $0x1, %eax
xorl %edx, %edx
addl (%r13,%rdx,4), %ebx
cmpl $0x9, %ebx
jl 0x271e
cmpl $0x10, %ebx
movl $0x10, %ecx
cmovll %ebx, %ecx
movl %ebx, %esi
subl %ecx, %esi
addl $0x7, %esi
movl %esi, %ecx
shrl $0x3, %ecx
andl $-0x8, %esi
addq %rcx, %rbp
incq %rbp
subl %esi, %ebx
addl $-0x8, %ebx
addl %ecx, %eax
incl %eax
movb $0x8, %cl
subb %bl, %cl
movl $0x1, %esi
shll %cl, %esi
orb %sil, (%rbp)
incq %rdx
cmpq %rdx, %r12
jne 0x26eb
decl %eax
movslq %eax, %rbx
movq %rbx, (%r15)
movq %rbx, %rdi
callq 0x2170
movq %rax, (%r14)
testq %rax, %rax
je 0x2770
leaq 0x47cc(%rip), %rsi      # 0x6f20
movq %rax, %rdi
movq %rbx, %rdx
callq 0x2140
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a97(%rip), %rdi      # 0x420e
callq 0x21d0
movl $0x1, %eax
jmp 0x2761
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/golomb/encode.c
// Function: ceil_log2
int
ceil_log2 (int b) {
  int last = -1, secondlast = -1, count = 0;
  int log2_b, tmp = b;

  while (tmp) {
    if (tmp & 1) {
      secondlast = last;
      last = count;
    }
    tmp >>= 1;
    ++count;
  }
  if (secondlast == -1)
    log2_b = last;
  else
    log2_b = last+1;

  return log2_b;
}

// Assembly:
testl %edi, %edi
je 0x27bc
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edi, %esi
movl %eax, %r8d
testb $0x1, %dil
movl %edx, %eax
cmovel %r8d, %eax
cmovnel %r8d, %ecx
sarl %esi
incl %edx
cmpl $0x1, %edi
movl %esi, %edi
ja 0x2795
xorl %edx, %edx
cmpl $-0x1, %ecx
setne %dl
addl %edx, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/golomb/readfile.c
// Function: readFile
char *readFile(char *fileName) {
    FILE *file = fopen(fileName, "r");
    char *code;
    size_t n = 0;
    int c;

    if (file == NULL) return NULL; //could not open file
    fseek(file, 0, SEEK_END);
    long f_size = ftell(file);
    fseek(file, 0, SEEK_SET);
    code = (char*)malloc(f_size+1);

    while ((c = fgetc(file)) != EOF) {
        code[n++] = (char)c;
    }

    code[n] = '\0';        

    return code;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x12b7(%rip), %rsi      # 0x44af
callq 0x21c0
testq %rax, %rax
je 0x3267
movq %rax, %rbx
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2180
movq %rbx, %rdi
callq 0x2130
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2180
incq %r14
movq %r14, %rdi
callq 0x2170
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
cmpl $-0x1, %eax
je 0x3260
xorl %r15d, %r15d
movb %al, (%r14,%r15)
incq %r15
movq %rbx, %rdi
callq 0x20d0
cmpl $-0x1, %eax
jne 0x324c
movb $0x0, (%r14,%r15)
jmp 0x326a
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/util.c
// Function: idExists
int idExists(const char* name) {
    int i;
	for(i=0; i< idTableMax; ++i) {
        if(strcmp(idTable[i].id, name) == 0) {
            idTable[i].used++;
            return i;
        }
    }
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x3e8c(%rip), %r15      # 0x50d8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r15, %r15
jle 0x1288
movq %rdi, %r14
leaq 0x3e90(%rip), %r13      # 0x50f0
xorl %r12d, %r12d
movq -0x10(%r13), %rdi
movq %r14, %rsi
callq 0x10c0
testl %eax, %eax
je 0x1281
incq %r12
addq $0x18, %r13
cmpq %r12, %r15
jne 0x1263
jmp 0x1288
incl (%r13)
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/util.c
// Function: addID
int addID(const char* name)
{
    int ret = idExists(name);
    if(ret == -1) {
        idTable[idTableMax].id = copyString(name);
        idTable[idTableMax].type = Void;
        idTable[idTableMax].used = 0;
        ret = ++idTableMax;
    }
    return ret;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x123c
cmpl $-0x1, %eax
jne 0x12d3
movq %rbx, %rdi
callq 0x12d5
movslq 0x3e27(%rip), %rcx      # 0x50d8
leaq (%rcx,%rcx,2), %rdx
leaq 0x3e24(%rip), %rsi      # 0x50e0
movq %rax, (%rsi,%rdx,8)
xorl %eax, %eax
movl %eax, 0x8(%rsi,%rdx,8)
movl %eax, 0x10(%rsi,%rdx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x3e05(%rip)      # 0x50d8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/util.c
// Function: copyString
char * copyString(const char * s)
{ int n;
  char * t;
  if (s==NULL) return NULL;
  n = strlen(s)+1;
  t = malloc(n);
  if (t==NULL)
    printf("Out of memory error at line %d\n",lineno);
  else strcpy(t,s);
  return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x130a
movq %rdi, %r14
callq 0x1080
incl %eax
movslq %eax, %rdi
callq 0x10e0
movq %rax, %rbx
testq %rax, %rax
je 0x130e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1050
xorl %ebx, %ebx
jmp 0x1322
movl 0x3d9c(%rip), %esi      # 0x50b0
leaq 0x1d22(%rip), %rdi      # 0x303d
xorl %eax, %eax
callq 0x10a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/parse.c
// Function: parse
void parse(void)
{
  token = analLex();
  program();
  printf("compilation ended with %d errors\n", errorCount);
  fclose(output);
  if(Error) {
    #ifdef __linux__
        system("rm out.txt");
    #else
    #ifdef __WIN32
        system("del /f out.txt");
    #endif
    #endif
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x2323
movl %eax, 0x46fe(%rip)      # 0x5a54
movl $0x2, %edi
callq 0x152f
leaq 0x4709(%rip), %rdi      # 0x5a70
callq 0x1294
xorl %edi, %edi
callq 0x152f
movl $0x21, %edi
callq 0x152f
cmpl $0x3, 0x46d0(%rip)      # 0x5a54
jne 0x148f
leaq 0x46df(%rip), %rbx      # 0x5a70
leaq 0x3d40(%rip), %r12      # 0x50d8
leaq 0x3d11(%rip), %rbp      # 0x50b0
leaq 0x1d7a(%rip), %r15      # 0x3120
leaq 0x3d23(%rip), %r13      # 0x50d0
leaq 0x3d2c(%rip), %r14      # 0x50e0
movl $0x3, %edi
callq 0x152f
movq %rbx, %rdi
callq 0x1294
movl (%r12), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x13ff
movl (%rbp), %esi
leaq 0x1d07(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10a0
leaq 0x3cdf(%rip), %rax      # 0x50d4
incl (%rax)
movl $0x1, (%r13)
xorl %edi, %edi
callq 0x152f
cmpl $0x25, 0x4647(%rip)     # 0x5a54
jne 0x1416
movl $0x25, %edi
jmp 0x13b9
movl $0x24, %edi
callq 0x152f
movl 0x462e(%rip), %edi      # 0x5a54
cmpl $0x6, %edi
je 0x1439
xorl %ebp, %ebp
cmpl $0x7, %edi
jne 0x1443
movl $0x2, %ebp
jmp 0x143e
movl $0x1, %ebp
callq 0x152f
movslq (%r12), %rax
cmpq $0x2, %rax
jl 0x1471
leaq (%rax,%rax,2), %rax
leaq -0x18(,%rax,8), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x20(%r14,%rcx)
jne 0x1468
movl %ebp, 0x20(%r14,%rcx)
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x145b
movl $0x21, %edi
callq 0x152f
cmpl $0x3, 0x45d2(%rip)      # 0x5a54
leaq 0x3c27(%rip), %rbp      # 0x50b0
je 0x13b4
movl $0x4, %edi
callq 0x152f
movl 0x45b5(%rip), %eax      # 0x5a54
cmpl $0x5, %eax
je 0x14c3
cmpl $0x20, %eax
je 0x14c3
jmp 0x14b5
movl $0x21, %edi
callq 0x152f
callq 0x15bb
cmpl $0x21, 0x4593(%rip)     # 0x5a54
je 0x14ab
movl $0x5, %edi
callq 0x152f
movl $0x26, %edi
callq 0x152f
leaq 0x3bf6(%rip), %rax      # 0x50d4
movl (%rax), %esi
leaq 0x1bcd(%rip), %rdi      # 0x30b4
xorl %eax, %eax
callq 0x10a0
movq 0x4553(%rip), %rdi      # 0x5a48
callq 0x1070
leaq 0x3bcf(%rip), %rax      # 0x50d0
cmpl $0x0, (%rax)
je 0x1520
leaq 0x1bc9(%rip), %rdi      # 0x30d6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1090
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/parse.c
// Function: accepter
static void accepter(Symbole expected)
{ if (token == expected) token = analLex();
  else {
    ERROR_MSG("unexpected symbol '");
    printSymbole(token,lexeme);
    printf("'. Expected : '");
    printSymbole(expected,"");
    printf("\n");
  }
}

// Assembly:
pushq %rbx
cmpl %edi, 0x451e(%rip)      # 0x5a54
jne 0x1545
callq 0x2323
movl %eax, 0x4511(%rip)      # 0x5a54
popq %rbx
retq
movl %edi, %ebx
leaq 0x3b62(%rip), %rax      # 0x50b0
movl (%rax), %esi
leaq 0x1b8a(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
leaq 0x1b97(%rip), %rdi      # 0x30fc
xorl %eax, %eax
callq 0x10a0
leaq 0x3b61(%rip), %rax      # 0x50d4
incl (%rax)
leaq 0x3b54(%rip), %rax      # 0x50d0
movl $0x1, (%rax)
movl 0x44cc(%rip), %edi      # 0x5a54
leaq 0x44e1(%rip), %rsi      # 0x5a70
callq 0x2150
leaq 0x1b75(%rip), %rdi      # 0x3110
xorl %eax, %eax
callq 0x10a0
leaq 0x1cd4(%rip), %rsi      # 0x327d
movl %ebx, %edi
callq 0x2150
movl $0xa, %edi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/parse.c
// Function: expr
exprType expr(void)
{
    exprType tlhs, trhs;
    Symbole op;
    tlhs = simple_expr();
    op = token;
    if ((token==LT)||(token==EQ)||(token==NEQ)|| (token==LTE) || (token==GT) || (token==GTE)) {
        accepter(token);
        trhs = simple_expr();
        if(trhs != tlhs && tlhs !=TypeError) {
            ERROR_MSG("type misaccepter cannot convert %s to %s\n", typeToStr(trhs), typeToStr(tlhs));

         tlhs = TypeError;
        }

        switch(op) {
        case LT:
            EMETTRE("comparer-si-inf\n");
            CONDITION_FLAG = 0;
            break;
        case GT:
            EMETTRE("comparer-si-sup\n");
            CONDITION_FLAG = 0;
            break;
        case EQ:
            EMETTRE( "comparer-si-egal\n");
            CONDITION_FLAG = 0;
            break;
        case LTE:
            EMETTRE("comparer-si-sup\n");
            CONDITION_FLAG = 1;
            break;
        case GTE:
            EMETTRE("comparer-si-inf\n");
            CONDITION_FLAG = 1;
            break;
        case NEQ:
            EMETTRE( "comparer-si-egal\n");
            CONDITION_FLAG = 1;
            break;
        default:
            break;
        }
        tlhs = Boolean;
    }
    return tlhs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x1d22
movl %eax, %ebx
movl 0x3e6c(%rip), %edi      # 0x5a54
leal -0x13(%rdi), %r15d
cmpl $0x5, %r15d
ja 0x1d15
callq 0x152f
callq 0x1d22
movl %eax, %ebp
cmpl %ebx, %eax
sete %al
cmpl $0x4, %ebx
sete %cl
orb %al, %cl
jne 0x1c63
leaq 0x3498(%rip), %rax      # 0x50b0
movl (%rax), %esi
leaq 0x14c0(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
movl %ebp, %edi
callq 0x132d
movq %rax, %r14
movl %ebx, %edi
callq 0x132d
leaq 0x154a(%rip), %rdi      # 0x318a
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10a0
leaq 0x3480(%rip), %rax      # 0x50d4
incl (%rax)
leaq 0x3473(%rip), %rax      # 0x50d0
movl $0x1, (%rax)
movl $0x3, %ebx
cmpl $0x5, %r15d
ja 0x1d15
leaq 0x1423(%rip), %rax      # 0x309c
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x3dbf(%rip), %rcx      # 0x5a48
leaq 0x1546(%rip), %rdi      # 0x31d6
movl $0x11, %esi
jmp 0x1cca
movq 0x3daa(%rip), %rcx      # 0x5a48
leaq 0x1520(%rip), %rdi      # 0x31c5
jmp 0x1cfb
movq 0x3d9a(%rip), %rcx      # 0x5a48
leaq 0x14ff(%rip), %rdi      # 0x31b4
jmp 0x1cc5
movq 0x3d8a(%rip), %rcx      # 0x5a48
leaq 0x1500(%rip), %rdi      # 0x31c5
movl $0x10, %esi
movl $0x1, %edx
callq 0x1120
xorl %eax, %eax
jmp 0x1d0f
movq 0x3d69(%rip), %rcx      # 0x5a48
leaq 0x14f0(%rip), %rdi      # 0x31d6
movl $0x11, %esi
jmp 0x1d00
movq 0x3d54(%rip), %rcx      # 0x5a48
leaq 0x14b9(%rip), %rdi      # 0x31b4
movl $0x10, %esi
movl $0x1, %edx
callq 0x1120
movl $0x1, %eax
movl %eax, 0x3d3b(%rip)      # 0x5a50
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/g3ida[P]g3idaCompiler/parse.c
// Function: simple_expr
exprType simple_expr(void)
{
    exprType tlhs, trhs;
    char* opstr;
    tlhs = term();
    while ((token==PLUS)||(token==MINUS) || (token==OR))
    {
        opstr = copyString(lexeme);
        if(token == OR) {
        if(tlhs != Boolean && tlhs !=TypeError) {
            ERROR_MSG("expected Boolean operand for 'OR' operator (found %s)\n", typeToStr(tlhs));
            tlhs = TypeError;
        }
      }
      accepter(token);
      trhs = term();
      if(trhs != tlhs && tlhs !=TypeError) {
         ERROR_MSG("type mismatch cannot convert %s to %s\n", typeToStr(trhs), typeToStr(tlhs));
         tlhs = TypeError;
      }
      EMETTRE("%s\n", opstr);
      free(opstr);
    }
    return tlhs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x1e6d
movl %eax, %ebp
movl 0x3d1a(%rip), %eax      # 0x5a54
addl $-0x19, %eax
cmpl $0x2, %eax
ja 0x1e5c
leaq 0x3387(%rip), %rbx      # 0x50d4
leaq 0x337c(%rip), %r14      # 0x50d0
leaq 0x18b9(%rip), %r13      # 0x3614
leaq 0x3d0e(%rip), %rdi      # 0x5a70
callq 0x12d5
movq %rax, %r15
cmpl $0x1b, 0x3ce3(%rip)     # 0x5a54
sete %al
leal -0x5(%rbp), %ecx
cmpl $-0x2, %ecx
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1dc1
leaq 0x3325(%rip), %rax      # 0x50b0
movl (%rax), %esi
leaq 0x134d(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
movl %ebp, %edi
callq 0x132d
leaq 0x143f(%rip), %rdi      # 0x31e8
movq %rax, %rsi
xorl %eax, %eax
callq 0x10a0
incl (%rbx)
movl $0x1, (%r14)
movl $0x4, %ebp
movl 0x3c8d(%rip), %edi      # 0x5a54
callq 0x152f
callq 0x1e6d
movl %eax, %r12d
cmpl %ebp, %eax
sete %al
cmpl $0x4, %ebp
sete %cl
orb %al, %cl
jne 0x1e2e
leaq 0x32c6(%rip), %rax      # 0x50b0
movl (%rax), %esi
leaq 0x12ee(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
movl %r12d, %edi
callq 0x132d
movq %rax, %r12
movl %ebp, %edi
callq 0x132d
leaq 0x140c(%rip), %rdi      # 0x321f
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x10a0
incl (%rbx)
movl $0x1, (%r14)
movl $0x4, %ebp
movq 0x3c13(%rip), %rdi      # 0x5a48
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10d0
movq %r15, %rdi
callq 0x1030
movl 0x3c04(%rip), %eax      # 0x5a54
addl $-0x19, %eax
cmpl $0x3, %eax
jb 0x1d5b
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq