// File: /workspace/github_c_makefile_star2_O0/Nico01[P]obj2asm/odisasm.c
// Function: string_byte
int string_byte( byte, text, class )
    uchar   byte;
    char            *text;
    int             class;
{
    char            opcode[10];
    char            operand[50];
    int             size;
    int             mode;
    char            *format;

    class = class;                  /* Prevent unused variable warnings */

    size = byte & 0x01;
    if ( size == 1 && size_large ) {
        size = 2;
    }

    switch( byte ) {
        case 0xA4:
        case 0xA5:
            format = "%ses:[di],%s%s[si]";
            mode = 0;
            break;
        case 0xA6:
        case 0xA7:
            format = "%ses:[di],%s%s[si]";
            mode = 0;
            break;
        case 0xAA:
        case 0xAB:
            mode = 2;
            break;
        case 0xAC:
        case 0xAD:
            format = "%s%s[si]";
            mode = 1;
            break;
        case 0xAE:
        case 0xAF:
            mode = 2;
            break;
    }

    strcpy( opcode, text );

    if ( over_seg == -1 ) {
        switch( size ) {
            case 0:     strcat(opcode,"b");     break;
            case 1:     strcat(opcode,"w");     break;
            case 2:     strcat(opcode,"d");     break;
        }
        instr_opcode(opcode);
        return(1);
    } else {
        switch( mode ) {
            case 0:
                sprintf( operand, format, sz_text[size],
                                            sz_text[size], sregsc[over_seg] );
                break;
            case 1:
                sprintf( operand, format, sz_text[size], sregsc[over_seg] );
                break;
            case 2:                 /* No segment overide on */
                return( 0 );        /* SCAS instructions     */
        }
        instr_opcode( opcode );
        instr_operand( operand );
        return(1);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movzbl -0x5(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x54(%rbp)
cmpl $0x1, -0x54(%rbp)
jne 0x980b
cmpl $0x0, 0x1685a(%rip)     # 0x2005c
je 0x980b
movl $0x2, -0x54(%rbp)
movzbl -0x5(%rbp), %eax
addl $0xffffff5c, %eax       # imm = 0xFFFFFF5C
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0xb, %eax
ja 0x987f
movq -0x68(%rbp), %rax
leaq 0xd7da(%rip), %rcx      # 0x17004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xda6e(%rip), %rax      # 0x172a8
movq %rax, -0x60(%rbp)
movl $0x0, -0x58(%rbp)
jmp 0x987f
leaq 0xda5a(%rip), %rax      # 0x172a8
movq %rax, -0x60(%rbp)
movl $0x0, -0x58(%rbp)
jmp 0x987f
movl $0x2, -0x58(%rbp)
jmp 0x987f
leaq 0xda47(%rip), %rax      # 0x172b2
movq %rax, -0x60(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x987f
movl $0x2, -0x58(%rbp)
leaq -0x1e(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9060
cmpl $-0x1, 0x131e5(%rip)    # 0x1ca78
jne 0x98fe
movl -0x54(%rbp), %eax
movl %eax, -0x6c(%rbp)
testl %eax, %eax
je 0x98b5
jmp 0x98a1
movl -0x6c(%rbp), %eax
subl $0x1, %eax
je 0x98c7
jmp 0x98ab
movl -0x6c(%rbp), %eax
subl $0x2, %eax
je 0x98d9
jmp 0x98e9
leaq -0x1e(%rbp), %rdi
leaq 0xd918(%rip), %rsi      # 0x171d8
callq 0x9180
jmp 0x98e9
leaq -0x1e(%rbp), %rdi
leaq 0xe945(%rip), %rsi      # 0x18217
callq 0x9180
jmp 0x98e9
leaq -0x1e(%rbp), %rdi
leaq 0xe75d(%rip), %rsi      # 0x18041
callq 0x9180
leaq -0x1e(%rbp), %rdi
callq 0x9670
movl $0x1, -0x4(%rbp)
jmp 0x99b3
movl -0x58(%rbp), %eax
movl %eax, -0x70(%rbp)
testl %eax, %eax
je 0x991e
jmp 0x990a
movl -0x70(%rbp), %eax
subl $0x1, %eax
je 0x995f
jmp 0x9914
movl -0x70(%rbp), %eax
subl $0x2, %eax
je 0x9991
jmp 0x999a
leaq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
movslq -0x54(%rbp), %rcx
leaq 0x12d0f(%rip), %rax     # 0x1c640
movq (%rax,%rcx,8), %rdx
movslq -0x54(%rbp), %rcx
leaq 0x12d00(%rip), %rax     # 0x1c640
movq (%rax,%rcx,8), %rcx
movslq 0x1312d(%rip), %r8      # 0x1ca78
leaq 0x128de(%rip), %rax     # 0x1c230
movq (%rax,%r8,8), %r8
movb $0x0, %al
callq 0x9190
jmp 0x999a
leaq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
movslq -0x54(%rbp), %rcx
leaq 0x12cce(%rip), %rax     # 0x1c640
movq (%rax,%rcx,8), %rdx
movslq 0x130fb(%rip), %rcx     # 0x1ca78
leaq 0x128ac(%rip), %rax     # 0x1c230
movq (%rax,%rcx,8), %rcx
movb $0x0, %al
callq 0x9190
jmp 0x999a
movl $0x0, -0x4(%rbp)
jmp 0x99b3
leaq -0x1e(%rbp), %rdi
callq 0x9670
leaq -0x50(%rbp), %rdi
callq 0x96b0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)