LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_line_indent_
static void
acutest_line_indent_(int level)
{
    static const char spaces[] = "                ";
    int n = level * 2;

    if(acutest_tap_  &&  n > 0) {
        n--;
        printf("#");
    }

    while(n > 16) {
        printf("%s", spaces);
        n -= 16;
    }
    printf("%.*s", n, spaces);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
addl %ebx, %ebx
cmpb $0x1, 0x7a50(%rip)      # 0xa2e0
jne 0x289e
decl %ebx
movl $0x23, %edi
callq 0x2030
cmpl $0x11, %ebx
jl 0x28ca
leaq 0x3de1(%rip), %r14      # 0x668b
leaq 0x37bf(%rip), %r15      # 0x6070
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x20f0
leal -0x10(%rbx), %esi
cmpl $0x20, %ebx
movl %esi, %ebx
jg 0x28b1
jmp 0x28cc
movl %ebx, %esi
leaq 0x3d87(%rip), %rdi      # 0x665a
leaq 0x3796(%rip), %rdx      # 0x6070
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_case_
acutest_case_(const char* fmt, ...)
{
    va_list args;

    if(acutest_verbose_level_ < 2)
        return;

    if(acutest_case_name_[0]) {
        acutest_case_already_logged_ = 0;
        acutest_case_name_[0] = '\0';
    }

    if(fmt == NULL)
        return;

    va_start(args, fmt);
    vsnprintf(acutest_case_name_, sizeof(acutest_case_name_) - 1, fmt, args);
    va_end(args);
    acutest_case_name_[sizeof(acutest_case_name_) - 1] = '\0';

    if(acutest_verbose_level_ >= 3) {
        acutest_line_indent_(1);
        acutest_colored_printf_(ACUTEST_COLOR_DEFAULT_INTENSIVE_, "Case %s:\n", acutest_case_name_);
        acutest_test_already_logged_++;
        acutest_case_already_logged_++;
    }
}

// Assembly:
subq $0xd8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2a58
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x2, 0x7709(%rip)      # 0xa168
jl 0x2b00
movq %rdi, %r10
cmpb $0x0, 0x7731(%rip)      # 0xa1a0
je 0x2a82
movl $0x0, 0x7719(%rip)      # 0xa194
movb $0x0, 0x771e(%rip)      # 0xa1a0
testq %r10, %r10
je 0x2b00
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x76ed(%rip), %rdi      # 0xa1a0
movl $0x3f, %esi
movq %r10, %rdx
callq 0x20a0
movb $0x0, 0x7718(%rip)      # 0xa1df
cmpl $0x3, 0x769a(%rip)      # 0xa168
jl 0x2b00
movl $0x1, %edi
callq 0x2880
leaq 0x3626(%rip), %rsi      # 0x6107
leaq 0x76b8(%rip), %rdx      # 0xa1a0
movl $0x3, %edi
xorl %eax, %eax
callq 0x28e6
incl 0x7686(%rip)            # 0xa180
incl 0x7694(%rip)            # 0xa194
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_message_
acutest_message_(const char* fmt, ...)
{
    char buffer[TEST_MSG_MAXSIZE];
    char* line_beg;
    char* line_end;
    va_list args;

    if(acutest_verbose_level_ < 2)
        return;

    /* We allow extra message only when something is already wrong in the
     * current test. */
    if(acutest_current_test_ == NULL  ||  !acutest_cond_failed_)
        return;

    va_start(args, fmt);
    vsnprintf(buffer, TEST_MSG_MAXSIZE, fmt, args);
    va_end(args);
    buffer[TEST_MSG_MAXSIZE-1] = '\0';

    line_beg = buffer;
    while(1) {
        line_end = strchr(line_beg, '\n');
        if(line_end == NULL)
            break;
        acutest_line_indent_(acutest_case_name_[0] ? 3 : 2);
        printf("%.*s\n", (int)(line_end - line_beg), line_beg);
        line_beg = line_end + 1;
    }
    if(line_beg[0] != '\0') {
        acutest_line_indent_(acutest_case_name_[0] ? 3 : 2);
        printf("%s\n", line_beg);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2b68
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl $0x2, 0x75f9(%rip)      # 0xa168
jl 0x2c5d
cmpq $0x0, 0x760b(%rip)      # 0xa188
je 0x2c5d
cmpl $0x0, 0x7656(%rip)      # 0xa1e0
je 0x2c5d
movq %rdi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4f0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x20a0
movb $0x0, 0x3ff(%rbx)
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20e0
testq %rax, %rax
je 0x2c3c
movq %rax, %r14
leaq 0xd0(%rsp), %rbx
leaq 0x3524(%rip), %r15      # 0x611f
cmpb $0x1, 0x759e(%rip)      # 0xa1a0
movl $0x3, %edi
sbbl $0x0, %edi
callq 0x2880
movl %r14d, %esi
subl %ebx, %esi
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20f0
movq %r14, %rbx
incq %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20e0
movq %rax, %r14
testq %rax, %rax
jne 0x2bfb
cmpb $0x0, (%rbx)
je 0x2c5d
cmpb $0x1, 0x7558(%rip)      # 0xa1a0
movl $0x3, %edi
sbbl $0x0, %edi
callq 0x2880
movq %rbx, %rdi
callq 0x2080
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTSet_test.c
// Function: insert_and_test
void insert_and_test(Set set, int* value) {

	set_insert(set, value);
	TEST_ASSERT(set_is_proper(set));
	int search = *value;
	TEST_ASSERT(set_find(set, &search) == value);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x51c5
movq %r14, %rdi
callq 0x554f
movzbl %al, %edi
leaq 0x2518(%rip), %rsi      # 0x6318
leaq 0x2884(%rip), %rcx      # 0x668b
leaq 0x2518(%rip), %r8       # 0x6326
movl $0x26, %edx
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x3e65
movl (%rbx), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
callq 0x4f16
xorl %edi, %edi
cmpq %rbx, %rax
sete %dil
leaq 0x24d9(%rip), %rsi      # 0x6318
leaq 0x2845(%rip), %rcx      # 0x668b
leaq 0x24ec(%rip), %r8       # 0x6339
movl $0x28, %edx
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x3e65
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2e23
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTSet_test.c
// Function: shuffle
void shuffle(int** array, int n) {
	for (int i = 0; i < n; i++) {
		int j = i + rand() / (RAND_MAX / (n - i) + 1);
		int* t = array[j];
		array[j] = array[i];
		array[i] = t;
	}
}

// Assembly:
testl %esi, %esi
jle 0x3eb8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
callq 0x2290
movl %eax, %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
idivl %r14d
movl %eax, %esi
incl %esi
movl %ecx, %eax
cltd
idivl %esi
cltq
addq %r15, %rax
movq (%rbx,%rax,8), %rcx
movq (%rbx,%r15,8), %rdx
movq %rdx, (%rbx,%rax,8)
movq %rcx, (%rbx,%r15,8)
incq %r15
decq %r14
jne 0x3e7c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTSet_test.c
// Function: test_create
void test_create(void) {

	// Δημιουργούμε ένα κενό set (χωρίς συνάρτηση αποδεύσμευσης)
	Set set = set_create(compare_ints, NULL);
	set_set_destroy_value(set, NULL);

	TEST_ASSERT(set != NULL);
	TEST_ASSERT(set_size(set) == 0);

	set_destroy(set);
}

// Assembly:
pushq %rbx
leaq -0xe7(%rip), %rdi       # 0x3dda
xorl %esi, %esi
callq 0x4ebc
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x5546
xorl %edi, %edi
testq %rbx, %rbx
setne %dil
leaq 0x2433(%rip), %rsi      # 0x6318
leaq 0x279f(%rip), %rcx      # 0x668b
leaq 0x2466(%rip), %r8       # 0x6359
movl $0x3f, %edx
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x3f41
movq %rbx, %rdi
callq 0x4f12
xorl %edi, %edi
testl %eax, %eax
sete %dil
leaq 0x23fe(%rip), %rsi      # 0x6318
leaq 0x276a(%rip), %rcx      # 0x668b
leaq 0x243d(%rip), %r8       # 0x6365
movl $0x40, %edx
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x3f41
movq %rbx, %rdi
popq %rbx
jmp 0x50b6
callq 0x2e23
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTSet_test.c
// Function: test_insert
void test_insert(void) {

	Set set = set_create(compare_ints, free);

	int N = 1000;

	int** value_array = malloc(N * sizeof(*value_array));

	// Δοκιμάζουμε την insert με νέες τιμές κάθε φορά και με αυτόματο free
	for (int i = 0; i < N; i++) {
		
		value_array[i] = create_int(i);

		insert_and_test(set, value_array[i]);

		TEST_ASSERT(set_size(set) == (i + 1));

	}

	// Δοκιμάζουμε την insert με τιμές που υπάρχουν ήδη στο Set
	// και ελέγχουμε ότι δεν ενημερώθηκε το size (καθώς δεν προστέθηκε νέος κόμβος)
	int* new_value = create_int(0);
	insert_and_test(set, new_value);

	TEST_ASSERT(set_size(set) == N);

	set_destroy(set);

	// Δοκιμάζουμε την insert χωρίς αυτόματο free
	Set set2 = set_create(compare_ints, NULL);
	
	int local_value1 = 0, local_value2 = 1, local_value3 = 1;

	insert_and_test(set2, &local_value1);
	insert_and_test(set2, &local_value2);
	insert_and_test(set2, &local_value3);		// ισοδύναμη τιμή => replace
	
	set_destroy(set2);
	free(value_array);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq -0x180(%rip), %rdi      # 0x3dda
movq 0x605f(%rip), %rsi      # 0x9fc0
callq 0x4ebc
movq %rax, %rbx
movl $0x1, %r13d
leaq 0x23a2(%rip), %r14      # 0x6318
leaq 0x270e(%rip), %r15      # 0x668b
leaq 0x23f4(%rip), %r12      # 0x6378
movl $0x4, %edi
callq 0x21a0
cmpl $0x3e9, %r13d           # imm = 0x3E9
je 0x3fda
leal -0x1(%r13), %ecx
movl %ecx, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3ddf
movq %rbx, %rdi
callq 0x4f12
xorl %edi, %edi
cmpl %eax, %r13d
sete %dil
movq %r14, %rsi
movl $0x54, %edx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x25dc
incl %r13d
testl %eax, %eax
jne 0x3f84
callq 0x2e23
movl $0x0, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3ddf
movq %rbx, %rdi
callq 0x4f12
xorl %edi, %edi
cmpl $0x3e8, %eax            # imm = 0x3E8
sete %dil
leaq 0x2313(%rip), %rsi      # 0x6318
leaq 0x267f(%rip), %rcx      # 0x668b
leaq 0x237e(%rip), %r8       # 0x6391
movl $0x5d, %edx
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x3fd5
movq %rbx, %rdi
callq 0x50b6
leaq -0x258(%rip), %rdi      # 0x3dda
xorl %esi, %esi
callq 0x4ebc
movq %rax, %rbx
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
movl $0x1, %eax
leaq 0x8(%rsp), %r14
movl %eax, (%r14)
leaq 0x4(%rsp), %r15
movl %eax, (%r15)
movq %rbx, %rdi
callq 0x3ddf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3ddf
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3ddf
movq %rbx, %rdi
callq 0x50b6
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/ADTSet_test.c
// Function: test_node_value
void test_node_value(void) {
	// Η συνάρτηση αυτή ελέγχει ότι ένας κόμβος περιέχει πάντα την αρχική του τιμή,
	// χωρίς να επηρρεάζεται από άλλους κόμβους που προστίθενται ή διαγράφονται.

	Set set = set_create(compare_ints, free);

	int N = 1000;
	int** value_array = malloc(N * sizeof(*value_array));

	for (int i = 0; i < N; i++)
		value_array[i] = create_int(i);

	shuffle(value_array, N);

	// Εισάγουμε έναν αριθμό και αποθηκεύουμε το node
	set_insert(set, value_array[0]);
	SetNode node = set_first(set);
	TEST_ASSERT(set_node_value(set, node) == value_array[0]);

	// Προσθήκη τιμών, και έλεγχος μετά από κάθε προσθήκη
	for (int i = 1; i < N; i++) {
		set_insert(set, value_array[i]);

		TEST_ASSERT(set_node_value(set, node) == value_array[0]);
	}

	// Διαγραφή τιμών, και έλεγχος μετά από κάθε διαγραφή
	for (int i = 1; i < N; i++) {
		set_remove(set, value_array[i]);

		TEST_ASSERT(set_node_value(set, node) == value_array[0]);
	}

	set_destroy(set);
	free(value_array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq -0x9f8(%rip), %rdi      # 0x3dda
movq 0x57e7(%rip), %rsi      # 0x9fc0
callq 0x4ebc
movq %rax, %rbx
movl $0x1f40, %edi           # imm = 0x1F40
callq 0x21a0
movq %rax, %r14
xorl %r15d, %r15d
movl $0x4, %edi
callq 0x21a0
movl %r15d, (%rax)
movq %rax, (%r14,%r15,8)
incq %r15
cmpq $0x3e8, %r15            # imm = 0x3E8
jne 0x47f1
movq %r14, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x3e6a
movq (%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x51c5
movq %rbx, %rdi
callq 0x5077
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5542
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x1ac9(%rip), %rsi      # 0x6318
leaq 0x1e35(%rip), %rcx      # 0x668b
leaq 0x1d51(%rip), %r8       # 0x65ae
movl $0x118, %edx            # imm = 0x118
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x4945
movl $0x1, %ebp
leaq 0x1d31(%rip), %r13      # 0x65ae
movq (%r14,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x51c5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5542
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x1a74(%rip), %rsi      # 0x6318
movl $0x11e, %edx            # imm = 0x11E
leaq 0x1ddb(%rip), %rcx      # 0x668b
movq %r13, %r8
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x4945
incq %rbp
cmpq $0x3e8, %rbp            # imm = 0x3E8
jne 0x487d
movl $0x1, %ebp
leaq 0x1cd4(%rip), %r13      # 0x65ae
movq (%r14,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x4f73
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5542
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x1a17(%rip), %rsi      # 0x6318
movl $0x125, %edx            # imm = 0x125
leaq 0x1d7e(%rip), %rcx      # 0x668b
movq %r13, %r8
xorl %eax, %eax
callq 0x25dc
testl %eax, %eax
je 0x4945
incq %rbp
cmpq $0x3e8, %rbp            # imm = 0x3E8
jne 0x48da
movq %rbx, %rdi
callq 0x50b6
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
callq 0x2e23
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_timer_print_diff_
static double
    acutest_timer_diff_(struct timespec start, struct timespec end)
    {
        double endns;
        double startns;

        endns = end.tv_sec;
        endns *= 1e9;
        endns += end.tv_nsec;

        startns = start.tv_sec;
        startns *= 1e9;
        startns += start.tv_nsec;

        return ((endns - startns)/ 1e9);
    }

// Assembly:
cvtsi2sdq 0x59cd(%rip), %xmm1 # 0xa320
movsd 0x16ad(%rip), %xmm2     # 0x6008
mulsd %xmm2, %xmm1
cvtsi2sdq 0x59c0(%rip), %xmm0 # 0xa328
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdq 0x5998(%rip), %xmm1 # 0xa310
cvtsi2sdq 0x5997(%rip), %xmm3 # 0xa318
mulsd %xmm2, %xmm1
addsd %xmm1, %xmm3
subsd %xmm3, %xmm0
divsd %xmm2, %xmm0
leaq 0x1cb7(%rip), %rdi      # 0x664f
movb $0x1, %al
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_error_
acutest_error_(const char* fmt, ...)
{
    if(acutest_verbose_level_ == 0)
        return;

    if(acutest_verbose_level_ >= 2) {
        va_list args;

        acutest_line_indent_(1);
        if(acutest_verbose_level_ >= 3)
            acutest_colored_printf_(ACUTEST_COLOR_RED_INTENSIVE_, "ERROR: ");
        va_start(args, fmt);
        vprintf(fmt, args);
        va_end(args);
        printf("\n");
    }

    if(acutest_verbose_level_ >= 3) {
        printf("\n");
    }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
testb %al, %al
je 0x4b9d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movl 0x55ac(%rip), %eax      # 0xa168
testl %eax, %eax
je 0x4c38
cmpl $0x2, %eax
jl 0x4c25
movq %rdi, %rbx
movl $0x1, %edi
callq 0x2880
cmpl $0x3, 0x558f(%rip)      # 0xa168
jl 0x4bee
leaq 0x1db5(%rip), %rsi      # 0x6997
movl $0x5, %edi
xorl %eax, %eax
callq 0x28e6
leaq 0x20(%rsp), %rax
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x21c0
movl $0xa, %edi
callq 0x2030
cmpl $0x3, 0x553c(%rip)      # 0xa168
jl 0x4c38
movl $0xa, %edi
callq 0x2030
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: set_create
Set set_create(CompareFunc compare, DestroyFunc destroy_value) {
	assert(compare != NULL);

	Set set = malloc(sizeof(*set));
	set->root = NULL;     // Kενό δέντρο.
	set->size = 0;
	set->compare = compare;
	set->destroy_value = destroy_value;

	return set;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4ef3
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %edi
callq 0x21a0
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2121(%rip), %rdi      # 0x701b
leaq 0x212a(%rip), %rsi      # 0x702b
leaq 0x2142(%rip), %rcx      # 0x704a
movl $0x22e, %edx            # imm = 0x22E
callq 0x2110
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: set_remove
bool set_remove(Set set, Pointer value) {

	bool removed;
	Pointer old_value = NULL;
	
	set->root = node_remove(set->root, set->compare, value, &removed, &old_value);

	if (removed) {
		set->size--;    // Το size αλλάζει μόνο αν πραγματικά αφαιρεθεί ένας κόμβος.

		if (set->destroy_value != NULL)
			set->destroy_value(old_value);
	}

	return removed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r12
testq %r12, %r12
je 0x4fe9
movq %rsi, %rdx
movq 0x10(%rbx), %rsi
leaq 0x4(%rsp), %r14
movl $0x9, (%r14)
movq %r12, %rdi
movq %r14, %rcx
callq 0x513e
movslq (%r14), %rbp
cmpq $-0x1, %rbp
setne %r14b
je 0x4ff4
movq %rax, %r13
movq 0x40(%rax,%rbp,8), %rdi
movq (%rdi), %r15
callq 0x22b0
cmpq $0x0, 0x10(%r13)
je 0x4ff9
movq 0x10(%r13,%rbp,8), %rdi
callq 0x5099
movq 0x8(%rax), %rcx
decl (%rcx)
movq %rax, 0x40(%r13,%rbp,8)
movq %r13, 0x8(%rax)
movq %rcx, %r13
jmp 0x501e
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x504c
xorl %r15d, %r15d
jmp 0x502d
movslq (%r13), %rax
decq %rax
cmpl %eax, %ebp
jge 0x501a
movq 0x48(%r13,%rbp,8), %rcx
movq %rcx, 0x40(%r13,%rbp,8)
leaq 0x1(%rbp), %rcx
movq %rcx, %rbp
cmpq %rcx, %rax
jne 0x5004
movl %eax, (%r13)
movq %r13, %rdi
callq 0x5735
cmpl $0x0, (%r12)
je 0x5032
movq %r12, %r13
jmp 0x504c
movq 0x10(%r12), %r13
testq %r13, %r13
je 0x5044
movq $0x0, 0x8(%r13)
movq %r12, %rdi
callq 0x22b0
movq %r13, (%rbx)
testb %r14b, %r14b
je 0x5065
decl 0x8(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x5065
movq %r15, %rdi
callq *%rax
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: node_find_min
static SetNode node_find_min(BTreeNode node) {
	if (node == NULL)
		return NULL;

	return node->children[0] != NULL
		? node_find_min(node->children[0])		// Υπάρχει το πιο αριστερό υποδέντρο, η μικρότερη τιμή βρίσκεται εκεί.
		: node->set_nodes[0];					// Αλλιώς ο μικρότερος set κόμβος είναι ο πρώτος σε αυτόν τον btree κόμβο
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x5093
movq %rdi, %rcx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x507e
movq 0x40(%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: node_find_max
static SetNode node_find_max(BTreeNode node) {
	if (node == NULL)
		return NULL;

	return node->children[node->count] != NULL
		? node_find_max(node->children[node->count] )	// Υπάρχει το πιο δεξί υποδέντρο, η μεγαλύτερη τιμή βρίσκεται εκεί.
		: node->set_nodes[node->count-1];				// Αλλιώς ο μεγαλύτερος set κόμβος είναι ο τελευταίος σε αυτόν τον btree κόμβο
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x50b5
movq %rdi, %rcx
movslq (%rdi), %rdx
movq 0x10(%rdi,%rdx,8), %rdi
testq %rdi, %rdi
jne 0x509b
movq 0x38(%rcx,%rdx,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: btree_destroy
static void btree_destroy(BTreeNode node, DestroyFunc destroy_value) {
	if (node == NULL)
		return;
	
	// Πρώτα κατάστρεψε τα παιδιά.
	for (int i = 0; i <= node->count; i++)
		btree_destroy(node->children[i], destroy_value);

	for (int i = 0; i < node->count; i++) {
		if (destroy_value != NULL)
			destroy_value(node->set_nodes[i]->value);	// Κατάστρεψε τις τιμές.

		free(node->set_nodes[i]);						// και free το set_node
	}

	free(node);  // Αποδέσμευσε το node.
}

// Assembly:
testq %rdi, %rdi
je 0x513d
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, (%rdi)
js 0x5103
movq $-0x1, %r15
movq 0x18(%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x50cf
movslq (%rbx), %rax
incq %r15
cmpq %rax, %r15
jl 0x50eb
cmpl $0x0, (%rbx)
jle 0x5130
xorl %r15d, %r15d
testq %r14, %r14
je 0x511b
movq 0x40(%rbx,%r15,8), %rax
movq (%rax), %rdi
callq *%r14
movq 0x40(%rbx,%r15,8), %rdi
callq 0x22b0
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0x510b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22b0
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: node_find
static BTreeNode node_find(BTreeNode node, CompareFunc compare, Pointer value, int* index) {
	if (node == NULL)
		return NULL;

	int i;  // Ορίζει τη διαχωριστική τιμή σε σχέση με την οποιά αναζητούμε την τιμή.
	for (i = 0; i < node->count; i++) {
		int compare_res = compare(value, node->set_nodes[i]->value); // Aποθήκευση για να μην καλέσουμε την compare 2 φορές.

		if (compare_res == 0) {
			*index = i;
			return node;  // Η τιμή βρέθηκε στον τρέχοντα κόμβο.

		} else if (compare_res < 0) {
			// Αφού η τιμή που αναζητούμε είναι μικρότερη της διαχωριστικής τιμής
			// τότε βρίσκεται στο αριστερό παιδί που ορίζει η διαχωριστική τιμή (παιδί i)
			break;
		}
	}

	// Αν είμαστε σε φύλλο, η τιμή δεν βρέθηκε αλλά μπορεί να προστεθεί εδώ. Αλλιώς συνεχίζουμε στο παιδί i
	if (is_leaf(node)) {
		*index = -1;
		return node;
	} else {
		return node_find(node->children[i], compare, value, index);  
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
testq %rbx, %rbx
je 0x51ad
cmpl $0x0, (%rbx)
jle 0x519d
xorl %r13d, %r13d
movq 0x40(%rbx,%r13,8), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq *%r12
testl %eax, %eax
je 0x517a
shrl $0x1e, %eax
andl $-0x2, %eax
jmp 0x5182
movl %r13d, (%r14)
movl $0x1, %eax
testl %eax, %eax
jne 0x5193
incq %r13
movslq (%rbx), %rax
cmpq %rax, %r13
jl 0x5160
jmp 0x5198
cmpl $0x2, %eax
jne 0x51b8
movl %r13d, %eax
jmp 0x519f
xorl %eax, %eax
cmpq $0x0, 0x10(%rbx)
je 0x51b1
movq 0x10(%rbx,%rax,8), %rbx
jmp 0x5153
xorl %ebx, %ebx
jmp 0x51b8
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: set_insert
void set_insert(Set set, Pointer value) {
	bool inserted;
	Pointer old_value;

	set->root = node_insert(set->root, set->compare, value, &inserted, &old_value);

	// Το size αλλάζει μόνο αν μπει νέος κόμβος. Στα updates κάνουμε destroy την παλιά τιμή
	if (inserted)
		set->size++;
	else if (set->destroy_value != NULL)
		set->destroy_value(old_value);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x521f
movq 0x10(%rbx), %r15
leaq 0x4(%rsp), %rbp
movl $0x0, (%rbp)
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x513e
movq %rax, %r12
movslq (%rbp), %rax
cmpq $-0x1, %rax
sete %cl
je 0x5276
movq 0x40(%r12,%rax,8), %rax
movq (%rax), %rdi
movq %r13, (%rax)
jmp 0x5308
movl $0x1, %edi
movl $0x68, %esi
callq 0x2160
movq %rax, %r14
movl $0x10, %edi
callq 0x21a0
movq %rax, %r15
movq %r13, (%rax)
movq %r14, 0x8(%rax)
movslq (%r14), %r12
testq %r12, %r12
jle 0x5265
leaq 0x40(%r14), %rsi
movq %r14, %rdi
addq $0x48, %rdi
leaq (,%r12,8), %rdx
callq 0x21e0
movq %r15, 0x40(%r14)
incl %r12d
movl %r12d, (%r14)
movb $0x1, %cl
jmp 0x5308
movb %cl, 0x3(%rsp)
cmpl $0x0, (%r12)
jle 0x52a3
xorl %ebp, %ebp
movq 0x40(%r12,%rbp,8), %rax
movq (%rax), %rsi
movq %r13, %rdi
callq *%r15
testl %eax, %eax
jle 0x52a5
incq %rbp
movslq (%r12), %rax
cmpq %rax, %rbp
jl 0x5283
jmp 0x52a5
xorl %ebp, %ebp
movl %ebp, 0x4(%rsp)
movl $0x10, %edi
callq 0x21a0
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movslq (%r12), %rcx
movl %ebp, %edx
cmpl %ebp, %ecx
jle 0x52dd
movq %rcx, %rsi
movq 0x38(%r12,%rsi,8), %rdi
movq %rdi, 0x40(%r12,%rsi,8)
leaq -0x1(%rsi), %rdi
movq %rdi, %rsi
cmpq %rdx, %rdi
jg 0x52c7
movq %rax, 0x40(%r12,%rdx,8)
leal 0x1(%rcx), %eax
movl %eax, (%r12)
cmpl $0x4, %ecx
jl 0x52f9
movq %r12, %rdi
movq %r15, %rsi
callq 0x5a22
movq 0x8(%r14), %rax
testq %rax, %rax
cmovneq %rax, %r14
movb 0x3(%rsp), %cl
movq %r14, (%rbx)
testb %cl, %cl
je 0x5314
incl 0x8(%rbx)
jmp 0x532d
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x532d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: merge
static void merge(BTreeNode left, BTreeNode right) {

	BTreeNode parent = left->parent;

	int sep_index = 0;    // Βρες τη θέση της διαχωριστικής τιμής στον πατέρα.
	while (parent->children[sep_index] != left && ++sep_index)
		;

	// Αντίγραψε τη διαχωριστική τιμή από τον πατέρα στον ελλιπή κόμβο.
	node_add_value(left, parent->set_nodes[sep_index], left->count);

	// Εαν ο δεξιός κόμβος δεν είναι φύλλο, μεταφορά των παιδιών
	if (!is_leaf(right))
		for (int i = 0; i <= right->count; i++)
			node_add_child(left, right->children[i], left->count+i);

	// Αντίγραψε όλα τα δεδομένα του δεξιού κόμβου στον ελλιπή κόμβο.
	for (int i = 0; i < right->count; i++)
		node_add_value(left, right->set_nodes[i], left->count);

	// Ολίσθησε προς τα αριστερά όλες τις τιμές και τα παιδιά του πατέρα
	// αρχίζοντας από την θέση της διαχωριστικής τιμής που αφαιρέθηκε.
	for (int i = sep_index; i < parent->count-1; i++) {
		parent->set_nodes[i] = parent->set_nodes[i+1];
		parent->children[i+1] = parent->children[i+2];
	}

	parent->count--;  // Η διαχωριστική τιμή αφαιρέθηκε.
	free(right);  	  // Διάγραψε τον κόμβο που συγχωνεύτηκε.

	// Ο πατέρας μπορεί να είναι πλέον ελλιπής. Ισορρόπησε το υποδέντρο του.
	repair_underflow(parent);
}

// Assembly:
pushq %rbx
movq 0x8(%rdi), %rbx
movq $-0x1, %rax
movq %rax, %rcx
incq %rax
cmpq %rdi, 0x18(%rbx,%rcx,8)
jne 0x5958
movq 0x40(%rbx,%rax,8), %rcx
movslq (%rdi), %rdx
movq %rdi, 0x8(%rcx)
movq %rcx, 0x40(%rdi,%rdx,8)
incl %edx
movl %edx, (%rdi)
cmpq $0x0, 0x10(%rsi)
je 0x59bc
movl (%rsi), %ecx
testl %ecx, %ecx
js 0x59bc
movslq %edx, %rdx
incq %rcx
leaq (%rdi,%rdx,8), %r8
addq $0x10, %r8
xorl %r9d, %r9d
movq 0x10(%rsi,%r9,8), %r10
movq %rdi, 0x8(%r10)
testq %r9, %r9
jne 0x59b0
movq 0x10(%rdi,%rdx,8), %r11
movq %r11, 0x18(%rdi,%rdx,8)
movq %r10, (%r8,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0x5998
cmpl $0x0, (%rsi)
jle 0x59e5
xorl %ecx, %ecx
movq 0x40(%rsi,%rcx,8), %rdx
movslq (%rdi), %r8
movq %rdi, 0x8(%rdx)
movq %rdx, 0x40(%rdi,%r8,8)
leal 0x1(%r8), %edx
movl %edx, (%rdi)
incq %rcx
movslq (%rsi), %rdx
cmpq %rdx, %rcx
jl 0x59c3
movl (%rbx), %ecx
decl %ecx
cmpl %eax, %ecx
jle 0x5a0f
movl %ecx, %edx
movq 0x20(%rbx,%rax,8), %rdi
movq 0x48(%rbx,%rax,8), %r8
movq %r8, 0x40(%rbx,%rax,8)
movq %rdi, 0x18(%rbx,%rax,8)
leaq 0x1(%rax), %rdi
movq %rdi, %rax
cmpq %rdi, %rdx
jne 0x59ef
movl %ecx, (%rbx)
movq %rsi, %rdi
callq 0x22b0
movq %rbx, %rdi
popq %rbx
jmp 0x5735
// File: /workspace/github_c_makefile_star2_O1/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: get_height
static int get_height(BTreeNode node, bool *valid) {
	if (node == NULL)
		return 0;

	const int height = 1 + get_height(node->children[0], valid);
	
	for (int i = 1; i <= node->count; i++) {
		if (height != 1 + get_height(node->children[i], valid))
			*valid = false;
	}

	return height;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x5c7b
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x5c2d
movl %eax, %r15d
leal 0x1(%r15), %ebp
cmpl $0x0, (%r14)
jle 0x5c7d
xorl %r12d, %r12d
movq 0x18(%r14,%r12,8), %rdi
movq %rbx, %rsi
callq 0x5c2d
cmpl %eax, %r15d
je 0x5c6e
movb $0x0, (%rbx)
movslq (%r14), %rax
incq %r12
cmpq %rax, %r12
jl 0x5c59
jmp 0x5c7d
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_01/cat.c
// Function: main
int main(int argc, char *argv[])
{
  if (argc == 1)
  {
    copy_file(0, 1);
  }
  else
  {
    for (int file_index = 1; file_index < argc; ++file_index)
    {
      int file_descriptor;
      if ((file_descriptor = open(argv[file_index], O_RDONLY, 0)) == -1)
      {
        error("Error: could not open the file %s.", argv[file_index]);
        exit(EXIT_FAILURE);
      }

      copy_file(file_descriptor, 1);
    }
  }

  exit(EXIT_SUCCESS);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jne 0x11b4
xorl %edi, %edi
movl $0x1, %esi
callq 0x1203
jmp 0x11ea
jle 0x11ea
movq %rsi, %rbx
movl %edi, %r14d
movl $0x1, %r15d
movq (%rbx,%r15,8), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x11f1
movl %eax, %edi
movl $0x1, %esi
callq 0x1203
incq %r15
cmpq %r15, %r14
jne 0x11c2
xorl %edi, %edi
callq 0x1080
movq (%rbx,%r15,8), %rsi
leaq 0xe08(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1257
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_8/exercise_8_01/cat.c
// Function: error
void error(char *format, ...)
{
  va_list arg_p;

  va_start(arg_p, format);
  fprintf(stderr, "Error: ");
  vfprintf(stderr, format, arg_p);
  fprintf(stderr, "\n");
  va_end(arg_p);

  exit(EXIT_FAILURE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x12ba
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x2d17(%rip), %r15      # 0x3ff8
movq (%r15), %rcx
leaq 0xd3c(%rip), %rdi       # 0x2027
movl $0x7, %esi
movl $0x1, %edx
callq 0x1090
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1070
movq (%r15), %rsi
movl $0xa, %edi
callq 0x1040
movl $0x1, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: rbtree_insert
int rbtree_insert(rbtree_t *tree, rbnode_t *n)
{

	if (btree_insert(tree, n) != 0)
		return -1;

	n->color = rbnode_red;

	rbtree_insert_fixup(tree, n);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x11c7
movq %rcx, %r15
movq (%r14), %rdi
movq (%rcx), %rsi
callq *0x8(%rbx)
testl %eax, %eax
js 0x11b1
movl $0x18, %ecx
jne 0x11b6
jmp 0x11df
movl $0x10, %ecx
movq (%r15,%rcx), %rcx
testq %rcx, %rcx
jne 0x1198
shrl $0x1f, %eax
movq %r15, %rcx
jmp 0x11c9
xorl %eax, %eax
movq %rcx, 0x20(%r14)
movq %rbx, %rdx
testq %rcx, %rcx
je 0x11fb
testb %al, %al
je 0x11f4
addq $0x10, %rcx
jmp 0x11f8
callq 0x1040
movl $0x11, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x12e1
addq $0x18, %rcx
movq %rcx, %rdx
movq %r14, (%rdx)
movl $0x1, 0x8(%r14)
testq %r14, %r14
je 0x12d5
xorl %ebp, %ebp
movq 0x20(%r14), %r15
testq %r15, %r15
je 0x12d5
cmpl $0x1, 0x8(%r15)
jne 0x12d5
movq 0x20(%r15), %rax
movq 0x10(%rax), %rcx
cmpq %r15, %rcx
je 0x1275
testq %rcx, %rcx
je 0x1241
cmpl $0x1, 0x8(%rcx)
je 0x1284
cmpq %r14, 0x10(%r15)
jne 0x1255
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1897
movq %r15, %r14
movq 0x20(%r14), %rax
movl $0x0, 0x8(%rax)
movq 0x20(%rax), %rsi
movl $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0x1855
jmp 0x12c6
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x1294
cmpl $0x1, 0x8(%rcx)
jne 0x1294
movl %ebp, 0x8(%r15)
movl %ebp, 0x8(%rcx)
movl $0x1, 0x8(%rax)
jmp 0x12c9
cmpq %r14, 0x18(%r15)
jne 0x12a8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1855
movq %r15, %r14
movq 0x20(%r14), %rax
movl $0x0, 0x8(%rax)
movq 0x20(%rax), %rsi
movl $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0x1897
movq %r14, %rax
movq %rax, %r14
testq %rax, %rax
jne 0x1211
movq (%rbx), %rax
movl $0x0, 0x8(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: rbtree_lookup
rbnode_t *rbtree_lookup(rbtree_t *tree, const void *key)
{
	rbnode_t *n = tree->root;
	int cmp;
	while (!rbnode_is_nil(n) && (cmp = tree->keycmp(n->key, key)) != 0) {
		if (cmp > 0)
			n = n->left;
		else
			n = n->right;
	}
	return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x131d
movq %rsi, %r14
movq %rdi, %r15
movq (%rbx), %rdi
movq %r14, %rsi
callq *0x8(%r15)
testl %eax, %eax
je 0x131d
setle %al
movzbl %al, %eax
movq 0x10(%rbx,%rax,8), %rbx
testq %rbx, %rbx
jne 0x12ff
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: rbtree_remove
void rbtree_remove(rbtree_t *tree, rbnode_t *n)
{
	rbnode_t *x, *y;

	y = rbnode_is_leaf(n) ? n : rbtree_successor(tree, n);
	x = rbnode_is_nil(y->left) ? y->right : y->left;

	if (!rbnode_is_nil(x))
		x->parent = y->parent;

	if (rbnode_is_root(y))
		tree->root = x;
	else if (rbnode_is_left(y))
		y->parent->left = x;
	else
		y->parent->right = x;

	if (y != n) {

        if (rbnode_is_black(y))
            rbtree_remove_fixup(tree, x, y->parent);

		y->left = n->left;
		y->right = n->right;
		y->parent = n->parent;
		y->color = n->color;

		if (!rbnode_is_nil(n->left))
			n->left->parent = y;

		if (!rbnode_is_nil(n->right))
			n->right->parent = y;

		if (rbnode_is_root(n))
			tree->root = y;
		else if (rbnode_is_left(n))
			n->parent->left = y;
		else
			n->parent->right = y;
	}
    else if (rbnode_is_black(y))
        rbtree_remove_fixup(tree, x, y->parent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
movq %rsi, %r15
je 0x1350
movq 0x18(%r14), %rax
movq %r14, %r15
testq %rax, %rax
je 0x1350
movq %rax, %r15
movq 0x10(%rax), %rax
jmp 0x1342
movq 0x10(%r15), %rsi
testq %rsi, %rsi
jne 0x135d
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x136a
movq 0x20(%r15), %rax
movq %rax, 0x20(%rsi)
movq 0x20(%r15), %rdx
movq %rbx, %rax
testq %rdx, %rdx
je 0x1386
leaq 0x10(%rdx), %rcx
leaq 0x18(%rdx), %rax
cmpq %r15, 0x10(%rdx)
cmoveq %rcx, %rax
movq %rsi, (%rax)
cmpq %r14, %r15
je 0x13f1
testq %r15, %r15
je 0x139a
cmpl $0x0, 0x8(%r15)
jne 0x13a2
movq %rbx, %rdi
callq 0x1416
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
movq 0x18(%r14), %rax
movq %rax, 0x18(%r15)
movq 0x20(%r14), %rax
movq %rax, 0x20(%r15)
movl 0x8(%r14), %eax
movl %eax, 0x8(%r15)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x13cf
movq %r15, 0x20(%rax)
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x13dc
movq %r15, 0x20(%rax)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x1407
cmpq %r14, 0x10(%rax)
je 0x140c
movq %r15, 0x18(%rax)
jmp 0x1410
testq %r15, %r15
je 0x13fd
cmpl $0x0, 0x8(%r15)
jne 0x1410
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1416
movq %r15, (%rbx)
jmp 0x1410
movq %r15, 0x10(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: preorder
static int preorder(rbtree_t *tree, rbnode_t *n,
	rbtree_iterate_func_t iteration, void *state)
{
	if (!rbnode_is_nil(n)) {
		int r;
		if ((r = (*iteration)(tree, n, state)) != 0)
			return r;
		if ((r = preorder(tree, n->left, iteration, state)) != 0)
			return r;
		if ((r = preorder(tree, n->right, iteration, state)) != 0)
			return r;
	}
	return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x1627
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rcx, %rdx
callq *%r14
testl %eax, %eax
jne 0x1615
movq 0x10(%r12), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x15db
testl %eax, %eax
je 0x162a
xorl %ecx, %ecx
testb %cl, %cl
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
je 0x1629
xorl %eax, %eax
retq
movq 0x18(%r12), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x15db
testl %eax, %eax
sete %cl
jmp 0x1617
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: inorder
static int inorder(rbtree_t *tree, rbnode_t *n,
	rbtree_iterate_func_t iteration, void *state)
{
	if (!rbnode_is_nil(n)) {
		int r;
		if ((r = inorder(tree, n->left, iteration, state)) != 0)
			return r;
		if ((r = (*iteration)(tree, n, state)) != 0)
			return r;
		if ((r = inorder(tree, n->right, iteration, state)) != 0)
			return r;
	}
	return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x1697
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x10(%rsi), %rsi
callq 0x164f
testl %eax, %eax
jne 0x1685
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
je 0x169a
xorl %ecx, %ecx
testb %cl, %cl
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
je 0x1699
xorl %eax, %eax
retq
movq 0x18(%r12), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x164f
testl %eax, %eax
sete %cl
jmp 0x1687
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: postorder
static int postorder(rbtree_t *tree, rbnode_t *n,
	rbtree_iterate_func_t iteration, void *state)
{
	if (!rbnode_is_nil(n)) {
		int r;
		if ((r = postorder(tree, n->left, iteration, state)) != 0)
			return r;
		if ((r = postorder(tree, n->right, iteration, state)) != 0)
			return r;
		if ((r = (*iteration)(tree, n, state)) != 0)
			return r;
	}
	return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x170d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq 0x10(%rsi), %rsi
callq 0x16bf
testl %eax, %eax
jne 0x16fb
movq 0x18(%r15), %rsi
movq %r12, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x16bf
testl %eax, %eax
je 0x1710
xorl %ecx, %ecx
testb %cl, %cl
leaq 0x8(%rsp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
je 0x170f
xorl %eax, %eax
retq
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *%rbx
testl %eax, %eax
sete %cl
jmp 0x16fd
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: printorder
static int printorder(rbtree_t *tree, rbnode_t *n,
	rbtree_iterate_func_t iteration, void *state)
{
	int r;
	if (!rbnode_is_nil(n->left)) {
		if ((r = (*iteration)(tree, n->left, state)) != 0)
			return r;
	}
	if (!rbnode_is_nil(n->right)) {
		if ((r = (*iteration)(tree, n->right, state)) != 0)
			return r;
	}
	if (!rbnode_is_nil(n->left)) {
		if ((r = printorder(tree, n->left, iteration, state)) != 0)
			return r;
	}
	if (!rbnode_is_nil(n->right)) {
		if ((r = printorder(tree, n->right, iteration, state)) != 0)
			return r;
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
je 0x1784
movq %r15, %rdi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x17d5
movq 0x18(%r12), %rsi
testq %rsi, %rsi
je 0x179b
movq %r15, %rdi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x17d5
movq 0x10(%r12), %rsi
testq %rsi, %rsi
je 0x17b7
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x175a
testl %eax, %eax
jne 0x17d5
movq 0x18(%r12), %rsi
testq %rsi, %rsi
je 0x17d3
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x175a
testl %eax, %eax
jne 0x17d5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/rbtree.c
// Function: inner_clear
static int inner_clear(rbnode_t *root, rbnode_free_func_t free_func, void *state)
{
    int r;
    if (!rbnode_is_nil(root->left)) {
        if ((r = inner_clear(root->left, free_func, state)) != 0)
            return r;
        root->left = rbnode_nil;
    }
    if (!rbnode_is_nil(root->right)) {
        if ((r = inner_clear(root->right, free_func, state)) != 0)
            return r;
        root->right = rbnode_nil;
    }
    free_func(root, state);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rax
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x1826
movq %rax, %rsi
movq %rbx, %rdx
movq %rax, %r15
callq 0x17f6
movq %r15, %rax
movq $0x0, 0x10(%r14)
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x1848
movq %rax, %rsi
movq %rbx, %rdx
movq %rax, %r15
callq 0x17f6
movq %r15, %rax
movq $0x0, 0x18(%r14)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/example/example1.c
// Function: main
int main(int argc, char **argv)
{
	rbtree_t tree = RBTREE_INIT(keycmp);
	int i;
	rbnode_t *n;
	
	/* insert */
	for(i = 0; i < 10; i++) {
		n = malloc(sizeof(rbnode_t));
		n->key = itop(i);
		rbtree_insert(&tree, n);
	}
	
	/* lookup */
	n = rbtree_lookup(&tree, itop(5));
	if (n)
		printf("Find %d.\n", ptoi(n->key));
	else
		printf("5 not exist.\n");
	
	/* delete */
	rbtree_remove(&tree, n);
	
	/* print */
	printf("parent node color   dir\n");
	rbtree_foreach_inorder(&tree, print_node, NULL);
	
	free_rbtree(&tree);
	
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movups 0x24ee(%rip), %xmm0     # 0x3dd8
movq %rsp, %rbx
movaps %xmm0, (%rbx)
xorl %r14d, %r14d
movl $0x28, %edi
callq 0x1070
movq %r14, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x117c
incq %r14
cmpq $0xa, %r14
jne 0x18f3
movq %rsp, %rdi
movl $0x5, %esi
callq 0x12ec
movq %rax, %rbx
testq %rax, %rax
je 0x193b
movl (%rbx), %esi
leaq 0x6d2(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x1947
leaq 0x702(%rip), %rdi       # 0x2044
callq 0x1050
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1326
leaq 0x6f5(%rip), %rdi       # 0x2051
callq 0x1050
leaq 0x2b(%rip), %rsi        # 0x1993
movq %r14, %rdi
xorl %edx, %edx
callq 0x1644
leaq 0x92(%rip), %rsi        # 0x1a0b
movq %r14, %rdi
xorl %edx, %edx
callq 0x16b4
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]rbtree/example/example1.c
// Function: print_node
static int print_node(rbtree_t *tree, rbnode_t *n, void *state)
{
	if (rbnode_is_root(n)) {
		printf("       %4d %5s\n",
			ptoi(n->key),
			rbnode_is_red(n) ? "red" : "black");
	}
	else {
		printf("%6d %4d %5s %5s\n",
			ptoi(n->parent->key),
			ptoi(n->key),
			rbnode_is_red(n) ? "red" : "black",
			rbnode_is_right(n) ? "right" : "left");
	}
	return 0;
}

// Assembly:
pushq %rax
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0x19df
movl (%rdi), %eax
movl (%rsi), %edx
cmpl $0x1, 0x8(%rsi)
leaq 0x672(%rip), %r8        # 0x201e
leaq 0x66f(%rip), %rcx       # 0x2022
cmoveq %r8, %rcx
cmpq %rsi, 0x18(%rdi)
leaq 0x677(%rip), %rsi       # 0x2039
leaq 0x676(%rip), %r8        # 0x203f
cmoveq %rsi, %r8
leaq 0x654(%rip), %rdi       # 0x2028
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
jmp 0x1a07
movl (%rsi), %eax
cmpl $0x1, 0x8(%rsi)
leaq 0x632(%rip), %rcx       # 0x201e
leaq 0x62f(%rip), %rdx       # 0x2022
cmoveq %rcx, %rdx
leaq 0x610(%rip), %rdi       # 0x200e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/pipe.c
// Function: pipe_send
void pipe_send(struct stage *s, long data)
{
	pthread_mutex_lock(&s->mutex);
	{
		while (s->data_ready)
			pthread_cond_wait(&s->ready, &s->mutex);
		s->data = data;
		s->data_ready = true;
		pthread_cond_signal(&s->avail);
	}
	pthread_mutex_unlock(&s->mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1100
cmpb $0x1, 0x88(%rbx)
jne 0x126d
leaq 0x58(%rbx), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1040
cmpb $0x0, 0x88(%rbx)
jne 0x1259
movq %r14, 0x90(%rbx)
movb $0x1, 0x88(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x1080
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/pipe.c
// Function: pipe_stage
void *pipe_stage(void *arg)
{
	struct stage *s = arg;
	struct stage *next = s->next;

	pthread_mutex_lock(&s->mutex);
	{
		while (1)
		{
			while (!s->data_ready)
				pthread_cond_wait(&s->avail, &s->mutex);
			/* the operation we perform is incrementing data */
			pipe_send(next, s->data + 1);
			s->data_ready = false;
			pthread_cond_signal(&s->ready);
		}
	}
	pthread_mutex_unlock(&s->mutex);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa0(%rdi), %r14
callq 0x1100
leaq 0x28(%rbx), %r15
leaq 0x58(%rbx), %r12
cmpb $0x0, 0x88(%rbx)
jne 0x12cd
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1040
cmpb $0x1, 0x88(%rbx)
jne 0x12b9
movq 0x90(%rbx), %rsi
incq %rsi
movq %r14, %rdi
callq 0x123c
movb $0x0, 0x88(%rbx)
movq %r12, %rdi
callq 0x1080
jmp 0x12b0
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/pipe.c
// Function: pipe_create
void pipe_create(struct pipe *p, int stages)
{
	struct stage **link = &p->head, *new_s, *s;

	pthread_mutex_init(&p->mutex, NULL);
	p->stages = stages;
	p->active = false;

	while (stages-- > 0)
	{
		new_s = malloc(sizeof *new_s);
		pthread_mutex_init(&new_s->mutex, NULL);
		pthread_cond_init(&new_s->avail, NULL);
		pthread_cond_init(&new_s->ready, NULL);
		new_s->data_ready = false;
		*link = new_s;
		link = &new_s->next;
	}
	
	/* end list, record tail */
	*link = NULL;
	p->tail = new_s;

	for (s = p->head; s->next; s = s->next)
		pthread_create(&s->thread, NULL, pipe_stage, s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x28(%rdi), %r15
xorl %esi, %esi
callq 0x10f0
movl %ebp, 0x38(%rbx)
movl $0x0, 0x3c(%rbx)
testl %ebp, %ebp
jle 0x135f
incl %ebp
movl $0xa8, %edi
callq 0x10b0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0x10f0
leaq 0x28(%r14), %rdi
xorl %esi, %esi
callq 0x1090
leaq 0x58(%r14), %rdi
xorl %esi, %esi
callq 0x1090
movb $0x0, 0x88(%r14)
movq %r14, (%r15)
leaq 0xa0(%r14), %r15
decl %ebp
cmpl $0x1, %ebp
jg 0x1317
jmp 0x135f
movq $0x0, (%r15)
movq %r14, 0x30(%rbx)
movq 0x28(%rbx), %rbx
cmpq $0x0, 0xa0(%rbx)
je 0x13a4
leaq -0xee(%rip), %r14       # 0x1291
leaq 0x98(%rbx), %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10d0
movq 0xa0(%rbx), %rbx
cmpq $0x0, 0xa0(%rbx)
jne 0x137f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/begriffs[P]pthread-test/pipe.c
// Function: pipe_start
void pipe_start(struct pipe *p, long value)
{
	pthread_mutex_lock(&p->mutex);
	{
		p->active++;
	}
	pthread_mutex_unlock(&p->mutex);

	pipe_send(p->head, value);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1100
incl 0x3c(%r14)
movq %r14, %rdi
callq 0x10a0
movq 0x28(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x123c