LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: check_getl
int check_getl( result )
    dword   *result;
{
    int             ch;

    ch = buff_getc();
    if ( ch == EOF ) {
        return( TRUE );
    }
    *result = (dword)((uchar)ch);

    ch = buff_getc();
    if ( ch == EOF ) {
        return( TRUE );
    }
    *result += (dword)((uchar)ch) << 8;

    ch = buff_getc();
    if ( ch == EOF ) {
        return( TRUE );
    }
    *result += (dword)((uchar)ch) << 16;
    ch = buff_getc();
    if ( ch == EOF ) {
        return( TRUE );
    }
    *result += (dword)((uchar)ch) << 24;

    return( FALSE );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xf442
movl $0x1, %ebx
cmpl $-0x1, %eax
je 0x9770
movzbl %al, %eax
movq %rax, (%r14)
callq 0xf442
cmpl $-0x1, %eax
je 0x9770
shll $0x8, %eax
movzwl %ax, %eax
addq %rax, (%r14)
callq 0xf442
cmpl $-0x1, %eax
je 0x9770
movzbl %al, %eax
shll $0x10, %eax
addq %rax, (%r14)
callq 0xf442
cmpl $-0x1, %eax
je 0x9770
shll $0x18, %eax
addq %rax, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: get_checkc
int get_checkc( offset )
    dword   *offset;
{
    int     dcheck;

    dcheck = data_check( 1 );

    if ( dcheck != NORMAL && dcheck != BAD ) {
        return( TRUE );                 /* Must be no labels or fixups */
    }
    return( check_getc( offset ) );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %ebx
movl $0x1, %edi
callq 0xcca8
cmpl $0x3, %eax
je 0x97a6
testl %eax, %eax
jne 0x97b7
callq 0xf442
cmpl $-0x1, %eax
je 0x97b7
cltq
movq %rax, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: instr_opcode
void instr_opcode( text )
    char    *text;
{
    if ( pass == 3 ) {
        out_opcode( text );
    }
    tab_offset = 0;
    inst_init();            /* Reset for next instruction */
}

// Assembly:
pushq %rax
leaq 0x1379f(%rip), %rax     # 0x1cf68
cmpl $0x3, (%rax)
jne 0x97d3
callq 0xc9aa
leaq 0x1371a(%rip), %rax     # 0x1cef4
movl $0x0, (%rax)
leaq 0x139b9(%rip), %rax     # 0x1d1a0
xorl %ecx, %ecx
cmpl $0x182, (%rax)          # imm = 0x182
movl $0xffffffff, 0x1028f(%rip) # imm = 0xFFFFFFFF
sete %cl
movl %ecx, 0x13682(%rip)     # 0x1ce84
movl %ecx, 0x13680(%rip)     # 0x1ce88
leaq 0x13995(%rip), %rax     # 0x1d1a4
movl (%rax), %eax
movl %eax, 0x10275(%rip)     # 0x19a8c
movl %eax, 0x10273(%rip)     # 0x19a90
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: in_out
int in_out( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    int             dir;
    int             size;
    char            temp[50];

    dir  = ( byte & 0x02 ) >> 1;
    size = ( byte & 0x01 );

    if ( size == 1 && size_large ) {
        size = 2;
    }
    instr_opcode(text);

    if ( dir == 0 ) {
        sprintf( temp, "%s,dx", regs[size][0] );
    } else {
        sprintf( temp, "dx,%s", regs[size][0] );
    }
    instr_operand(temp);

    class = class;              /* Prevent unused variable warnings */

    return(1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebx
movl %edi, %ebp
andl $0x1, %ebp
movl 0x1363b(%rip), %r14d    # 0x1ce84
movq %rsi, %rdi
callq 0x97c1
testl %r14d, %r14d
movl $0x2, %eax
cmovel %ebp, %eax
testb $0x1, %bl
cmovel %ebp, %eax
shll $0x6, %eax
testb $0x2, %bl
leaq 0xf8a1(%rip), %rcx      # 0x19110
movq (%rax,%rcx), %rdx
leaq 0x99a6(%rip), %rax      # 0x13220
leaq 0x99a5(%rip), %rsi      # 0x13226
cmoveq %rax, %rsi
movq %rsp, %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x136d2(%rip), %rax     # 0x1cf68
cmpl $0x3, (%rax)
jne 0x98a3
movq %rsp, %rdi
callq 0xc9d9
movl $0x1, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: two_byte
int two_byte( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    dword   offset;
    char            line[50];
    char            temp[50];

    if ( get_checkc( &offset ) ) {
        return( 0 );
    }

    reg_format( class, line, text, "%s\t", "%s\t%s," );

    out_hexize( offset, temp, 1 );      /* Convert 1 byte into hex */
    strcat( line, temp );

    instr_opcode( line );

    byte = byte;                   /* Prevent unused varaible warnings */

    return(2);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9787
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x9a80
leaq 0x980d(%rip), %rcx      # 0x13245
leaq 0x980a(%rip), %r8       # 0x13249
leaq 0x50(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x964a
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rbx
movq %rbx, %rsi
movl $0x1, %edx
callq 0xcb08
movq %r14, %rdi
movq %rbx, %rsi
callq 0x91a0
movq %r14, %rdi
callq 0x97c1
movl $0x2, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: two_ubyte
int two_ubyte( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    dword   offset;
    char            line[50];

    if ( get_checkc( &offset ) ) {
        return( 0 );
    }

    if ( offset <= 127L ) {
        sprintf( line, "%s+0%02lXh", text, offset );
    } else {
        sprintf( line, "%s-0%02lXh", text, 0x0100L - offset );
    }
    instr_opcode( line );

    byte = byte;               /* Prevent unused variable warnings */
    class = class;              /* Prevent unused variable warnings */

    return(2);
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9787
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x9af2
movq 0x8(%rsp), %rcx
cmpq $0x7f, %rcx
ja 0x9ac2
leaq 0x9798(%rip), %rsi      # 0x13250
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
jmp 0x9adc
movl $0x100, %eax            # imm = 0x100
subq %rcx, %rax
leaq 0x978a(%rip), %rsi      # 0x1325b
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x91b0
leaq 0x10(%rsp), %rdi
callq 0x97c1
movl $0x2, %eax
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: two_a
int two_a( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    int             size;
    dword   offset;
    char            line[50];

    size = (byte & 0x01);

    if ( check_getc( &offset ) ) {
        return( 0 );
    }

    if ( size == 0 ) {
        sprintf( line, "0%02lXh,al", offset );
    } else {
        sprintf( line, "0%02lXh,ax", offset );
    }
    instr_opcode( text );
    instr_operand(line);

    byte = byte;               /* Prevent unused variable warnings */
    class = class;              /* Prevent unused variable warnings */

    return(2);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, %ebp
callq 0xf442
cmpl $-0x1, %eax
je 0x9e5f
movslq %eax, %rdx
testb $0x1, %bpl
leaq 0x946a(%rip), %rax      # 0x13291
leaq 0x946e(%rip), %rsi      # 0x1329c
cmoveq %rax, %rsi
movq %rsp, %rdi
xorl %eax, %eax
callq 0x91b0
movq %rbx, %rdi
callq 0x97c1
leaq 0x1311d(%rip), %rax     # 0x1cf68
movl $0x2, %ebx
cmpl $0x3, (%rax)
jne 0x9e61
movq %rsp, %rdi
callq 0xc9d9
jmp 0x9e61
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: enter
int enter( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    dword   num_bytes;
    dword   nest_level;
    char            line[50];

    switch( data_check(1) ) {
        case BAD:
        case LABEL:
        case FIXUP:
            return( 0 );
        case NORMAL:
            if ( check_getw(&num_bytes) ) {
                return( 0 );
            }
            if ( check_getc(&nest_level) ) {
                return( 0 );
            }
            sprintf( line, "0%04lXh,0%02lXh", num_bytes, nest_level );
            break;
    }
    instr_opcode( text );
    instr_operand( line );

    byte = byte;               /* Prevent unused variable warnings */
    class = class;              /* Prevent unused variable warnings */

    return(4);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl $0x1, %edi
callq 0xcca8
xorl %ebp, %ebp
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
jae 0xa146
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
testl %eax, %eax
jne 0xa17d
leaq 0x8(%rsp), %rdi
callq 0x96e5
testl %eax, %eax
jne 0xa13d
callq 0xf442
cmpl $-0x1, %eax
je 0xa13d
movslq %eax, %rcx
movq 0x8(%rsp), %rdx
leaq 0x914c(%rip), %rsi      # 0x132bd
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x91b0
movq %rbx, %rdi
callq 0x97c1
leaq 0x12ddc(%rip), %rax     # 0x1cf68
movl $0x4, %ebp
cmpl $0x3, (%rax)
jne 0xa13d
leaq 0x10(%rsp), %rdi
callq 0xc9d9
jmp 0xa13d
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: prefix
int prefix( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    int             valid;

    valid = check_forward( instr, 0 );

    byte = byte;               /* Prevent unused variable warnings */
    class = class;              /* Prevent unused variable warnings */

    if ( valid ) {
        instr_opcode( text );
        tab_offset = 1;
        hex_finish = FALSE;
        return( 1 );
    } else {
        return( 0 );
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xf7c5(%rip), %rdi      # 0x19b60
xorl %ebp, %ebp
xorl %esi, %esi
callq 0xa1a2
testl %eax, %eax
je 0xa3cf
movq %rbx, %rdi
callq 0x97c1
leaq 0x12b3d(%rip), %rax     # 0x1cef4
movl $0x1, (%rax)
leaq 0x12dec(%rip), %rax     # 0x1d1b0
movl $0x0, (%rax)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: mod1
int mod1( ref_mode, sib_offset, sib_text, text, r_m )
    int             ref_mode;
    int             sib_offset;
    char            *sib_text;
    char            *text;
    uchar   r_m;
{
    char            temp[50];
    dword   offset;
    int             result;
    uchar   zero_rm;

    if ( check_getc( &offset ) ) {
        result = -1;
    } else {
        if ( addr_large ) {
            /*
            ** Assembler should have optimized
            */
            zero_rm = 5;
            strcpy( text, addr_386m[r_m] );
        } else {
            /*
            ** Assembler should have optimized
            */
            zero_rm = 6;
            strcpy( text, addr_mode[r_m] );
        }
        if ( strlen(sib_text) ) {
            strcat( text, "+" );
            strcat( text, sib_text );
        }
        if ( offset >= 0x80 ) {
            sprintf( temp, "-0%02lXh", 0x0100L-offset );
        } else {
            if ( offset == 0L ) {
                if ( r_m == zero_rm ) {
                    temp[0] = '\0';
                } else {
                    return( -1 );
                }
            } else {
                sprintf( temp, "+0%02lXh", offset );
            }
        }
        if ( compatibility == 2 ) {
            strcat( text, "]" );
            strcat( text, temp );
        } else {
            strcat( text, temp );
            strcat( text, "]" );
        }
        result = 1 + sib_offset;
    }
    return( result );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %r13d
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %ebx
callq 0xf442
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0xab97
movl %eax, %r15d
cmpl $0x0, 0x123c0(%rip)     # 0x1ce88
sete 0xf(%rsp)
leaq 0xe85c(%rip), %rax      # 0x19330
leaq 0xe895(%rip), %rcx      # 0x19370
cmoveq %rax, %rcx
movzbl %r13b, %r13d
movq (%rcx,%r13,8), %rsi
movq %r14, %rdi
callq 0x9070
cmpb $0x0, (%r12)
je 0xab10
movq %r14, %rdi
callq 0x90b0
movw $0x2b, (%r14,%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0x91a0
movslq %r15d, %rdx
cmpl $0x80, %r15d
jb 0xab35
movl $0x100, %eax            # imm = 0x100
subq %rdx, %rax
leaq 0x8732(%rip), %rsi      # 0x1325d
leaq 0x10(%rsp), %rdi
movq %rax, %rdx
jmp 0xab46
testl %r15d, %r15d
je 0xaba8
leaq 0x8711(%rip), %rsi      # 0x13252
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x91b0
leaq 0x123a4(%rip), %rax     # 0x1cef8
cmpl $0x2, (%rax)
jne 0xab77
movq %r14, %rdi
callq 0x90b0
movw $0x5d, (%r14,%rax)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x91a0
jmp 0xab93
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x91a0
movq %r14, %rdi
callq 0x90b0
movw $0x5d, (%r14,%rax)
incl %ebx
movl %ebx, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movb 0xf(%rsp), %cl
movb %cl, %al
addl $0x5, %eax
cmpl %r13d, %eax
jne 0xab97
movb $0x0, 0x10(%rsp)
jmp 0xab4d
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: do_sib
int do_sib( text, base )
    char            *text;
    uchar   *base;
{
    dword   sib_byte;
    int             ss;
    int             idx;

    switch( data_check(2) ) {
        case LABEL:
            return( -1 );
        case FIXUP:
            return( -1 );
        case BAD:
        case NORMAL:
            if ( check_getc( &sib_byte ) ) {
                return( -1 );
            }
            ss    = (int)(sib_byte & 0xC0L) >> 6;
            idx   = (int)(sib_byte & 0x38L) >> 3;
            *base = (uchar)(sib_byte & 0x07L);
            if ( idx == 0x04 ) {            /* For special [ESP] */
                if ( ss != 0 ) {
                    return( -1 );
                } else {
                    strcpy( text, "" );
                }
            } else {
                strcat( text, regs[2][idx] );
                strcat( text, sib_scale[ss] );
            }
            return( 1 );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x2, %edi
callq 0xcca8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x3, %eax
je 0xaebb
testl %eax, %eax
jne 0xaf20
callq 0xf442
cmpl $-0x1, %eax
je 0xaf20
movl %eax, %r15d
shrl $0x6, %r15d
andl $0x3, %r15d
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x7, %ecx
andb $0x7, %al
movb %al, (%r14)
cmpl $0x4, %ecx
jne 0xaeec
testl %r15d, %r15d
jne 0xaf20
movb $0x0, (%rbx)
jmp 0xaf1b
movl %ecx, %eax
leaq 0xe21b(%rip), %rcx      # 0x19110
movq 0x80(%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x91a0
movl %r15d, %eax
leaq 0xe4a1(%rip), %rcx      # 0x193b0
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x91a0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: byte_immed
int byte_immed( text, additional, sign )
    char            *text;
    int             additional;
    int             sign;
{
    int             dcheck;
    dword   offset;

    dcheck = data_check( additional+2 );

    switch( dcheck ) {
        case LABEL:     return( 1 );
        case FIXUP:     return( 1 );
        case BAD:
        case NORMAL:
            if ( check_getc( &offset ) ) {
                return( 1 );
            }
            if ( sign ) {
                if ( offset <= 0x7F ) {
                    sprintf( text, "+0%02lXh", offset );
                } else {
                    sprintf( text, "-0%02lXh", 0x0100L-offset );
                }
            } else {
                out_hexize( offset, text, 1 );
            }
            break;
    }
    return( 0 );
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
leal 0x2(%rsi), %edi
callq 0xcca8
movl $0x1, %r14d
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0xb16e
cmpl $0x3, %eax
je 0xb11b
testl %eax, %eax
jne 0xb16b
callq 0xf442
cmpl $-0x1, %eax
je 0xb16e
movslq %eax, %rcx
testl %ebp, %ebp
je 0xb140
cmpl $0x7f, %eax
ja 0xb152
leaq 0x811a(%rip), %rsi      # 0x13252
movq %rbx, %rdi
movq %rcx, %rdx
jmp 0xb164
movq %rcx, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0xcb08
jmp 0xb16b
movl $0x100, %edx            # imm = 0x100
subq %rcx, %rdx
leaq 0x80fc(%rip), %rsi      # 0x1325d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x91b0
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/odisasm.c
// Function: word_immed
int word_immed( text, additional )
    char            *text;
    int             additional;
{
    int             dcheck;
    int             dummy;
    dword   offset;

    dcheck = data_check( additional+2 );

    switch( dcheck ) {
        case LABEL:
            return( 1 );
        case FIXUP:
            if ( fix_rec->word_sized && fix_rec->extended == addr_large ) {
                get_fix( text, 2, TRUE, size_bytes, NEAR, FALSE, &dummy, DS );
            } else {
                return( 1 );
            }
            break;
        case BAD:
            return( 1 );
        case NORMAL:
            if ( check_getv( &offset, size_large ) ) {
                return( 1 );
            }
            if ( size_large ) {
                out_hexize( offset, text, 4 );
            } else {
                out_hexize( offset, text, 2 );
            }
            break;
    }
    return( 0 );
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leal 0x2(%rsi), %edi
callq 0xcca8
cmpl $0x3, %eax
ja 0xb236
movl $0x1, %ebp
movl %eax, %eax
leaq 0x7ea6(%rip), %rcx      # 0x13044
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x11cd6(%rip)     # 0x1ce84
je 0xb206
leaq 0x8(%rsp), %rdi
callq 0x971c
jmp 0xb210
leaq 0x11f55(%rip), %rax     # 0x1d118
movq (%rax), %rax
cmpl $0x0, 0x3c(%rax)
je 0xb238
movl 0x38(%rax), %eax
cmpl 0x11cb3(%rip), %eax     # 0x1ce88
jne 0xb238
movl 0xe8af(%rip), %ecx      # 0x19a8c
leaq 0x14(%rsp), %rax
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x1, %r8d
xorl %r9d, %r9d
pushq $0x14
pushq %rax
callq 0x10207
addq $0x10, %rsp
jmp 0xb236
leaq 0x8(%rsp), %rdi
callq 0x96e5
testl %eax, %eax
jne 0xb238
cmpl $0x0, 0x11c69(%rip)     # 0x1ce84
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
je 0xb22c
movl $0x4, %edx
jmp 0xb231
movl $0x2, %edx
callq 0xcb08
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oextra.c
// Function: hint_insert
void hint_insert( int seg_idx, dword offset, int hint_type, dword length )
{
    HINT_T          *hint_rec;

    hint_rec = (HINT_T *)o_malloc( sizeof(HINT_T) );
    hint_rec->seg_idx   = seg_idx;
    hint_rec->offset    = offset;
    hint_rec->hint_type = hint_type;
    hint_rec->length    = length;
    insert( (char *)hint_rec, hint_tree, TC hint_compare );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %r15d
movl $0x18, %edi
callq 0x1282e
movl %r15d, (%rax)
movq %r14, 0x8(%rax)
movl %ebp, 0x4(%rax)
movq %rbx, 0x10(%rax)
leaq 0x114f8(%rip), %rcx     # 0x1cfd8
movq (%rcx), %rsi
leaq -0x62(%rip), %rdx       # 0xba88
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x12538
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: tab_count
void tab_count( text )
    char    *text;
{
    int     count;

    count = strlen( text );
    while ( count  ) {
        if ( *text == '\t' ) {
            col_cnt = (col_cnt | 0x07) + 1;
        } else {
            col_cnt++;
        }
        text++;
        --count;
    }
    tab_at = (col_cnt >> 3) + 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x90b0
testl %eax, %eax
je 0xc8d4
movl 0x10901(%rip), %ecx     # 0x1d1b8
xorl %edx, %edx
movl %ecx, %esi
orl $0x7, %esi
cmpb $0x9, (%rbx,%rdx)
cmovel %esi, %ecx
incl %ecx
incq %rdx
cmpl %edx, %eax
jne 0xc8b9
movl %ecx, 0x108e4(%rip)     # 0x1d1b8
movl 0x108de(%rip), %eax     # 0x1d1b8
sarl $0x3, %eax
incl %eax
movl %eax, 0x108cf(%rip)     # 0x1d1b4
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: tab_seek
void tab_seek( tab_count )
    int     tab_count;
{
    if ( tab_count <= tab_at ) {
        putc( '\n', stdout );
        tab_count -= tab_offset;
        tab_offset = 0;
        tab_at = 0;
        col_cnt = 0;
    }
    if ( tab_at == 0 ) {
        tab_at = 1;
    }

    while( tab_at < tab_count ) {
        putc( '\t', stdout );
        tab_at++;
        col_cnt = (tab_at - 1) << 3;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl %edi, 0x108c1(%rip)     # 0x1d1b4
jl 0xc922
movq 0xc6d4(%rip), %rax      # 0x18fd0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x9130
leaq 0x105e4(%rip), %rax     # 0x1cef4
subl (%rax), %ebx
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ecx, 0x10898(%rip)     # 0x1d1b4
movl %ecx, 0x10896(%rip)     # 0x1d1b8
cmpl $0x0, 0x1088b(%rip)     # 0x1d1b4
jne 0xc935
movl $0x1, 0x1087f(%rip)     # 0x1d1b4
cmpl %ebx, 0x10879(%rip)     # 0x1d1b4
jge 0xc96d
movq 0xc68c(%rip), %r14      # 0x18fd0
movq (%r14), %rsi
movl $0x9, %edi
callq 0x9130
movl 0x1085d(%rip), %eax     # 0x1d1b4
leal 0x1(%rax), %ecx
movl %ecx, 0x10854(%rip)     # 0x1d1b4
shll $0x3, %eax
movl %eax, 0x1084f(%rip)     # 0x1d1b8
cmpl %ebx, %ecx
jl 0xc944
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: out_operand
void out_operand( operand )
    char    *operand;
{
    if ( strcmp(operand,"") ) {
        tab_next();                 /* Indent to next tab stop */
        printf( "%s", operand );
        tab_count( operand );
    }
}

// Assembly:
cmpb $0x0, (%rdi)
je 0xca09
pushq %rbx
movq %rdi, %rbx
movl 0x107cc(%rip), %edi     # 0x1d1b4
incl %edi
callq 0xc8e7
leaq 0x684c(%rip), %rdi      # 0x13242
movq %rbx, %rsi
xorl %eax, %eax
callq 0x90d0
movq %rbx, %rdi
popq %rbx
jmp 0xc8a4
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: out_comment
void out_comment( comment )
    char    *comment;
{
    if ( strcmp(comment,"") ) {
        tab_seek( 7 );          /* Indent to next tab stop */
        printf( "; %s", comment );
        col_cnt += 2;
        tab_count( comment );
    }
}

// Assembly:
cmpb $0x0, (%rdi)
je 0xca3e
pushq %rbx
movq %rdi, %rbx
movl $0x7, %edi
callq 0xc8e7
leaq 0x71e9(%rip), %rdi      # 0x13c0d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x90d0
addl $0x2, 0x10783(%rip)     # 0x1d1b8
movq %rbx, %rdi
popq %rbx
jmp 0xc8a4
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: out_endline
void out_endline()
{
    putc( '\n', stdout );
    tab_offset = 0;
    tab_at = 0;
    col_cnt = 0;
}

// Assembly:
pushq %rax
movq 0xc589(%rip), %rax      # 0x18fd0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x9130
leaq 0x10499(%rip), %rax     # 0x1cef4
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ecx, 0x1074f(%rip)     # 0x1d1b4
movl %ecx, 0x1074d(%rip)     # 0x1d1b8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: out_newline
void out_newline()
{
// /*    if ( tab_at != 0 ) {          /* Finish off previous line if needed */
//        out_endline();
//    } */
    out_endline();
}

// Assembly:
pushq %rax
movq 0xc55b(%rip), %rax      # 0x18fd0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x9130
leaq 0x1046b(%rip), %rax     # 0x1cef4
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ecx, 0x10721(%rip)     # 0x1d1b4
movl %ecx, 0x1071f(%rip)     # 0x1d1b8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: out_directive
void out_directive( direct )
    char    *direct;
{
    tab_next();
    if ( tab_at < 2 ) {
        tab_next();
    }
    printf( "%s", direct );
    tab_count( direct );
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x1070f(%rip), %edi     # 0x1d1b4
incl %edi
callq 0xc8e7
movl 0x10702(%rip), %edi     # 0x1d1b4
cmpl $0x1, %edi
jg 0xcabe
incl %edi
callq 0xc8e7
leaq 0x677d(%rip), %rdi      # 0x13242
movq %rbx, %rsi
xorl %eax, %eax
callq 0x90d0
movq %rbx, %rdi
popq %rbx
jmp 0xc8a4
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/ooutput.c
// Function: out_line
void out_line( label, opcode, operand, comment )
    char    *label;
    char    *opcode;
    char    *operand;
    char    *comment;
{
    out_label( label );
    out_directive( opcode );
    out_operand( operand );
    out_comment( comment );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
callq 0xc982
movq %r15, %rdi
callq 0xca9b
movq %r14, %rdi
callq 0xc9d9
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xca0a
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oprocess.c
// Function: lone_public
void lone_public()
{
    char    operand[80];
    long    relative;

    if ( pass == 3 ) {
        out_label( pub_rec->name );
        out_directive( "=" );
        if ( segment == 0 ) {
            sprintf( operand, "0%04Xh", pub_rec->offset );
        } else {
            relative = (long)pub_rec->offset - inst_offset;
            if ( relative < 0L ) {
                sprintf( operand, "$ - 0%04lXh", -relative );
            } else {
                sprintf( operand, "$ + 0%04lXh", relative );
            }
        }
        out_operand( operand );
        out_endline();
    }
}

// Assembly:
leaq 0x10341(%rip), %rax     # 0x1cf68
cmpl $0x3, (%rax)
jne 0xcca7
pushq %rbx
subq $0x50, %rsp
leaq 0x10450(%rip), %rbx     # 0x1d088
movq (%rbx), %rdi
addq $0x10, %rdi
callq 0xc982
leaq 0x69af(%rip), %rdi      # 0x135fa
callq 0xca9b
leaq 0x10539(%rip), %rax     # 0x1d190
cmpl $0x0, (%rax)
movq (%rbx), %rax
movq 0x8(%rax), %rdx
je 0xcc78
leaq 0x1052e(%rip), %rax     # 0x1d198
subq (%rax), %rdx
js 0xcc81
leaq 0x7002(%rip), %rsi      # 0x13c78
jmp 0xcc8b
leaq 0x7038(%rip), %rsi      # 0x13cb7
jmp 0xcc8b
negq %rdx
leaq 0x6fe1(%rip), %rsi      # 0x13c6c
movq %rsp, %rdi
xorl %eax, %eax
callq 0x91b0
movq %rsp, %rdi
callq 0xc9d9
callq 0xca3f
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oprocess.c
// Function: data_byte
void data_byte( size )
    int     size;
{
    char    *opcode;
    int     out_count;
    int     times;
    char    operand[50];
    char    rev_buff[10];
    char    temp[4];

    if ( last_pub_rec && pass == 3 ) {
        if ( last_pub_rec->type == FAR ) {
            out_directive("=");
            out_operand("$");
        }
        if ( last_pub_rec->type == NEAR ) {
            out_endline();
        }
    }

    opcode = size_to_opcode( size, &times );

    while ( times ) {
        out_count = 0;
        strcpy( operand, "0" );
        while ( out_count < size ) {
            rev_buff[ out_count ] = (uchar)buff_regetc();
            out_count++;
        }
        out_count = size;
        while ( out_count ) {
            --out_count;
            sprintf( temp, "%02X", (uchar)rev_buff[out_count] );
            strcat( operand, temp );
        }
        strcat( operand, "h" );
        if ( pass == 3 ) {
            out_directive( opcode );
            out_operand( operand );
            out_endline();
        }
        --times;
    }
    last_pub_rec = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edi, %ebx
leaq 0x101f2(%rip), %r14     # 0x1d090
movq (%r14), %rax
testq %rax, %rax
je 0xcede
leaq 0x100bb(%rip), %rcx     # 0x1cf68
cmpl $0x3, (%rcx)
jne 0xcede
cmpl $0x2, 0x38(%rax)
jne 0xced0
leaq 0x673b(%rip), %rdi      # 0x135fa
callq 0xca9b
leaq 0x6db9(%rip), %rdi      # 0x13c84
callq 0xc9d9
movq (%r14), %rax
cmpl $0x1, 0x38(%rax)
jne 0xcede
callq 0xca3f
leaq 0xc(%rsp), %r15
movl %ebx, %edi
movq %r15, %rsi
callq 0xf662
movq %rax, 0x10(%rsp)
cmpl $0x0, (%r15)
je 0xcf9d
movslq %ebx, %rax
movq %rax, 0x18(%rsp)
movl %ebx, %r14d
leaq 0x30(%rsp), %r15
leaq 0x7988(%rip), %r12      # 0x1489b
leaq 0x22(%rsp), %r13
movw $0x30, 0x30(%rsp)
testl %ebx, %ebx
jle 0xcf36
xorl %ebp, %ebp
callq 0xf36c
movb %al, 0x26(%rsp,%rbp)
incq %rbp
cmpq %rbp, %r14
jne 0xcf25
movq 0x18(%rsp), %rbp
testl %ebx, %ebx
je 0xcf61
movzbl 0x25(%rsp,%rbp), %edx
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
movq %r13, %rsi
callq 0x91a0
decq %rbp
jne 0xcf3f
movq %r15, %rdi
callq 0x90b0
movw $0x68, 0x30(%rsp,%rax)
leaq 0xfff1(%rip), %rax      # 0x1cf68
cmpl $0x3, (%rax)
jne 0xcf93
movq 0x10(%rsp), %rdi
callq 0xca9b
movq %r15, %rdi
callq 0xc9d9
callq 0xca3f
decl 0xc(%rsp)
jne 0xcf18
leaq 0x100ec(%rip), %rax     # 0x1d090
movq $0x0, (%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oprocess.c
// Function: proc_fixup
int proc_fixup()
{
    int     fix_size;
    int     fix_form;
    int     fix_extended;
    char    operand[100];
    int     dummy;

    fix_form     = fix_rec->form;
    fix_extended = fix_rec->extended;

    if ( fix_form == POINTER ) {
        fix_size = get_fix( operand, 2, FALSE, segment_bytes,
                                                    FAR, FALSE, &dummy, DS );
    } else {
        fix_size = get_fix( operand, 2, FALSE, segment_bytes,
                                                    NEAR, FALSE, &dummy, DS );
    }

    if ( pass == 3 ) {
        if ( fix_form == OFFSET && fix_extended ) {
            out_directive( "dd" );
        } else {
            if ( fix_form == POINTER && fix_extended ) {
                out_directive( "df" );
            } else {
                out_directive( fix_type[fix_form].form );
            }
        }
    }
    inst_offset += fix_size;

    if ( pass == 3 ) {
        out_operand( operand );
        out_endline();
    }
    buff_empty();
    if ( last_pub_rec ) {
        last_pub_rec->type = size_to_type(fix_size);
        last_pub_rec = NULL;
    }
    return( fix_size );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
leaq 0xf95e(%rip), %rax      # 0x1d118
movq (%rax), %rax
movslq 0x18(%rax), %r14
xorl %r8d, %r8d
cmpq $0x3, %r14
sete %r8b
movl 0x38(%rax), %ebp
leaq 0xf9ce(%rip), %rax      # 0x1d1a4
movl (%rax), %ecx
incl %r8d
leaq 0xc(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %r9d, %r9d
pushq $0x14
pushq %rax
callq 0x10207
addq $0x10, %rsp
movl %eax, %ebx
leaq 0xf764(%rip), %r15      # 0x1cf68
cmpl $0x3, (%r15)
jne 0xd857
cmpl $0x1, %r14d
sete %al
testl %ebp, %ebp
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xd826
leaq 0x5d3a(%rip), %rdi      # 0x1355e
jmp 0xd852
testl %ebp, %ebp
setne %al
cmpl $0x3, %r14d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xd842
leaq 0x6486(%rip), %rdi      # 0x13cc6
jmp 0xd852
leaq (%r14,%r14,2), %rax
leaq 0xf513(%rip), %rcx      # 0x1cd60
movq 0x8(%rcx,%rax,8), %rdi
callq 0xca9b
movslq %ebx, %rax
leaq 0xf937(%rip), %rcx      # 0x1d198
addq %rax, (%rcx)
cmpl $0x3, (%r15)
jne 0xd879
leaq 0x10(%rsp), %rdi
callq 0xc9d9
callq 0xca3f
callq 0xf467
leaq 0xf80b(%rip), %r14      # 0x1d090
cmpq $0x0, (%r14)
je 0xd89f
movl %ebx, %edi
callq 0xf608
movq (%r14), %rcx
movl %eax, 0x38(%rcx)
movq $0x0, (%r14)
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oprocess.c
// Function: proc_drec
void proc_drec(DAT_T *data_rec, DAT_T *next_rec, int inst_proc)
{
    int     orgable;

#ifdef DEBUG
    printf("DIS-ASSEMBLY offset %04X\n", data_rec->offset );
#endif
    if ( pass == 3 ) {
        out_newline();
    }
    /*
    ** Do we need an ORG statement or dup(?)'s ?
    */
    if ( inst_offset != data_rec->offset+record_overused ) {
        pub_search.seg_idx = segment;
        pub_search.offset = data_rec->offset+record_overused;
        orgable = TRUE;
        while ( pub_node != public_tree 
                && pub_compare(&pub_search,pub_rec) == LEFT ) {
            pre_dups( pub_rec->offset - inst_offset, orgable );
            proc_label();
            orgable = FALSE;
        }
        pre_dups( data_rec->offset+record_overused - inst_offset, orgable );
    }
    data_offset = data_rec->offset;

    switch( data_rec->type ) {
        case ENUMERATED:
            enumerated( data_rec, next_rec, inst_proc );
            break;
        case ITERATED:
            iterated( data_rec, next_rec );
            break;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xec28(%rip), %rax      # 0x1cf68
cmpl $0x3, (%rax)
jne 0xe34a
callq 0xca6d
leaq 0xee47(%rip), %rcx      # 0x1d198
movl 0xf249(%rip), %eax      # 0x1d5a0
addl 0x4(%r15), %eax
cmpq %rax, (%rcx)
je 0xe40f
movq %r14, 0x10(%rsp)
movl %ebx, 0xc(%rsp)
leaq 0xee1c(%rip), %rcx      # 0x1d190
movl (%rcx), %ecx
leaq 0xed1b(%rip), %rdx      # 0x1d098
movl %ecx, (%rdx)
movq %rax, 0x8(%rdx)
leaq 0xecf6(%rip), %rbx      # 0x1d080
movq (%rbx), %rax
leaq 0xec14(%rip), %r14      # 0x1cfa8
cmpq (%r14), %rax
je 0xe3e6
movl $0x1, %ebp
leaq 0xece3(%rip), %r13      # 0x1d088
leaq 0xecec(%rip), %r12      # 0x1d098
movq (%r13), %rsi
movq %r12, %rdi
callq 0x11b60
testl %eax, %eax
jne 0xe3eb
movq (%r13), %rax
movq 0x8(%rax), %rdi
leaq 0xedcd(%rip), %rax      # 0x1d198
subq (%rax), %rdi
movl %ebp, %esi
callq 0xcfba
callq 0xd63e
movq (%rbx), %rax
xorl %ebp, %ebp
cmpq (%r14), %rax
jne 0xe3ac
jmp 0xe3eb
movl $0x1, %ebp
movl 0xf1af(%rip), %edi      # 0x1d5a0
addl 0x4(%r15), %edi
leaq 0xed9c(%rip), %rax      # 0x1d198
subq (%rax), %rdi
movl %ebp, %esi
callq 0xcfba
movl 0xc(%rsp), %ebx
movq 0x10(%rsp), %r14
movl 0x4(%r15), %eax
leaq 0x10276(%rip), %rcx     # 0x1e690
movq %rax, (%rcx)
movl 0x8(%r15), %eax
cmpl $0x1, %eax
je 0xe445
testl %eax, %eax
jne 0xe45b
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe1cb
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdf66
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oprocess.c
// Function: list_sex
NODE_T *list_sex(NODE_T *node, int seg_num)
{
    SEX_T   *sex_rec;
    EXT_T   *ext_rec;

    sex_rec = (SEX_T *)node->data;
    while ( node != sex_tree && sex_rec->seg_index < seg_num ) {
        node = traverse( node, RIGHT );
        sex_rec = (SEX_T *)node->data;
    }
    out_newline();
    while ( node != sex_tree && sex_rec->seg_index == seg_num ) {
        ext_rec = sex_rec->ext_rec;
        if ( ext_rec->used == seg_num ) {       /* Still in this segment? */
            print_ext( sex_rec->ext_rec );
        }
        node = traverse( node, RIGHT );
        sex_rec = (SEX_T *)node->data;
    }
    return( node );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x20(%rdi), %r12
leaq 0xeb36(%rip), %r15      # 0x1cfb8
cmpq %rdi, (%r15)
je 0xe4a6
cmpl %ebx, (%r12)
jge 0xe4a6
movq %r14, %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, %r14
movq 0x20(%rax), %r12
cmpq (%r15), %rax
jne 0xe487
callq 0xca6d
cmpq (%r15), %r14
je 0xe4de
cmpl %ebx, (%r12)
jne 0xe4de
movq 0x8(%r12), %rdi
cmpl %ebx, 0x48(%rdi)
jne 0xe4c5
callq 0xeb7c
movq %r14, %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, %r14
movq 0x20(%rax), %r12
cmpq (%r15), %rax
jne 0xe4b0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oreport.c
// Function: list_ext
void list_ext()
{
    NODE_T          *seg_node;
    NODE_T          *ext_node;
    EXT_T           *ext_rec;
    int             data_index;

    data_index = 0;
    seg_node = start( segment_tree, RIGHT );
    while ( seg_node != segment_tree ) {
        seg_rec = (SEG_T *)seg_node->data;
        if ( stricmp(seg_rec->class->name, "DATA") == 0 ) {
            data_index = seg_rec->index;
            break;
        }
        seg_node = traverse( seg_node, RIGHT );
    }

    out_newline();
    ext_node = start( extern_tree, LEFT );
    while ( ext_node != extern_tree ) {
        ext_rec = (EXT_T *)ext_node->data;
        if ( ext_rec->used == 0 || ext_rec->used == -1 ) {
            if ( compatibility == 2 && data_index != 0 ) {
                if ( ext_rec->type == 2 || ext_rec->type == 3 ||
                     ext_rec->type == 4 || ext_rec->type == 5 ) {
                    if ( ext_rec->used == 0 ) {
                        sex_insert( data_index, ext_rec );
                        ext_rec->used = data_index;
                    }
                } else {
                    print_ext( ext_rec );
                }
            } else {
                print_ext( ext_rec );
            }
        }
        ext_node = traverse( ext_node, LEFT );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xe2af(%rip), %r12      # 0x1cf98
movq (%r12), %rdi
movl $0x1, %esi
callq 0x127bd
xorl %ebx, %ebx
cmpq (%r12), %rax
je 0xed47
movq %rax, %r14
leaq 0xe2e7(%rip), %r13      # 0x1cff0
leaq 0x486f(%rip), %r15      # 0x1357f
movq 0x20(%r14), %rbp
movq %rbp, (%r13)
movq 0x8(%rbp), %rdi
addq $0x4, %rdi
movq %r15, %rsi
callq 0x9050
testl %eax, %eax
je 0xed44
movq %r14, %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, %r14
cmpq (%r12), %rax
jne 0xed10
jmp 0xed47
movl (%rbp), %ebx
callq 0xca6d
leaq 0xe25d(%rip), %r12      # 0x1cfb0
movq (%r12), %rdi
xorl %esi, %esi
callq 0x127bd
cmpq (%r12), %rax
je 0xedc4
movq %rax, %r14
leaq 0xe18a(%rip), %r13      # 0x1cef8
movq 0x20(%r14), %r15
movl 0x48(%r15), %eax
leal 0x1(%rax), %ecx
cmpl $0x1, %ecx
ja 0xedb1
cmpl $0x2, (%r13)
jne 0xeda9
testl %ebx, %ebx
je 0xeda9
movl 0x2c(%r15), %ecx
addl $-0x2, %ecx
cmpl $0x3, %ecx
ja 0xeda9
testl %eax, %eax
jne 0xedb1
movl %ebx, %edi
movq %r15, %rsi
callq 0xf5d0
movl %ebx, 0x48(%r15)
jmp 0xedb1
movq %r15, %rdi
callq 0xeb7c
movq %r14, %rdi
xorl %esi, %esi
callq 0x127da
movq %rax, %r14
cmpq (%r12), %rax
jne 0xed6e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oreport.c
// Function: list_pub
void list_pub()
{
    NODE_T          *pub_node;
    PUB_T           *pub_rec;
    char            comment[50];
    char            *label;

    out_newline();
    pub_node = start( public_tree, RIGHT );
    while ( pub_node != public_tree ) {
        pub_rec = (PUB_T *)pub_node->data;
        if ( pub_rec->scope ) {
            label = "";
        } else {
            label = ";Static";
        }
        if ( pub_rec->domain == PUBLIC ) {
            sprintf( comment, "Located at %d:%04lXh Type = %d", pub_rec->seg_idx, pub_rec->offset, pub_rec->type );
            out_label( label );
            out_opcode( "PUBLIC" );
            tab_seek(3);
            out_operand( pub_rec->name );
            out_comment( comment );
        } else {
#ifdef DEBUG
            sprintf( comment, "Located at %d:%04lXh Type = %d", pub_rec->seg_idx, pub_rec->offset, pub_rec->type );
            out_label( label );
            out_opcode( "PRIV" );
            tab_seek(3);
            out_operand( pub_rec->name );
            out_comment( comment );
#endif
        }
        pub_node = traverse( pub_node, RIGHT );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
callq 0xca6d
leaq 0xe1bb(%rip), %r14      # 0x1cfa8
movq (%r14), %rdi
movl $0x1, %esi
callq 0x127bd
cmpq (%r14), %rax
je 0xee96
movq %rax, %rbx
movq %rsp, %r15
leaq 0x5191(%rip), %r12      # 0x13fa1
movq 0x20(%rbx), %r13
cmpl $0x1, 0x3c(%r13)
jne 0xee7d
cmpl $0x0, 0x40(%r13)
leaq 0x52e5(%rip), %rbp      # 0x1410c
leaq 0x5109(%rip), %rax      # 0x13f37
cmoveq %rax, %rbp
movl (%r13), %edx
movq 0x8(%r13), %rcx
movl 0x38(%r13), %r8d
movq %r15, %rdi
leaq 0x513a(%rip), %rsi      # 0x13f82
xorl %eax, %eax
callq 0x91b0
movq %rbp, %rdi
callq 0xc982
movq %r12, %rdi
callq 0xc9aa
movl $0x3, %edi
callq 0xc8e7
addq $0x10, %r13
movq %r13, %rdi
callq 0xc9d9
movq %r15, %rdi
callq 0xca0a
movq %rbx, %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, %rbx
cmpq (%r14), %rax
jne 0xee10
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oreport.c
// Function: list_fix
void list_fix()
{
    NODE_T          *fix_node;
    FIX_T           *fix_rec;
    char            comment[50];

    out_newline();
    fix_node = start( fix_tree, RIGHT );
    while ( fix_node != fix_tree ) {
        fix_rec = (FIX_T *)fix_node->data;
        sprintf( comment, "Fixup at 0%02Xh:0%04Xh:0%04Xh", fix_rec->seg_idx,
                fix_rec->dat_offset, fix_rec->offset );
        out_line( "", ";", comment, "" );
        fix_node = traverse( fix_node, RIGHT );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
callq 0xca6d
leaq 0xdf71(%rip), %rbp      # 0x1cfd0
movq (%rbp), %rdi
movl $0x1, %esi
callq 0x127bd
cmpq (%rbp), %rax
je 0xf0d0
movq %rax, %rbx
leaq 0x4f42(%rip), %r14      # 0x13fbf
movq %rsp, %r15
leaq 0x4e45(%rip), %r12      # 0x13ecc
leaq 0x507e(%rip), %r13      # 0x1410c
movq 0x20(%rbx), %rax
movl (%rax), %edx
movq 0x8(%rax), %rcx
movl 0x10(%rax), %r8d
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x91b0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0xcad8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x127da
movq %rax, %rbx
cmpq (%rbp), %rax
jne 0xf08e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Nico01[P]obj2asm/oubuff.c
// Function: buff_init
int buff_init( length )
    int     length;
{
    if ( length > BUFFSIZE ) fmt_error("Record too large");
    buff_beg = &buff[0];
    buff_cur = buff_beg;
    length = fread( buff_beg, sizeof(char), length, o_file );
    buff_end = buff_beg + length;  /* Last character will be at buff[length-1] */
    return( length );
}

// Assembly:
pushq %rbx
movl %edi, %ebx
cmpl $0x1011, %edi           # imm = 0x1011
jl 0xf3af
leaq 0x4c46(%rip), %rdi      # 0x13ff0
callq 0x12808
leaq 0xe20a(%rip), %rdi      # 0x1d5c0
movq %rdi, 0xf213(%rip)      # 0x1e5d0
movq %rdi, 0xf214(%rip)      # 0x1e5d8
movslq %ebx, %rdx
leaq 0xdb8a(%rip), %rax      # 0x1cf58
movq (%rax), %rcx
movl $0x1, %esi
callq 0x9090
cltq
movq 0xf1ec(%rip), %rcx      # 0x1e5d0
addq %rax, %rcx
movq %rcx, 0xf1f2(%rip)      # 0x1e5e0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf1e5(%rip), %rax      # 0x1e5e0
addq %rbx, %rax
subq 0xf1cb(%rip), %rax      # 0x1e5d0
cmpq $0x1011, %rax           # imm = 0x1011
jl 0xf419
leaq 0x4bed(%rip), %rdi      # 0x14001
callq 0x12808
movq 0xf1c0(%rip), %rdi      # 0x1e5e0
leaq 0xdb31(%rip), %rax      # 0x1cf58
movq (%rax), %rcx
movl $0x1, %esi
movq %rbx, %rdx
callq 0x9090
cltq
addq %rax, 0xf1a0(%rip)      # 0x1e5e0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf478
movzbl %al, %ebx
callq 0xf478
movzbl %al, %ebp
shll $0x8, %ebp
orl %ebx, %ebp
callq 0xf478
movzbl %al, %ebx
shll $0x10, %ebx
orl %ebp, %ebx
callq 0xf478
movzbl %al, %eax
shll $0x18, %eax
orl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0xf51d
movq %rdi, %r14
callq 0xf478
movb %al, (%rbx)
incq %rbx
decq %r14
jne 0xf50e
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xf478
movzbl %al, %ebp
movw $0x1, %ax
testb %bpl, %bpl
jns 0xf588
andl $0x7f, %ebp
shll $0x8, %ebp
callq 0xf478
movzbl %al, %eax
orl %eax, %ebp
movw $0x2, %ax
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x10, %edi
callq 0x1282e
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
leaq 0xd9c9(%rip), %rcx      # 0x1cfb8
movq (%rcx), %rsi
leaq -0x65(%rip), %rdx       # 0xf594
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x12538
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x497e(%rip), %rax      # 0x13fed
cmpl $0xa, %edi
ja 0xf694
movl %edi, %ecx
leaq 0x49c7(%rip), %rdx      # 0x14044
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x0, (%rsi)
leaq 0x4a40(%rip), %rax      # 0x140d3
retq
movl %edi, (%rsi)
retq
leaq 0x4a40(%rip), %rax      # 0x140de
retq
leaq 0x3b27(%rip), %rax      # 0x131cd
retq
leaq 0x4a2d(%rip), %rax      # 0x140db
retq
leaq 0x3ea8(%rip), %rax      # 0x1355e
retq
leaq 0x4608(%rip), %rax      # 0x13cc6
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x10, %edi
callq 0x1282e
movq %rax, %r14
movq %rbx, %rdi
callq 0x90b0
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x1282e
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x9060
movq %r12, (%r14)
movl $0x0, 0x8(%r14)
leaq 0xd896(%rip), %rax      # 0x1cfc8
movq (%rax), %rsi
leaq -0x7c(%rip), %rdx       # 0xf6c0
movq %r14, %rdi
callq 0x12538
movq 0x20(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq