LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ASL_ACC(unsigned short)
void mos6502::Op_ASL_ACC(uint16_t src)
{
	uint8_t m = A;
    SET_CARRY(m & 0x80);
    m <<= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb (%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7141
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x7156
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movzbl -0xb(%rbp), %eax
shll %eax
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0xff, %eax
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7193
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x71ab
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x71c8
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x71dd
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_REL()
uint16_t mos6502::Addr_REL()
{
	uint16_t offset;
	uint16_t addr;
	
	offset = (uint16_t)Read(pc++);
    if (offset & 0x80) offset |= 0xFF00;	
    addr = pc + (int16_t)offset;
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movw 0x10(%rdi), %ax
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x10(%rdi)
movzwl %ax, %eax
movl %eax, %esi
callq 0x34e0
movzbl %al, %eax
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x723f
movzwl -0xa(%rbp), %eax
orl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0xa(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x10(%rax), %eax
movswl -0xa(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xc(%rbp)
movw -0xc(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_BIT(unsigned short)
void mos6502::Op_BIT(uint16_t src)
{
	uint8_t m = Read(src);
	uint8_t res = m & A;
	SET_NEGATIVE(res & 0x80);
	status = (status & 0x3F) | (uint8_t)(m & 0xC0);
	SET_ZERO(!res);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movq -0x18(%rbp), %rcx
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
movzbl (%rcx), %ecx
andl %ecx, %eax
movb %al, -0xc(%rbp)
movzbl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x73b1
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x73c9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movzbl 0x12(%rax), %ecx
andl $0x3f, %ecx
movzbl -0xb(%rbp), %edx
andl $0xc0, %edx
movzbl %dl, %edx
orl %edx, %ecx
movb %cl, 0x12(%rax)
cmpb $0x0, -0xc(%rbp)
jne 0x7403
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7418
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_BRK(unsigned short)
void mos6502::Op_BRK(uint16_t src)
{
	pc++;
	StackPush((pc >> 8) & 0xFF);
	StackPush(pc & 0xFF);
	StackPush(status | BREAK);
	SET_INTERRUPT(1);
	pc = (Read(irqVectorH) << 8) + Read(irqVectorL);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movw 0x10(%rdi), %ax
addw $0x1, %ax
movw %ax, 0x10(%rdi)
movzwl 0x10(%rdi), %eax
sarl $0x8, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x18(%rbp), %rdi
movzwl 0x10(%rdi), %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x18(%rbp), %rdi
movzbl 0x12(%rdi), %eax
orl $0x10, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x18(%rbp), %rdi
movzbl 0x12(%rdi), %eax
orl $0x4, %eax
movb %al, 0x12(%rdi)
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x34e0
movq -0x18(%rbp), %rdi
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x1c(%rbp)
movl $0xfffe, %esi           # imm = 0xFFFE
callq 0x34e0
movl -0x1c(%rbp), %ecx
movb %al, %dl
movq -0x18(%rbp), %rax
movzbl %dl, %edx
addl %edx, %ecx
movw %cx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_CMP(unsigned short)
void mos6502::Op_CMP(uint16_t src)
{
	unsigned int tmp = A - Read(src);
	SET_CARRY(tmp < 0x100);
	SET_NEGATIVE(tmp & 0x80);
	SET_ZERO(!(tmp & 0xFF));
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movzbl (%rdi), %eax
movl %eax, -0x14(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movl -0x14(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movl %eax, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp)     # imm = 0x100
jae 0x7739
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x774e
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movl -0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7775
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x778d
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
movl -0x10(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
jne 0x77b1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x77c6
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_CPX(unsigned short)
void mos6502::Op_CPX(uint16_t src)
{
	unsigned int tmp = X - Read(src);
	SET_CARRY(tmp < 0x100);
	SET_NEGATIVE(tmp & 0x80);
	SET_ZERO(!(tmp & 0xFF));
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movzbl 0x1(%rdi), %eax
movl %eax, -0x14(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movl -0x14(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movl %eax, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp)     # imm = 0x100
jae 0x782a
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x783f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movl -0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7866
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x787e
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
movl -0x10(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
jne 0x78a2
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x78b7
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_CPY(unsigned short)
void mos6502::Op_CPY(uint16_t src)
{
	unsigned int tmp = Y - Read(src);
	SET_CARRY(tmp < 0x100);
	SET_NEGATIVE(tmp & 0x80);
	SET_ZERO(!(tmp & 0xFF));
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movzbl 0x2(%rdi), %eax
movl %eax, -0x14(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movl -0x14(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movl %eax, -0x10(%rbp)
cmpl $0x100, -0x10(%rbp)     # imm = 0x100
jae 0x791a
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x792f
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movl -0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7956
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x796e
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
movl -0x10(%rbp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
jne 0x7992
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x79a7
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_DEC(unsigned short)
void mos6502::Op_DEC(uint16_t src)
{
	uint8_t m = Read(src);
	m = (m - 1) % 256;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
subl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7a15
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7a2d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7a4a
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7a5f
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rdi
movzwl -0xa(%rbp), %eax
movl %eax, %esi
movzbl -0xb(%rbp), %eax
movl %eax, %edx
callq 0x3ad0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_DEX(unsigned short)
void mos6502::Op_DEX(uint16_t src)
{
	uint8_t m = X;
	m = (m - 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    X = m;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x1(%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
subl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7ad9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7af1
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7b0e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7b23
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x1(%rax)
popq %rbp
retq
nop
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_DEY(unsigned short)
void mos6502::Op_DEY(uint16_t src)
{
	uint8_t m = Y;
	m = (m - 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Y = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x2(%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
subl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7b89
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7ba1
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7bbe
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7bd3
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x2(%rax)
popq %rbp
retq
nop
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_EOR(unsigned short)
void mos6502::Op_EOR(uint16_t src)
{
	uint8_t m = Read(src);
	m = A ^ m;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, -0xb(%rbp)
movzbl (%rax), %eax
movzbl -0xb(%rbp), %ecx
xorl %ecx, %eax
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7c43
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7c5b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7c78
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7c8d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_INC(unsigned short)
void mos6502::Op_INC(uint16_t src)
{
	uint8_t m = Read(src);
	m = (m + 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
addl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7d05
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7d1d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7d3a
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7d4f
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rdi
movzwl -0xa(%rbp), %eax
movl %eax, %esi
movzbl -0xb(%rbp), %eax
movl %eax, %edx
callq 0x3ad0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_INX(unsigned short)
void mos6502::Op_INX(uint16_t src)
{
	uint8_t m = X;
	m = (m + 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    X = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x1(%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
addl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7dc9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7de1
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7dfe
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7e13
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x1(%rax)
popq %rbp
retq
nop
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_INY(unsigned short)
void mos6502::Op_INY(uint16_t src)
{
	uint8_t m = Y;
	m = (m + 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Y = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x2(%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
addl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7e79
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x7e91
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x7eae
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x7ec3
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x2(%rax)
popq %rbp
retq
nop
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_ABI()
uint16_t mos6502::Addr_ABI()
{
	uint16_t addrL;
	uint16_t addrH;
	uint16_t effL;
	uint16_t effH;
	uint16_t abs;
	uint16_t addr;
	
	addrL = Read(pc++);
	addrH = Read(pc++);
	
	abs = (addrH << 8) | addrL;
	
	effL = Read(abs);
	effH = Read((abs & 0xFF00) + ((abs + 1) & 0x00FF) );
	
	addr = effL + 0x100 * effH;
	
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movw 0x10(%rdi), %ax
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x10(%rdi)
movzwl %ax, %eax
movl %eax, %esi
callq 0x34e0
movq -0x20(%rbp), %rdi
movzbl %al, %eax
movw %ax, -0xa(%rbp)
movw 0x10(%rdi), %ax
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x10(%rdi)
movzwl %ax, %eax
movl %eax, %esi
callq 0x34e0
movq -0x20(%rbp), %rdi
movzbl %al, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
shll $0x8, %eax
movzwl -0xa(%rbp), %ecx
orl %ecx, %eax
movw %ax, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movq -0x20(%rbp), %rdi
movzbl %al, %eax
movw %ax, -0xe(%rbp)
movzwl -0x12(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x12(%rbp), %ecx
addl $0x1, %ecx
andl $0xff, %ecx
addl %ecx, %eax
movslq %eax, %rsi
callq 0x34e0
movzbl %al, %eax
movw %ax, -0x10(%rbp)
movzwl -0xe(%rbp), %eax
movzwl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movw %ax, -0x14(%rbp)
movw -0x14(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_JSR(unsigned short)
void mos6502::Op_JSR(uint16_t src)
{
	pc--;
	StackPush((pc >> 8) & 0xFF);
	StackPush(pc & 0xFF);
	pc = src;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movw 0x10(%rdi), %ax
addw $-0x1, %ax
movw %ax, 0x10(%rdi)
movzwl 0x10(%rdi), %eax
sarl $0x8, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x18(%rbp), %rdi
movzwl 0x10(%rdi), %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x18(%rbp), %rax
movw -0xa(%rbp), %cx
movw %cx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDA(unsigned short)
void mos6502::Op_LDA(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8081
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8099
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x80b6
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x80cb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDX(unsigned short)
void mos6502::Op_LDX(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8131
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8149
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x8166
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x817b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x1(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDY(unsigned short)
void mos6502::Op_LDY(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	Y = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8241
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8259
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x8276
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x828b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x2(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LSR(unsigned short)
void mos6502::Op_LSR(uint16_t src)
{
	uint8_t m = Read(src);
	SET_CARRY(m & 0x01);
	m >>= 1;
	SET_NEGATIVE(0);
	SET_ZERO(!m);
	Write(src, m);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x82ec
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x8301
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movzbl -0xb(%rbp), %ecx
sarl %ecx
movb %cl, -0xb(%rbp)
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x8338
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x834d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rdi
movzwl -0xa(%rbp), %eax
movl %eax, %esi
movzbl -0xb(%rbp), %eax
movl %eax, %edx
callq 0x3ad0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LSR_ACC(unsigned short)
void mos6502::Op_LSR_ACC(uint16_t src)
{
	uint8_t m = A;
	SET_CARRY(m & 0x01);
	m >>= 1;
	SET_NEGATIVE(0);
	SET_ZERO(!m);
	A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb (%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x83af
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x83c4
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movzbl -0xb(%rbp), %ecx
sarl %ecx
movb %cl, -0xb(%rbp)
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x83fb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x8410
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ORA(unsigned short)
void mos6502::Op_ORA(uint16_t src)
{
	uint8_t m = Read(src);
	m = A | m;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, -0xb(%rbp)
movzbl (%rax), %eax
movzbl -0xb(%rbp), %ecx
orl %ecx, %eax
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x84a3
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x84bb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x84d8
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x84ed
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_PLA(unsigned short)
void mos6502::Op_PLA(uint16_t src)
{
	A = StackPop();
	SET_NEGATIVE(A & 0x80);
    SET_ZERO(!A);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x9b90
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x85af
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x85c7
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x85e7
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x85fc
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROL(unsigned short)
void mos6502::Op_ROL(uint16_t src)
{
	uint16_t m = Read(src);
    m <<= 1;
    if (IF_CARRY()) m |= 0x01;
    SET_CARRY(m > 0xFF);
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movq -0x18(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0xc(%rbp)
movzwl -0xc(%rbp), %ecx
shll %ecx
movw %cx, -0xc(%rbp)
movzbl 0x12(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x86a1
movb $0x1, %al
testb $0x1, %al
jne 0x86a9
jmp 0x86b4
xorl %eax, %eax
testb $0x1, %al
jne 0x86a9
jmp 0x86b4
movzwl -0xc(%rbp), %eax
orl $0x1, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
cmpl $0xff, %eax
jle 0x86d6
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x86eb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movzwl -0xc(%rbp), %eax
andl $0xff, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8720
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8738
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpw $0x0, -0xc(%rbp)
jne 0x8756
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x876b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rdi
movzwl -0xa(%rbp), %eax
movl %eax, %esi
movzwl -0xc(%rbp), %eax
movl %eax, %edx
callq 0x3ad0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROL_ACC(unsigned short)
void mos6502::Op_ROL_ACC(uint16_t src)
{
	uint16_t m = A;
    m <<= 1;
    if (IF_CARRY()) m |= 0x01;
    SET_CARRY(m > 0xFF);
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movzbl (%rax), %ecx
movw %cx, -0xc(%rbp)
movzwl -0xc(%rbp), %ecx
shll %ecx
movw %cx, -0xc(%rbp)
movzbl 0x12(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x87cc
movb $0x1, %al
testb $0x1, %al
jne 0x87d4
jmp 0x87df
xorl %eax, %eax
testb $0x1, %al
jne 0x87d4
jmp 0x87df
movzwl -0xc(%rbp), %eax
orl $0x1, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
cmpl $0xff, %eax
jle 0x8801
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x8816
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movzwl -0xc(%rbp), %eax
andl $0xff, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x884b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8863
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpw $0x0, -0xc(%rbp)
jne 0x8881
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x8896
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movw -0xc(%rbp), %cx
movb %cl, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROR(unsigned short)
void mos6502::Op_ROR(uint16_t src)
{
	uint16_t m = Read(src);
    if (IF_CARRY()) m |= 0x100;
    SET_CARRY(m & 0x01);
    m >>= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, %esi
callq 0x34e0
movb %al, %cl
movq -0x18(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0xc(%rbp)
movzbl 0x12(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x88f7
movb $0x1, %al
testb $0x1, %al
jne 0x88ff
jmp 0x890c
xorl %eax, %eax
testb $0x1, %al
jne 0x88ff
jmp 0x890c
movzwl -0xc(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x892f
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x8944
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movzwl -0xc(%rbp), %eax
sarl %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0xff, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8983
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x899b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpw $0x0, -0xc(%rbp)
jne 0x89b9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x89ce
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rdi
movzwl -0xa(%rbp), %eax
movl %eax, %esi
movzwl -0xc(%rbp), %eax
movl %eax, %edx
callq 0x3ad0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ROR_ACC(unsigned short)
void mos6502::Op_ROR_ACC(uint16_t src)
{
	uint16_t m = A;
    if (IF_CARRY()) m |= 0x100;
    SET_CARRY(m & 0x01);
    m >>= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movzbl (%rax), %ecx
movw %cx, -0xc(%rbp)
movzbl 0x12(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8a22
movb $0x1, %al
testb $0x1, %al
jne 0x8a2a
jmp 0x8a37
xorl %eax, %eax
testb $0x1, %al
jne 0x8a2a
jmp 0x8a37
movzwl -0xc(%rbp), %eax
orl $0x100, %eax            # imm = 0x100
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8a5a
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x12(%rax)
jmp 0x8a6f
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x2, %ecx
movb %cl, 0x12(%rax)
movzwl -0xc(%rbp), %eax
sarl %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0xff, %eax
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8aae
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8ac6
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpw $0x0, -0xc(%rbp)
jne 0x8ae4
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x8af9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movw -0xc(%rbp), %cx
movb %cl, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_RTI(unsigned short)
void mos6502::Op_RTI(uint16_t src)
{
	uint8_t lo, hi;
	
	status = StackPop();
	
	lo = StackPop();
	hi = StackPop();
	
	pc = (hi << 8) | lo;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x9b90
movq -0x18(%rbp), %rdi
movb %al, 0x12(%rdi)
callq 0x9b90
movq -0x18(%rbp), %rdi
movb %al, -0xb(%rbp)
callq 0x9b90
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, -0xc(%rbp)
movzbl -0xc(%rbp), %ecx
shll $0x8, %ecx
movzbl -0xb(%rbp), %edx
orl %edx, %ecx
movw %cx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_RTS(unsigned short)
void mos6502::Op_RTS(uint16_t src)
{
	uint8_t lo, hi;
	
	lo = StackPop();
	hi = StackPop();
	
	pc = ((hi << 8) | lo) + 1;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x9b90
movq -0x18(%rbp), %rdi
movb %al, -0xb(%rbp)
callq 0x9b90
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, -0xc(%rbp)
movzbl -0xc(%rbp), %ecx
shll $0x8, %ecx
movzbl -0xb(%rbp), %edx
orl %edx, %ecx
addl $0x1, %ecx
movw %cx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TAX(unsigned short)
void mos6502::Op_TAX(uint16_t src)
{
	uint8_t m = A;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb (%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8ed4
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8eec
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x8f09
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x8f1e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x1(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TAY(unsigned short)
void mos6502::Op_TAY(uint16_t src)
{
	uint8_t m = A;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	Y = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb (%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x8f74
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x8f8c
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x8fa9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x8fbe
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x2(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TSX(unsigned short)
void mos6502::Op_TSX(uint16_t src)
{
	uint8_t m = sp;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rax), %rax
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x9016
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x902e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x904b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x9060
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, 0x1(%rax)
popq %rbp
retq
nopl (%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TXA(unsigned short)
void mos6502::Op_TXA(uint16_t src)
{
	uint8_t m = X;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x1(%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x90b5
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x90cd
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x90ea
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x90ff
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_TYA(unsigned short)
void mos6502::Op_TYA(uint16_t src)
{
	uint8_t m = Y;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	A = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movb 0x2(%rax), %al
movb %al, -0xb(%rbp)
movzbl -0xb(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x9175
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x80, %ecx
movb %cl, 0x12(%rax)
jmp 0x918d
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movb %cl, 0x12(%rax)
cmpb $0x0, -0xb(%rbp)
jne 0x91aa
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x12(%rax)
jmp 0x91bf
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x12, %rcx
movzbl 0x12(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x12(%rax)
movq -0x18(%rbp), %rax
movb -0xb(%rbp), %cl
movb %cl, (%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Reset()
void mos6502::Reset()
{
	A = 0x00;
	Y = 0x00;
	X = 0x00;
	
	pc = (Read(rstVectorH) << 8) + Read(rstVectorL); // load PC from reset vector
		
    sp = 0xFD;
    
    status |= CONSTANT;
    
	cycles = 6; // according to the datasheet, the reset routine takes 6 clock cycles

	illegalOpcode = false;
	
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movb $0x0, (%rdi)
movb $0x0, 0x2(%rdi)
movb $0x0, 0x1(%rdi)
movl $0xfffd, %esi           # imm = 0xFFFD
callq 0x34e0
movq -0x10(%rbp), %rdi
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x14(%rbp)
movl $0xfffc, %esi           # imm = 0xFFFC
callq 0x34e0
movl -0x14(%rbp), %ecx
movb %al, %dl
movq -0x10(%rbp), %rax
movzbl %dl, %edx
addl %edx, %ecx
movw %cx, 0x10(%rax)
movq $0xfd, 0x8(%rax)
movzbl 0x12(%rax), %ecx
orl $0x20, %ecx
movb %cl, 0x12(%rax)
movl $0x6, 0x14(%rax)
movb $0x0, 0x2018(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::IRQ()
void mos6502::IRQ()
{
	if(!IF_INTERRUPT())
	{
		SET_BREAK(0);
		StackPush((pc >> 8) & 0xFF);
		StackPush(pc & 0xFF);
		StackPush(status);
		SET_INTERRUPT(1);
		pc = (Read(irqVectorH) << 8) + Read(irqVectorL);
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movzbl 0x12(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x927c
movb $0x1, %al
testb $0x1, %al
jne 0x9310
jmp 0x9288
xorl %eax, %eax
testb $0x1, %al
jne 0x9310
jmp 0x9288
movq -0x10(%rbp), %rdi
movzbl 0x12(%rdi), %eax
andl $-0x11, %eax
movb %al, 0x12(%rdi)
movzwl 0x10(%rdi), %eax
sarl $0x8, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x10(%rbp), %rdi
movzwl 0x10(%rdi), %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x10(%rbp), %rax
movq %rax, %rdi
movzbl 0x12(%rax), %esi
callq 0x9b30
movq -0x10(%rbp), %rdi
movzbl 0x12(%rdi), %eax
orl $0x4, %eax
movb %al, 0x12(%rdi)
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x34e0
movq -0x10(%rbp), %rdi
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x14(%rbp)
movl $0xfffe, %esi           # imm = 0xFFFE
callq 0x34e0
movl -0x14(%rbp), %ecx
movb %al, %dl
movq -0x10(%rbp), %rax
movzbl %dl, %edx
addl %edx, %ecx
movw %cx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::NMI()
void mos6502::NMI()
{
	SET_BREAK(0);
	StackPush((pc >> 8) & 0xFF);
	StackPush(pc & 0xFF);
	StackPush(status);
	SET_INTERRUPT(1);
	pc = (Read(nmiVectorH) << 8) + Read(nmiVectorL);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movzbl 0x12(%rdi), %eax
andl $-0x11, %eax
movb %al, 0x12(%rdi)
movzwl 0x10(%rdi), %eax
sarl $0x8, %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x10(%rbp), %rdi
movzwl 0x10(%rdi), %eax
andl $0xff, %eax
movzbl %al, %esi
callq 0x9b30
movq -0x10(%rbp), %rax
movq %rax, %rdi
movzbl 0x12(%rax), %esi
callq 0x9b30
movq -0x10(%rbp), %rdi
movzbl 0x12(%rdi), %eax
orl $0x4, %eax
movb %al, 0x12(%rdi)
movl $0xfffb, %esi           # imm = 0xFFFB
callq 0x34e0
movq -0x10(%rbp), %rdi
movzbl %al, %eax
shll $0x8, %eax
movl %eax, -0x14(%rbp)
movl $0xfffa, %esi           # imm = 0xFFFA
callq 0x34e0
movl -0x14(%rbp), %ecx
movb %al, %dl
movq -0x10(%rbp), %rax
movzbl %dl, %edx
addl %edx, %ecx
movw %cx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop