LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/oubuff.c
// Function: buff_add
int buff_add( length )
    int     length;
{
    if ( length + (buff_end-buff_beg) > BUFFSIZE ) 
        fmt_error("Adding too much to internal buffer");
    length = fread( buff_end, sizeof(char), length, o_file );
    buff_end = buff_end + length;   /* Last character at buff[length-1] */
    return( length );
}

// Assembly:
pushq %rbx
movslq %edi, %rbx
movq 0xe940(%rip), %rdi      # 0x1d5e0
leaq (%rdi,%rbx), %rax
subq 0xe925(%rip), %rax      # 0x1d5d0
cmpq $0x1011, %rax           # imm = 0x1011
jl 0xecc6
leaq 0x4347(%rip), %rdi      # 0x13001
callq 0x11eec
movq 0xe91a(%rip), %rdi      # 0x1d5e0
leaq 0xd28b(%rip), %rax      # 0x1bf58
movq (%rax), %rcx
pushq $0x1
popq %rsi
movq %rbx, %rdx
callq 0x9090
cltq
addq %rax, 0xe8fc(%rip)      # 0x1d5e0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ouget.c
// Function: get_byte
uint8_t get_byte(void)
{
    int ch = fgetc(o_file);

    if (ch == EOF) {
        fprintf(stderr, "Premature end of input file\n");
        exit(3);
    }

    return ch;
}

