LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/pgrouchy[P]NoiseWorld/mathNet.cpp
// Function: Genome::updateOnGrid(std::__cxx11::list<gridEntry*, std::allocator<gridEntry*>>*, int*)
void Genome::updateOnGrid(list<gridEntry*> *fullGrid, int oldGridPosition[]) {
    // no update needed if genome is still in the same grid square as before
    if ((oldGridPosition[0] != this->mainGridLocation[0]) || (oldGridPosition[1] != this->mainGridLocation[1])) {
        int tempGridPosition[2];
        tempGridPosition[0] = this->mainGridLocation[0];
        tempGridPosition[1] = this->mainGridLocation[1];
        this->mainGridLocation[0] = oldGridPosition[0];
        this->mainGridLocation[1] = oldGridPosition[1];
        this->removeFromGrid(fullGrid);
        this->mainGridLocation[0] = tempGridPosition[0];
        this->mainGridLocation[1] = tempGridPosition[1];
        this->addToGrid(fullGrid);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdx), %eax
movl 0x48(%rdi), %ebp
cmpl %ebp, %eax
jne 0xaa59
movl 0x4c(%r14), %r15d
cmpl %r15d, 0x4(%rdx)
jne 0xaa5d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x4c(%r14), %r15d
movl %eax, 0x48(%r14)
movl 0x4(%rdx), %eax
movl %eax, 0x4c(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa9ae
movl %ebp, 0x48(%r14)
movl %r15d, 0x4c(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa954
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::delete_tree(std::allocator<summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node>&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static void delete_tree(node_allocator& alloc, node *n)
    {
	if (!n)
	    return;

	delete_tree(alloc, n->left);
	delete_tree(alloc, n->right);
	delete_node(alloc, n);
    }

// Assembly:
testq %rsi, %rsi
je 0x2bc4
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rsi
callq 0x2b80
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x2b80
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x2bb5
callq 0x2150
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2150
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::erase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
size_type erase(const key_type& key)
    {
	iterator i = find(key);

	if (i == end())
	    return 0;

	erase(i);
	return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdx
callq 0x308e
cmpq %r14, %rax
je 0x2c84
movq %rbx, %rdi
movq %rax, %rsi
callq 0x30ee
movl $0x1, %eax
jmp 0x2c86
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::insert(summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::iterator, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int> const&)
iterator insert(iterator pos, const value_type& val)
    {
	// Special-case optimization: insertion of sequential data (with
	// end() supplied as a hint).
	if ((pos == end()) && header.left) {
	    node *last = rightmost_child(header.left);

	    // Does it come after the last item?
	    if (comparer(last->value.first, val.first)) {
		node *n = new_node(allocator, val);

		last->right = n;
		n->parent = last;

		rebalance_after_insert(n);
		return n;
	    }
	}

	return insert(val).first;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
cmpq %rsi, %r15
setne %cl
movq 0x38(%rdi), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x2d29
movq %rax, %r12
movq 0x38(%rax), %rax
testq %rax, %rax
jne 0x2d0e
movq %r12, %rdi
movq %r14, %rsi
callq 0x2030
testl %eax, %eax
js 0x2d49
leaq 0x2(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2fee
movq %rax, %r14
testb $0x1, %dl
je 0x2d6c
incq 0x50(%rbx)
jmp 0x2d6c
addq $0x2, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d84
movq %rax, %r14
movq %rax, 0x38(%r12)
movq %r12, 0x40(%rax)
movq %rax, %rdi
callq 0x2dfc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x2af9
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::new_node(std::allocator<summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node>&, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int> const&)
static node *new_node(node_allocator& alloc, const value_type& val)
    {
	node *n = alloc.allocate(1);

	try {
	    n = new (n) node(val);
	}
	catch (...) {
	    alloc.deallocate(n, 1);
	    throw;
	}

	return n;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl $0x48, %edi
callq 0x2170
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2f58
movl 0x20(%r14), %eax
movl %eax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2150
callq 0x21c0
movq %rax, %rbx
callq 0x21e0
movq %rbx, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2af9
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::add_node(std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, std::allocator<summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node>&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int> const&)
static std::pair<node *, bool>
    add_node(const key_compare& cmp, node_allocator& alloc,
	     node *header, const value_type& val)
    {
	node **nptr = &header->left;
	node *p = header;

	// Keep descending until we find a null down-pointer
	while (*nptr) {
	    node *c = *nptr;

	    invalidate(c);

	    if (cmp(val.first, c->value.first))
		nptr = &c->left;
	    else if (cmp(c->value.first, val.first))
		nptr = &c->right;
	    else
		return std::make_pair(c, false);

	    p = c;
	}

	// Attach a new node to the tree
	node *c = new_node(alloc, val);

	*nptr = c;
	c->parent = p;

	// Perform rebalancing
	rebalance_after_insert(c);

	return std::make_pair(c, true);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
movq 0x30(%rdx), %rax
testq %rax, %rax
je 0x3046
movq %rax, %rbx
andb $-0x3, 0x2c(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x2030
testl %eax, %eax
js 0x3032
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2030
movl $0x38, %r12d
testl %eax, %eax
js 0x3038
jmp 0x3072
movl $0x30, %r12d
movq (%rbx,%r12), %rax
testq %rax, %rax
jne 0x3005
addq %rbx, %r12
jmp 0x304d
movq %rdx, %rbx
leaq 0x30(%rdx), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2d84
movq %rax, %r14
movq %rax, (%r12)
movq %rbx, 0x40(%rax)
movq %rax, %rdi
callq 0x2dfc
movb $0x1, %dl
movq %r14, %rbx
jmp 0x3074
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3085
movq %rax, %rdi
callq 0x2af9
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::find_eq(std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static node *find_eq(const key_compare& cmp, const key_type& target,
			 node *header)
    {
	node *n = header->left;

	while (n) {
	    if (cmp(target, n->value.first))
		n = n->left;
	    else if (cmp(n->value.first, target))
		n = n->right;
	    else
		return n;
	}

	return header;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq 0x30(%rdx), %r14
testq %r14, %r14
je 0x30da
movq %rsi, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2030
testl %eax, %eax
js 0x30c7
movq %r14, %rdi
movq %r15, %rsi
callq 0x2030
movl $0x38, %ecx
testl %eax, %eax
js 0x30cc
jmp 0x30d7
movl $0x30, %ecx
movq (%r14,%rcx), %r14
testq %r14, %r14
jne 0x30a2
jmp 0x30da
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
jmp 0x30e5
movq %rax, %rdi
callq 0x2af9
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::erase(summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::iterator)
void erase(iterator pos)
    {
	node *n = pos.m_cur;

	unlink_node(n);
	delete_node(allocator, n);
	item_count--;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3126
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x3111
callq 0x2150
movq %r14, %rdi
callq 0x2150
decq 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::unlink_node(summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static void unlink_node(node *n)
    {
	// If we have two children, swap and reduce the problem to that
	// of removing a node with a single child. After removing n,
	// ordering will be preserved.
	if (n->left && n->right)
	    swap_with_successor(n);

	invalidate_up(n);

	// Replace the node with its child (if any).
	node *s = n->left ? n->left : n->right;
	fix_downptr(n->parent, n, s);

	// If n has a child, then n is black and s is red (otherwise it
	// wouldn't be possible to be black-balanced with one non-null
	// child).
	//
	// In this case, we can just recolour it and return immediately.
	if (s) {
	    s->parent = n->parent;
	    make_black(s);
	    return;
	}

	// If we removed a red node (which had no children), or the
	// root, we haven't altered the black balance.
	if (is_red(n))
	    return;

	// Otherwise, we have things to fix
	rebalance_after_remove(n->parent);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x30(%rdi)
je 0x3140
cmpq $0x0, 0x38(%rbx)
je 0x3140
movq %rbx, %rdi
callq 0x31ac
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x315f
movq %rax, %rcx
movq %rbx, %rdx
andb $-0x3, 0x2c(%rdx)
movq %rcx, %rdx
movq 0x40(%rcx), %rcx
testq %rcx, %rcx
jne 0x314f
movq 0x30(%rbx), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0x3178
cmpq %rbx, 0x30(%rax)
setne %dl
movq %rcx, 0x30(%rax,%rdx,8)
jmp 0x318d
cmpq %rbx, 0x30(%rax)
movq 0x38(%rbx), %rcx
setne %dl
movq %rcx, 0x30(%rax,%rdx,8)
testq %rcx, %rcx
je 0x319b
movq 0x40(%rbx), %rax
movq %rax, 0x40(%rcx)
andb $-0x2, 0x2c(%rcx)
popq %rbx
retq
testb $0x1, 0x2c(%rbx)
jne 0x3199
movq 0x40(%rbx), %rdi
popq %rbx
jmp 0x325e
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/./summary_map.hpp
// Function: summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::swap_with_successor(summary_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, summary, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, aggregator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>, summary>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::node*)
static void swap_with_successor(node *n)
    {
	node *p = n->parent;
	node *s = leftmost_child(n->right);

	if (s->parent == n) {
	    // This is a tricky case: we can't just swap pointers,
	    // because we'd end up with a cycle.
	    node *left = n->left;
	    node *right = s->right;

	    s->left = left;
	    s->right = n;
	    s->parent = p;

	    n->right = right;
	    n->parent = s;

	    left->parent = s;
	} else {
	    s->left = n->left;

	    std::swap(n->right, s->right);
	    std::swap(n->parent, s->parent);

	    s->left->parent = s;
	    s->right->parent = s;

	    n->parent->left = n;
	}

	std::swap(n->flags, s->flags);
	n->left = 0;

	fix_downptr(p, n, s);

	if (n->right)
	    n->right->parent = n;
    }

// Assembly:
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x31c3
movq %rcx, %rax
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
jne 0x31b5
jmp 0x31c5
xorl %eax, %eax
movq 0x40(%rdi), %rcx
movq 0x30(%rdi), %rdx
cmpq %rdi, 0x40(%rax)
je 0x3211
movq %rdx, 0x30(%rax)
movq 0x38(%rdi), %rdx
movq 0x38(%rax), %rsi
movq %rsi, 0x38(%rdi)
movq %rdx, 0x38(%rax)
movq 0x40(%rdi), %rdx
movq 0x40(%rax), %rsi
movq %rsi, 0x40(%rdi)
movq %rdx, 0x40(%rax)
movq 0x30(%rax), %rdx
movq %rax, 0x40(%rdx)
movq 0x38(%rax), %rdx
movq %rax, 0x40(%rdx)
movq 0x40(%rdi), %rdx
movq %rdi, 0x30(%rdx)
jmp 0x322d
movq 0x38(%rax), %rsi
movq %rdx, 0x30(%rax)
movq %rdi, 0x38(%rax)
movq %rcx, 0x40(%rax)
movq %rsi, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movq %rax, 0x40(%rdx)
movl 0x2c(%rdi), %edx
movl 0x2c(%rax), %esi
movl %esi, 0x2c(%rdi)
movl %edx, 0x2c(%rax)
movq $0x0, 0x30(%rdi)
xorl %edx, %edx
cmpq %rdi, 0x30(%rcx)
setne %dl
movq %rax, 0x30(%rcx,%rdx,8)
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x325c
movq %rdi, 0x40(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/test_util.cpp
// Function: load_words(char const*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>>>&, int)
void load_words(const char *path, test_vector& vec, int limit)
{
    std::ifstream in(path);

    while (!in.eof()) {
	char buf[128];

	if (limit >= 0 && !(limit--))
	    break;

	assert(in.good());
	in.getline(buf, sizeof(buf));

	vec.push_back(std::make_pair(buf, x33a(buf)));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x2230
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x2, 0xd0(%rsp,%rax)
jne 0x440b
leaq 0x30(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0x7(%rsp), %rbp
testl %ebx, %ebx
js 0x435b
subl $0x1, %ebx
jb 0x440b
cmpl $0x0, 0xd0(%rsp,%rax)
jne 0x442a
leaq (%rsp,%rax), %rdi
addq $0xb0, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %ecx
movl $0x80, %edx
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x2240
movb 0x30(%rsp), %al
xorl %r15d, %r15d
testb %al, %al
je 0x43bf
leaq 0x31(%rsp), %rcx
movl %r15d, %edx
shll $0x5, %edx
addl %r15d, %edx
movsbl %al, %r15d
addl %edx, %r15d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x43a6
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x2080
movl %r15d, 0x28(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x45de
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x43f1
callq 0x2150
movq 0xb0(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0xd0(%rsp,%rax)
je 0x434e
leaq 0xb0(%rsp), %rdi
callq 0x2050
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcff(%rip), %rdi       # 0x5130
leaq 0xd02(%rip), %rsi       # 0x513a
leaq 0xd09(%rip), %rcx       # 0x5148
movl $0x2b, %edx
callq 0x20d0
jmp 0x4464
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4467
callq 0x2150
jmp 0x4467
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/dlbeer[P]summary_map/test_util.cpp
// Function: shuffle(std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>>>&, int)
void shuffle(test_vector& vec, int seed)
{
    std::mt19937 engine;

    engine.seed(seed);

    for (int i = vec.size() - 1; i > 0; i--)
	std::swap(vec[i], vec[engine() % i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1388, %rsp           # imm = 0x1388
movq %rdi, %rbx
movl $0x1, %eax
movl $0x1571, %ecx           # imm = 0x1571
movq %rcx, %rdx
shrq $0x1e, %rdx
xorl %ecx, %edx
imull $0x6c078965, %edx, %ecx # imm = 0x6C078965
addl %eax, %ecx
movq %rcx, (%rsp,%rax,8)
incq %rax
cmpq $0x270, %rax            # imm = 0x270
jne 0x449a
movl %esi, %eax
movq %rax, (%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, (%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x44c5
movq $0x270, 0x1380(%rsp) # imm = 0x270
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x3, %rax
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
decl %eax
testl %eax, %eax
jle 0x4567
movl %eax, %r13d
leaq (,%r13,8), %rax
leaq (%rax,%rax,4), %rbp
movq (%rbx), %r14
leaq (%r14,%rbp), %r15
movq %rsp, %rdi
callq 0x457a
xorl %edx, %edx
divq %r13
movq (%rbx), %rax
leaq (%rdx,%rdx,4), %rcx
leaq (%rax,%rcx,8), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x2110
movl 0x20(%r14,%rbp), %eax
movl 0x20(%r12), %ecx
movl %ecx, 0x20(%r14,%rbp)
movl %eax, 0x20(%r12)
leaq -0x1(%r13), %rax
addq $-0x28, %rbp
cmpq $0x1, %r13
movq %rax, %r13
ja 0x4518
addq $0x1388, %rsp           # imm = 0x1388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/cartridge.cpp
// Function: Cartridge::Cartridge()
Cartridge::Cartridge() {
    cartridgeROM = std::vector<uint8_t>();
    cartridgeRAM = std::vector<uint8_t>();
    title = "";
    loaded = false;
    cartridgeType = 0;
    romSize = 0;
    ramSize = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x28(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rax, 0x58(%rdi)
leaq 0x755a(%rip), %rcx      # 0x9960
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x2210
xorl %eax, %eax
movb %al, 0x20(%rbx)
movb %al, 0x60(%rbx)
movq $0x0, 0x68(%rbx)
movl $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x244d
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x21c0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2462
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x21c0
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2471
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x28(%rbx)
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x248c
movq (%r15), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/cpu.cpp
// Function: CPU::tick()
void CPU::tick() {
    memory.timer.counter += 4;
    totalCycles += 4;

    if (memory.timer.reload > 0) {
        memory.timer.reload -= 4;
        if (memory.timer.reload == 0) {
            memory.interrupt(TIMER);
            memory.timer.tima = memory.timer.tma;
        }
    }

    if (memory.timer.fallingEdge()) {
        memory.timer.tima++;
        if (memory.timer.tima == 0) {
            memory.timer.reload = 4;
        }
    }
    memory.timer.oldEdge = memory.timer.currentEdge();

    if (!halted) {
        memory.transfer();
    }

    ppu.update();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rax), %rax
addw $0x4, (%rax)
addq $0x4, 0x10(%rdi)
movq (%rdi), %rax
movq 0x10(%rax), %rdi
movb 0x5(%rdi), %cl
testb %cl, %cl
je 0x2af6
addb $-0x4, %cl
movb %cl, 0x5(%rdi)
jne 0x2af6
movq %rax, %rdi
movl $0x4, %esi
callq 0x7010
movq (%rbx), %rax
movq 0x10(%rax), %rdi
movb 0x3(%rdi), %al
movb %al, 0x2(%rdi)
callq 0x8f8a
movq (%rbx), %rcx
movq 0x10(%rcx), %rdi
testb %al, %al
je 0x2b0f
incb 0x2(%rdi)
jne 0x2b0f
movb $0x4, 0x5(%rdi)
callq 0x8f68
movq (%rbx), %rdi
movq 0x10(%rdi), %rcx
movb %al, 0x6(%rcx)
cmpb $0x0, 0x8d(%rbx)
jne 0x2b2c
callq 0x71d8
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x7bce
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/cpu.cpp
// Function: CPU::JP(bool)
void CPU::JP(bool flag) {
    uint16_t nn = readb16();
    if (flag) {
        PC = nn;
        tick();
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2ca8
testl %ebp, %ebp
je 0x3252
movw %ax, 0x8a(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2ab2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/cpu.cpp
// Function: CPU::JR(bool)
void CPU::JR(bool flag) {
    int8_t e = readByte();
    if (flag) {
        PC += e;
        tick();
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movzwl 0x8a(%rdi), %esi
leal 0x1(%rsi), %eax
movw %ax, 0x8a(%rdi)
movq (%rdi), %rdi
callq 0x7022
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2ab2
testl %r14d, %r14d
je 0x32a3
movsbl %bpl, %eax
addw %ax, 0x8a(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2ab2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/cpu.cpp
// Function: CPU::CALL(bool)
void CPU::CALL(bool flag) {
    uint16_t nn = readb16();
    if (flag) {
        push(PC);
        PC = nn;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2ca8
testl %r14d, %r14d
je 0x32d4
movl %eax, %ebp
movzwl 0x8a(%rbx), %esi
movq %rbx, %rdi
callq 0x2d08
movw %bp, 0x8a(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/cpu.cpp
// Function: CPU::RET(bool)
void CPU::RET(bool flag) {
    tick();
    if (flag) {
        PC = pop();
        tick();
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2ab2
testl %ebp, %ebp
je 0x3308
movq %rbx, %rdi
callq 0x2d6e
movw %ax, 0x8a(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2ab2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/joypad.cpp
// Function: Joypad::read()
uint8_t Joypad::read() {
    switch (mode) {
        case 0x00: return 0xC0 | mode | (keys[0] & keys[1]);
        case 0x10: return 0xC0 | mode | keys[0];
        case 0x20: return 0xC0 | mode | keys[1];
        default: return 0xCF;
    }
}

// Assembly:
movzbl 0x2(%rdi), %ecx
cmpl $0x20, %ecx
je 0x5e45
cmpl $0x10, %ecx
je 0x5e40
movb $-0x31, %al
testl %ecx, %ecx
jne 0x5e4a
movb 0x1(%rdi), %al
andb (%rdi), %al
orb $-0x40, %al
retq
movb (%rdi), %al
orb $-0x30, %al
retq
movb 0x1(%rdi), %al
orb $-0x20, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/joypad.cpp
// Function: Joypad::keyDown(Key)
void Joypad::keyDown(Key key) {
    switch (key) {
        case RIGHT:  keys[1] |= 0x2; keys[1] &= 0xE; interrupt = true; break;
        case LEFT:   keys[1] |= 0x1; keys[1] &= 0xD; interrupt = true; break;
        case UP:     keys[1] |= 0x8; keys[1] &= 0xB; interrupt = true; break;
        case DOWN:   keys[1] |= 0x4; keys[1] &= 0x7; interrupt = true; break;
        case A:      keys[0] &= 0xE; interrupt = true; break;
        case B:      keys[0] &= 0xD; interrupt = true; break;
        case SELECT: keys[0] &= 0xB; interrupt = true; break;
        case START:  keys[0] &= 0x7; interrupt = true; break;
        default: break;
    }
}

// Assembly:
cmpl $0x7, %esi
ja 0x5ea0
movl %esi, %eax
leaq 0x3a9c(%rip), %rcx      # 0x9900
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x1(%rdi), %al
andb $0xc, %al
orb $0x2, %al
jmp 0x5e99
andb $0xe, (%rdi)
jmp 0x5e9c
movb 0x1(%rdi), %al
andb $0x3, %al
orb $0x8, %al
jmp 0x5e99
movb 0x1(%rdi), %al
andb $0x3, %al
orb $0x4, %al
jmp 0x5e99
andb $0x7, (%rdi)
jmp 0x5e9c
movb 0x1(%rdi), %al
andb $0xc, %al
incb %al
movb %al, 0x1(%rdi)
movb $0x1, 0x3(%rdi)
retq
andb $0xd, (%rdi)
jmp 0x5e9c
andb $0xb, (%rdi)
jmp 0x5e9c
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/joypad.cpp
// Function: Joypad::keyUp(Key)
void Joypad::keyUp(Key key) {
    switch (key) {
        case RIGHT:  keys[1] |= 0x1; break;
        case LEFT:   keys[1] |= 0x2; break;
        case UP:     keys[1] |= 0x4; break;
        case DOWN:   keys[1] |= 0x8; break;
        case A:      keys[0] |= 0x1; break;
        case B:      keys[0] |= 0x2; break;
        case SELECT: keys[0] |= 0x4; break;
        case START:  keys[0] |= 0x8; break;
        default: break;
    } 
}

// Assembly:
cmpl $0x7, %esi
ja 0x5edf
movb $0x1, %al
movl %esi, %ecx
leaq 0x3a64(%rip), %rdx      # 0x9920
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
incq %rdi
jmp 0x5edd
incq %rdi
movb $0x2, %al
jmp 0x5edd
incq %rdi
movb $0x8, %al
jmp 0x5edd
incq %rdi
movb $0x4, %al
orb %al, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/main.cpp
// Function: getKey(int)
Key getKey(SDL_Keycode sym) {
    switch (sym) {
        case SDLK_RIGHT:  return RIGHT;  break;
        case SDLK_LEFT:   return LEFT;   break;
        case SDLK_UP:     return UP;     break;
        case SDLK_DOWN:   return DOWN;   break;
        case SDLK_z:      return A;      break;
        case SDLK_x:      return B;      break;
        case SDLK_LSHIFT:
        case SDLK_RSHIFT: return SELECT; break;
        case SDLK_RETURN: return START;  break;
        default:          return NONE;   break;
    }
}

// Assembly:
cmpl $0x4000004e, %edi       # imm = 0x4000004E
jle 0x5f35
leal -0x4000004f(%rdi), %eax
cmpl $0x3, %eax
ja 0x5f4a
leaq 0x3a17(%rip), %rcx      # 0x9940
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %eax, %eax
retq
cmpl $0xd, %edi
je 0x5f60
cmpl $0x78, %edi
je 0x5f66
cmpl $0x7a, %edi
jne 0x5f7e
movl $0x4, %eax
retq
cmpl $0x400000e1, %edi       # imm = 0x400000E1
je 0x5f5a
cmpl $0x400000e5, %edi       # imm = 0x400000E5
jne 0x5f7e
movl $0x6, %eax
retq
movl $0x7, %eax
retq
movl $0x5, %eax
retq
movl $0x3, %eax
retq
movl $0x2, %eax
retq
movl $0x1, %eax
retq
movl $0x8, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC0::read(unsigned short)
uint8_t MBC0::read(uint16_t address) {
    if (address <= 0x7FFF) {
        return rom[address];
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        return ram[(address - 0xA000) % ramSize];
    } else {
        return 0xFF;
    }
}

// Assembly:
testw %si, %si
js 0x66fe
addq $0x8, %rdi
movzwl %si, %edx
jmp 0x6720
movl %esi, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movb $-0x1, %al
cmpl $0xa000, %ecx           # imm = 0xA000
jne 0x6729
addl $0xffff6000, %esi       # imm = 0xFFFF6000
movl %esi, %eax
cltd
idivl 0x18(%rdi)
addq $0x10, %rdi
movq (%rdi), %rax
movq (%rax), %rax
movb (%rax,%rdx), %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC1::read(unsigned short)
uint8_t MBC1::read(uint16_t address) {
    if (address <= 0x3FFF) {
        romBank = (mode ? (bank2 << 5) : 0);
        return rom[((romBank << 14) | (address & 0x3FFF)) % romSize];
    } else if (address <= 0x7FFF) {
        romBank = ((bank2 << 5) | bank1);
        return rom[((romBank << 14) | (address & 0x3FFF)) % romSize];
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            ramBank = (mode ? bank2 : 0);
            return ram[((ramBank << 13) | (address & 0x1FFF)) % ramSize];
        } else {
            return 0xFF;
        }
    } else {
        return 0xFF;
    }
}

// Assembly:
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x677d
movb 0x25(%rdi), %al
shlb $0x5, %al
movzbl %al, %eax
xorl %ecx, %ecx
cmpb $0x0, 0x28(%rdi)
cmovel %ecx, %eax
movb %al, 0x26(%rdi)
leaq 0x8(%rdi), %rcx
movzbl %al, %eax
shll $0xe, %eax
orl %esi, %eax
jmp 0x67a2
testw %si, %si
js 0x67b3
movb 0x25(%rdi), %al
shlb $0x5, %al
orb 0x24(%rdi), %al
movzbl %al, %eax
movb %al, 0x26(%rdi)
leaq 0x8(%rdi), %rcx
shll $0xe, %eax
andl $0x3fff, %esi           # imm = 0x3FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x1c(%rdi)
movq (%rcx), %rax
movl %edx, %ecx
movq (%rax), %rax
movb (%rax,%rcx), %al
retq
movl %esi, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movb $-0x1, %al
cmpl $0xa000, %ecx           # imm = 0xA000
jne 0x67b2
cmpb $0x1, 0x18(%rdi)
jne 0x67b2
movzbl 0x25(%rdi), %eax
xorl %ecx, %ecx
cmpb $0x0, 0x28(%rdi)
cmovel %ecx, %eax
movb %al, 0x27(%rdi)
leaq 0x10(%rdi), %rcx
movzbl %al, %eax
shll $0xd, %eax
andl $0x1fff, %esi           # imm = 0x1FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
jmp 0x67a7
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC1::write(unsigned short, unsigned char)
void MBC1::write(uint16_t address, uint8_t n) {
    if (address <= 0x1FFF) {
        ramg = ((n & 0x0F) == 0x0A);
    } else if (address <= 0x3FFF) {
        n &= 0x1F;
        if (n == 0) {
            n = 0x1;
        }
        bank1 = n;
    } else if (address <= 0x5FFF) {
        bank2 = n & 0x3;
    } else if (address <= 0x7FFF) {
        mode = n & 0x1;
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            ramBank = (mode ? bank2 : 0);
            ram[((ramBank << 13) | (address & 0x1FFF)) % ramSize] = n;
        }
    }
}

// Assembly:
movl %edx, %ecx
cmpl $0x1fff, %esi           # imm = 0x1FFF
ja 0x680b
andb $0xf, %cl
cmpb $0xa, %cl
sete 0x18(%rdi)
retq
movzwl %si, %eax
cmpl $0x3fff, %eax           # imm = 0x3FFF
ja 0x6829
andb $0x1f, %cl
movzbl %cl, %eax
cmpb $0x2, %al
movl $0x1, %ecx
cmovael %eax, %ecx
movb %cl, 0x24(%rdi)
retq
cmpl $0x5fff, %eax           # imm = 0x5FFF
ja 0x6837
andb $0x3, %cl
movb %cl, 0x25(%rdi)
retq
testw %si, %si
js 0x6843
andb $0x1, %cl
movb %cl, 0x28(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x6842
cmpb $0x1, 0x18(%rdi)
jne 0x6842
movzbl 0x25(%rdi), %eax
xorl %edx, %edx
cmpb $0x0, 0x28(%rdi)
cmovel %edx, %eax
movb %al, 0x27(%rdi)
movq 0x10(%rdi), %r8
movzbl %al, %eax
shll $0xd, %eax
andl $0x1fff, %esi           # imm = 0x1FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
movq (%r8), %rax
movb %cl, (%rax,%rdx)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC2::read(unsigned short)
uint8_t MBC2::read(uint16_t address) {
    if (address <= 0x3FFF) {
        return rom[address];
    } else if (address <= 0x7FFF) {
        return rom[((romb << 14) | (address & 0x3FFF)) % romSize];
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            return ram[address % ramSize];
        } else {
            return 0xFF;
        }
    } else {
        return 0xFF;
    }
}

// Assembly:
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x6899
addq $0x8, %rdi
movzwl %si, %edx
jmp 0x68b8
testw %si, %si
js 0x68c2
movzbl 0x24(%rdi), %eax
shll $0xe, %eax
andl $0x3fff, %esi           # imm = 0x3FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x1c(%rdi)
addq $0x8, %rdi
movq (%rdi), %rax
movq (%rax), %rax
movb (%rax,%rdx), %al
retq
movl %esi, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movb $-0x1, %al
cmpl $0xa000, %ecx           # imm = 0xA000
jne 0x68c1
cmpb $0x1, 0x18(%rdi)
jne 0x68c1
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
addq $0x10, %rdi
jmp 0x68b8
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC2::write(unsigned short, unsigned char)
void MBC2::write(uint16_t address, uint8_t n) {
    if (address <= 0x3FFF) {
        n &= 0x0F;
        if ((address & 0x100) == 0) {
            ramg = n == 0x0A;
        } else {
            romb = n == 0 ? 0x1 : n;
        }
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            ram[address % ramSize] = n | 0xF0;
        }
    }
}

// Assembly:
movl %edx, %ecx
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x6903
andb $0xf, %cl
btl $0x8, %esi
jb 0x692c
cmpb $0xa, %cl
sete 0x18(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x693c
cmpb $0x1, 0x18(%rdi)
jne 0x693c
movq 0x10(%rdi), %r8
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
orb $-0x10, %cl
movq (%r8), %rax
movb %cl, (%rax,%rdx)
retq
movzbl %cl, %eax
cmpb $0x2, %al
movl $0x1, %ecx
cmovael %eax, %ecx
movb %cl, 0x24(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC3::read(unsigned short)
uint8_t MBC3::read(uint16_t address) {
    if (address <= 0x3FFF) {
        return rom[address];
    } else if (address <= 0x7FFF) {
        return rom[((romBank << 14) | (address & 0x3FFF)) % romSize];
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            if (ramBank <= 0x3) {
                return ram[((ramBank << 13) | (address & 0x1FFF)) % ramSize];
            } else if (ramBank >= 0x08 && ramBank <= 0x0C) {
                return RTC[ramBank - 0x08];
            } else {
                return 0xFF;
            }
        } else {
            return 0xFF;
        }
    } else {
        return 0xFF;
    }
}

// Assembly:
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x6952
movq 0x8(%rdi), %rax
movzwl %si, %edx
addq (%rax), %rdx
jmp 0x6974
testw %si, %si
js 0x6977
movq 0x8(%rdi), %rcx
movzbl 0x24(%rdi), %eax
shll $0xe, %eax
andl $0x3fff, %esi           # imm = 0x3FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x1c(%rdi)
addq (%rcx), %rdx
movb (%rdx), %al
retq
movl %esi, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movb $-0x1, %al
cmpl $0xa000, %ecx           # imm = 0xA000
jne 0x6976
cmpb $0x1, 0x18(%rdi)
jne 0x6976
movzbl 0x25(%rdi), %ecx
cmpl $0x3, %ecx
ja 0x69b3
movq 0x10(%rdi), %r8
shll $0xd, %ecx
andl $0x1fff, %esi           # imm = 0x1FFF
orl %ecx, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
addq (%r8), %rdx
jmp 0x6974
leal -0x8(%rcx), %edx
cmpb $0x4, %dl
ja 0x6976
addl $-0x8, %ecx
leaq (%rdi,%rcx), %rdx
addq $0x26, %rdx
jmp 0x6974
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC3::write(unsigned short, unsigned char)
void MBC3::write(uint16_t address, uint8_t n) {
    if (address <= 0x1FFF) {
        ramg = ((n & 0x0F) == 0x0A);
    } else if (address <= 0x3FFF) {
        n &= 0x7F;
        if (n == 0) {
            n = 0x1;
        }
        romBank = n;
    } else if (address <= 0x5FFF) {
        ramBank = n;
    } else if (address <= 0x7FFF) {
        ;
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            if (ramBank <= 0x3) {
                ram[((ramBank << 13) | (address & 0x1FFF)) % ramSize] = n;
            } else if (ramBank >= 0x08 && ramBank <= 0x0C) {
                RTC[ramBank - 0x08] = n;
            }
        }
    }
}

// Assembly:
movl %edx, %ecx
cmpl $0x1fff, %esi           # imm = 0x1FFF
ja 0x69dd
andb $0xf, %cl
cmpb $0xa, %cl
sete 0x18(%rdi)
retq
movzwl %si, %eax
cmpl $0x3fff, %eax           # imm = 0x3FFF
ja 0x69fb
andb $0x7f, %cl
movzbl %cl, %eax
cmpb $0x2, %al
movl $0x1, %ecx
cmovael %eax, %ecx
movb %cl, 0x24(%rdi)
retq
cmpl $0x5fff, %eax           # imm = 0x5FFF
ja 0x6a06
movb %cl, 0x25(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x6a4f
cmpb $0x1, 0x18(%rdi)
jne 0x6a4f
movzbl 0x25(%rdi), %eax
cmpl $0x3, %eax
ja 0x6a40
movq 0x10(%rdi), %r8
shll $0xd, %eax
andl $0x1fff, %esi           # imm = 0x1FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
movq (%r8), %rax
movb %cl, (%rax,%rdx)
retq
leal -0x8(%rax), %edx
cmpb $0x4, %dl
ja 0x6a4f
addl $-0x8, %eax
movb %cl, 0x26(%rdi,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC5::read(unsigned short)
uint8_t MBC5::read(uint16_t address) {
    if (address <= 0x3FFF) {
        return rom[address];
    } else if (address <= 0x7FFF) {
        romBank = ((bank2 << 8) | bank1);
        return rom[((romBank << 14) | (address & 0x3FFF)) % romSize];
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            return ram[((ramBank << 13) | (address & 0x1FFF)) % ramSize];
        } else {
            return 0xFF;
        }
    } else {
        return 0xFF;
    }
}

// Assembly:
cmpl $0x3fff, %esi           # imm = 0x3FFF
ja 0x6a61
addq $0x8, %rdi
movzwl %si, %edx
jmp 0x6a84
testw %si, %si
js 0x6a8e
movzwl 0x21(%rdi), %eax
movw %ax, 0x24(%rdi)
shll $0xe, %eax
andl $0x3fff, %esi           # imm = 0x3FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x18(%rdi)
addq $0x8, %rdi
movq (%rdi), %rax
movq (%rax), %rax
movb (%rax,%rdx), %al
retq
movl %esi, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movb $-0x1, %al
cmpl $0xa000, %ecx           # imm = 0xA000
jne 0x6a8d
cmpb $0x1, 0x20(%rdi)
jne 0x6a8d
movzbl 0x26(%rdi), %eax
shll $0xd, %eax
andl $0x1fff, %esi           # imm = 0x1FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x1c(%rdi)
addq $0x10, %rdi
jmp 0x6a84
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/mbc.cpp
// Function: MBC5::write(unsigned short, unsigned char)
void MBC5::write(uint16_t address, uint8_t n) {
    if (address <= 0x1FFF) {
        ramg = (n == 0x0A);
    } else if (address <= 0x2FFF) {
        bank1 = n;
    } else if (address <= 0x3FFF) {
        bank2 = n & 0x1;
    } else if (address <= 0x5FFF) {
        ramBank = n & 0xF;
    } else if (address >= 0xA000 && address <= 0xBFFF) {
        if (ramg) {
            ram[((ramBank << 13) | (address & 0x1FFF)) % ramSize] = n;
        }
    }
}

// Assembly:
movl %edx, %ecx
cmpl $0x1fff, %esi           # imm = 0x1FFF
ja 0x6ad4
cmpb $0xa, %cl
sete 0x20(%rdi)
retq
movzwl %si, %eax
cmpl $0x2fff, %eax           # imm = 0x2FFF
ja 0x6ae2
movb %cl, 0x21(%rdi)
retq
cmpl $0x3fff, %eax           # imm = 0x3FFF
ja 0x6af0
andb $0x1, %cl
movb %cl, 0x22(%rdi)
retq
cmpl $0x5fff, %eax           # imm = 0x5FFF
ja 0x6afe
andb $0xf, %cl
movb %cl, 0x26(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpl $0xa000, %eax           # imm = 0xA000
jne 0x6afd
cmpb $0x1, 0x20(%rdi)
jne 0x6afd
movq 0x10(%rdi), %r8
movzbl 0x26(%rdi), %eax
shll $0xd, %eax
andl $0x1fff, %esi           # imm = 0x1FFF
orl %eax, %esi
movl %esi, %eax
xorl %edx, %edx
idivl 0x1c(%rdi)
movq (%r8), %rax
movb %cl, (%rax,%rdx)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/memory.cpp
// Function: Memory::init()
void Memory::init() {
    bootEnabled = false;
    std::fill_n(vram.begin(), 0x2000, 0);
    std::fill_n(wram.begin(), 0x2000, 0);
    std::fill_n(oam.begin(), 0xA0, 0);
    std::fill_n(io.begin(), 0x100, 0xFF);
    std::fill_n(hram.begin(), 0x7F, 0);
    lcd.lcdc = 0;
    lcd.stat = 0;
    lcd.scy = 0;
    lcd.scx = 0;
    lcd.ly = 0;
    lcd.lyc = 0;
    lcd.bgp = 0xFC;
    lcd.obp0 = 0xFF;
    lcd.obp1 = 0xFF;
    lcd.wy = 0;
    lcd.wx = 0;
    dmaAddress = 0;
    dmaCycle = 0xFF;
    write(0xFF01, 0x00); // SB
    write(0xFF02, 0x7E); // SC
    write(0xFF0F, 0x00); // IF
    write(0xFFFF, 0x00); // IE
    bootEnabled = true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
xorl %ebp, %ebp
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x2120
movq 0x40(%rbx), %rdi
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x2120
movq 0x58(%rbx), %rdi
movl $0xa0, %edx
xorl %esi, %esi
callq 0x2120
movq 0x70(%rbx), %rdi
movl $0x100, %edx            # imm = 0x100
movl $0xff, %esi
callq 0x2120
movq 0x88(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x6f(%rax)
movw %bp, 0x1c(%rbx)
movl $0x0, 0x18(%rbx)
movl $0xfffffc, 0x1e(%rbx)   # imm = 0xFFFFFC
movb %bpl, 0x22(%rbx)
movw %bp, 0x24(%rbx)
movb $-0x1, 0x26(%rbx)
movq 0x70(%rbx), %rax
movb %bpl, 0x1(%rax)
movq 0x70(%rbx), %rax
movb $0x7e, 0x2(%rax)
movq 0x70(%rbx), %rax
movb $-0x20, 0xf(%rax)
movq 0x70(%rbx), %rax
movb %bpl, 0xff(%rax)
movb $0x1, 0x23(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nicoeps[P]NicoGB/src/nicogb.cpp
// Function: NicoGB::init()
void NicoGB::init() {
    cpu.init();
    timer.init();
    joypad.reset();
    memory.init();
    ppu.init();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x200, %rdi            # imm = 0x200
callq 0x2a7c
movq %rbx, %rdi
callq 0x8f60
leaq 0x80(%rbx), %rdi
callq 0x5e1c
leaq 0x88(%rbx), %rdi
callq 0x6ce2
addq $0x140, %rbx            # imm = 0x140
movq %rbx, %rdi
popq %rbx
jmp 0x7b6e