// File: /workspace/github_c_makefile_star2_O2/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, 0x123da(%rip)     # 0x1be84
movq %rsi, %r12
pushq $0x2
popq %r14
cmovel %eax, %r14d
movl 0xefd4(%rip), %r13d     # 0x18a90
testb $0x1, %bpl
cmovel %eax, %r14d
movl %r14d, %edi
callq 0xeece
movl %eax, %r15d
movslq 0xefb2(%rip), %rax      # 0x18a88
cmpq $-0x1, %rax
je 0x9af6
leal 0x11(%rax), %ebx
leaq 0xe75a(%rip), %rcx      # 0x18240
movq (%rcx,%rax,8), %rsi
leaq 0x6(%rsp), %rdi
callq 0x9070
jmp 0x9afe
movb $0x0, 0x6(%rsp)
pushq $0x14
popq %rbx
pushq $0x1
popq %rdi
callq 0xc74e
cmpl $0x3, %eax
ja 0x9c88
movq %r12, 0x10(%rsp)
xorl %r12d, %r12d
movl %eax, %eax
leaq 0x84f4(%rip), %rcx      # 0x12014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x12359(%rip), %esi     # 0x1be88
leaq 0x28(%rsp), %rdi
callq 0x9461
testl %eax, %eax
jne 0x9cdf
movq 0x28(%rsp), %rdi
movl 0xef44(%rip), %edx      # 0x18a90
leaq 0x18(%rsp), %rsi
callq 0xc5b5
leaq 0x1239b(%rip), %rax     # 0x1bef8
cmpl $0x2, (%rax)
jne 0x9c15
leaq 0x873a(%rip), %rsi      # 0x122a7
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0x91b0
jmp 0x9c83
leaq 0x12589(%rip), %rax     # 0x1c118
movq (%rax), %rax
cmpl $0x0, 0x3c(%rax)
je 0x9cdf
movl 0x38(%rax), %eax
cmpl 0x122e3(%rip), %eax     # 0x1be88
jne 0x9cdf
movl 0xeedb(%rip), %ecx      # 0x18a8c
leaq 0x18(%rsp), %rax
leaq 0x70(%rsp), %rdi
pushq $0x1
popq %r9
xorl %esi, %esi
xorl %edx, %edx
movl %r15d, %r8d
pushq %rbx
pushq %rax
callq 0xfad9
popq %rcx
popq %rdx
movb $0x0, 0x30(%rsp)
leaq 0x1231d(%rip), %rax     # 0x1bef8
cmpl $0x2, (%rax)
jne 0x9c46
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 0x9c74
movl %r15d, %edi
callq 0xeef1
movq %rax, %r12
jmp 0x9c67
cmpl $-0x1, 0xee6c(%rip)     # 0x18a88
movq 0x10(%rsp), %r12
je 0x9cf4
leaq 0x8688(%rip), %rsi      # 0x122b6
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rdx
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0x91b0
jmp 0x9c88
leaq 0x6(%rsp), %r12
cmpl $0x0, 0x18(%rsp)
jne 0x9c67
movl %r15d, %edi
callq 0xeef1
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 0xe47d(%rip), %rax      # 0x18110
movq (%r14,%rax), %rcx
leaq 0x857c(%rip), %rsi      # 0x1221a
leaq 0x70(%rsp), %rdi
testb $0x2, %bpl
jne 0x9cb6
leaq 0x30(%rsp), %rax
movq %rcx, %rdx
movq %rax, %rcx
jmp 0x9cbb
leaq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x91b0
callq 0xf1c1
movq %r12, %rdi
callq 0x9491
leaq 0x70(%rsp), %rdi
callq 0x94b3
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 0x85b3(%rip), %rsi      # 0x122ae
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x91b0
jmp 0x9c88