LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Matteo-Grellier[P]RPG/Menu.cpp
// Function: Menu::isEndOfCombat()
bool Menu::isEndOfCombat(){

    int deadGoodGuys = 0;
    int deadMonsters = 0;
    string awnser = "none";

    for (Character* c : Character::charactersList) { //for every characters
        
        if(c->getCurrentHp() <= 0 && c->getJob() != 7) {
            deadGoodGuys++;

        } else if(c->getCurrentHp() <= 0 && c->getJob() == 7) {
            deadMonsters++;

        }

        if (deadMonsters == 3) {
            end("win");
            return true;

        } else if (deadGoodGuys == 3) {
            end("defeat");
            return true;
        }

    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1fe2(%rip), %rsi      # 0x9622
leaq 0x1fdf(%rip), %rdx      # 0x9626
leaq -0x50(%rbp), %rdi
callq 0x340c
leaq 0x5b39(%rip), %rax      # 0xd190
movq (%rax), %r12
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, %r12
setne %bl
je 0x7743
xorl %r15d, %r15d
xorl %r13d, %r13d
movq (%r12), %r14
movq %r14, %rdi
callq 0x3d64
testl %eax, %eax
jg 0x7691
movq %r14, %rdi
callq 0x4c80
cmpl $0x7, %eax
jne 0x76b2
movq %r14, %rdi
callq 0x3d64
testl %eax, %eax
jg 0x76b5
movq %r14, %rdi
callq 0x4c80
xorl %ecx, %ecx
cmpl $0x7, %eax
sete %cl
addl %ecx, %r13d
jmp 0x76b5
incl %r15d
cmpl $0x3, %r13d
je 0x76d0
cmpl $0x3, %r15d
je 0x7707
addq $0x8, %r12
cmpq -0x30(%rbp), %r12
setne %bl
jne 0x7674
jmp 0x7743
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f48(%rip), %rsi      # 0x9627
leaq 0x1f44(%rip), %rdx      # 0x962a
leaq -0x90(%rbp), %rdi
callq 0x340c
leaq -0x90(%rbp), %rdi
callq 0x836a
movq -0x90(%rbp), %rdi
jmp 0x7733
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f15(%rip), %rsi      # 0x962b
leaq 0x1f14(%rip), %rdx      # 0x9631
leaq -0x70(%rbp), %rdi
callq 0x340c
leaq -0x70(%rbp), %rdi
callq 0x836a
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x7743
movq (%r14), %rsi
incq %rsi
callq 0x21c0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x775c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21c0
andb $0x1, %bl
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x77a6
movq -0x60(%rbp), %rsi
jmp 0x7797
jmp 0x77a3
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x77a6
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x77a6
jmp 0x77a3
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x77bf
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/Matteo-Grellier[P]RPG/Menu.cpp
// Function: Menu::end(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Menu::end(string endtype){

    if ( endtype == "win") {
        toScreen(
        "",
        "you won mate, well done !",
        "");
        sleep(1);

    } else if ( endtype == "defeat") {
        toScreen(
        "",
        "you failed poor noob...",
        "");
        sleep(1);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
leaq 0x12a1(%rip), %rsi      # 0x9627
callq 0x2070
testl %eax, %eax
je 0x8450
leaq 0x1291(%rip), %rsi      # 0x962b
movq %rbx, %rdi
callq 0x2070
testl %eax, %eax
jne 0x851a
leaq -0xb0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1176(%rip), %rdx      # 0x9532
leaq -0xc0(%rbp), %rdi
movq %rdx, %rsi
callq 0x340c
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1272(%rip), %rsi      # 0x964c
leaq 0x1282(%rip), %rdx      # 0x9663
leaq -0x60(%rbp), %rdi
callq 0x340c
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1138(%rip), %rdx      # 0x9532
leaq -0x40(%rbp), %rdi
movq %rdx, %rsi
callq 0x340c
leaq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x70ca
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x842f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x8444
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xc0(%rbp), %rdi
jmp 0x8500
leaq -0xd0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x10d0(%rip), %rdx      # 0x9532
leaq -0xe0(%rbp), %rdi
movq %rdx, %rsi
callq 0x340c
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x11af(%rip), %rsi      # 0x9632
leaq 0x11c1(%rip), %rdx      # 0x964b
leaq -0xa0(%rbp), %rdi
callq 0x340c
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x108c(%rip), %rdx      # 0x9532
leaq -0x80(%rbp), %rdi
movq %rdx, %rsi
callq 0x340c
leaq -0xe0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x70ca
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x84de
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x84f9
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x21c0
movq -0xe0(%rbp), %rdi
cmpq %r14, %rdi
je 0x8510
movq (%r14), %rsi
incq %rsi
callq 0x21c0
movl $0x1, %edi
callq 0x2130
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x8547
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x8547
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x8561
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x8561
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0x85ae
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x8587
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x8587
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x85a7
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x85a7
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
cmpq %r14, %rdi
je 0x85be
movq (%r14), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/srcmake[P]tries/src/trie.hpp
// Function: Trie::Insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Trie::Insert(const std::string& word)
	{
	// Starting from the root, traverse/create nodes for each char in the string.
	Node* currNode = root;

	for(int i = 0; i < word.length(); i++)
		{
		char c = word[i];

		// Check if this char has a node created for it yet.
		std::unordered_map<char, Node*>::const_iterator it = currNode->nextNodesMap.find(c);
		
		// If the next node doesn't exist, create it. Otherwise just get the existing one.
		Node* nextNode = it == currNode->nextNodesMap.end() ? new Node(c) : currNode->nextNodesMap[c];
		
		// In case the next node is newly created, make the current node update it's pointer to point to it.
		currNode->nextNodesMap[c] = nextNode;

		// Update currNode for the next iteration.
		currNode = nextNode;

		// If this is the last character in the word, mark the node as the end of the word.
		if(i == word.length() - 1)
			{
			currNode->isEndOfWord = true;
			}
		}
	}

// Assembly:
cmpq $0x0, 0x8(%rsi)
je 0x140e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %r15
xorl %r14d, %r14d
movq (%rbx), %rax
movsbq (%rax,%r14), %r12
movb %r12b, -0x29(%rbp)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdi
movq %r12, %rax
xorl %edx, %edx
divq %rdi
movq %rdx, %rcx
movq (%rsi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x136f
movq (%rdx), %r8
movq %rdx, %rax
cmpb 0x8(%r8), %r12b
je 0x136f
movq %r8, %r9
movq (%r8), %r8
testq %r8, %r8
je 0x136d
movsbq 0x8(%r8), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %eax
cmpq %rcx, %rdx
jne 0x136f
movq %r9, %rax
cmpb %sil, %r12b
jne 0x1341
jmp 0x136f
xorl %eax, %eax
addq $0x8, %r15
testq %rax, %rax
je 0x1392
cmpq $0x0, (%rax)
je 0x1392
movq %r15, %rdi
leaq -0x29(%rbp), %r12
movq %r12, %rsi
callq 0x1af6
movq (%rax), %r13
jmp 0x13d1
movl $0x40, %edi
callq 0x10c0
movq %rax, %r13
addq $0x38, %rax
movq %rax, 0x8(%r13)
movq $0x1, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x3f800000, 0x28(%r13) # imm = 0x3F800000
movups %xmm0, 0x30(%r13)
movb %r12b, (%r13)
movb $0x0, 0x1(%r13)
leaq -0x29(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1af6
movq %r13, (%rax)
movq 0x8(%rbx), %rax
decq %rax
cmpq %r14, %rax
jne 0x13f0
movb $0x1, 0x1(%r13)
incq %r14
movq %r13, %r15
cmpq %r14, 0x8(%rbx)
ja 0x1308
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/srcmake[P]tries/src/trie.hpp
// Function: Trie::Contains(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool Trie::Contains(const std::string& word)
	{
	// Starting from the root, traverse nodes for each char in the string.
	Node* currNode = root;

	for(int i = 0; i < word.length(); i++)
		{
		char c = word[i];

		// Check if this char has a node created for it yet.
		std::unordered_map<char, Node*>::const_iterator it = currNode->nextNodesMap.find(c);
		
		// Get the next node if it exists.
		Node* nextNode = it == currNode->nextNodesMap.end() ? NULL : currNode->nextNodesMap[c];
		
		// If the next node doesn't exist...our Trie doesn't contain it. Return false.
		if(nextNode == NULL) { return false; }
	
		// Update currNode for the next iteration.
		currNode = nextNode;

		// If this is the last character in the word, check if it's marked as the return of a word.
		if(i == word.length() - 1)
			{ return currNode->isEndOfWord; }
		}
	
	return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rsi)
je 0x14ee
movq %rsi, %rbx
movq (%rdi), %r13
xorl %r12d, %r12d
leaq -0x29(%rbp), %r15
movq (%rbx), %rax
movsbq (%rax,%r12), %rcx
movb %cl, -0x29(%rbp)
movq 0x8(%r13), %rdi
movq 0x10(%r13), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x149c
movq (%rdx), %r9
movq %rdx, %rax
cmpb 0x8(%r9), %cl
je 0x149c
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x149a
movsbq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x149c
movq %r10, %rax
cmpb %dil, %cl
jne 0x146e
jmp 0x149c
xorl %eax, %eax
testq %rax, %rax
je 0x14b8
cmpq $0x0, (%rax)
je 0x14b8
leaq 0x8(%r13), %rdi
movq %r15, %rsi
callq 0x1af6
movq (%rax), %rcx
jmp 0x14ba
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x14d8
movq 0x8(%rbx), %rdx
decq %rdx
movb $0x1, %al
cmpq %r12, %rdx
jne 0x14d3
movb 0x1(%rcx), %r14b
xorl %eax, %eax
movq %rcx, %r13
jmp 0x14dd
xorl %eax, %eax
xorl %r14d, %r14d
testb %al, %al
je 0x14f1
incq %r12
cmpq %r12, 0x8(%rbx)
ja 0x1436
xorl %r14d, %r14d
andb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/srcmake[P]tries/src/trie.hpp
// Function: Trie::PrefixExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool Trie::PrefixExists(const std::string& prefix)
	{
	// Starting from the root, traverse nodes for each char in the string.
	Node* currNode = root;

	for(int i = 0; i < prefix.length(); i++)
		{
		char c = prefix[i];

		// Check if this char has a node created for it yet.
		std::unordered_map<char, Node*>::const_iterator it = currNode->nextNodesMap.find(c);
		
		// Get the next node if it exists.
		Node* nextNode = it == currNode->nextNodesMap.end() ? NULL : currNode->nextNodesMap[c];

		// If the nextNode doesn't exist, then this prefix doesn't exist in our Trie.
		if(nextNode == NULL) { return false; }
	
		// Update currNode for the next iteration.
		currNode = nextNode;

		// If this is the last character in the prefix, then this prefix did exist.
		if(i == prefix.length() - 1)
			{ return true; }
		}
	
	return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rsi)
je 0x15e8
movq %rsi, %rbx
movq (%rdi), %r13
xorl %r12d, %r12d
leaq -0x29(%rbp), %r15
movq (%rbx), %rax
movsbq (%rax,%r12), %rcx
movb %cl, -0x29(%rbp)
movq 0x8(%r13), %rdi
movq 0x10(%r13), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x1594
movq (%rdx), %r9
movq %rdx, %rax
cmpb 0x8(%r9), %cl
je 0x1594
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x1592
movsbq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x1594
movq %r10, %rax
cmpb %dil, %cl
jne 0x1566
jmp 0x1594
xorl %eax, %eax
testq %rax, %rax
je 0x15b0
cmpq $0x0, (%rax)
je 0x15b0
leaq 0x8(%r13), %rdi
movq %r15, %rsi
callq 0x1af6
movq (%rax), %rax
jmp 0x15b2
xorl %eax, %eax
testq %rax, %rax
je 0x15d2
movq 0x8(%rbx), %rcx
decq %rcx
cmpq %r12, %rcx
setne %cl
sete %dl
orb %r14b, %dl
movq %rax, %r13
movl %edx, %r14d
jmp 0x15d7
xorl %ecx, %ecx
xorl %r14d, %r14d
testb %cl, %cl
je 0x15eb
incq %r12
cmpq %r12, 0x8(%rbx)
ja 0x152e
xorl %r14d, %r14d
andb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/main.cpp
// Function: MemWrite(unsigned long, unsigned long)
void MemWrite(uint64_t where, uint64_t what) {
  if (where == 0xabcd) {
	write(1, &what, 1);
	return;
  }

  //fprintf(stderr, "mem[0x%llx] = 0x%llx\n", where, what);
  mem[where] = what;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, -0x8(%rbp)
cmpq $0xabcd, %rdi           # imm = 0xABCD
jne 0x2436
leaq -0x8(%rbp), %rsi
movl $0x1, %edx
movl $0x1, %edi
callq 0x2090
jmp 0x2441
leaq 0x7d43(%rip), %rax      # 0xa180
movb %sil, (%rdi,%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/main.cpp
// Function: MemRead(unsigned long)
uint8_t MemRead(uint64_t where) {
  if (where == 0xabcd) {
	char buf;
	read(0, &buf, 1);
	return buf;
  } else {
	//fprintf(stderr, "read mem[0x%llx]\n", where);
	return mem[where];
  }
}

// Assembly:
cmpq $0xabcd, %rdi           # imm = 0xABCD
jne 0x2472
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x9(%rbp), %rbx
movl $0x1, %edx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x21e0
movb (%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x7d07(%rip), %rax      # 0xa180
movb (%rdi,%rax), %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/main.cpp
// Function: main
int main(int argc, char **argv) {
  if (argc < 2) {
	printf("usage: %s bin", argv[0]);
	return 1;
  }

  setbuf(stdin, NULL);
  setbuf(stdout, NULL);

  int fd = open(argv[1], O_RDONLY);
  if (fd < 0) {
	perror("open");
	return 1;
  }

  read(fd, mem, 0xf000);

  mos6502 emu((BusRead)MemRead, (BusWrite)MemWrite);
  emu.Reset();
  emu.Run(0xf000);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x2098, %rsp           # imm = 0x2098
movq %rsi, %rbx
cmpl $0x1, %edi
jg 0x24ac
movq (%rbx), %rsi
leaq 0x4b69(%rip), %rdi      # 0x7004
xorl %eax, %eax
callq 0x2040
movl $0x1, %eax
jmp 0x2564
movq 0x7b15(%rip), %rax      # 0x9fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x21d0
movq 0x7ae4(%rip), %rax      # 0x9fa8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x21d0
movq 0x8(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x256e
leaq 0x7c96(%rip), %rsi      # 0xa180
movl $0xf000, %edx           # imm = 0xF000
movl %eax, %edi
callq 0x21e0
leaq -0xb6(%rip), %rsi       # 0x2447
leaq -0xf8(%rip), %rdx       # 0x240c
leaq -0x20a0(%rbp), %rbx
movq %rbx, %rdi
callq 0x3410
movq %rbx, %rdi
callq 0x576e
leaq -0x20a0(%rbp), %rdi
movl $0xf000, %esi           # imm = 0xF000
callq 0x594e
leaq -0x38(%rbp), %rbx
movq %rbx, %rdi
callq 0x25ee
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x254d
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x2190
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x2562
movq -0x58(%rbp), %rsi
subq %rdi, %rsi
callq 0x2190
xorl %eax, %eax
addq $0x2098, %rsp           # imm = 0x2098
popq %rbx
popq %rbp
retq
leaq 0x4a9d(%rip), %rdi      # 0x7012
callq 0x2150
jmp 0x24a2
movq %rax, %rbx
leaq -0x20a0(%rbp), %rdi
callq 0x2596
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::DumpStatus(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void mos6502::DumpStatus(std::vector<std::string> &args) {
  std::cout << "--- Status ---" << std::endl;
  printf("  A : 0x%x\n  X : 0x%x\n  Y : 0x%x\n", A, X, Y);
  std::cout << " sp : 0x" << std::hex << sp << std::endl;
  std::cout << " pc : 0x" << std::hex << pc << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x755a(%rip), %rbx      # 0x9fd0
leaq 0x45e5(%rip), %rsi      # 0x7062
movl $0xe, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movzbl (%r14), %esi
movzbl 0x1(%r14), %edx
movzbl 0x2(%r14), %ecx
leaq 0x45ab(%rip), %rdi      # 0x7071
xorl %eax, %eax
callq 0x2040
leaq 0x45bf(%rip), %rsi      # 0x7093
movl $0x8, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x20d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq 0x4569(%rip), %rsi      # 0x709c
movl $0x8, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movzwl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::DumpMem(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void mos6502::DumpMem(std::vector<std::string> &args) {
  if (args.size() < 3) {
	std::cout << "usage: x [MEM] [LEN]" << std::endl;
	return;
  }

  uint16_t mem, len;
  std::stringstream ss;
  ss << args[1];
  ss >> mem;
  
  ss << args[2];
  ss >> len;

  for (uint16_t i = 0; i < len; ++i) {
	uint8_t byte = Read(mem + i);
	std::cout << std::hex << byte << " ";
	if (i && (i % 8 == 0)) {
	  std::cout << std::endl;
	}
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x40, %rax
ja 0x2c0a
movq 0x7412(%rip), %rbx      # 0x9fd0
leaq 0x44e0(%rip), %rsi      # 0x70a5
movl $0x14, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1b8(%rbp), %rdi
callq 0x20f0
leaq -0x1a8(%rbp), %r15
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
leaq -0x1b8(%rbp), %rdi
leaq -0x2e(%rbp), %rsi
callq 0x2200
movq (%r14), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movq %r15, %rdi
callq 0x21c0
leaq -0x1b8(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2200
cmpw $0x0, -0x2c(%rbp)
je 0x2d1a
xorl %r13d, %r13d
movq 0x7352(%rip), %r14      # 0x9fd0
leaq -0x29(%rbp), %r15
leaq 0x43b7(%rip), %r12      # 0x7040
movzwl -0x2e(%rbp), %esi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x2d78
movq (%r14), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%r14,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%r14,%rcx)
movb %al, -0x29(%rbp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21c0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21c0
testl %r13d, %r13d
sete %al
testb $0x7, %r13b
setne %cl
orb %al, %cl
jne 0x2d0a
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movzwl -0x2c(%rbp), %eax
incq %r13
cmpl %eax, %r13d
jb 0x2c89
movq 0x728f(%rip), %rsi      # 0x9fb0
leaq -0x1b8(%rbp), %rdi
callq 0x2120
leaq -0x138(%rbp), %rdi
callq 0x2080
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d4d
movq %rax, %rbx
movq 0x7259(%rip), %rsi      # 0x9fb0
leaq -0x1b8(%rbp), %rdi
callq 0x2120
leaq -0x138(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Read(unsigned long)
uint8_t mos6502::Read(uint64_t where) {
  uint8_t byte = InternalRead(where);
  for (auto addr : watches) {
	if (addr == DebugPC) {
	  printf("0x%x: read mem[0x%llx] -> 0x%x\n", DebugPC, where, byte);
	}
  }
  return byte;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq *0x2020(%r14)
movb %al, -0x29(%rbp)
movq 0x2050(%r14), %r15
movq 0x2058(%r14), %r13
cmpq %r13, %r15
je 0x2ddc
movzbl -0x29(%rbp), %r12d
movzwl 0x2030(%r14), %esi
cmpw %si, (%r15)
jne 0x2dd3
leaq 0x4359(%rip), %rdi      # 0x711f
movq %rbx, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2040
addq $0x2, %r15
cmpq %r13, %r15
jne 0x2db1
movb -0x29(%rbp), %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::AddBreakpoint(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void mos6502::AddBreakpoint(std::vector<std::string> &args) {
  if (args.size() < 2) {
	std::cout << "usage: b [MEM]" << std::endl;
	return;
  }

  std::stringstream ss;
  ss << std::hex << args[1];

  uint16_t addr;
  ss >> addr;

  bps.push_back(addr);

  std::cout << "Breakpoint #" << bps.size() << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x20, %rax
ja 0x2e56
movq 0x71c0(%rip), %rbx      # 0x9fd0
leaq 0x42a3(%rip), %rsi      # 0x70ba
movl $0xe, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20e0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x20f0
leaq -0x190(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl -0x178(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, -0x178(%rbp,%rax)
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x21c0
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2200
movq 0x2040(%rbx), %rsi
cmpq 0x2048(%rbx), %rsi
je 0x2ece
movzwl -0x12(%rbp), %eax
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x2040(%rbx)
jmp 0x2ede
leaq 0x2038(%rbx), %rdi
leaq -0x12(%rbp), %rdx
callq 0x5e1a
movq 0x70eb(%rip), %rdi      # 0x9fd0
leaq 0x41dd(%rip), %rsi      # 0x70c9
movl $0xc, %edx
callq 0x21c0
movq 0x2040(%rbx), %rsi
subq 0x2038(%rbx), %rsi
sarq %rsi
movq 0x70c2(%rip), %rdi      # 0x9fd0
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq 0x706c(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2f6a
movq %rax, %rbx
movq 0x703c(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::RemoveBreakpoint(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void mos6502::RemoveBreakpoint(std::vector<std::string> &args) {
  if (args.size() < 2) {
	std::cout << "usage: d [NUM]" << std::endl;
	return;
  }

  std::stringstream ss;
  ss << args[1];

  uint16_t num;
  ss >> num;

  bps[num] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x20, %rax
ja 0x2ffc
movq 0x701a(%rip), %rbx      # 0x9fd0
leaq 0x4119(%rip), %rsi      # 0x70d6
movl $0xe, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20e0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x20f0
leaq -0x190(%rbp), %rdi
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x21c0
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2200
movzwl -0x12(%rbp), %eax
movq 0x2038(%rbx), %rcx
movw $0x0, (%rcx,%rax,2)
movq 0x6f63(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3073
movq %rax, %rbx
movq 0x6f33(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::MemWatch(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void mos6502::MemWatch(std::vector<std::string> &args) {
  if (args.size() < 2) {
	std::cout << "usage: w [ADDR]" << std::endl;
	return;
  }

  std::stringstream ss;
  ss << std::hex << args[1];

  uint16_t addr;
  ss >> addr;

  watches.push_back(addr);

  std::cout << "Watch on #" << watches.size() << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x20, %rax
ja 0x3106
movq 0x6f10(%rip), %rbx      # 0x9fd0
leaq 0x401e(%rip), %rsi      # 0x70e5
movl $0xf, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20e0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x20f0
leaq -0x190(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl -0x178(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, -0x178(%rbp,%rax)
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x21c0
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2200
movq 0x2058(%rbx), %rsi
cmpq 0x2060(%rbx), %rsi
je 0x317e
movzwl -0x12(%rbp), %eax
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x2058(%rbx)
jmp 0x318e
leaq 0x2050(%rbx), %rdi
leaq -0x12(%rbp), %rdx
callq 0x5e1a
movq 0x6e3b(%rip), %rdi      # 0x9fd0
leaq 0x3f59(%rip), %rsi      # 0x70f5
movl $0xa, %edx
callq 0x21c0
movq 0x2058(%rbx), %rsi
subq 0x2050(%rbx), %rsi
sarq %rsi
movq 0x6e12(%rip), %rdi      # 0x9fd0
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq 0x6dbc(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x321a
movq %rax, %rbx
movq 0x6d8c(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::RemoveMemWatch(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void mos6502::RemoveMemWatch(std::vector<std::string> &args) {
  if (args.size() < 2) {
	std::cout << "usage: r [NUM]" << std::endl;
	return;
  }

  std::stringstream ss;
  ss << args[1];

  uint16_t num;
  ss >> num;

  watches[num] = 0;

  std::cout << "Removed watch #" << num << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x20, %rax
ja 0x32ac
movq 0x6d6a(%rip), %rbx      # 0x9fd0
leaq 0x3e93(%rip), %rsi      # 0x7100
movl $0xe, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20e0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x20f0
leaq -0x190(%rbp), %rdi
movq (%r14), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x21c0
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2200
movzwl -0x12(%rbp), %eax
movq 0x2050(%rbx), %rcx
movw $0x0, (%rcx,%rax,2)
movq 0x6cd3(%rip), %rdi      # 0x9fd0
leaq 0x3e0b(%rip), %rsi      # 0x710f
movl $0xf, %edx
callq 0x21c0
movzwl -0x12(%rbp), %esi
movq 0x6cb7(%rip), %rdi      # 0x9fd0
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq 0x6c61(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3375
movq %rax, %rbx
movq 0x6c31(%rip), %rsi      # 0x9fb0
leaq -0x1a0(%rbp), %rdi
callq 0x2120
leaq -0x120(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Write(unsigned long, unsigned long)
void mos6502::Write(uint64_t where, uint64_t what) {
  for (auto addr : watches) {
	if (addr == DebugPC) {
	  printf("0x%x: write mem[0x%llx] <- 0x%llx\n", DebugPC, where, what);
	}
  }
  InternalWrite(where, what);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x2050(%rdi), %r13
movq 0x2058(%rdi), %r12
cmpq %r12, %r13
je 0x33f3
movzwl 0x2030(%r15), %esi
cmpw %si, (%r13)
jne 0x33ed
leaq 0x3d5f(%rip), %rdi      # 0x713f
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2040
addq $0x2, %r13
jmp 0x33c5
movq 0x2028(%r15), %rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ADC(unsigned short)
void mos6502::Op_ADC(uint16_t src)
{
	uint8_t m = Read(src);
	unsigned int tmp = m + A + (IF_CARRY() ? 1 : 0);
	SET_ZERO(!(tmp & 0xFF));
    if (IF_DECIMAL())
    {
        if (((A & 0xF) + (m & 0xF) + (IF_CARRY() ? 1 : 0)) > 9) tmp += 6;
        SET_NEGATIVE(tmp & 0x80);
        SET_OVERFLOW(!((A ^ m) & 0x80) && ((A ^ tmp) & 0x80));
        if (tmp > 0x99)
        {
        	tmp += 96;
        }
        SET_CARRY(tmp > 0x99);
    }
	else
	{
		SET_NEGATIVE(tmp & 0x80);
		SET_OVERFLOW(!((A ^ m) & 0x80) && ((A ^ tmp) & 0x80));
		SET_CARRY(tmp > 0xFF);
    }
	
    A = tmp & 0xFF;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movzbl %al, %esi
movzbl (%rbx), %edx
movzbl 0x12(%rbx), %edi
movl %edi, %eax
andl $0x1, %eax
addl %edx, %eax
addl %esi, %eax
xorl %ecx, %ecx
testb %al, %al
sete %cl
andl $-0x3, %edi
leal (%rdi,%rcx,2), %r8d
movb %r8b, 0x12(%rbx)
testb $0x8, %r8b
jne 0x4930
movl %r8d, %ecx
andb $0x77, %cl
orb $-0x80, %r8b
testb %al, %al
movzbl %cl, %edi
movzbl %r8b, %ecx
cmovnsl %edi, %ecx
movb %cl, 0x12(%rbx)
xorl %edx, %esi
cmpl $0x7f, %esi
ja 0x492b
xorb %al, %dl
js 0x496d
andb $-0x41, %cl
jmp 0x4970
movl %edx, %ecx
andl $0xf, %ecx
movl %esi, %edi
andl $0xf, %edi
addl %ecx, %edi
movl %r8d, %ecx
andl $0x1, %ecx
addl %edi, %ecx
leal 0x6(%rax), %edi
cmpl $0xa, %ecx
cmovbl %eax, %edi
andb $0x7f, %r8b
movl %edi, %ecx
andb $-0x80, %cl
orb %r8b, %cl
movb %cl, 0x12(%rbx)
xorl %edx, %esi
cmpl $0x7f, %esi
ja 0x4968
xorb %dil, %dl
js 0x497f
andb $-0x41, %cl
jmp 0x4982
orb $0x40, %cl
movb %cl, 0x12(%rbx)
cmpl $0x100, %eax            # imm = 0x100
jae 0x4993
andb $-0x2, %cl
jmp 0x4996
orb $0x40, %cl
movb %cl, 0x12(%rbx)
leal 0x60(%rdi), %eax
cmpl $0x9a, %edi
cmovbl %edi, %eax
jb 0x497a
orb $0x1, %cl
movb %cl, 0x12(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_ABS()
uint16_t mos6502::Addr_ABS()
{
	uint16_t addrL;
	uint16_t addrH;
	uint16_t addr;
	
	addrL = Read(pc++);
	addrH = Read(pc++);
	
	addr = addrL + (addrH << 8);
		
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl 0x10(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rdi)
callq 0x2d78
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2d78
movzbl %r14b, %ecx
movzbl %al, %eax
shll $0x8, %eax
orl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_INX()
uint16_t mos6502::Addr_INX()
{
	uint16_t zeroL;
	uint16_t zeroH;
	uint16_t addr;
	
	zeroL = (Read(pc++) + X) % 256;
	zeroH = (zeroL + 1) % 256;
	addr = Read(zeroL) + (Read(zeroH) << 8);
	
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x10(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rdi)
callq 0x2d78
movl %eax, %r14d
addb 0x1(%rbx), %r14b
movzbl %r14b, %esi
incb %r14b
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %r15d
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
shll $0x8, %eax
orl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_INY()
uint16_t mos6502::Addr_INY()
{
	uint16_t zeroL;
	uint16_t zeroH;
	uint16_t addr;
	
	zeroL = Read(pc++);
	zeroH = (zeroL + 1) % 256;
	addr = Read(zeroL) + (Read(zeroH) << 8) + Y;
	
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x10(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rdi)
callq 0x2d78
movl %eax, %r14d
movzbl %al, %esi
incb %r14b
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %r15d
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %ecx
shll $0x8, %ecx
orl %r15d, %ecx
movzbl 0x2(%rbx), %eax
addl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_ABX()
uint16_t mos6502::Addr_ABX()
{
	uint16_t addr;
	uint16_t addrL;
	uint16_t addrH;
	
	addrL = Read(pc++);
	addrH = Read(pc++);
	
	addr = addrL + (addrH << 8) + X;
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl 0x10(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rdi)
callq 0x2d78
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2d78
movzbl %r14b, %ecx
movzbl %al, %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x1(%rbx), %eax
addl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_AND(unsigned short)
void mos6502::Op_AND(uint16_t src)
{
	uint8_t m = Read(src);
	uint8_t res = m & A;
	SET_NEGATIVE(res & 0x80);
	SET_ZERO(!res);
	A = res;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
andb (%rbx), %al
movb 0x12(%rbx), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ASL(unsigned short)
void mos6502::Op_ASL(uint16_t src)
{
	uint8_t m = Read(src);
    SET_CARRY(m & 0x80);
    m <<= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rsi
callq 0x2d78
movb 0x12(%rbx), %cl
andb $0x7c, %cl
movl %eax, %edx
shrb $0x7, %dl
orb %cl, %dl
addb %al, %al
movl %eax, %ecx
andb $-0x80, %cl
orb %dl, %cl
testb %al, %al
sete %dl
addb %dl, %dl
orb %cl, %dl
movb %dl, 0x12(%rbx)
movzbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_ASL_ACC(unsigned short)
void mos6502::Op_ASL_ACC(uint16_t src)
{
	uint8_t m = A;
    SET_CARRY(m & 0x80);
    m <<= 1;
    m &= 0xFF;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
movb 0x12(%rdi), %cl
andb $0x7c, %cl
movl %eax, %edx
shrb $0x7, %dl
orb %cl, %dl
addb %al, %al
movl %eax, %ecx
andb $-0x80, %cl
orb %dl, %cl
testb %al, %al
sete %dl
addb %dl, %dl
orb %cl, %dl
movb %dl, 0x12(%rdi)
movb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_REL()
uint16_t mos6502::Addr_REL()
{
	uint16_t offset;
	uint16_t addr;
	
	offset = (uint16_t)Read(pc++);
    if (offset & 0x80) offset |= 0xFF00;	
    addr = pc + (int16_t)offset;
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x10(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rdi)
callq 0x2d78
movzbl %al, %ecx
movl %ecx, %eax
orl $0xffffff00, %eax       # imm = 0xFFFFFF00
testb %cl, %cl
cmovnsl %ecx, %eax
addw 0x10(%rbx), %ax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_BIT(unsigned short)
void mos6502::Op_BIT(uint16_t src)
{
	uint8_t m = Read(src);
	uint8_t res = m & A;
	SET_NEGATIVE(res & 0x80);
	status = (status & 0x3F) | (uint8_t)(m & 0xC0);
	SET_ZERO(!res);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movb 0x12(%rbx), %cl
andb $0x3d, %cl
movl %eax, %edx
andb $-0x40, %dl
testb %al, (%rbx)
sete %al
addb %al, %al
orb %dl, %al
orb %cl, %al
movb %al, 0x12(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_BRK(unsigned short)
void mos6502::Op_BRK(uint16_t src)
{
	pc++;
	StackPush((pc >> 8) & 0xFF);
	StackPush(pc & 0xFF);
	StackPush(status | BREAK);
	SET_INTERRUPT(1);
	pc = (Read(irqVectorH) << 8) + Read(irqVectorL);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %eax
incl %eax
movw %ax, 0x10(%rdi)
movzbl %ah, %edx
movl $0x100, %r14d           # imm = 0x100
movq 0x8(%rdi), %rsi
addq %r14, %rsi
callq 0x33a0
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
movl $0xff, %r15d
cmovbq %r15, %rsi
movq %rsi, 0x8(%rbx)
movzbl 0x10(%rbx), %edx
addq %r14, %rsi
movq %rbx, %rdi
callq 0x33a0
movq 0x8(%rbx), %rsi
subq $0x1, %rsi
cmovbq %r15, %rsi
movq %rsi, 0x8(%rbx)
movzbl 0x12(%rbx), %edx
orq $0x10, %rdx
addq %r14, %rsi
movq %rbx, %rdi
callq 0x33a0
movq 0x8(%rbx), %rax
subq $0x1, %rax
cmovbq %r15, %rax
movq %rax, 0x8(%rbx)
orb $0x4, 0x12(%rbx)
movl $0xffff, %esi           # imm = 0xFFFF
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %r14d
shll $0x8, %r14d
movl $0xfffe, %esi           # imm = 0xFFFE
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %eax
orl %r14d, %eax
movw %ax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_CMP(unsigned short)
void mos6502::Op_CMP(uint16_t src)
{
	unsigned int tmp = A - Read(src);
	SET_CARRY(tmp < 0x100);
	SET_NEGATIVE(tmp & 0x80);
	SET_ZERO(!(tmp & 0xFF));
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %r14d
movl %esi, %esi
callq 0x2d78
movzbl %al, %eax
subl %eax, %r14d
cmpl $0x100, %r14d           # imm = 0x100
setb %al
movb 0x12(%rbx), %cl
andb $0x7c, %cl
orb %al, %cl
movl %r14d, %eax
andb $-0x80, %al
orb %cl, %al
testb %r14b, %r14b
sete %cl
addb %cl, %cl
orb %al, %cl
movb %cl, 0x12(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_DEC(unsigned short)
void mos6502::Op_DEC(uint16_t src)
{
	uint8_t m = Read(src);
	m = (m - 1) % 256;
    SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rsi
callq 0x2d78
decb %al
movb 0x12(%rbx), %cl
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rbx)
movzbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_DEX(unsigned short)
void mos6502::Op_DEX(uint16_t src)
{
	uint8_t m = X;
	m = (m - 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    X = m;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1(%rdi), %al
movb 0x12(%rdi), %cl
decb %al
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x1(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_DEY(unsigned short)
void mos6502::Op_DEY(uint16_t src)
{
	uint8_t m = Y;
	m = (m - 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Y = m;
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x2(%rdi), %al
movb 0x12(%rdi), %cl
decb %al
andb $0x7d, %cl
movl %eax, %edx
andb $-0x80, %dl
orb %cl, %dl
testb %al, %al
sete %cl
addb %cl, %cl
orb %dl, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x2(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_EOR(unsigned short)
void mos6502::Op_EOR(uint16_t src)
{
	uint8_t m = Read(src);
	m = A ^ m;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2d78
movb (%rbx), %cl
movb 0x12(%rbx), %dl
movl %ecx, %esi
xorb %al, %sil
andb $0x7d, %dl
movl %esi, %edi
andb $-0x80, %dil
orb %dl, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %dil, %al
movb %al, 0x12(%rbx)
movb %sil, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_INC(unsigned short)
void mos6502::Op_INC(uint16_t src)
{
	uint8_t m = Read(src);
	m = (m + 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Write(src, m);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
movq %r14, %rsi
callq 0x2d78
incb %al
sete %cl
movb 0x12(%rbx), %sil
andb $0x7d, %sil
movzbl %al, %edx
andb $-0x80, %al
orb %sil, %al
addb %cl, %cl
orb %al, %cl
movb %cl, 0x12(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x33a0
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_INX(unsigned short)
void mos6502::Op_INX(uint16_t src)
{
	uint8_t m = X;
	m = (m + 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    X = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x1(%rdi), %al
movb 0x12(%rdi), %cl
incb %al
sete %dl
andb $0x7d, %cl
movl %eax, %esi
andb $-0x80, %sil
orb %cl, %sil
addb %dl, %dl
orb %sil, %dl
movb %dl, 0x12(%rdi)
movb %al, 0x1(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_INY(unsigned short)
void mos6502::Op_INY(uint16_t src)
{
	uint8_t m = Y;
	m = (m + 1) % 256;
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
    Y = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb 0x2(%rdi), %al
movb 0x12(%rdi), %cl
incb %al
sete %dl
andb $0x7d, %cl
movl %eax, %esi
andb $-0x80, %sil
orb %cl, %sil
addb %dl, %dl
orb %sil, %dl
movb %dl, 0x12(%rdi)
movb %al, 0x2(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_ABI()
uint16_t mos6502::Addr_ABI()
{
	uint16_t addrL;
	uint16_t addrH;
	uint16_t effL;
	uint16_t effH;
	uint16_t abs;
	uint16_t addr;
	
	addrL = Read(pc++);
	addrH = Read(pc++);
	
	abs = (addrH << 8) | addrL;
	
	effL = Read(abs);
	effH = Read((abs & 0xFF00) + ((abs + 1) & 0x00FF) );
	
	addr = effL + 0x100 * effH;
	
	return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movzwl 0x10(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rdi)
callq 0x2d78
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2d78
movzbl %al, %r15d
shll $0x8, %r15d
movzbl %r14b, %r12d
orl %r12d, %r15d
movzwl %r15w, %esi
movq %rbx, %rdi
callq 0x2d78
movl %eax, %r14d
andl $0xff00, %r15d          # imm = 0xFF00
incl %r12d
movzbl %r12b, %esi
orl %r15d, %esi
movq %rbx, %rdi
callq 0x2d78
movzbl %r14b, %ecx
movzbl %al, %eax
shll $0x8, %eax
orl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_JSR(unsigned short)
void mos6502::Op_JSR(uint16_t src)
{
	pc--;
	StackPush((pc >> 8) & 0xFF);
	StackPush(pc & 0xFF);
	pc = src;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %eax
decl %eax
movw %ax, 0x10(%rdi)
movzbl %ah, %edx
movl $0x100, %r15d           # imm = 0x100
movq 0x8(%rdi), %rsi
addq %r15, %rsi
callq 0x33a0
movq 0x8(%r14), %rsi
subq $0x1, %rsi
movl $0xff, %r12d
cmovbq %r12, %rsi
movq %rsi, 0x8(%r14)
movzbl 0x10(%r14), %edx
addq %r15, %rsi
movq %r14, %rdi
callq 0x33a0
movq 0x8(%r14), %rax
subq $0x1, %rax
cmovbq %r12, %rax
movq %rax, 0x8(%r14)
movw %bx, 0x10(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq