// File: /workspace/github_c_makefile_star2_O1/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, 0xf67d(%rip)     # 0x19a88
je 0xa41e
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 0xcca8
cmpl $0x3, %eax
je 0xa437
testl %eax, %eax
jne 0xa40d
callq 0xf442
cmpl $-0x1, %eax
je 0xa40d
movslq %eax, %r15
leaq 0x12aad(%rip), %r13     # 0x1cef8
cmpl $0x2, (%r13)
jne 0xa45b
leaq 0x9cb3(%rip), %r14      # 0x1410c
jmp 0xa482
leaq 0x12d3e(%rip), %rax     # 0x1d1a0
cmpl $0x182, (%rax)          # imm = 0x182
leaq 0x8e5e(%rip), %rax      # 0x132cd
leaq 0x9c96(%rip), %r14      # 0x1410c
cmoveq %rax, %r14
cmpb $-0x15, %r12b
cmoveq %rax, %r14
leaq 0x12d0f(%rip), %rax     # 0x1d198
movq (%rax), %rax
movsbq %r15b, %rcx
leaq (%rcx,%rax), %r12
addq $0x2, %r12
leaq 0x12cf1(%rip), %rax     # 0x1d190
movl (%rax), %esi
movl $0x1, %edi
movq %r12, %rdx
movl $0x4c, %ecx
callq 0xfad5
testq %rax, %rax
je 0xa4db
movl $0x1, 0x38(%rax)
subq 0x8(%rax), %r12
jne 0xa4fb
addq $0x10, %rax
leaq 0x9f7b(%rip), %rsi      # 0x1444b
movq %rsp, %rdi
movq %r14, %rdx
movq %rax, %rcx
jmp 0xa4f2
cmpl $0x2, (%r13)
jne 0xa514
leaq 0x8dfa(%rip), %rsi      # 0x132e3
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x91b0
jmp 0xa535
addq $0x10, %rax
leaq 0x8dce(%rip), %rsi      # 0x132d4
movq %rsp, %rdi
movq %r14, %rdx
movq %rax, %rcx
movq %r12, %r8
jmp 0xa52e
leaq 0x12c8d(%rip), %rax     # 0x1d1a8
movq (%rax), %rcx
leaq 0x8dca(%rip), %rsi      # 0x132ef
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x91b0
movq %rbx, %rdi
callq 0x97c1
leaq 0x12a24(%rip), %rax     # 0x1cf68
movl $0x2, %ebp
cmpl $0x3, (%rax)
jne 0xa40d
movq %rsp, %rdi
callq 0xc9d9
jmp 0xa40d