LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_indirect_x(NES::MemoryUnit&)
void CPU::ora_indirect_x(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Indirect Reg-X addressing
    // PC += 2

    instPtr++;
    uint16_t alpha = regX, beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((alpha+beta)&0xFF);
    uint8_t kapa = r.getByteAt(addr), napa = r.getByteAt(addr+1);
    uint16_t finalAddr = (kapa | (napa << 8));
    regAcc = regAcc|r.getByteAt(finalAddr);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movb 0x1(%rdi), %r15b
movl $0xffff, %r13d          # imm = 0xFFFF
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
addb %r15b, %al
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incl %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movzbl %r12b, %ecx
movzbl %al, %esi
shll $0x8, %esi
orl %ecx, %esi
movb (%rbx), %r15b
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
orb %r15b, %al
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_zeropg(NES::MemoryUnit&)
void CPU::ora_zeropg(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Zero Page Addressing
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    regAcc = regAcc|r.getByteAt(alpha);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
movb (%r14), %r15b
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5834
orb %r15b, %al
movb %al, (%r14)
movq %r14, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4512
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_immediate(NES::MemoryUnit&)
void CPU::ora_immediate(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Immediate addressing
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    regAcc = regAcc|alpha;
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movzwl 0x6(%rdi), %ecx
incl %ecx
movw %cx, 0x6(%rdi)
movzwl %cx, %esi
movq %rax, %rdi
callq 0x5834
incw 0x6(%rbx)
orb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_absolute(NES::MemoryUnit&)
void CPU::ora_absolute(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Absolute addressing
    // PC += 3

    instPtr++;
    uint16_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint16_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (alpha|(beta<<8));
    regAcc = regAcc|r.getByteAt(addr);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%rbx), %esi
incl %esi
movw %si, 0x6(%rbx)
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %r15b, %ecx
movzbl %al, %esi
shll $0x8, %esi
orl %ecx, %esi
movb (%rbx), %r15b
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
orb %r15b, %al
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_indirect_y(NES::MemoryUnit&)
void CPU::ora_indirect_y(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Zero Page Y indexed
    // PC += 2

    instPtr++;
    uint16_t alpha = regY, beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t kapa = r.getByteAt(beta), napa = r.getByteAt((beta+1)%256);
    uint16_t addr = kapa|(napa<<8);
    regAcc = regAcc|r.getByteAt(addr+alpha);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movzbl 0x2(%rdi), %r13d
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incb %r15b
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x5834
movzbl %r12b, %ecx
addl %r13d, %ecx
movzbl %al, %esi
shll $0x8, %esi
addl %ecx, %esi
movb (%rbx), %r15b
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
orb %r15b, %al
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_zeropg_x(NES::MemoryUnit&)
void CPU::ora_zeropg_x(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Zero Page X Indexed
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr), beta = regX;
    instPtr++;
    uint16_t addr = (alpha + regX)%256;
    regAcc = regAcc|r.getByteAt(addr);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb 0x1(%r14), %al
movb (%r14), %r15b
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5834
orb %r15b, %al
movb %al, (%r14)
movq %r14, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4512
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::ora_absolute_y(NES::MemoryUnit&)
void CPU::ora_absolute_y(MemoryUnit &r) {
    // Bitwise OR with Accumulator: Absolute addressing indexed Y
    // PC += 3
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (alpha|(beta<<8));
    addr += regY;
    regAcc = regAcc|r.getByteAt(addr);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%rbx), %esi
incl %esi
movw %si, 0x6(%rbx)
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %r15b, %ecx
movzbl %al, %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x2(%rbx), %esi
addl %eax, %esi
movb (%rbx), %r15b
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
orb %r15b, %al
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::and_immediate(NES::MemoryUnit&)
void CPU::and_immediate(MemoryUnit &r) {
    // Bitwise AND with Accumulator: Immediate addressing
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    regAcc = regAcc&alpha;
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movzwl 0x6(%rdi), %ecx
incl %ecx
movw %cx, 0x6(%rdi)
movzwl %cx, %esi
movq %rax, %rdi
callq 0x5834
incw 0x6(%rbx)
andb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_indirect_x(NES::MemoryUnit&)
void CPU::adc_indirect_x(MemoryUnit &r) {
    // Add to the Accumulator: Indirect Reg-X addressing
    // PC += 2

    instPtr++;
    uint16_t alpha = regX, beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((alpha+beta)&0xFF);
    uint8_t kapa = r.getByteAt(addr), napa = r.getByteAt(addr+1);
    uint16_t finalAddr = (kapa | (napa << 8));
    uint8_t m=regAcc, n=r.getByteAt(finalAddr), res;

    uint16_t zeta = uint16_t(regAcc)+uint16_t(n)+\
                    uint16_t(getCarryFlag());
    regAcc = zeta%256;
    res = regAcc;
    uint8_t overflow=!((m^n)&0x80)&&((m^res)&0x80), carry=0;
    carry = zeta/256;
    changeFlags(carry, overflow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movb 0x1(%rdi), %r15b
movl $0xffff, %r13d          # imm = 0xFFFF
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
addb %r15b, %al
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incl %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movzbl %r12b, %ecx
movzbl %al, %esi
shll $0x8, %esi
orl %ecx, %esi
movzbl (%rbx), %r15d
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
movzbl (%rbx), %esi
movzbl %al, %eax
movzbl 0x3(%rbx), %ecx
btl $0x2, %ecx
adcl %eax, %esi
movb %sil, (%rbx)
movl %r15d, %ecx
xorl %esi, %ecx
testb %cl, %cl
sets %cl
xorb %r15b, %al
setns %al
andb %cl, %al
shrl $0x8, %esi
movzbl %al, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4512
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_zeropg(NES::MemoryUnit&)
void CPU::adc_zeropg(MemoryUnit &r) {
    // Add to the Accumulator: Zero Page Addressing
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t m=regAcc, n=r.getByteAt(alpha), res;

    uint16_t zeta = uint16_t(regAcc)+uint16_t(n)+\
                    uint16_t(getCarryFlag());
    regAcc = zeta%256;
    res = regAcc;
    uint8_t overflow=!((m^n)&0x80)&&((m^res)&0x80), carry=0;
    carry = zeta/256;
    changeFlags(carry, overflow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl (%rbx), %r15d
movzbl %al, %esi
movq %r14, %rdi
callq 0x5834
movzbl (%rbx), %esi
movzbl %al, %eax
movzbl 0x3(%rbx), %ecx
btl $0x2, %ecx
adcl %eax, %esi
movb %sil, (%rbx)
movl %r15d, %ecx
xorl %esi, %ecx
testb %cl, %cl
sets %cl
xorb %r15b, %al
setns %al
andb %cl, %al
shrl $0x8, %esi
movzbl %al, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_absolute(NES::MemoryUnit&)
void CPU::adc_absolute(MemoryUnit &r) {
    // Add to the Accumulator: Absolute addressing
    // PC += 3

    instPtr++;
    uint16_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint16_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (alpha|(beta<<8));
    uint8_t m=regAcc, n=r.getByteAt(addr), res;

    uint16_t zeta = uint16_t(regAcc)+uint16_t(n)+\
                    uint16_t(getCarryFlag());
    regAcc = zeta%256;
    res = regAcc;
    uint8_t overflow=!((m^n)&0x80)&&((m^res)&0x80), carry=0;
    carry = zeta/256;
    changeFlags(carry, overflow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%rbx), %esi
incl %esi
movw %si, 0x6(%rbx)
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %r15b, %ecx
movzbl %al, %esi
shll $0x8, %esi
orl %ecx, %esi
movzbl (%rbx), %r15d
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
movzbl (%rbx), %esi
movzbl %al, %eax
movzbl 0x3(%rbx), %ecx
btl $0x2, %ecx
adcl %eax, %esi
movb %sil, (%rbx)
movl %r15d, %ecx
xorl %esi, %ecx
testb %cl, %cl
sets %cl
xorb %r15b, %al
setns %al
andb %cl, %al
shrl $0x8, %esi
movzbl %al, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4512
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_indirect_y(NES::MemoryUnit&)
void CPU::adc_indirect_y(MemoryUnit &r) {
    // Add to Accumulator: Zero Page Y indexed
    // PC += 2

    instPtr++;
    uint16_t alpha = regY, beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t kapa = r.getByteAt(beta), napa = r.getByteAt((beta+1)%256);
    uint16_t addr = kapa|(napa<<8);
    uint8_t m=regAcc, n=r.getByteAt(addr+alpha), res;

    uint16_t zeta = uint16_t(regAcc)+uint16_t(n)+\
                    uint16_t(getCarryFlag());
    regAcc = zeta%256;
    res = regAcc;
    uint8_t overflow=!((m^n)&0x80)&&((m^res)&0x80), carry=0;
    carry = zeta/256;
    changeFlags(carry, overflow);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movzbl 0x2(%rdi), %r13d
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incb %r15b
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x5834
movzbl %r12b, %ecx
addl %r13d, %ecx
movzbl %al, %esi
shll $0x8, %esi
addl %ecx, %esi
movzbl (%rbx), %r15d
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
movzbl (%rbx), %esi
movzbl %al, %eax
movzbl 0x3(%rbx), %ecx
btl $0x2, %ecx
adcl %eax, %esi
movb %sil, (%rbx)
movl %r15d, %ecx
xorl %esi, %ecx
testb %cl, %cl
sets %cl
xorb %r15b, %al
setns %al
andb %cl, %al
shrl $0x8, %esi
movzbl %al, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4512
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::sta_indirect_x(NES::MemoryUnit&)
void CPU::sta_indirect_x(MemoryUnit &r) {
    // Store contents of accumulator to address: Indirect Reg-X addressing
    // PC += 2

    instPtr++;
    uint16_t alpha = regX, beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((alpha+beta)&0xFF);
    uint8_t kapa = r.getByteAt(addr), napa = r.getByteAt(addr+1);
    uint16_t finalAddr = (kapa | (napa << 8));
    r.setByteAt(finalAddr, regAcc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movb 0x1(%rdi), %r15b
movl $0xffff, %r13d          # imm = 0xFFFF
andl %r13d, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb %r15b, %al
movzbl %al, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incl %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
movzbl %r12b, %ecx
movzbl %al, %esi
shll $0x8, %esi
orl %ecx, %esi
movzbl (%r14), %edx
andl %r13d, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::sta_zeropg(NES::MemoryUnit&)
void CPU::sta_zeropg(MemoryUnit &r) {
    // Store contents of accumulator to address: Zero Page Addressing
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    r.setByteAt(alpha, regAcc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
movzbl (%r14), %edx
movzbl %al, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::sta_indirect_y(NES::MemoryUnit&)
void CPU::sta_indirect_y(MemoryUnit &r) {
    // Store contents of accumulator to address: Zero Page Y indexed
    // PC += 2

    instPtr++;
    uint16_t alpha = regY, beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t kapa = r.getByteAt(beta), napa = r.getByteAt((beta+1)%256);
    uint16_t addr = kapa|(napa<<8);
    r.setByteAt(addr+alpha, regAcc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movzbl 0x2(%rdi), %r13d
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
movzbl %al, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incb %r15b
movzbl %r15b, %esi
movq %rbx, %rdi
callq 0x5834
movzbl %r12b, %ecx
addl %r13d, %ecx
movzbl %al, %esi
shll $0x8, %esi
addl %ecx, %esi
movzbl (%r14), %edx
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::lda_indirect_x(NES::MemoryUnit&)
void CPU::lda_indirect_x(MemoryUnit &r) {
    // Load Accumulator: Indirect Reg-X addressing
    // PC += 2

    instPtr++;
    uint16_t alpha = regX, beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((alpha+beta)&0xFF);
    uint8_t kapa = r.getByteAt(addr), napa = r.getByteAt(addr+1);
    uint16_t finalAddr = (kapa | (napa << 8));
    regAcc = r.getByteAt(finalAddr);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movb 0x1(%rdi), %r15b
movl $0xffff, %r13d          # imm = 0xFFFF
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
addb %r15b, %al
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incl %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movzbl %r12b, %ecx
movzbl %al, %esi
shll $0x8, %esi
orl %ecx, %esi
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::lda_zeropg(NES::MemoryUnit&)
void CPU::lda_zeropg(MemoryUnit &r) {
    // Load Accumulator: Zero Page Addressing
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    regAcc = r.getByteAt(alpha);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5834
movb %al, (%r14)
movq %r14, %rdi
movl $0xff, %esi
movl $0xff, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::lda_immediate(NES::MemoryUnit&)
void CPU::lda_immediate(MemoryUnit &r) {
    // Load Accumulator: Immediate addressing
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    regAcc = alpha;
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movzwl 0x6(%rdi), %ecx
incl %ecx
movw %cx, 0x6(%rdi)
movzwl %cx, %esi
movq %rax, %rdi
callq 0x5834
incw 0x6(%rbx)
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::lda_indirect_y(NES::MemoryUnit&)
void CPU::lda_indirect_y(MemoryUnit &r) {
    // Load Accumulator: Zero Page Y indexed
    // PC += 2

    instPtr++;
    uint16_t alpha = regY, beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t kapa = r.getByteAt(beta), napa = r.getByteAt((beta+1)%256);
    uint16_t addr = kapa|(napa<<8);
    regAcc = r.getByteAt(addr+alpha);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movzbl 0x2(%rdi), %r13d
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incb %r15b
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x5834
movzbl %r12b, %ecx
addl %r13d, %ecx
movzbl %al, %esi
shll $0x8, %esi
addl %ecx, %esi
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
movb %al, (%rbx)
movq %rbx, %rdi
movl $0xff, %esi
movl $0xff, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::lda_zeropg_x(NES::MemoryUnit&)
void CPU::lda_zeropg_x(MemoryUnit &r) {
    // Load Accumulator: Zero Page X Indexed
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr), beta = regX;
    instPtr++;
    uint16_t addr = (alpha + regX)%256;
    regAcc = r.getByteAt(addr);
    changeFlags();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb 0x1(%r14), %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x5834
movb %al, (%r14)
movq %r14, %rdi
movl $0xff, %esi
movl $0xff, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x4512
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_indirect_x(NES::MemoryUnit&)
void CPU::cmp_indirect_x(MemoryUnit &r) {
    // Compare Accumulator and Memory: Indirect X
    // PC += 2
    instPtr++;
    uint16_t alpha = regX, beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((alpha+beta)&0xFF);
    uint8_t kapa = r.getByteAt(addr), napa = r.getByteAt(addr+1);
    uint16_t finalAddr = (kapa | (napa << 8));
    uint8_t val = regAcc-r.getByteAt(finalAddr);
    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < r.getByteAt(finalAddr)) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movb 0x1(%rdi), %r15b
movl $0xffff, %r13d          # imm = 0xFFFF
andl %r13d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
addb %r15b, %al
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incl %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movzbl %r12b, %ecx
movzbl %al, %r15d
shll $0x8, %r15d
orl %ecx, %r15d
movb (%rbx), %r12b
andl %r13d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movb (%rbx), %r13b
movb 0x3(%rbx), %cl
movl %ecx, %edx
andb $-0x8, %dl
orb $0x4, %dl
orb $0x5, %cl
subb %al, %r12b
movzbl %cl, %eax
movzbl %dl, %ecx
cmovel %eax, %ecx
andb $-0x3, %cl
shrb $0x6, %r12b
andb $0x2, %r12b
orb %cl, %r12b
movb %r12b, 0x3(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
cmpb %al, %r13b
jae 0x3adb
andb $-0x5, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_zeropg(NES::MemoryUnit&)
void CPU::cmp_zeropg(MemoryUnit &r) {
    // Compare Accumulator: Zero Page Addressing
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t val = regAcc-r.getByteAt(alpha);
    
    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < r.getByteAt(alpha)) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movb (%rbx), %r12b
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movb (%rbx), %r13b
movb 0x3(%rbx), %cl
movl %ecx, %edx
andb $-0x8, %dl
orb $0x4, %dl
orb $0x5, %cl
subb %al, %r12b
movzbl %cl, %eax
movzbl %dl, %ecx
cmovel %eax, %ecx
andb $-0x3, %cl
shrb $0x6, %r12b
andb $0x2, %r12b
orb %cl, %r12b
movb %r12b, 0x3(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
cmpb %al, %r13b
jae 0x3b6c
andb $-0x5, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_immediate(NES::MemoryUnit&)
void CPU::cmp_immediate(MemoryUnit &r) {
    // Compare: Immediate addressing
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t val = regAcc-alpha;
    
    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < alpha) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movzwl 0x6(%rdi), %ecx
incl %ecx
movw %cx, 0x6(%rdi)
movzwl %cx, %esi
movq %rax, %rdi
callq 0x5834
movb (%rbx), %cl
movb 0x3(%rbx), %dl
movl %edx, %esi
andb $-0x8, %sil
orb $0x4, %sil
orb $0x5, %dl
movl %ecx, %edi
subb %al, %dil
movzbl %dl, %edx
movzbl %sil, %esi
cmovel %edx, %esi
andb $-0x3, %sil
shrb $0x6, %dil
andb $0x2, %dil
orb %sil, %dil
movzbl %dil, %edx
andb $-0x5, %dil
cmpb %al, %cl
movzbl %dil, %eax
cmovael %edx, %eax
incw 0x6(%rbx)
movb %al, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_absolute(NES::MemoryUnit&)
void CPU::cmp_absolute(MemoryUnit &r) {
    // Compare Accumulator: Absolute addressing
    // PC += 3

    instPtr++;
    uint16_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint16_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (alpha|(beta<<8));
    uint8_t val = regAcc-r.getByteAt(addr);
    
    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < r.getByteAt(addr)) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%rbx), %esi
incl %esi
movw %si, 0x6(%rbx)
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %r15b, %ecx
movzbl %al, %r15d
shll $0x8, %r15d
orl %ecx, %r15d
movb (%rbx), %r13b
andl %r12d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movb (%rbx), %r12b
movb 0x3(%rbx), %cl
movl %ecx, %edx
andb $-0x8, %dl
orb $0x4, %dl
orb $0x5, %cl
subb %al, %r13b
movzbl %cl, %eax
movzbl %dl, %ecx
cmovel %eax, %ecx
andb $-0x3, %cl
shrb $0x6, %r13b
andb $0x2, %r13b
orb %cl, %r13b
movb %r13b, 0x3(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
cmpb %al, %r12b
jae 0x3c9a
andb $-0x5, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_indirect_y(NES::MemoryUnit&)
void CPU::cmp_indirect_y(MemoryUnit &r) {
    // Compare Accumulator: Zero Page Y indexed
    // PC += 2

    instPtr++;
    uint16_t alpha = regY, beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t kapa = r.getByteAt(beta), napa = r.getByteAt((beta+1)%256);
    uint16_t addr = kapa|(napa<<8);
    uint8_t val = regAcc-r.getByteAt(addr+alpha);

    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < r.getByteAt(addr+alpha)) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movzbl 0x2(%rdi), %r13d
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movl %eax, %r12d
incb %r15b
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x5834
movzbl %r12b, %ecx
addl %r13d, %ecx
movzbl %al, %r15d
shll $0x8, %r15d
addl %ecx, %r15d
movb (%rbx), %r12b
movl $0xffff, %eax           # imm = 0xFFFF
andl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movb (%rbx), %r13b
movb 0x3(%rbx), %cl
movl %ecx, %edx
andb $-0x8, %dl
orb $0x4, %dl
orb $0x5, %cl
subb %al, %r12b
movzbl %cl, %eax
movzbl %dl, %ecx
cmovel %eax, %ecx
andb $-0x3, %cl
shrb $0x6, %r12b
andb $0x2, %r12b
orb %cl, %r12b
movb %r12b, 0x3(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
cmpb %al, %r13b
jae 0x3d6c
andb $-0x5, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_zeropg_x(NES::MemoryUnit&)
void CPU::cmp_zeropg_x(MemoryUnit &r) {
    // Compare Accumulator: Zero Page X Indexed
    // PC += 2

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr), beta = regX;
    instPtr++;
    uint16_t addr = (alpha + regX)%256;
    uint8_t val = regAcc-r.getByteAt(addr);

    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < r.getByteAt(addr)) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
addb 0x1(%rbx), %al
movb (%rbx), %r12b
movzbl %al, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movb (%rbx), %r13b
movb 0x3(%rbx), %cl
movl %ecx, %edx
andb $-0x8, %dl
orb $0x4, %dl
orb $0x5, %cl
subb %al, %r12b
movzbl %cl, %eax
movzbl %dl, %ecx
cmovel %eax, %ecx
andb $-0x3, %cl
shrb $0x6, %r12b
andb $0x2, %r12b
orb %cl, %r12b
movb %r12b, 0x3(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
cmpb %al, %r13b
jae 0x3e01
andb $-0x5, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::cmp_absolute_y(NES::MemoryUnit&)
void CPU::cmp_absolute_y(MemoryUnit &r) {
    // Compare Accumulator: Absolute addressing indexed Y
    // PC += 3
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (alpha|(beta<<8));
    addr += regY;
    uint8_t val = regAcc-r.getByteAt(addr);

    setCarryFlag(1);
    if (val == 0) {
        setZeroFlag(1);
    } else {
        setZeroFlag(0);
    }
    if (val >= 0x80) {
        setNegetiveFlag(1);
    } else {
        setNegetiveFlag(0);
    }
    if (regAcc < r.getByteAt(addr)) {
        setCarryFlag(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%rbx), %esi
incl %esi
movw %si, 0x6(%rbx)
andl %r12d, %esi
movq %r14, %rdi
callq 0x5834
incw 0x6(%rbx)
movzbl %r15b, %ecx
movzbl %al, %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x2(%rbx), %r15d
addl %eax, %r15d
movb (%rbx), %r13b
andl %r12d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
movb (%rbx), %r12b
movb 0x3(%rbx), %cl
movl %ecx, %edx
andb $-0x8, %dl
orb $0x4, %dl
orb $0x5, %cl
subb %al, %r13b
movzbl %cl, %eax
movzbl %dl, %ecx
cmovel %eax, %ecx
andb $-0x3, %cl
shrb $0x6, %r13b
andb $0x2, %r13b
orb %cl, %r13b
movb %r13b, 0x3(%rbx)
movq %r14, %rdi
movl %r15d, %esi
callq 0x5834
cmpb %al, %r12b
jae 0x3ec3
andb $-0x5, 0x3(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::asl_zeropg(NES::MemoryUnit&)
void CPU::asl_zeropg(MemoryUnit &r) {
    // Shifts one bit by left and set the shifted bit to carry flag
    // PC += 2
    instPtr++;
    uint8_t addr = r.getByteAt(instPtr);
    uint8_t val = r.getByteAt(addr);
    instPtr++;
    if (val & 0x80) setCarryFlag(1);
    else setCarryFlag(0);
    val = val << 1;
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
movzbl %al, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
incw 0x6(%r14)
movb 0x3(%r14), %dl
andb $-0x5, %dl
movl %eax, %ecx
shrb $0x5, %cl
andb $0x4, %cl
orb %dl, %cl
addb %al, %al
je 0x3fee
andb $-0x2, %cl
testb %al, %al
jns 0x3ff1
orb $0x2, %cl
jmp 0x3ff4
orb $0x1, %cl
andb $-0x3, %cl
movb %cl, 0x3(%r14)
movzwl %r15w, %esi
movzbl %al, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::asl_accumulator(NES::MemoryUnit&)
void CPU::asl_accumulator(MemoryUnit &r) {
    // Shifts one bit by left and set the shifted bit to carry flag
    // PC += 1
    instPtr++;
    uint8_t val = getAccumulator();
    if (val & 0x80) setCarryFlag(1);
    else setCarryFlag(0);
    val = val << 1;
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    setAccumulator(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incw 0x6(%rdi)
movb (%rdi), %al
movb 0x3(%rdi), %dl
andb $-0x5, %dl
movl %eax, %ecx
shrb $0x5, %cl
andb $0x4, %cl
orb %dl, %cl
addb %al, %al
je 0x403c
andb $-0x2, %cl
testb %al, %al
jns 0x403f
orb $0x2, %cl
jmp 0x4042
orb $0x1, %cl
andb $-0x3, %cl
movb %cl, 0x3(%rdi)
movzbl %al, %esi
popq %rbp
jmp 0x48c8
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::asl_absolute(NES::MemoryUnit&)
void CPU::asl_absolute(MemoryUnit &r) {
    // Shifts one bit by left and set the shifted bit to carry flag
    // PC += 3
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (beta << 8) | alpha;
    uint8_t val = r.getByteAt(addr);
    if (val & 0x80) setCarryFlag(1);
    else setCarryFlag(0);
    val = val << 1;
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%r14), %esi
incl %esi
movw %si, 0x6(%r14)
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
movzbl %al, %eax
shll $0x8, %eax
movzbl %r15b, %r15d
orl %eax, %r15d
movl %r15d, %esi
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
movb 0x3(%r14), %dl
andb $-0x5, %dl
movl %eax, %ecx
shrb $0x5, %cl
andb $0x4, %cl
orb %dl, %cl
addb %al, %al
je 0x40d5
andb $-0x2, %cl
testb %al, %al
jns 0x40d8
orb $0x2, %cl
jmp 0x40db
orb $0x1, %cl
andb $-0x3, %cl
movb %cl, 0x3(%r14)
movzwl %r15w, %esi
movzbl %al, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::asl_zeropg_x(NES::MemoryUnit&)
void CPU::asl_zeropg_x(MemoryUnit &r) {
    // Shifts one bit by left and set the shifted bit to carry flag
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr), beta = regX;
    instPtr++;
    uint8_t addr = alpha+beta;
    uint8_t val = r.getByteAt(addr);

    if (val & 0x80) setCarryFlag(1);
    else setCarryFlag(0);
    val = val << 1;
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb 0x1(%r14), %al
movzbl %al, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
movb 0x3(%r14), %dl
andb $-0x5, %dl
movl %eax, %ecx
shrb $0x5, %cl
andb $0x4, %cl
orb %dl, %cl
addb %al, %al
je 0x4154
andb $-0x2, %cl
testb %al, %al
jns 0x4157
orb $0x2, %cl
jmp 0x415a
orb $0x1, %cl
andb $-0x3, %cl
movb %cl, 0x3(%r14)
movzwl %r15w, %esi
movzbl %al, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::asl_absolute_x(NES::MemoryUnit&)
void CPU::asl_absolute_x(MemoryUnit &r) {
    // Shifts one bit by left and set the shifted bit to carry flag
    // PC += 3

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((beta<<8)|alpha)+regX;
    uint8_t val = r.getByteAt(addr);

    if (val & 0x80) setCarryFlag(1);
    else setCarryFlag(0);
    val = val << 1;
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%r14), %esi
incl %esi
movw %si, 0x6(%r14)
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb 0x1(%r14), %r15b
movzbl %r15b, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
movb 0x3(%r14), %dl
andb $-0x5, %dl
movl %eax, %ecx
shrb $0x5, %cl
andb $0x4, %cl
orb %dl, %cl
addb %al, %al
je 0x41f7
andb $-0x2, %cl
testb %al, %al
jns 0x41fa
orb $0x2, %cl
jmp 0x41fd
orb $0x1, %cl
andb $-0x3, %cl
movb %cl, 0x3(%r14)
movzwl %r15w, %esi
movzbl %al, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::rol_zeropg(NES::MemoryUnit&)
void CPU::rol_zeropg(MemoryUnit &r) {
    // Shifts one bit by left take shifted as carry and
    // set the shifted bit to carry flag 
    // PC += 2
    instPtr++;
    uint8_t addr = r.getByteAt(instPtr);
    uint8_t val = r.getByteAt(addr);
    uint8_t c = val&0x80;
    instPtr++;
    val = val << 1;
    val = val | (getCarryFlag());
    if (c == 0) setCarryFlag(0);
    else setCarryFlag(1);
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
movzbl %al, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
incw 0x6(%r14)
leal (%rax,%rax), %edx
movb 0x3(%r14), %sil
movl %esi, %ecx
shrb $0x2, %cl
andb $0x1, %cl
andb $-0x5, %sil
shrb $0x5, %al
andb $0x4, %al
orb %sil, %al
orb %dl, %cl
je 0x427a
andb $-0x2, %al
testb %dl, %dl
jns 0x427c
orb $0x2, %al
jmp 0x427e
orb $0x1, %al
andb $-0x3, %al
movb %al, 0x3(%r14)
movzwl %r15w, %esi
movzbl %cl, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::rol_accumulator(NES::MemoryUnit&)
void CPU::rol_accumulator(MemoryUnit &r) {
    // Shifts one bit by left take shifted as carry and
    // set the shifted bit to carry flag 
    // PC += 1
    instPtr++;
    uint8_t val = getAccumulator();
    uint8_t c = val&0x80;
    val = val << 1;
    val = val | (getCarryFlag());
    if (c == 0) setCarryFlag(0);
    else setCarryFlag(1);
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    setAccumulator(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incw 0x6(%rdi)
movb (%rdi), %al
movb 0x3(%rdi), %sil
leal (%rax,%rax), %edx
movl %esi, %ecx
shrb $0x2, %cl
andb $0x1, %cl
andb $-0x5, %sil
shrb $0x5, %al
andb $0x4, %al
orb %sil, %al
orb %dl, %cl
je 0x42cf
andb $-0x2, %al
testb %dl, %dl
jns 0x42d1
orb $0x2, %al
jmp 0x42d3
orb $0x1, %al
andb $-0x3, %al
movb %al, 0x3(%rdi)
movzbl %cl, %esi
popq %rbp
jmp 0x48c8
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::rol_absolute(NES::MemoryUnit&)
void CPU::rol_absolute(MemoryUnit &r) {
    // Shifts one bit by left take shifted as carry and
    // set the shifted bit to carry flag 
    // PC += 3

    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint16_t addr = (beta << 8) | alpha;
    uint8_t val = r.getByteAt(addr);
    uint8_t c = val&0x80;
    val = val << 1;
    val = val | (getCarryFlag());
    if (c == 0) setCarryFlag(0);
    else setCarryFlag(1);
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%r14), %esi
incl %esi
movw %si, 0x6(%r14)
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
movzbl %al, %eax
shll $0x8, %eax
movzbl %r15b, %r15d
orl %eax, %r15d
movl %r15d, %esi
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
leal (%rax,%rax), %edx
movb 0x3(%r14), %sil
movl %esi, %ecx
shrb $0x2, %cl
andb $0x1, %cl
andb $-0x5, %sil
shrb $0x5, %al
andb $0x4, %al
orb %sil, %al
orb %dl, %cl
je 0x436f
andb $-0x2, %al
testb %dl, %dl
jns 0x4371
orb $0x2, %al
jmp 0x4373
orb $0x1, %al
andb $-0x3, %al
movb %al, 0x3(%r14)
movzwl %r15w, %esi
movzbl %cl, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::rol_zeropg_x(NES::MemoryUnit&)
void CPU::rol_zeropg_x(MemoryUnit &r) {
    // Shifts one bit by left take shifted as carry and
    // set the shifted bit to carry flag 
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr), beta = regX;
    instPtr++;
    uint8_t addr = alpha+beta;
    uint8_t val = r.getByteAt(addr);

    uint8_t c = val&0x80;
    val = val << 1;
    val = val | (getCarryFlag());
    if (c == 0) setCarryFlag(0);
    else setCarryFlag(1);
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %eax
incl %eax
movw %ax, 0x6(%rdi)
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb 0x1(%r14), %al
movzbl %al, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
leal (%rax,%rax), %edx
movb 0x3(%r14), %sil
movl %esi, %ecx
shrb $0x2, %cl
andb $0x1, %cl
andb $-0x5, %sil
shrb $0x5, %al
andb $0x4, %al
orb %sil, %al
orb %dl, %cl
je 0x43f4
andb $-0x2, %al
testb %dl, %dl
jns 0x43f6
orb $0x2, %al
jmp 0x43f8
orb $0x1, %al
andb $-0x3, %al
movb %al, 0x3(%r14)
movzwl %r15w, %esi
movzbl %cl, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
nop
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::rol_absolute_x(NES::MemoryUnit&)
void CPU::rol_absolute_x(MemoryUnit &r) {
    // Shifts one bit by left take shifted as carry and
    // set the shifted bit to carry flag 
    // PC += 3
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint8_t beta = r.getByteAt(instPtr);
    instPtr++;
    uint8_t addr = ((beta<<8)|alpha)+regX;
    uint8_t val = r.getByteAt(addr);

    uint8_t c = val&0x80;
    val = val << 1;
    val = val | (getCarryFlag());
    if (c == 0) setCarryFlag(0);
    else setCarryFlag(1);
    if (val == 0) setZeroFlag(1);
    else setZeroFlag(0);
    if (val & 0x80) setNegetiveFlag(1);
    else setNegetiveFlag(0);
    r.setByteAt(addr, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x6(%rdi), %esi
incl %esi
movw %si, 0x6(%rdi)
movl $0xffff, %r12d          # imm = 0xFFFF
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
movl %eax, %r15d
movzwl 0x6(%r14), %esi
incl %esi
movw %si, 0x6(%r14)
andl %r12d, %esi
movq %rbx, %rdi
callq 0x5834
incw 0x6(%r14)
addb 0x1(%r14), %r15b
movzbl %r15b, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5834
leal (%rax,%rax), %edx
movb 0x3(%r14), %sil
movl %esi, %ecx
shrb $0x2, %cl
andb $0x1, %cl
andb $-0x5, %sil
shrb $0x5, %al
andb $0x4, %al
orb %sil, %al
orb %dl, %cl
je 0x449d
andb $-0x2, %al
testb %dl, %dl
jns 0x449f
orb $0x2, %al
jmp 0x44a1
orb $0x1, %al
andb $-0x3, %al
movb %al, 0x3(%r14)
movzwl %r15w, %esi
movzbl %cl, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x57ea
// File: /workspace/github_cpp_makefile_star2_O2/nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::opcodeNotAvailable(unsigned char)
bool CPU::opcodeNotAvailable(uint8_t opcode) {
    if (opcodeBag.find(opcode) == opcodeBag.end()) {
        return true;
    } else {
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x1(%rbp), %rax
movb %sil, (%rax)
addq $0x40, %rdi
movq %rax, %rsi
callq 0x56ca
testq %rax, %rax
sete %al
addq $0x10, %rsp
popq %rbp
retq
nop