LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_DEC_m
static inline void ASM_DEC_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = MEM_getByte(mem, address) - 1;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, (MEM_getByte(mem, address) & 0x10) != (result & 0x10));
    MEM_setByte(mem, address, result);
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
subl $0x1, %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movzbl %al, %eax
andl $0x10, %eax
movzbl -0x13(%rbp), %ecx
andl $0x10, %ecx
cmpl %ecx, %eax
setne %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x10(%rbp), %rdi
movw -0x12(%rbp), %ax
movzwl %ax, %esi
movzbl -0x13(%rbp), %edx
callq 0xce30
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SCF
static inline void ASM_SCF(CPU* cpu) {
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, 1);
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_CCF
static inline void ASM_CCF(CPU* cpu) {
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, !CPU_getFlagC(cpu));
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movq -0x10(%rbp), %rdi
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_ADD_A_n
static inline void ASM_ADD_A_n(CPU* cpu, uint8_t* reg) {
    uint16_t result = cpu->A + *reg;
    CPU_setFlagZ(cpu, ((uint8_t) result) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, (((cpu->A & 0xF) + (*reg & 0xF)) & 0x10) == 0x10);
    CPU_setFlagC(cpu, result > 0xFF);
    cpu->A = (uint8_t) result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rdi
movw -0x12(%rbp), %ax
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
addl %ecx, %eax
andl $0x10, %eax
cmpl $0x10, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzwl -0x12(%rbp), %eax
cmpl $0xff, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movw -0x12(%rbp), %ax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_ADD_A_m
static inline void ASM_ADD_A_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint16_t result = cpu->A + MEM_getByte(mem, address);
    CPU_setFlagZ(cpu, ((uint8_t) result) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, (((cpu->A & 0xF) + (MEM_getByte(mem, address) & 0xF)) & 0x10) == 0x10);
    CPU_setFlagC(cpu, result > 0xFF);
    cpu->A = (uint8_t) result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movb %al, %cl
movl -0x24(%rbp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movw -0x14(%rbp), %ax
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
andl $0xf, %ecx
addl %ecx, %eax
andl $0x10, %eax
cmpl $0x10, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzwl -0x14(%rbp), %eax
cmpl $0xff, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movw -0x14(%rbp), %ax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_ADC_A_n
static inline void ASM_ADC_A_n(CPU* cpu, uint8_t* reg) {
    int carry = CPU_getFlagC(cpu);
    uint16_t result = cpu->A + *reg + carry;
    CPU_setFlagZ(cpu, ((uint8_t) result) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, (((cpu->A & 0xF) + (*reg & 0xF) + (carry & 0xF)) & 0x10) == 0x10);
    CPU_setFlagC(cpu, result > 0xFF);
    cpu->A = (uint8_t) result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
addl -0x14(%rbp), %eax
movw %ax, -0x16(%rbp)
movq -0x8(%rbp), %rdi
movw -0x16(%rbp), %ax
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
addl %ecx, %eax
movl -0x14(%rbp), %ecx
andl $0xf, %ecx
addl %ecx, %eax
andl $0x10, %eax
cmpl $0x10, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzwl -0x16(%rbp), %eax
cmpl $0xff, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movw -0x16(%rbp), %ax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_ADC_A_m
static inline void ASM_ADC_A_m(CPU* cpu, Memory* mem, uint16_t address) {
    int carry = CPU_getFlagC(cpu);
    uint16_t result = cpu->A + MEM_getByte(mem, address) + carry;
    CPU_setFlagZ(cpu, ((uint8_t) result) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, (((cpu->A & 0xF) + (MEM_getByte(mem, address) & 0xF) + (carry & 0xF)) & 0x10) == 0x10);
    CPU_setFlagC(cpu, result > 0xFF);
    cpu->A = (uint8_t) result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movb %al, %cl
movl -0x2c(%rbp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
addl -0x18(%rbp), %eax
movw %ax, -0x1a(%rbp)
movq -0x8(%rbp), %rdi
movw -0x1a(%rbp), %ax
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x28(%rbp), %rdi
movb %al, %cl
movl -0x20(%rbp), %eax
movzbl %cl, %ecx
andl $0xf, %ecx
addl %ecx, %eax
movl -0x18(%rbp), %ecx
andl $0xf, %ecx
addl %ecx, %eax
andl $0x10, %eax
cmpl $0x10, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzwl -0x1a(%rbp), %eax
cmpl $0xff, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movw -0x1a(%rbp), %ax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SUB_n
static inline void ASM_SUB_n(CPU* cpu, uint8_t* reg) {
    uint8_t result = cpu->A - *reg;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, (cpu->A & 0x0F) < (*reg & 0x0F));
    CPU_setFlagC(cpu, result > cpu->A);
    cpu->A = result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
cmpl %ecx, %eax
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SUB_m
static inline void ASM_SUB_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = cpu->A - MEM_getByte(mem, address);
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, (cpu->A & 0x0F) < (MEM_getByte(mem, address) & 0x0F));
    CPU_setFlagC(cpu, result > cpu->A);
    cpu->A = result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movb %al, %cl
movl -0x24(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
andl $0xf, %ecx
cmpl %ecx, %eax
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movb -0x13(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SBC_A_n
static inline void ASM_SBC_A_n(CPU* cpu, uint8_t* reg) {
    int carry = CPU_getFlagC(cpu);
    int result = cpu->A - *reg - carry;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, ((cpu->A & 0x0F) - (*reg & 0x0F) - carry) < 0);
    CPU_setFlagC(cpu, result < 0);
    cpu->A = (uint8_t) result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
cmpl $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
subl %ecx, %eax
subl -0x14(%rbp), %eax
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
cmpl $0x0, -0x18(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movl -0x18(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SBC_A_m
static inline void ASM_SBC_A_m(CPU* cpu, Memory* mem, uint16_t address) {
    int carry = CPU_getFlagC(cpu);
    int result = cpu->A - MEM_getByte(mem, address) - carry;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, ((cpu->A & 0x0F) - (MEM_getByte(mem, address) & 0x0F) - carry) < 0);
    CPU_setFlagC(cpu, result < 0);
    cpu->A = (uint8_t) result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movb %al, %cl
movl -0x2c(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
cmpl $0x0, -0x1c(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x28(%rbp), %rdi
movb %al, %cl
movl -0x20(%rbp), %eax
movzbl %cl, %ecx
andl $0xf, %ecx
subl %ecx, %eax
subl -0x18(%rbp), %eax
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
cmpl $0x0, -0x1c(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_AND_n
static inline void ASM_AND_n(CPU* cpu, uint8_t* reg) {
    uint8_t result = cpu->A & *reg;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 1);
    CPU_setFlagC(cpu, 0);
    cpu->A = result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl %ecx, %eax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32e0
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_AND_m
static inline void ASM_AND_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = cpu->A & MEM_getByte(mem, address);
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 1);
    CPU_setFlagC(cpu, 0);
    cpu->A = result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
andl %ecx, %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32e0
movb -0x13(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_XOR_n
static inline void ASM_XOR_n(CPU* cpu, uint8_t* reg) {
    uint8_t result = *reg ^ cpu->A;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, 0);
    cpu->A = result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
xorl %ecx, %eax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32e0
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_XOR_m
static inline void ASM_XOR_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = MEM_getByte(mem, address) ^ cpu->A;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, 0);
    cpu->A = result;
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
xorl %ecx, %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32e0
movb -0x13(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_CP_n
static inline void ASM_CP_n(CPU* cpu, uint8_t* reg) {
    uint8_t result = cpu->A - *reg;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, (((cpu->A & 0xF) - (*reg & 0xF)) & 0x10) != 0);
    CPU_setFlagC(cpu, result > cpu->A);
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
subl %ecx, %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_CP_m
static inline void ASM_CP_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = cpu->A - MEM_getByte(mem, address);
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 1);
    CPU_setFlagH(cpu, (((cpu->A & 0xF) - (MEM_getByte(mem, address) & 0xF)) & 0x10) != 0);
    CPU_setFlagC(cpu, result > cpu->A);
    cpu->PC += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movb %al, %cl
movl -0x24(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3260
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xf, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
andl $0xf, %ecx
subl %ecx, %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RET_cc
static inline int ASM_RET_cc(CPU* cpu, Memory* mem, int ccCode) {
    int cond = 0;
    switch (ccCode) {
        case PARAM_CC_Z:
            cond = CPU_getFlagZ(cpu);
            break;
        case PARAM_CC_NZ:
            cond = !CPU_getFlagZ(cpu);
            break;
        case PARAM_CC_C:
            cond = CPU_getFlagC(cpu);
            break;
        case PARAM_CC_NC:
            cond = !CPU_getFlagC(cpu);
            break;
    }
    if (cond) {
        cpu->PC = MEM_popFromStack(mem, &(cpu->SP));
        return 1;
    } else {
        cpu->PC += 1;
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x64, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x9b4f
movq -0x28(%rbp), %rax
leaq 0x4daa(%rip), %rcx      # 0xe8a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0x30f0
movl %eax, -0x20(%rbp)
jmp 0x9b4f
movq -0x10(%rbp), %rdi
callq 0x30f0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x9b4f
movq -0x10(%rbp), %rdi
callq 0x31a0
movl %eax, -0x20(%rbp)
jmp 0x9b4f
movq -0x10(%rbp), %rdi
callq 0x31a0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x9b7a
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xa, %rsi
callq 0xd070
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x9b90
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x1, %ecx
movw %cx, 0xc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_CALL_cc_nn
static inline int ASM_CALL_cc_nn(CPU* cpu, Memory* mem, int ccCode) {
    int cond = 0;
    switch (ccCode) {
        case PARAM_CC_Z:
            cond = CPU_getFlagZ(cpu);
            break;
        case PARAM_CC_NZ:
            cond = !CPU_getFlagZ(cpu);
            break;
        case PARAM_CC_C:
            cond = CPU_getFlagC(cpu);
            break;
        case PARAM_CC_NC:
            cond = !CPU_getFlagC(cpu);
            break;
    }
    if (cond) {
        uint16_t jumpAddress = (MEM_getByte(mem, cpu->PC + 2) << 8) | MEM_getByte(mem, cpu->PC + 1);
        uint16_t nextAddress = cpu->PC + 3;
        MEM_pushToStack(mem, &(cpu->SP), nextAddress);
        cpu->PC = jumpAddress;
        return 1;
    } else {
        cpu->PC += 3;
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x64, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x3, %eax
ja 0x9d0f
movq -0x30(%rbp), %rax
leaq 0x4bfa(%rip), %rcx      # 0xe8b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0x30f0
movl %eax, -0x20(%rbp)
jmp 0x9d0f
movq -0x10(%rbp), %rdi
callq 0x30f0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x9d0f
movq -0x10(%rbp), %rdi
callq 0x31a0
movl %eax, -0x20(%rbp)
jmp 0x9d0f
movq -0x10(%rbp), %rdi
callq 0x31a0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x9d93
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x2, %eax
movzwl %ax, %esi
callq 0xcd50
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xcd50
movb %al, %cl
movl -0x34(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x3, %eax
movw %ax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xa, %rsi
movzwl -0x24(%rbp), %edx
callq 0xcff0
movw -0x22(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x9da9
movq -0x10(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x3, %ecx
movw %cx, 0xc(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_CALL_nn
static inline void ASM_CALL_nn(CPU* cpu, Memory* mem) {
    uint16_t jumpAddress = (MEM_getByte(mem, cpu->PC + 2) << 8) | MEM_getByte(mem, cpu->PC + 1);
    uint16_t nextAddress = cpu->PC + 3;
    MEM_pushToStack(mem, &(cpu->SP), nextAddress);
    cpu->PC = jumpAddress;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x2, %eax
movzwl %ax, %esi
callq 0xcd50
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xcd50
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movw %ax, -0x12(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x3, %eax
movw %ax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0xa, %rsi
movzwl -0x14(%rbp), %edx
callq 0xcff0
movw -0x12(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_ADD_SP_n
static inline void ASM_ADD_SP_n(CPU* cpu, Memory* mem) {
    uint8_t nextByte = MEM_getByte(mem, cpu->PC + 1);
    uint16_t result = cpu->SP + (int8_t) nextByte;
    uint8_t lowResult = (cpu->SP & 0xFF) + nextByte;
    CPU_setFlagZ(cpu, 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, ((((cpu->SP & 0xFF) & 0xF) + (nextByte & 0xF)) & 0x10) == 0x10);
    CPU_setFlagC(cpu, lowResult < nextByte);
    cpu->SP = result;
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xcd50
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
movsbl -0x11(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0xff, %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0xff, %eax
andl $0xf, %eax
movzbl -0x11(%rbp), %ecx
andl $0xf, %ecx
addl %ecx, %eax
andl $0x10, %eax
cmpl $0x10, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x15(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movw -0x14(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_LDHL_SP_n
static inline void ASM_LDHL_SP_n(CPU* cpu, Memory* mem) {
    // Add SP and next byte, and set flags
    uint8_t nextByte = MEM_getByte(mem, cpu->PC + 1);
    uint16_t result = cpu->SP + (int8_t) nextByte;
    uint8_t lowResult = (cpu->SP & 0xFF) + nextByte;
    CPU_setFlagZ(cpu, 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, ((((cpu->SP & 0xFF) & 0xF) + (nextByte & 0xF)) & 0x10) == 0x10);
    CPU_setFlagC(cpu, lowResult < nextByte);

    // Load into HL
    cpu->H = (result & 0xFF00) >> 8;
    cpu->L = result & 0xFF;
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xcd50
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
movsbl -0x11(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0xff, %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0xff, %eax
andl $0xf, %eax
movzbl -0x11(%rbp), %ecx
andl $0xf, %ecx
addl %ecx, %eax
andl $0x10, %eax
cmpl $0x10, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x15(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
setl %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32e0
movzwl -0x14(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x9(%rax)
movzwl -0x14(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RLC_n
static inline void ASM_RLC_n(CPU* cpu, uint8_t* reg) {
    uint8_t bit7 = getBit(*reg, 7);
    *reg = (*reg << 1) | bit7;
    CPU_setFlagZ(cpu, *reg == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit7);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x7, %esi
movzbl (%rax), %edi
callq 0x3120
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
shll %eax
movzbl -0x11(%rbp), %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RLC_m
static inline void ASM_RLC_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit7 = getBit(MEM_getByte(mem, address), 7);
    MEM_setByte(mem, address, (MEM_getByte(mem, address) << 1) | bit7);
    CPU_setFlagZ(cpu, MEM_getByte(mem, address) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit7);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movl $0x7, %esi
movzbl %al, %edi
callq 0x3120
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movw -0x12(%rbp), %ax
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x30(%rbp), %rdi
movw -0x22(%rbp), %cx
movzbl %al, %eax
shll %eax
movzbl -0x13(%rbp), %edx
orl %edx, %eax
movzwl %cx, %esi
movzbl %al, %edx
callq 0xce30
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RRC_n
static inline void ASM_RRC_n(CPU* cpu, uint8_t* reg) {
    uint8_t bit0 = *reg & 1;
    *reg = (*reg >> 1) | (bit0 << 7);
    CPU_setFlagZ(cpu, *reg == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit0);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x1, %eax
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
movzbl -0x11(%rbp), %ecx
shll $0x7, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RRC_m
static inline void ASM_RRC_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit0 = MEM_getByte(mem, address) & 1;
    MEM_setByte(mem, address, (MEM_getByte(mem, address) >> 1) | (bit0 << 7));
    CPU_setFlagZ(cpu, MEM_getByte(mem, address) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit0);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
andl $0x1, %eax
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movw -0x12(%rbp), %ax
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x30(%rbp), %rdi
movw -0x22(%rbp), %cx
movzbl %al, %eax
sarl %eax
movzbl -0x13(%rbp), %edx
shll $0x7, %edx
orl %edx, %eax
movzwl %cx, %esi
movzbl %al, %edx
callq 0xce30
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RL_n
static inline void ASM_RL_n(CPU* cpu, uint8_t* reg) {
    uint8_t bit7 = getBit(*reg, 7);
    *reg = (*reg << 1) | (uint8_t) CPU_getFlagC(cpu);
    CPU_setFlagZ(cpu, *reg == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit7);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x7, %esi
movzbl (%rax), %edi
callq 0x3120
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
shll %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movl %eax, %ecx
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RL_m
static inline void ASM_RL_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit7 = getBit(MEM_getByte(mem, address), 7);
    MEM_setByte(mem, address, (MEM_getByte(mem, address) << 1) | (uint8_t) CPU_getFlagC(cpu));
    CPU_setFlagZ(cpu, MEM_getByte(mem, address) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit7);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movl $0x7, %esi
movzbl %al, %edi
callq 0x3120
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movw -0x12(%rbp), %ax
movw %ax, -0x26(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
shll %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movq -0x30(%rbp), %rdi
movw -0x26(%rbp), %cx
movl %eax, %edx
movl -0x24(%rbp), %eax
movzbl %dl, %edx
orl %edx, %eax
movzwl %cx, %esi
movzbl %al, %edx
callq 0xce30
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RR_n
static inline void ASM_RR_n(CPU* cpu, uint8_t* reg) {
    uint8_t bit0 = *reg & 1;
    *reg = (*reg >> 1) | (CPU_getFlagC(cpu) << 7);
    CPU_setFlagZ(cpu, *reg == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit0);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x1, %eax
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movl %eax, %ecx
movl -0x18(%rbp), %eax
shll $0x7, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_RR_m
static inline void ASM_RR_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit0 = MEM_getByte(mem, address) & 1;
    MEM_setByte(mem, address, (MEM_getByte(mem, address) >> 1) | (CPU_getFlagC(cpu) << 7));
    CPU_setFlagZ(cpu, MEM_getByte(mem, address) == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, (int) bit0);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
andl $0x1, %eax
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movw -0x12(%rbp), %ax
movw %ax, -0x26(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
sarl %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movq -0x30(%rbp), %rdi
movw -0x26(%rbp), %cx
movl %eax, %edx
movl -0x24(%rbp), %eax
shll $0x7, %edx
orl %edx, %eax
movzwl %cx, %esi
movzbl %al, %edx
callq 0xce30
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movzbl %al, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %esi
callq 0x32e0
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SLA_n
static inline void ASM_SLA_n(CPU* cpu, uint8_t* reg) {
    uint8_t result = *reg << 1;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, getBit(*reg, 7));
    *reg = result;
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
shll %eax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x7, %esi
movzbl (%rax), %edi
callq 0x3120
movq -0x20(%rbp), %rdi
movzbl %al, %esi
callq 0x32e0
movb -0x11(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SLA_m
static inline void ASM_SLA_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t result = MEM_getByte(mem, address) << 1;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, getBit(MEM_getByte(mem, address), 7));
    MEM_setByte(mem, address, result);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
shll %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x13(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movl $0x7, %esi
movzbl %al, %edi
callq 0x3120
movq -0x20(%rbp), %rdi
movzbl %al, %esi
callq 0x32e0
movq -0x10(%rbp), %rdi
movw -0x12(%rbp), %ax
movzwl %ax, %esi
movzbl -0x13(%rbp), %edx
callq 0xce30
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SRA_n
static inline void ASM_SRA_n(CPU* cpu, uint8_t* reg) {
    uint8_t bit7mask = *reg & (1U << 7);
    uint8_t result = (*reg >> 1) | bit7mask;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, *reg & 1);
    *reg = result;
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
movzbl -0x11(%rbp), %ecx
orl %ecx, %eax
movb %al, -0x12(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x12(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
andl $0x1, %esi
callq 0x32e0
movb -0x12(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/qad114[P]yobeboy/src/asm.h
// Function: ASM_SRA_m
static inline void ASM_SRA_m(CPU* cpu, Memory* mem, uint16_t address) {
    uint8_t bit7mask = MEM_getByte(mem, address) & (1U << 7);
    uint8_t result = (MEM_getByte(mem, address) >> 1) | bit7mask;
    CPU_setFlagZ(cpu, result == 0);
    CPU_setFlagN(cpu, 0);
    CPU_setFlagH(cpu, 0);
    CPU_setFlagC(cpu, MEM_getByte(mem, address) & 1);
    MEM_setByte(mem, address, result);
    cpu->PC += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
andl $0x80, %eax
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movzbl %al, %eax
sarl %eax
movzbl -0x13(%rbp), %ecx
orl %ecx, %eax
movb %al, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x14(%rbp), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x31d0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3260
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x32a0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0xcd50
movq -0x20(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x32e0
movq -0x10(%rbp), %rdi
movw -0x12(%rbp), %ax
movzwl %ax, %esi
movzbl -0x14(%rbp), %edx
callq 0xce30
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)