// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/disasm.c
// Function: bitaddr_memonic
void bitaddr_memonic(int aValue, char *aBuffer)
{
    char regname[16];

    if (aValue > 0x7f)
    {
        switch ((aValue & 0xf8) - 0x80)
        {
        case REG_ACC:
            strcpy(regname, "ACC"); 
            break;
        case REG_B:
            strcpy(regname, "B");
            break;
        case REG_PSW:
            strcpy(regname, "PSW");
            break;
        case REG_SP:
            strcpy(regname, "SP");
            break;
        case REG_DPL:
            strcpy(regname, "DPL");
            break;
        case REG_DPH:
            strcpy(regname, "DPH");
            break;
        case REG_P0:
            strcpy(regname, "P0");
            break;
        case REG_P1:
            strcpy(regname, "P1");
            break;
        case REG_P2:
            strcpy(regname, "P2");
            break;
        case REG_P3:
            strcpy(regname, "P3");
            break;
        case REG_IP:
            strcpy(regname, "IP");
            break;
        case REG_IE:
            strcpy(regname, "IE");
            break;
        case REG_TMOD:
            strcpy(regname, "TMOD");
            break;
        case REG_TCON:
            strcpy(regname, "TCON");
            break;
        case REG_TH0:
            strcpy(regname, "TH0");
            break;
        case REG_TL0:
            strcpy(regname, "TL0");
            break;
        case REG_TH1:
            strcpy(regname, "TH1");
            break;
        case REG_TL1:
            strcpy(regname, "TL1");
            break;
        case REG_SCON:
            strcpy(regname, "SCON");
            break;
        case REG_PCON:
            strcpy(regname, "PCON");
            break;
        default:
            sprintf(regname, "%02Xh",(aValue & 0xF8));
            break;
        }
    }
    else
    {
        sprintf(regname, "%02Xh", aValue >> 3);
    }

    sprintf(aBuffer, "%s.%d", regname, aValue & 7);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x24(%rbp)
movq %rsi, -0x30(%rbp)
cmpl $0x7f, -0x24(%rbp)
jle 0x7853
movl -0x24(%rbp), %eax
andl $0xf8, %eax
addl $-0x80, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x70, %eax
ja 0x7836
movq -0x38(%rbp), %rax
leaq 0xbc35(%rip), %rcx      # 0x132d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x20(%rbp), %rdi
leaq 0xab59(%rip), %rsi      # 0x12208
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xc1fb(%rip), %rsi      # 0x138bf
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xac2d(%rip), %rsi      # 0x12306
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xad03(%rip), %rsi      # 0x123f1
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab4b(%rip), %rsi      # 0x1224e
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab25(%rip), %rsi      # 0x1223d
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab6f(%rip), %rsi      # 0x1229c
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab61(%rip), %rsi      # 0x122a3
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab6f(%rip), %rsi      # 0x122c6
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab61(%rip), %rsi      # 0x122cd
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xab0a(%rip), %rsi      # 0x1228b
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xaae4(%rip), %rsi      # 0x1227a
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xad24(%rip), %rsi      # 0x124cf
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xacac(%rip), %rsi      # 0x1246c
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xaca0(%rip), %rsi      # 0x12475
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xacd0(%rip), %rsi      # 0x124b7
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xac84(%rip), %rsi      # 0x1247d
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xacb4(%rip), %rsi      # 0x124bf
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xabc1(%rip), %rsi      # 0x123de
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
leaq 0xaac1(%rip), %rsi      # 0x122f0
callq 0x4030
jmp 0x7851
leaq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
andl $0xf8, %edx
leaq 0xbdeb(%rip), %rsi      # 0x13635
movb $0x0, %al
callq 0x4160
jmp 0x786b
leaq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
sarl $0x3, %edx
leaq 0xbdd1(%rip), %rsi      # 0x13635
movb $0x0, %al
callq 0x4160
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %ecx
andl $0x7, %ecx
leaq 0xbc18(%rip), %rsi      # 0x13494
xorl %eax, %eax
leaq -0x20(%rbp), %rdx
callq 0x4160
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x789f
addq $0x40, %rsp
popq %rbp
retq
callq 0x4080
nopw %cs:(%rax,%rax)