// File: /workspace/github_c_makefile_star2_O3/Nico01[P]obj2asm/odisasm.c
// Function: three_a
int three_a( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    int             dir;
    int             reg_size;
    int             data_size;
    int             type;
    int             size_known;
    dword   offset;
    char            line[50];
    char            seg_text[10];
    char            temp[50];
    char            temp2[15];
    int             ref_seg;

    data_size = addr_bytes;

    dir  = ( byte & 0x02 ) >> 1;
    reg_size = ( byte & 0x01 );

    if ( reg_size == 1 && size_large ) {
        reg_size = 2;
    }
    type = reg_size_to_type(reg_size);

    if ( over_seg != -1 ) {                 /* Any previous segment overide? */
        ref_seg = 17+over_seg;
        strcpy( seg_text, sregsc[over_seg] );
    } else {
        ref_seg = DS;
        seg_text[0] = '\0';
    }

    switch( data_check( 1 ) ) {
        case BAD:
            return( 0 );
        case LABEL:     
            return( 0 );
        case FIXUP:
            if ( fix_rec->word_sized && fix_rec->extended == addr_large ) {
                get_fix( temp, 0, FALSE, size_bytes, type, TRUE,
                                                        &size_known, ref_seg );
            } else {
                return( 0 );
            }
            strcpy( line, "" );
            if ( compatibility == 2 ) {
                strcat( line, seg_text );
                strcat( line, " " );
                if ( !size_known ) {
                    strcat( line, type_to_text(type) );
                }
            } else {
                if ( !size_known ) {
                    strcat( line, type_to_text(type) );
                }
                strcat( line, seg_text );
            }
            strcat( line, temp );
            break;
        case NORMAL:
            if ( check_getv( &offset, addr_large ) ) {
                return( 0 );
            }
            out_hexize( offset, temp2, addr_bytes );    /* Make hex digits */

            if ( compatibility == 2 ) {
                sprintf( line, "%s .%s", seg_text, temp2 );
            } else {
                if ( over_seg == -1 ) {
                    sprintf( line, "ds:[%s]", temp2 );
                } else {
                    sprintf( line, "%s[%s]", seg_text, temp2 );
                }
            }
            break;
    }

    if ( dir == 0 ) {
        sprintf( temp, "%s,%s", regs[reg_size][0], line );
    } else {
        sprintf( temp, "%s,%s", line, regs[reg_size][0] );
    }

    adjust_assumes();

    instr_opcode( text );
    instr_operand( temp );

    class = class;              /* Prevent unused variable warnings */

    return( 1 + data_size );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edi, %ebp
movl %edi, %eax
andl $0x1, %eax
cmpl $0x0, 0x12ff2(%rip)     # 0x1ce84
movq %rsi, %r12
movl $0x2, %r14d
cmovel %eax, %r14d
movl 0xfbea(%rip), %r13d     # 0x19a90
testb $0x1, %bpl
cmovel %eax, %r14d
movl %r14d, %edi
callq 0xf65a
movl %eax, %r15d
movslq 0xfbc8(%rip), %rax      # 0x19a88
cmpq $-0x1, %rax
je 0x9ee0
leal 0x11(%rax), %ebx
leaq 0xf370(%rip), %rcx      # 0x19240
movq (%rcx,%rax,8), %rsi
leaq 0x6(%rsp), %rdi
callq 0x9070
jmp 0x9eea
movb $0x0, 0x6(%rsp)
movl $0x14, %ebx
movl $0x1, %edi
callq 0xcd14
cmpl $0x3, %eax
ja 0xa094
movq %r12, 0x10(%rsp)
xorl %r12d, %r12d
movl %eax, %eax
leaq 0x9106(%rip), %rcx      # 0x13014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x12f6a(%rip)     # 0x1ce88
je 0x9fcf
leaq 0x28(%rsp), %rdi
callq 0x971c
jmp 0x9fd9
leaq 0x131de(%rip), %rax     # 0x1d118
movq (%rax), %rax
cmpl $0x0, 0x3c(%rax)
je 0xa0f7
movl 0x38(%rax), %eax
cmpl 0x12f38(%rip), %eax     # 0x1ce88
jne 0xa0f7
movl 0xfb30(%rip), %ecx      # 0x19a8c
leaq 0x18(%rsp), %rax
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %r15d, %r8d
movl $0x1, %r9d
pushq %rbx
pushq %rax
callq 0x1027f
addq $0x10, %rsp
movb $0x0, 0x30(%rsp)
leaq 0x12f6e(%rip), %rax     # 0x1cef8
cmpl $0x2, (%rax)
jne 0xa052
leaq 0x30(%rsp), %r12
leaq 0x6(%rsp), %rsi
movq %r12, %rdi
callq 0x91a0
movq %r12, %rdi
callq 0x90b0
movw $0x20, 0x30(%rsp,%rax)
cmpl $0x0, 0x18(%rsp)
jne 0xa080
movl %r15d, %edi
callq 0xf67d
movq %rax, %r12
jmp 0xa073
leaq 0x28(%rsp), %rdi
callq 0x96e5
testl %eax, %eax
jne 0xa0f7
movq 0x28(%rsp), %rdi
movl 0xfaa4(%rip), %edx      # 0x19a90
leaq 0x18(%rsp), %rsi
callq 0xcb74
leaq 0x12efb(%rip), %rax     # 0x1cef8
cmpl $0x2, (%rax)
jne 0xa021
leaq 0x929e(%rip), %rsi      # 0x132a7
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0x91b0
jmp 0xa08f
cmpl $-0x1, 0xfa60(%rip)     # 0x19a88
movq 0x10(%rsp), %r12
je 0xa10c
leaq 0x927c(%rip), %rsi      # 0x132b6
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0x91b0
jmp 0xa094
leaq 0x6(%rsp), %r12
cmpl $0x0, 0x18(%rsp)
jne 0xa073
movl %r15d, %edi
callq 0xf67d
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x91a0
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x91a0
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x91a0
movq 0x10(%rsp), %r12
shll $0x6, %r14d
leaq 0xf071(%rip), %rax      # 0x19110
movq (%r14,%rax), %rcx
leaq 0x9170(%rip), %rsi      # 0x1321a
leaq 0x70(%rsp), %rdi
testb $0x2, %bpl
jne 0xa0c2
leaq 0x30(%rsp), %rax
movq %rcx, %rdx
movq %rax, %rcx
jmp 0xa0c7
leaq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x91b0
callq 0xf955
movq %r12, %rdi
callq 0x97c1
leaq 0x12e86(%rip), %rax     # 0x1cf68
cmpl $0x3, (%rax)
jne 0xa0f1
leaq 0x70(%rsp), %rdi
callq 0xca45
incl %r13d
movl %r13d, %r12d
movl %r12d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x919b(%rip), %rsi      # 0x132ae
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x91b0
jmp 0xa094