LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: hamikm[P]Raytracer/src/camera.hh
// Function: camera<double, double, 3>::getRayForPixel(int, int, int, int) const
ray<vec_T, time_T, dim> getRayForPixel(int x, int y,
			int width, int height) const {
		assert(x >= 0);
		assert(y >= 0);
		assert(width > 0);
		assert(height > 0);
		vec_T centerx = ((vec_T) width) / height / 2;
	    mvector<vec_T, dim> pixelDir = dist * dir +
	    		(0.5 - (vec_T) y / (vec_T) (height - 1)) * up +
				((vec_T) x / (vec_T) (height - 1) - centerx) * right;

	    ray<vec_T, time_T, dim> pixelRay(pos, pixelDir);
	    return pixelRay;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0xb8(%rbp)
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0xdfa5
jmp 0xdfc4
leaq 0x2601(%rip), %rdi      # 0x105ad
leaq 0x30c2(%rip), %rsi      # 0x11075
movl $0x6a, %edx
leaq 0x30c4(%rip), %rcx      # 0x11083
callq 0x3140
cmpl $0x0, -0x18(%rbp)
jl 0xdfcc
jmp 0xdfeb
leaq 0x3137(%rip), %rdi      # 0x1110a
leaq 0x309b(%rip), %rsi      # 0x11075
movl $0x6b, %edx
leaq 0x309d(%rip), %rcx      # 0x11083
callq 0x3140
cmpl $0x0, -0x1c(%rbp)
jle 0xdff3
jmp 0xe012
leaq 0x3117(%rip), %rdi      # 0x11111
leaq 0x3074(%rip), %rsi      # 0x11075
movl $0x6c, %edx
leaq 0x3076(%rip), %rcx      # 0x11083
callq 0x3140
cmpl $0x0, -0x20(%rbp)
jle 0xe01a
jmp 0xe039
leaq 0x260a(%rip), %rdi      # 0x1062b
leaq 0x304d(%rip), %rsi      # 0x11075
movl $0x6d, %edx
leaq 0x304f(%rip), %rcx      # 0x11083
callq 0x3140
movq -0xa8(%rbp), %rsi
cvtsi2sdl -0x1c(%rbp), %xmm0
cvtsi2sdl -0x20(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x1fca(%rip), %xmm1     # 0x10020
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x68(%rsi), %xmm0
addq $0x18, %rsi
leaq -0x70(%rbp), %rdi
callq 0xeac0
movq -0xa8(%rbp), %rsi
cvtsi2sdl -0x18(%rbp), %xmm1
movl -0x20(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movsd 0x1f85(%rip), %xmm0     # 0x10018
subsd %xmm1, %xmm0
addq $0x38, %rsi
leaq -0x88(%rbp), %rdi
callq 0xeac0
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x8910
movq -0xa8(%rbp), %rsi
cvtsi2sdl -0x14(%rbp), %xmm0
movl -0x20(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
subsd -0x28(%rbp), %xmm0
addq $0x50, %rsi
leaq -0xa0(%rbp), %rdi
callq 0xeac0
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x8910
movq -0xb8(%rbp), %rdi
movq -0xa8(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq 0x8870
movq -0xb0(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: hamikm[P]Raytracer/src/rgbcolor.hh
// Function: rgbcolor<double>::operator*=(double)
rgbcolor & operator*=(T scalar) {
		r *= scalar;
		g *= scalar;
		b *= scalar;
		return *this;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsd -0x10(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movsd -0x10(%rbp), %xmm0
mulsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movsd -0x10(%rbp), %xmm0
mulsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
popq %rbp
retq
nop
// File: hamikm[P]Raytracer/src/rgbcolor.hh
// Function: rgbcolor<double>::clamp(double, double)
void clamp(T minv, T maxv) {
		assert(maxv > minv);
		if(r < minv) {
			r = minv;
		}
		if(g < minv) {
			g = minv;
		}
		if(b < minv) {
			b = minv;
		}
		if(r > maxv) {
			r = maxv;
		}
		if(g > maxv) {
			g = maxv;
		}
		if(b > maxv) {
			b = maxv;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0xe97c
jmp 0xe99b
leaq 0x2a06(%rip), %rdi      # 0x11389
leaq 0x18e5(%rip), %rsi      # 0x1026f
movl $0xf9, %edx
leaq 0x29ff(%rip), %rcx      # 0x11395
callq 0x3140
movq -0x20(%rbp), %rax
movsd (%rax), %xmm1
movsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xe9bb
movq -0x20(%rbp), %rax
movsd -0x10(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm1
movsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xe9dd
movq -0x20(%rbp), %rax
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x20(%rbp), %rax
movsd 0x10(%rax), %xmm1
movsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xe9ff
movq -0x20(%rbp), %rax
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0xea1b
movq -0x20(%rbp), %rax
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0xea39
movq -0x20(%rbp), %rax
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x20(%rbp), %rax
movsd 0x10(%rax), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0xea57
movq -0x20(%rbp), %rax
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: hamikm[P]Raytracer/src/mvector.hh
// Function: mvector<double, 3> const operator*<double, 3>(double, mvector<double, 3> const&)
const mvector<T, size> operator*(T scalar, const mvector<T, size> &rhs) {
	mvector<T, size> tmp = rhs;
	for (int i = 0; i < rhs.dim(); i++)
		tmp[i] *= scalar;
	return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, %rax
movq %rax, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rsi
callq 0x7570
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
callq 0x79b0
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jge 0xeb36
movq -0x30(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movl -0x1c(%rbp), %esi
callq 0x5320
movsd -0x40(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xeaf0
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: hamikm[P]Raytracer/src/scene.hh
// Function: scene<double, double, double, 3>::findClosestShape(ray<double, double, 3> const&, double&) const
sp_shape findClosestShape(
			const ray<vec_T, time_T, dim> &r, time_T &tIntersect) const {
		time_T t = RAY_MISS;
		tIntersect = RAY_MISS;
		sp_shape intersectedObjPtr, tmpPtr;
		typename std::vector<sp_shape>::const_iterator iter;
		for (iter = shapes.begin(); iter < shapes.end(); iter++) {
			tmpPtr = *iter;
			t = tmpPtr->intersection(r);
			if (t != RAY_MISS && t > 0) {
				if (tIntersect == RAY_MISS) { // tIntersect starts at RAY_MISS
					tIntersect = t;
					intersectedObjPtr = tmpPtr;
				}
				else if (t < tIntersect) {
					intersectedObjPtr = tmpPtr;
					tIntersect = t;
				}
			}
		}
		return intersectedObjPtr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movsd 0x14c7(%rip), %xmm0     # 0x10040
movsd %xmm0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsd 0x14b6(%rip), %xmm0     # 0x10040
movsd %xmm0, (%rax)
movb $0x0, -0x29(%rbp)
callq 0x5d90
leaq -0x40(%rbp), %rdi
callq 0x5d90
leaq -0x48(%rbp), %rdi
callq 0xf380
movq -0x78(%rbp), %rdi
addq $0x30, %rdi
callq 0xf3a0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x78(%rbp), %rdi
addq $0x30, %rdi
callq 0xf410
movq %rax, -0x58(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xf3d0
testb $0x1, %al
jne 0xebe9
jmp 0xed08
leaq -0x48(%rbp), %rdi
callq 0xf440
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xf460
movq -0x98(%rbp), %rdi
callq 0xee00
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
movsd %xmm0, -0x90(%rbp)
jmp 0xec2b
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x13fb(%rip), %xmm1     # 0x10040
ucomisd %xmm1, %xmm0
jne 0xec52
jp 0xec52
jmp 0xecf2
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xecf2
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x13cc(%rip), %xmm1     # 0x10040
ucomisd %xmm1, %xmm0
jne 0xecbe
jp 0xecbe
movq -0x88(%rbp), %rdi
movsd -0x28(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
leaq -0x40(%rbp), %rsi
callq 0xf460
jmp 0xecf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4ef0
movq -0x88(%rbp), %rdi
callq 0x4ef0
jmp 0xed34
movsd -0x28(%rbp), %xmm1
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xecee
movq -0x88(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xf460
movsd -0x28(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0xecf0
jmp 0xecf2
jmp 0xecf4
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0xf4b0
movq %rax, -0x70(%rbp)
jmp 0xebc2
movb $0x1, -0x29(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4ef0
testb $0x1, -0x29(%rbp)
jne 0xed27
movq -0x88(%rbp), %rdi
callq 0x4ef0
movq -0x80(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x3380
nopl (%rax)
// File: hamikm[P]Raytracer/src/rgbcolor.hh
// Function: rgbcolor<double>::operator+=(rgbcolor<double> const&)
rgbcolor & operator+=(const rgbcolor &rhs) {
		r += rhs.getR();
		g += rhs.getG();
		b += rhs.getB();
		return *this;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xea60
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rdi
callq 0xea80
movq -0x18(%rbp), %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0xeaa0
movq -0x18(%rbp), %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: hamikm[P]Raytracer/src/mvector.hh
// Function: mvector<double, 3>::operator-() const
const mvector<T, size> operator-() const {
		mvector tmp = *this;
		for (int i = 0; i < size; i++)
			tmp[i] *= -1;
		return tmp;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
callq 0x7570
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0xf198
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5320
movsd 0xebb(%rip), %xmm0      # 0x10040
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf16b
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: lagoproject[P]arti/analysis/cherenkov.cc
// Function: Usage(char*, int)
void Usage(char *prog, int verbose=0) {
  cout << endl << "analysis.cc, from ARTI     version " << VERSION << endl<< endl;
  cout << "  Read ascii files containing Corsika Cherenkov outputs (CER) and produce a histogram" << endl; 
  cout << "  of photon density as a function of distance to core." << endl; 
  cout << "  Usage: " << prog << " [flags] raw_file" << endl;
  cout << "    If 'raw_file' does not exits, switch to STDIN and use raw_file as" << endl;
  cout << "    basename for output file." << endl;
  cout << "    flags:"<<endl;
  cout << "      -c <CERARY input line> : CERARY line (expects complete line!) from input file" << endl;
  cout << "      -v: enable verbose outputs"<<endl; 
  cout << "      -h: prints help and exits"<<endl << endl;
//  cout << "    * STILL NOT IMPLEMENTED"<<endl;
  if (verbose) {
    // verbose help
  }
  exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0x3c02(%rip), %rdi      # 0x4fc8
movq 0x3be3(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq %rax, %rdi
leaq 0x1cb4(%rip), %rsi      # 0x3090
callq 0x1080
movq %rax, %rdi
leaq 0x1cc9(%rip), %rsi      # 0x30b4
callq 0x1080
movq %rax, %rdi
movq 0x3bb6(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq %rax, %rdi
movq 0x3ba7(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3bb3(%rip), %rdi      # 0x4fc8
leaq 0x1c9d(%rip), %rsi      # 0x30b9
callq 0x1080
movq %rax, %rdi
movq 0x3b85(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3b91(%rip), %rdi      # 0x4fc8
leaq 0x1cd1(%rip), %rsi      # 0x310f
callq 0x1080
movq %rax, %rdi
movq 0x3b63(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3b6f(%rip), %rdi      # 0x4fc8
leaq 0x1ce6(%rip), %rsi      # 0x3146
callq 0x1080
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x1080
movq %rax, %rdi
leaq 0x1cd5(%rip), %rsi      # 0x3150
callq 0x1080
movq %rax, %rdi
movq 0x3b26(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3b32(%rip), %rdi      # 0x4fc8
leaq 0x1cc5(%rip), %rsi      # 0x3162
callq 0x1080
movq %rax, %rdi
movq 0x3b04(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3b10(%rip), %rdi      # 0x4fc8
leaq 0x1ce9(%rip), %rsi      # 0x31a8
callq 0x1080
movq %rax, %rdi
movq 0x3ae2(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3aee(%rip), %rdi      # 0x4fc8
leaq 0x1ce5(%rip), %rsi      # 0x31c6
callq 0x1080
movq %rax, %rdi
movq 0x3ac0(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3acc(%rip), %rdi      # 0x4fc8
leaq 0x1cce(%rip), %rsi      # 0x31d1
callq 0x1080
movq %rax, %rdi
movq 0x3a9e(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3aaa(%rip), %rdi      # 0x4fc8
leaq 0x1d00(%rip), %rsi      # 0x3225
callq 0x1080
movq %rax, %rdi
movq 0x3a7c(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq 0x3a88(%rip), %rdi      # 0x4fc8
leaq 0x1cff(%rip), %rsi      # 0x3246
callq 0x1080
movq %rax, %rdi
movq 0x3a5a(%rip), %rsi      # 0x4fb0
callq 0x10a0
movq %rax, %rdi
movq 0x3a4b(%rip), %rsi      # 0x4fb0
callq 0x10a0
cmpl $0x0, -0xc(%rbp)
je 0x1572
jmp 0x1572
movl $0x1, %edi
callq 0x10d0
nopl (%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl 0x1(%rax), %ecx
movw %cx, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
addl %ecx, %eax
andl $0xff, %eax
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x15(%rbp), %eax
movzwl %ax, %esi
callq 0xe4a0
movb %al, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x15(%rbp), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, -0x17(%rbp)
movzbl -0x16(%rbp), %ecx
movzbl -0x17(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x1a(%rbp)
movzbl (%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, %cl
movl -0x20(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x11(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movzwl %ax, %esi
callq 0xe4a0
movq -0x20(%rbp), %rdi
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movq -0x20(%rbp), %rdi
movb %al, -0x11(%rbp)
movw 0x6(%rdi), %ax
addw $0x1, %ax
movw %ax, 0x6(%rdi)
movzbl (%rdi), %eax
movzbl -0x11(%rbp), %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x12(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzwl -0x12(%rbp), %ecx
movzwl -0x14(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x16(%rbp)
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x16(%rbp), %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, %cl
movl -0x1c(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl 0x2(%rax), %ecx
movw %cx, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movzbl %al, %eax
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %eax
addl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movw %dx, %ax
movzwl %ax, %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x18(%rbp)
movzwl -0x16(%rbp), %ecx
movzwl -0x18(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x1a(%rbp)
movzbl (%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %eax
movzwl -0x12(%rbp), %ecx
addl %ecx, %eax
movzwl %ax, %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, %cl
movl -0x20(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movq -0x20(%rbp), %rcx
movb %al, -0x11(%rbp)
movb 0x1(%rcx), %al
movb %al, -0x12(%rbp)
movw 0x6(%rcx), %ax
addw $0x1, %ax
movw %ax, 0x6(%rcx)
movzbl -0x11(%rbp), %eax
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x20(%rbp), %rax
movw %dx, %cx
movw %cx, -0x14(%rbp)
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movq -0x20(%rbp), %rdi
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x11(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x12(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl -0x11(%rbp), %ecx
movzbl -0x12(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x14(%rbp)
movzbl 0x2(%rax), %edx
movzwl -0x14(%rbp), %ecx
addl %edx, %ecx
movw %cx, -0x14(%rbp)
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movq -0x20(%rbp), %rdi
movb %al, %cl
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, (%rdi)
movl $0xff, %edx
movl %edx, %esi
callq 0x8fb0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl 0x1(%rax), %ecx
movw %cx, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x30(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
addl %ecx, %eax
andl $0xff, %eax
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x15(%rbp), %eax
movzwl %ax, %esi
callq 0xe4a0
movb %al, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x15(%rbp), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xe4a0
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, -0x17(%rbp)
movzbl -0x16(%rbp), %ecx
movzbl -0x17(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x1a(%rbp)
movb (%rax), %al
movb %al, -0x1b(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %esi
callq 0xe4a0
movq -0x30(%rbp), %rdi
movb %al, -0x1c(%rbp)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x1c(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
callq 0x9a70
movb %al, %cl
movl -0x34(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x20(%rbp)
movzwl -0x20(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x30(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x1d(%rbp)
movzbl -0x1b(%rbp), %ecx
movzbl -0x1c(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x23(%rbp)
jne 0x6800
movzbl -0x1b(%rbp), %eax
movzbl -0x1d(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x23(%rbp)
movq -0x30(%rbp), %rdi
movb -0x23(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb $0x0, -0x22(%rbp)
movzwl -0x20(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
movzbl %al, %esi
movzbl -0x21(%rbp), %edx
callq 0x8fb0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, -0x11(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movb (%rax), %al
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x11(%rbp), %eax
movzwl %ax, %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, -0x13(%rbp)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x13(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
callq 0x9a70
movb %al, %cl
movl -0x2c(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x16(%rbp)
movzwl -0x16(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x14(%rbp)
movzbl -0x12(%rbp), %ecx
movzbl -0x13(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
jne 0x6915
movzbl -0x12(%rbp), %eax
movzbl -0x14(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movq -0x28(%rbp), %rdi
movb -0x19(%rbp), %al
andb $0x1, %al
movb %al, -0x17(%rbp)
movb $0x0, -0x18(%rbp)
movzwl -0x16(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x18(%rbp)
movb -0x18(%rbp), %al
movzbl %al, %esi
movzbl -0x17(%rbp), %edx
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_immediate(NES::MemoryUnit&)
void CPU::adc_immediate(MemoryUnit &r) {
    // Add to Accumulator: Immediate addressing
    // PC += 2
    instPtr++;
    uint8_t alpha = r.getByteAt(instPtr);
    instPtr++;
    uint16_t zeta = uint16_t(regAcc)+uint16_t(alpha)+\
                    uint16_t(getCarryFlag());
    uint8_t m=regAcc, n=alpha, res;
    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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, -0x11(%rbp)
movw 0x6(%rdi), %ax
addw $0x1, %ax
movw %ax, 0x6(%rdi)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x11(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
callq 0x9a70
movl -0x2c(%rbp), %ecx
movb %al, %dl
movq -0x28(%rbp), %rax
movzbl %dl, %edx
movzwl %dx, %edx
addl %edx, %ecx
movw %cx, -0x14(%rbp)
movb (%rax), %al
movb %al, -0x15(%rbp)
movb -0x11(%rbp), %al
movb %al, -0x16(%rbp)
movzwl -0x14(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x17(%rbp)
movzbl -0x15(%rbp), %ecx
movzbl -0x16(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1a(%rbp)
jne 0x6a16
movzbl -0x15(%rbp), %eax
movzbl -0x17(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1a(%rbp)
movq -0x28(%rbp), %rdi
movb -0x1a(%rbp), %al
andb $0x1, %al
movb %al, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movzwl -0x14(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
movzbl %al, %esi
movzbl -0x18(%rbp), %edx
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x12(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzwl -0x12(%rbp), %ecx
movzwl -0x14(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x16(%rbp)
movb (%rax), %al
movb %al, -0x17(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x16(%rbp), %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, -0x18(%rbp)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x18(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
callq 0x9a70
movb %al, %cl
movl -0x2c(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x1c(%rbp)
movzwl -0x1c(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x17(%rbp), %ecx
movzbl -0x18(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1f(%rbp)
jne 0x6b5d
movzbl -0x17(%rbp), %eax
movzbl -0x19(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1f(%rbp)
movq -0x28(%rbp), %rdi
movb -0x1f(%rbp), %al
andb $0x1, %al
movb %al, -0x1d(%rbp)
movb $0x0, -0x1e(%rbp)
movzwl -0x1c(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x1e(%rbp)
movb -0x1e(%rbp), %al
movzbl %al, %esi
movzbl -0x1d(%rbp), %edx
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl 0x2(%rax), %ecx
movw %cx, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x30(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movzbl %al, %eax
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %eax
addl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movw %dx, %ax
movzwl %ax, %esi
callq 0xe4a0
movb %al, %cl
movq -0x30(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x18(%rbp)
movzwl -0x16(%rbp), %ecx
movzwl -0x18(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x1a(%rbp)
movb (%rax), %al
movb %al, -0x1b(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %eax
movzwl -0x12(%rbp), %ecx
addl %ecx, %eax
movzwl %ax, %esi
callq 0xe4a0
movq -0x30(%rbp), %rdi
movb %al, -0x1c(%rbp)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x1c(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
callq 0x9a70
movb %al, %cl
movl -0x34(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x20(%rbp)
movzwl -0x20(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x30(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x1d(%rbp)
movzbl -0x1b(%rbp), %ecx
movzbl -0x1c(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x23(%rbp)
jne 0x6cd7
movzbl -0x1b(%rbp), %eax
movzbl -0x1d(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x23(%rbp)
movq -0x30(%rbp), %rdi
movb -0x23(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movb $0x0, -0x22(%rbp)
movzwl -0x20(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
movzbl %al, %esi
movzbl -0x21(%rbp), %edx
callq 0x8fb0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_zeropg_x(NES::MemoryUnit&)
void CPU::adc_zeropg_x(MemoryUnit &r) {
    // Add to the 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 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movq -0x28(%rbp), %rcx
movb %al, -0x11(%rbp)
movb 0x1(%rcx), %al
movb %al, -0x12(%rbp)
movw 0x6(%rcx), %ax
addw $0x1, %ax
movw %ax, 0x6(%rcx)
movzbl -0x11(%rbp), %eax
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movw %dx, %cx
movw %cx, -0x14(%rbp)
movb (%rax), %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, -0x16(%rbp)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x16(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
callq 0x9a70
movb %al, %cl
movl -0x2c(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x17(%rbp)
movzbl -0x15(%rbp), %ecx
movzbl -0x16(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1d(%rbp)
jne 0x6e03
movzbl -0x15(%rbp), %eax
movzbl -0x17(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1d(%rbp)
movq -0x28(%rbp), %rdi
movb -0x1d(%rbp), %al
andb $0x1, %al
movb %al, -0x1b(%rbp)
movb $0x0, -0x1c(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x1c(%rbp)
movb -0x1c(%rbp), %al
movzbl %al, %esi
movzbl -0x1b(%rbp), %edx
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::adc_absolute_y(NES::MemoryUnit&)
void CPU::adc_absolute_y(MemoryUnit &r) {
    // Add to the 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 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, -0x11(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, -0x12(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl -0x11(%rbp), %ecx
movzbl -0x12(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x14(%rbp)
movzbl 0x2(%rax), %edx
movzwl -0x14(%rbp), %ecx
addl %edx, %ecx
movw %cx, -0x14(%rbp)
movb (%rax), %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movq -0x28(%rbp), %rdi
movb %al, -0x16(%rbp)
movzbl (%rdi), %eax
movzwl %ax, %eax
movzbl -0x16(%rbp), %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
callq 0x9a70
movb %al, %cl
movl -0x2c(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x28(%rbp), %rax
movb %dl, %cl
movb %cl, (%rax)
movb (%rax), %al
movb %al, -0x17(%rbp)
movzbl -0x15(%rbp), %ecx
movzbl -0x16(%rbp), %eax
xorl %eax, %ecx
andl $0x80, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1d(%rbp)
jne 0x6f53
movzbl -0x15(%rbp), %eax
movzbl -0x17(%rbp), %ecx
xorl %ecx, %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1d(%rbp)
movq -0x28(%rbp), %rdi
movb -0x1d(%rbp), %al
andb $0x1, %al
movb %al, -0x1b(%rbp)
movb $0x0, -0x1c(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x1c(%rbp)
movb -0x1c(%rbp), %al
movzbl %al, %esi
movzbl -0x1b(%rbp), %edx
callq 0x8fb0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl 0x1(%rax), %ecx
movw %cx, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
addl %ecx, %eax
andl $0xff, %eax
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x15(%rbp), %eax
movzwl %ax, %esi
callq 0xe4a0
movb %al, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x15(%rbp), %eax
addl $0x1, %eax
movzwl %ax, %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, -0x17(%rbp)
movzbl -0x16(%rbp), %ecx
movzbl -0x17(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x1a(%rbp)
movq -0x10(%rbp), %rdi
movw -0x1a(%rbp), %cx
movzwl %cx, %esi
movzbl (%rax), %edx
callq 0xe420
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x11(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzbl -0x11(%rbp), %ecx
movzwl %cx, %esi
movzbl (%rax), %edx
callq 0xe420
addq $0x20, %rsp
popq %rbp
retq
nop
// File: nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::sta_absolute(NES::MemoryUnit&)
void CPU::sta_absolute(MemoryUnit &r) {
    // Store contents of accumulator to address: 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));
    r.setByteAt(addr, regAcc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x12(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzwl -0x12(%rbp), %ecx
movzwl -0x14(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movw -0x16(%rbp), %cx
movzwl %cx, %esi
movzbl (%rax), %edx
callq 0xe420
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl 0x2(%rax), %ecx
movw %cx, -0x12(%rbp)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x14(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0xe4a0
movzbl %al, %eax
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x14(%rbp), %eax
addl $0x1, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movw %dx, %ax
movzwl %ax, %esi
callq 0xe4a0
movb %al, %cl
movq -0x28(%rbp), %rax
movzbl %cl, %ecx
movw %cx, -0x18(%rbp)
movzwl -0x16(%rbp), %ecx
movzwl -0x18(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x1a(%rbp)
movq -0x10(%rbp), %rdi
movzwl -0x1a(%rbp), %ecx
movzwl -0x12(%rbp), %edx
addl %edx, %ecx
movzwl %cx, %esi
movzbl (%rax), %edx
callq 0xe420
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::sta_zeropg_x(NES::MemoryUnit&)
void CPU::sta_zeropg_x(MemoryUnit &r) {
    // Store contents of accumulator to address: Zero Page X Indexed
    // PC += 2

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movq -0x20(%rbp), %rcx
movb %al, -0x11(%rbp)
movb 0x1(%rcx), %al
movb %al, -0x12(%rbp)
movw 0x6(%rcx), %ax
addw $0x1, %ax
movw %ax, 0x6(%rcx)
movzbl -0x11(%rbp), %eax
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x20(%rbp), %rax
movw %dx, %cx
movw %cx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movw -0x14(%rbp), %cx
movzwl %cx, %esi
movzbl (%rax), %edx
callq 0xe420
addq $0x20, %rsp
popq %rbp
retq
// File: nimitbhardwaj[P]KapaNes/./src/cpu.cpp
// Function: NES::CPU::sta_absolute_y(NES::MemoryUnit&)
void CPU::sta_absolute_y(MemoryUnit &r) {
    // Store contents of accumulator to address: 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;
    r.setByteAt(addr, regAcc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x11(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movq -0x10(%rbp), %rdi
movzwl 0x6(%rax), %esi
callq 0xe4a0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, -0x12(%rbp)
movw 0x6(%rax), %cx
addw $0x1, %cx
movw %cx, 0x6(%rax)
movzbl -0x11(%rbp), %ecx
movzbl -0x12(%rbp), %edx
shll $0x8, %edx
orl %edx, %ecx
movw %cx, -0x14(%rbp)
movzbl 0x2(%rax), %edx
movzwl -0x14(%rbp), %ecx
addl %edx, %ecx
movw %cx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movw -0x14(%rbp), %cx
movzwl %cx, %esi
movzbl (%rax), %edx
callq 0xe420
addq $0x20, %rsp
popq %rbp
retq