LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: rb_tree_remove_all
void rb_tree_remove_all(rb_tree *tree, void (* free_data) (void *)) {

    rb_node *root;
    rb_node *left;
    rb_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 0xa94d
movq (%rdi), %r14
movq $0x0, (%rdi)
testq %r14, %r14
je 0xa947
movq %rsi, %rbx
movq 0x8(%r14), %r15
testq %r15, %r15
je 0xa929
movq 0x10(%r15), %rax
movq %r14, 0x10(%r15)
movq %rax, 0x8(%r14)
jmp 0xa93f
movq 0x10(%r14), %r15
testq %rbx, %rbx
je 0xa937
movq (%r14), %rdi
callq *%rbx
movq %r14, %rdi
callq 0x1120
movq %r15, %r14
testq %r15, %r15
jne 0xa912
popq %rbx
popq %r14
popq %r15
retq
leaq 0x392f(%rip), %rdi      # 0xe283
leaq 0x38b2(%rip), %rsi      # 0xe20d
leaq 0x4025(%rip), %rcx      # 0xe987
movl $0xd26, %edx            # imm = 0xD26
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: is_rb_tree
int is_rb_tree(const rb_tree *tree) {

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

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

    // General Case:
    if (is_rb_subtree(tree, tree->root, NULL, NULL) == -1) { return NO;  }
    else                                                   { return YES; }
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xb67e
cmpq $0x0, 0x8(%rdi)
je 0xb685
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xb677
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xb68e
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
setne %al
jmp 0xb68c
movl $0x1, %eax
jmp 0xb68c
callq 0x1398
jmp 0xb68a
callq 0x137c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: is_rb_subtree
static int is_rb_subtree(const rb_tree *tree, const rb_node *node,
                         const void *min, const void *max) {

    int left_height  = 0;
    int right_height = 0;

    // 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 rb_tree\n");
        return -1;
    }
    if (max != NULL && (tree->comp)(node->data, max) >= 0) {
        fprintf(stderr, "ERROR: Symmetric order not satisfied in rb_tree\n");
        return -1;
    }

    // Check for RED violations:
    if (node->color == RED) {
        if (node->left  != NULL && node->left->color  == RED) {
            fprintf(stderr, "ERROR: Two RED nodes in a row in rb_tree\n");
            return -1;
        }
        if (node->right != NULL && node->right->color == RED) {
            fprintf(stderr, "ERROR: Two RED nodes in a row in rb_tree\n");
            return -1;
        }
    }

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

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

    // Check for BLACK violations:
    if (left_height != right_height) {
        fprintf(stderr, "ERROR: Different BLACK height in rb_tree\n");
        return -1;
    }
    
    // Return Black-Height of "node":
    if (node->color == RED){ return left_height; }
    return left_height+1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
testq %rdx, %rdx
je 0xb6bc
movq (%rbx), %rsi
movq %r12, %rdi
callq *0x8(%r15)
testl %eax, %eax
jns 0xb746
testq %r14, %r14
je 0xb6cf
movq (%rbx), %rdi
movq %r14, %rsi
callq *0x8(%r15)
testl %eax, %eax
jns 0xb74d
cmpb $0x1, 0x18(%rbx)
movq 0x8(%rbx), %rsi
jne 0xb6f3
testq %rsi, %rsi
je 0xb6e4
cmpb $0x1, 0x18(%rsi)
je 0xb75b
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0xb6f3
cmpb $0x1, 0x18(%rax)
je 0xb762
xorl %r13d, %r13d
movl $0x0, %ebp
testq %rsi, %rsi
je 0xb715
movq (%rbx), %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0xb68e
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xb767
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0xb734
movq (%rbx), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0xb68e
movl %eax, %r13d
cmpl $-0x1, %eax
je 0xb767
cmpl %r13d, %ebp
jne 0xb754
xorl %eax, %eax
cmpb $0x1, 0x18(%rbx)
setne %al
addl %eax, %ebp
jmp 0xb76c
callq 0x13b4
jmp 0xb767
callq 0x13d0
jmp 0xb767
callq 0x1424
jmp 0xb767
callq 0x13ec
jmp 0xb767
callq 0x1408
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: print_rb_tree
void print_rb_tree(const rb_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_rb_subtree(tree->root->right, YES, "     ", print_node);
        }

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

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xb84d
movq %rdi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0xb84d
movq %rsi, %rbx
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xb7bd
leaq 0x37ac(%rip), %rdx      # 0xef59
movl $0x1, %esi
movq %rbx, %rcx
callq 0xb861
movq (%r14), %rax
cmpb $0x1, 0x18(%rax)
movq 0x6810(%rip), %r15      # 0x11fd8
movq (%r15), %rcx
leaq 0x3885(%rip), %rax      # 0xf057
leaq 0x3790(%rip), %rdi      # 0xef69
cmoveq %rax, %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x1100
movq (%r14), %rax
testq %rbx, %rbx
je 0xb7fb
movq (%rax), %rdi
callq *%rbx
jmp 0xb823
cmpb $0x1, 0x18(%rax)
movq (%r15), %rcx
jne 0xb80d
leaq 0x2ecc(%rip), %rdi      # 0xe6d7
jmp 0xb814
leaq 0x32e0(%rip), %rdi      # 0xeaf4
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 0xb84d
leaq 0x3716(%rip), %rdx      # 0xef59
xorl %esi, %esi
movq %rbx, %rcx
callq 0xb861
movq 0x6784(%rip), %rax      # 0x11fd8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O3/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: new_sp_tree
sp_tree *new_sp_tree(int (* comp) (const void *, const void *)) {

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

    // Allocate memory:
    sp_tree *tree = (sp_tree *) malloc(sizeof(sp_tree));
    if (tree == NULL) {
        fprintf(stderr, "ERROR: Unable to allocate memory for sp_tree\n");
    }

    // Initialize the empty tree:
    else {
        tree->root = NULL;
        tree->comp = comp;
    }

    return tree;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xba31
movq %rdi, %rbx
movl $0x10, %edi
callq 0x10d0
movq %rax, %r14
testq %rax, %rax
je 0xba2a
movq $0x0, (%r14)
movq %rbx, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x1440
jmp 0xba1f
leaq 0x27c8(%rip), %rdi      # 0xe200
leaq 0x27ce(%rip), %rsi      # 0xe20d
leaq 0x30b2(%rip), %rcx      # 0xeaf8
movl $0x121f, %edx           # imm = 0x121F
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/CarlosLunaMota[P]BinaryTrees/BinaryTrees.c
// Function: sp_tree_copy
sp_tree *sp_tree_copy(sp_tree *tree) {

    sp_tree *new_tree;
    void    *data;
    
    // Sanity check:
    assert(tree != NULL);
    
    // Create a new tree:
    new_tree = new_sp_tree(tree->comp);
    if (tree == NULL) { return NULL; }

    // Get the smallest element of tree:
    data = sp_tree_min(tree);

    // Insert all data from tree into new_tree:
    while (data != NULL) {

        // insert data in new_tree:
        sp_tree_insert_max(new_tree, data);

        // advance data:
        data = sp_tree_next(tree, data);
    }

    // Return the resulting tree:
    return new_tree;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xbaa0
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xb9f6
movq %rax, %r14
movq %rbx, %rdi
callq 0xbabf
testq %rax, %rax
je 0xba97
movq %rax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xbb4d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xbc60
movq %rax, %r15
testq %rax, %rax
jne 0xba79
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x27dc(%rip), %rdi      # 0xe283
leaq 0x275f(%rip), %rsi      # 0xe20d
leaq 0x30ab(%rip), %rcx      # 0xeb60
movl $0x123b, %edx           # imm = 0x123B
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xbb2e
movq (%rdi), %rax
testq %rax, %rax
je 0xbb0b
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rcx
testq %rdx, %rdx
je 0xbb12
movq %rdx, %rsi
movq 0x10(%rdx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x10(%rsi)
cmpq $0x0, 0x8(%rsi)
je 0xbb0f
movq %rsi, 0x8(%rcx)
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rdx
movq %rsi, %rcx
jmp 0xbadf
xorl %eax, %eax
jmp 0xbb29
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 0x274e(%rip), %rdi      # 0xe283
leaq 0x26d1(%rip), %rsi      # 0xe20d
leaq 0x3135(%rip), %rcx      # 0xec78
movl $0x1322, %edx           # imm = 0x1322
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xbc22
movq %rsi, %rbx
testq %rsi, %rsi
je 0xbc41
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq (%rdi), %r15
testq %r15, %r15
je 0xbbb3
movq 0x10(%r15), %rcx
leaq 0x8(%rsp), %rax
testq %rcx, %rcx
je 0xbbbb
movq %rcx, %rdx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%r15)
movq %r15, 0x8(%rdx)
cmpq $0x0, 0x10(%rdx)
je 0xbbb8
movq %rdx, 0x10(%rax)
movq 0x10(%rdx), %r15
movq 0x10(%r15), %rcx
movq %rdx, %rax
jmp 0xbb87
xorl %r15d, %r15d
jmp 0xbbdd
movq %rdx, %r15
movq 0x8(%r15), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r15)
movq %r15, (%r14)
movq (%r15), %rsi
movq %rbx, %rdi
callq *0x8(%r14)
testl %eax, %eax
je 0xbc02
movl $0x18, %edi
callq 0x10d0
movq %rax, (%r14)
testq %rax, %rax
je 0xbc15
movq %rbx, (%rax)
movq %r15, 0x8(%rax)
movq $0x0, 0x10(%rax)
xorl %eax, %eax
jmp 0xbc0b
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 0xbbfe
leaq 0x265a(%rip), %rdi      # 0xe283
leaq 0x25dd(%rip), %rsi      # 0xe20d
leaq 0x2fc1(%rip), %rcx      # 0xebf8
movl $0x12d7, %edx           # imm = 0x12D7
callq 0x1080
leaq 0x26ba(%rip), %rdi      # 0xe302
leaq 0x25be(%rip), %rsi      # 0xe20d
leaq 0x2fa2(%rip), %rcx      # 0xebf8
movl $0x12d8, %edx           # imm = 0x12D8
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xc275
movq %rsi, %r14
testq %rsi, %rsi
je 0xc294
movq %rdi, %rbx
movq (%rdi), %r13
testq %r13, %r13
je 0xc25d
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 0xc1e4
je 0xc227
movq 0x10(%r13), %rax
testq %rax, %rax
je 0xc227
movq (%rax), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
jle 0xc1d6
movq 0x10(%r13), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%r13)
movq %r13, 0x8(%rax)
cmpq $0x0, 0x10(%rax)
movq %rax, %r13
je 0xc22a
movq %r13, 0x10(%r12)
leaq 0x10(%r13), %rax
movq %r13, %r12
jmp 0xc21f
movq 0x8(%r13), %rax
testq %rax, %rax
je 0xc227
movq (%rax), %rsi
movq %r14, %rdi
callq *0x8(%rbx)
testl %eax, %eax
jns 0xc214
movq 0x8(%r13), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%r13)
movq %r13, 0x10(%rax)
cmpq $0x0, 0x8(%rax)
movq %rax, %r13
je 0xc22a
movq %r13, 0x8(%r15)
leaq 0x8(%r13), %rax
movq %r13, %r15
movq (%rax), %r13
jmp 0xc192
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 0xc261
xorl %eax, %eax
jmp 0xc267
movq (%rbx), %rax
movq (%rax), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2007(%rip), %rdi      # 0xe283
leaq 0x1f8a(%rip), %rsi      # 0xe20d
leaq 0x29c0(%rip), %rcx      # 0xec4a
movl $0x130c, %edx           # imm = 0x130C
callq 0x1080
leaq 0x2067(%rip), %rdi      # 0xe302
leaq 0x1f6b(%rip), %rsi      # 0xe20d
leaq 0x29a1(%rip), %rcx      # 0xec4a
movl $0x130d, %edx           # imm = 0x130D
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xc322
movq (%rdi), %rax
testq %rax, %rax
je 0xc2ff
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq 0x10(%rax), %rdx
movq %rsp, %rcx
testq %rdx, %rdx
je 0xc306
movq %rdx, %rsi
movq 0x8(%rdx), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%rsi)
cmpq $0x0, 0x10(%rsi)
je 0xc303
movq %rsi, 0x10(%rcx)
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
movq %rsi, %rcx
jmp 0xc2d3
xorl %eax, %eax
jmp 0xc31d
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 0x1f5a(%rip), %rdi      # 0xe283
leaq 0x1edd(%rip), %rsi      # 0xe20d
leaq 0x295e(%rip), %rcx      # 0xec95
movl $0x1334, %edx           # imm = 0x1334
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xc76a
movq (%rdi), %rax
testq %rax, %rax
je 0xc737
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rcx
testq %rdx, %rdx
je 0xc73e
movq %rdx, %rsi
movq 0x10(%rdx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x10(%rsi)
cmpq $0x0, 0x8(%rsi)
je 0xc73b
movq %rsi, 0x8(%rcx)
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rdx
movq %rsi, %rcx
jmp 0xc70b
xorl %ebx, %ebx
jmp 0xc761
movq %rsi, %rax
movq 0x10(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
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 0x1b12(%rip), %rdi      # 0xe283
leaq 0x1a95(%rip), %rsi      # 0xe20d
leaq 0x25b9(%rip), %rcx      # 0xed38
movl $0x13cc, %edx           # imm = 0x13CC
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xc80b
movq (%rdi), %rax
testq %rax, %rax
je 0xc7d8
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq 0x10(%rax), %rdx
leaq 0x8(%rsp), %rcx
testq %rdx, %rdx
je 0xc7df
movq %rdx, %rsi
movq 0x8(%rdx), %rdx
movq %rdx, 0x10(%rax)
movq %rax, 0x8(%rsi)
cmpq $0x0, 0x10(%rsi)
je 0xc7dc
movq %rsi, 0x10(%rcx)
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
movq %rsi, %rcx
jmp 0xc7ac
xorl %ebx, %ebx
jmp 0xc802
movq %rsi, %rax
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rcx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
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 0x1a71(%rip), %rdi      # 0xe283
leaq 0x19f4(%rip), %rsi      # 0xe20d
leaq 0x253c(%rip), %rcx      # 0xed5c
movl $0x13e9, %edx           # imm = 0x13E9
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xc881
movq (%rdi), %r14
movq $0x0, (%rdi)
testq %r14, %r14
je 0xc87b
movq %rsi, %rbx
movq 0x8(%r14), %r15
testq %r15, %r15
je 0xc85d
movq 0x10(%r15), %rax
movq %r14, 0x10(%r15)
movq %rax, 0x8(%r14)
jmp 0xc873
movq 0x10(%r14), %r15
testq %rbx, %rbx
je 0xc86b
movq (%r14), %rdi
callq *%rbx
movq %r14, %rdi
callq 0x1120
movq %r15, %r14
testq %r15, %r15
jne 0xc846
popq %rbx
popq %r14
popq %r15
retq
leaq 0x19fb(%rip), %rdi      # 0xe283
leaq 0x197e(%rip), %rsi      # 0xe20d
leaq 0x24ea(%rip), %rcx      # 0xed80
movl $0x1417, %edx           # imm = 0x1417
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xcb00
movq %rsi, %r15
testq %rsi, %rsi
je 0xcb1f
movq %rdi, %r14
cmpq %r15, %rdi
je 0xcae0
movq 0x8(%r14), %rdi
callq 0xb9f6
testq %rax, %rax
je 0xcaf1
movq %rax, %rbx
cmpq $0x0, (%r14)
je 0xcaf3
cmpq $0x0, (%r15)
je 0xcaf3
movq %r14, %rdi
callq 0xbabf
movq %rax, %r12
movq %r15, %rdi
callq 0xbabf
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xcaf3
movq %r12, %rdi
movq %r13, %rsi
callq *0x8(%rbx)
testl %eax, %eax
js 0xcac6
jne 0xcab6
movq %rbx, %rdi
movq %r12, %rsi
callq 0xbb4d
movq %r14, %rdi
movq %r12, %rsi
callq 0xbc60
movq %rax, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0xbc60
movq %rax, %r13
jmp 0xcad4
movq %r14, %rdi
movq %r12, %rsi
callq 0xbc60
movq %rax, %r12
testq %r12, %r12
je 0xcaf3
testq %r13, %r13
jne 0xca8e
jmp 0xcaf3
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xba50
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1a0f(%rip), %rdi      # 0xe516
leaq 0x16ff(%rip), %rsi      # 0xe20d
leaq 0x22cd(%rip), %rcx      # 0xede2
movl $0x149d, %edx           # imm = 0x149D
callq 0x1080
leaq 0x1a38(%rip), %rdi      # 0xe55e
leaq 0x16e0(%rip), %rsi      # 0xe20d
leaq 0x22ae(%rip), %rcx      # 0xede2
movl $0x149e, %edx           # imm = 0x149E
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0xcded
cmpq $0x0, 0x8(%rdi)
je 0xcdf4
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xcde6
xorl %edx, %edx
xorl %ecx, %ecx
popq %rax
jmp 0xcdfd
movl $0x1, %eax
jmp 0xcdfb
callq 0x1527
jmp 0xcdf9
callq 0x150b
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xce24
movq (%r15), %rsi
movq %r12, %rdi
callq *0x8(%r14)
testl %eax, %eax
jns 0xce74
testq %rbx, %rbx
je 0xce37
movq (%r15), %rdi
movq %rbx, %rsi
callq *0x8(%r14)
testl %eax, %eax
jns 0xce7b
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0xce52
movq (%r15), %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0xcdfd
testl %eax, %eax
je 0xce80
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0xce6d
movq (%r15), %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0xcdfd
testl %eax, %eax
je 0xce80
movl $0x1, %eax
jmp 0xce82
callq 0x1543
jmp 0xce80
callq 0x155f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xcf3d
movq %rdi, %r14
movq (%rdi), %rax
testq %rax, %rax
je 0xcf3d
movq %rsi, %rbx
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xcecb
leaq 0x209b(%rip), %rdx      # 0xef59
movl $0x1, %esi
movq %rbx, %rcx
callq 0xcf51
movq 0x5106(%rip), %r15      # 0x11fd8
movq (%r15), %rcx
leaq 0x208d(%rip), %rdi      # 0xef69
movl $0x4, %esi
movl $0x1, %edx
callq 0x1100
testq %rbx, %rbx
je 0xcefa
movq (%r14), %rax
movq (%rax), %rdi
callq *%rbx
jmp 0xcf13
movq (%r15), %rcx
leaq 0x17d3(%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 0xcf3d
leaq 0x2026(%rip), %rdx      # 0xef59
xorl %esi, %esi
movq %rbx, %rcx
callq 0xcf51
movq 0x5094(%rip), %rax      # 0x11fd8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O3/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 0xd078
movq %rax, %r15
cmpq $0x0, 0x10(%r14)
je 0xcfc8
cmpl $0x1, %ebp
leaq 0x1fc3(%rip), %rax      # 0xef58
leaq 0x1fc3(%rip), %rcx      # 0xef5f
cmoveq %rax, %rcx
leaq 0x1fac(%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 0xcf51
testl %ebp, %ebp
movq 0x5007(%rip), %r13      # 0x11fd8
movq (%r13), %rdi
leaq 0x1f92(%rip), %rax      # 0xef6e
leaq 0x1f83(%rip), %rsi      # 0xef66
cmoveq %rax, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10b0
testq %rbx, %rbx
je 0xcffd
movq (%r14), %rdi
callq *%rbx
jmp 0xd017
movq (%r13), %rcx
leaq 0x16cf(%rip), %rdi      # 0xe6d7
movl $0x3, %esi
movl $0x1, %edx
callq 0x1100
movl $0xa, %edi
callq 0x1030
cmpq $0x0, 0x8(%r14)
je 0xd062
cmpl $0x1, %ebp
leaq 0x1f2d(%rip), %rax      # 0xef5f
leaq 0x1f1f(%rip), %rcx      # 0xef58
cmoveq %rax, %rcx
leaq 0x1f0f(%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 0xcf51
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1120
leaq 0x1e6f(%rip), %rdi      # 0xeeee
leaq 0x1187(%rip), %rsi      # 0xe20d
leaq 0x2008(%rip), %rcx      # 0xf095
movl $0x15c3, %edx           # imm = 0x15C3
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/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 0x402077
movl 0x80(%rbx), %ecx
movl 0x84(%rbx), %edx
movq 0xe9133(%rip), %rsi     # 0x4eb008
cmpl $0x0, 0xe9124(%rip)     # 0x4eb000
jne 0x401f49
xorl %edi, %edi
movl %ecx, %eax
lock
cmpxchgl %edx, (%rsi)
jne 0x401f26
cmpq $0x0, 0xe8910(%rip)     # 0x4ea800
je 0x401f0c
movq 0xe890f(%rip), %rax     # 0x4ea808
xorl %r8d, %r8d
incq (%rax,%r8,8)
incq %r8
cmpq 0xe88f6(%rip), %r8      # 0x4ea800
jb 0x401efc
incl %edi
movl %edi, %eax
xorl $0x2710, %eax           # imm = 0x2710
orl %ecx, %eax
jne 0x401f26
lock
addl $0x4e20, 0xe8cdc(%rip)  # imm = 0x4E20
xorl %edi, %edi
cmpq $0x0, 0xe61e2(%rip)     # 0x4e8110
je 0x401f40
xorl %eax, %eax
pause
incq %rax
cmpq 0xe61d2(%rip), %rax     # 0x4e8110
jb 0x401f32
cmpl $0x0, 0xe90b9(%rip)     # 0x4eb000
je 0x401ee0
xorl %edi, %edi
callq 0x41e550
// File: /workspace/github_c_makefile_star2_O3/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 0x402077
movq 0xe9010(%rip), %rax     # 0x4eb008
movl 0x80(%rbx), %ecx
testl %ecx, %ecx
movl $0x1, %esi
movabsq $0x100000000, %rdx      # imm = 0x100000000
cmoveq %rsi, %rdx
cmpl $0x0, 0xe8fe6(%rip)     # 0x4eb000
jne 0x402070
xorl %edi, %edi
xorl %esi, %esi
movq %rdx, %r8
lock
xaddq %r8, (%rax)
cmpl $0x1, %ecx
jne 0x40204c
cmpl %r8d, %edi
je 0x40204c
incl %esi
cmpl $0x2710, %esi           # imm = 0x2710
jne 0x402049
lock
addl $0x4e20, 0xe8bb9(%rip)  # imm = 0x4E20
xorl %esi, %esi
movl %r8d, %edi
cmpq $0x0, 0xe60bc(%rip)     # 0x4e8110
je 0x402067
xorl %r8d, %r8d
pause
incq %r8
cmpq 0xe60ab(%rip), %r8      # 0x4e8110
jb 0x402059
cmpl $0x0, 0xe8f92(%rip)     # 0x4eb000
je 0x402020
xorl %edi, %edi
callq 0x41e550
// File: /workspace/github_c_makefile_star2_O3/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 0x402123
cmpl $0x0, 0x80(%rbx)
jne 0x4020d2
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, 0xe8f44(%rip)     # 0x4eb008
cmpq $-0x1, %rax
je 0x402128
movl 0x80(%rbx), %ecx
movl %ecx, (%rax)
leaq 0xe8f37(%rip), %rdi     # 0x4eb010
callq 0x41fe60
cmpb $0x0, 0xe8f83(%rip)     # 0x4eb068
je 0x4020fc
movb $0x0, 0xe8f7a(%rip)     # 0x4eb068
leaq 0xe8f43(%rip), %rdi     # 0x4eb038
callq 0x41bc10
jmp 0x402116
movb $0x1, 0xe8f65(%rip)     # 0x4eb068
leaq 0xe8f2e(%rip), %rdi     # 0x4eb038
leaq 0xe8eff(%rip), %rsi     # 0x4eb010
callq 0x41c260
leaq 0xe8ef3(%rip), %rdi     # 0x4eb010
popq %rbx
jmp 0x420d40
callq 0x40125e
callq 0x401273
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
cmpl $0x2, %edi
jl 0x1391
movq 0x8(%rsi), %rax
cmpb $0x2d, (%rax)
jne 0x1395
cmpb $0x61, 0x1(%rax)
jne 0x1395
cmpb $0x0, 0x2(%rax)
sete %bpl
jmp 0x1397
xorl %ebp, %ebp
jmp 0x13a5
xorl %ebp, %ebp
cmpl $0x2, %edi
jne 0x13a5
testb %bpl, %bpl
je 0x1478
leaq 0x2d7c(%rip), %rdi      # 0x4128
callq 0x1490
movq 0x2d70(%rip), %rdi      # 0x4128
leaq 0x2d71(%rip), %rsi      # 0x4130
callq 0x14ce
movq 0x2d5d(%rip), %rdi      # 0x4128
movq 0x2d5e(%rip), %rsi      # 0x4130
leaq 0x10(%rsp), %rdx
callq 0x14fc
testl %eax, %eax
jle 0x1467
movl %eax, %r14d
xorl %r15d, %r15d
leaq 0x8(%rsp), %rbx
movq 0x2d32(%rip), %rdi      # 0x4128
movq 0x10(%rsp), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdx
callq 0x154e
testl %eax, %eax
jle 0x145f
movl %eax, %r12d
xorl %r13d, %r13d
movq 0x2d10(%rip), %rdi      # 0x4128
movq 0x8(%rsp), %rax
movl (%rax,%r13,4), %esi
callq 0x15a0
movq 0x2cfb(%rip), %rdi      # 0x4128
movl 0xc(%rax), %esi
callq 0x164c
testq %rax, %rax
setne %al
orb %bpl, %al
cmpb $0x1, %al
jne 0x1457
movq 0x2cdf(%rip), %rdi      # 0x4128
movq 0x8(%rsp), %rax
movl (%rax,%r13,4), %esi
callq 0x1335
incq %r13
cmpq %r13, %r12
jne 0x1411
incq %r15
cmpq %r14, %r15
jne 0x13ef
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsi), %rsi
leaq 0xb82(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x10c0
xorl %edi, %edi
callq 0x11e0
// File: /workspace/github_c_makefile_star2_O3/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 0x2745
movl $0x1, %eax
xorl %esi, %esi
xorl %edx, %edx
addl (%r13,%rdx,4), %ebx
cmpl $0x9, %ebx
jl 0x2724
cmpl $0x10, %ebx
movl $0x10, %ecx
cmovbl %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 (%rbp), %sil
movb $0x8, %cl
subb %bl, %cl
movl $0x1, %edi
shll %cl, %edi
orb %sil, %dil
movb %dil, (%rbp)
incq %rdx
movl %edi, %esi
cmpq %rdx, %r12
jne 0x26ed
decl %eax
movslq %eax, %rbx
movq %rbx, (%r15)
movq %rbx, %rdi
callq 0x2170
movq %rax, (%r14)
testq %rax, %rax
je 0x277b
leaq 0x47c1(%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 0x1a8c(%rip), %rdi      # 0x420e
callq 0x21d0
movl $0x1, %eax
jmp 0x276c
// File: /workspace/github_c_makefile_star2_O3/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 0x12df(%rip), %rsi      # 0x44af
callq 0x21c0
testq %rax, %rax
je 0x323f
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 0x3238
xorl %r15d, %r15d
movb %al, (%r14,%r15)
incq %r15
movq %rbx, %rdi
callq 0x20d0
cmpl $-0x1, %eax
jne 0x3224
movb $0x0, (%r14,%r15)
jmp 0x3242
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
testq %rdi, %rdi
je 0x1312
movq %rdi, %rbx
callq 0x1080
incl %eax
movslq %eax, %rdi
callq 0x10e0
testq %rax, %rax
je 0x12fe
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x1050
movl 0x3dac(%rip), %esi      # 0x50b0
leaq 0x1d32(%rip), %rdi      # 0x303d
xorl %eax, %eax
callq 0x10a0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x22e3
movl %eax, 0x4716(%rip)      # 0x5a54
movl $0x2, %edi
callq 0x1517
leaq 0x4721(%rip), %rdi      # 0x5a70
callq 0x1294
xorl %edi, %edi
callq 0x1517
movl $0x21, %edi
callq 0x1517
cmpl $0x3, 0x46e8(%rip)      # 0x5a54
jne 0x1477
leaq 0x46f7(%rip), %rbx      # 0x5a70
leaq 0x3d58(%rip), %r12      # 0x50d8
leaq 0x3d29(%rip), %rbp      # 0x50b0
leaq 0x1d92(%rip), %r15      # 0x3120
leaq 0x3d3b(%rip), %r13      # 0x50d0
leaq 0x3d44(%rip), %r14      # 0x50e0
movl $0x3, %edi
callq 0x1517
movq %rbx, %rdi
callq 0x1294
movl (%r12), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x13e7
movl (%rbp), %esi
leaq 0x1d1f(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10a0
leaq 0x3cf7(%rip), %rax      # 0x50d4
incl (%rax)
movl $0x1, (%r13)
xorl %edi, %edi
callq 0x1517
cmpl $0x25, 0x465f(%rip)     # 0x5a54
jne 0x13fe
movl $0x25, %edi
jmp 0x13a1
movl $0x24, %edi
callq 0x1517
movl 0x4646(%rip), %edi      # 0x5a54
cmpl $0x6, %edi
je 0x1421
xorl %ebp, %ebp
cmpl $0x7, %edi
jne 0x142b
movl $0x2, %ebp
jmp 0x1426
movl $0x1, %ebp
callq 0x1517
movslq (%r12), %rax
cmpq $0x2, %rax
jl 0x1459
leaq (%rax,%rax,2), %rax
leaq -0x18(,%rax,8), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x20(%r14,%rcx)
jne 0x1450
movl %ebp, 0x20(%r14,%rcx)
addq $0x18, %rcx
cmpq %rcx, %rax
jne 0x1443
movl $0x21, %edi
callq 0x1517
cmpl $0x3, 0x45ea(%rip)      # 0x5a54
leaq 0x3c3f(%rip), %rbp      # 0x50b0
je 0x139c
movl $0x4, %edi
callq 0x1517
movl 0x45cd(%rip), %eax      # 0x5a54
cmpl $0x5, %eax
je 0x14ab
cmpl $0x20, %eax
je 0x14ab
jmp 0x149d
movl $0x21, %edi
callq 0x1517
callq 0x15a3
cmpl $0x21, 0x45ab(%rip)     # 0x5a54
je 0x1493
movl $0x5, %edi
callq 0x1517
movl $0x26, %edi
callq 0x1517
leaq 0x3c0e(%rip), %rax      # 0x50d4
movl (%rax), %esi
leaq 0x1be5(%rip), %rdi      # 0x30b4
xorl %eax, %eax
callq 0x10a0
movq 0x456b(%rip), %rdi      # 0x5a48
callq 0x1070
leaq 0x3be7(%rip), %rax      # 0x50d0
cmpl $0x0, (%rax)
je 0x1508
leaq 0x1be1(%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_O3/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, 0x4536(%rip)      # 0x5a54
jne 0x152d
callq 0x22e3
movl %eax, 0x4529(%rip)      # 0x5a54
popq %rbx
retq
movl %edi, %ebx
leaq 0x3b7a(%rip), %rax      # 0x50b0
movl (%rax), %esi
leaq 0x1ba2(%rip), %rdi      # 0x30e1
xorl %eax, %eax
callq 0x10a0
leaq 0x1baf(%rip), %rdi      # 0x30fc
xorl %eax, %eax
callq 0x10a0
leaq 0x3b79(%rip), %rax      # 0x50d4
incl (%rax)
leaq 0x3b6c(%rip), %rax      # 0x50d0
movl $0x1, (%rax)
movl 0x44e4(%rip), %edi      # 0x5a54
leaq 0x44f9(%rip), %rsi      # 0x5a70
callq 0x2110
leaq 0x1b8d(%rip), %rdi      # 0x3110
xorl %eax, %eax
callq 0x10a0
leaq 0x1cec(%rip), %rsi      # 0x327d
movl %ebx, %edi
callq 0x2110
movl $0xa, %edi
popq %rbx
jmp 0x1040