LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x9cc0(%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 0x4a77
movl (%r14), %eax
subl (%rbx), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4aab
movq 0x8(%r14), %rdi
movq 0x8(%rbx), %rsi
callq 0x2190
testl %eax, %eax
je 0x4ab3
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_O3/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      # 0x4a38
xorl %esi, %esi
xorl %edx, %edx
callq 0x630c
movq %rax, 0x9bdb(%rip)      # 0xe730
leaq 0x23cc(%rip), %rsi      # 0x6f28
movq %rax, %rdi
callq 0x6ebb
leaq -0x12e(%rip), %rbx      # 0x4a3d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x630c
movq %rax, 0x9bba(%rip)      # 0xe738
leaq 0x2355(%rip), %r14      # 0x6eda
movq %rax, %rdi
movq %r14, %rsi
callq 0x6ebb
leaq -0x155(%rip), %rdi      # 0x4a42
xorl %esi, %esi
xorl %edx, %edx
callq 0x630c
movq %rax, 0x9b99(%rip)      # 0xe740
movq %rax, %rdi
movq %r14, %rsi
callq 0x6ebb
leaq -0x138(%rip), %rdi      # 0x4a81
xorl %esi, %esi
xorl %edx, %edx
callq 0x630c
movq %rax, 0x9b7f(%rip)      # 0xe748
leaq 0x237e(%rip), %rsi      # 0x6f4e
movq %rax, %rdi
callq 0x6ebb
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x630c
movq %rax, 0x9b3d(%rip)      # 0xe728
movq %rax, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6ebb
// File: /workspace/github_c_makefile_star2_O3/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 0x6dd5
testq %rax, %rax
je 0x4e13
movq %r14, %rdi
movq %rax, %rsi
callq 0x6dbb
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 0x65e6
// File: /workspace/github_c_makefile_star2_O3/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 0x9667(%rip), %rdi      # 0xe730
callq 0x696d
movq %rax, %rbx
testq %rax, %rax
je 0x5184
movl $0x18, %edi
callq 0x21c0
movq %rax, %r14
movups 0x10(%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rbx), %rax
movq %rax, 0x10(%r14)
movq 0x964b(%rip), %rdi      # 0xe748
movq %r14, %rsi
callq 0x696d
decl (%rax)
movq 0x961a(%rip), %rdi      # 0xe728
movq 0x10(%rbx), %rsi
callq 0x696d
decl (%rax)
movq 0x9618(%rip), %r15      # 0xe738
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0x6dd5
movq %r15, %rdi
movq %rax, %rsi
callq 0x6dbb
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8088
movq 0x95f7(%rip), %r15      # 0xe740
movq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x6dd5
movq %r15, %rdi
movq %rax, %rsi
callq 0x6dbb
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8088
movq 0x95be(%rip), %rdi      # 0xe730
leaq 0xc(%rsp), %rsi
callq 0x67e6
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_O3/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 0x51f3
movq %rsi, %r14
movl $0x28, %edi
callq 0x21c0
movq %rax, %r15
movq %r14, %rdi
callq 0x2280
movq %rax, 0x20(%r15)
movb $0x1, 0x9554(%rip)      # 0xe718
movq %rbx, %rdi
movq %r15, %rsi
callq 0x82aa
movq %rax, %rbx
movb $0x0, 0x953f(%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 0x81e6
// File: /workspace/github_c_makefile_star2_O3/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 0x5280
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, 0x94d3(%rip)      # 0xe718
movq %rbx, %rdi
movq %r14, %rsi
callq 0x82aa
movb $0x0, 0x94c1(%rip)      # 0xe718
testq %rax, %rax
je 0x5284
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 0x825c
xorl %eax, %eax
jmp 0x52c7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7fe8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x82aa
movq %rbx, %rdi
movq %rax, %rsi
callq 0x825c
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8088
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_O3/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 0x296e
leaq 0x7712(%rip), %rax      # 0xa010
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzwl 0x3c(%rdi), %edx
leaq 0x10b1e(%rip), %rdi     # 0x13430
leaq 0x7c4e(%rip), %rsi      # 0xa567
jmp 0x295e
movzwl 0x38(%rdi), %edx
movl 0x3c(%rdi), %ecx
leaq 0x10b07(%rip), %rdi     # 0x13430
leaq 0x7c3e(%rip), %rsi      # 0xa56e
xorl %eax, %eax
callq 0x21e0
jmp 0x2965
movzbl 0x3c(%rdi), %edx
leaq 0x10aec(%rip), %rdi     # 0x13430
leaq 0x7c15(%rip), %rsi      # 0xa560
jmp 0x295e
movl 0x3c(%rdi), %edx
leaq 0x10ad9(%rip), %rdi     # 0x13430
leaq 0x7c17(%rip), %rsi      # 0xa575
xorl %eax, %eax
callq 0x21e0
leaq 0x10ac4(%rip), %rax     # 0x13430
popq %rcx
retq
leaq 0x7c07(%rip), %rdi      # 0xa57c
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x29b9
xorl %r14d, %r14d
movq 0x118(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x120(%rbx), %rax
cmpq %rax, %r14
jl 0x299a
movq 0x118(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x130(%rbx)
jle 0x2a00
xorl %r14d, %r14d
movq 0x128(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x26a4
movq 0x128(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x130(%rbx), %rax
cmpq %rax, %r14
jl 0x29d1
movq 0x128(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x140(%rbx)
jle 0x2a5f
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 0x2a18
movq 0x138(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x150(%rbx)
jle 0x2a96
xorl %r14d, %r14d
movq 0x148(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x150(%rbx), %rax
cmpq %rax, %r14
jl 0x2a77
movq 0x148(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x160(%rbx)
jle 0x2acd
xorl %r14d, %r14d
movq 0x158(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x160(%rbx), %rax
cmpq %rax, %r14
jl 0x2aae
movq 0x158(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x170(%rbx)
jle 0x2b21
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 0x2ae5
movq 0x168(%rbx), %rdi
callq 0x2030
cmpl $0x0, 0x180(%rbx)
jle 0x2b58
xorl %r14d, %r14d
movq 0x178(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x180(%rbx), %rax
cmpq %rax, %r14
jl 0x2b39
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_O3/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 0x2bae
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2986
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x28(%rbx), %rax
cmpq %rax, %r14
jl 0x2b88
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/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 0x2c29
xorl %r14d, %r14d
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2986
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x30(%rbx), %rax
cmpq %rax, %r14
jl 0x2c03
cmpl $0x0, 0x40(%rbx)
jle 0x2c58
xorl %r14d, %r14d
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2b78
movq 0x38(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2030
incq %r14
movslq 0x40(%rbx), %rax
cmpq %rax, %r14
jl 0x2c32
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_O3/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 0x2cca
movzbl 0xc(%r14), %edi
movl %edi, %eax
orl $0x2, %eax
cmpl $0x82, %eax
jne 0x2cfb
incq %rsi
movl %esi, 0x8(%rbx)
movq (%rbx), %rdi
shlq $0x4, %rsi
callq 0x8540
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 0x2d1b
leaq 0x7893(%rip), %rdi      # 0xa59a
movq %rax, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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
cmpl $0x0, 0x130(%rdi)
jle 0x3282
xorl %r12d, %r12d
xorl %r15d, %r15d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2e36
movq %rax, %r13
movq 0x20(%rax), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
jne 0x3249
testq %r15, %r15
movq %r13, %r15
jne 0x3264
cmpl 0x130(%r14), %r12d
jl 0x321c
testq %r15, %r15
je 0x3282
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x73ba(%rip), %rdi      # 0xa628
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
movq (%r14), %rdx
leaq 0x73d1(%rip), %rdi      # 0xa65d
jmp 0x326e
// File: /workspace/github_c_makefile_star2_O3/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
cmpl $0x0, 0x150(%rdi)
jle 0x330e
xorl %r12d, %r12d
xorl %r15d, %r15d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x2f92
movq %rax, %r13
leaq 0x24(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
jne 0x32d5
testq %r15, %r15
movq %r13, %r15
jne 0x32f0
cmpl 0x150(%r14), %r12d
jl 0x32ac
testq %r15, %r15
je 0x330e
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x738e(%rip), %rdi      # 0xa688
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
movq (%r14), %rdx
leaq 0x73ac(%rip), %rdi      # 0xa6c4
jmp 0x32fa
// File: /workspace/github_c_makefile_star2_O3/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
cmpl $0x0, 0x160(%rdi)
jle 0x3391
xorl %r12d, %r12d
xorl %r15d, %r15d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x30ee
cmpl $0x0, 0x114(%rax)
jne 0x336a
movq %rax, %r13
leaq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x2110
testl %eax, %eax
jne 0x336a
testq %r15, %r15
movq %r13, %r15
jne 0x3385
cmpl 0x160(%r14), %r12d
jl 0x3338
testq %r15, %r15
je 0x3391
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rdx
leaq 0x7365(%rip), %rdi      # 0xa6f4
jmp 0x339b
movq (%r14), %rdx
leaq 0x738d(%rip), %rdi      # 0xa728
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x48(%rdi), %rdi
testq %rax, %rax
jle 0x3871
xorl %ecx, %ecx
cmpq %rbx, (%rdi,%rcx,8)
je 0x3935
incq %rcx
cmpq %rcx, %rax
jne 0x385f
leal 0x1(%rax), %ecx
movl %ecx, 0x50(%r14)
leaq 0x8(,%rax,8), %rsi
callq 0x8540
movq %rax, 0x48(%r14)
movslq 0x50(%r14), %rcx
movq %rbx, -0x8(%rax,%rcx,8)
cmpl $0x0, 0x78(%rbx)
jle 0x3935
movl $0x1, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x264e
movl 0x28(%rax), %esi
cmpl $0x4, %esi
je 0x390d
cmpl $0x6, %esi
jne 0x3941
movq 0x8(%rbx), %rdi
movl 0x30(%rax), %esi
callq 0x30ee
movq %rax, %r12
movslq 0x60(%r14), %rax
movq 0x58(%r14), %rdi
testq %rax, %rax
jle 0x38ea
xorl %ecx, %ecx
cmpq %r12, (%rdi,%rcx,8)
je 0x3924
incq %rcx
cmpq %rcx, %rax
jne 0x38dc
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%r14)
leaq 0x8(,%rax,8), %rsi
callq 0x8540
movq %rax, 0x58(%r14)
movslq 0x60(%r14), %rcx
movq %r12, -0x8(%rax,%rcx,8)
jmp 0x3924
movq 0x8(%rbx), %rdi
movl 0x30(%rax), %esi
callq 0x2e36
movq %r14, %rdi
movq %rax, %rsi
callq 0x3842
leal 0x1(%r15), %eax
cmpl 0x78(%rbx), %r15d
movl %eax, %r15d
jl 0x38a2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x6eb9(%rip), %rdi      # 0xa801
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x6ea4(%rip), %rdi      # 0xa818
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2200
cmpl $0x0, 0x50(%r14)
jle 0x3afe
movl $0x1, %esi
leaq 0x6ebe(%rip), %r13      # 0xa85b
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movq %rsi, 0x10(%rsp)
callq 0x3759
movq %rax, %r15
movl 0x7c(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%r15), %rdx
addq $0x10, %rdx
movl (%r15), %ecx
leaq 0xf665(%rip), %rdi      # 0x13030
leaq 0x718e(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movzbl 0x10(%r15), %eax
movl %eax, %ecx
shrl $0x5, %ecx
leaq 0xc0d6(%rip), %rdx      # 0xfac0
movq (%rdx,%rcx,8), %r14
movl %eax, %ecx
andl $0x1, %ecx
leaq 0xc106(%rip), %rdx      # 0xfb00
movq (%rdx,%rcx,8), %r12
andl $0x1c, %eax
leaq 0xc108(%rip), %rcx      # 0xfb10
movq (%rcx,%rax,2), %rbp
movq 0x28(%r15), %rdx
addq $0x10, %rdx
leaq 0xf715(%rip), %rdi      # 0x13130
leaq 0x743a(%rip), %rsi      # 0xae5c
xorl %eax, %eax
callq 0x21e0
testb $0x2, 0x10(%r15)
movl 0x1c(%r15), %r10d
leaq 0x6e1c(%rip), %r11      # 0xa855
leaq 0x7a79(%rip), %rax      # 0xb4b9
cmoveq %rax, %r11
movq %rbx, %rdi
leaq 0x6ddb(%rip), %rsi      # 0xa829
movl 0x4(%rsp), %edx
leaq 0xf5d7(%rip), %rcx      # 0x13030
movq %r14, %r8
movq %r12, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
leaq 0xf6c4(%rip), %r10      # 0x13130
pushq %r10
pushq %rbp
callq 0x2120
addq $0x20, %rsp
cmpl $0x0, 0x58(%r15)
jle 0x3ae5
movl $0x1, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x2528
movq %rax, %r14
cmpl 0x58(%r15), %ebp
jge 0x3ab7
leal 0x1(%rbp), %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x2528
movl 0x124(%rax), %ecx
movl 0x124(%r14), %edx
subl %edx, %ecx
jmp 0x3ac8
movl 0x1c(%r15), %ecx
movl 0x124(%r14), %edx
subl %edx, %ecx
leal 0x1(%rbp), %r12d
addq $0x24, %r14
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %r8
xorl %eax, %eax
callq 0x2120
cmpl 0x58(%r15), %ebp
movl %r12d, %ebp
jl 0x3a84
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
movq 0x8(%rsp), %r14
cmpl 0x50(%r14), %ecx
movl %eax, %esi
jl 0x39a2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
cmpl $0x0, 0x78(%rdi)
jle 0x3be7
movq %rdi, %rbx
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x264e
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 0x3b7e
cmpl $0x6, %esi
jne 0x3bff
movq 0x8(%rbx), %rdi
movl 0x30(%r14), %esi
callq 0x30ee
movq 0x118(%rax), %rcx
movl 0x124(%rcx), %eax
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x3b8e
addl 0x7c(%rcx), %eax
jmp 0x3b8e
movq 0x8(%rbx), %rdi
movl 0x30(%r14), %esi
callq 0x2e36
movl 0x7c(%rax), %eax
movl 0x20(%r14), %esi
cmpl $0x9, %esi
je 0x3bb0
cmpl $0x1, %esi
jne 0x3bf6
movl 0x3c(%r14), %ecx
cmpl $0x1, 0x1c(%r14)
jne 0x3bd1
addl %eax, %ecx
movw %cx, (%r15,%r12)
jmp 0x3bde
movl 0x3c(%r14), %ecx
cmpl $0x1, 0x1c(%r14)
jne 0x3bc3
addl %eax, %ecx
movl %ecx, (%r15,%r12)
jmp 0x3bde
subl %r13d, %eax
addl %ecx, %eax
addl $-0x4, %eax
movl %eax, (%r15,%r12)
jmp 0x3bde
subl %r13d, %eax
addl %ecx, %eax
addl $-0x2, %eax
movw %ax, (%r15,%r12)
cmpl 0x78(%rbx), %ebp
jl 0x3b27
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x697f(%rip), %rdi      # 0xa57c
jmp 0x3c06
leaq 0x6bfb(%rip), %rdi      # 0xa801
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x3c7c
cmpl $0x84, %eax
je 0x3c67
cmpl $0x81, %eax
jne 0x3c86
movzwl (%rdx,%rsi), %eax
addl $0x3, %ecx
jmp 0x3c82
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 0x3c8b
retq
pushq %rax
leaq 0x6be0(%rip), %rdi      # 0xa873
movl %eax, %esi
xorl %eax, %eax
callq 0x22ef
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21f0
// File: /workspace/github_c_makefile_star2_O3/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 0x3cdc
addq %rax, %rsi
leaq 0xf861(%rip), %rdi      # 0x13530
movq %r14, %rdx
callq 0x2140
movq %r14, %rcx
jmp 0x3cde
xorl %ecx, %ecx
leaq 0xf84b(%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_O3/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
testb $0x1, 0xc(%rdi)
movq (%rdi), %rax
movslq 0x8(%rdi), %rcx
jne 0x3d19
movzwl (%rax,%rcx), %ebx
addl $0x2, %ecx
jmp 0x3d1f
movl (%rax,%rcx), %ebx
addl $0x4, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx), %r13d
addl $0x2, %ecx
movl %ecx, 0x8(%r14)
leaq 0x6b50(%rip), %rdi      # 0xa885
movl %ebx, %esi
xorl %eax, %eax
callq 0x20c0
testl %r13d, %r13d
je 0x3d8f
movl %ebx, 0x4(%rsp)
movl $0x28, %edi
callq 0x2040
leaq 0x6b33(%rip), %r12      # 0xa88b
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x3cf5
movl %eax, %ebp
testl %ebx, %ebx
je 0x3d75
movq %r12, %rdi
xorl %eax, %eax
callq 0x20c0
addl %ebp, %r15d
incl %ebx
cmpl %ebx, %r13d
jne 0x3d5d
movl $0x29, %edi
callq 0x2040
movl 0x4(%rsp), %ebx
jmp 0x3dbc
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 0x70fe(%rip), %rdi      # 0xaeb0
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_O3/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 0x7ea9(%rip), %rdi      # 0xbc90
callq 0x2060
cmpl $0x0, 0x8(%rbx)
jle 0x3e70
movq (%rbx), %r12
addq $0xe, %r12
leaq 0x6ab0(%rip), %rbp      # 0xa8b0
leaq 0x6a88(%rip), %r14      # 0xa88f
xorl %r13d, %r13d
movzbl -0x2(%r12), %r15d
movl %r15d, %edi
callq 0x2d1b
leal -0x80(%r15), %edx
leaq 0x7931(%rip), %rcx      # 0xb754
cmpl $0x4b, %edx
ja 0x3e38
shrl %edx
leaq 0x63ef(%rip), %rsi      # 0xa220
movslq (%rsi,%rdx,4), %rcx
addq %rsi, %rcx
movzwl (%r12), %r8d
addl $0x2, %r8d
testb $0x1, %r15b
movq %rbp, %r9
leaq 0x766a(%rip), %rdx      # 0xb4b9
cmoveq %rdx, %r9
movq %r14, %rdi
movl %r15d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x20c0
incl %r13d
addq $0x10, %r12
cmpl 0x8(%rbx), %r13d
jl 0x3e0a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7e0d(%rip), %rdi      # 0xbca4
callq 0x2060
cmpl $0x0, 0x8(%r14)
jle 0x400b
movq (%r14), %r15
leaq 0xf17f(%rip), %r12      # 0x13030
xorl %r13d, %r13d
movl $0x3, 0x8(%r15)
movzbl 0xc(%r15), %eax
andl $-0x2, %eax
cmpl $0xa2, %eax
je 0x3f1d
cmpl $0xa0, %eax
jne 0x3ffa
movq (%r15), %rax
movl $0x4, 0x8(%r15)
movzbl 0x3(%rax), %esi
testb %sil, %sil
jns 0x3efe
andl $0x7f, %esi
shll $0x8, %esi
movl $0x5, 0x8(%r15)
movzbl 0x4(%rax), %eax
orl %eax, %esi
movq %rbx, %rdi
callq 0x2e36
testb $0x1, 0xc(%r15)
movq (%r15), %rdx
movslq 0x8(%r15), %rcx
jne 0x3f64
movzwl (%rdx,%rcx), %ebp
addl $0x2, %ecx
jmp 0x3f6a
movq (%r15), %rax
movl $0x4, 0x8(%r15)
movzbl 0x3(%rax), %esi
testb %sil, %sil
jns 0x3f45
andl $0x7f, %esi
shll $0x8, %esi
movl $0x5, 0x8(%r15)
movzbl 0x4(%rax), %eax
orl %eax, %esi
movq %rbx, %rdi
callq 0x2e36
testb $0x1, 0xc(%r15)
movq (%r15), %rdx
movslq 0x8(%r15), %rcx
jne 0x3faa
movzwl (%rdx,%rcx), %ebp
addl $0x2, %ecx
jmp 0x3fb0
movl (%rdx,%rcx), %ebp
addl $0x4, %ecx
movl %ecx, 0x8(%r15)
movq 0x20(%rax), %rdx
addq $0x10, %rdx
movl (%rax), %ecx
movq %r12, %rdi
leaq 0x6bde(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movzwl 0xe(%r15), %ecx
subl 0x8(%r15), %ecx
addl $0x2, %ecx
leaq 0x691c(%rip), %rdi      # 0xa8b8
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x20c0
jmp 0x3ffa
movl (%rdx,%rcx), %ebp
addl $0x4, %ecx
movl %ecx, 0x8(%r15)
movq 0x20(%rax), %rdx
addq $0x10, %rdx
movl (%rax), %ecx
movq %r12, %rdi
leaq 0x6b98(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
leaq 0x6915(%rip), %rdi      # 0xa8eb
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x20c0
movq %r15, %rdi
callq 0x3cf5
leaq 0x6926(%rip), %rdi      # 0xa917
movl %eax, %esi
xorl %eax, %eax
callq 0x20c0
incl %r13d
addq $0x10, %r15
cmpl 0x8(%r14), %r13d
jl 0x3eb4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x40a0
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x7c93(%rip), %rdi      # 0xbccf
callq 0x2060
cmpl $0x0, 0x120(%rbx)
jle 0x4091
leaq 0x6e0b(%rip), %r14      # 0xae5c
movq %rsp, %r15
leaq 0x68c7(%rip), %r12      # 0xa922
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2d88
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
cmpl 0x120(%rbx), %ebp
jl 0x405d
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x41c8
leaq 0x7c13(%rip), %rdi      # 0xbcdc
callq 0x2060
cmpl $0x0, 0x150(%rbx)
jle 0x41c8
movq %rsp, %r14
xorl %r12d, %r12d
incl %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2f92
movq %rax, %r13
leaq 0x24(%rax), %rdx
movq %r14, %rdi
leaq 0x6d5c(%rip), %rsi      # 0xae5c
xorl %eax, %eax
callq 0x21e0
cmpl $0x0, 0x12c(%r13)
movl $0x4c, %ebp
movl $0x20, %eax
cmovel %eax, %ebp
movq 0x10(%r13), %rax
leaq 0x6844(%rip), %r14      # 0xa96b
testq %rax, %rax
je 0x414e
movq 0x10(%rax), %rdx
addq $0x10, %rdx
movl (%rax), %ecx
leaq 0xf0f3(%rip), %r14      # 0x13230
movq %r14, %rdi
leaq 0x6a19(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movq 0x18(%r13), %rax
leaq 0x6812(%rip), %r9       # 0xa96b
testq %rax, %rax
je 0x4189
movq 0x20(%rax), %rdx
addq $0x10, %rdx
movl (%rax), %ecx
movq %rbx, %r15
leaq 0xeebe(%rip), %rbx      # 0x13030
movq %rbx, %rdi
leaq 0x69e4(%rip), %rsi      # 0xab60
xorl %eax, %eax
callq 0x21e0
movq %rbx, %r9
movq %r15, %rbx
movl 0x124(%r13), %r10d
movl 0x128(%r13), %r11d
leaq 0x678f(%rip), %rdi      # 0xa92d
movl %r12d, %esi
movq %rsp, %rdx
movl %ebp, %ecx
movq %r14, %r8
movq %rdx, %r14
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x20c0
addq $0x10, %rsp
cmpl 0x150(%rbx), %r12d
jl 0x40e1
cmpl $0x0, 0x160(%rbx)
jle 0x424b
leaq 0x7b12(%rip), %rdi      # 0xbcea
callq 0x2060
cmpl $0x0, 0x160(%rbx)
jle 0x424b
movq %rsp, %r15
movl $0x20, %r14d
leaq 0x6778(%rip), %r12      # 0xa96e
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x30ee
movq %rax, %r13
leaq 0x10(%rax), %rdx
movq %r15, %rdi
leaq 0x6c47(%rip), %rsi      # 0xae5c
xorl %eax, %eax
callq 0x21e0
cmpl $0x0, 0x114(%r13)
movl $0x4c, %ecx
cmovel %r14d, %ecx
movl 0x110(%r13), %r8d
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20c0
cmpl 0x160(%rbx), %ebp
jl 0x41f8
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/negge[P]xlink/src/xlink.c
// Function: xlink_module_dump_segments
void xlink_module_dump_segments(xlink_module *mod) {
  int i, j;
  printf("Segment records:\n");
  for (i = 1; i <= mod->nsegments; i++) {
    xlink_segment *seg;
    seg = xlink_module_get_segment(mod, i);
    printf("%2i : %6s segment %s %s %s %6s 0x%04x bytes%s\n", i, seg->name->str,
     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 (i = 1; i <= mod->ngroups; i++) {
    xlink_group *grp;
    grp = xlink_module_get_group(mod, i);
    printf("Group: %s\n", xlink_group_get_name(grp));
    for (j = 1; j <= grp->nsegments; j++) {
      printf("%2i : segment %8s\n", j,
       xlink_segment_get_name(xlink_group_get_segment(grp, j)));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7a88(%rip), %rdi      # 0xbcfa
callq 0x2060
cmpl $0x0, 0x130(%rbx)
movq %rbx, (%rsp)
jle 0x434d
xorl %ebp, %ebp
incl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2e36
movq %rax, %r13
movq 0x20(%rax), %rbx
movq 0x28(%rax), %rdx
addq $0x10, %rbx
movzbl 0x10(%rax), %eax
movl %eax, %ecx
shrl $0x5, %ecx
leaq 0xb80b(%rip), %rsi      # 0xfac0
movq (%rsi,%rcx,8), %r15
movl %eax, %ecx
andl $0x1, %ecx
leaq 0xb83b(%rip), %rsi      # 0xfb00
movq (%rsi,%rcx,8), %r12
andl $0x1c, %eax
leaq 0xb83d(%rip), %rcx      # 0xfb10
movq (%rcx,%rax,2), %r14
addq $0x10, %rdx
leaq 0xee4e(%rip), %rdi      # 0x13130
leaq 0x6b73(%rip), %rsi      # 0xae5c
xorl %eax, %eax
callq 0x21e0
testb $0x2, 0x10(%r13)
movl 0x1c(%r13), %r10d
leaq 0x6555(%rip), %r11      # 0xa855
leaq 0x71b2(%rip), %rax      # 0xb4b9
cmoveq %rax, %r11
subq $0x8, %rsp
leaq 0x666f(%rip), %rdi      # 0xa985
movl %ebp, %esi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
movq %r15, %rcx
movq %r12, %r8
movq %r14, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
leaq 0xedfa(%rip), %r10      # 0x13130
pushq %r10
callq 0x20c0
addq $0x20, %rsp
cmpl 0x130(%rbx), %ebp
jl 0x428a
cmpl $0x0, 0x140(%rbx)
jle 0x440b
movl $0x1, %r15d
leaq 0x67f9(%rip), %r12      # 0xab60
leaq 0xecc2(%rip), %rbp      # 0x13030
leaq 0x664a(%rip), %r13      # 0xa9bf
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2ee4
movq %rax, %r14
movq 0x10(%rax), %rdx
addq $0x10, %rdx
movl (%rax), %ecx
leaq 0xee9c(%rip), %rbx      # 0x13230
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x21e0
leaq 0x660c(%rip), %rdi      # 0xa9b4
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20c0
cmpl $0x0, 0x20(%r14)
jle 0x43f3
xorl %ebx, %ebx
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x27f9
movq 0x20(%rax), %rdx
addq $0x10, %rdx
movl (%rax), %ecx
movq %rbp, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x21e0
movq %r13, %rdi
movl %ebx, %esi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x20c0
cmpl 0x20(%r14), %ebx
jl 0x43bb
leal 0x1(%r15), %eax
movq (%rsp), %rbx
cmpl 0x140(%rbx), %r15d
movl %eax, %r15d
jl 0x4375
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq