LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Matteo-Grellier[P]RPG/Menu.cpp
// Function: Menu::ask(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Menu::ask(string line1, string line2) {
    
    int answer;

    devToScreen(
    line1,
    line2 + " :",
    " ");

    cout << Menu::endLine;
    cin >> answer;

    return answer;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq -0x70(%rbp), %rdi
callq 0x21e0
leaq 0x2555(%rip), %rdx      # 0x74fc
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x39a9
leaq 0x2577(%rip), %rsi      # 0x7531
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x2c78
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x4f26
leaq -0x30(%rbp), %rdi
callq 0x22a8
leaq -0x50(%rbp), %rdi
callq 0x22a8
leaq -0x70(%rbp), %rdi
callq 0x22a8
movq 0x5fce(%rip), %rdi      # 0xafc8
leaq 0x61cf(%rip), %rsi      # 0xb1d0
callq 0x2150
movq 0x5fcb(%rip), %rdi      # 0xafd8
leaq -0x10(%rbp), %rbx
movq %rbx, %rsi
callq 0x20f0
movl (%rbx), %eax
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x22a8
jmp 0x5033
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x22a8
jmp 0x5041
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x22a8
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/Matteo-Grellier[P]RPG/Menu.cpp
// Function: Menu::turn()
void Menu::turn() {

    vector<Character*> charactersList = Character::charactersList;
    vector<int> speedList;
    vector<Character*> charactersOrdered;


    for (Character* c : Character::charactersList) {
        speedList.push_back(c->speed);

    }

    sort(speedList.begin() , speedList.end(), greater<int>());

    for (int speed : speedList) {

        for (Character* c : Character::charactersList) {

            if (c->speed == speed ) {

                charactersOrdered.push_back(c);

            }
        }

    }  

    for (Character* c : charactersOrdered) {

        if (!isEndOfCombat() && c->getCurrentHp() != 0) {
            actions(*c);
        } else {
            return;
        }       
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0x6126(%rip), %r15      # 0xb190
leaq -0x90(%rbp), %rdi
movq %r15, %rsi
callq 0x5a78
leaq -0x60(%rbp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
andq $0x0, -0x30(%rbp)
movaps %xmm0, (%r14)
movaps %xmm0, -0x40(%rbp)
movq (%r15), %rbx
movq 0x8(%r15), %r15
cmpq %r15, %rbx
je 0x50b3
movq (%rbx), %rsi
addq $0x28, %rsi
movq %r14, %rdi
callq 0x5ad0
addq $0x8, %rbx
jmp 0x5099
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x5d16
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, -0x68(%rbp)
leaq -0x40(%rbp), %r14
leaq -0x78(%rbp), %r15
cmpq -0x68(%rbp), %rax
je 0x511b
movq %rax, -0x70(%rbp)
movl (%rax), %ebx
leaq 0x60a9(%rip), %rax      # 0xb190
movq (%rax), %r13
movq 0x8(%rax), %r12
cmpq %r12, %r13
je 0x5111
movq (%r13), %rax
movq %rax, -0x78(%rbp)
cmpl %ebx, 0x28(%rax)
jne 0x510b
movq %r14, %rdi
movq %r15, %rsi
callq 0x5af6
addq $0x8, %r13
jmp 0x50ee
movq -0x70(%rbp), %rax
addq $0x4, %rax
jmp 0x50d4
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %r15
cmpq %r15, %r14
je 0x514e
movq (%r14), %rbx
callq 0x51aa
testb %al, %al
jne 0x514e
movq %rbx, %rdi
callq 0x3406
testl %eax, %eax
je 0x514e
movq %rbx, %rdi
callq 0x52dc
addq $0x8, %r14
jmp 0x5123
leaq -0x40(%rbp), %rdi
callq 0x2f24
leaq -0x60(%rbp), %rdi
callq 0x5b7e
leaq -0x90(%rbp), %rdi
callq 0x2f24
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5181
jmp 0x5181
jmp 0x5181
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2f24
leaq -0x60(%rbp), %rdi
callq 0x5b7e
leaq -0x90(%rbp), %rdi
callq 0x2f24
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2460(%rip), %rsi      # 0x7622
leaq -0x90(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2c78
leaq 0x5fb7(%rip), %rax      # 0xb190
movq (%rax), %r14
movq 0x8(%rax), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq %r15, %r14
je 0x5287
movq (%r14), %rbx
movq %rbx, %rdi
callq 0x3406
testl %eax, %eax
jg 0x520b
movq %rbx, %rdi
callq 0x3900
cmpl $0x7, %eax
jne 0x522f
movq %rbx, %rdi
callq 0x3406
testl %eax, %eax
jg 0x5238
movq %rbx, %rdi
callq 0x3900
cmpl $0x7, %eax
jne 0x5238
incl %r12d
cmpl $0x3, %r12d
jne 0x5238
jmp 0x5261
incl %r13d
cmpl $0x3, %r13d
je 0x523e
addq $0x8, %r14
jmp 0x51e6
leaq 0x23e6(%rip), %rsi      # 0x762b
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2c78
leaq -0x50(%rbp), %rdi
callq 0x58e2
leaq -0x50(%rbp), %rdi
jmp 0x5282
leaq 0x23bf(%rip), %rsi      # 0x7627
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2c78
leaq -0x70(%rbp), %rdi
callq 0x58e2
leaq -0x70(%rbp), %rdi
callq 0x22a8
cmpq %r15, %r14
setne %bl
leaq -0x90(%rbp), %rdi
callq 0x22a8
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
jmp 0x52bc
jmp 0x52c5
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x22a8
jmp 0x52c8
jmp 0x52c5
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x22a8
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/Matteo-Grellier[P]RPG/Menu.cpp
// Function: Menu::targetListing[abi:cxx11]()
string Menu::targetListing() {
    string buffStr = "";
    int buffInt = 0;

    for (Character* c : Character::charactersList) {

        if(c->getCurrentHp() != 0) {
            buffStr += to_string(buffInt) + ". " + c->name + " | ";
        }

        buffInt++;

    }

    return buffStr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x1d97(%rip), %rsi      # 0x7532
leaq -0x80(%rbp), %rdx
movq %rdi, -0x38(%rbp)
callq 0x2c78
leaq 0x59e1(%rip), %rax      # 0xb190
movq (%rax), %r12
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0xa0(%rbp), %rbx
cmpq -0x40(%rbp), %r12
je 0x5878
movq %rbx, %r13
movq (%r12), %r14
movq %r14, %rdi
callq 0x3406
testl %eax, %eax
movq %r13, %rbx
je 0x586c
movq %rbx, %rdi
movl -0x2c(%rbp), %esi
callq 0x39e1
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
leaq 0x1d25(%rip), %rdx      # 0x7530
callq 0x2dbc
addq $0x8, %r14
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a41
leaq -0x80(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x1cc8(%rip), %rdx      # 0x74ff
callq 0x2dbc
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x2290
movq %r14, %rdi
callq 0x22a8
leaq -0x60(%rbp), %rdi
callq 0x22a8
movq %r15, %rdi
callq 0x22a8
movq %r13, %rdi
callq 0x22a8
movq %r13, %rbx
incl -0x2c(%rbp)
addq $0x8, %r12
jmp 0x57c8
movq -0x38(%rbp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x58ce
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x22a8
jmp 0x58ab
movq %rax, %rbx
jmp 0x58c0
movq %rax, %rbx
jmp 0x58b4
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x22a8
leaq -0xc0(%rbp), %rdi
callq 0x22a8
leaq -0xa0(%rbp), %rdi
callq 0x22a8
jmp 0x58d1
movq %rax, %rbx
movq -0x38(%rbp), %rdi
callq 0x22a8
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x1d2f(%rip), %rsi      # 0x7627
callq 0x5b48
testb %al, %al
je 0x5985
leaq 0x1c26(%rip), %rsi      # 0x7532
leaq -0xd0(%rbp), %rdi
leaq -0xb(%rbp), %rdx
callq 0x2c78
leaq 0x1d0f(%rip), %rsi      # 0x7632
leaq -0xb0(%rbp), %rdi
leaq -0xa(%rbp), %rdx
callq 0x2c78
leaq 0x1bf8(%rip), %rsi      # 0x7532
leaq -0x90(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x2c78
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x4e84
leaq -0x90(%rbp), %rdi
callq 0x22a8
leaq -0xb0(%rbp), %rdi
callq 0x22a8
leaq -0xd0(%rbp), %rdi
jmp 0x59fb
leaq 0x1c9f(%rip), %rsi      # 0x762b
movq %rbx, %rdi
callq 0x5b48
testb %al, %al
je 0x5a08
leaq 0x1b93(%rip), %rsi      # 0x7532
leaq -0x70(%rbp), %rdi
leaq -0xb(%rbp), %rdx
callq 0x2c78
leaq 0x1c99(%rip), %rsi      # 0x764c
leaq -0x50(%rbp), %rdi
leaq -0xa(%rbp), %rdx
callq 0x2c78
leaq 0x1b6b(%rip), %rsi      # 0x7532
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x2c78
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x4e84
leaq -0x30(%rbp), %rdi
callq 0x22a8
leaq -0x50(%rbp), %rdi
callq 0x22a8
leaq -0x70(%rbp), %rdi
callq 0x22a8
pushq $0x1
popq %rdi
callq 0x2110
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x22a8
jmp 0x5a23
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x22a8
jmp 0x5a31
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
jmp 0x5a65
jmp 0x5a6c
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x22a8
jmp 0x5a4d
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x22a8
jmp 0x5a5e
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x22a8
jmp 0x5a6f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %r12
movq 0x8(%rsi), %rax
xorl %r15d, %r15d
leaq -0x29(%rbp), %r14
cmpq %r15, %rax
jbe 0x1381
movq (%rbx), %rax
movb (%rax,%r15), %al
movb %al, -0x29(%rbp)
addq $0x8, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x17fa
testq %rax, %rax
je 0x131a
movq %r12, %rdi
movq %r14, %rsi
callq 0x1888
movq (%rax), %r13
jmp 0x1356
pushq $0x40
popq %rdi
callq 0x10d0
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 -0x29(%rbp), %al
movb %al, (%r13)
movb $0x0, 0x1(%r13)
movq %r12, %rdi
movq %r14, %rsi
callq 0x1888
movq %r13, (%rax)
movq 0x8(%rbx), %rax
leaq -0x1(%rax), %rcx
cmpq %rcx, %r15
jne 0x1376
movb $0x1, 0x1(%r13)
incq %r15
movq %r13, %r12
jmp 0x12e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq (%rdi), %r14
movq 0x8(%rsi), %rax
xorl %r12d, %r12d
leaq -0x21(%rbp), %r15
cmpq %r12, %rax
jbe 0x13f8
movq (%rbx), %rax
movb (%rax,%r12), %al
movb %al, -0x21(%rbp)
addq $0x8, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x17fa
testq %rax, %rax
je 0x13f8
movq %r14, %rdi
movq %r15, %rsi
callq 0x1888
movq (%rax), %r14
testq %r14, %r14
je 0x13f8
movq 0x8(%rbx), %rax
leaq -0x1(%rax), %rcx
cmpq %rcx, %r12
je 0x13fc
incq %r12
jmp 0x13b0
xorl %eax, %eax
jmp 0x1400
movb 0x1(%r14), %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %rbx
movq (%rdi), %r12
movq 0x8(%rsi), %rax
xorl %r13d, %r13d
leaq -0x29(%rbp), %r14
cmpq %r13, %rax
seta %r15b
jbe 0x1478
movq (%rbx), %rax
movb (%rax,%r13), %al
movb %al, -0x29(%rbp)
addq $0x8, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x17fa
testq %rax, %rax
je 0x1475
movq %r12, %rdi
movq %r14, %rsi
callq 0x1888
movq (%rax), %r12
testq %r12, %r12
je 0x1475
movq 0x8(%rbx), %rax
incq %r13
cmpq %rax, %r13
jne 0x142d
jmp 0x1478
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2442
pushq $0x1
popq %rdi
leaq -0x8(%rbp), %rsi
pushq $0x1
popq %rdx
callq 0x2080
jmp 0x244d
leaq 0x6d47(%rip), %rax      # 0x9190
movb %sil, (%rdi,%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x247c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x9(%rbp), %rbx
pushq $0x1
popq %rdx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2210
movb (%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x6d0d(%rip), %rax      # 0x9190
movb (%rdi,%rax), %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x24b4
movq (%rbx), %rsi
leaq 0x3b5f(%rip), %rdi      # 0x6004
xorl %eax, %eax
callq 0x2030
pushq $0x1
popq %rax
jmp 0x253e
movq 0x6b0d(%rip), %rax      # 0x8fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2200
movq 0x6ae4(%rip), %rax      # 0x8fb0
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2200
movq 0x8(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2120
testl %eax, %eax
js 0x2548
leaq 0x6ca2(%rip), %rsi      # 0x9190
movl $0xf000, %edx           # imm = 0xF000
movl %eax, %edi
callq 0x2210
leaq -0xae(%rip), %rsi       # 0x2453
leaq -0xec(%rip), %rdx       # 0x241c
leaq -0x20a0(%rbp), %rbx
movq %rbx, %rdi
callq 0x2f40
movq %rbx, %rdi
callq 0x51d0
leaq -0x20a0(%rbp), %rdi
movl $0xf000, %esi           # imm = 0xF000
callq 0x5306
leaq -0x20a0(%rbp), %rdi
callq 0x2570
xorl %eax, %eax
addq $0x2098, %rsp           # imm = 0x2098
popq %rbx
popq %rbp
retq
leaq 0x3ac3(%rip), %rdi      # 0x6012
callq 0x2160
jmp 0x24ac
movq %rax, %rbx
leaq -0x20a0(%rbp), %rdi
callq 0x2570
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
movq %rdi, %rbx
movq 0x6703(%rip), %r14      # 0x8fd0
leaq 0x378e(%rip), %rsi      # 0x6062
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20d0
movzbl (%rbx), %esi
movzbl 0x1(%rbx), %edx
movzbl 0x2(%rbx), %ecx
leaq 0x377b(%rip), %rdi      # 0x6071
xorl %eax, %eax
callq 0x2030
leaq 0x378f(%rip), %rsi      # 0x6093
movq %r14, %rdi
callq 0x2190
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20d0
leaq 0x3760(%rip), %rsi      # 0x609c
movq %r14, %rdi
callq 0x2190
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movzwl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq 0x8(%rsi), %rax
subq (%rsi), %rax
cmpq $0x40, %rax
ja 0x29bb
movq 0x6638(%rip), %rdi      # 0x8fd0
leaq 0x3706(%rip), %rsi      # 0x60a5
callq 0x2190
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20d0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x2100
leaq -0x1a0(%rbp), %r15
movq (%r14), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x2180
leaq -0x1b0(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x2230
movq (%r14), %rsi
addq $0x40, %rsi
movq %r15, %rdi
callq 0x2180
leaq -0x1b0(%rbp), %rdi
leaq -0x22(%rbp), %rsi
callq 0x2230
xorl %r12d, %r12d
movq 0x65b4(%rip), %r14      # 0x8fd0
leaq 0x361d(%rip), %r15      # 0x6040
movzwl -0x22(%rbp), %eax
cmpl %eax, %r12d
jae 0x2a86
movzwl -0x24(%rbp), %esi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x2abc
movq (%r14), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%r14,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%r14,%rcx)
movsbl %al, %esi
movq %r14, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
testl %r12d, %r12d
sete %al
testb $0x7, %r12b
setne %cl
orb %al, %cl
jne 0x2a81
movq %r14, %rdi
callq 0x20d0
incq %r12
jmp 0x2a23
leaq -0x1b0(%rbp), %rdi
callq 0x2130
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2aa4
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/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)
movq 0x2050(%r14), %r15
movq 0x2058(%r14), %r13
movb %al, -0x29(%rbp)
movzbl %al, %r12d
cmpq %r13, %r15
je 0x2b1c
movzwl (%r15), %esi
cmpw 0x2030(%r14), %si
jne 0x2b16
leaq 0x3616(%rip), %rdi      # 0x611f
movq %rbx, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2030
addq $0x2, %r15
jmp 0x2aef
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_O2/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 0x2b6f
movq 0x6480(%rip), %rdi      # 0x8fd0
leaq 0x3563(%rip), %rsi      # 0x60ba
callq 0x2190
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2100
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), %rsi
addq $0x20, %rsi
callq 0x2180
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2230
leaq 0x2038(%rbx), %rdi
leaq -0x12(%rbp), %rsi
callq 0x54c6
movq 0x63fa(%rip), %rdi      # 0x8fd0
leaq 0x34ec(%rip), %rsi      # 0x60c9
callq 0x2190
movq 0x2040(%rbx), %rsi
subq 0x2038(%rbx), %rsi
sarq %rsi
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20d0
leaq -0x1a0(%rbp), %rdi
callq 0x2130
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2c1d
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c75
movq 0x637a(%rip), %rdi      # 0x8fd0
leaq 0x3479(%rip), %rsi      # 0x60d6
callq 0x2190
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2100
leaq -0x190(%rbp), %rdi
movq (%r14), %rsi
addq $0x20, %rsi
callq 0x2180
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2230
movzwl -0x12(%rbp), %eax
movq 0x2038(%rbx), %rcx
andw $0x0, (%rcx,%rax,2)
leaq -0x1a0(%rbp), %rdi
callq 0x2130
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2cd4
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2d2d
movq 0x62c2(%rip), %rdi      # 0x8fd0
leaq 0x33d0(%rip), %rsi      # 0x60e5
callq 0x2190
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2100
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), %rsi
addq $0x20, %rsi
callq 0x2180
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2230
leaq 0x2050(%rbx), %rdi
leaq -0x12(%rbp), %rsi
callq 0x54c6
movq 0x623c(%rip), %rdi      # 0x8fd0
leaq 0x335a(%rip), %rsi      # 0x60f5
callq 0x2190
movq 0x2058(%rbx), %rsi
subq 0x2050(%rbx), %rsi
sarq %rsi
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x20d0
leaq -0x1a0(%rbp), %rdi
callq 0x2130
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2ddb
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2e33
movq 0x61bc(%rip), %rdi      # 0x8fd0
leaq 0x32e5(%rip), %rsi      # 0x6100
callq 0x2190
movq %rax, %rdi
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2100
leaq -0x190(%rbp), %rdi
movq (%r14), %rsi
addq $0x20, %rsi
callq 0x2180
leaq -0x1a0(%rbp), %rdi
leaq -0x12(%rbp), %rsi
callq 0x2230
movzwl -0x12(%rbp), %eax
movq 0x2050(%rbx), %rcx
andw $0x0, (%rcx,%rax,2)
movq 0x6151(%rip), %rdi      # 0x8fd0
leaq 0x3289(%rip), %rsi      # 0x610f
callq 0x2190
movzwl -0x12(%rbp), %esi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x20d0
leaq -0x1a0(%rbp), %rdi
callq 0x2130
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x2eb9
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2f23
movzwl (%r13), %esi
cmpw 0x2030(%r15), %si
jne 0x2f1d
leaq 0x322f(%rip), %rdi      # 0x613f
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2030
addq $0x2, %r13
jmp 0x2ef5
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_O2/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 0x2abc
movzbl %al, %esi
movzbl (%rbx), %edx
movzbl 0x12(%rbx), %edi
movl %edi, %ecx
andl $0x1, %ecx
addl %edx, %ecx
addl %esi, %ecx
xorl %eax, %eax
testb %cl, %cl
sete %al
andl $-0x3, %edi
leal (%rdi,%rax,2), %edi
testb $0x8, %dil
jne 0x453b
movl %edi, %eax
andb $0x77, %al
orb $-0x80, %dil
testb %cl, %cl
movzbl %al, %r8d
movzbl %dil, %eax
cmovnsl %r8d, %eax
xorl %edx, %esi
cmpl $0x7f, %esi
ja 0x4537
xorb %cl, %dl
js 0x4575
andb $-0x41, %al
jmp 0x4577
movl %edx, %eax
andl $0xf, %eax
movl %edx, %r8d
xorl %esi, %r8d
andl $0xf, %esi
addl %eax, %esi
movl %edi, %eax
andl $0x1, %eax
addl %esi, %eax
leal 0x6(%rcx), %esi
cmpl $0xa, %eax
cmovbl %ecx, %esi
andb $0x7f, %dil
movl %esi, %eax
andb $-0x80, %al
orb %dil, %al
cmpl $0x7f, %r8d
ja 0x4571
xorb %sil, %dl
js 0x4589
andb $-0x41, %al
jmp 0x458b
orb $0x40, %al
cmpl $0x100, %ecx            # imm = 0x100
jb 0x4583
orb $0x1, %al
jmp 0x4585
andb $-0x2, %al
movl %ecx, %esi
jmp 0x459c
orb $0x40, %al
cmpl $0x9a, %esi
jb 0x459a
addl $0x60, %esi
orb $0x1, %al
jmp 0x459c
andb $-0x2, %al
movb %al, 0x12(%rbx)
movb %sil, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2abc
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2abc
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_O2/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 0x2abc
movl %eax, %r14d
addb 0x1(%rbx), %r14b
movzbl %r14b, %esi
incb %r14b
movq %rbx, %rdi
callq 0x2abc
movzbl %al, %r15d
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x2abc
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_O2/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 0x2abc
movl %eax, %r14d
movzbl %al, %esi
incb %r14b
movq %rbx, %rdi
callq 0x2abc
movzbl %al, %r15d
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x2abc
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_O2/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 0x2abc
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2abc
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_O2/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Addr_ABY()
uint16_t mos6502::Addr_ABY()
{
	uint16_t addr;
	uint16_t addrL;
	uint16_t addrH;
	
	addrL = Read(pc++);
	addrH = Read(pc++);
	
	addr = addrL + (addrH << 8) + Y;
	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 0x2abc
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2abc
movzbl %r14b, %ecx
movzbl %al, %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rbx), %eax
addl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2abc
movb 0x12(%rbx), %cl
andb (%rbx), %al
js 0x478f
andb $0x7f, %cl
testb %al, %al
jne 0x4792
orb $0x2, %cl
jmp 0x4795
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movl %esi, %ebx
movq %rbx, %rsi
callq 0x2abc
movb 0x12(%r14), %dl
andb $-0x2, %dl
movl %eax, %ecx
shrb $0x7, %cl
orb %dl, %cl
addb %al, %al
js 0x47d4
andb $0x7f, %cl
testb %al, %al
jne 0x47d7
orb $0x2, %cl
jmp 0x47da
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%r14)
movzbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2ed0
// File: /workspace/github_cpp_makefile_star2_O2/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), %dl
andb $-0x2, %dl
movl %eax, %ecx
shrb $0x7, %cl
orb %dl, %cl
addb %al, %al
js 0x481b
andb $0x7f, %cl
testb %al, %al
jne 0x481e
orb $0x2, %cl
jmp 0x4821
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rdi)
movb %al, (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2abc
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_O2/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 %r14
pushq %rbx
movq %rdi, %rbx
movl 0x10(%rdi), %eax
incl %eax
movw %ax, 0x10(%rdi)
movzbl %ah, %esi
callq 0x54ee
movzbl 0x10(%rbx), %esi
movq %rbx, %rdi
callq 0x54ee
movzbl 0x12(%rbx), %esi
orl $0x10, %esi
movq %rbx, %rdi
callq 0x54ee
orb $0x4, 0x12(%rbx)
movl $0xffff, %esi           # imm = 0xFFFF
movq %rbx, %rdi
callq 0x2abc
movzbl %al, %r14d
shll $0x8, %r14d
movl $0xfffe, %esi           # imm = 0xFFFE
movq %rbx, %rdi
callq 0x2abc
movzbl %al, %eax
orl %r14d, %eax
movw %ax, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2abc
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_O2/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, %r14
movl %esi, %ebx
movq %rbx, %rsi
callq 0x2abc
decb %al
movb 0x12(%r14), %cl
js 0x4a9e
andb $0x7f, %cl
testb %al, %al
jne 0x4aa1
orb $0x2, %cl
jmp 0x4aa4
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%r14)
movzbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2ed0
// File: /workspace/github_cpp_makefile_star2_O2/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
js 0x4ad4
andb $0x7f, %cl
testb %al, %al
jne 0x4ad7
orb $0x2, %cl
jmp 0x4ada
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x1(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
js 0x4afc
andb $0x7f, %cl
testb %al, %al
jne 0x4aff
orb $0x2, %cl
jmp 0x4b02
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x2(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2abc
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_O2/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, %r14
movl %esi, %ebx
movq %rbx, %rsi
callq 0x2abc
incb %al
movb 0x12(%r14), %cl
js 0x4b70
andb $0x7f, %cl
testb %al, %al
jne 0x4b73
orb $0x2, %cl
jmp 0x4b76
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%r14)
movzbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2ed0
// File: /workspace/github_cpp_makefile_star2_O2/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
js 0x4ba6
andb $0x7f, %cl
testb %al, %al
jne 0x4ba9
orb $0x2, %cl
jmp 0x4bac
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x1(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
js 0x4bce
andb $0x7f, %cl
testb %al, %al
jne 0x4bd1
orb $0x2, %cl
jmp 0x4bd4
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rdi)
movb %al, 0x2(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2abc
movl %eax, %r14d
movzwl 0x10(%rbx), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x2abc
movzbl %al, %r15d
shll $0x8, %r15d
movzbl %r14b, %r12d
orl %r12d, %r15d
movzwl %r15w, %esi
movq %rbx, %rdi
callq 0x2abc
movl %eax, %r14d
andl $0xff00, %r15d          # imm = 0xFF00
incl %r12d
movzbl %r12b, %esi
orl %r15d, %esi
movq %rbx, %rdi
callq 0x2abc
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_O2/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 %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %eax
decl %eax
movw %ax, 0x10(%rdi)
movzbl %ah, %esi
callq 0x54ee
movzbl 0x10(%r14), %esi
movq %r14, %rdi
callq 0x54ee
movw %bx, 0x10(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDA(unsigned short)
void mos6502::Op_LDA(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	A = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2abc
movb 0x12(%rbx), %cl
testb %al, %al
js 0x4cbd
andb $0x7f, %cl
testb %al, %al
jne 0x4cc0
orb $0x2, %cl
jmp 0x4cc3
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rbx)
movb %al, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDX(unsigned short)
void mos6502::Op_LDX(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	X = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2abc
movb 0x12(%rbx), %cl
testb %al, %al
js 0x4cf3
andb $0x7f, %cl
testb %al, %al
jne 0x4cf6
orb $0x2, %cl
jmp 0x4cf9
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rbx)
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Escapingbug[P]mos6502-emulator-debugging/mos6502.cpp
// Function: mos6502::Op_LDY(unsigned short)
void mos6502::Op_LDY(uint16_t src)
{
	uint8_t m = Read(src);
	SET_NEGATIVE(m & 0x80);
    SET_ZERO(!m);
	Y = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %esi
callq 0x2abc
movb 0x12(%rbx), %cl
testb %al, %al
js 0x4d4f
andb $0x7f, %cl
testb %al, %al
jne 0x4d52
orb $0x2, %cl
jmp 0x4d55
orb $-0x80, %cl
andb $-0x3, %cl
movb %cl, 0x12(%rbx)
movb %al, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq