LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/DiseaseMonitor_test.c
// Function: test_insert
void test_insert(void) {
	dm_init();

	int ids[record_no];

	for(int i = 0; i < record_no; i++) {
		ids[i] = records[i].id;

		// Εισαγωγή της εγγραφής i
		TEST_ASSERT(!dm_insert_record(&records[i]));	
		TEST_ASSERT( dm_insert_record(&records[i]));		// replace, returns true

		// Ελεγχος ότι το monitor περιέχει όλες τις εγγραφές μέχρι και το i
		List list = dm_get_records(NULL, NULL, NULL, NULL);
		check_record_list(list, ids, i+1);
	}

	dm_destroy();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
callq 0x4c6e
movl 0xa535(%rip), %eax      # 0xe4c0
movq %rsp, %rbx
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
subq %rcx, %rbx
movq %rbx, %rsp
testl %eax, %eax
jle 0x404b
leaq 0xa1f1(%rip), %r14      # 0xe1a0
leaq 0x552d(%rip), %r15      # 0x94e3
leaq 0x5704(%rip), %r12      # 0x96c1
xorl %r13d, %r13d
movl (%r14), %eax
movl %eax, (%rbx,%r13,4)
movq %r14, %rdi
callq 0x4f6a
xorb $0x1, %al
movzbl %al, %edi
movq %r15, %rsi
movl $0x54, %edx
movq %r12, %rcx
leaq 0x555c(%rip), %r8       # 0x9542
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x4060
movq %r14, %rdi
callq 0x4f6a
movzbl %al, %edi
movq %r15, %rsi
movl $0x55, %edx
movq %r12, %rcx
leaq 0x5535(%rip), %r8       # 0x9543
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x4060
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x541d
incq %r13
movq %rax, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x3dd6
movslq 0xa482(%rip), %rax      # 0xe4c0
addq $0x28, %r14
cmpq %rax, %r13
jl 0x3fc0
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d31
callq 0x2e32
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/DiseaseMonitor_test.c
// Function: test_remove
void test_remove(void) {
	dm_init();

	// insert records
	int ids[record_no];
	for(int i = 0; i < record_no; i++) {
		ids[i] = records[i].id;
		dm_insert_record(&records[i]);	
	}

	for(int i = 0; i < record_no; i++) {
		// Delete της εγγραφής i
		TEST_ASSERT(dm_remove_record(records[i].id));	
		TEST_ASSERT(!dm_remove_record(records[i].id));		// already deleted, returns false

		// Ελεγχος ότι το monitor περιέχει όλες τις εγγραφές από το i μέχρι το τέλος
		List list = dm_get_records(NULL, NULL, NULL, NULL);
		check_record_list(list, &ids[i+1], record_no-i-1);
	}

	dm_destroy();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
callq 0x4c6e
movl 0xa440(%rip), %eax      # 0xe4c0
movq %rsp, %rbx
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
subq %rcx, %rbx
movq %rbx, %rsp
testl %eax, %eax
jle 0x40c5
leaq 0xa100(%rip), %r14      # 0xe1a0
xorl %r15d, %r15d
movl (%r14), %eax
movl %eax, (%rbx,%r15,4)
movq %r14, %rdi
callq 0x4f6a
incq %r15
movslq 0xa404(%rip), %rax      # 0xe4c0
addq $0x28, %r14
cmpq %rax, %r15
jl 0x40a3
cmpl $0x0, 0xa3f4(%rip)      # 0xe4c0
jle 0x4193
leaq 0xa0c7(%rip), %r12      # 0xe1a0
addq $0x4, %rbx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq %rbx, -0x30(%rbp)
movl (%r12), %edi
callq 0x51fa
movzbl %al, %edi
leaq 0x53e6(%rip), %r15      # 0x94e3
movq %r15, %rsi
movl $0x6b, %edx
leaq 0x55b5(%rip), %rbx      # 0x96c1
movq %rbx, %rcx
leaq 0x544c(%rip), %r8       # 0x9562
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x41a8
movl (%r12), %edi
callq 0x51fa
xorb $0x1, %al
movzbl %al, %edi
movq %r15, %rsi
movl $0x6c, %edx
movq %rbx, %rcx
leaq 0x541c(%rip), %r8       # 0x9561
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x41a8
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x541d
incq %r14
movl 0xa35a(%rip), %edx      # 0xe4c0
addl %r13d, %edx
movq %rax, %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x3dd6
movslq 0xa341(%rip), %rax      # 0xe4c0
addq $0x28, %r12
decl %r13d
addq $0x4, %rbx
cmpq %rax, %r14
jl 0x40e6
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d31
callq 0x2e32
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/DiseaseMonitor_test.c
// Function: count_and_test
void count_and_test(String disease, String country, Date date_from, Date date_to) {
	List recs = dm_get_records(disease, country, date_from, date_to);
	int count = list_size(recs);
	list_destroy(recs);

	TEST_ASSERT(dm_count_records(disease, country, date_from, date_to) == count);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x541d
movq %rax, %r13
movq %rax, %rdi
callq 0x60ce
movl %eax, %ebp
movq %r13, %rdi
callq 0x62a8
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x5660
xorl %edi, %edi
cmpl %ebp, %eax
sete %dil
leaq 0x516d(%rip), %rsi      # 0x94e3
leaq 0x5344(%rip), %rcx      # 0x96c1
leaq 0x5209(%rip), %r8       # 0x958d
movl $0xa4, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x43a3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2e32
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/DiseaseMonitor_test.c
// Function: test_count_records
void test_count_records(void) {
	dm_init();

	// insert records
	for(int i = 0; i < record_no; i++)
		dm_insert_record(&records[i]);	

	// try various search criteria
	count_and_test("Pale Mare", NULL,        NULL,         NULL        );
	count_and_test(NULL,        "Targaryen", NULL,         NULL        );
	count_and_test("Pale Mare", "Targaryen", NULL,         NULL        );
	count_and_test(NULL,        NULL,        "0301-01-01", NULL        );
	count_and_test(NULL,        NULL,        NULL,         "0297-01-01");
	count_and_test("Grayscale", NULL,        "0299-01-01", "0300-01-01");
	count_and_test(NULL,        "Lannister", "0299-01-01", "0301-01-01");

	dm_destroy();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %eax, %eax
callq 0x4c6e
cmpl $0x0, 0xa106(%rip)      # 0xe4c0
jle 0x43e1
leaq 0x9ddd(%rip), %rbx      # 0xe1a0
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x4f6a
incq %r14
movslq 0xa0e8(%rip), %rax      # 0xe4c0
addq $0x28, %rbx
cmpq %rax, %r14
jl 0x43c6
leaq 0x5010(%rip), %rbx      # 0x93f8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4325
leaq 0x4f9e(%rip), %r14      # 0x939b
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4325
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4325
leaq 0x4f84(%rip), %rbx      # 0x93a5
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4325
leaq 0x514c(%rip), %rcx      # 0x9582
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4325
leaq 0x4f49(%rip), %rdi      # 0x9391
leaq 0x4fe7(%rip), %r14      # 0x9436
leaq 0x5041(%rip), %rcx      # 0x9497
xorl %esi, %esi
movq %r14, %rdx
callq 0x4325
leaq 0x4f4f(%rip), %rsi      # 0x93b6
xorl %edi, %edi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4325
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d31
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/DiseaseMonitor_test.c
// Function: run_and_test_top_diseases
void run_and_test_top_diseases(int k, String country) {
	List result = dm_top_diseases(k, country);
	int last_count = INT_MAX;

	TEST_ASSERT(list_size(result) == k);

	for (ListNode node = list_first(result); node != LIST_EOF; node = list_next(result, node)) {
		String disease = list_node_value(result, node);
		int count = dm_count_records(disease, country, NULL, NULL);
		TEST_ASSERT(count <= last_count);
		last_count = count;
	}

	list_destroy(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
callq 0x5db2
movq %rax, %r14
movq %rax, %rdi
callq 0x60ce
xorl %edi, %edi
cmpl %ebp, %eax
sete %dil
leaq 0x5032(%rip), %rsi      # 0x94e3
leaq 0x5209(%rip), %rcx      # 0x96c1
leaq 0x510e(%rip), %r8       # 0x95cd
movl $0xbf, %edx
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x4563
movq %r14, %rdi
callq 0x6329
testq %rax, %rax
je 0x454d
movq %rax, %r15
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
leaq 0x50f4(%rip), %rbp      # 0x95e4
movq %r14, %rdi
movq %r15, %rsi
callq 0x63b5
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5660
movl %eax, %r12d
xorl %edi, %edi
cmpl %r13d, %eax
setle %dil
leaq 0x4fc6(%rip), %rsi      # 0x94e3
movl $0xc4, %edx
leaq 0x5198(%rip), %rcx      # 0x96c1
movq %rbp, %r8
xorl %eax, %eax
callq 0x25fc
testl %eax, %eax
je 0x4563
movq %r14, %rdi
movq %r15, %rsi
callq 0x6372
movq %rax, %r15
movl %r12d, %r13d
testq %rax, %rax
jne 0x44f0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x62a8
callq 0x2e32
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/DiseaseMonitor_test.c
// Function: test_top_diseases
void test_top_diseases(void) {
	dm_init();

	// insert records
	for(int i = 0; i < record_no; i++)
		dm_insert_record(&records[i]);	

	// try various search criteria
	for (int k = 1; k <= 2; k++)
		run_and_test_top_diseases(k, "Stark");

	for (int k = 1; k <= 3; k++)
		run_and_test_top_diseases(k, "Targaryen");

	for (int k = 1; k <= 6; k++)
		run_and_test_top_diseases(k, NULL);

	dm_destroy();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %eax, %eax
callq 0x4c6e
cmpl $0x0, 0x9f46(%rip)      # 0xe4c0
jle 0x45a1
leaq 0x9c1d(%rip), %rbx      # 0xe1a0
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x4f6a
incq %r14
movslq 0x9f28(%rip), %rax      # 0xe4c0
addq $0x28, %rbx
cmpq %rax, %r14
jl 0x4586
movl $0x1, %ebx
leaq 0x4e32(%rip), %r14      # 0x93df
movl %ebx, %edi
movq %r14, %rsi
callq 0x4482
incl %ebx
cmpl $0x3, %ebx
jne 0x45ad
movl $0x1, %ebx
leaq 0x4dd1(%rip), %r14      # 0x939b
movl %ebx, %edi
movq %r14, %rsi
callq 0x4482
incl %ebx
cmpl $0x4, %ebx
jne 0x45ca
movl $0x1, %ebx
movl %ebx, %edi
xorl %esi, %esi
callq 0x4482
incl %ebx
cmpl $0x7, %ebx
jne 0x45e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d31
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../include/acutest.h
// Function: test_timer_print_diff__
static double
    test_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 0xa0f9(%rip), %xmm1 # 0xe700
movsd 0x49f9(%rip), %xmm2     # 0x9008
mulsd %xmm2, %xmm1
cvtsi2sdq 0xa0ec(%rip), %xmm0 # 0xe708
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdq 0xa0c4(%rip), %xmm1 # 0xe6f0
cvtsi2sdq 0xa0c3(%rip), %xmm3 # 0xe6f8
mulsd %xmm2, %xmm1
addsd %xmm1, %xmm3
subsd %xmm3, %xmm0
divsd %xmm2, %xmm0
leaq 0x5036(%rip), %rdi      # 0x9682
movb $0x1, %al
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../include/acutest.h
// Function: test_error__
static void
test_error__(const char* fmt, ...)
{
    va_list args;

    if(test_verbose_level__ == 0)
        return;

    if(test_verbose_level__ >= 2) {
        test_line_indent__(1);
        if(test_verbose_level__ >= 3)
            test_print_in_color__(TEST_COLOR_RED_INTENSIVE__, "ERROR: ");
        va_start(args, fmt);
        vprintf(fmt, args);
        va_end(args);
        printf("\n");
    }

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

// Assembly:
pushq %rbx
subq $0xd0, %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 0x486a
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)
movl 0x9920(%rip), %eax      # 0xe190
testl %eax, %eax
je 0x48ec
cmpl $0x2, %eax
jl 0x48d9
movq %rdi, %rbx
movl $0x1, %edi
callq 0x288f
cmpl $0x3, 0x9903(%rip)      # 0xe190
jl 0x48a2
leaq 0x5137(%rip), %rsi      # 0x99cd
movl $0x5, %edi
xorl %eax, %eax
callq 0x28f5
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 0x21e0
movl $0xa, %edi
callq 0x2030
cmpl $0x3, 0x98b0(%rip)      # 0xe190
jl 0x48ec
movl $0xa, %edi
callq 0x2030
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: compare_record_dates
int compare_record_dates(Pointer a, Pointer b){
    Record record_a = a;
    Record record_b = b;
    if(find)
        return strcmp(record_a->date, record_b->date);
    if(strcmp(record_a->date, record_b->date)){
        return strcmp(record_a->date, record_b->date);
    }else{
        return (record_a->id)-(record_b->id);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb 0x9b8c(%rip), %bpl      # 0xe718
movq 0x20(%rdi), %rdi
movq 0x20(%rsi), %rsi
callq 0x2190
testl %eax, %eax
setne %cl
orb %bpl, %cl
testb $0x1, %cl
jne 0x4bab
movl (%r14), %eax
subl (%rbx), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: compare_structs
int compare_structs(Pointer a, Pointer b){
    MapCount mapcount_a = a;
    MapCount mapcount_b = b;
    if(!strcmp(mapcount_a->disease, mapcount_b->disease)){
        if(!strcmp(mapcount_a->country, mapcount_b->country)){
            return strcmp(mapcount_a->date, mapcount_b->date);
        }else{
            return strcmp(mapcount_a->country, mapcount_b->country);
        }
    }else{
        return strcmp(mapcount_a->disease, mapcount_b->disease);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rsi), %rsi
callq 0x2190
testl %eax, %eax
jne 0x4bdf
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x2190
testl %eax, %eax
je 0x4be7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: dm_init
void dm_init(){
    map_ids_records = map_create(compare_ints, NULL, NULL);
    map_set_hash_function(map_ids_records, hash_int);
    map_diseases_dates = map_create(compare_diseases, NULL, NULL);
    map_set_hash_function(map_diseases_dates, hash_string);
    map_countries_dates = map_create(compare_countries, NULL, NULL);
    map_set_hash_function(map_countries_dates, hash_string);

    map_disease_country_date = map_create(compare_structs, NULL, NULL);
    map_set_hash_function(map_disease_country_date, hash_struct_disease_country_date);

    map_NULL_diseases = map_create(compare_diseases, NULL, NULL);
    map_set_hash_function(map_NULL_diseases, hash_string);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq -0x10d(%rip), %rdi      # 0x4b6c
xorl %esi, %esi
xorl %edx, %edx
callq 0x645c
movq %rax, 0x9aa7(%rip)      # 0xe730
leaq 0x23e8(%rip), %rsi      # 0x7078
movq %rax, %rdi
callq 0x700b
leaq -0x12e(%rip), %rbx      # 0x4b71
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x645c
movq %rax, 0x9a86(%rip)      # 0xe738
leaq 0x2371(%rip), %r14      # 0x702a
movq %rax, %rdi
movq %r14, %rsi
callq 0x700b
leaq -0x155(%rip), %rdi      # 0x4b76
xorl %esi, %esi
xorl %edx, %edx
callq 0x645c
movq %rax, 0x9a65(%rip)      # 0xe740
movq %rax, %rdi
movq %r14, %rsi
callq 0x700b
leaq -0x138(%rip), %rdi      # 0x4bb5
xorl %esi, %esi
xorl %edx, %edx
callq 0x645c
movq %rax, 0x9a4b(%rip)      # 0xe748
leaq 0x239a(%rip), %rsi      # 0x709e
movq %rax, %rdi
callq 0x700b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x645c
movq %rax, 0x9a09(%rip)      # 0xe728
movq %rax, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x700b
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: update_map_count
void update_map_count(Map map, Record record){

    //Δημιουργούμε ένα mapcount με τα στοιχεία που θέλουμε να εισαγάγουμε στο Map
    MapCount mapcount = malloc(sizeof(*mapcount));
    mapcount->disease = strdup(record->disease);
    mapcount->country = strdup(record->country);
    mapcount->date = strdup(record->date);

    MapNode found = map_find_node(map, mapcount);

    // Αν υπάρχει ήδη key με αυτά τα στοιχεία, τότε αυξάνουμε το value
    if(found){
        Pointer value = map_node_value(map, found);
        (*(int *)value)++;
        free(mapcount->disease);
        free(mapcount->country);
        free(mapcount->date);
        free(mapcount);

    // Αλλιώς εισάγουμε ένα νέο key με αυτά τα στοιχεία και value 1 αφού είναι η πρώτη φορά
    // που εισάγεται στο map_disease_country_date key με αυτά τα στοιχεία
    }else{
        map_insert(map, mapcount, create_int(1));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x18, %edi
callq 0x21c0
movq %rax, %rbx
movq 0x10(%r15), %rdi
callq 0x2280
movq %rax, (%rbx)
movq 0x18(%r15), %rdi
callq 0x2280
movq %rax, 0x8(%rbx)
movq 0x20(%r15), %rdi
callq 0x2280
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f25
testq %rax, %rax
je 0x4f47
movq %r14, %rdi
movq %rax, %rsi
callq 0x6f0b
incl (%rax)
movq (%rbx), %rdi
callq 0x22d0
movq 0x8(%rbx), %rdi
callq 0x22d0
movq 0x10(%rbx), %rdi
callq 0x22d0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22d0
movl $0x4, %edi
callq 0x21c0
movl $0x1, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x6736
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: dm_remove_record
bool dm_remove_record(int id){

    // Βρίσκουμε το record με το συγκεκριμένο id
    Record record = map_find(map_ids_records, &id);

    // Αν όντως υπάρχει
    if(record){

        // Βρίσκουμε την εγγραφή με τα αντίστοιχα στοιχεία στα map_disease_country_date,
        // map_NULL_diseases και μειώνουμε τα values τους κατά 1
        MapCount mapcount = malloc(sizeof(*mapcount));
        mapcount->disease = record->disease;
        mapcount->country = record->country;
        mapcount->date = record->date;
        (*(int*)map_find(map_disease_country_date, mapcount))--;
        (*(int*)map_find(map_NULL_diseases, record->disease))--;

        // Αφαιρούμε το record και από τα Maps που χρησιμποιεί η map_get_records()
        set_remove(map_node_value(map_diseases_dates, map_find_node(map_diseases_dates, record->disease)), record);
        set_remove(map_node_value(map_countries_dates, map_find_node(map_countries_dates, record->country)), record);
        map_remove(map_ids_records, &id);

        free(mapcount);

        return true;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rsi
movl %edi, (%rsi)
movq 0x951f(%rip), %rdi      # 0xe730
callq 0x6abd
movq %rax, %rbx
testq %rax, %rax
je 0x52d4
movl $0x18, %edi
callq 0x21c0
movq %rax, %r14
movq 0x10(%rbx), %rax
movq %rax, (%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x8(%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x10(%r14)
movq 0x94fb(%rip), %rdi      # 0xe748
movq %r14, %rsi
callq 0x6abd
decl (%rax)
movq 0x94ca(%rip), %rdi      # 0xe728
movq 0x10(%rbx), %rsi
callq 0x6abd
decl (%rax)
movq 0x94c8(%rip), %r15      # 0xe738
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0x6f25
movq %r15, %rdi
movq %rax, %rsi
callq 0x6f0b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x81d8
movq 0x94a7(%rip), %r15      # 0xe740
movq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x6f25
movq %r15, %rdi
movq %rax, %rsi
callq 0x6f0b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x81d8
movq 0x946e(%rip), %rdi      # 0xe730
leaq 0xc(%rsp), %rsi
callq 0x6936
movq %r14, %rdi
callq 0x22d0
testq %rbx, %rbx
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: get_date_from_node
SetNode get_date_from_node(Set set, Date date_from){

    // Αν date_from == NULL επιστρέφουμε τον πρώτο κόμβο του Set, αφού η dm_get_records()
    // θα πρέπει να επιστρέψει όλα τα records μέχρι date_to
    if(!date_from){
        return set_first(set);
    }else{
        Record record = malloc(sizeof(*record));
        record->date = strdup(date_from);

        // Αλλάζουμε προσωρινά το find σε true ώστε η CompareFunc να συγκρίνει αποκλειστικά με
        // βάση τις ημερομηνίες και όχι τα ids
        find = true;
        SetNode node = set_find_node(set, record);
        find = false;

        free(record->date);
        free(record);
        return node;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5343
movq %rsi, %r14
movl $0x28, %edi
callq 0x21c0
movq %rax, %r15
movq %r14, %rdi
callq 0x2280
movq %rax, 0x20(%r15)
movb $0x1, 0x9404(%rip)      # 0xe718
movq %rbx, %rdi
movq %r15, %rsi
callq 0x83fa
movq %rax, %rbx
movb $0x0, 0x93ef(%rip)      # 0xe718
movq 0x20(%r15), %rdi
callq 0x22d0
movq %r15, %rdi
callq 0x22d0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x8336
// File: /workspace/github_c_makefile_star2_O1/giannisdravilas[P]Disease-Monitor/tests/../modules/DiseaseMonitor.c
// Function: get_date_to_node
SetNode get_date_to_node(Set set, Date date_to){

    // Αν date_to == NULL επιστρέφουμε SET_EOF, αφού η dm_get_records()
    // θα πρέπει να επιστρέψει όλα τα records από date_from και μετά
    if(!date_to){
        return SET_EOF;
    }else{
        Record record = malloc(sizeof(*record));
        record->id = -1;
        record->country = NULL;
        record->disease = NULL;
        record->name = NULL;
        record->date = strdup(date_to);

        // Αλλάζουμε προσωρινά το find σε true ώστε η CompareFunc να συγκρίνει αποκλειστικά με
        // βάση τις ημερομηνίες και όχι τα ids
        find = true;
        SetNode node = set_find_node(set, record);
        find = false;

        // Θέλουμε να επιτρέψουμε τον επόμενο του node, αφού το Set θα πρέπει να διατρεχθεί
        // μέχρι και τον node, οπότε στη συνθήκη της for() θα πρέπει να χρησιμοποιηθεί ο
        // επόμενος κόμβος.
        if(node){
            free(record->date);
            free(record);
            return set_next(set, node);
        }else{
            set_insert(set, record);
            SetNode next = set_next(set, set_find_node(set, record));
            set_remove(set, record);
            free(record->date);
            free(record);
            return next;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x53d0
movq %rsi, %r15
movq %rdi, %rbx
movl $0x28, %edi
callq 0x21c0
movq %rax, %r14
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq %r15, %rdi
callq 0x2280
movq %rax, 0x20(%r14)
movb $0x1, 0x9383(%rip)      # 0xe718
movq %rbx, %rdi
movq %r14, %rsi
callq 0x83fa
movb $0x0, 0x9371(%rip)      # 0xe718
testq %rax, %rax
je 0x53d4
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x22d0
movq %r14, %rdi
callq 0x22d0
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x83ac
xorl %eax, %eax
jmp 0x5417
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8138
movq %rbx, %rdi
movq %r14, %rsi
callq 0x83fa
movq %rbx, %rdi
movq %rax, %rsi
callq 0x83ac
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x81d8
movq 0x20(%r14), %rdi
callq 0x22d0
movq %r14, %rdi
callq 0x22d0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_08/count_b_t_n.c
// Function: main
int main(void)
{
  int blanks_nr = 0;
  int tabs_nr = 0;
  int newlines_nr = 0;

  char c;
  while ((c = getchar()) != EOF)
  {
    if (c == ' ')
    {
      ++blanks_nr;
    }
    else if (c == '\t')
    {
      ++tabs_nr;
    }
    else if (c == '\n')
    {
      ++newlines_nr;
    }
  }

  printf("blanks_nr: %d\ntabs_nr: %d\nnewlines_nr: %d\n",
         blanks_nr, tabs_nr, newlines_nr);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r14d, %r14d
callq 0x1040
movzbl %al, %eax
cmpl $0x1f, %eax
jg 0x1172
cmpl $0x9, %eax
je 0x1183
cmpl $0xa, %eax
jne 0x1157
incl %ebp
jmp 0x1157
cmpl $0xff, %eax
je 0x1187
cmpl $0x20, %eax
jne 0x1157
incl %r14d
jmp 0x1157
incl %ebx
jmp 0x1157
leaq 0xe76(%rip), %rdi       # 0x2004
movl %r14d, %esi
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/6-Memory/global_vs_static.c
// Function: main
int main(void) {
	int local_int = 0;
	static int static_int = 0;

	printf("local_int  addr = %p\n", &local_int);
	printf("static_int addr = %p\n", &static_int);
	printf("global_int addr = %p\n", &global_int);
	printf("addr difference = %d\n",
		(char *) &static_int - (char *) &global_int
	);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0xeb2(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1030
leaq 0xeba(%rip), %rdi       # 0x201a
leaq 0x2ed1(%rip), %rbx      # 0x4038
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
leaq 0xeb8(%rip), %rdi       # 0x2030
leaq 0x2eb5(%rip), %r14      # 0x4034
movq %r14, %rsi
xorl %eax, %eax
callq 0x1030
subq %r14, %rbx
leaq 0xeb3(%rip), %rdi       # 0x2046
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ulisses[P]ftp-client-server/dir.c
// Function: main
int main(){
	char linha[200];
	FILE *f, *p;
	
	f = fopen("dir.cmd", "w");
	
	p = popen("/bin/ls -f", "r");
	while(fgets(linha, 200, p)!=NULL) fprintf(f, "%s", linha);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
leaq 0xe81(%rip), %rdi       # 0x2004
leaq 0xe82(%rip), %rsi       # 0x200c
callq 0x1060
movq %rax, %rbx
leaq 0xe75(%rip), %rdi       # 0x200e
leaq 0xe79(%rip), %rsi       # 0x2019
callq 0x1050
movq %rax, %r14
leaq -0xe0(%rbp), %rdi
movl $0xc8, %esi
movq %rax, %rdx
callq 0x1040
testq %rax, %rax
je 0x11e8
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1030
movq %r15, %rdi
movl $0xc8, %esi
movq %r14, %rdx
callq 0x1040
testq %rax, %rax
jne 0x11c8
movl $0x1, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/internal.c
// Function: xlink_log
void xlink_log(const char *fmt, ...) {
  va_list ap;
  va_start(ap, fmt);
  fprintf(stderr, "Error: ");
  vfprintf(stderr, fmt, ap);
  fprintf(stderr, "\n");
  va_end(ap);
}

// 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 0x2352
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 0xdc7f(%rip), %r15      # 0xfff8
movq (%r15), %rcx
leaq 0x9afe(%rip), %rdi      # 0xbe81
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2200
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21c0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0x20f0
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_segment_clear
void xlink_segment_clear(xlink_segment *segment) {
  free(segment->data);
  free(segment->mask);
  free(segment->publics);
  free(segment->datas);
  free(segment->relocs);
  memset(segment, 0, sizeof(xlink_segment));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x2030
movq 0x40(%rbx), %rdi
callq 0x2030
movq 0x50(%rbx), %rdi
callq 0x2030
movq 0x60(%rbx), %rdi
callq 0x2030
movq 0x70(%rbx), %rdi
callq 0x2030
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_reloc_get_addend
const char *xlink_reloc_get_addend(xlink_reloc *rel) {
  static char str[256];
  switch (rel->location) {
    case OMF_LOCATION_8BIT :
    case OMF_LOCATION_8BIT_HIGH : {
      sprintf(str, "0x%02x", (uint8_t)rel->addend.offset);
      break;
    }
    case OMF_LOCATION_16BIT :
    case OMF_LOCATION_SEGMENT :
    case OMF_LOCATION_16BIT_LOADER : {
      sprintf(str, "0x%04x", (uint16_t)rel->addend.offset);
      break;
    }
    case OMF_LOCATION_32BIT :
    case OMF_LOCATION_32BIT_LOADER : {
      sprintf(str, "0x%08x", (uint32_t)rel->addend.offset);
      break;
    }
    case OMF_LOCATION_FAR :
    case OMF_LOCATION_48BIT :
    case OMF_LOCATION_48BIT_PHARLAP : {
      sprintf(str, "0x%04x:0x%08x", (uint16_t)rel->addend.segment,
       (uint32_t)rel->addend.offset);
      break;
    }
    default : {
      XLINK_ERROR(1, ("Unsupported location %i", rel->location));
    }
  }
  return str;
}

// Assembly:
pushq %rax
movl 0x20(%rdi), %esi
cmpq $0xd, %rsi
ja 0x2972
leaq 0x770e(%rip), %rax      # 0xa010
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzwl 0x3c(%rdi), %edx
leaq 0x10b1a(%rip), %rdi     # 0x13430
leaq 0x7c4a(%rip), %rsi      # 0xa567
jmp 0x2962
movzwl 0x38(%rdi), %edx
movl 0x3c(%rdi), %ecx
leaq 0x10b03(%rip), %rdi     # 0x13430
leaq 0x7c3a(%rip), %rsi      # 0xa56e
xorl %eax, %eax
callq 0x21e0
jmp 0x2969
movzbl 0x3c(%rdi), %edx
leaq 0x10ae8(%rip), %rdi     # 0x13430
leaq 0x7c11(%rip), %rsi      # 0xa560
jmp 0x2962
movl 0x3c(%rdi), %edx
leaq 0x10ad5(%rip), %rdi     # 0x13430
leaq 0x7c13(%rip), %rsi      # 0xa575
xorl %eax, %eax
callq 0x21e0
leaq 0x10ac0(%rip), %rax     # 0x13430
popq %rcx
retq
leaq 0x7c03(%rip), %rdi      # 0xa57c
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_module_clear
void xlink_module_clear(xlink_module *mod) {
  int i;
  for (i = 0; i < mod->nnames; i++) {
    free(mod->names[i]);
  }
  free(mod->names);
  for (i = 0; i < mod->nsegments; i++) {
    xlink_segment_clear(mod->segments[i]);
    free(mod->segments[i]);
  }
  free(mod->segments);
  for (i = 0; i < mod->ngroups; i++) {
    xlink_group_clear(mod->groups[i]);
    free(mod->groups[i]);
  }
  free(mod->groups);
  for (i = 0; i < mod->npublics; i++) {
    free(mod->publics[i]);
  }
  free(mod->publics);
  for (i = 0; i < mod->nexterns; i++) {
    free(mod->externs[i]);
  }
  free(mod->externs);
  for (i = 0; i < mod->ndatas; i++) {
    xlink_data_clear(mod->datas[i]);
    free(mod->datas[i]);
  }
  free(mod->datas);
  for (i = 0; i < mod->nrelocs; i++) {
    free(mod->relocs[i]);
  }
  free(mod->relocs);
  memset(mod, 0, sizeof(xlink_module));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x120(%rdi)
jle 0x29bd
xorl %r14d, %r14d
movq 0x118(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x120(%rbx), %rax
cmpq %rax, %r14
jl 0x299e
movq 0x118(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x130(%rbx)
jle 0x2a04
xorl %r14d, %r14d
movq 0x128(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x26a7
movq 0x128(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x130(%rbx), %rax
cmpq %rax, %r14
jl 0x29d5
movq 0x128(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x140(%rbx)
jle 0x2a63
xorl %r14d, %r14d
movq 0x138(%rbx), %rax
movq (%rax,%r14,8), %r15
movq 0x18(%r15), %rdi
callq 0x2030
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
movq $0x0, 0x20(%r15)
movq 0x138(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x140(%rbx), %rax
cmpq %rax, %r14
jl 0x2a1c
movq 0x138(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x150(%rbx)
jle 0x2a9a
xorl %r14d, %r14d
movq 0x148(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x150(%rbx), %rax
cmpq %rax, %r14
jl 0x2a7b
movq 0x148(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x160(%rbx)
jle 0x2ad1
xorl %r14d, %r14d
movq 0x158(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x160(%rbx), %rax
cmpq %rax, %r14
jl 0x2ab2
movq 0x158(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x170(%rbx)
jle 0x2b25
xorl %r14d, %r14d
movq 0x168(%rbx), %rax
movq (%rax,%r14,8), %r15
movq 0x28(%r15), %rdi
callq 0x2030
movq 0x30(%r15), %rdi
callq 0x2030
movq 0x168(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x170(%rbx), %rax
cmpq %rax, %r14
jl 0x2ae9
movq 0x168(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x180(%rbx)
jle 0x2b5c
xorl %r14d, %r14d
movq 0x178(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x180(%rbx), %rax
cmpq %rax, %r14
jl 0x2b3d
movq 0x178(%rbx), %rdi
callq 0x2030
movl $0x188, %edx            # imm = 0x188
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x20d0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_library_clear
void xlink_library_clear(xlink_library *lib) {
  int i;
  for (i = 0; i < lib->nmodules; i++) {
    xlink_module_clear(lib->modules[i]);
    free(lib->modules[i]);
  }
  free(lib->modules);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x28(%rdi)
jle 0x2bb2
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x298a
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jl 0x2b8c
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_binary_clear
void xlink_binary_clear(xlink_binary *bin) {
  int i;
  for (i = 0; i < bin->nmodules; i++) {
    xlink_module_clear(bin->modules[i]);
    free(bin->modules[i]);
  }
  for (i = 0; i < bin->nlibrarys; i++) {
    xlink_library_clear(bin->librarys[i]);
    free(bin->librarys[i]);
  }
  free(bin->modules);
  free(bin->librarys);
  free(bin->segments);
  free(bin->externs);
  memset(bin, 0, sizeof(xlink_binary));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x30(%rdi)
jle 0x2c2d
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x298a
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x30(%rbx), %rax
cmpq %rax, %r14
jl 0x2c07
cmpl $0x0, 0x40(%rbx)
jle 0x2c5c
xorl %r14d, %r14d
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2b7c
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x40(%rbx), %rax
cmpq %rax, %r14
jl 0x2c36
movq 0x28(%rbx), %rdi
callq 0x2030
movq 0x38(%rbx), %rdi
callq 0x2030
movq 0x48(%rbx), %rdi
callq 0x2030
movq 0x58(%rbx), %rdi
callq 0x2030
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_omf_add_record
int xlink_omf_add_record(xlink_omf *omf, xlink_omf_record *rec) {
  XLINK_ERROR(
   omf->nrecords == 0 && rec->type != OMF_THEADR && rec->type != OMF_LHEADR,
   ("%s not the first record in module", xlink_omf_record_get_name(rec->type)));
  omf->nrecords++;
  omf->records =
   xlink_realloc(omf->records, omf->nrecords*sizeof(xlink_omf_record));
  omf->records[omf->nrecords - 1] = *rec;
  return omf->nrecords;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x8(%rdi), %rsi
testq %rsi, %rsi
jne 0x2cce
movzbl 0xc(%r14), %edi
movl %edi, %eax
orl $0x2, %eax
cmpl $0x82, %eax
jne 0x2cff
incq %rsi
movl %esi, 0x8(%rbx)
movq (%rbx), %rdi
shlq $0x4, %rsi
callq 0x852c
movq %rax, (%rbx)
movslq 0x8(%rbx), %rcx
shlq $0x4, %rcx
movups (%r14), %xmm0
movups %xmm0, -0x10(%rax,%rcx)
movl 0x8(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2d1f
leaq 0x788f(%rip), %rdi      # 0xa59a
movq %rax, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_module_find_segment
xlink_segment *xlink_module_find_segment(xlink_module *mod, const char *name) {
  xlink_segment *ret;
  int i;
  ret = NULL;
  for (i = 1; i <= mod->nsegments; i++) {
    xlink_segment *seg;
    seg = xlink_module_get_segment(mod, i);
    if (strcmp(name, seg->name->str) == 0) {
      XLINK_ERROR(ret != NULL,
       ("Duplicate segment definition found for name %s in %s", name,
       mod->filename));
      ret = seg;
    }
  }
  XLINK_ERROR(ret == NULL,
   ("Could not find segment definition %s in %s", name, mod->filename));
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
cmpl $0x0, 0x130(%rdi)
jle 0x3274
xorl %r15d, %r15d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2e3e
movq %rax, %r13
movq 0x20(%rax), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
jne 0x3269
testq %r15, %r15
movq %r13, %r15
jne 0x3289
cmpl 0x130(%r14), %r12d
jl 0x323c
jmp 0x3277
xorl %r15d, %r15d
testq %r15, %r15
je 0x32a7
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x7395(%rip), %rdi      # 0xa628
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
movq (%r14), %rdx
leaq 0x73ac(%rip), %rdi      # 0xa65d
jmp 0x3293
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_module_find_public
xlink_public *xlink_module_find_public(xlink_module *mod, const char *symb) {
  xlink_public *ret;
  int i;
  ret = NULL;
  for (i = 1; i <= mod->npublics; i++) {
    xlink_public *pub;
    pub = xlink_module_get_public(mod, i);
    /* TODO: Why was this check added? */
    if (/*pub->is_local &&*/ strcmp(symb, pub->name) == 0) {
      XLINK_ERROR(ret != NULL,
       ("Duplicate local public definition found for symbol %s in %s", symb,
       mod->filename));
      ret = pub;
    }
  }
  XLINK_ERROR(ret == NULL,
   ("Could not find local public definition %s in %s", symb, mod->filename));
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
cmpl $0x0, 0x150(%rdi)
jle 0x3305
xorl %r15d, %r15d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2fa2
movq %rax, %r13
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
jne 0x32fa
testq %r15, %r15
movq %r13, %r15
jne 0x331a
cmpl 0x150(%r14), %r12d
jl 0x32d1
jmp 0x3308
xorl %r15d, %r15d
testq %r15, %r15
je 0x3338
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x7364(%rip), %rdi      # 0xa688
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
movq (%r14), %rdx
leaq 0x7382(%rip), %rdi      # 0xa6c4
jmp 0x3324
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_module_find_extern
xlink_extern *xlink_module_find_extern(xlink_module *mod, const char *name) {
  xlink_extern *ret;
  int i;
  ret = NULL;
  for (i = 1; i <= mod->nexterns; i++) {
    xlink_extern *ext;
    ext = xlink_module_get_extern(mod, i);
    if (!ext->is_local && strcmp(name, ext->name) == 0) {
      XLINK_ERROR(ret != NULL,
       ("Duplicate extern definition found for name %s in %s", name,
       mod->filename));
      ret = ext;
    }
  }
  XLINK_ERROR(ret == NULL,
   ("Could not find extern definition %s in %s", name, mod->filename));
  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
cmpl $0x0, 0x160(%rdi)
jle 0x339f
xorl %r15d, %r15d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x3106
cmpl $0x0, 0x114(%rax)
jne 0x3394
movq %rax, %r13
leaq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
jne 0x3394
testq %r15, %r15
movq %r13, %r15
jne 0x33b4
cmpl 0x160(%r14), %r12d
jl 0x3362
jmp 0x33a2
xorl %r15d, %r15d
testq %r15, %r15
je 0x33c0
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x7336(%rip), %rdi      # 0xa6f4
jmp 0x33ca
movq (%r14), %rdx
leaq 0x735e(%rip), %rdi      # 0xa728
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_binary_process_segment
void xlink_binary_process_segment(xlink_binary *bin, xlink_segment *segment) {
  int i;
  if (xlink_binary_has_segment(bin, segment)) {
    return;
  }
  xlink_binary_add_segment(bin, segment);
  for (i = 1; i <= segment->nrelocs; i++) {
    xlink_reloc *rel;
    rel = xlink_segment_get_reloc(segment, i);
    switch (rel->target) {
      case OMF_TARGET_EXT : {
        xlink_extern *ext;
        ext = xlink_module_get_extern(segment->module, rel->target_idx);
        if (!xlink_binary_has_extern(bin, ext)) {
          xlink_binary_add_extern(bin, ext);
        }
        break;
      }
      case OMF_TARGET_SEG : {
        xlink_segment *seg;
        seg = xlink_module_get_segment(segment->module, rel->target_idx);
        xlink_binary_process_segment(bin, seg);
        break;
      }
      default : {
        XLINK_ERROR(1, ("Unsupported target T%i", rel->target));
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x50(%rdi), %rax
testq %rax, %rax
jle 0x38a5
movq 0x48(%r14), %rcx
xorl %edx, %edx
cmpq %rbx, (%rcx,%rdx,8)
je 0x3971
incq %rdx
cmpq %rdx, %rax
jne 0x3893
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%r14)
movq 0x48(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x852c
movq %rax, 0x48(%r14)
movslq 0x50(%r14), %rcx
movq %rbx, -0x8(%rax,%rcx,8)
cmpl $0x0, 0x78(%rbx)
jle 0x3971
movl $0x1, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2650
movl 0x28(%rax), %esi
cmpl $0x4, %esi
je 0x3949
cmpl $0x6, %esi
jne 0x397d
movq 0x8(%rbx), %rdi
movl 0x30(%rax), %esi
callq 0x3106
movq %rax, %r12
movslq 0x60(%r14), %rax
testq %rax, %rax
jle 0x3922
movq 0x58(%r14), %rcx
xorl %edx, %edx
cmpq %r12, (%rcx,%rdx,8)
je 0x3960
incq %rdx
cmpq %rdx, %rax
jne 0x3914
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%r14)
movq 0x58(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x852c
movq %rax, 0x58(%r14)
movslq 0x60(%r14), %rcx
movq %r12, -0x8(%rax,%rcx,8)
jmp 0x3960
movq 0x8(%rbx), %rdi
movl 0x30(%rax), %esi
callq 0x2e3e
movq %r14, %rdi
movq %rax, %rsi
callq 0x3876
leal 0x1(%r15), %eax
cmpl 0x78(%rbx), %r15d
movl %eax, %r15d
jl 0x38da
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6e7d(%rip), %rdi      # 0xa801
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O1/negge[P]xlink/src/xlink.c
// Function: xlink_binary_print_map
void xlink_binary_print_map(xlink_binary *bin, FILE *out) {
  int i, j;
  fprintf(out, "Segment layout:\n");
  for (i = 1; i <= bin->nsegments; i++) {
    xlink_segment *seg;
    seg = xlink_binary_get_segment(bin, i);
    fprintf(out, " %5x %8s segment %s %s %s %6s %08x bytes%s\n",
     seg->start, xlink_segment_get_name(seg),
     OMF_SEGDEF_ALIGN[seg->attrib.align], OMF_SEGDEF_USE[seg->attrib.proc],
     OMF_SEGDEF_COMBINE[seg->attrib.combine], xlink_segment_get_class_name(seg),
     seg->length, seg->attrib.big ? ", big" : "");
    for (j = 1; j <= seg->npublics; j++) {
      xlink_public *pub;
      int size;
      pub = xlink_segment_get_public(seg, j);
      size = seg->length - pub->offset;
      if (j < seg->npublics) {
        size = xlink_segment_get_public(seg, j + 1)->offset - pub->offset;
      }
      fprintf(out, " %12x (%08x bytes) %8s\n", pub->offset, size, pub->name);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x6e68(%rip), %rdi      # 0xa818
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
cmpl $0x0, 0x50(%r14)
jle 0x3b35
movl $0x1, %esi
leaq 0x6e82(%rip), %r13      # 0xa85b
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movq %rsi, 0x10(%rsp)
callq 0x378b
movq %rax, %r15
movl 0x7c(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%r15), %rdx
addq $0x10, %rdx
movl (%r15), %ecx
leaq 0xf629(%rip), %rdi      # 0x13030
leaq 0x7152(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movzbl 0x10(%r15), %eax
movl %eax, %ecx
shrl $0x5, %ecx
leaq 0xc09a(%rip), %rdx      # 0xfac0
movq (%rdx,%rcx,8), %r14
movl %eax, %ecx
andl $0x1, %ecx
leaq 0xc0ca(%rip), %rdx      # 0xfb00
movq (%rdx,%rcx,8), %r12
andl $0x1c, %eax
leaq 0xc0cc(%rip), %rcx      # 0xfb10
movq (%rcx,%rax,2), %rbp
movq 0x28(%r15), %rdx
addq $0x10, %rdx
leaq 0xf6d9(%rip), %rdi      # 0x13130
leaq 0x73fe(%rip), %rsi      # 0xae5c
xorl %eax, %eax
callq 0x21e0
testb $0x2, 0x10(%r15)
movl 0x1c(%r15), %r10d
leaq 0x6de0(%rip), %r11      # 0xa855
leaq 0x7a75(%rip), %rax      # 0xb4f1
cmoveq %rax, %r11
movq %rbx, %rdi
leaq 0x6d9f(%rip), %rsi      # 0xa829
movl 0x4(%rsp), %edx
leaq 0xf59b(%rip), %rcx      # 0x13030
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
leaq 0xf688(%rip), %r10      # 0x13130
pushq %r10
pushq %rbp
callq 0x2110
addq $0x20, %rsp
cmpl $0x0, 0x58(%r15)
jle 0x3b1c
xorl %r12d, %r12d
leal 0x1(%r12), %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x2528
movq %rax, %r14
cmpl 0x58(%r15), %ebp
jge 0x3aed
addl $0x2, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x2528
movl 0x124(%rax), %ecx
jmp 0x3af1
movl 0x1c(%r15), %ecx
subl 0x124(%r14), %ecx
movl 0x124(%r14), %edx
addq $0x24, %r14
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %r8
xorl %eax, %eax
callq 0x2110
movl %ebp, %r12d
cmpl 0x58(%r15), %ebp
jl 0x3abe
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
movq 0x8(%rsp), %r14
cmpl 0x50(%r14), %ecx
movl %eax, %esi
jl 0x39de
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq