LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: cjne_a_mem_offset
static int cjne_a_mem_offset(struct em8051 *aCPU)
{
    int address = OPERAND1;
    int value;
    if (address > 0x7f)
    {
        if (aCPU->sfrread)
            value = aCPU->sfrread(aCPU, address);
        else
            value = aCPU->mSFR[address - 0x80];
    }
    else
    {
        value = aCPU->mLowerData[address];
    }  

    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
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 0xfb0d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1048(%rax)
je 0xfaf0
movq -0x8(%rbp), %rax
movq 0x1048(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
movl %eax, -0x10(%rbp)
jmp 0xfb0b
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
jmp 0xfb20
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
cmpl -0x10(%rbp), %eax
jge 0xfb48
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x50(%rax)
jmp 0xfb5d
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 -0x10(%rbp), %eax
je 0xfba1
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 0xfbae
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: cjne_indir_rx_imm_offset
static int cjne_indir_rx_imm_offset(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    int value1 = BAD_VALUE;
    int value2 = OPERAND1;
    if (address > 0x7f)
    {
        if (aCPU->mUpperData)
        {
            value1 = aCPU->mUpperData[address - 0x80];
        }
    }
    else
    {
        value1 = aCPU->mLowerData[address];
    }  

    if (value1 < value2)
    {
        PSW |= PSWMASK_C;
    }
    else
    {
        PSW &= ~PSWMASK_C;
    }

    if (value1 != value2)
    {
        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 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)
movl $0x77, -0x10(%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, -0x14(%rbp)
cmpl $0x7f, -0xc(%rbp)
jle 0xfc74
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xfc72
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)
jmp 0xfc87
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xfca6
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x50(%rax)
jmp 0xfcbb
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x50(%rax)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0xfcf6
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 0xfd03
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: push_mem
static int push_mem(struct em8051 *aCPU)
{
    int value = read_mem(aCPU, OPERAND1);
    push_to_stack(aCPU, value);   
    PC += 2;
    return 1;
}

// 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)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xaef0
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: xch_a_mem
static int xch_a_mem(struct em8051 *aCPU)
{
    int address = OPERAND1;
    int value = read_mem(aCPU, OPERAND1);
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80] = ACC;
        ACC = value;
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address] = ACC;
        ACC = value;
    }
    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)
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 0xffaf
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0xffad
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0xffd9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
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
nop
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: xch_a_indir_rx
static int xch_a_indir_rx(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    if (address > 0x7f)
    {
        int value;
        if (aCPU->mUpperData)
        {
            value = aCPU->mUpperData[address - 0x80];
            aCPU->mUpperData[address - 0x80] = ACC;
            ACC = value;
        }
    }
    else
    {
        int value = aCPU->mLowerData[address];
        aCPU->mLowerData[address] = ACC;
        ACC = value;
    }
    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 0x100a8
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x100a6
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)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
jmp 0x100e5
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
movb %al, %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
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: pop_mem
static int pop_mem(struct em8051 *aCPU)
{
    int address = OPERAND1;
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80] = pop_from_stack(aCPU);
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address] = pop_from_stack(aCPU);
    }

    PC += 2;
    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 0x1017f
movq -0x8(%rbp), %rdi
callq 0x11830
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 0x1017d
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0x10199
movq -0x8(%rbp), %rdi
callq 0x11830
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 %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: da_a
static int da_a(struct em8051 *aCPU)
{
    // data sheets for this operation are a bit unclear..
    // - should AC (or C) ever be cleared?
    // - should this be done in two steps?

    int result = ACC;
    if ((result & 0xf) > 9 || (PSW & PSWMASK_AC))
        result += 0x6;
    if ((result & 0xff0) > 0x90 || (PSW & PSWMASK_C))
        result += 0x60;
    if (result > 0x99)
        PSW |= PSWMASK_C;
    ACC = result;

 /*
    // this is basically what intel datasheet says the op should do..
    int adder = 0;
    if (ACC & 0xf > 9 || PSW & PSWMASK_AC)
        adder = 6;
    if (ACC & 0xf0 > 0x90 || PSW & PSWMASK_C)
        adder |= 0x60;
    adder += aCPU[REG_ACC];
    if (adder > 0x99)
        PSW |= PSWMASK_C;
    aCPU[REG_ACC] = adder;
*/
    PC++;
    return 0;
}