// Assembly:
pushq %rax
leaq 0xd238(%rip), %rax      # 0x1bf58
movq (%rax), %rdi
callq 0x90e0
cmpl $-0x1, %eax
je 0xed2f
popq %rcx
retq
movq 0x92c2(%rip), %rax      # 0x17ff8
movq (%rax), %rcx
leaq 0x42e4(%rip), %rdi      # 0x13024
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
callq 0x91d0
pushq $0x3
popq %rdi
callq 0x91c0
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ouget.c
// Function: get_long
uint32_t get_long(void)
{
    uint32_t ch = get_byte();
    ch += get_byte() << 8;
    ch += get_byte() << 16;
    ch += get_byte() << 24;
    return ch;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0xed18
movzbl %al, %ebx
callq 0xed18
movzbl %al, %ebp
shll $0x8, %ebp
orl %ebx, %ebp
callq 0xed18
movzbl %al, %ebx
shll $0x10, %ebx
orl %ebp, %ebx
callq 0xed18
movzbl %al, %eax
shll $0x18, %eax
orl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ouget.c
// Function: get_str
void get_str(size_t length, char *dest_string)
{
    size_t count = length;

    while (count) {
        *dest_string++ = get_byte();
        --count;
    }

    *dest_string = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0xeddf
callq 0xed18
movb %al, (%rbx,%r15)
incq %r15
jmp 0xedcc
movb $0x0, (%rbx,%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ouget.c
// Function: get_index
int16_t get_index(int *data)
{
    uint16_t ch = get_byte();

    if (ch > 0x7F) {
        ch = ((ch & 0x7F) << 8) + get_byte();
        *data = ch;
        return 2;
    }
    else {
        *data = ch;
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xed18
movzbl %al, %ebp
movw $0x1, %ax
testb %bpl, %bpl
jns 0xee3e
andl $0x7f, %ebp
shll $0x8, %ebp
callq 0xed18
movzbl %al, %eax
orl %eax, %ebp
movw $0x2, %ax
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ousegext.c
// Function: sex_compare
int sex_compare(SEX_T *rec_1, SEX_T *rec_2)
{
    if (rec_1->seg_index > rec_2->seg_index) {
        return LEFT;
    }
    else {
        if (rec_1->seg_index < rec_2->seg_index) {
            return RIGHT;
        }
        else {
            int result = strcmp(rec_1->ext_rec->name, rec_2->ext_rec->name);
            if (result < 0) {
                return LEFT;
            }
            else {
                if (result > 0) {
                    return RIGHT;
                }
                else {
                    return EQUAL;
                }
            }
        }
    }
}

// Assembly:
movl (%rsi), %ecx
xorl %eax, %eax
cmpl %ecx, (%rdi)
jg 0xee82
jge 0xee56
pushq $0x1
popq %rax
retq
pushq %rax
movq 0x8(%rdi), %rdi
addq $0x4, %rdi
movq 0x8(%rsi), %rsi
addq $0x4, %rsi
callq 0x9120
movl %eax, %ecx
xorl %edx, %edx
testl %eax, %eax
sete %dl
incl %edx
xorl %eax, %eax
testl %ecx, %ecx
cmovnsl %edx, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ousegext.c
// Function: sex_insert
void sex_insert(int seg_index, EXT_T *ext_rec)
{
    SEX_T *sex_rec = o_malloc(sizeof(SEX_T));
    sex_rec->seg_index = seg_index;
    sex_rec->ext_rec = ext_rec;

    insert((char *)sex_rec, sex_tree, TC sex_compare);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x10
popq %rdi
callq 0x11f10
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
leaq 0xd118(%rip), %rcx      # 0x1bfb8
movq (%rcx), %rsi
leaq -0x62(%rip), %rdx       # 0xee48
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/ousize.c
// Function: size_to_opcode
char *size_to_opcode(int size, int *times)
{
    char *result;

    *times = 1;

    switch( size ) {
    case 0:     result = "*ERROR*"; *times = 0; break;
    case 1:     result = "db";                  break;
    case 2:     result = "dw";                  break;
    case 4:     result = "dd";                  break;
    case 6:     result = "df";                  break;
    case 8:     result = "dq";                  break;
    case 10:    result = "dt";                  break;
    default:    result = "db";  *times = size;  break;
    }

    return result;
}

// Assembly:
movl $0x1, (%rsi)
leaq 0x40ce(%rip), %rax      # 0x12fed
cmpl $0xa, %edi
ja 0xef41
movl %edi, %ecx
leaq 0x4117(%rip), %rdx      # 0x13044
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
andl $0x0, (%rsi)
leaq 0x4193(%rip), %rax      # 0x130d3
retq
movl %edi, (%rsi)
retq
leaq 0x4193(%rip), %rax      # 0x130de
retq
leaq 0x327a(%rip), %rax      # 0x121cd
retq
leaq 0x4180(%rip), %rax      # 0x130db
retq
leaq 0x35fb(%rip), %rax      # 0x1255e
retq
leaq 0x3d5b(%rip), %rax      # 0x12cc6
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/oustruct.c
// Function: struc_insert
STRUC_T *struc_insert(char *form)
{
    STRUC_T *struc_rec = o_malloc(sizeof(STRUC_T));

    size_t length = strlen(form) + 1;

    char *form_copy = o_malloc(length);

    strncpy(form_copy, form, length);
    struc_rec->form  = form_copy;
    struc_rec->index = 0;               /* Not determined yet */

    NODE_T *struc_node = insert( (char *)struc_rec, struc_tree, TC struc_compare );

    return( (STRUC_T *)struc_node->data );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x11f10
movq %rax, %r14
movq %rbx, %rdi
callq 0x90b0
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x11f10
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x9060
movq %r12, (%r14)
andl $0x0, 0x8(%r14)
leaq 0xcfef(%rip), %rax      # 0x1bfc8
movq (%rax), %rsi
leaq -0x77(%rip), %rdx       # 0xef6c
movq %r14, %rdi
callq 0x11c41
movq 0x20(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/outarget.c
// Function: assume
void assume( seg_reg, data_mode, data_index )
    int             seg_reg;
    int             data_mode;
    int             data_index;
{
    char            *seg_name;
    extern  char    *sregsc[];
    char            operand[100];

    seg_name = mode_name( data_mode, data_index );
    if (seg_name && compatibility != 2 && pass == 3 ) {
        out_opcode( "assume" );
        sprintf( operand, "%s %s", sregsc[seg_reg], seg_name );
        out_operand( operand );
        out_endline();
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %edi, %ebp
movl %esi, %edi
movl %edx, %esi
callq 0xf103
testq %rax, %rax
je 0xf1b8
movq %rax, %rbx
leaq 0xcd8f(%rip), %rax      # 0x1bef8
cmpl $0x2, (%rax)
je 0xf1b8
leaq 0xcdf3(%rip), %rax      # 0x1bf68
cmpl $0x3, (%rax)
jne 0xf1b8
leaq 0x4277(%rip), %rdi      # 0x133f8
callq 0xc497
movslq %ebp, %rax
leaq 0x90b0(%rip), %rcx      # 0x18240
movq (%rcx,%rax,8), %rdx
leaq 0x4a45(%rip), %rsi      # 0x13be0
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x91b0
movq %r14, %rdi
callq 0xc4c6
callq 0xc522
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/outarget.c
// Function: adjust_assumes
void adjust_assumes()
{
    int     seg_reg;
    int     new_mode;
    int     new_index;

    for ( seg_reg = 0; seg_reg < MAX_SEG_REGS; seg_reg++ ) {
        new_mode  = seg_rec->new_mode [seg_reg];
        new_index = seg_rec->new_index[seg_reg];
        if ( new_mode  != seg_rec->prv_mode [seg_reg] ||
             new_index != seg_rec->prv_index[seg_reg] ) {
            assume( seg_reg, new_mode, new_index );
            seg_rec->prv_mode [seg_reg] = new_mode;
            seg_rec->prv_index[seg_reg] = new_index;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0xce1f(%rip), %r15      # 0x1bff0
cmpq $0x6, %rbx
je 0xf20d
movq (%r15), %rax
movl 0x1c(%rax,%rbx,4), %ebp
movl 0x34(%rax,%rbx,4), %r14d
cmpl 0x4c(%rax,%rbx,4), %ebp
jne 0xf1f0
cmpl 0x64(%rax,%rbx,4), %r14d
je 0xf208
movl %ebx, %edi
movl %ebp, %esi
movl %r14d, %edx
callq 0xf147
movq (%r15), %rax
movl %ebp, 0x4c(%rax,%rbx,4)
movl %r14d, 0x64(%rax,%rbx,4)
incq %rbx
jmp 0xf1d1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/outarget.c
// Function: abort_assumes
void abort_assumes()
{
    int     seg_reg;

    for ( seg_reg = 0; seg_reg < MAX_SEG_REGS; seg_reg++ ) {
        seg_rec->new_mode [seg_reg] = seg_rec->prv_mode [seg_reg];
        seg_rec->new_index[seg_reg] = seg_rec->prv_index[seg_reg];
    }
}

// Assembly:
leaq 0xcdd1(%rip), %rax      # 0x1bff0
movq (%rax), %rax
pushq $-0x18
popq %rcx
testq %rcx, %rcx
je 0xf240
movl 0x64(%rax,%rcx), %edx
movl 0x7c(%rax,%rcx), %esi
movl %edx, 0x34(%rax,%rcx)
movl %esi, 0x4c(%rax,%rcx)
addq $0x4, %rcx
jmp 0xf225
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/outarget.c
// Function: find_member
int find_member( text, structure, offset )
    char    *text;
    STRUC_T *structure;
    long    *offset;
{
    int     type;
    int     mem_cnt;
    long    dup_cnt;
    long     this_size;
    char    *cp;
    char    ch;

    mem_cnt = 0;
    cp = structure->form;

    while ( (ch=*cp) != '\0' ) {
        switch( ch ) {
            case '(':
                dup_cnt = atol( cp+1 );
                break;
            case ',':
                type = atoi( cp+1 );
                break;
            case ')':
                this_size = type_to_size(type)*dup_cnt;
                if ( *offset < this_size ) {
                    sprintf( text, ".s%dm_%d", structure->index, mem_cnt );
                    return( type );
                }
                *offset -= this_size;
                mem_cnt++;
            default:
                break;
        }
        cp++;
    }

    strcpy( text, ".past struct" );

    return( UNKNOWN );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, (%rsp)
movq (%rsi), %r13
incq %r13
xorl %r14d, %r14d
movzbl -0x1(%r13), %eax
cmpl $0x28, %eax
je 0xf6ba
cmpl $0x29, %eax
je 0xf69a
cmpl $0x2c, %eax
je 0xf6c7
testl %eax, %eax
jne 0xf6d1
jmp 0xf6d6
movl %ebp, %edi
callq 0xeeda
movslq %eax, %rcx
imulq %rbx, %rcx
movq (%r12), %rax
subq %rcx, %rax
jl 0xf6f9
movq %rax, (%r12)
incl %r14d
jmp 0xf6d1
movq %r13, %rdi
callq 0x9170
movq %rax, %rbx
jmp 0xf6d1
movq %r13, %rdi
callq 0x9190
movl %eax, %ebp
incq %r13
jmp 0xf680
movabsq $0x74637572747320, %rax # imm = 0x74637572747320
movq (%rsp), %rcx
movq %rax, 0x5(%rcx)
movabsq $0x747320747361702e, %rax # imm = 0x747320747361702E
movq %rax, (%rcx)
xorl %ebp, %ebp
jmp 0xf712
movl 0x8(%r15), %edx
leaq 0x3d07(%rip), %rsi      # 0x1340b
movq (%rsp), %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x91b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_comdef.c
// Function: get_val
word get_val( value )
    dword   *value;
{   
    word    byte;
    word    result;

    byte = get_byte();

    switch( byte ) {
        case 0x81:
            *value = (dword)get_word();
            result = 3;
            break;
        case 0x84:
            *value = (dword)get_word()
                     + ((dword)get_byte() << 8);
            result = 4;
            break;
        case 0x88:
            *value = get_long();
            result = 5;
            break;
        default:
            *value = (dword)byte;
            result = 1;
            break;
    }
    return( result );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xed18
cmpb $-0x78, %al
je 0xfcaa
movzbl %al, %ecx
cmpl $0x84, %ecx
je 0xfc8f
cmpl $0x81, %ecx
jne 0xfcb5
callq 0xed6b
movzwl %ax, %ecx
pushq $0x3
jmp 0xfcb7
callq 0xed6b
movzwl %ax, %r14d
callq 0xed18
movzbl %al, %ecx
shll $0x8, %ecx
addq %r14, %rcx
pushq $0x4
jmp 0xfcb7
callq 0xed85
movl %eax, %ecx
pushq $0x5
jmp 0xfcb7
pushq $0x1
popq %rax
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_comdef.c
// Function: comdef
void comdef(size_t length, int scope)
{
    char            name[41];
    int             typ_idx;
    int             var_type;
    dword   num_elements;
    dword   element_size;
    char            cksum;

    --length;
    while( length ) {
        length -= get_name( name );
        length -= get_index( &typ_idx );
        --length;
        var_type = get_byte();
        if ( var_type == 0x61 ) {
            /* MSC v4.0 actually has these values reversed, so you may
               have to reverse the two lines below to generate resonable
               .asm code */
            length -= get_val( &num_elements );
            length -= get_val( &element_size );
        } else {
            length -= get_val( &element_size );
            num_elements = 1L;
        }
        ext_insert( name, 1, var_type, num_elements, 
                                        (word)element_size, scope );
    }
    cksum = get_byte();
    cksum = cksum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movq %rdi, %r14
decq %r14
leaq 0x20(%rsp), %r15
testq %r14, %r14
je 0xfd78
movq %r15, %rdi
callq 0xedea
movq %rax, %r12
leaq 0x1c(%rsp), %rdi
callq 0xee13
movl %eax, %r13d
callq 0xed18
movl %eax, %ebp
cmpb $0x61, %al
jne 0xfd34
leaq 0x10(%rsp), %rdi
callq 0xfc60
movl %ebx, %r15d
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0xfc60
addl %ebx, %eax
movl %r15d, %ebx
leaq 0x20(%rsp), %r15
movq 0x10(%rsp), %rcx
jmp 0xfd4a
leaq 0x8(%rsp), %rdi
callq 0xfc60
movq $0x1, 0x10(%rsp)
pushq $0x1
popq %rcx
movswq %r13w, %rdx
addq %rdx, %r12
notq %r12
addq %r12, %r14
movzbl %bpl, %edx
movl %eax, %eax
subq %rax, %r14
movl 0x8(%rsp), %r8d
movq %r15, %rdi
pushq $0x1
popq %rsi
movl %ebx, %r9d
callq 0x108f2
jmp 0xfcde
callq 0xed18
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_extdef.c
// Function: ext_insert
void ext_insert( this_name, com_ext, var_type, count, size, scope )
    char            *this_name;
    int             com_ext;
    int             var_type;
    dword   count;
    word    size;
    int             scope;
{
    static  int extern_count = 0;
    EXT_T   *extern_rec;

    extern_count++;
    extern_rec = (EXT_T *)o_malloc( sizeof(EXT_T) );
    extern_rec->index    = extern_count;
    extern_rec->type     = size_to_type(size);
    extern_rec->pos_abs  = TRUE;
    extern_rec->size     = count;
    extern_rec->com_ext  = com_ext;
    extern_rec->var_type = var_type;
    extern_rec->used     = 0;                   /* Default to never used */
    extern_rec->scope    = scope;
    strcpy( extern_rec->name, this_name );

    insert( (char *)extern_rec, extern_tree, TC ext_compare );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %ebp
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
incl 0xcd01(%rip)            # 0x1d618
pushq $0x50
popq %rdi
callq 0x11f10
movq %rax, %rbx
movl 0xccf0(%rip), %eax      # 0x1d618
movl %eax, (%rbx)
movl %ebp, %edi
callq 0xeeb8
movl %eax, 0x2c(%rbx)
movl $0x1, 0x30(%rbx)
movq %r14, 0x40(%rbx)
movl %r12d, 0x34(%rbx)
movl %r15d, 0x38(%rbx)
andl $0x0, 0x48(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x4c(%rbx)
leaq 0x4(%rbx), %rdi
movq %r13, %rsi
callq 0x9070
leaq 0xb64b(%rip), %rax      # 0x1bfb0
movq (%rax), %rsi
leaq -0x93(%rip), %rdx       # 0x108dc
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_extdef.c
// Function: extdef
void extdef(size_t length, int scope)
{
    char    name[41];
    int     typ_idx;
    char    cksum;

    --length;
    while( length ) {
        length -= get_name( name );
        length -= get_index( &typ_idx );

#ifdef DEBUG
printf("%s\n", name );
#endif

        ext_insert( name, 0, 0, 0L, 0, scope );
    }
    cksum = get_byte();
    cksum = cksum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %r14
decq %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
testq %r14, %r14
je 0x109dc
movq %r15, %rdi
callq 0xedea
movq %rax, %r13
movq %r12, %rdi
callq 0xee13
movswq %ax, %rax
addq %r13, %rax
subq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebx, %r9d
callq 0x108f2
jmp 0x109a4
callq 0xed18
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_fixupp.c
// Function: fix_insert
void fix_insert( offset, relate, form, displacement, a_mode, a_index, 
                                                    b_mode, b_index, extension )
    int     offset;
    int     relate;
    int     form;
    long    displacement;
    int     a_mode;
    int     a_index;
    int     b_mode;
    int     b_index;
    int     extension;
{
    FIX_T   *fixup_rec;

    fixup_rec = (FIX_T *)o_malloc( sizeof(FIX_T) );
    fixup_rec->seg_idx      = data_seg_idx;
    fixup_rec->dat_offset   = data_offset;
    fixup_rec->offset       = offset;
    fixup_rec->relate       = relate;
    fixup_rec->form         = form;
    fixup_rec->displacement = displacement;
    fixup_rec->a_mode       = a_mode;           /* Mode of frame   */
    fixup_rec->a_index      = a_index;          /* Index of frame  */
    fixup_rec->b_mode       = b_mode;           /* Mode of target  */
    fixup_rec->b_index      = b_index;          /* Index of target */
    fixup_rec->extended     = extension;

#ifdef DEBUG
printf("FIXUP:%04X:%08lX:%04X displacement=%08lX\n",
            data_seg_idx,data_offset,offset, displacement );
#endif
    if ( form == OFFSET || form == BASE || form == LOADOFF ) {
        fixup_rec->word_sized = TRUE;
    } else {
        fixup_rec->word_sized = FALSE;
    }

    insert( (char *)fixup_rec, fix_tree, TC fix_compare );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
movq %rcx, %r15
movl %edx, %ebx
movl %esi, %r12d
movl %edi, %r13d
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x58(%rsp), %r14d
movl 0x50(%rsp), %ebp
pushq $0x40
popq %rdi
callq 0x11f10
leaq 0xcc24(%rip), %rcx      # 0x1d688
movl (%rcx), %ecx
movl %ecx, (%rax)
leaq 0xcc21(%rip), %rcx      # 0x1d690
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
movl %r13d, 0x10(%rax)
movl %r12d, 0x14(%rax)
movl %ebx, 0x18(%rax)
movq %r15, 0x30(%rax)
movl 0x10(%rsp), %ecx
movl %ecx, 0x1c(%rax)
movl 0x14(%rsp), %ecx
movl %ecx, 0x20(%rax)
movl %ebp, 0x24(%rax)
movl %r14d, 0x28(%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0x38(%rax)
decl %ebx
xorl %ecx, %ecx
cmpl $0x4, %ebx
ja 0x10ab6
movl %ebx, %ecx
leaq 0x2f2d(%rip), %rdx      # 0x139e0
movl (%rdx,%rcx,4), %ecx
movl %ecx, 0x3c(%rax)
leaq 0xb510(%rip), %rcx      # 0x1bfd0
movq (%rcx), %rsi
leaq -0xda(%rip), %rdx       # 0x109f0
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_fixupp.c
// Function: fixupp
void fixupp(size_t length, int extension)
{
    uchar   type;           /* First byte of a FIXUPP packet */
    int             kind;
    int             thread;
    int             locat;
    int             relate;
    int             size;
    int             form;
    int             offset;
    int             mode;
    int             index;

    --length;                           /* Subtract 1 for checksum */

    while ( length ) {
        type = get_byte();
        --length;
        if ( type & 0x80 ) {
            /*
            ** True FixUp aka Explicit FixUp Record
            */
            --length;
            locat = ((int)type << 8) + get_byte();
            relate = ( locat & 0x4000 ) >> 14;  /* mode */
            size   = ( locat & 0x2000 ) >> 13;  /* zero */
            form   = ( locat & 0x1C00 ) >> 10;  /* LOC [0,4] */
            offset = ( locat & 0x03FF );

            length -= decode_fixup( relate, size, form, offset, extension );
        } else {
            /*
            ** Thread FixUp
            */
            kind   = ( type & 0x40 ) >> 6;
            mode   = ( type & 0x1C ) >> 2;
            thread = ( type & 0x03 );
            threads[kind][thread].mode  = mode;
            if ( mode == 0 || thread < 4 ) {
                length -= get_index( &index );
                threads[kind][thread].index = index;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
decq %r14
leaq 0xb250(%rip), %r13      # 0x1bea0
leaq 0x4(%rsp), %r15
testq %r14, %r14
je 0x10cec
callq 0xed18
movzbl %al, %r12d
testb %r12b, %r12b
js 0x10ca5
movl %r12d, %eax
shrl $0x2, %eax
andl $0x7, %eax
movl %r12d, %ebp
andl $0x3, %ebp
shrl %r12d
andl $-0x20, %r12d
addq %r13, %r12
movl %eax, (%r12,%rbp,8)
movq %r15, %rdi
callq 0xee13
notl %eax
movswq %ax, %rax
addq %rax, %r14
movl 0x4(%rsp), %eax
movl %eax, 0x4(%r12,%rbp,8)
jmp 0x10c55
callq 0xed18
movzbl %al, %eax
movl %r12d, %edi
shrl $0x6, %edi
andl $0x1, %edi
movl %r12d, %esi
shrl $0x5, %esi
andl $0x1, %esi
movl %r12d, %edx
shrl $0x2, %edx
andl $0x7, %edx
andl $0x3, %r12d
shll $0x8, %r12d
orl %eax, %r12d
movl %r12d, %ecx
movl %ebx, %r8d
callq 0x10ae0
cltq
subq %rax, %r14
addq $-0x2, %r14
jmp 0x10c55
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_grpdef.c
// Function: grp_insert
void grp_insert( name_idx )
    int     name_idx;
{
    static  int group_count = 0;
    GRP_T   *group_rec;

    group_count++;
    group_rec = (GRP_T *)o_malloc( sizeof(GRP_T) );
    group_rec->index = group_count;
    group_rec->name = name_idx;

    insert( (char *)group_rec, group_tree, TC grp_compare );
}

// Assembly:
pushq %rbx
movl %edi, %ebx
incl 0xc969(%rip)            # 0x1d684
pushq $0x8
popq %rdi
callq 0x11f10
movl 0xc95b(%rip), %ecx      # 0x1d684
movl %ecx, (%rax)
movl %ebx, 0x4(%rax)
leaq 0xb26b(%rip), %rcx      # 0x1bfa0
movq (%rcx), %rsi
leaq -0x43(%rip), %rdx       # 0x10cfc
movq %rax, %rdi
popq %rbx
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_ledata.c
// Function: dat_insert
void dat_insert( seg_idx, offset, file_pos, length, extended, type )
    int             seg_idx;
    dword   offset;
    long            file_pos;
    int             length;
    int             extended;
    int             type;
{
    DAT_T           *data_rec;

    data_rec = (DAT_T *)o_malloc( sizeof(DAT_T) );
    data_rec->seg_idx   = seg_idx;
    data_rec->offset    = offset;
    data_rec->type      = type;
    data_rec->size      = 1;             /* Default to DB */
    data_rec->file_pos  = file_pos;
    data_rec->length    = length;
    data_rec->extended  = extended;
    data_rec->structure = NULL;
    insert( (char *)data_rec, data_tree, TC dat_compare );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r13d
pushq $0x28
popq %rdi
callq 0x11f10
movl %r13d, (%rax)
movl %r12d, 0x4(%rax)
movl %ebx, 0x8(%rax)
movl $0x1, 0xc(%rax)
movq %r15, 0x10(%rax)
movl %r14d, 0x18(%rax)
movl %ebp, 0x1c(%rax)
andq $0x0, 0x20(%rax)
leaq 0xaf4d(%rip), %rcx      # 0x1bfc0
movq (%rcx), %rsi
leaq -0x75(%rip), %rdx       # 0x11008
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_ledata.c
// Function: ledata
void ledata(size_t length, int extension)
{
    SEG_T seg_search;
    SEG_T *seg;
    uint32_t offset;
    long position;

    position = o_position + length;     /* Position assumed at end of rec */

    length -= get_index( &seg_search.index );

    seg = (SEG_T *)find( (char *)&seg_search, segment_tree, TC seg_compare, NULL );

    if ( seg == NULL ) fmt_error("Undefined segment\n");

    if ( extension == REGULAR ) {
        offset = get_word(); /* Spot to begin within segment */
        length -= 2;
    } else {
        offset = get_long();
        length -= 4;
    }

    data_seg_idx = seg_search.index;    /* Needed by FIXUPPs */
    data_offset  = offset;              /* Ditto */

    position -= length;                 /* Move back remainder of bytes */
    --length;                           /* Ignore checksum in length */

    dat_insert( seg_search.index, offset, position, length, 
                                            extension, ENUMERATED );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xaeb2(%rip), %rax      # 0x1bf60
movq (%rax), %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0xee13
movl %eax, %ebp
leaq 0xaed3(%rip), %rax      # 0x1bf98
movq (%rax), %rsi
leaq 0x425(%rip), %rdx       # 0x114f4
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x11e3b
testq %rax, %rax
jne 0x110ea
leaq 0x2a37(%rip), %rdi      # 0x13b1c
callq 0x11eec
testl %ebx, %ebx
je 0x110f9
pushq $-0x4
popq %r12
callq 0xed85
jmp 0x11105
callq 0xed6b
movzwl %ax, %eax
pushq $-0x2
popq %r12
movswq %bp, %rcx
addq %r14, %r15
subq %rcx, %r14
addq %r12, %r14
movl (%rsp), %edi
movl %edi, 0xc56d(%rip)      # 0x1d688
movl %eax, %esi
movq %rsi, 0xc56c(%rip)      # 0x1d690
subq %r14, %r15
decl %r14d
movq %r15, %rdx
movl %r14d, %ecx
movl %ebx, %r8d
xorl %r9d, %r9d
callq 0x11026
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_lidata.c
// Function: lidata
void lidata(size_t length, int extension)
{
    SEG_T           seg_search;
    SEG_T           *seg;
    dword   offset;
    long            position;

    position = o_position + length;     /* Position assumed at end of rec */

    length -= get_index( &seg_search.index );
    seg = (SEG_T *)find( (char *)&seg_search, segment_tree, TC seg_compare, NULL );
    if ( seg == NULL ) fmt_error("Undefined segment" );

    if ( extension == REGULAR ) {
        offset = (dword)get_word(); /* Spot to begin within segment */
        length -= 2;
    } else {
        offset = get_long();
        length -= 4;
    }

    data_seg_idx = seg_search.index;    /* Needed by FIXUPPs */
    data_offset  = offset;              /* Ditto */

    position -= length;                 /* Move back remainder of bytes */
    --length;                           /* Ignore checksum in length */

    dat_insert( seg_search.index, offset, position, length, 
                                                    extension, ITERATED );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xadf9(%rip), %rax      # 0x1bf60
movq (%rax), %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0xee13
movl %eax, %ebp
leaq 0xae1a(%rip), %rax      # 0x1bf98
movq (%rax), %rsi
leaq 0x36c(%rip), %rdx       # 0x114f4
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x11e3b
testq %rax, %rax
jne 0x111a3
leaq 0x2889(%rip), %rdi      # 0x13a27
callq 0x11eec
testl %ebx, %ebx
je 0x111b2
callq 0xed85
movl %eax, %esi
pushq $-0x4
jmp 0x111bc
callq 0xed6b
movzwl %ax, %esi
pushq $-0x2
popq %rax
movswq %bp, %rcx
addq %r14, %r15
subq %rcx, %r14
addq %rax, %r14
movl (%rsp), %edi
leaq 0xc4b4(%rip), %rax      # 0x1d688
movl %edi, (%rax)
leaq 0xc4b3(%rip), %rax      # 0x1d690
movq %rsi, (%rax)
subq %r14, %r15
decl %r14d
pushq $0x1
popq %r9
movq %r15, %rdx
movl %r14d, %ecx
movl %ebx, %r8d
callq 0x11026
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_linnum.c
// Function: linnum
void linnum(size_t length)
{
  char            *record;
  char            text[80];
  char            cksum;
  int             i;
  LINE_T          *line;

  get_byte();
  get_byte();
  length -= 3;
  record = o_malloc(length);
  get_str( length, record );
  i = 0;
  while (length) {
    line = (LINE_T*)o_malloc(sizeof(LINE_T));
    line->hex_offset = *(word*)&record[i+2];
    line = insert(line, line_tree, TC linnum_compare)->data;
    line->line_number = *(word*)&record[i];
    sprintf(text, "; %4d: %04X",line->line_number,line->hex_offset);
    out_line(text,"","","");
    out_newline();
    i+=4;
    length-=4;
  }
  out_newline();
  cksum = get_byte();
  cksum = cksum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
callq 0xed18
callq 0xed18
addq $-0x3, %rbx
movq %rbx, %rdi
callq 0x11f10
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xedbe
leaq 0x28d1(%rip), %r13      # 0x13b2f
movq %rsp, %rbp
leaq 0x1ea4(%rip), %r15      # 0x1310c
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x112d0
pushq $0x10
popq %rdi
callq 0x11f10
movl 0x2(%r14,%r12), %ecx
movq %rcx, (%rax)
leaq 0xace9(%rip), %rcx      # 0x1bf70
movq (%rcx), %rsi
movq %rax, %rdi
leaq -0x8c(%rip), %rdx       # 0x11208
callq 0x11c41
movq 0x20(%rax), %rax
movl (%r14,%r12), %edx
movl %edx, 0x8(%rax)
movq (%rax), %rcx
movq %rbp, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x91b0
movq %rbp, %rdi
movq %r15, %rsi
movq %r15, %rdx
movq %r15, %rcx
callq 0xc585
callq 0xc54f
addq $0x4, %r12
jmp 0x1126b
callq 0xc54f
callq 0xed18
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_lnames.c
// Function: name_insert
void name_insert( this_name )
    char    *this_name;
{
    static  int name_count = 0;
    NAME_T  *name_rec;

    name_count++;
    name_rec = (NAME_T *)o_malloc( sizeof(NAME_T) );
    name_rec->index = name_count;
    strcpy( name_rec->name, this_name );

    insert( (char *)name_rec, name_tree, TC name_compare );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl 0xc389(%rip)            # 0x1d698
pushq $0x30
popq %rdi
callq 0x11f10
movq %rax, %r14
movl 0xc378(%rip), %eax      # 0x1d698
movl %eax, (%r14)
leaq 0x4(%r14), %rdi
movq %rbx, %rsi
callq 0x9070
leaq 0xac5a(%rip), %rax      # 0x1bf90
movq (%rax), %rsi
leaq -0x54(%rip), %rdx       # 0x112ec
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_lnames.c
// Function: lnames
void lnames(size_t length)
{
    char    mod_name[41];
    char    cksum;

    --length;
    while( length ) {
        length -= get_name( mod_name );
        name_insert( mod_name );
    }
    cksum = get_byte();
    cksum = cksum;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
decq %rbx
movq %rsp, %r14
testq %rbx, %rbx
je 0x11379
movq %r14, %rdi
callq 0xedea
subq %rax, %rbx
movq %r14, %rdi
callq 0x11302
jmp 0x1135f
callq 0xed18
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_modend.c
// Function: modend
void modend(size_t length, int extension)
{
    int             type;

    /*
    ** Processing for MODEND records
    */
    type = get_byte();

    if ( type & 0x40 ) {
        data_seg_idx = 0;
        data_offset  = 0L;
        length -= decode_fixup( 1, 0, 1, 1, extension );    /* Seg 0 offset 1 */
    }
}

// Assembly:
pushq %rbx
movl %esi, %ebx
callq 0xed18
testb $0x40, %al
jne 0x11396
popq %rbx
retq
leaq 0xc2eb(%rip), %rax      # 0x1d688
andl $0x0, (%rax)
leaq 0xc2e9(%rip), %rax      # 0x1d690
andq $0x0, (%rax)
pushq $0x1
popq %rcx
movl %ecx, %edi
xorl %esi, %esi
movl %ecx, %edx
movl %ebx, %r8d
popq %rbx
jmp 0x10ae0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_pubdef.c
// Function: pubdef
void pubdef(size_t length, int scope)
{
    int             grp_idx;
    int             seg_idx;
    int             frame;
    int             typ_idx;
    dword   offset;
    char            pub_name[41];

    length -= get_index( &grp_idx );
    length -= get_index( &seg_idx );

    if ( seg_idx == 0 ) {
        frame = get_word();
        length -= 2;
    }

    --length;
    while ( length ) {
        length -= get_name( pub_name );

#ifdef DEBUG
printf("%s\n", pub_name );
#endif

        offset = (dword)get_word();

        pub_insert( seg_idx, offset, pub_name, PUBLIC, scope );
        length -= 2;
        length -= get_index( &typ_idx );
    }
    frame = frame;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0xc(%rsp), %rdi
callq 0xee13
movswq %ax, %r12
leaq 0x4(%rsp), %r15
movq %r15, %rdi
callq 0xee13
movswq %ax, %rax
addq %r12, %rax
subq %rax, %r14
cmpl $0x0, (%r15)
jne 0x11494
callq 0xed6b
addq $-0x2, %r14
decq %r14
leaq 0x10(%rsp), %r15
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r12
testq %r14, %r14
je 0x114e5
movq %r15, %rdi
callq 0xedea
movq %rax, %r13
callq 0xed6b
movzwl %ax, %esi
movl 0x4(%rsp), %edi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x113e0
movq %r12, %rdi
callq 0xee13
movswq %ax, %rax
addq %r13, %rax
subq %rax, %r14
addq $-0x2, %r14
jmp 0x114a4
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_segdef.c
// Function: seg_insert
void seg_insert( name_idx, class, length, bit32, code )
    int     name_idx;
    NAME_T  *class;
    int     length;
    int     bit32;
    int     code;
{
    static  int segment_count = 0;
    SEG_T   *segment_rec;

    segment_count++;
    segment_rec = (SEG_T *)o_malloc( sizeof(SEG_T) );
    segment_rec->index      = segment_count;
    segment_rec->name       = name_idx;
    segment_rec->class      = class;
    segment_rec->length     = length;       /* To infer extra dups          */
    segment_rec->code       = code;
    segment_rec->bit32      = bit32;        /* USE32 segment                */

    insert( (char *)segment_rec, segment_tree, TC seg_compare );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movl %edi, %r12d
incl 0xc176(%rip)            # 0x1d69c
movl $0x80, %edi
callq 0x11f10
movl 0xc166(%rip), %ecx      # 0x1d69c
movl %ecx, (%rax)
movl %r12d, 0x4(%rax)
movq %r15, 0x8(%rax)
movl %r14d, 0x10(%rax)
movl %ebx, 0x14(%rax)
movl %ebp, 0x18(%rax)
leaq 0xaa47(%rip), %rcx      # 0x1bf98
movq (%rcx), %rsi
leaq -0x67(%rip), %rdx       # 0x114f4
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11c41
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/rec_segdef.c
// Function: upstr
void upstr( dest, source )
    char     *dest;
    char     *source;
{
    char     ch;
    while ( (ch = *source) != '\0' ) {
        *dest++ = (char)toupper( ch );
        source++;
    }
    *dest = '\0';
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movsbq (%r14,%r15), %r12
testq %r12, %r12
je 0x1159b
callq 0x9030
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%rbx,%r15)
incq %r15
jmp 0x1157c
movb $0x0, (%rbx,%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/t_tree.c
// Function: new_tree
NODE_T *new_tree(void *data_ptr, int dup_allowed)
{
    NODE_T *tree = o_malloc(sizeof(NODE_T));

    tree->data = data_ptr;

    if (dup_allowed) {        /* Hide the duplicates allowed indicator */
        tree->balance = LEFT; /* in the tree root's balance!           */
    }
    else {
        tree->balance = RIGHT;
    }

    tree->ptr[LEFT] = 0; /* Hide the tree depth in left pointer */
    tree->ptr[RIGHT] = (NODE_T *)tree;
    tree->thread[LEFT] = TRUE;
    tree->thread[RIGHT] = TRUE;

    return tree;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x28
popq %rdi
callq 0x11f10
movq %r14, 0x20(%rax)
xorl %ecx, %ecx
testl %ebx, %ebx
sete %cl
movw %cx, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/t_tree.c
// Function: swap
static void swap(NODE_T *node_A, int direct_A, NODE_T *node_B, int direct_B)
{
    /* Swap the pointers (unless they are already threads) */
    if (node_A->thread[direct_A]) {
        node_B->ptr[direct_B] = node_A;
        node_B->thread[direct_B] = TRUE;
        node_A->thread[direct_A] = FALSE;
    }
    else {
        node_B->ptr[direct_B] = node_A->ptr[direct_A];
        node_A->ptr[direct_A] = node_B;
    }
}

// Assembly:
movslq %esi, %rax
cmpl $0x0, 0x18(%rdi,%rax,4)
je 0x11e28
movslq %ecx, %rcx
movq %rdi, 0x8(%rdx,%rcx,8)
movl $0x1, 0x18(%rdx,%rcx,4)
andl $0x0, 0x18(%rdi,%rax,4)
retq
movq 0x8(%rdi,%rax,8), %rsi
movslq %ecx, %rcx
movq %rsi, 0x8(%rdx,%rcx,8)
movq %rdx, 0x8(%rdi,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/t_tree.c
// Function: find
void *find(void *data, NODE_T *root_node, int (*cmp_routine)(const void *, const void *), NODE_T **node_ptr)
{
    NODE_T *curr_node;
    int curr_direct;

    /* Prepare initial value for tree traversal */
    NODE_T *child_node = root_node;

    /*  Traverse tree looking for the place to insert this new node.  If
    **  we find a node which gives a comparison result of 0 (equal), then
    **  we cannot insert this new node.  To indicate this duplicate value,
    **  a non-zero value is returned (the value happens to be a pointer to
    **  node which contains the duplicate value). */
    do {
        curr_node = child_node;

        /*  Compare this new node with the node at this position in the
        **  tree and determine which direction to proceed from here. */
        curr_direct = (*cmp_routine)(curr_node->data, data);

        //  is this node is a duplicate node?
        if (node_ptr && curr_direct == RIGHT) {
            *node_ptr = curr_node;
        }

        if (curr_direct == EQUAL) {
            if (node_ptr) {
                *node_ptr = curr_node;
            }
            return curr_node->data;
        }

        child_node = curr_node->ptr[curr_direct];

    } while (!curr_node->thread[curr_direct]);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
xorl %r15d, %r15d
movq 0x20(%r14), %rdi
movq %r13, %rsi
callq *%r12
testq %rbx, %rbx
je 0x11e6c
cmpl $0x1, %eax
jne 0x11e6c
movq %r14, (%rbx)
jmp 0x11e71
cmpl $0x2, %eax
je 0x11e82
cltq
cmpl $0x0, 0x18(%r14,%rax,4)
movq 0x8(%r14,%rax,8), %r14
je 0x11e53
jmp 0x11e8e
testq %rbx, %rbx
je 0x11e8a
movq %r14, (%rbx)
movq 0x20(%r14), %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/t_tree.c
// Function: start
NODE_T *start(NODE_T *root_node, int direct)
{
    NODE_T *curr_node = root_node->ptr[RIGHT];
    int con_direct = 1 - direct;

    while (!curr_node->thread[1 - direct]) {
        curr_node = curr_node->ptr[con_direct];
    }

    return curr_node;
}

// Assembly:
addq $0x10, %rdi
pushq $0x1
popq %rax
subl %esi, %eax
movslq %eax, %rcx
movq (%rdi), %rax
cmpl $0x0, 0x18(%rax,%rcx,4)
jne 0x11ebb
leaq (%rax,%rcx,8), %rdi
addq $0x8, %rdi
jmp 0x11ea7
retq
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/t_tree.c
// Function: traverse
NODE_T *traverse(NODE_T *curr_node, int direct)
{
    if (curr_node->thread[direct]) {
        return curr_node->ptr[direct];
    }
    else {
        curr_node = curr_node->ptr[direct];
        int con_direct = 1 - direct;

        while (!curr_node->thread[1 - direct]) {
            curr_node = curr_node->ptr[con_direct];
        }

        return curr_node;
    }
}

// Assembly:
movslq %esi, %rax
cmpl $0x0, 0x18(%rdi,%rax,4)
leaq 0x8(%rdi,%rax,8), %rax
je 0x11ecf
movq (%rax), %rax
retq
pushq $0x1
popq %rcx
subl %esi, %ecx
movslq %ecx, %rcx
movq (%rax), %rax
cmpl $0x0, 0x18(%rax,%rcx,4)
jne 0x11ece
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
jmp 0x11ed7
nop
// File: /workspace/github_c_makefile_star2_O2/Nico01[P]obj2asm/utils.c
// Function: o_malloc
void *o_malloc(size_t size)
{
    char *result = calloc(1, size);

    if (result == NULL) {
        fprintf(stderr, "Out of memory!    [Crrraassshhhhh....]\n");
        exit(4);
    }

    return result;
}

// Assembly:
pushq %rax
movq %rdi, %rsi
pushq $0x1
popq %rdi
callq 0x9110
testq %rax, %rax
je 0x11f23
popq %rcx
retq
movq 0x60ce(%rip), %rax      # 0x17ff8
movq (%rax), %rcx
leaq 0x1d22(%rip), %rdi      # 0x13c56
pushq $0x27
popq %rsi
pushq $0x1
popq %rdx
callq 0x91d0
pushq $0x4
popq %rdi
callq 0x91c0
// File: /workspace/github_c_makefile_star2_O2/howerj[P]eweb/main.c
// Function: help
static int help(const char *arg0) {
	assert(arg0);
	FILE *output = stdout;
	fprintf(output, "Usage: %s [-h] [-p port-number] [-m mode]\n", arg0);
	static const char *m = "\n\
eweb - an embeddable web-server\n\n\
git:       https://github.com/hower/eweb\n\
license:   MIT\n\
copyright: 2015-2016 http://www.codehosting.net\n\
           2018      Richard James Howe\n\
           (see project repo for more details)\n\
\n\
Options:\n\n\
\t-h,        Print this help message and exit successfully.\n\
\t-p number, Set server port number for server to listen to.\n\
\t-m mode,   Set server thread management mode.\n\
\n\
This is a demonstration program for a tiny, embeddable web-server. It\n\
is not a fully featured web-server but is designed to be tiny and\n\
most importantly portable with platform dependent functionality hidden\n\
within the library.\n\
\n\
Different methods for coping with simultaneous connections can be\n\
selected from with the '-m' flag. Valid modes are 'thread', 'fork'\n\
and 'single'. Your platform may not support all modes.\n\
\n";
	fputs(m, output);
	fprintf(output, "The default port the server listens on is %d.\n\n", DEFAULT_PORT);
	fprintf(output, "This program returns %d on success, and %d on failure.\n\n", EXIT_SUCCESS, EXIT_FAILURE);
	return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2796
movq %rdi, %rdx
movq 0x688a(%rip), %rax      # 0x8fd0
movq (%rax), %rbx
leaq 0x29ae(%rip), %rsi      # 0x50fe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2190
leaq 0x29c8(%rip), %rdi      # 0x5129
movq %rbx, %rsi
callq 0x20f0
leaq 0x2cee(%rip), %rsi      # 0x545e
movq %rbx, %rdi
movl $0x1f90, %edx           # imm = 0x1F90
xorl %eax, %eax
callq 0x2190
leaq 0x2d08(%rip), %rsi      # 0x548e
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
jmp 0x2190
leaq 0x2945(%rip), %rdi      # 0x50e2
leaq 0x28b0(%rip), %rsi      # 0x5054
leaq 0x293c(%rip), %rcx      # 0x50e7
movl $0xf4, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O2/howerj[P]eweb/main.c
// Function: send_response
static int send_response(eweb_os_t *w, eweb_os_hit_args_t *args, const char *path, const char *request_body, http_verb type) {
	assert(w);
	assert(path);
	UNUSED(type);
	const size_t path_length = strlen(path);
	if (path_length > 3 && !strncmp(&path[path_length - 3], "api", 3))
		return send_api_response(w, args, path, request_body);
	if (path_length == 0)
		return send_file_response(w, args, "index.html", request_body, 10);
	return send_file_response(w, args, path, request_body, path_length);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x28ea
movq %rdx, %r14
testq %rdx, %rdx
je 0x2909
movq %rsi, %rbx
movq %rdi, %r15
movq %r14, %rdi
callq 0x20b0
cmpq $0x4, %rax
jb 0x2857
cmpb $0x61, -0x3(%r14,%rax)
jne 0x285c
cmpb $0x70, -0x2(%r14,%rax)
jne 0x285c
cmpb $0x69, -0x1(%r14,%rax)
jne 0x285c
cmpq $0x1, 0x30(%rbx)
jne 0x283a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3ff9
movq %rax, %r12
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3ff9
movq %rax, %rdi
callq 0x20b0
leaq 0x2d70(%rip), %rsi      # 0x559b
movq %r12, %rdi
movq %rax, %rdx
callq 0x2070
testl %eax, %eax
je 0x288a
leaq 0x2d7c(%rip), %rdx      # 0x55bd
movq %r15, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x30fb
testq %rax, %rax
je 0x2878
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2928
leaq 0x2d11(%rip), %rdx      # 0x5590
pushq $0xa
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
jmp 0x2868
leaq 0x4(%rsp), %r12
andl $0x0, (%r12)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3fb9
movq %rax, %rdi
callq 0x22a0
leal 0x1(%rax), %edx
cmpl $0x64, %eax
pushq $0x1
popq %rcx
cmovbl %edx, %ecx
leaq 0x3c3b(%rip), %rdx      # 0x64f4
pushq $0x4
popq %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x20d0
leaq 0x2cd6(%rip), %rdx      # 0x55a3
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq 0x3225
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2c3c(%rip), %rdi      # 0x552d
leaq 0x275c(%rip), %rsi      # 0x5054
leaq 0x2c30(%rip), %rcx      # 0x552f
movl $0xe8, %edx
callq 0x20e0
leaq 0x2c7b(%rip), %rdi      # 0x558b
leaq 0x273d(%rip), %rsi      # 0x5054
leaq 0x2c11(%rip), %rcx      # 0x552f
movl $0xe9, %edx
callq 0x20e0