LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: mdpkh[P]retro6k/src/main.cpp
// Function: InitMemory()
int InitMemory()
{
	sysram = new unsigned char[0x10000];
	syspflags = new pageflags[0x100];
	if (!sysram || !syspflags)
	{
		SDL_Log("Could not allocate system address space");
		return -1;
	}
	for (int p = 0x00; p < 0x20; ++p)
		syspflags[p] = pageflags::PF_TRAM;
	{ // Initialize the builtin RAM with deterministic random data
		std::mt19937 gen(1); //TODO: seed with a hash of machine identifying info
		std::uniform_int_distribution<> dis(0x00, 0xFF);
		for (int a = 0x0000; a < 0x2000; ++a)
			sysram[a] = dis(gen);
	}
	for (int p = 0x20; p < 0x100; ++p)
		syspflags[p] = pageflags::PF_TFLOATING;
	syspflags[0x02] = pageflags::PF_INONLY;
	syspflags[0x03] = pageflags::PF_OUTONLY;
	floatgen.seed(seedgen());
	//InitVideoMem(); // no cheating!
	InstallROM();
	for (int p = 0xf0; p < 0x100; ++p)
		syspflags[p] = syspflags[p] | pageflags::PF_DONTLOG;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x13b0, %rsp           # imm = 0x13B0
movl $0x10000, %edi          # imm = 0x10000
callq 0x7040
movq %rax, 0x1ed04(%rip)     # 0x2d560
movl $0x100, %edi            # imm = 0x100
callq 0x7040
movq %rax, 0x1ecfb(%rip)     # 0x2d568
cmpq $0x0, 0x1eceb(%rip)     # 0x2d560
je 0xe881
cmpq $0x0, 0x1ece9(%rip)     # 0x2d568
jne 0xe89b
leaq 0x15050(%rip), %rdi     # 0x238d8
movb $0x0, %al
callq 0x75c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xea00
movl $0x0, -0x8(%rbp)
cmpl $0x20, -0x8(%rbp)
jge 0xe8c2
movq 0x1ecb9(%rip), %rax     # 0x2d568
movslq -0x8(%rbp), %rcx
movb $0x2, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xe8a2
leaq -0x1390(%rbp), %rdi
movl $0x1, %esi
callq 0x14280
leaq -0x1398(%rbp), %rdi
xorl %esi, %esi
movl $0xff, %edx
callq 0x142b0
movl $0x0, -0x139c(%rbp)
cmpl $0x2000, -0x139c(%rbp)  # imm = 0x2000
jge 0xe933
leaq -0x1398(%rbp), %rdi
leaq -0x1390(%rbp), %rsi
callq 0x142e0
movb %al, %dl
movq 0x1ec48(%rip), %rax     # 0x2d560
movslq -0x139c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x139c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x139c(%rbp)
jmp 0xe8f0
movl $0x20, -0x13a0(%rbp)
cmpl $0x100, -0x13a0(%rbp)   # imm = 0x100
jge 0xe96c
movq 0x1ec18(%rip), %rax     # 0x2d568
movslq -0x13a0(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x13a0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x13a0(%rbp)
jmp 0xe93d
movq 0x1ebf5(%rip), %rax     # 0x2d568
movb $0x9, 0x2(%rax)
movq 0x1ebea(%rip), %rax     # 0x2d568
movb $0xa, 0x3(%rax)
leaq 0x81efc7(%rip), %rdi    # 0x82d950
callq 0x143d0
movl %eax, %eax
movl %eax, %esi
leaq 0x82033f(%rip), %rdi    # 0x82ecd8
callq 0x14310
callq 0xea10
movl $0xf0, -0x13a4(%rbp)
cmpl $0x100, -0x13a4(%rbp)   # imm = 0x100
jge 0xe9f9
movq 0x1eba8(%rip), %rax     # 0x2d568
movslq -0x13a4(%rbp), %rcx
movl $0xffffff80, %esi       # imm = 0xFFFFFF80
movsbl (%rax,%rcx), %edi
callq 0x79b0
movb %al, %dl
movq 0x1eb8a(%rip), %rax     # 0x2d568
movslq -0x13a4(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x13a4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x13a4(%rbp)
jmp 0xe9ad
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x13b0, %rsp           # imm = 0x13B0
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: InitSound()
int InitSound()
{
	SDL_AudioSpec desiredsoundspec;
	SDL_memset(&desiredsoundspec, 0, sizeof(desiredsoundspec));
	desiredsoundspec.freq = 44100;
	desiredsoundspec.format = AUDIO_U8;
	desiredsoundspec.channels = 2;
	desiredsoundspec.samples = 512;
	desiredsoundspec.callback = GenerateStereoAudio;
	sounddev = SDL_OpenAudioDevice(NULL, false, &desiredsoundspec, &soundspec, 0);
	if (!sounddev)
	{
		SDL_Log("Could not open sound device");
	}
	SDL_PauseAudioDevice(sounddev, 0);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x71a0
movl $0xac44, -0x20(%rbp)    # imm = 0xAC44
movw $0x8, -0x1c(%rbp)
movb $0x2, -0x1a(%rbp)
movw $0x200, -0x18(%rbp)     # imm = 0x200
leaq -0x2136(%rip), %rax     # 0xd480
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorl %r8d, %r8d
leaq -0x20(%rbp), %rdx
leaq 0x821e34(%rip), %rcx    # 0x831400
movl %r8d, %esi
callq 0x7510
movl %eax, 0x821e46(%rip)    # 0x831420
cmpl $0x0, 0x821e3f(%rip)    # 0x831420
jne 0xf5f1
leaq 0x14365(%rip), %rdi     # 0x2394f
movb $0x0, %al
callq 0x75c0
movl 0x821e29(%rip), %edi    # 0x831420
xorl %esi, %esi
callq 0x7580
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: LoadConfig()
void LoadConfig() {
	for (auto& configloc : config.system.configloc)
	{
#ifdef WINDOWS
		if (cilstreq(configloc.c_str(), L"windows registry"))
		{
			// TODO: read config from Windows Registry
		}
		else
#endif
		{
			if (LoadConfigFromFile(configloc.c_str()))
				break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x1de01(%rip), %rax     # 0x2d420
addq $0x50, %rax
movq %rax, -0x8(%rbp)
leaq 0x1ddf2(%rip), %rdi     # 0x2d420
addq $0x50, %rdi
callq 0x12da0
movq %rax, -0x10(%rbp)
leaq 0x1ddde(%rip), %rdi     # 0x2d420
addq $0x50, %rdi
callq 0x12d30
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x12dd0
testb $0x1, %al
jne 0xf662
jmp 0xf695
leaq -0x10(%rbp), %rdi
callq 0x12e40
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x15770
movq %rax, %rdi
callq 0x14cc0
testb $0x1, %al
jne 0xf686
jmp 0xf688
jmp 0xf695
jmp 0xf68a
leaq -0x10(%rbp), %rdi
callq 0x12f00
jmp 0xf64f
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: LogFVMC(unsigned short, unsigned short, unsigned char)
void LogFVMC(uint16_t dest, uint16_t src, uint8_t value)
{
	dlogentry* newentry = ExtendLog(dletype::LT_FVMC);
	newentry->fvmcentry.dest = dest;
	newentry->fvmcentry.src = src;
	newentry->fvmcentry.value = value;
	newentry->fvmcentry.memtype = syspflags[src >> 8];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movw %si, %cx
movw %di, %dx
movw %dx, -0x2(%rbp)
movw %cx, -0x4(%rbp)
movb %al, -0x5(%rbp)
movl $0x4, %edi
callq 0xd3d0
movq %rax, -0x10(%rbp)
movw -0x2(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x4(%rax)
movw -0x4(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x6(%rax)
movb -0x5(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movq 0x1de76(%rip), %rax     # 0x2d568
movzwl -0x4(%rbp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x9(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: LogScanline(int)
void LogScanline(int scanline)
{
	if (debuglog[(debuglogend - 1) & dlogidxmask].entrytype == dletype::LT_SCANLINE)
	{
		debuglog[(debuglogend - 1) & dlogidxmask].scanline = scanline;
		return;
	}
	ExtendLog(dletype::LT_SCANLINE)->scanline = scanline;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0x1ca6f(%rip), %eax     # 0x2c400
subl $0x1, %eax
andl $0x7ffff, %eax          # imm = 0x7FFFF
movslq %eax, %rcx
leaq 0x1df8d(%rip), %rax     # 0x2d930
shlq $0x4, %rcx
addq %rcx, %rax
cmpb $0x9, (%rax)
jne 0xf9d6
movl -0x4(%rbp), %ecx
movl 0x1ca48(%rip), %eax     # 0x2c400
subl $0x1, %eax
andl $0x7ffff, %eax          # imm = 0x7FFFF
movslq %eax, %rdx
leaq 0x1df66(%rip), %rax     # 0x2d930
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0xf9ec
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl $0x9, %edi
callq 0xd3d0
movl -0x8(%rbp), %ecx
movl %ecx, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: LogStack(unsigned char)
void LogStack(unsigned char sp)
{
	dlogentry* newentry = ExtendLog(dletype::LT_STACK);
	if (suppresslogging)
		return;
	for (unsigned i = 0, j = sp + 1; i < 7; ++i, ++j, j &= 0xff)
	{
		newentry->stackentry.stack[i] = sysram[j | 0x100];
	}
	newentry->stackentry.nstack = stackbase - sp;
	//DoDebugger();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0x8, %edi
callq 0xd3d0
movq %rax, -0x10(%rbp)
testb $0x1, 0x1dd9e(%rip)     # 0x2d7c1
je 0xfa27
jmp 0xfa93
movl $0x0, -0x14(%rbp)
movzbl -0x1(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x7, -0x14(%rbp)
jae 0xfa7d
movq 0x1db1b(%rip), %rax     # 0x2d560
movl -0x18(%rbp), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, %ecx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, 0x5(%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xff, %eax
movl %eax, -0x18(%rbp)
jmp 0xfa38
movzbl 0x81deb4(%rip), %eax    # 0x82d938
movzbl -0x1(%rbp), %ecx
subl %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: LogWrite(unsigned short, unsigned char)
void LogWrite(uint16_t address, uint8_t value)
{
	dlogentry* last = debuglog + ((debuglogend - 1) & dlogidxmask);
	if (suppresslogging && ((bool)(syspflags[address >> 8] & pageflags::PF_IO)
		|| ((syspflags[address >> 8] & pageflags::PF_TMASK) == pageflags::PF_TFLOATING)))
		return;
	if (last->entrytype == dletype::LT_PARTIALINST)
		last->entrytype = dletype::LT_INST;
	dlogentry* newentry = ExtendLog(dletype::LT_WRITE);
	newentry->mementry.address = address;
	newentry->mementry.value = value;
	newentry->mementry.memtype = syspflags[address >> 8];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movw %di, %cx
movw %cx, -0x2(%rbp)
movb %al, -0x3(%rbp)
movl 0x1c945(%rip), %eax     # 0x2c400
subl $0x1, %eax
andl $0x7ffff, %eax          # imm = 0x7FFFF
movslq %eax, %rcx
leaq 0x1de63(%rip), %rax     # 0x2d930
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
testb $0x1, 0x1dce2(%rip)     # 0x2d7c1
je 0xfb29
movq 0x1da80(%rip), %rax     # 0x2d568
movzwl -0x2(%rbp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movl $0x8, %esi
movsbl (%rax,%rcx), %edi
callq 0x7990
cmpb $0x0, %al
jne 0xfb27
movq 0x1da5d(%rip), %rax     # 0x2d568
movzwl -0x2(%rbp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movl $0x3, %esi
movsbl (%rax,%rcx), %edi
callq 0x7990
cmpb $0x0, %al
jne 0xfb29
jmp 0xfb78
movq -0x10(%rbp), %rax
cmpb $0x6, (%rax)
jne 0xfb39
movq -0x10(%rbp), %rax
movb $0x7, (%rax)
movl $0x3, %edi
callq 0xd3d0
movq %rax, -0x18(%rbp)
movw -0x2(%rbp), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x4(%rax)
movb -0x3(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x6(%rax)
movq 0x1da04(%rip), %rax     # 0x2d568
movzwl -0x2(%rbp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x7(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: mdpkh[P]retro6k/src/main.cpp
// Function: RandomBitFlip()
void RandomBitFlip()
{
	static std::mt19937 gen(0);
	static std::uniform_int_distribution<> dis(0x0800, 0x1FFF);
	if (dis(gen) & 0xf)
		return;
	int addr = dis(gen);
	int bit = dis(gen) & 7;
	write6502(addr, sysram[addr] ^ (1 << bit));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpb $0x0, 0x8225e1(%rip)    # 0x832830
jne 0x10280
leaq 0x8225d8(%rip), %rdi    # 0x832830
callq 0x7740
cmpl $0x0, %eax
je 0x10280
leaq 0x82123f(%rip), %rdi    # 0x8314a8
xorl %eax, %eax
movl %eax, %esi
callq 0x14280
jmp 0x10274
leaq 0x8225b5(%rip), %rdi    # 0x832830
callq 0x72f0
cmpb $0x0, 0x8225b9(%rip)    # 0x832840
jne 0x102be
leaq 0x8225b0(%rip), %rdi    # 0x832840
callq 0x7740
cmpl $0x0, %eax
je 0x102be
leaq 0x822597(%rip), %rdi    # 0x832838
movl $0x800, %esi            # imm = 0x800
movl $0x1fff, %edx           # imm = 0x1FFF
callq 0x142b0
jmp 0x102b2
leaq 0x822587(%rip), %rdi    # 0x832840
callq 0x72f0
leaq 0x822573(%rip), %rdi    # 0x832838
leaq 0x8211dc(%rip), %rsi    # 0x8314a8
callq 0x142e0
andl $0xf, %eax
cmpl $0x0, %eax
je 0x10315
jmp 0x10375
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x8(%rbp)
movl %eax, -0xc(%rbp)
leaq 0x82253f(%rip), %rdi    # 0x832830
callq 0x72d0
jmp 0x1037b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x8(%rbp)
movl %eax, -0xc(%rbp)
leaq 0x822532(%rip), %rdi    # 0x832840
callq 0x72d0
jmp 0x1037b
leaq 0x82251c(%rip), %rdi    # 0x832838
leaq 0x821185(%rip), %rsi    # 0x8314a8
callq 0x142e0
movl %eax, -0x10(%rbp)
leaq 0x822506(%rip), %rdi    # 0x832838
leaq 0x82116f(%rip), %rsi    # 0x8314a8
callq 0x142e0
andl $0x7, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movw %ax, -0x16(%rbp)
movq 0x1d20e(%rip), %rax     # 0x2d560
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movw -0x16(%rbp), %cx
xorl %edx, %eax
movzwl %cx, %edi
movzbl %al, %esi
callq 0x10390
addq $0x20, %rsp
popq %rbp
retq
movq -0x8(%rbp), %rdi
callq 0x7710
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: RenderScanline(int, SDL_Surface*, SDL_Surface*)
void RenderScanline(int scanline, SDL_Surface* framebuffer, SDL_Surface* winsurface)
{
	if (!scanlinedirty[scanline])
		return;
	int y0 = scanline * winsurface->h / 576;
	int y1 = (scanline + 1) * winsurface->h / 576;
	unsigned char* src = (unsigned char*)(framebuffer->pixels) + (long long)framebuffer->pitch * y0;
	unsigned char* dst = (unsigned char*)(winsurface->pixels) + (long long)winsurface->pitch * y0;
	//pitch is assumed same for both surfaces
	unsigned char* stop = (unsigned char*)(framebuffer->pixels) + (long long)framebuffer->pitch * y1;
	while (src < stop)
	{
		*dst = *src;
		++src;
		++dst;
	}
	scanlinedirty[scanline] = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x1b226(%rip), %rax     # 0x2d580
testb $0x1, (%rax,%rcx)
jne 0x12365
jmp 0x12430
movl -0x4(%rbp), %eax
movq -0x18(%rbp), %rcx
imull 0x14(%rcx), %eax
movl $0x240, %ecx            # imm = 0x240
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movq -0x18(%rbp), %rcx
imull 0x14(%rcx), %eax
movl $0x240, %ecx            # imm = 0x240
cltd
idivl %ecx
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0x18(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x18(%rcx), %rcx
movslq -0x20(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x12421
movq -0x28(%rbp), %rax
movb (%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x123f1
movslq -0x4(%rbp), %rcx
leaq 0x1b154(%rip), %rax     # 0x2d580
movb $0x0, (%rax,%rcx)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: DisplayMemType(char*, pageflags)
inline void DisplayMemType(char* dest, pageflags pf)
{
	const char typewords[48] = {
		'N',0x7f, 'C',
		'R', 'O', 'M',
		'R', 'A', 'M',
		'N', 'V', 'M',
		'b', 'N', 'C',
		'b', 'R', 'O',
		'b', 'R', 'A',
		'b', 'N', 'V',
		'I', '/', 'O',
		'I', 'n',0x7f,
		'O', 'u', 't',
		'I', '/', 'O',
		'b', 'I', 'O',
		'b', 'I', 'n',
		'b', 'O', 'u',
		'b', 'I', 'O',
	};
	char mtypeidx = (char)pf & 0x0f;
	char* src = (char*)typewords + 3ll * mtypeidx;
	*dest = *src;
	*++dest = *++src;
	*++dest = *++src;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0xdb73(%rip), %rsi      # 0x20b80
movl $0x30, %edx
callq 0x73c0
movsbl -0x9(%rbp), %eax
andl $0xf, %eax
movb %al, -0x41(%rbp)
leaq -0x40(%rbp), %rax
movsbq -0x41(%rbp), %rcx
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb 0x1(%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, 0x1(%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movb 0x1(%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, 0x1(%rax)
addq $0x50, %rsp
popq %rbp
retq
nop
// File: mdpkh[P]retro6k/src/main.cpp
// Function: DisplayHexWord(char*, short)
inline void DisplayHexWord(char* dest, short val)
{
	const char nybbles[16] = {
		0x30, 0x31, 0x32, 0x33,
		0x34, 0x35, 0x36, 0x37,
		0x38, 0x39, 0x41, 0x42,
		0x43, 0x44, 0x45, 0x46,
	};
	*dest = nybbles[(val >> 12) & 0xf];
	*++dest = nybbles[(val >> 8) & 0xf];
	*++dest = nybbles[(val >> 4) & 0xf];
	*++dest = nybbles[val & 0xf];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq 0x1038a(%rip), %rax     # 0x23430
movq %rax, -0x20(%rbp)
movq 0x10387(%rip), %rax     # 0x23438
movq %rax, -0x18(%rbp)
movswl -0xa(%rbp), %eax
sarl $0xc, %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movswl -0xa(%rbp), %eax
sarl $0x8, %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, 0x1(%rax)
movswl -0xa(%rbp), %eax
sarl $0x4, %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, 0x1(%rax)
movswl -0xa(%rbp), %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, 0x1(%rax)
popq %rbp
retq
// File: mdpkh[P]retro6k/src/main.cpp
// Function: bool cilstreq<char const*>(char const*, char const*)
bool cilstreq(T a, T b)
// case-insensitive c-string equality comparison,
// optimized by assuming b is already lowercase
{
	if (a == b)
		return true;
	while (true)
	{
		if (*a == 0 && *b == 0)
			return true;
		if (tolower(*a) != *b)
			return false;
		++a;
		++b;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x13c00
movb $0x1, -0x1(%rbp)
jmp 0x13c57
jmp 0x13c02
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x13c20
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x13c20
movb $0x1, -0x1(%rbp)
jmp 0x13c57
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x7610
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x13c3d
movb $0x0, -0x1(%rbp)
jmp 0x13c57
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x13c02
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: mdpkh[P]retro6k/src/main.cpp
// Function: bare_read6502(unsigned short)
inline uint8_t bare_read6502(uint16_t address)
{
	static std::uniform_int_distribution<> dis(0x00, 0xFF);
	if ((address & 0xff00) == 0x0200)
	{
		switch (address & 0xff)
		{
			unsigned char t;
		case 0x44: // keyboard
			t = keypressregister;
			keypressregister = 0;
			return t;
		case 0xfc: // video flags
			return videostate;
		default:
			return dis(floatgen);
		}
	}
	if ((syspflags[address >> 8] & pageflags::PF_TMASK) == pageflags::PF_TFLOATING
		|| (syspflags[address >> 8] & (pageflags::PF_IO | pageflags::PF_TMASK)) == pageflags::PF_OUTONLY)
	{
		return dis(floatgen); // TODO: more realistic open-bus behavior?
	}
	return sysram[address];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x4(%rbp)
cmpb $0x0, 0x81ca92(%rip)    # 0x832858
jne 0x15dfa
leaq 0x81ca89(%rip), %rdi    # 0x832858
callq 0x7740
cmpl $0x0, %eax
je 0x15dfa
leaq 0x81ca6c(%rip), %rdi    # 0x83284c
xorl %esi, %esi
movl $0xff, %edx
callq 0x142b0
jmp 0x15dee
leaq 0x81ca63(%rip), %rdi    # 0x832858
callq 0x72f0
movzwl -0x4(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x200, %eax            # imm = 0x200
jne 0x15e85
movzbl -0x4(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0x44, %eax
je 0x15e41
jmp 0x15e18
movl -0x1c(%rbp), %eax
subl $0xfc, %eax
je 0x15e5c
jmp 0x15e6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq 0x81ca21(%rip), %rdi    # 0x832858
callq 0x72d0
jmp 0x15f12
movb 0x1797d(%rip), %al      # 0x2d7c4
movb %al, -0x15(%rbp)
movb $0x0, 0x17973(%rip)     # 0x2d7c4
movb -0x15(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x15f09
movb 0x17960(%rip), %al      # 0x2d7c2
movb %al, -0x1(%rbp)
jmp 0x15f09
leaq 0x81c9db(%rip), %rdi    # 0x83284c
leaq 0x818e60(%rip), %rsi    # 0x82ecd8
callq 0x142e0
movb %al, -0x1(%rbp)
jmp 0x15f09
movq 0x176dc(%rip), %rax     # 0x2d568
movzwl -0x4(%rbp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movl $0x3, %esi
movsbl (%rax,%rcx), %edi
callq 0x7990
cmpb $0x0, %al
je 0x15ee0
movq 0x176b9(%rip), %rax     # 0x2d568
movzwl -0x4(%rbp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x1d(%rbp)
movl $0x8, %edi
movl $0x3, %esi
callq 0x79b0
movb -0x1d(%rbp), %cl
movsbl %cl, %edi
movsbl %al, %esi
callq 0x7990
cmpb $0xa, %al
jne 0x15ef8
leaq 0x81c965(%rip), %rdi    # 0x83284c
leaq 0x818dea(%rip), %rsi    # 0x82ecd8
callq 0x142e0
movb %al, -0x1(%rbp)
jmp 0x15f09
movq 0x17661(%rip), %rax     # 0x2d560
movzwl -0x4(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x7710
nopl (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: pull16
uint16_t pull16() {
    uint16_t temp16;
    temp16 = read6502(BASE_STACK + ((sp + 1) & 0xFF)) | ((uint16_t)read6502(BASE_STACK + ((sp + 2) & 0xFF)) << 8);
    sp += 2;
    return(temp16);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movzbl 0x815efd(%rip), %eax    # 0x83286c
addl $0x1, %eax
andl $0xff, %eax
addl $0x100, %eax            # imm = 0x100
movzwl %ax, %edi
callq 0x12460
movzbl %al, %eax
movl %eax, -0x8(%rbp)
movzbl 0x815edb(%rip), %eax    # 0x83286c
addl $0x2, %eax
andl $0xff, %eax
addl $0x100, %eax            # imm = 0x100
movzwl %ax, %edi
callq 0x12460
movb %al, %cl
movl -0x8(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, -0x2(%rbp)
movzbl 0x815eab(%rip), %eax    # 0x83286c
addl $0x2, %eax
movb %al, 0x815ea2(%rip)     # 0x83286c
movw -0x2(%rbp), %ax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: reset6502
void reset6502() {
    pc = (uint16_t)read6502(0xFFFC) | ((uint16_t)read6502(0xFFFD) << 8);
    a = 0;
    x = 0;
    y = 0;
    sp = 0xFD;
    status |= FLAG_CONSTANT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xfffc, %edi           # imm = 0xFFFC
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x4(%rbp)
movl $0xfffd, %edi           # imm = 0xFFFD
callq 0x12460
movb %al, %cl
movl -0x4(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x815e22(%rip)     # 0x83286e
movb $0x0, 0x815e1d(%rip)    # 0x832870
movb $0x0, 0x815e17(%rip)    # 0x832871
movb $0x0, 0x815e11(%rip)    # 0x832872
movb $-0x3, 0x815e04(%rip)   # 0x83286c
movzbl 0x815e04(%rip), %eax    # 0x832873
orl $0x20, %eax
movb %al, 0x815dfb(%rip)     # 0x832873
addq $0x10, %rsp
popq %rbp
retq
nop
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: nmi6502
void nmi6502() {
    push16(pc);
    push8(status);
    status |= FLAG_INTERRUPT;
    pc = (uint16_t)read6502(0xFFFA) | ((uint16_t)read6502(0xFFFB) << 8);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movzwl 0x815ddf(%rip), %edi    # 0x83286e
callq 0x1c8a0
movzbl 0x815dd8(%rip), %edi    # 0x832873
callq 0x1c920
movzbl 0x815dcc(%rip), %eax    # 0x832873
orl $0x4, %eax
movb %al, 0x815dc3(%rip)     # 0x832873
movl $0xfffa, %edi           # imm = 0xFFFA
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x4(%rbp)
movl $0xfffb, %edi           # imm = 0xFFFB
callq 0x12460
movb %al, %cl
movl -0x4(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x815d8a(%rip)     # 0x83286e
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: irq6502
void irq6502() {
    push16(pc);
    push8(status);
    status |= FLAG_INTERRUPT;
    pc = (uint16_t)read6502(0xFFFE) | ((uint16_t)read6502(0xFFFF) << 8);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movzwl 0x815d6f(%rip), %edi    # 0x83286e
callq 0x1c8a0
movzbl 0x815d68(%rip), %edi    # 0x832873
callq 0x1c920
movzbl 0x815d5c(%rip), %eax    # 0x832873
orl $0x4, %eax
movb %al, 0x815d53(%rip)     # 0x832873
movl $0xfffe, %edi           # imm = 0xFFFE
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x4(%rbp)
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x12460
movb %al, %cl
movl -0x4(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x815d1a(%rip)     # 0x83286e
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: exec6502
void exec6502(uint32_t tickcount) {
    clockgoal6502 += tickcount;
    while ((clockticks6502 - clockgoal6502) & 0x80000000) {
        // MDPKH: while condition changed to account for overflow / wraparound
        opcode = read6502(pc++);
        status |= FLAG_CONSTANT;

        penaltyop = 0;
        penaltyaddr = 0;

        (*addrtable[opcode])();
        (*optable[opcode])();
        clockticks6502 += ticktable[opcode];
        if (penaltyop && penaltyaddr) clockticks6502++;

        instructions++;

        if (callexternal) (*loopexternal)();
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl 0x815cf4(%rip), %eax    # 0x832868
movl %eax, 0x815cee(%rip)    # 0x832868
movl 0x815ce4(%rip), %eax    # 0x832864
subl 0x815ce2(%rip), %eax    # 0x832868
andl $0x80000000, %eax       # imm = 0x80000000
cmpl $0x0, %eax
je 0x1cc6a
movw 0x815cd3(%rip), %ax     # 0x83286e
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x815cc5(%rip)     # 0x83286e
movzwl %ax, %edi
callq 0x12460
movb %al, 0x815cbe(%rip)     # 0x832875
movzbl 0x815cb5(%rip), %eax    # 0x832873
orl $0x20, %eax
movb %al, 0x815cac(%rip)     # 0x832873
movb $0x0, 0x815ca8(%rip)    # 0x832876
movb $0x0, 0x815ca2(%rip)    # 0x832877
movzbl 0x815c99(%rip), %eax    # 0x832875
movl %eax, %edx
leaq 0xf82b(%rip), %rcx      # 0x2c410
movb $0x0, %al
callq *(%rcx,%rdx,8)
movzbl 0x815c84(%rip), %eax    # 0x832875
movl %eax, %edx
leaq 0x10016(%rip), %rcx     # 0x2cc10
movb $0x0, %al
callq *(%rcx,%rdx,8)
movzbl 0x815c6f(%rip), %eax    # 0x832875
movl %eax, %ecx
leaq 0x6f01(%rip), %rax      # 0x23b10
movl (%rax,%rcx,4), %eax
addl 0x815c4c(%rip), %eax    # 0x832864
movl %eax, 0x815c46(%rip)    # 0x832864
movzbl 0x815c51(%rip), %eax    # 0x832876
cmpl $0x0, %eax
je 0x1cc45
movzbl 0x815c46(%rip), %eax    # 0x832877
cmpl $0x0, %eax
je 0x1cc45
movl 0x815c28(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x815c1f(%rip)    # 0x832864
movl 0x815c15(%rip), %eax    # 0x832860
addl $0x1, %eax
movl %eax, 0x815c0c(%rip)    # 0x832860
cmpb $0x0, 0x815c19(%rip)    # 0x832874
je 0x1cc65
movb $0x0, %al
callq *0x815c13(%rip)         # 0x832878
jmp 0x1cb7a
addq $0x10, %rsp
popq %rbp
retq
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: step6502
void step6502() {
    opcode = read6502(pc++);
    status |= FLAG_CONSTANT;

    penaltyop = 0;
    penaltyaddr = 0;

    (*addrtable[opcode])();
    (*optable[opcode])();
    clockticks6502 += ticktable[opcode];
    if (penaltyop && penaltyaddr) clockticks6502++;
    clockgoal6502 = clockticks6502;

    instructions++;

    if (callexternal) (*loopexternal)();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw 0x815bf3(%rip), %ax     # 0x83286e
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x815be5(%rip)     # 0x83286e
movzwl %ax, %edi
callq 0x12460
movb %al, 0x815bde(%rip)     # 0x832875
movzbl 0x815bd5(%rip), %eax    # 0x832873
orl $0x20, %eax
movb %al, 0x815bcc(%rip)     # 0x832873
movb $0x0, 0x815bc8(%rip)    # 0x832876
movb $0x0, 0x815bc2(%rip)    # 0x832877
movzbl 0x815bb9(%rip), %eax    # 0x832875
movl %eax, %edx
leaq 0xf74b(%rip), %rcx      # 0x2c410
movb $0x0, %al
callq *(%rcx,%rdx,8)
movzbl 0x815ba4(%rip), %eax    # 0x832875
movl %eax, %edx
leaq 0xff36(%rip), %rcx      # 0x2cc10
movb $0x0, %al
callq *(%rcx,%rdx,8)
movzbl 0x815b8f(%rip), %eax    # 0x832875
movl %eax, %ecx
leaq 0x6e21(%rip), %rax      # 0x23b10
movl (%rax,%rcx,4), %eax
addl 0x815b6c(%rip), %eax    # 0x832864
movl %eax, 0x815b66(%rip)    # 0x832864
movzbl 0x815b71(%rip), %eax    # 0x832876
cmpl $0x0, %eax
je 0x1cd25
movzbl 0x815b66(%rip), %eax    # 0x832877
cmpl $0x0, %eax
je 0x1cd25
movl 0x815b48(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x815b3f(%rip)    # 0x832864
movl 0x815b39(%rip), %eax    # 0x832864
movl %eax, 0x815b37(%rip)    # 0x832868
movl 0x815b29(%rip), %eax    # 0x832860
addl $0x1, %eax
movl %eax, 0x815b20(%rip)    # 0x832860
cmpb $0x0, 0x815b2d(%rip)    # 0x832874
je 0x1cd51
movb $0x0, %al
callq *0x815b27(%rip)         # 0x832878
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: hookexternal
void hookexternal(void *funcptr) {
    if (funcptr != (void *)NULL) {
        loopexternal = funcptr;
        callexternal = 1;
    } else callexternal = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1cd83
movq -0x8(%rbp), %rax
movq %rax, 0x815afe(%rip)    # 0x832878
movb $0x1, 0x815af3(%rip)    # 0x832874
jmp 0x1cd8a
movb $0x0, 0x815aea(%rip)    # 0x832874
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: indy
static void indy() { // (indirect),Y
    uint16_t eahelp, eahelp2, startpage;
    eahelp = (uint16_t)read6502(pc++);
    eahelp2 = (eahelp & 0xFF00) | ((eahelp + 1) & 0x00FF); //zero-page wraparound
    ea = (uint16_t)read6502(eahelp) | ((uint16_t)read6502(eahelp2) << 8);
    startpage = ea & 0xFF00;
    ea += (uint16_t)y;

    if (startpage != (ea & 0xFF00)) { //one cycle penlty for page-crossing on some opcodes
        penaltyaddr = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw 0x8158ff(%rip), %ax     # 0x83286e
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x8158f1(%rip)     # 0x83286e
movzwl %ax, %edi
callq 0x12460
movzbl %al, %eax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x2(%rbp), %ecx
addl $0x1, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x4(%rbp)
movzwl -0x2(%rbp), %edi
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0xc(%rbp)
movzwl -0x4(%rbp), %edi
callq 0x12460
movb %al, %cl
movl -0xc(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x8158a8(%rip)     # 0x832882
movzwl 0x8158a1(%rip), %eax    # 0x832882
andl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0x6(%rbp)
movzbl 0x815881(%rip), %eax    # 0x832872
movzwl %ax, %ecx
movzwl 0x815887(%rip), %eax    # 0x832882
addl %ecx, %eax
movw %ax, 0x81587e(%rip)     # 0x832882
movzwl -0x6(%rbp), %eax
movzwl 0x815873(%rip), %ecx    # 0x832882
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1d020
movb $0x1, 0x815857(%rip)    # 0x832877
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: absy
static void absy() { //absolute,Y
    uint16_t startpage;
    ea = ((uint16_t)read6502(pc) | ((uint16_t)read6502(pc+1) << 8));
    startpage = ea & 0xFF00;
    ea += (uint16_t)y;

    if (startpage != (ea & 0xFF00)) { //one cycle penlty for page-crossing on some opcodes
        penaltyaddr = 1;
    }

    pc += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movzwl 0x8157df(%rip), %edi    # 0x83286e
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x8(%rbp)
movzwl 0x8157ca(%rip), %eax    # 0x83286e
addl $0x1, %eax
movzwl %ax, %edi
callq 0x12460
movb %al, %cl
movl -0x8(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x8157bc(%rip)     # 0x832882
movzwl 0x8157b5(%rip), %eax    # 0x832882
andl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0x2(%rbp)
movzbl 0x815795(%rip), %eax    # 0x832872
movzwl %ax, %ecx
movzwl 0x81579b(%rip), %eax    # 0x832882
addl %ecx, %eax
movw %ax, 0x815792(%rip)     # 0x832882
movzwl -0x2(%rbp), %eax
movzwl 0x815787(%rip), %ecx    # 0x832882
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1d10c
movb $0x1, 0x81576b(%rip)    # 0x832877
movzwl 0x81575b(%rip), %eax    # 0x83286e
addl $0x2, %eax
movw %ax, 0x815751(%rip)     # 0x83286e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: absx
static void absx() { //absolute,X
    uint16_t startpage;
    ea = ((uint16_t)read6502(pc) | ((uint16_t)read6502(pc+1) << 8));
    startpage = ea & 0xFF00;
    ea += (uint16_t)x;

    if (startpage != (ea & 0xFF00)) { //one cycle penlty for page-crossing on some opcodes
        penaltyaddr = 1;
    }

    pc += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movzwl 0x81572f(%rip), %edi    # 0x83286e
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x8(%rbp)
movzwl 0x81571a(%rip), %eax    # 0x83286e
addl $0x1, %eax
movzwl %ax, %edi
callq 0x12460
movb %al, %cl
movl -0x8(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x81570c(%rip)     # 0x832882
movzwl 0x815705(%rip), %eax    # 0x832882
andl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0x2(%rbp)
movzbl 0x8156e4(%rip), %eax    # 0x832871
movzwl %ax, %ecx
movzwl 0x8156eb(%rip), %eax    # 0x832882
addl %ecx, %eax
movw %ax, 0x8156e2(%rip)     # 0x832882
movzwl -0x2(%rbp), %eax
movzwl 0x8156d7(%rip), %ecx    # 0x832882
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1d1bc
movb $0x1, 0x8156bb(%rip)    # 0x832877
movzwl 0x8156ab(%rip), %eax    # 0x83286e
addl $0x2, %eax
movw %ax, 0x8156a1(%rip)     # 0x83286e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: ind
static void ind() { //indirect
    uint16_t eahelp, eahelp2;
    eahelp = (uint16_t)read6502(pc) | (uint16_t)((uint16_t)read6502(pc+1) << 8);
    eahelp2 = (eahelp & 0xFF00) | ((eahelp + 1) & 0x00FF); //replicate 6502 page-boundary wraparound bug
    ea = (uint16_t)read6502(eahelp) | ((uint16_t)read6502(eahelp2) << 8);
    pc += 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movzwl 0x81567f(%rip), %edi    # 0x83286e
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0xc(%rbp)
movzwl 0x81566a(%rip), %eax    # 0x83286e
addl $0x1, %eax
movzwl %ax, %edi
callq 0x12460
movb %al, %cl
movl -0xc(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
movzwl %cx, %ecx
orl %ecx, %eax
movw %ax, -0x2(%rbp)
movzwl -0x2(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
movzwl -0x2(%rbp), %ecx
addl $0x1, %ecx
andl $0xff, %ecx
orl %ecx, %eax
movw %ax, -0x4(%rbp)
movzwl -0x2(%rbp), %edi
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x8(%rbp)
movzwl -0x4(%rbp), %edi
callq 0x12460
movb %al, %cl
movl -0x8(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x81560e(%rip)     # 0x832882
movzwl 0x8155f3(%rip), %eax    # 0x83286e
addl $0x2, %eax
movw %ax, 0x8155e9(%rip)     # 0x83286e
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: brk
static void brk() {
    pc++;
    push16(pc); //push next instruction address onto stack
    push8(status | FLAG_BREAK); //push CPU status to stack
    setinterrupt(); //set interrupt flag
    pc = (uint16_t)read6502(0xFFFE) | ((uint16_t)read6502(0xFFFF) << 8);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw 0x81557f(%rip), %ax     # 0x83286e
addw $0x1, %ax
movw %ax, 0x815574(%rip)     # 0x83286e
movzwl 0x81556d(%rip), %edi    # 0x83286e
callq 0x1c8a0
movzbl 0x815566(%rip), %eax    # 0x832873
orl $0x10, %eax
movzbl %al, %edi
callq 0x1c920
movzbl 0x815554(%rip), %eax    # 0x832873
orl $0x4, %eax
movb %al, 0x81554b(%rip)     # 0x832873
movl $0xfffe, %edi           # imm = 0xFFFE
callq 0x12460
movzbl %al, %eax
movzwl %ax, %eax
movl %eax, -0x4(%rbp)
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x12460
movb %al, %cl
movl -0x4(%rbp), %eax
movzbl %cl, %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, 0x815512(%rip)     # 0x83286e
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: ora
static void ora() {
    penaltyop = 1;
    value = getvalue();
    result = (uint16_t)a | value;
   
    zerocalc(result);
    signcalc(result);
   
    saveaccum(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, 0x8154fb(%rip)    # 0x832876
callq 0x1d420
movw %ax, 0x8154ff(%rip)     # 0x832886
movzbl 0x8154e2(%rip), %eax    # 0x832870
movzwl %ax, %eax
movzwl 0x8154ee(%rip), %ecx    # 0x832886
orl %ecx, %eax
movw %ax, 0x8154e7(%rip)     # 0x832888
movzwl 0x8154e0(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1d3c4
movzbl 0x8154ba(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x8154b1(%rip)     # 0x832873
jmp 0x1d3d4
movzbl 0x8154a8(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x81549f(%rip)     # 0x832873
movzwl 0x8154ad(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1d3f9
movzbl 0x815487(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x81547c(%rip)     # 0x832873
jmp 0x1d40b
movzbl 0x815473(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x815468(%rip)     # 0x832873
movzwl 0x815476(%rip), %eax    # 0x832888
andl $0xff, %eax
movb %al, 0x815453(%rip)     # 0x832870
popq %rbp
retq
nop
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: nop
static void nop() {
    switch (opcode) {
        case 0x1C:
        case 0x3C:
        case 0x5C:
        case 0x7C:
        case 0xDC:
        case 0xFC:
            penaltyop = 1;
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x8153fa(%rip), %eax    # 0x832875
movl %eax, -0x4(%rbp)
subl $0x1c, %eax
je 0x1d4bb
jmp 0x1d485
movl -0x4(%rbp), %eax
subl $0x3c, %eax
je 0x1d4bb
jmp 0x1d48f
movl -0x4(%rbp), %eax
subl $0x5c, %eax
je 0x1d4bb
jmp 0x1d499
movl -0x4(%rbp), %eax
subl $0x7c, %eax
je 0x1d4bb
jmp 0x1d4a3
movl -0x4(%rbp), %eax
subl $0xdc, %eax
je 0x1d4bb
jmp 0x1d4af
movl -0x4(%rbp), %eax
subl $0xfc, %eax
jne 0x1d4c2
jmp 0x1d4bb
movb $0x1, 0x8153b4(%rip)    # 0x832876
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: asl
static void asl() {
    value = getvalue();
    result = value << 1;

    carrycalc(result);
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x815366(%rip)     # 0x832886
movzwl 0x81535f(%rip), %eax    # 0x832886
shll %eax
movw %ax, 0x815358(%rip)     # 0x832888
movzwl 0x815351(%rip), %eax    # 0x832888
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x1d553
movzbl 0x81532b(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x815322(%rip)     # 0x832873
jmp 0x1d563
movzbl 0x815319(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x815310(%rip)     # 0x832873
movzwl 0x81531e(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1d586
movzbl 0x8152f8(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x8152ef(%rip)     # 0x832873
jmp 0x1d596
movzbl 0x8152e6(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x8152dd(%rip)     # 0x832873
movzwl 0x8152eb(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1d5bb
movzbl 0x8152c5(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x8152ba(%rip)     # 0x832873
jmp 0x1d5cd
movzbl 0x8152b1(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x8152a6(%rip)     # 0x832873
movzwl 0x8152b4(%rip), %edi    # 0x832888
callq 0x1d5e0
popq %rbp
retq
nopl (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: bpl
static void bpl() {
    if ((status & FLAG_SIGN) == 0) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x815208(%rip), %eax    # 0x832873
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x1d6d9
movw 0x8151f2(%rip), %ax     # 0x83286e
movw %ax, 0x8151fd(%rip)     # 0x832880
movzwl 0x8151fa(%rip), %ecx    # 0x832884
movzwl 0x8151dd(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x8151d4(%rip)     # 0x83286e
movzwl 0x8151df(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x8151c1(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1d6c8
movl 0x8151a7(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x81519e(%rip)    # 0x832864
jmp 0x1d6d7
movl 0x815196(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x81518d(%rip)    # 0x832864
jmp 0x1d6d9
popq %rbp
retq
nopl (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: and
static void and() {
    penaltyop = 1;
    value = getvalue();
    result = (uint16_t)a & value;
   
    zerocalc(result);
    signcalc(result);
   
    saveaccum(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, 0x81513b(%rip)    # 0x832876
callq 0x1d420
movw %ax, 0x81513f(%rip)     # 0x832886
movzbl 0x815122(%rip), %eax    # 0x832870
movzwl %ax, %eax
movzwl 0x81512e(%rip), %ecx    # 0x832886
andl %ecx, %eax
movw %ax, 0x815127(%rip)     # 0x832888
movzwl 0x815120(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1d784
movzbl 0x8150fa(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x8150f1(%rip)     # 0x832873
jmp 0x1d794
movzbl 0x8150e8(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x8150df(%rip)     # 0x832873
movzwl 0x8150ed(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1d7b9
movzbl 0x8150c7(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x8150bc(%rip)     # 0x832873
jmp 0x1d7cb
movzbl 0x8150b3(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x8150a8(%rip)     # 0x832873
movzwl 0x8150b6(%rip), %eax    # 0x832888
andl $0xff, %eax
movb %al, 0x815093(%rip)     # 0x832870
popq %rbp
retq
nop
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: bit
static void bit() {
    value = getvalue();
    result = (uint16_t)a & value;
   
    zerocalc(result);
    status = (status & 0x3F) | (uint8_t)(value & 0xC0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x815056(%rip)     # 0x832886
movzbl 0x815039(%rip), %eax    # 0x832870
movzwl %ax, %eax
movzwl 0x815045(%rip), %ecx    # 0x832886
andl %ecx, %eax
movw %ax, 0x81503e(%rip)     # 0x832888
movzwl 0x815037(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1d86d
movzbl 0x815011(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x815008(%rip)     # 0x832873
jmp 0x1d87d
movzbl 0x814fff(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x814ff6(%rip)     # 0x832873
movzbl 0x814fef(%rip), %eax    # 0x832873
andl $0x3f, %eax
movzwl 0x814ff8(%rip), %ecx    # 0x832886
andl $0xc0, %ecx
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, 0x814fd4(%rip)     # 0x832873
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: rol
static void rol() {
    value = getvalue();
    result = (value << 1) | (status & FLAG_CARRY);
   
    carrycalc(result);
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x814fc6(%rip)     # 0x832886
movzwl 0x814fbf(%rip), %eax    # 0x832886
shll %eax
movzbl 0x814fa3(%rip), %ecx    # 0x832873
andl $0x1, %ecx
orl %ecx, %eax
movw %ax, 0x814fac(%rip)     # 0x832888
movzwl 0x814fa5(%rip), %eax    # 0x832888
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x1d8ff
movzbl 0x814f7f(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x814f76(%rip)     # 0x832873
jmp 0x1d90f
movzbl 0x814f6d(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x814f64(%rip)     # 0x832873
movzwl 0x814f72(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1d932
movzbl 0x814f4c(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x814f43(%rip)     # 0x832873
jmp 0x1d942
movzbl 0x814f3a(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x814f31(%rip)     # 0x832873
movzwl 0x814f3f(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1d967
movzbl 0x814f19(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x814f0e(%rip)     # 0x832873
jmp 0x1d979
movzbl 0x814f05(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x814efa(%rip)     # 0x832873
movzwl 0x814f08(%rip), %edi    # 0x832888
callq 0x1d5e0
popq %rbp
retq
nopw (%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: bmi
static void bmi() {
    if ((status & FLAG_SIGN) == FLAG_SIGN) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x814eb8(%rip), %eax    # 0x832873
andl $0x80, %eax
cmpl $0x80, %eax
jne 0x1da2b
movw 0x814ea0(%rip), %ax     # 0x83286e
movw %ax, 0x814eab(%rip)     # 0x832880
movzwl 0x814ea8(%rip), %ecx    # 0x832884
movzwl 0x814e8b(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x814e82(%rip)     # 0x83286e
movzwl 0x814e8d(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x814e6f(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1da1a
movl 0x814e55(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x814e4c(%rip)    # 0x832864
jmp 0x1da29
movl 0x814e44(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x814e3b(%rip)    # 0x832864
jmp 0x1da2b
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: lsr
static void lsr() {
    value = getvalue();
    result = value >> 1;
   
    if (value & 1) setcarry();
        else clearcarry();
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x814d06(%rip)     # 0x832886
movzwl 0x814cff(%rip), %eax    # 0x832886
sarl %eax
movw %ax, 0x814cf8(%rip)     # 0x832888
movzwl 0x814cef(%rip), %eax    # 0x832886
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1dbb1
movzbl 0x814ccd(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x814cc4(%rip)     # 0x832873
jmp 0x1dbc1
movzbl 0x814cbb(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x814cb2(%rip)     # 0x832873
movzwl 0x814cc0(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1dbe4
movzbl 0x814c9a(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x814c91(%rip)     # 0x832873
jmp 0x1dbf4
movzbl 0x814c88(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x814c7f(%rip)     # 0x832873
movzwl 0x814c8d(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1dc19
movzbl 0x814c67(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x814c5c(%rip)     # 0x832873
jmp 0x1dc2b
movzbl 0x814c53(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x814c48(%rip)     # 0x832873
movzwl 0x814c56(%rip), %edi    # 0x832888
callq 0x1d5e0
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: bvc
static void bvc() {
    if ((status & FLAG_OVERFLOW) == 0) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x814be8(%rip), %eax    # 0x832873
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1dcf7
movw 0x814bd4(%rip), %ax     # 0x83286e
movw %ax, 0x814bdf(%rip)     # 0x832880
movzwl 0x814bdc(%rip), %ecx    # 0x832884
movzwl 0x814bbf(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x814bb6(%rip)     # 0x83286e
movzwl 0x814bc1(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x814ba3(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1dce6
movl 0x814b89(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x814b80(%rip)    # 0x832864
jmp 0x1dcf5
movl 0x814b78(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x814b6f(%rip)    # 0x832864
jmp 0x1dcf7
popq %rbp
retq
nopl (%rax)