LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 -0x10b(%rip), %rdi      # 0x47a0
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f24
movq %rax, 0x9e55(%rip)      # 0xe710
leaq 0x227e(%rip), %rsi      # 0x6b40
movq %rax, %rdi
callq 0x6ad3
leaq -0x12c(%rip), %rbx      # 0x47a5
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f24
movq %rax, 0x9e34(%rip)      # 0xe718
leaq 0x2207(%rip), %r14      # 0x6af2
movq %rax, %rdi
movq %r14, %rsi
callq 0x6ad3
leaq -0x153(%rip), %rdi      # 0x47aa
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f24
movq %rax, 0x9e13(%rip)      # 0xe720
movq %rax, %rdi
movq %r14, %rsi
callq 0x6ad3
leaq -0x136(%rip), %rdi      # 0x47e9
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f24
movq %rax, 0x9df9(%rip)      # 0xe728
leaq 0x2230(%rip), %rsi      # 0x6b66
movq %rax, %rdi
callq 0x6ad3
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5f24
movq %rax, 0x9db7(%rip)      # 0xe708
movq %rax, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6ad3
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x18
popq %rdi
callq 0x21b0
movq %rax, %rbx
movq 0x10(%r15), %rdi
callq 0x2270
movq %rax, (%rbx)
movq 0x18(%r15), %rdi
callq 0x2270
movq %rax, 0x8(%rbx)
movq 0x20(%r15), %rdi
callq 0x2270
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x69ed
testq %rax, %rax
je 0x4b54
movq %r14, %rdi
movq %rax, %rsi
callq 0x69d3
incl (%rax)
movq (%rbx), %rdi
callq 0x22c0
movq 0x8(%rbx), %rdi
callq 0x22c0
movq 0x10(%rbx), %rdi
callq 0x22c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x22c0
pushq $0x1
popq %rdi
callq 0x4891
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x61fe
// File: /workspace/github_c_makefile_star2_O2/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 0x9918(%rip), %rdi      # 0xe710
callq 0x6585
movq %rax, %rbx
testq %rax, %rax
je 0x4eb1
pushq $0x18
popq %rdi
callq 0x21b0
movq %rax, %r14
movups 0x10(%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rbx), %rax
movq %rax, 0x10(%r14)
movq 0x98fe(%rip), %rdi      # 0xe728
movq %r14, %rsi
callq 0x6585
decl (%rax)
movq 0x98cd(%rip), %rdi      # 0xe708
movq 0x10(%rbx), %rsi
callq 0x6585
decl (%rax)
movq 0x98cb(%rip), %r15      # 0xe718
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0x69ed
movq %r15, %rdi
movq %rax, %rsi
callq 0x69d3
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7ca0
movq 0x98aa(%rip), %r15      # 0xe720
movq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x69ed
movq %r15, %rdi
movq %rax, %rsi
callq 0x69d3
movq %rax, %rdi
movq %rbx, %rsi
callq 0x7ca0
movq 0x9871(%rip), %rdi      # 0xe710
leaq 0xc(%rsp), %rsi
callq 0x63fe
movq %r14, %rdi
callq 0x22c0
testq %rbx, %rbx
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4f1e
movq %rsi, %r14
pushq $0x28
popq %rdi
callq 0x21b0
movq %rax, %r15
movq %r14, %rdi
callq 0x2270
movq %rax, 0x20(%r15)
movb $0x1, 0x9809(%rip)      # 0xe6f8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7ec2
movq %rax, %rbx
movb $0x0, 0x97f4(%rip)      # 0xe6f8
movq 0x20(%r15), %rdi
callq 0x22c0
movq %r15, %rdi
callq 0x22c0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7dfe
// File: /workspace/github_c_makefile_star2_O2/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 0x4fa3
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x21b0
movq %rax, %r14
orl $-0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
movq %r15, %rdi
callq 0x2270
movq %rax, 0x20(%r14)
movb $0x1, 0x9790(%rip)      # 0xe6f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7ec2
movb $0x0, 0x977e(%rip)      # 0xe6f8
testq %rax, %rax
je 0x4fa7
movq %rax, %r15
movq 0x20(%r14), %rdi
callq 0x22c0
movq %r14, %rdi
callq 0x22c0
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7e74
xorl %eax, %eax
jmp 0x4fea
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7c00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7ec2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e74
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7ca0
movq 0x20(%r14), %rdi
callq 0x22c0
movq %r14, %rdi
callq 0x22c0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpb $0x9, %al
je 0x1179
movzbl %al, %eax
cmpl $0xa, %eax
je 0x117d
cmpl $0xff, %eax
je 0x1181
cmpl $0x20, %eax
jne 0x1157
incl %r14d
jmp 0x1157
incl %ebx
jmp 0x1157
incl %ebp
jmp 0x1157
leaq 0xe7c(%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_O2/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
andl $0x0, (%rsi)
leaq 0xeb5(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1030
leaq 0xebd(%rip), %rdi       # 0x201a
leaq 0x2ed4(%rip), %rbx      # 0x4038
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
leaq 0xebb(%rip), %rdi       # 0x2030
leaq 0x2eb8(%rip), %r14      # 0x4034
movq %r14, %rsi
xorl %eax, %eax
callq 0x1030
subq %r14, %rbx
leaq 0xeb6(%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_O2/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), %r15
movq %r15, %rdi
movl $0xc8, %esi
movq %r14, %rdx
callq 0x1040
testq %rax, %rax
je 0x11d1
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1030
jmp 0x11af
pushq $0x1
popq %rax
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_segment_get_alignment
int xlink_segment_get_alignment(xlink_segment *seg) {
  switch (seg->attrib.align) {
    case OMF_SEGMENT_BYTE : {
      return 0;
    }
    case OMF_SEGMENT_WORD : {
      return 1;
    }
    case OMF_SEGMENT_DWORD : {
      return 2;
    }
    case OMF_SEGMENT_PARA : {
      return 4;
    }
    case OMF_SEGMENT_PAGE : {
      return 12;
    }
    default : {
      XLINK_ERROR(1,
       ("Unsupported alignment %s:%i for segment %s",
       OMF_SEGDEF_ALIGN[seg->attrib.align], seg->attrib.align,
       xlink_segment_get_name(seg)));
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x10(%rdi), %ebx
shrl $0x5, %ebx
leal -0x1(%rbx), %eax
cmpb $0x5, %al
jae 0x25d1
movzbl %al, %eax
leaq 0x6bae(%rip), %rcx      # 0x9174
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd4e8(%rip), %rax      # 0xfac0
movq (%rax,%rbx,8), %r14
callq 0x255c
leaq 0x6f25(%rip), %rdi      # 0x950d
leaq 0x10a41(%rip), %rcx     # 0x13030
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/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 0x27cd
leaq 0x68b3(%rip), %rax      # 0x9010
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzwl 0x3c(%rdi), %edx
leaq 0x10cbf(%rip), %rdi     # 0x13430
leaq 0x6def(%rip), %rsi      # 0x9567
jmp 0x27bd
movzwl 0x38(%rdi), %edx
movl 0x3c(%rdi), %ecx
leaq 0x10ca8(%rip), %rdi     # 0x13430
leaq 0x6ddf(%rip), %rsi      # 0x956e
xorl %eax, %eax
callq 0x21e0
jmp 0x27c4
movzbl 0x3c(%rdi), %edx
leaq 0x10c8d(%rip), %rdi     # 0x13430
leaq 0x6db6(%rip), %rsi      # 0x9560
jmp 0x27bd
movl 0x3c(%rdi), %edx
leaq 0x10c7a(%rip), %rdi     # 0x13430
leaq 0x6db8(%rip), %rsi      # 0x9575
xorl %eax, %eax
callq 0x21e0
leaq 0x10c65(%rip), %rax     # 0x13430
popq %rcx
retq
leaq 0x6da8(%rip), %rdi      # 0x957c
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x120(%rbx), %rax
movq 0x118(%rbx), %rdi
cmpq %rax, %r14
jge 0x280e
movq (%rdi,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x27ed
callq 0x2030
xorl %r14d, %r14d
movslq 0x130(%rbx), %rax
movq 0x128(%rbx), %rdi
cmpq %rax, %r14
jge 0x2847
movq (%rdi,%r14,8), %rdi
callq 0x2507
movq 0x128(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x2816
callq 0x2030
xorl %r14d, %r14d
movslq 0x140(%rbx), %rax
movq 0x138(%rbx), %rdi
cmpq %rax, %r14
jge 0x2880
movq (%rdi,%r14,8), %rdi
callq 0x26b1
movq 0x138(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x284f
callq 0x2030
xorl %r14d, %r14d
movslq 0x150(%rbx), %rax
movq 0x148(%rbx), %rdi
cmpq %rax, %r14
jge 0x28a9
movq (%rdi,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x2888
callq 0x2030
xorl %r14d, %r14d
movslq 0x160(%rbx), %rax
movq 0x158(%rbx), %rdi
cmpq %rax, %r14
jge 0x28d2
movq (%rdi,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x28b1
callq 0x2030
xorl %r14d, %r14d
movslq 0x170(%rbx), %rax
movq 0x168(%rbx), %rdi
cmpq %rax, %r14
jge 0x290b
movq (%rdi,%r14,8), %rdi
callq 0x271b
movq 0x168(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x28da
callq 0x2030
xorl %r14d, %r14d
movslq 0x180(%rbx), %rax
movq 0x178(%rbx), %rdi
cmpq %rax, %r14
jge 0x2934
movq (%rdi,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x2913
callq 0x2030
movl $0x188, %edx            # imm = 0x188
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20d0
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r14d, %r14d
movslq 0x28(%rbx), %rax
movq 0x20(%rbx), %rdi
cmpq %rax, %r14
jge 0x2981
movq (%rdi,%r14,8), %rdi
callq 0x27e3
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x2959
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r14d, %r14d
movslq 0x30(%rbx), %rax
cmpq %rax, %r14
jge 0x29f1
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x27e3
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x29c9
xorl %r14d, %r14d
movslq 0x40(%rbx), %rax
cmpq %rax, %r14
jge 0x2a1c
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x294f
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
jmp 0x29f4
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)
andq $0x0, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2a8b
movzbl 0xc(%r14), %edi
movl %edi, %eax
orl $0x2, %eax
cmpl $0x82, %eax
jne 0x2abc
incq %rsi
movl %esi, 0x8(%rbx)
movq (%rbx), %rdi
shlq $0x4, %rsi
callq 0x7608
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 0x2ada
leaq 0x6ad2(%rip), %rdi      # 0x959a
movq %rax, %rsi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
xorl %r15d, %r15d
cmpl 0x130(%r14), %ebp
jg 0x300e
movq %r14, %rdi
movl %ebp, %esi
callq 0x2bf6
movq %rax, %r12
movq 0x20(%rax), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
jne 0x300a
testq %r15, %r15
movq %r12, %r15
jne 0x301f
incl %ebp
jmp 0x2fd8
testq %r15, %r15
je 0x303b
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
leaq 0x65ff(%rip), %rdi      # 0x9628
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
movq (%r14), %rdx
leaq 0x6618(%rip), %rdi      # 0x965d
jmp 0x3029
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
xorl %r15d, %r15d
cmpl 0x150(%r14), %ebp
jg 0x308d
movq %r14, %rdi
movl %ebp, %esi
callq 0x2d54
movq %rax, %r12
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
jne 0x3089
testq %r15, %r15
movq %r12, %r15
jne 0x309e
incl %ebp
jmp 0x305b
testq %r15, %r15
je 0x30ba
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
leaq 0x65e0(%rip), %rdi      # 0x9688
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
movq (%r14), %rdx
leaq 0x6600(%rip), %rdi      # 0x96c4
jmp 0x30a8
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
xorl %r15d, %r15d
cmpl 0x160(%r14), %ebp
jg 0x3115
movq %r14, %rdi
movl %ebp, %esi
callq 0x2eb2
cmpl $0x0, 0x114(%rax)
jne 0x3111
movq %rax, %r12
leaq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
jne 0x3111
testq %r15, %r15
movq %r12, %r15
jne 0x3126
incl %ebp
jmp 0x30da
testq %r15, %r15
je 0x3142
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdx
leaq 0x65c4(%rip), %rdi      # 0x96f4
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
movq (%r14), %rdx
leaq 0x65dc(%rip), %rdi      # 0x9728
jmp 0x3130
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_binary_find_public
xlink_public *xlink_binary_find_public(xlink_binary *bin, const char *symb) {
  xlink_public *ret;
  int i, j, k;
  ret = NULL;
  for (i = 1; i <= bin->nmodules; i++) {
    xlink_module *mod;
    mod = xlink_binary_get_module(bin, i);
    for (j = 1; j <= mod->npublics; j++) {
      xlink_public *pub;
      pub = xlink_module_get_public(mod, j);
      if (!pub->is_local && strcmp(symb, pub->name) == 0) {
        XLINK_ERROR(ret != NULL,
         ("Duplicate public definition found for symbol %s in %s and %s",
         symb, ret->module->filename, mod->filename));
        ret = pub;
      }
    }
  }
  for (i = 1; i <= bin->nlibrarys; i++) {
    xlink_library *lib;
    lib = xlink_binary_get_library(bin, i);
    for (j = 1; j <= lib->nmodules; j++) {
      xlink_module *mod;
      mod = xlink_library_get_module(lib, j);
      for (k = 1; k <= mod->npublics; k++) {
        xlink_public *pub;
        pub = xlink_module_get_public(mod, k);
        if (!pub->is_local && strcmp(symb, pub->name) == 0) {
          XLINK_ERROR(ret != NULL,
           ("Duplicate public definition found for symbol %s in %s and %s",
           symb, ret->module->filename, mod->filename));
          ret = pub;
        }
      }
    }
  }
  XLINK_ERROR(ret == NULL, ("Could not find public definition %s", symb));
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
pushq $0x1
popq %rbp
xorl %r13d, %r13d
movq %rdi, 0x8(%rsp)
cmpl 0x30(%rdi), %ebp
jg 0x3388
movl %ebp, %esi
callq 0x321f
movq %rax, %r12
pushq $0x1
popq %r14
cmpl 0x150(%r12), %r14d
jg 0x337f
movq %r12, %rdi
movl %r14d, %esi
callq 0x2d54
cmpl $0x0, 0x12c(%rax)
jne 0x336a
movq %rax, %r15
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
je 0x3375
movq %r13, %r15
incl %r14d
movq %r15, %r13
jmp 0x3339
testq %r13, %r13
je 0x336d
jmp 0x3451
incl %ebp
movq 0x8(%rsp), %rdi
jmp 0x3326
pushq $0x1
popq %rsi
cmpl 0x40(%rdi), %esi
jg 0x3417
movl %esi, 0x4(%rsp)
callq 0x32b3
movq %rax, %rdi
pushq $0x1
popq %r12
movq %rax, 0x10(%rsp)
cmpl 0x28(%rdi), %r12d
jg 0x3407
movl %r12d, %esi
callq 0x318b
movq %rax, %r14
pushq $0x1
popq %rbp
cmpl 0x150(%r14), %ebp
jg 0x33fd
movq %r14, %rdi
movl %ebp, %esi
callq 0x2d54
cmpl $0x0, 0x12c(%rax)
jne 0x33ec
movq %rax, %r15
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
je 0x33f6
movq %r13, %r15
incl %ebp
movq %r15, %r13
jmp 0x33bd
testq %r13, %r13
je 0x33ef
jmp 0x342e
incl %r12d
movq 0x10(%rsp), %rdi
jmp 0x33a9
movl 0x4(%rsp), %esi
incl %esi
movq 0x8(%rsp), %rdi
jmp 0x338b
testq %r13, %r13
je 0x345e
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r13), %rax
movq (%rax), %rdx
movq (%r14), %rcx
leaq 0x6361(%rip), %rdi      # 0x97a0
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
movq 0x8(%r13), %rax
movq (%rax), %rdx
movq (%r12), %rcx
jmp 0x3438
leaq 0x6378(%rip), %rdi      # 0x97dd
movq %rbx, %rsi
xorl %eax, %eax
callq 0x7514
jmp 0x3449
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x34dc
testl %eax, %eax
je 0x35ba
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3471
pushq $0x1
popq %rbp
cmpl 0x78(%rbx), %ebp
jg 0x35af
movq %rbx, %rdi
movl %ebp, %esi
callq 0x24b0
movl 0x28(%rax), %esi
cmpl $0x4, %esi
je 0x360f
cmpl $0x6, %esi
jne 0x362a
movq 0x8(%rbx), %rdi
movl 0x30(%rax), %esi
callq 0x2eb2
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x3570
testl %eax, %eax
jne 0x3626
movq %r14, %rdi
movq %r15, %rsi
callq 0x3505
jmp 0x3626
movq 0x8(%rbx), %rdi
movl 0x30(%rax), %esi
callq 0x2bf6
movq %r14, %rdi
movq %rax, %rsi
callq 0x3599
incl %ebp
jmp 0x35c8
leaq 0x61d0(%rip), %rdi      # 0x9801
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/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 0x61bd(%rip), %rdi      # 0x9818
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x2200
pushq $0x1
popq %rsi
leaq 0x61e8(%rip), %r13      # 0x985b
movq %r14, 0x10(%rsp)
cmpl 0x50(%r14), %esi
jg 0x379e
movq %r14, %rdi
movl %esi, 0xc(%rsp)
callq 0x34ae
movq %rax, %r15
movl 0x7c(%rax), %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
callq 0x255c
movzbl 0x10(%r15), %eax
movl %eax, %ecx
shrl $0x5, %ecx
leaq 0xc40f(%rip), %rdx      # 0xfac0
movq (%rdx,%rcx,8), %r12
movl %eax, %ecx
andl $0x1, %ecx
leaq 0xc43f(%rip), %rdx      # 0xfb00
movq (%rdx,%rcx,8), %rbp
andl $0x1c, %eax
leaq 0xc441(%rip), %rcx      # 0xfb10
movq (%rcx,%rax,2), %r14
movq %r15, %rdi
callq 0x2584
testb $0x2, 0x10(%r15)
movl 0x1c(%r15), %r10d
leaq 0x616a(%rip), %r11      # 0x9855
leaq 0x6dc7(%rip), %rax      # 0xa4b9
cmoveq %rax, %r11
movq %rbx, %rdi
leaq 0x6129(%rip), %rsi      # 0x9829
movl 0x8(%rsp), %edx
leaq 0xf925(%rip), %rcx      # 0x13030
movq %r12, %r8
movq %rbp, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
leaq 0xfa12(%rip), %r10      # 0x13130
pushq %r10
pushq %r14
callq 0x2120
addq $0x20, %rsp
pushq $0x1
popq %r12
cmpl 0x58(%r15), %r12d
jg 0x378e
movq %r15, %rdi
movl %r12d, %esi
callq 0x2388
movq %rax, %r14
cmpl 0x58(%r15), %r12d
jge 0x3768
incl %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x2388
movl 0x124(%rax), %ecx
movl 0x124(%r14), %edx
subl %edx, %ecx
jmp 0x3778
movl 0x1c(%r15), %ecx
movl 0x124(%r14), %edx
subl %edx, %ecx
incl %r12d
addq $0x24, %r14
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %r8
xorl %eax, %eax
callq 0x2120
jmp 0x372f
movl 0xc(%rsp), %esi
incl %esi
movq 0x10(%rsp), %r14
jmp 0x3678
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_segment_apply_relocations
void xlink_segment_apply_relocations(xlink_segment *segment) {
  int i;
  for (i = 1; i <= segment->nrelocs; i++) {
    xlink_reloc *rel;
    unsigned char *data;
    int offset;
    int target;
    rel = xlink_segment_get_reloc(segment, i);
    data = segment->data + rel->offset;
    offset = segment->start + rel->offset;
    switch (rel->target) {
      case OMF_TARGET_EXT : {
        xlink_public *pub;
        pub = xlink_module_get_extern(segment->module, rel->target_idx)->public;
        target = pub->offset;
        if (pub->segment != NULL) {
          target += pub->segment->start;
        }
        break;
      }
      case OMF_TARGET_SEG : {
        xlink_segment *seg;
        seg = xlink_module_get_segment(segment->module, rel->target_idx);
        target = seg->start;
        break;
      }
      default : {
        XLINK_ERROR(1, ("Unsupported target T%i", rel->target));
      }
    }
    switch (rel->location) {
      case OMF_LOCATION_16BIT : {
        if (rel->mode == OMF_MODE_EXPLICIT) {
          *(uint16_t *)data = target + rel->addend.offset;
        }
        else {
          *(uint16_t *)data = target + rel->addend.offset - offset - 2;
        }
        break;
      }
      case OMF_LOCATION_32BIT : {
        if (rel->mode == OMF_MODE_EXPLICIT) {
          *(uint32_t *)data = target + rel->addend.offset;
        }
        else {
          *(uint32_t *)data = target + rel->addend.offset - offset - 4;
        }
        break;
      }
      default : {
        XLINK_ERROR(1, ("Unsupported location %i", rel->location));
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
cmpl 0x78(%rbx), %ebp
jg 0x3883
movq %rbx, %rdi
movl %ebp, %esi
callq 0x24b0
movq %rax, %r14
movq 0x38(%rbx), %r15
movl 0x18(%rax), %r12d
movl 0x28(%rax), %esi
movl 0x7c(%rbx), %r13d
addl %r12d, %r13d
cmpl $0x4, %esi
je 0x381c
cmpl $0x6, %esi
jne 0x389b
movq 0x8(%rbx), %rdi
movl 0x30(%r14), %esi
callq 0x2eb2
movq 0x118(%rax), %rcx
movl 0x124(%rcx), %eax
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x382c
addl 0x7c(%rcx), %eax
jmp 0x382c
movq 0x8(%rbx), %rdi
movl 0x30(%r14), %esi
callq 0x2bf6
movl 0x7c(%rax), %eax
movl 0x20(%r14), %esi
cmpl $0x9, %esi
je 0x384e
cmpl $0x1, %esi
jne 0x3892
movl 0x3c(%r14), %ecx
cmpl $0x1, 0x1c(%r14)
jne 0x386f
addl %eax, %ecx
movw %cx, (%r15,%r12)
jmp 0x387c
movl 0x3c(%r14), %ecx
cmpl $0x1, 0x1c(%r14)
jne 0x3861
addl %eax, %ecx
movl %ecx, (%r15,%r12)
jmp 0x387c
subl %r13d, %eax
addl %ecx, %eax
addl $-0x4, %eax
movl %eax, (%r15,%r12)
jmp 0x387c
subl %r13d, %eax
addl %ecx, %eax
addl $-0x2, %eax
movw %ax, (%r15,%r12)
incl %ebp
jmp 0x37be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5ce3(%rip), %rdi      # 0x957c
jmp 0x38a2
leaq 0x5f5f(%rip), %rdi      # 0x9801
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_omf_record_read_length
unsigned int xlink_omf_record_read_length(xlink_omf_record *rec) {
  unsigned int length;
  length = xlink_omf_record_read_byte(rec);
  switch (length) {
    case 0x81 : {
      return xlink_omf_record_read_word(rec);
    }
    case 0x84 : {
      length = xlink_omf_record_read_word(rec);
      return (xlink_omf_record_read_byte(rec) << 16) | length;
    }
    case 0x88 : {
      return xlink_omf_record_read_dword(rec);
    }
    default : {
      XLINK_ERROR(length > 0x80, ("Invalid length %i", length));
      return length;
    }
  }
}

// Assembly:
movq (%rdi), %rdx
movslq 0x8(%rdi), %rcx
leaq 0x1(%rcx), %rsi
movl %esi, 0x8(%rdi)
movzbl (%rdx,%rcx), %eax
cmpl $0x88, %eax
je 0x3916
cmpl $0x84, %eax
je 0x3901
cmpl $0x81, %eax
jne 0x3920
movzwl (%rdx,%rsi), %eax
addl $0x3, %ecx
jmp 0x391c
movzwl (%rdx,%rsi), %esi
leal 0x4(%rcx), %eax
movl %eax, 0x8(%rdi)
movzbl 0x3(%rdx,%rcx), %eax
shll $0x10, %eax
orl %esi, %eax
retq
movl (%rdx,%rsi), %eax
addl $0x5, %ecx
movl %ecx, 0x8(%rdi)
retq
cmpb $-0x7f, %al
jae 0x3925
retq
pushq %rax
leaq 0x5f46(%rip), %rdi      # 0x9873
movl %eax, %esi
xorl %eax, %eax
callq 0x7514
pushq $-0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_omf_record_read_string
const char *xlink_omf_record_read_string(xlink_omf_record *rec) {
  static char str[256];
  int len = xlink_omf_record_read_byte(rec);
  if (len != 0) {
    memcpy(str, &rec->buf[rec->idx], len);
  }
  str[len] = '\0';
  rec->idx += len;
  return str;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
movslq 0x8(%rdi), %rcx
leaq 0x1(%rcx), %rax
movl %eax, 0x8(%rdi)
movzbl (%rsi,%rcx), %r14d
testq %r14, %r14
je 0x3974
addq %rax, %rsi
leaq 0xfbc9(%rip), %rdi      # 0x13530
movq %r14, %rdx
callq 0x2140
movq %r14, %rcx
jmp 0x3976
xorl %ecx, %ecx
leaq 0xfbb3(%rip), %rax      # 0x13530
movb $0x0, (%rcx,%rax)
addl %r14d, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_omf_record_read_lidata_block
unsigned int xlink_omf_record_read_lidata_block(xlink_omf_record *rec) {
  unsigned int repeat_count;
  unsigned int block_count;
  unsigned int size;
  repeat_count = xlink_omf_record_read_numeric(rec);
  block_count = xlink_omf_record_read_word(rec);
  printf("%i * ", repeat_count);
  if (block_count) {
    int i;
    printf("(");
    size = 0;
    for (i = 0; i < block_count; i++) {
      size += xlink_omf_record_read_lidata_block(rec);
      if (i > 0) printf(" + ");
    }
    printf(")");
  }
  else {
    size = xlink_omf_record_read_byte(rec);
    rec->idx += size;
    printf("%i", size);
  }
  return repeat_count * size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x38b1
movl %eax, %ebx
movq (%r14), %rax
movslq 0x8(%r14), %rcx
movzwl (%rax,%rcx), %r13d
leal 0x2(%rcx), %eax
movl %eax, 0x8(%r14)
leaq 0x5ec9(%rip), %rdi      # 0x9885
movl %ebx, %esi
xorl %eax, %eax
callq 0x20c0
testl %r13d, %r13d
je 0x3a14
movl %ebx, 0x4(%rsp)
pushq $0x28
popq %rdi
callq 0x2040
leaq 0x5eae(%rip), %r12      # 0x988b
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpl %ebx, %r13d
je 0x3a06
movq %r14, %rdi
callq 0x398d
movl %eax, %ebp
testl %ebx, %ebx
je 0x39ff
movq %r12, %rdi
xorl %eax, %eax
callq 0x20c0
addl %ebp, %r15d
incl %ebx
jmp 0x39e2
pushq $0x29
popq %rdi
callq 0x2040
movl 0x4(%rsp), %ebx
jmp 0x3a41
movq (%r14), %rax
movslq 0x8(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%r14)
movzbl (%rax,%rcx), %r15d
leal 0x1(%rcx,%r15), %eax
movl %eax, 0x8(%r14)
leaq 0x6479(%rip), %rdi      # 0x9eb0
movl %r15d, %esi
xorl %eax, %eax
callq 0x20c0
imull %ebx, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_omf_dump_records
void xlink_omf_dump_records(xlink_omf *omf) {
  int i;
  xlink_omf_record *rec;
  printf("Summary of records:\n");
  for (i = 0, rec = omf->records; i < omf->nrecords; i++, rec++) {
    printf("  %02Xh %-7s - %-32s%6i bytes%s\n", rec->type,
     xlink_omf_record_get_name(rec->type), xlink_omf_record_get_desc(rec->type),
     3 + rec->size - 1, rec->type & 1 ? " 32-bit" : "");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7224(%rip), %rdi      # 0xac90
callq 0x2060
movq (%rbx), %r12
addq $0xe, %r12
leaq 0x5e31(%rip), %rbp      # 0x98b0
leaq 0x5e09(%rip), %r14      # 0x988f
xorl %r13d, %r13d
cmpl 0x8(%rbx), %r13d
jge 0x3af1
movzbl -0x2(%r12), %r15d
movl %r15d, %edi
callq 0x2ada
leal -0x80(%r15), %edx
leaq 0x6cac(%rip), %rcx      # 0xa754
cmpl $0x4b, %edx
ja 0x3abd
shrl %edx
leaq 0x576a(%rip), %rsi      # 0x9220
movslq (%rsi,%rdx,4), %rcx
addq %rsi, %rcx
movzwl (%r12), %r8d
addl $0x2, %r8d
testb $0x1, %r15b
movq %rbp, %r9
leaq 0x69e5(%rip), %rdx      # 0xa4b9
cmoveq %rdx, %r9
movq %r14, %rdi
movl %r15d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x20c0
incl %r13d
addq $0x10, %r12
jmp 0x3a89
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_omf_dump_lxdata
void xlink_omf_dump_lxdata(xlink_omf *omf, xlink_module *mod) {
  int i;
  xlink_omf_record *rec;
  printf("LEDATA, LIDATA, COMDAT and FIXUPP records:\n");
  for (i = 0, rec = omf->records; i < omf->nrecords; i++, rec++) {
    xlink_segment *seg;
    int offset;
    xlink_omf_record_reset(rec);
    switch (rec->type & ~1) {
      case OMF_LEDATA : {
        seg = xlink_module_get_segment(mod, xlink_omf_record_read_index(rec));
        offset = xlink_omf_record_read_numeric(rec);
        printf("  LEDATA: segment %8s, offset 0x%04x, size 0x%04x\n",
         xlink_segment_get_name(seg), offset, 3 + rec->size - 1 - rec->idx);
        break;
      }
      case OMF_LIDATA : {
        seg = xlink_module_get_segment(mod, xlink_omf_record_read_index(rec));
        offset = xlink_omf_record_read_numeric(rec);
        printf("  LIDATA: segment %8s, offset 0x%04x, size ",
         xlink_segment_get_name(seg), offset);
        printf(" = 0x%04x\n", xlink_omf_record_read_lidata_block(rec));
        break;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x718c(%rip), %rdi      # 0xaca4
callq 0x2060
movq (%r14), %r15
xorl %r13d, %r13d
cmpl 0x8(%r14), %r13d
jge 0x3bff
movl $0x3, 0x8(%r15)
movzbl 0xc(%r15), %eax
andl $-0x2, %eax
cmpl $0xa2, %eax
je 0x3b9d
cmpl $0xa0, %eax
jne 0x3bf3
movq %r15, %rdi
callq 0x3c0e
movq %rbx, %rdi
movl %eax, %esi
callq 0x2bf6
movq %rax, %rbp
movq %r15, %rdi
callq 0x38b1
movl %eax, %r12d
movq %rbp, %rdi
callq 0x255c
movzwl 0xe(%r15), %ecx
subl 0x8(%r15), %ecx
addl $0x2, %ecx
leaq 0x5d2e(%rip), %rdi      # 0x98b8
leaq 0xf49f(%rip), %rsi      # 0x13030
movl %r12d, %edx
xorl %eax, %eax
callq 0x20c0
jmp 0x3bf3
movq %r15, %rdi
callq 0x3c0e
movq %rbx, %rdi
movl %eax, %esi
callq 0x2bf6
movq %rax, %r12
movq %r15, %rdi
callq 0x38b1
movl %eax, %ebp
movq %r12, %rdi
callq 0x255c
leaq 0x5d20(%rip), %rdi      # 0x98eb
leaq 0xf45e(%rip), %rsi      # 0x13030
movl %ebp, %edx
xorl %eax, %eax
callq 0x20c0
movq %r15, %rdi
callq 0x398d
leaq 0x5d2d(%rip), %rdi      # 0x9917
movl %eax, %esi
xorl %eax, %eax
callq 0x20c0
incl %r13d
addq $0x10, %r15
jmp 0x3b23
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_omf_record_read_index
static unsigned int xlink_omf_record_read_index(xlink_omf_record *rec) {
  unsigned char byte;
  byte = xlink_omf_record_read_byte(rec);
  if (byte & 0x80) {
    return ((byte & 0x7f) << 8) | xlink_omf_record_read_byte(rec);
  }
  return byte;
}

// Assembly:
movq (%rdi), %rcx
movslq 0x8(%rdi), %rsi
leaq 0x1(%rsi), %rdx
movl %edx, 0x8(%rdi)
movzbl (%rcx,%rsi), %eax
testb %al, %al
js 0x3c25
retq
andl $0x7f, %eax
shll $0x8, %eax
addl $0x2, %esi
movl %esi, 0x8(%rdi)
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_module_dump_names
void xlink_module_dump_names(xlink_module *mod) {
  int i;
  if (mod->nnames > 0) {
    printf("Local names:\n");
    for (i = 1; i <= mod->nnames; i++) {
      char buf[256];
      sprintf(buf, "'%s'", xlink_module_get_name(mod, i)->str);
      printf("%2i : %8s\n", i, buf);
    }
  }
}

// Assembly:
cmpl $0x0, 0x120(%rdi)
jle 0x3cb8
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x7075(%rip), %rdi      # 0xaccf
callq 0x2060
pushq $0x1
popq %rbp
leaq 0x61f3(%rip), %r14      # 0x9e5c
movq %rsp, %r15
leaq 0x5caf(%rip), %r12      # 0x9922
cmpl 0x120(%rbx), %ebp
jg 0x3ca9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2b47
leaq 0x10(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21e0
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
incl %ebp
jmp 0x3c73
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/negge[P]xlink/src/xlink.c
// Function: xlink_module_dump_symbols
void xlink_module_dump_symbols(xlink_module *mod) {
  int i;
  if (mod->npublics > 0) {
    printf("Public names:\n");
    for (i = 1; i <= mod->npublics; i++) {
      xlink_public *pub;
      char buf[256];
      pub = xlink_module_get_public(mod, i);
      sprintf(buf, "'%s'", pub->name);
      printf("%2i : %16s %c group %8s, segment %8s, offset 0x%04x, type %i\n",
       i, buf, pub->is_local ? 'L' : ' ',
       pub->group ? xlink_group_get_name(pub->group) : ":0",
       pub->segment ? xlink_segment_get_name(pub->segment) : ":0",
       pub->offset, pub->type_idx);
    }
  }
  if (mod->nexterns > 0) {
    printf("External names:\n");
    for (i = 1; i <= mod->nexterns; i++) {
      xlink_extern *ext;
      char buf[256];
      ext = xlink_module_get_extern(mod, i);
      sprintf(buf, "'%s'", ext->name);
      printf("%2i : %16s %c type %i\n", i, buf, ext->is_local ? 'L' : ' ',
       ext->type_idx);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
cmpl $0x0, 0x150(%rdi)
jle 0x3d95
leaq 0x6ffb(%rip), %rdi      # 0xacdc
callq 0x2060
pushq $0x1
popq %rbp
leaq 0x5c7b(%rip), %r15      # 0x996b
cmpl 0x150(%rbx), %ebp
jg 0x3d95
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2d54
movq %rax, %r13
leaq 0x24(%rax), %rdx
movq %rsp, %rdi
leaq 0x6145(%rip), %rsi      # 0x9e5c
xorl %eax, %eax
callq 0x21e0
cmpl $0x0, 0x12c(%r13)
pushq $0x4c
popq %r14
pushq $0x20
popq %rax
cmovel %eax, %r14d
movq 0x10(%r13), %rdi
movq %r15, %r12
testq %rdi, %rdi
je 0x3d49
callq 0x26cf
leaq 0xf4e7(%rip), %r12      # 0x13230
movq 0x18(%r13), %rdi
movq %r15, %r9
testq %rdi, %rdi
je 0x3d61
callq 0x255c
leaq 0xf2cf(%rip), %r9       # 0x13030
movl 0x124(%r13), %r10d
movl 0x128(%r13), %r11d
leaq 0x5bb7(%rip), %rdi      # 0x992d
movl %ebp, %esi
movq %rsp, %rdx
movl %r14d, %ecx
movq %r12, %r8
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x20c0
popq %rcx
popq %rdx
incl %ebp
jmp 0x3cf0
cmpl $0x0, 0x160(%rbx)
jle 0x3e0f
pushq $0x1
popq %rbp
leaq 0x6f42(%rip), %rdi      # 0xacea
callq 0x2060
leaq 0x60a8(%rip), %r14      # 0x9e5c
movq %rsp, %r15
leaq 0x5bb0(%rip), %r12      # 0x996e
cmpl 0x160(%rbx), %ebp
jg 0x3e0f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2eb2
movq %rax, %r13
leaq 0x10(%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x21e0
cmpl $0x0, 0x114(%r13)
pushq $0x4c
popq %rcx
pushq $0x20
popq %rax
cmovel %eax, %ecx
movl 0x110(%r13), %r8d
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
incl %ebp
jmp 0x3dbe
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq