// File: /workspace/github_c_makefile_star2_O3/Nico01[P]obj2asm/odisasm.c
// Function: disp8
int disp8( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    int             dcheck;
    char            line[60];
    char            *short_text;
    dword   offset;
    dword   dest;
    PUB_T           *pub_rec;

    if ( over_seg != -1 ) {             /* No segment overide allowed */
        return( 0 );
    }

    dcheck = data_check(1);

    if ( dcheck != NORMAL && dcheck != BAD ) {
        return( 0 );
    }

    if ( check_getc( &offset ) ) {
        return( 0 );
    }

    if ( offset == 0xFFFFFFFFL ) {      /* This would generate a label in  */
        return( 0 );                    /* the middle of the jmp statement */
    }                                   /* thereby preventing it anyway    */

    /*
    ** Special 'SHORT' for small jumps 
    */
    short_text = "";
    if ( compatibility != 2 ) {
        if ( byte == 0xEB || segment_mode == 386 ) {
            short_text = "short ";
        }
    }

    dest = inst_offset + (signed char)offset + 2;

    pub_rec = check_public( 1, segment, dest, 'L' );

    if ( pub_rec ) {
        pub_rec->type = NEAR;
        offset = dest - pub_rec->offset;
        if ( offset > 0 ) {
            sprintf( line, "%s%s + 0%04lXh", 
                                short_text, pub_rec->name, offset );
        } else {
            sprintf( line, "%s%s", short_text, pub_rec->name );
        }
    } else {
        if ( compatibility == 2 ) {
            sprintf( text, " %s.0%04lXh", short_text, offset );
        } else {
            sprintf( text, "%s[%s:0%04lXh]", short_text, cseg_name, offset );
        }
    }

    instr_opcode( text );
    instr_operand( line );

    byte = byte;               /* Prevent unused variable warnings */
    class = class;
    return( 2 );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
xorl %ebp, %ebp
cmpl $-0x1, 0xf671(%rip)     # 0x19a88
je 0xa42a
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movl %edi, %r12d
movl $0x1, %edi
callq 0xcd14
cmpl $0x3, %eax
je 0xa443
testl %eax, %eax
jne 0xa419
callq 0xf47e
cmpl $-0x1, %eax
je 0xa419
movslq %eax, %r15
leaq 0x12aa1(%rip), %r13     # 0x1cef8
cmpl $0x2, (%r13)
jne 0xa467
leaq 0x9ca7(%rip), %r14      # 0x1410c
jmp 0xa48e
leaq 0x12d32(%rip), %rax     # 0x1d1a0
cmpl $0x182, (%rax)          # imm = 0x182
leaq 0x8e52(%rip), %rax      # 0x132cd
leaq 0x9c8a(%rip), %r14      # 0x1410c
cmoveq %rax, %r14
cmpb $-0x15, %r12b
cmoveq %rax, %r14
leaq 0x12d03(%rip), %rax     # 0x1d198
movq (%rax), %rax
movsbq %r15b, %rcx
leaq (%rcx,%rax), %r12
addq $0x2, %r12
leaq 0x12ce5(%rip), %rax     # 0x1d190
movl (%rax), %esi
movl $0x1, %edi
movq %r12, %rdx
movl $0x4c, %ecx
callq 0xfafa
testq %rax, %rax
je 0xa4e7
movl $0x1, 0x38(%rax)
subq 0x8(%rax), %r12
jne 0xa507
addq $0x10, %rax
leaq 0x9f6f(%rip), %rsi      # 0x1444b
movq %rsp, %rdi
movq %r14, %rdx
movq %rax, %rcx
jmp 0xa4fe
cmpl $0x2, (%r13)
jne 0xa520
leaq 0x8dee(%rip), %rsi      # 0x132e3
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x91b0
jmp 0xa541
addq $0x10, %rax
leaq 0x8dc2(%rip), %rsi      # 0x132d4
movq %rsp, %rdi
movq %r14, %rdx
movq %rax, %rcx
movq %r12, %r8
jmp 0xa53a
leaq 0x12c81(%rip), %rax     # 0x1d1a8
movq (%rax), %rcx
leaq 0x8dbe(%rip), %rsi      # 0x132ef
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x91b0
movq %rbx, %rdi
callq 0x97c1
leaq 0x12a18(%rip), %rax     # 0x1cf68
movl $0x2, %ebp
cmpl $0x3, (%rax)
jne 0xa419
movq %rsp, %rdi
callq 0xca45
jmp 0xa419