// 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)
movl -0xc(%rbp), %eax
andl $0xf, %eax
cmpl $0x9, %eax
jg 0x10326
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1032f
movl -0xc(%rbp), %eax
addl $0x6, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0xff0, %eax            # imm = 0xFF0
cmpl $0x90, %eax
jg 0x10354
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1035d
movl -0xc(%rbp), %eax
addl $0x60, %eax
movl %eax, -0xc(%rbp)
cmpl $0x99, -0xc(%rbp)
jle 0x1037b
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x50(%rax)
movl -0xc(%rbp), %eax
movb %al, %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)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: djnz_mem_offset
static int djnz_mem_offset(struct em8051 *aCPU)
{
    int address = OPERAND1;
    int value;
    if (address > 0x7f)
    {
        aCPU->mSFR[address - 0x80]--;
        value = aCPU->mSFR[address - 0x80];
        if (aCPU->sfrwrite)
            aCPU->sfrwrite(aCPU, address);
    }
    else
    {
        aCPU->mLowerData[address]--;
        value = aCPU->mLowerData[address];
    }
    if (value)
    {
        PC += (signed char)OPERAND2 + 3;
    }
    else
    {
        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 0x10435
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
addb $-0x1, %dl
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1050(%rax)
je 0x10433
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0x1045d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movb (%rax,%rcx), %dl
addb $-0x1, %dl
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x10496
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 0x104a3
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: xchd_a_indir_rx
static int xchd_a_indir_rx(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    if (address > 0x7f)
    {
        int value;
        if (aCPU->mUpperData)
        {
            value = aCPU->mUpperData[address - 0x80];
            aCPU->mUpperData[address - 0x80] = (aCPU->mUpperData[address - 0x80] & 0xf0) | (ACC & 0x0f);
            ACC = (ACC & 0xf0) | (value & 0x0f);
        }
    }
    else
    {
        int value = aCPU->mLowerData[address];
        aCPU->mLowerData[address] = (aCPU->mLowerData[address] & 0x0f) | (ACC & 0x0f);
        ACC = (ACC & 0xf0) | (value & 0x0f);
    }
    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 0x105ab
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x105a9
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)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0xf0, %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %ecx
andl $0xf, %ecx
orl %ecx, %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)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
andl $0xf0, %eax
movl -0x10(%rbp), %ecx
andl $0xf, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
jmp 0x10619
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %ecx
andl $0xf, %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
movq 0x30(%rax), %rax
movzbl 0x60(%rax), %eax
andl $0xf0, %eax
movl -0x14(%rbp), %ecx
andl $0xf, %ecx
orl %ecx, %eax
movb %al, %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
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: movx_a_indir_dptr
static int movx_a_indir_dptr(struct em8051 *aCPU)
{
    int dptr = (aCPU->mSFR[REG_DPH] << 8) | aCPU->mSFR[REG_DPL];
    if (aCPU->xread)
    {
        ACC = aCPU->xread(aCPU, dptr);
    }
    else
    {
        if (aCPU->mExtData)
            ACC = aCPU->mExtData[dptr & (aCPU->mExtDataSize - 1)];
    }
    PC++;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
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
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1058(%rax)
je 0x1068d
movq -0x8(%rbp), %rax
movq 0x1058(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
jmp 0x106c2
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x106c0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rdx
movl 0x18(%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)
jmp 0x106c2
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %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: movx_a_indir_rx
static int movx_a_indir_rx(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    if (aCPU->xread)
    {
        ACC = aCPU->xread(aCPU, address);
    }
    else
    {
        if (aCPU->mExtData)
            ACC = aCPU->mExtData[address & (aCPU->mExtDataSize - 1)];
    }

    PC++;
    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), %rax
cmpq $0x0, 0x1058(%rax)
je 0x1076d
movq -0x8(%rbp), %rax
movq 0x1058(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
jmp 0x107a2
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x107a0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rdx
movl 0x18(%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)
jmp 0x107a2
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %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: mov_a_mem
static int mov_a_mem(struct em8051 *aCPU)
{
    // mov a,acc is not a valid instruction
    int address = OPERAND1;
    int value = read_mem(aCPU, address);
    if (REG_ACC == address - 0x80)
        if (aCPU->except_cb)
            aCPU->except_cb(aCPU, EXCEPTION_ACC_TO_A);
    ACC = value;

    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)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x117b0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movl $0x60, %eax
cmpl %ecx, %eax
jne 0x1086a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1040(%rax)
je 0x10868
movq -0x8(%rbp), %rax
movq 0x1040(%rax), %rax
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq *%rax
jmp 0x1086a
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
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
nop
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_a_indir_rx
static int mov_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 0x1092d
movl $0x77, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x1091b
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), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x60(%rax)
jmp 0x10947
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %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: movx_indir_dptr_a
static int movx_indir_dptr_a(struct em8051 *aCPU)
{
    int dptr = (aCPU->mSFR[REG_DPH] << 8) | aCPU->mSFR[REG_DPL];
    if (aCPU->xwrite)
    {
        aCPU->xwrite(aCPU, dptr, ACC);
    }
    else
    {
        if (aCPU->mExtData)
            aCPU->mExtData[dptr & (aCPU->mExtDataSize - 1)] = ACC;
    }

    PC++;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
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
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1060(%rax)
je 0x109bc
movq -0x8(%rbp), %rax
movq 0x1060(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %edx
callq *%rax
jmp 0x109f1
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x109ef
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rsi
movl 0x18(%rsi), %esi
subl $0x1, %esi
andl %esi, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x109f1
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: movx_indir_rx_a
static int movx_indir_rx_a(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;

    if (aCPU->xwrite)
    {
        aCPU->xwrite(aCPU, address, ACC);
    }
    else
    {
        if (aCPU->mExtData)
            aCPU->mExtData[address & (aCPU->mExtDataSize - 1)] = ACC;
    }

    PC++;
    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), %rax
cmpq $0x0, 0x1060(%rax)
je 0x10a9c
movq -0x8(%rbp), %rax
movq 0x1060(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x60(%rcx), %edx
callq *%rax
jmp 0x10ad1
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x10acf
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rsi
movl 0x18(%rsi), %esi
subl $0x1, %esi
andl %esi, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x10ad1
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_mem_a
static int mov_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 0x10baf
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %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 0x10bad
movq -0x8(%rbp), %rax
movq 0x1050(%rax), %rax
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq *%rax
jmp 0x10bc9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %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
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: mov_indir_rx_a
static int mov_indir_rx_a(struct em8051 *aCPU)
{
    int address = INDIR_RX_ADDRESS;
    if (address > 0x7f)
    {
        if (aCPU->mUpperData)
            aCPU->mUpperData[address - 0x80] = ACC;
    }
    else
    {
        aCPU->mLowerData[address] = ACC;
    }

    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 0x10c6d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x10c6b
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %dl
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x10c87
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x60(%rax), %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 $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: add_solve_flags
static void add_solve_flags(struct em8051 * aCPU, int value1, int value2, int acc)
{
    /* Carry: overflow from 7th bit to 8th bit */
    int carry = ((value1 & 255) + (value2 & 255) + acc) >> 8;
    
    /* Auxiliary carry: overflow from 3th bit to 4th bit */
    int auxcarry = ((value1 & 7) + (value2 & 7) + acc) >> 3;
    
    /* Overflow: overflow from 6th or 7th bit, but not both */
    int overflow = (((value1 & 127) + (value2 & 127) + acc) >> 7)^carry;
    
    PSW = (PSW & ~(PSWMASK_C | PSWMASK_AC | PSWMASK_OV)) |
          (carry << PSW_C) | (auxcarry << PSW_AC) | (overflow << PSW_OV);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %eax
andl $0xff, %eax
movl -0x10(%rbp), %ecx
andl $0xff, %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
andl $0x7, %eax
movl -0x10(%rbp), %ecx
andl $0x7, %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
sarl $0x3, %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl -0x10(%rbp), %ecx
andl $0x7f, %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
sarl $0x7, %eax
xorl -0x18(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x50(%rax), %eax
andl $0xffffff3b, %eax       # imm = 0xFFFFFF3B
movl -0x18(%rbp), %ecx
shll $0x7, %ecx
orl %ecx, %eax
movl -0x1c(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %eax
movl -0x20(%rbp), %ecx
shll $0x2, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x50(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: read_mem
static int read_mem(struct em8051 *aCPU, int aAddress)
{
    if (aAddress > 0x7f)
    {
        if (aCPU->sfrread)
            return aCPU->sfrread(aCPU, aAddress);
        else
            return aCPU->mSFR[aAddress - 0x80];
    }
    else
    {
        return aCPU->mLowerData[aAddress];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x7f, -0x14(%rbp)
jle 0x11809
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1048(%rax)
je 0x117ec
movq -0x10(%rbp), %rax
movq 0x1048(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x1181c
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x1181c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/juliuswwj[P]emch55x/opcodes.c
// Function: pop_from_stack
static int pop_from_stack(struct em8051 *aCPU)
{
    int value = BAD_VALUE;
    if (aCPU->mSFR[REG_SP] > 0x7f)
    {
        if (aCPU->mUpperData)
        {
            value = aCPU->mUpperData[aCPU->mSFR[REG_SP] - 0x80];
        }
        else
        {
            if (aCPU->except_cb)
                aCPU->except_cb(aCPU, EXCEPTION_STACK);
        }
    }
    else
    {
        value = aCPU->mLowerData[aCPU->mSFR[REG_SP]];
    }
    aCPU->mSFR[REG_SP]--;

    if (aCPU->mSFR[REG_SP] == 0xff)
        if (aCPU->except_cb)
            aCPU->except_cb(aCPU, EXCEPTION_STACK);
    return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x77, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7f, %eax
jle 0x118aa
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x11885
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x1(%rcx), %ecx
subl $0x80, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
jmp 0x118a8
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1040(%rax)
je 0x118a6
movq -0x8(%rbp), %rax
movq 0x1040(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq *%rax
jmp 0x118a8
jmp 0x118c5
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movb 0x1(%rax), %cl
addb $-0x1, %cl
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movzbl 0x1(%rax), %eax
cmpl $0xff, %eax
jne 0x1190c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1040(%rax)
je 0x1190a
movq -0x8(%rbp), %rax
movq 0x1040(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq *%rax
jmp 0x1190c
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/antonblanchard[P]will-it-scale/tests/lseek1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);

	assert(fd >= 0);
	unlink(tmpfile);

	assert(write(fd, buf, sizeof(buf)) == sizeof(buf));

	while (1) {
		lseek(fd, 0, SEEK_SET);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x1336(%rip), %rax      # 0x4300
movq %rax, -0x1030(%rbp)
movq 0x1330(%rip), %rax      # 0x4308
movq %rax, -0x1028(%rbp)
movq 0x132a(%rip), %rax      # 0x4310
movq %rax, -0x1020(%rbp)
leaq -0x1030(%rbp), %rdi
callq 0x21c0
movl %eax, -0x1034(%rbp)
cmpl $0x0, -0x1034(%rbp)
jl 0x300a
jmp 0x3029
leaq 0x126b(%rip), %rdi      # 0x427c
leaq 0x126c(%rip), %rsi      # 0x4284
movl $0x10, %edx
leaq 0x126f(%rip), %rcx      # 0x4293
callq 0x2120
leaq -0x1030(%rbp), %rdi
callq 0x2080
movl -0x1034(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x20c0
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x3056
jmp 0x3075
leaq 0x1269(%rip), %rdi      # 0x42c6
leaq 0x1220(%rip), %rsi      # 0x4284
movl $0x13, %edx
leaq 0x1223(%rip), %rcx      # 0x4293
callq 0x2120
jmp 0x3077
movl -0x1034(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2110
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x3077
// File: /workspace/github_c_makefile_star2_O0/antonblanchard[P]will-it-scale/tests/malloc1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	while (1) {
		void *addr = malloc(SIZE);
		assert(addr != NULL);
		free(addr);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x8000000, %edi        # imm = 0x8000000
callq 0x1190
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1fc7
jmp 0x1fe6
leaq 0x12af(%rip), %rdi      # 0x327d
leaq 0x12b5(%rip), %rsi      # 0x328a
movl $0xe, %edx
leaq 0x12b9(%rip), %rcx      # 0x329a
callq 0x1110
movq -0x18(%rbp), %rdi
callq 0x1050
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x1fb0
// File: /workspace/github_c_makefile_star2_O0/mloar[P]charset/fromucs.c
// Function: charset_emit
static void charset_emit(void *ctx, long int output)
{
    struct charset_emit_param *param = (struct charset_emit_param *)ctx;

    if (param->outlen != 0) {
	if (param->output)
	    *param->output++ = output;
	if (param->outlen > 0)
	    param->outlen--;
	param->writtenlen++;
    } else {
	param->stopped = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x6a97
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x6a71
movq -0x10(%rbp), %rax
movb %al, %cl
movq -0x18(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x6a88
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x6aa2
movq -0x18(%rbp), %rax
movl $0x1, 0x10(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/mloar[P]charset/slookup.c
// Function: charset_find_spec
charset_spec const *charset_find_spec(int charset)
{
    int i;

    for (i = 0; i < (int)lenof(cs_table); i++)
	if (cs_table[i]->charset == charset)
	    return cs_table[i];

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4f, -0x10(%rbp)
jge 0x6e9c
movslq -0x10(%rbp), %rcx
leaq 0xa33c1(%rip), %rax     # 0xaa230
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x6e8f
movslq -0x10(%rbp), %rcx
leaq 0xa33ab(%rip), %rax     # 0xaa230
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x6ea4
jmp 0x6e91
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6e5e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/eiselekd[P]MinimalLisp/./lf1.c
// Function: lf_eval
v *
lf_eval(lfctx *lfctx) 
{
    fctx *cctx = (fctx *)lfctx;
    v *r = 0, *f; v *e = POP;
    switch(e->tag) {
    case INT: case STR:
        PUSH(e);
        PUSH(mkInt(0));
        break;
    case SYM:
        if ((r = assq(e, TOSE))) {
            r = cdr(r);
        } else {
            fprintf(stderr, "Undefined symbol \"%s\"\n", str(e));
        }
        PUSH(r);
        PUSH(mkInt(0));
        break;
    case FUNC:
        break;
    case CONS:
        PUSH(cdr(e));
        PUSH(car(e));
        PUSH(mkInt(1));
        break;
    }
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x4830
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x4, %eax
ja 0x10b9c
movq -0x30(%rbp), %rax
leaq 0x26e9(%rip), %rcx      # 0x130fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x23c0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
jmp 0x10b9c
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x178(%rax), %rdi
callq 0x2530
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x2ae0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x10aaa
movq -0x18(%rbp), %rdi
callq 0x2560
movq %rax, -0x18(%rbp)
jmp 0x10aca
movq 0x6547(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x26b3(%rip), %rsi      # 0x13176
movb $0x0, %al
callq 0x20a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x23c0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
jmp 0x10b9c
jmp 0x10b9c
movq -0x28(%rbp), %rdi
callq 0x2560
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x28(%rbp), %rdi
callq 0x2530
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movl $0x1, %edi
callq 0x23c0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rsi
callq 0x2380
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/eiselekd[P]MinimalLisp/./lf1.c
// Function: lf_remap
void
lf_remap(lfctx *lfctx)
{
    struct ctx *lctx = (struct ctx *) lfctx;
    struct fctx *fctx = (struct fctx *)lfctx;
    v *le = 0, *fe; struct lf_maps *c = m;
    while(c->ln && c->fn) {
        if ((le = assq(unique(lctx,c->ln, strlen(c->ln)), lctx->env)) &&
            (fe = assq(unique(lctx,c->fn, strlen(c->fn)), fctx->env))) {
            rplacd(le,cdr(fe));
            printf("Map %s to %s (0x%p)\n", c->ln, c->fn, cdr(fe));
        } else {
            printf("Cannot map %s to %s\n", c->ln, c->fn);
        }
        c++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
leaq 0x4c75(%rip), %rax      # 0x172b0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x31(%rbp)
je 0x1265d
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x12669
jmp 0x1278d
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x2050
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl %eax, %edx
callq 0x3fb0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2ae0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1275f
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2050
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl %eax, %edx
callq 0x3fb0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x148(%rax), %rsi
callq 0x2ae0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1275f
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2560
movq -0x70(%rbp), %rdi
movq %rax, %rdx
movl $0x1, %esi
callq 0x2640
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2560
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rax, %rcx
leaq 0xf63(%rip), %rdi       # 0x136b9
movb $0x0, %al
callq 0x2070
jmp 0x1277c
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xf59(%rip), %rdi       # 0x136ce
movb $0x0, %al
callq 0x2070
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
jmp 0x1263f
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/soso7885[P]OPCUA_example/demo_src/server_datasource.c
// Function: readInteger
static UA_StatusCode
readInteger(void *handle, const UA_NodeId nodeid, UA_Boolean sourceTimeStamp,
            const UA_NumericRange *range, UA_DataValue *dataValue) {
    dataValue->hasValue = true;
    UA_Variant_setScalarCopy(&dataValue->value, (UA_UInt32*)handle, &UA_TYPES[UA_TYPES_INT32]);
    // we know the nodeid is a string
    UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "Node read %.*s",
                nodeid.identifier.string.length, nodeid.identifier.string.data);
    UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "read value %i", *(UA_UInt32*)handle);
    return UA_STATUSCODE_GOOD;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
leaq 0x10(%rbp), %rsi
movq %rsi, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, (%rax)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
movq 0x29b3(%rip), %rdx      # 0x3fd8
addq $0xc8, %rdx
callq 0x1080
cmpq $0x0, 0x2a47(%rip)      # 0x4080
je 0x1664
movq -0x28(%rbp), %rax
movq 0x2a3a(%rip), %r9       # 0x4080
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x5, %esi
leaq 0x9d1(%rip), %rdx       # 0x2030
movb $0x0, %al
callq *%r9
jmp 0x1666
jmp 0x1668
cmpq $0x0, 0x2a10(%rip)      # 0x4080
je 0x1695
movq 0x2a07(%rip), %r8       # 0x4080
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x2, %edi
movl $0x5, %esi
leaq 0x9af(%rip), %rdx       # 0x203f
movb $0x0, %al
callq *%r8
jmp 0x1697
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/soso7885[P]OPCUA_example/demo_src/server_datasource.c
// Function: writeInteger
static UA_StatusCode
writeInteger(void *handle, const UA_NodeId nodeid,
             const UA_Variant *data, const UA_NumericRange *range) {
    if(UA_Variant_isScalar(data) && data->type == &UA_TYPES[UA_TYPES_INT32] && data->data){
        *(UA_UInt32*)handle = *(UA_UInt32*)data->data;
    }
    // we know the nodeid is a string
    UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "Node written %.*s",
                nodeid.identifier.string.length, nodeid.identifier.string.data);
    UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "written value %i", *(UA_UInt32*)handle);
    return UA_STATUSCODE_GOOD;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1870
testb $0x1, %al
jne 0x16cb
jmp 0x16fd
movq -0x10(%rbp), %rax
movq 0x2902(%rip), %rcx      # 0x3fd8
addq $0xc8, %rcx
cmpq %rcx, (%rax)
jne 0x16fd
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x16fd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x16ff
cmpq $0x0, 0x2979(%rip)      # 0x4080
je 0x1732
movq -0x20(%rbp), %rax
movq 0x296c(%rip), %r9       # 0x4080
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
movl $0x2, %edi
movl $0x5, %esi
leaq 0x920(%rip), %rdx       # 0x204d
movb $0x0, %al
callq *%r9
jmp 0x1734
jmp 0x1736
cmpq $0x0, 0x2942(%rip)      # 0x4080
je 0x1763
movq 0x2939(%rip), %r8       # 0x4080
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl $0x2, %edi
movl $0x5, %esi
leaq 0x901(%rip), %rdx       # 0x205f
movb $0x0, %al
callq *%r8
jmp 0x1765
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)