LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ssse3/stribob.c
// Function: sbob_enc
void sbob_enc(sbob_t *sb, sbob_pad_t pad,
    void *out, const void *in, size_t len)
{
    int j;
    size_t i;

    j = sb->l;
    for (i = 0; i < len; i++) {
        if (j == SBOB_RATE) {
            sb->s.b[SBOB_RATE] ^= pad;
            SBOB_PI(&sb->s);
            j = 0;
        }
        sb->s.b[j] ^= ((const uint8_t *) in)[i];
        ((uint8_t *) out)[i] = sb->s.b[j++];
    }
    sb->l = j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
movl 0x40(%rdi), %eax
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x1550
cmpl $0x20, %eax
jne 0x1537
xorb %bpl, 0x20(%r12)
movq %r12, %rdi
callq 0x1080
xorl %eax, %eax
cltq
movb (%r12,%rax), %cl
xorb (%r14,%r13), %cl
movb %cl, (%r12,%rax)
incl %eax
movb %cl, (%r15,%r13)
incq %r13
jmp 0x151e
movl %eax, 0x40(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_finish_test_line_
static void
acutest_finish_test_line_(int result)
{
    if(acutest_tap_) {
        const char* str = (result == 0) ? "ok" : "not ok";

        printf("%s %d - %s\n", str, acutest_current_index_ + 1, acutest_current_test_->name);

        if(result == 0  &&  acutest_timer_) {
            printf("# Duration: ");
            acutest_timer_print_diff_();
            printf("\n");
        }
    } else {
        int color = (result == 0) ? ACUTEST_COLOR_GREEN_INTENSIVE_ : ACUTEST_COLOR_RED_INTENSIVE_;
        const char* str = (result == 0) ? "OK" : "FAILED";
        printf("[ ");
        acutest_colored_printf_(color, "%s", str);
        printf(" ]");

        if(result == 0  &&  acutest_timer_) {
            printf("  ");
            acutest_timer_print_diff_();
        }

        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpb $0x1, 0x7d63(%rip)      # 0xa2e0
jne 0x25d1
testl %ebx, %ebx
leaq 0x409b(%rip), %rax      # 0x6623
leaq 0x4090(%rip), %rsi      # 0x661f
cmoveq %rax, %rsi
movl 0x7d6f(%rip), %edx      # 0xa308
incl %edx
movq 0x7be6(%rip), %rax      # 0xa188
movq (%rax), %rcx
leaq 0x407a(%rip), %rdi      # 0x6626
xorl %eax, %eax
callq 0x20f0
testl %ebx, %ebx
jne 0x2649
cmpl $0x0, 0x7d4a(%rip)      # 0xa30c
je 0x2649
leaq 0x4063(%rip), %rdi      # 0x6632
jmp 0x2631
xorl %ebp, %ebp
testl %ebx, %ebx
sete %bpl
leaq 0x405f(%rip), %rax      # 0x663f
leaq 0x405b(%rip), %r14      # 0x6642
cmoveq %rax, %r14
xorl $0x5, %ebp
leaq 0x4054(%rip), %rdi      # 0x6649
xorl %eax, %eax
callq 0x20f0
leaq 0x4088(%rip), %rsi      # 0x668b
movl %ebp, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x26ab
leaq 0x4036(%rip), %rdi      # 0x664c
xorl %eax, %eax
callq 0x20f0
testl %ebx, %ebx
jne 0x263d
cmpl $0x0, 0x7ce4(%rip)      # 0xa30c
je 0x263d
leaq 0x3b03(%rip), %rdi      # 0x6134
xorl %eax, %eax
callq 0x20f0
callq 0x45d1
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2030
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %edi, %ebx
cmpb $0x1, 0x7c82(%rip)      # 0xa2e0
jne 0x266a
decl %ebx
pushq $0x23
popq %rdi
callq 0x2030
leaq 0x401a(%rip), %r14      # 0x668b
leaq 0x39f8(%rip), %r15      # 0x6070
cmpl $0x11, %ebx
jl 0x268f
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x20f0
addl $-0x10, %ebx
jmp 0x2678
leaq 0x3fc4(%rip), %rdi      # 0x665a
leaq 0x39d3(%rip), %rdx      # 0x6070
movl %ebx, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O2/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 0x281d
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, 0x793c(%rip)      # 0xa160
jl 0x28bc
movq %rdi, %r10
cmpb $0x0, 0x796c(%rip)      # 0xa1a0
je 0x2844
andl $0x0, 0x7957(%rip)      # 0xa194
movb $0x0, 0x795c(%rip)      # 0xa1a0
testq %r10, %r10
je 0x28bc
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 0x792b(%rip), %rdi      # 0xa1a0
pushq $0x3f
popq %rsi
movq %r10, %rdx
callq 0x20a0
movb $0x0, 0x7958(%rip)      # 0xa1df
cmpl $0x3, 0x78d2(%rip)      # 0xa160
jl 0x28bc
pushq $0x1
popq %rdi
callq 0x264e
leaq 0x3868(%rip), %rsi      # 0x6107
leaq 0x78fa(%rip), %rdx      # 0xa1a0
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x26ab
incl 0x78ca(%rip)            # 0xa180
incl 0x78d8(%rip)            # 0xa194
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
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 0x2927
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, 0x7832(%rip)      # 0xa160
jl 0x2a00
cmpq $0x0, 0x784c(%rip)      # 0xa188
je 0x2a00
cmpl $0x0, 0x7897(%rip)      # 0xa1e0
je 0x2a00
movq %rdi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x500(%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)
pushq $0xa
popq %r14
pushq $0x3
popq %rbp
leaq 0x377b(%rip), %r15      # 0x611f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x20e0
testq %rax, %rax
je 0x29e2
movq %rax, %r12
cmpb $0x1, 0x77e2(%rip)      # 0xa1a0
movl %ebp, %edi
sbbl $0x0, %edi
callq 0x264e
movl %r12d, %esi
subl %ebx, %esi
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20f0
incq %r12
movq %r12, %rbx
jmp 0x29a4
cmpb $0x0, (%rbx)
je 0x2a00
cmpb $0x1, 0x77b2(%rip)      # 0xa1a0
sbbl $0x0, %ebp
movl %ebp, %edi
callq 0x264e
movq %rbx, %rdi
callq 0x2080
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4dc8
movq %r14, %rdi
callq 0x51a4
movzbl %al, %edi
leaq 0x2872(%rip), %rsi      # 0x6318
leaq 0x2bde(%rip), %rcx      # 0x668b
leaq 0x2872(%rip), %r8       # 0x6326
pushq $0x26
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3b07
movl (%rbx), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
callq 0x4b5a
xorl %edi, %edi
cmpq %rbx, %rax
sete %dil
leaq 0x2835(%rip), %rsi      # 0x6318
leaq 0x2ba1(%rip), %rcx      # 0x668b
leaq 0x2848(%rip), %r8       # 0x6339
pushq $0x28
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3b07
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2bc0
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
testl %esi, %esi
movl $0x0, %r12d
cmovgl %esi, %r12d
cmpq %r15, %r12
je 0x3b62
callq 0x2280
movl %eax, %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %edx, %edx
idivl %ebx
movl %eax, %esi
incl %esi
movl %ecx, %eax
cltd
idivl %esi
cltq
addq %r15, %rax
movq (%r14,%rax,8), %rcx
movq (%r14,%r15,8), %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, (%r14,%r15,8)
incq %r15
decl %ebx
jmp 0x3b28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 -0xf6(%rip), %rdi       # 0x3a80
xorl %esi, %esi
callq 0x4b08
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x519b
xorl %edi, %edi
testq %rbx, %rbx
setne %dil
leaq 0x277e(%rip), %rsi      # 0x6318
leaq 0x2aea(%rip), %rcx      # 0x668b
leaq 0x27b1(%rip), %r8       # 0x6359
pushq $0x3f
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3bf2
movq %rbx, %rdi
callq 0x4b56
xorl %edi, %edi
testl %eax, %eax
sete %dil
leaq 0x274b(%rip), %rsi      # 0x6318
leaq 0x2ab7(%rip), %rcx      # 0x668b
leaq 0x278a(%rip), %r8       # 0x6365
pushq $0x40
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3bf2
movq %rbx, %rdi
popq %rbx
jmp 0x4ce1
callq 0x2bc0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq -0x18c(%rip), %rdi      # 0x3a80
movq 0x63ad(%rip), %rsi      # 0x9fc0
callq 0x4b08
movq %rax, %rbx
pushq $0x1
popq %r13
leaq 0x26f2(%rip), %r14      # 0x6318
leaq 0x2a5e(%rip), %r15      # 0x668b
leaq 0x2744(%rip), %r12      # 0x6378
pushq $0x54
popq %rbp
cmpl $0x3e9, %r13d           # imm = 0x3E9
je 0x3c83
leal -0x1(%r13), %edi
callq 0x3a71
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a85
movq %rbx, %rdi
callq 0x4b56
xorl %edi, %edi
cmpl %eax, %r13d
sete %dil
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x239c
incl %r13d
testl %eax, %eax
jne 0x3c37
callq 0x2bc0
xorl %edi, %edi
callq 0x3a71
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a85
movq %rbx, %rdi
callq 0x4b56
xorl %edi, %edi
cmpl $0x3e8, %eax            # imm = 0x3E8
sete %dil
leaq 0x2669(%rip), %rsi      # 0x6318
leaq 0x29d5(%rip), %rcx      # 0x668b
leaq 0x26d4(%rip), %r8       # 0x6391
pushq $0x5d
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3c7e
movq %rbx, %rdi
callq 0x4ce1
leaq -0x25a(%rip), %rdi      # 0x3a80
xorl %esi, %esi
callq 0x4b08
movq %rax, %rbx
leaq 0x14(%rsp), %rsi
andl $0x0, (%rsi)
pushq $0x1
popq %rax
leaq 0x10(%rsp), %r14
movl %eax, (%r14)
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
movq %rbx, %rdi
callq 0x3a85
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a85
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a85
movq %rbx, %rdi
callq 0x4ce1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 -0x9e2(%rip), %rdi      # 0x3a80
movq 0x5b57(%rip), %rsi      # 0x9fc0
callq 0x4b08
movq %rax, %rbx
movl $0x1f40, %edi           # imm = 0x1F40
callq 0x21a0
movq %rax, %r14
xorl %r15d, %r15d
cmpq $0x3e8, %r15            # imm = 0x3E8
je 0x449b
movl %r15d, %edi
callq 0x3a71
movq %rax, (%r14,%r15,8)
incq %r15
jmp 0x4481
movq %r14, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x3b0c
movq (%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4dc8
movq %rbx, %rdi
callq 0x4ca2
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5197
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x1e3c(%rip), %rsi      # 0x6318
leaq 0x21a8(%rip), %rcx      # 0x668b
leaq 0x20c4(%rip), %r8       # 0x65ae
movl $0x118, %edx            # imm = 0x118
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x45ae
pushq $0x1
popq %rbp
leaq 0x20a6(%rip), %r13      # 0x65ae
cmpq $0x3e8, %rbp            # imm = 0x3E8
je 0x4557
movq (%r14,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x4dc8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5197
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x1de0(%rip), %rsi      # 0x6318
movl $0x11e, %edx            # imm = 0x11E
leaq 0x2147(%rip), %rcx      # 0x668b
movq %r13, %r8
xorl %eax, %eax
callq 0x239c
incq %rbp
testl %eax, %eax
jne 0x4508
jmp 0x45ae
pushq $0x1
popq %rbp
leaq 0x204d(%rip), %r13      # 0x65ae
cmpq $0x3e8, %rbp            # imm = 0x3E8
je 0x45b3
movq (%r14,%rbp,8), %rsi
movq %rbx, %rdi
callq 0x4bb7
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5197
xorl %edi, %edi
cmpq %r15, %rax
sete %dil
leaq 0x1d87(%rip), %rsi      # 0x6318
movl $0x125, %edx            # imm = 0x125
leaq 0x20ee(%rip), %rcx      # 0x668b
movq %r13, %r8
xorl %eax, %eax
callq 0x239c
incq %rbp
testl %eax, %eax
jne 0x4561
callq 0x2bc0
movq %rbx, %rdi
callq 0x4ce1
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/../include/acutest.h
// Function: acutest_list_names_
static void
acutest_list_names_(void)
{
    const struct acutest_test_* test;

    printf("Unit tests:\n");
    for(test = &acutest_list_[0]; test->func != NULL; test++)
        printf("  %s\n", test->name);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x23d2(%rip), %rdi      # 0x6a00
callq 0x2080
leaq 0x572e(%rip), %r14      # 0x9d68
leaq 0x226b(%rip), %rbx      # 0x68ac
cmpq $0x0, (%r14)
je 0x465b
movq -0x8(%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20f0
addq $0x10, %r14
jmp 0x4641
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4838
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)
cmpl $0x2, 0x5908(%rip)      # 0xa160
jl 0x48c5
movq %rdi, %rbx
pushq $0x1
popq %rdi
callq 0x264e
cmpl $0x3, 0x58f4(%rip)      # 0xa160
jl 0x487f
leaq 0x2122(%rip), %rsi      # 0x6997
pushq $0x5
popq %rdi
xorl %eax, %eax
callq 0x26ab
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
pushq $0xa
popq %rdi
callq 0x2030
cmpl $0x3, 0x58a5(%rip)      # 0xa160
jl 0x48c5
pushq $0xa
popq %rdi
callq 0x2030
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4b37
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x21a0
andq $0x0, (%rax)
andl $0x0, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x24dd(%rip), %rdi      # 0x701b
leaq 0x24e6(%rip), %rsi      # 0x702b
leaq 0x24fe(%rip), %rcx      # 0x704a
movl $0x22e, %edx            # imm = 0x22E
callq 0x2110
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq (%rdi), %r14
testq %r14, %r14
je 0x4c2f
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
leaq 0xc(%rsp), %r15
movl $0x9, (%r15)
movq %r14, %rdi
movq %r15, %rcx
callq 0x4d60
movslq (%r15), %r13
cmpq $-0x1, %r13
je 0x4c2c
movq %rax, %r12
movq 0x40(%rax,%r13,8), %rdi
movq (%rdi), %r15
callq 0x22a0
cmpq $0x0, 0x10(%r12)
je 0x4c33
movq 0x10(%r12,%r13,8), %rdi
callq 0x4cc4
movq 0x8(%rax), %rcx
decl (%rcx)
movq %rax, 0x40(%r12,%r13,8)
movq %r12, 0x8(%rax)
movq %rcx, %r12
jmp 0x4c52
movq %r14, (%rbx)
xorl %ebx, %ebx
jmp 0x4c92
movslq (%r12), %rax
decq %rax
cmpq %rax, %r13
jge 0x4c4e
movq 0x48(%r12,%r13,8), %rcx
movq %rcx, 0x40(%r12,%r13,8)
incq %r13
jmp 0x4c3a
movl %eax, (%r12)
movq %r12, %rdi
callq 0x5365
cmpl $0x0, (%r14)
je 0x4c65
movq %r14, %r12
jmp 0x4c7c
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x4c74
andq $0x0, 0x8(%r12)
movq %r14, %rdi
callq 0x22a0
movq %r12, (%rbx)
decl 0x8(%rbx)
movq 0x18(%rbx), %rax
movb $0x1, %bl
testq %rax, %rax
je 0x4c92
movq %r15, %rdi
callq *%rax
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4cbe
movq %rdi, %rcx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x4ca9
movq 0x40(%rcx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4ce0
movq %rdi, %rcx
movslq (%rdi), %rdx
movq 0x10(%rdi,%rdx,8), %rdi
testq %rdi, %rdi
jne 0x4cc6
movq 0x38(%rcx,%rdx,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4d5f
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jg 0x4d27
movq 0x10(%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x4cfa
incq %r15
jmp 0x4d0d
xorl %r15d, %r15d
cltq
cmpq %rax, %r15
jge 0x4d52
testq %r14, %r14
je 0x4d41
movq 0x40(%rbx,%r15,8), %rax
movq (%rax), %rdi
callq *%r14
movq 0x40(%rbx,%r15,8), %rdi
callq 0x22a0
incq %r15
movl (%rbx), %eax
jmp 0x4d2a
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22a0
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
pushq $-0x1
popq %rbp
testq %r14, %r14
je 0x4db6
xorl %r13d, %r13d
movslq (%r14), %rax
cmpq %rax, %r13
jge 0x4da3
movq 0x40(%r14,%r13,8), %rax
movq (%rax), %rsi
movq %r15, %rdi
callq *%r12
testl %eax, %eax
je 0x4db1
js 0x4da3
incq %r13
jmp 0x4d82
cmpq $0x0, 0x10(%r14)
je 0x4db4
movq 0x10(%r14,%r13,8), %r14
jmp 0x4d7a
movl %r13d, %ebp
movl %ebp, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x28, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x4e3b
movq 0x10(%rbx), %rbp
leaq 0x24(%rsp), %r12
andl $0x0, (%r12)
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x4d60
movq %rax, %r14
movslq (%r12), %rax
cmpq $-0x1, %rax
je 0x4e5d
movq 0x40(%r14,%rax,8), %rax
movq (%rax), %rdi
movq %r13, (%rax)
movq %r15, (%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x4fc9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
callq 0x563f
movq %rax, %r14
movq %r13, %rdi
callq 0x562e
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x55df
jmp 0x4fc3
movq %rbp, 0x8(%rsp)
xorl %r12d, %r12d
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x4e85
movq 0x40(%r14,%r12,8), %rax
movq (%rax), %rsi
movq %r13, %rdi
callq *0x8(%rsp)
testl %eax, %eax
jle 0x4e85
incq %r12
jmp 0x4e65
movq %r15, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r13, %rdi
callq 0x562e
movq %r14, %rdi
movq %rax, %rsi
movl %r12d, %edx
callq 0x55df
movl (%r14), %ebp
cmpl $0x5, %ebp
jl 0x4fae
callq 0x563f
movq %rax, %r13
movq 0x8(%r14), %rax
movq %rax, 0x8(%r13)
shrl %ebp
cmpq $0x0, 0x10(%r14)
je 0x4ef1
leal 0x1(%rbp), %ebx
leaq (%r14,%rbp,8), %r15
addq $0x18, %r15
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x4ef1
movq (%r15,%r12,8), %rsi
movq %r13, %rdi
movl %r12d, %edx
callq 0x560a
incq %r12
jmp 0x4ed8
movl %ebp, %ebx
leaq (%r14,%rbx,8), %rbp
addq $0x48, %rbp
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x4f1b
movq (%rbp,%r12,8), %rsi
movq %r13, %rdi
movl %r12d, %edx
callq 0x55df
decl (%r14)
incq %r12
jmp 0x4efe
movslq (%r14), %rax
leal -0x1(%rax), %ecx
movq 0x38(%r14,%rax,8), %rbp
movl %ecx, (%r14)
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x4f89
xorl %r14d, %r14d
movq 0x8(%rsp), %rbx
movslq (%r12), %rax
cmpq %rax, %r14
jge 0x4f5a
movq (%rbp), %rdi
movq 0x40(%r12,%r14,8), %rax
movq (%rax), %rsi
callq *%rbx
testl %eax, %eax
js 0x4f5a
incq %r14
jmp 0x4f3a
leal 0x1(%r14), %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x560a
movq %r12, %rdi
movq %rbp, %rsi
movl %r14d, %edx
callq 0x55df
movl (%r12), %ebp
movq %r12, %r14
cmpl $0x4, %ebp
jg 0x4eb1
jmp 0x4fae
callq 0x563f
movq %rax, %r15
movq %rax, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x55df
movq %r15, 0x8(%r14)
movq %r15, 0x8(%r13)
movq %r14, 0x10(%r15)
movq %r13, 0x18(%r15)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r14
testq %r14, %r14
cmoveq %rax, %r14
movq 0x18(%rsp), %rbx
movq %r14, (%rbx)
incl 0x8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rbx
xorl %r12d, %r12d
movq %r12, %rax
incq %r12
cmpq %r15, 0x10(%rbx,%rax,8)
jne 0x5528
movq 0x38(%rbx,%r12,8), %rsi
movl (%r15), %edx
movq %r15, %rdi
callq 0x55df
cmpq $0x0, 0x10(%r14)
je 0x556f
xorl %r13d, %r13d
movslq (%r14), %rax
cmpq %rax, %r13
jg 0x556f
movq 0x10(%r14,%r13,8), %rsi
movl (%r15), %edx
addl %r13d, %edx
movq %r15, %rdi
callq 0x560a
incq %r13
jmp 0x554f
leaq -0x1(%r12), %r13
xorl %ebp, %ebp
movslq (%r14), %rax
cmpq %rax, %rbp
jge 0x5593
movq 0x40(%r14,%rbp,8), %rsi
movl (%r15), %edx
movq %r15, %rdi
callq 0x55df
incq %rbp
jmp 0x5576
movl (%rbx), %eax
decl %eax
cmpl %eax, %r13d
cmovlel %eax, %r13d
incq %r13
cmpq %r12, %r13
je 0x55bf
movq 0x18(%rbx,%r12,8), %rcx
movq 0x40(%rbx,%r12,8), %rdx
movq %rdx, 0x38(%rbx,%r12,8)
movq %rcx, 0x10(%rbx,%r12,8)
incq %r12
jmp 0x55a1
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x22a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5365
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: node_add_value
static void node_add_value(BTreeNode node, SetNode set_node, int index) {
	set_node->owner = node;

	// Ολίσθησε προς τα δεξιά όλα τα στοιχεία του φύλλου αρχίζοντας από τη θέση όπου θα γίνει η προσθήκη.
	for (int i = node->count-1; i >= index; i--)
		node->set_nodes[i+1] = node->set_nodes[i];
	
	node->set_nodes[index] = set_node;
	node->count++;
}

// Assembly:
movq %rdi, 0x8(%rsi)
movslq (%rdi), %rax
movslq %edx, %rcx
movq %rax, %rdx
cmpq %rcx, %rdx
jle 0x5600
movq 0x38(%rdi,%rdx,8), %r8
movq %r8, 0x40(%rdi,%rdx,8)
decq %rdx
jmp 0x55ec
movq %rsi, 0x40(%rdi,%rcx,8)
incl %eax
movl %eax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/tests/../modules/UsingBTree/ADTSet.c
// Function: node_add_child
static void node_add_child(BTreeNode node, BTreeNode child, int index) {
	child->parent = node;

	// Ολίσθησε προς τα δεξιά όλα τα παιδιά του φύλλου αρχίζοντας από τη θέση όπου θα γίνει η προσθήκη.
	for (int i = node->count; i >= index; i--)
		node->children[i+1] = node->children[i];
	
	node->children[index] = child;
}

// Assembly:
movq %rdi, 0x8(%rsi)
movslq (%rdi), %rcx
movslq %edx, %rax
cmpq %rax, %rcx
jl 0x5628
movq 0x10(%rdi,%rcx,8), %rdx
movq %rdx, 0x18(%rdi,%rcx,8)
decq %rcx
jmp 0x5614
movq %rsi, 0x10(%rdi,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
testq %rdi, %rdi
je 0x5690
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0x564a
movl %eax, %ebp
pushq $0x1
popq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jg 0x568c
movq 0x10(%r14,%r15,8), %rdi
movq %rbx, %rsi
callq 0x564a
cmpl %eax, %ebp
je 0x5687
movb $0x0, (%rbx)
incq %r15
jmp 0x566b
incl %ebp
jmp 0x5692
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x11b9
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x11ff
xorl %edi, %edi
callq 0x1080
movq %rsi, %rbx
movslq %edi, %r15
pushq $0x1
popq %r14
pushq $0x1
popq %rbp
cmpq %r15, %r14
jge 0x11b2
movq (%rbx,%r14,8), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1060
cmpl $-0x1, %eax
je 0x11ed
movl %eax, %edi
movl %ebp, %esi
callq 0x11ff
incq %r14
jmp 0x11c6
movq (%rbx,%r14,8), %rsi
leaq 0xe0c(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1244
// File: /workspace/github_c_makefile_star2_O2/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 0x12a7
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 0x2d2a(%rip), %r15      # 0x3ff8
movq (%r15), %rcx
leaq 0xd4f(%rip), %rdi       # 0x2027
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x1090
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1070
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x1040
pushq $0x1
popq %rdi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movq (%rdi), %rcx
pushq $0x10
popq %r12
pushq $0x18
popq %r13
movq %rcx, %r14
testq %rcx, %rcx
je 0x11c9
movq %rcx, %rbp
movq (%r15), %rdi
movq (%rcx), %rsi
callq *0x8(%rbx)
movq %r12, %rcx
testl %eax, %eax
js 0x11bf
movq %r13, %rcx
je 0x11df
movq (%rbp,%rcx), %rcx
movq %rbp, %r14
jmp 0x11a2
movq %r14, 0x20(%r15)
movq %rbx, %rcx
testq %r14, %r14
je 0x11f6
testl %eax, %eax
js 0x11f2
leaq 0x18(%r14), %rcx
jmp 0x11f6
callq 0x1040
movl $0x11, (%rax)
pushq $-0x1
popq %rax
jmp 0x12d0
leaq 0x10(%r14), %rcx
movq %r15, (%rcx)
movl $0x1, 0x8(%r15)
testq %r14, %r14
je 0x12c7
cmpl $0x1, 0x8(%r14)
jne 0x12c7
movq 0x20(%r14), %rsi
movq 0x10(%rsi), %rax
cmpq %r14, %rax
je 0x123b
testq %rax, %rax
je 0x122d
cmpl $0x1, 0x8(%rax)
je 0x124a
cmpq %r15, 0x10(%r14)
je 0x126a
movq %r14, %rax
movq %r15, %r14
jmp 0x127d
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x125c
cmpl $0x1, 0x8(%rax)
jne 0x125c
andl $0x0, 0x8(%r14)
andl $0x0, 0x8(%rax)
movl $0x1, 0x8(%rsi)
jmp 0x12bb
cmpq %r15, 0x18(%r14)
je 0x1292
movq %r14, %rax
movq %r15, %r14
jmp 0x12a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1842
movq 0x20(%r14), %rax
movq 0x20(%rax), %rsi
andl $0x0, 0x8(%rax)
movl $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0x1804
jmp 0x12b8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1804
movq 0x20(%r14), %rax
movq 0x20(%rax), %rsi
andl $0x0, 0x8(%rax)
movl $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0x1842
movq %r14, %rsi
movq 0x20(%rsi), %r14
movq %rsi, %r15
jmp 0x1201
movq (%rbx), %rax
andl $0x0, 0x8(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %rbx
movq %rdi, %r14
movq %rdi, %rax
movq (%rax), %r15
testq %r15, %r15
je 0x1313
movq (%r15), %rdi
movq %rbx, %rsi
callq *0x8(%r14)
testl %eax, %eax
je 0x1313
setle %al
movzbl %al, %eax
leaq (%r15,%rax,8), %rax
addq $0x10, %rax
jmp 0x12ed
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
movq %r14, %r15
testq %rsi, %rsi
je 0x134b
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x1360
movq %rax, %r15
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x133f
leaq 0x10(%r15), %r12
movq 0x18(%r15), %rsi
testq %rsi, %rsi
jne 0x1367
movq 0x20(%r15), %rdx
xorl %esi, %esi
jmp 0x136f
leaq 0x10(%r14), %r12
movq %r14, %r15
movq 0x20(%r15), %rdx
movq %rdx, 0x20(%rsi)
movq %rbx, %rax
testq %rdx, %rdx
je 0x1387
leaq 0x10(%rdx), %rcx
leaq 0x18(%rdx), %rax
cmpq %r15, 0x10(%rdx)
cmoveq %rcx, %rax
movq %rsi, (%rax)
movl 0x8(%r15), %eax
cmpq %r14, %r15
je 0x13e6
testl %eax, %eax
jne 0x139f
movq %rbx, %rdi
callq 0x140f
movq 0x10(%r14), %rcx
movq %rcx, (%r12)
movq 0x18(%r14), %rax
movq %rax, 0x18(%r15)
movq 0x20(%r14), %rdx
movq %rdx, 0x20(%r15)
movl 0x8(%r14), %edx
movl %edx, 0x8(%r15)
testq %rcx, %rcx
je 0x13c8
movq %r15, 0x20(%rcx)
testq %rax, %rax
je 0x13d1
movq %r15, 0x20(%rax)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x13fa
cmpq %r14, 0x10(%rax)
je 0x13ff
movq %r15, 0x18(%rax)
jmp 0x1403
testl %eax, %eax
jne 0x1403
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x140f
movq %r15, (%rbx)
jmp 0x1403
movq %r15, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %r15, %r15
je 0x15fd
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x15ff
movq 0x10(%r15), %rsi
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x15b8
testl %eax, %eax
jne 0x15ff
movq 0x18(%r15), %r15
jmp 0x15cc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %r15, %r15
je 0x165b
movq 0x10(%r15), %rsi
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1616
testl %eax, %eax
jne 0x165d
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x165d
movq 0x18(%r15), %r15
jmp 0x162a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x16c9
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rsi), %rsi
movq %rdx, %r12
callq 0x1674
testl %eax, %eax
jne 0x16cb
movq 0x18(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1674
testl %eax, %eax
jne 0x16cb
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1739
movq %r15, %rdi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x178a
movq 0x18(%r12), %rsi
testq %rsi, %rsi
je 0x1750
movq %r15, %rdi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x178a
movq 0x10(%r12), %rsi
testq %rsi, %rsi
je 0x176c
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x170f
testl %eax, %eax
jne 0x178a
movq 0x18(%r12), %rsi
testq %rsi, %rsi
je 0x1788
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x170f
testl %eax, %eax
jne 0x178a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x17d8
movq %rax, %rsi
movq %rbx, %rdx
movq %rax, %r15
callq 0x17ab
movq %r15, %rax
andq $0x0, 0x10(%r14)
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x17f7
movq %rax, %rsi
movq %rbx, %rdx
movq %rax, %r15
callq 0x17ab
movq %r15, %rax
andq $0x0, 0x18(%r14)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movups 0x2548(%rip), %xmm0     # 0x3dd8
movq %rsp, %rbx
movaps %xmm0, (%rbx)
xorl %r15d, %r15d
pushq $0x28
popq %r14
cmpq $0xa, %r15
je 0x18be
movq %r14, %rdi
callq 0x1070
movq %r15, (%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x117c
incq %r15
jmp 0x189d
movq %rsp, %rdi
pushq $0x5
popq %rsi
callq 0x12df
movq %rax, %rbx
testq %rax, %rax
je 0x18e3
movl (%rbx), %esi
leaq 0x72a(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x18ef
leaq 0x75a(%rip), %rdi       # 0x2044
callq 0x1050
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x131c
leaq 0x74d(%rip), %rdi       # 0x2051
callq 0x1050
leaq 0x2d(%rip), %rsi        # 0x193d
movq %r14, %rdi
xorl %edx, %edx
callq 0x160b
leaq 0x94(%rip), %rsi        # 0x19b5
movq %r14, %rdi
xorl %edx, %edx
callq 0x1669
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq