LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: reti
static int reti(struct em8051 *aCPU)
{
    if (aCPU->mInterruptActive)
    {
        if (aCPU->except_cb)
        {
            int hi = 0;
            if (aCPU->mInterruptActive > 1)
                hi = 1;
            if (aCPU->int_a[hi] != aCPU->mSFR[REG_ACC])
                aCPU->except_cb(aCPU, EXCEPTION_IRET_ACC_MISMATCH);
            if (aCPU->int_sp[hi] != aCPU->mSFR[REG_SP])
                aCPU->except_cb(aCPU, EXCEPTION_IRET_SP_MISMATCH);    
            if ((aCPU->int_psw[hi] & (PSWMASK_OV | PSWMASK_RS0 | PSWMASK_RS1 | PSWMASK_AC | PSWMASK_C)) !=                 
                (aCPU->mSFR[REG_PSW] & (PSWMASK_OV | PSWMASK_RS0 | PSWMASK_RS1 | PSWMASK_AC | PSWMASK_C)))
                aCPU->except_cb(aCPU, EXCEPTION_IRET_PSW_MISMATCH);
        }

        if (aCPU->mInterruptActive & 2)
            aCPU->mInterruptActive &= ~2;
        else
            aCPU->mInterruptActive = 0;
    }

    PC = pop_from_stack(aCPU) << 8;
    PC |= pop_from_stack(aCPU);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1068(%rax)
je 0xd47d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1040(%rax)
je 0xd446
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x1068(%rax)
jle 0xd39a
movl $0x1, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0x106c(%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %ecx
cmpl %ecx, %eax
je 0xd3cf
movq -0x8(%rbp), %rax
movq 0x1040(%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq *%rax
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0x107c(%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
je 0xd404
movq -0x8(%rbp), %rax
movq 0x1040(%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq *%rax
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl 0x1074(%rax,%rcx,4), %eax
andl $0xdc, %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x50(%rcx), %ecx
andl $0xdc, %ecx
cmpl %ecx, %eax
je 0xd444
movq -0x8(%rbp), %rax
movq 0x1040(%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq *%rax
jmp 0xd446
movq -0x8(%rbp), %rax
movl 0x1068(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xd46d
movq -0x8(%rbp), %rax
movl 0x1068(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x1068(%rax)
jmp 0xd47b
movq -0x8(%rbp), %rax
movl $0x0, 0x1068(%rax)
jmp 0xd47d
movq -0x8(%rbp), %rdi
callq 0x11830
movl %eax, %ecx
shll $0x8, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rdi
callq 0x11830
movl %eax, %ecx
movq -0x8(%rbp), %rax
orl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: rlc_a
static int rlc_a(struct em8051 *aCPU)
{
    int c = CARRY;
    int newc = ACC >> 7;
    ACC = (ACC << 1) | c;
    PSW = (PSW & ~PSWMASK_C) | (newc << PSW_C);
    PC++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
sarl $0x7, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
shll %eax
orl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl -0x10(%rbp), %ecx
shll $0x7, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x50(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: addc_a_imm
static int addc_a_imm(struct em8051 *aCPU)
{
    int carry = CARRY;
    add_solve_flags(aCPU, ACC, OPERAND1, carry);
    ACC += OPERAND1 + carry;
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
movl -0xc(%rbp), %ecx
callq 0x11670
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
addl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: addc_a_mem
static int addc_a_mem(struct em8051 *aCPU)
{
    int carry = CARRY;
    int value = read_mem(aCPU, OPERAND1);
    add_solve_flags(aCPU, ACC, value, carry);
    ACC += value + carry;
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
callq 0x117b0
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x11670
movl -0x10(%rbp), %edx
addl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: addc_a_indir_rx
static int addc_a_indir_rx(struct em8051 *aCPU)
{
    int carry = CARRY;
    int address = INDIR_RX_ADDRESS;
    if (address > 0x7f)
    {
        int value = BAD_VALUE;
        if (aCPU->mUpperData)
        {
            value = aCPU->mUpperData[address - 0x80];
        }

        add_solve_flags(aCPU, ACC, value, carry);
        ACC += value + carry;
    }
    else
    {
        add_solve_flags(aCPU, ACC, aCPU->mLowerData[address], carry);
        ACC += aCPU->mLowerData[address] + carry;
    }
    PC++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
addl $0x0, %edx
movq -0x8(%rbp), %rsi
movl 0x8(%rsi), %esi
subl $0x1, %esi
andl %esi, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x50(%rdx), %edx
andl $0x18, %edx
sarl $0x3, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
cmpl $0x7f, -0x10(%rbp)
jle 0xd77a
movl $0x77, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xd746
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x10(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movl -0x14(%rbp), %edx
movl -0xc(%rbp), %ecx
callq 0x11670
movl -0x14(%rbp), %edx
addl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x60(%rax)
jmp 0xd7c6
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edx
movl -0xc(%rbp), %ecx
callq 0x11670
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edx
addl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
addl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: jc_offset
static int jc_offset(struct em8051 *aCPU)
{
    if (PSW & PSWMASK_C)
    {
        PC += (signed char)OPERAND1 + 2;
    }
    else
    {
        PC += 2;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xd831
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rax
addl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
jmp 0xd83e
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: orl_mem_a
static int orl_mem_a(struct em8051 *aCPU)
{
    int address = OPERAND1;
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80] |= ACC;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address] |= ACC;
    }
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xd8d6
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xd8d4
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xd8f7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: orl_mem_imm
static int orl_mem_imm(struct em8051 *aCPU)
{
    int address = OPERAND1;
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80] |= OPERAND2;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address] |= OPERAND2;
    }
    
    PC += 3;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xd9ae
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xd9ac
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xd9e7
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: orl_a_mem
static int orl_a_mem(struct em8051 *aCPU)
{
    int value = read_mem(aCPU, OPERAND1);
    ACC |= value;
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
callq 0x117b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: orl_a_indir_rx
static int orl_a_indir_rx(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    if (address > 0x7f)
    {
        int value = BAD_VALUE;
        if (aCPU->mUpperData)
        {
            value = aCPU->mUpperData[address - 0x80];
        }

        ACC |= value;
    }
    else
    {
        ACC |= aCPU->mLowerData[address];
    }

    PC++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
addl $0x0, %edx
movq -0x8(%rbp), %rsi
movl 0x8(%rsi), %esi
subl $0x1, %esi
andl %esi, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x50(%rdx), %edx
andl $0x18, %edx
sarl $0x3, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xdb61
movl $0x77, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xdb4b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x60(%rax)
jmp 0xdb82
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: anl_mem_a
static int anl_mem_a(struct em8051 *aCPU)
{
    int address = OPERAND1;
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80] &= ACC;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address] &= ACC;
    }
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xdc96
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xdc94
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xdcb7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: jz_offset
static int jz_offset(struct em8051 *aCPU)
{
    if (!ACC)
    {
        PC += (signed char)OPERAND1 + 2;
    }
    else
    {
        PC += 2;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
cmpb $0x0, 0x60(%rax)
jne 0xdfa9
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rax
addl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
jmp 0xdfb6
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: jnz_offset
static int jnz_offset(struct em8051 *aCPU)
{
    if (ACC)
    {
        PC += (signed char)OPERAND1 + 2;
    }
    else
    {
        PC += 2;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
cmpb $0x0, 0x60(%rax)
je 0xe359
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rax
addl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
jmp 0xe366
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_mem_imm
static int mov_mem_imm(struct em8051 *aCPU)
{
    int address = OPERAND1;
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80] = OPERAND2;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address] = OPERAND2;
    }

    PC += 3;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xe647
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xe645
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xe679
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_indir_rx_imm
static int mov_indir_rx_imm(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    int value = OPERAND1;
    if (address > 0x7f)
    {
        if (aCPU->mUpperData)
        {
            aCPU->mUpperData[address - 0x80] = value;
        }
    }
    else
    {
        aCPU->mLowerData[address] = value;
    }

    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
addl $0x0, %edx
movq -0x8(%rbp), %rsi
movl 0x8(%rsi), %esi
subl $0x1, %esi
andl %esi, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x50(%rdx), %edx
andl $0x18, %edx
sarl $0x3, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xe74e
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xe74c
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xe762
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: movc_a_indir_a_pc
static int movc_a_indir_a_pc(struct em8051 *aCPU)
{
    int address = PC + 1 + ACC;
    ACC = aCPU->mCodeMem[address & (aCPU->mCodeMemSize - 1)];
    PC++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
addl $0x1, %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: div_ab
static int div_ab(struct em8051 *aCPU)
{
    int a = ACC;
    int b = aCPU->mSFR[REG_B];
    int res;
    PSW &= ~(PSWMASK_C|PSWMASK_OV);
    if (b)
    {
        res = a/b;
        b = a % b;
        a = res;
    }
    else
    {
        PSW |= PSWMASK_OV;
    }
    ACC = a;
    aCPU->mSFR[REG_B] = b;
    PC++;
    return 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x70(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
andl $0xffffff7b, %ecx       # imm = 0xFFFFFF7B
movb %cl, 0x50(%rax)
cmpl $0x0, -0x10(%rbp)
je 0xea0d
movl -0xc(%rbp), %eax
cltd
idivl -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
cltd
idivl -0x10(%rbp)
movl %edx, -0x10(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xea1f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
orl $0x4, %ecx
movb %cl, 0x50(%rax)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x70(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl $0x3, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_mem_mem
static int mov_mem_mem(struct em8051 *aCPU)
{
    int address1 = OPERAND2;
    int value = read_mem(aCPU, OPERAND1);

    if (address1 > 0x7f)
    {
        aCPU->mSFR[address1 - 0x80] = value;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address1);
    }
    else
    {
        aCPU->mLowerData[address1] = value;
    }

    PC += 3;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
callq 0x117b0
movl %eax, -0x10(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xeb09
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xeb07
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xeb1d
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_dptr_imm
static int mov_dptr_imm(struct em8051 *aCPU)
{
    aCPU->mSFR[REG_DPH] = OPERAND1;
    aCPU->mSFR[REG_DPL] = OPERAND2;
    PC += 3;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_bitaddr_c
static int mov_bitaddr_c(struct em8051 *aCPU) 
{
    int address = OPERAND1;
    int carry = CARRY;
    if (address > 0x7f)
    {
        // Data sheet does not explicitly say that the modification source
        // is read from output latch, but we'll assume that is what happens.
        int bit = address & 7;
        int bitmask = (1 << bit);
        address &= 0xf8;        
        aCPU->mSFR[address - 0x80] = (aCPU->mSFR[address - 0x80] & ~bitmask) | (carry << bit);
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        int bit = address & 7;
        int bitmask = (1 << bit);
        address >>= 3;
        address += 0x20;
        aCPU->mLowerData[address] = (aCPU->mLowerData[address] & ~bitmask) | (carry << bit);
    }
    PC += 2;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0x10(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xee6e
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
andl $0xf8, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xee6c
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xeecb
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
sarl $0x3, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x20, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl -0x20(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl -0x10(%rbp), %edx
movl -0x1c(%rbp), %ecx
shll %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: movc_a_indir_a_dptr
static int movc_a_indir_a_dptr(struct em8051 *aCPU)
{
    int address = ((aCPU->mSFR[REG_DPH] << 8) | (aCPU->mSFR[REG_DPL] << 0)) + ACC;
    ACC = aCPU->mCodeMem[address & (aCPU->mCodeMemSize - 1)];
    PC++;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x3(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x0, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: subb_a_imm
static int subb_a_imm(struct em8051 *aCPU)
{
    int carry = CARRY;
    sub_solve_flags(aCPU, ACC, OPERAND1 + carry);
    ACC -= OPERAND1 + carry;
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
addl -0xc(%rbp), %edx
callq 0x11710
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
addl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: subb_a_mem
static int subb_a_mem(struct em8051 *aCPU) 
{
    int carry = CARRY;
    int value = read_mem(aCPU, OPERAND1) + carry;
    sub_solve_flags(aCPU, ACC, value);
    ACC -= value;

    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
callq 0x117b0
addl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movl -0x10(%rbp), %edx
callq 0x11710
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: subb_a_indir_rx
static int subb_a_indir_rx(struct em8051 *aCPU)
{
    int carry = CARRY;
    int address = INDIR_RX_ADDRESS;
    if (address > 0x7f)
    {
        int value = BAD_VALUE;
        if (aCPU->mUpperData)
        {
            value = aCPU->mUpperData[address - 0x80];
        }

        sub_solve_flags(aCPU, ACC, value);
        ACC -= value;
    }
    else
    {
        sub_solve_flags(aCPU, ACC, aCPU->mLowerData[address] + carry);
        ACC -= aCPU->mLowerData[address] + carry;
    }
    PC++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
sarl $0x7, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
addl $0x0, %edx
movq -0x8(%rbp), %rsi
movl 0x8(%rsi), %esi
subl $0x1, %esi
andl %esi, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x50(%rdx), %edx
andl $0x18, %edx
sarl $0x3, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
cmpl $0x7f, -0x10(%rbp)
jle 0xf194
movl $0x77, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xf166
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x10(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movl -0x14(%rbp), %edx
callq 0x11710
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x60(%rax)
jmp 0xf1e0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edx
addl -0xc(%rbp), %edx
callq 0x11710
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edx
addl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_c_bitaddr
static int mov_c_bitaddr(struct em8051 *aCPU) 
{
    int address = OPERAND1;
    if (address > 0x7f)
    {
        int bit = address & 7;
        int bitmask = (1 << bit);
        int value;
        address &= 0xf8;        
        if (aCPU->sfrread)
            value = aCPU->sfrread(aCPU, address);
        else
            value = aCPU->mSFR[address - 0x80];

        value = (value & bitmask) ? 1 : 0;

        PSW = (PSW & ~PSWMASK_C) | (PSWMASK_C * value);
    }
    else
    {
        int bit = address & 7;
        int bitmask = (1 << bit);
        int value;
        address >>= 3;
        address += 0x20;
        value = (aCPU->mLowerData[address] & bitmask) ? 1 : 0;
        PSW = (PSW & ~PSWMASK_C) | (PSWMASK_C * value);
    }

    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xf47e
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
andl $0xf8, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1048(%rax)
je 0xf425
movq -0x8(%rbp), %rax
movq 0x1048(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
movl %eax, -0x18(%rbp)
jmp 0xf440
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
andl -0x14(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl -0x18(%rbp), %ecx
shll $0x7, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x50(%rax)
jmp 0xf4ef
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
sarl $0x3, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x20, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
andl -0x20(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl -0x24(%rbp), %ecx
shll $0x7, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x50(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: inc_dptr
static int inc_dptr(struct em8051 *aCPU)
{
    aCPU->mSFR[REG_DPL]++;
    if (!aCPU->mSFR[REG_DPL])
        aCPU->mSFR[REG_DPH]++;
    PC++;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x2(%rax), %cl
addb $0x1, %cl
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
cmpb $0x0, 0x2(%rax)
jne 0xf548
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x3(%rax), %cl
addb $0x1, %cl
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mul_ab
static int mul_ab(struct em8051 *aCPU)
{
    int a = ACC;
    int b = aCPU->mSFR[REG_B];
    int res = a*b;
    ACC = res & 0xff;
    aCPU->mSFR[REG_B] = res >> 8;
    PSW &= ~(PSWMASK_C|PSWMASK_OV);
    if (aCPU->mSFR[REG_B])
        PSW |= PSWMASK_OV;
    PC++;
    return 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x70(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
movl -0x14(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
andl $0xffffff7b, %ecx       # imm = 0xFFFFFF7B
movb %cl, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
cmpb $0x0, 0x70(%rax)
je 0xf5ed
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
orl $0x4, %ecx
movb %cl, 0x50(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl $0x3, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_indir_rx_mem
static int mov_indir_rx_mem(struct em8051 *aCPU)
{
    int address1 = INDIR_RX_ADDRESS;
    int value = read_mem(aCPU, OPERAND1);
    if (address1 > 0x7f)
    {
        if (aCPU->mUpperData)
        {
            aCPU->mUpperData[address1 - 0x80] = value;
        }
    }
    else
    {
        aCPU->mLowerData[address1] = value;
    }
    PC += 2;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
addl $0x0, %edx
movq -0x8(%rbp), %rsi
movl 0x8(%rsi), %esi
subl $0x1, %esi
andl %esi, %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x50(%rdx), %edx
andl $0x18, %edx
sarl $0x3, %edx
shll $0x3, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
callq 0x117b0
movl %eax, -0x10(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xf6cb
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xf6c9
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xf6df
movl -0x10(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: cpl_bitaddr
static int cpl_bitaddr(struct em8051 *aCPU)
{
    int address = aCPU->mCodeMem[(PC + 1) & (aCPU->mCodeMemSize - 1)];
    if (address > 0x7f)
    {
        // Data sheet does not explicitly say that the modification source
        // is read from output latch, but we'll assume that is what happens.
        int bit = address & 7;
        int bitmask = (1 << bit);
        address &= 0xf8;        
        aCPU->mSFR[address - 0x80] ^= bitmask;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        int bit = address & 7;
        int bitmask = (1 << bit);
        address >>= 3;
        address += 0x20;
        aCPU->mLowerData[address] ^= bitmask;
    }
    PC += 2;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xf92e
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
andl $0xf8, %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xf92c
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xf96e
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
sarl $0x3, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x20, %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %esi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: cjne_a_imm_offset
static int cjne_a_imm_offset(struct em8051 *aCPU)
{
    int value = OPERAND1;

    if (ACC < value)
    {
        PSW |= PSWMASK_C;
    }
    else
    {
        PSW &= ~PSWMASK_C;
    }

    if (ACC != value)
    {
        PC += (signed char)OPERAND2 + 3;
    }
    else
    {
        PC += 3;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0xfa17
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x50(%rax)
jmp 0xfa2c
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x50(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
cmpl -0xc(%rbp), %eax
je 0xfa70
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x38(%rcx), %ecx
addl $0x2, %ecx
movq -0x8(%rbp), %rdx
movl 0x8(%rdx), %edx
subl $0x1, %edx
andl %edx, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
addl $0x3, %ecx
movq -0x8(%rbp), %rax
addl 0x38(%rax), %ecx
movl %ecx, 0x38(%rax)
jmp 0xfa7d
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)