LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
callq 0x29c6
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x29f2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2d92
pushq $0x1
popq %rax
jmp 0x29f4
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rax
cmpq %rsi, %rax
je 0x2a5f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2bd6
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x2a48
callq 0x2ac2
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2bf5
testb %al, %al
je 0x2a48
addq $0x2, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ad8
movq %rax, %rbx
movq %rax, 0x38(%r15)
movq %r15, 0x40(%rax)
movq %rax, %rdi
callq 0x2b2e
jmp 0x2a56
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x48
popq %rdi
callq 0x2160
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2c08
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2140
callq 0x21d0
movq %rax, %rbx
callq 0x21f0
movq %rbx, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x286b
nop
// File: /workspace/github_cpp_makefile_star2_O2/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>>>::rotate_right(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 rotate_right(node *n)
    {
	node *p = n->parent; // p is above [D]
	node *l = n->left;   // l is [B]

	n->left = l->right;  // [D] now points left to [C]
	if (n->left)
	    n->left->parent = n;

	l->right = n;        // [B] now points right to [D]
	n->parent = l;

	l->parent = p;       // Make [B] the root of the subtree
	fix_downptr(p, n, l);
    }

// Assembly:
movq 0x30(%rdi), %rax
movq 0x40(%rdi), %rcx
movq 0x38(%rax), %rdx
movq %rdx, 0x30(%rdi)
testq %rdx, %rdx
je 0x2c55
movq %rdi, 0x40(%rdx)
movq %rdi, 0x38(%rax)
movq %rax, 0x40(%rdi)
movq %rcx, 0x40(%rax)
xorl %edx, %edx
cmpq %rdi, 0x30(%rcx)
setne %dl
movq %rax, 0x30(%rcx,%rdx,8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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>>>::rotate_left(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 rotate_left(node *n)
    {
	node *p = n->parent; // p is above [B]
	node *r = n->right;  // r is [D]

	n->right = r->left;  // [B] now points right to [C]
	if (n->right)
	    n->right->parent = n;

	r->left = n;         // [D] now points left to [B]
	n->parent = r;

	r->parent = p;       // Make [D] the root of the subtree
	fix_downptr(p, n, r);
    }

// Assembly:
movq 0x38(%rdi), %rax
movq 0x40(%rdi), %rcx
movq 0x30(%rax), %rdx
movq %rdx, 0x38(%rdi)
testq %rdx, %rdx
je 0x2c89
movq %rdi, 0x40(%rdx)
movq %rdi, 0x30(%rax)
movq %rax, 0x40(%rdi)
movq %rcx, 0x40(%rax)
xorl %edx, %edx
cmpq %rdi, 0x30(%rcx)
setne %dl
movq %rax, 0x30(%rcx,%rdx,8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, (%rsp)
leaq 0x30(%rdx), %rbp
pushq $0x30
popq %r13
pushq $0x38
popq %r15
movq (%rbp), %rbx
testq %rbx, %rbx
je 0x2cfe
andb $-0x3, 0x2c(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2bf5
movq %r13, %rbp
testb %al, %al
jne 0x2cf6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2bf5
movq %r15, %rbp
testb %al, %al
je 0x2d21
addq %rbx, %rbp
movq %rbx, %r12
jmp 0x2cc5
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x2ad8
movq %rax, %rbx
movq %rax, (%rbp)
movq %r12, 0x40(%rax)
movq %rax, %rdi
callq 0x2b2e
movb $0x1, %dl
jmp 0x2d23
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x30(%rdx), %r14
pushq $0x30
popq %r12
pushq $0x38
popq %r13
movq (%r14), %r14
testq %r14, %r14
je 0x2d85
movq %r15, %rdi
movq %r14, %rsi
callq 0x2bf5
movq %r12, %rcx
testb %al, %al
jne 0x2d7d
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bf5
movq %r13, %rcx
testb %al, %al
je 0x2d82
addq %rcx, %r14
jmp 0x2d51
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2dd6
cmpq $0x0, 0x38(%rbx)
je 0x2dd6
movq %rbx, %rdi
callq 0x2e22
movq %rbx, %rdi
callq 0x2ece
movq 0x30(%rbx), %rax
testq %rax, %rax
jne 0x2deb
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rcx
xorl %edx, %edx
cmpq %rbx, 0x30(%rcx)
setne %dl
movq %rax, 0x30(%rcx,%rdx,8)
testq %rax, %rax
je 0x2e10
movq 0x40(%rbx), %rcx
movq %rcx, 0x40(%rax)
andb $-0x2, 0x2c(%rax)
jmp 0x2e20
testb $0x1, 0x2c(%rbx)
jne 0x2e20
movq 0x40(%rbx), %rdi
popq %rbx
jmp 0x2ee2
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
movq 0x40(%rbx), %r14
callq 0x3062
movq 0x30(%rbx), %rcx
cmpq %rbx, 0x40(%rax)
je 0x2e7e
movq %rcx, 0x30(%rax)
movq 0x38(%rbx), %rcx
movq 0x38(%rax), %rdx
movq %rdx, 0x38(%rbx)
movq %rcx, 0x38(%rax)
movq 0x40(%rbx), %rcx
movq 0x40(%rax), %rdx
movq %rdx, 0x40(%rbx)
movq %rcx, 0x40(%rax)
movq 0x30(%rax), %rcx
movq %rax, 0x40(%rcx)
movq 0x38(%rax), %rcx
movq %rax, 0x40(%rcx)
movq 0x40(%rbx), %rcx
movq %rbx, 0x30(%rcx)
jmp 0x2e9a
movq 0x38(%rax), %rdx
movq %rcx, 0x30(%rax)
movq %rbx, 0x38(%rax)
movq %r14, 0x40(%rax)
movq %rdx, 0x38(%rbx)
movq %rax, 0x40(%rbx)
movq %rax, 0x40(%rcx)
movl 0x2c(%rbx), %ecx
movl 0x2c(%rax), %edx
movl %edx, 0x2c(%rbx)
movl %ecx, 0x2c(%rax)
andq $0x0, 0x30(%rbx)
xorl %ecx, %ecx
cmpq %rbx, 0x30(%r14)
setne %cl
movq %rax, 0x30(%r14,%rcx,8)
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x2ec6
movq %rbx, 0x40(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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>>>::next_in_order(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 *next_in_order(node *n)
    {
	// If we have a right subtree, return the first item in it
	if (n->right)
	    return leftmost_child(n->right);

	// Otherwise, return the first ancestor from which we descended
	// left, or return the header as an end-of-sequence marker.
	while (!is_root(n) && is_right_child(n))
	    n = n->parent;

	// This will return the header if we ascended to the root in the
	// previous step.
	return n->parent;
    }

// Assembly:
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x382b
movq %rax, %rdi
jmp 0x3062
movq 0x40(%rdi), %rcx
movq %rcx, %rax
movq 0x40(%rcx), %rcx
testq %rcx, %rcx
je 0x3844
cmpq %rdi, 0x38(%rax)
movq %rax, %rdi
je 0x382f
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2c8, %rsp            # imm = 0x2C8
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x38(%rsp), %r15
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x2220
leaq 0x240(%rsp), %r12
leaq 0x10(%rsp), %r13
movq %rsp, %rbp
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x58(%rsp,%rax), %eax
testb $0x2, %al
jne 0x3d69
testl %ebx, %ebx
js 0x3d17
subl $0x1, %ebx
jb 0x3d69
testl %eax, %eax
jne 0x3d85
movl $0x80, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2070
xorl %eax, %eax
movq %r12, %rcx
movsbl (%rcx), %edx
testl %edx, %edx
je 0x3d41
imull $0x21, %eax, %eax
incq %rcx
addl %edx, %eax
jmp 0x3d30
movq %r12, (%rsp)
movl %eax, 0x8(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3e50
movq %r14, %rdi
movq %r13, %rsi
callq 0x3f1c
movq %r13, %rdi
callq 0x20b0
jmp 0x3cfd
leaq 0x38(%rsp), %rdi
callq 0x2050
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1347(%rip), %rdi      # 0x50d3
leaq 0x134a(%rip), %rsi      # 0x50dd
leaq 0x1351(%rip), %rcx      # 0x50eb
pushq $0x2b
popq %rdx
callq 0x20e0
jmp 0x3da4
movq %rax, %rbx
jmp 0x3db6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20b0
leaq 0x38(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3e76
movslq %ebp, %rsi
movq %r14, %rdi
callq 0x3e80
movq 0x8(%rbx), %rax
subq (%rbx), %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
movl %eax, %r12d
decq %r12
testl %r12d, %r12d
jle 0x3e3d
movl %r12d, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
imulq $0x28, %r13, %r15
addq (%rbx), %r15
movq %r14, %rdi
callq 0x3eb8
xorl %edx, %edx
divq %r13
imulq $0x28, %rdx, %rsi
addq (%rbx), %rsi
movq %r15, %rdi
callq 0x368c
jmp 0x3e06
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_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x28(%rdi), %r14
leaq 0x30(%rdi), %r15
leaq 0x48(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
andq $0x0, 0x58(%rdi)
movq %rsp, %r13
movaps %xmm0, (%r13)
andq $0x0, 0x10(%r13)
movq %r15, %rdi
movq %r13, %rsi
callq 0x285c
movq %r13, %rdi
callq 0x2830
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
andq $0x0, 0x10(%r13)
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x285c
movq %r13, %rdi
callq 0x2830
leaq 0x74f2(%rip), %rsi      # 0x9978
movq %rbx, %rdi
callq 0x22e0
xorl %eax, %eax
movb %al, 0x20(%rbx)
movb %al, 0x60(%rbx)
andq $0x0, 0x68(%rbx)
andl $0x0, 0x70(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r13
movq %r12, %rdi
callq 0x2830
movq %r15, %rdi
callq 0x2830
movq %r14, %rdi
callq 0x27cc
movq %rbx, %rdi
callq 0x2110
movq %r13, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bf8
addb $-0x4, %cl
movb %cl, 0x5(%rdi)
jne 0x2bf8
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x64c0
movq (%rbx), %rax
movq 0x10(%rax), %rdi
movb 0x3(%rdi), %al
movb %al, 0x2(%rdi)
callq 0x81ce
movq (%rbx), %rcx
movq 0x10(%rcx), %rdi
testb %al, %al
je 0x2c11
incb 0x2(%rdi)
jne 0x2c11
movb $0x4, 0x5(%rdi)
callq 0x81ac
movq (%rbx), %rdi
movq 0x10(%rdi), %rcx
movb %al, 0x6(%rcx)
cmpb $0x0, 0x8d(%rbx)
jne 0x2c2e
callq 0x6676
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x6da2
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2d8e
testl %ebp, %ebp
je 0x32e4
movw %ax, 0x8a(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2bb6
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x2d78
testl %ebp, %ebp
je 0x3315
movsbl %al, %eax
addw %ax, 0x8a(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2bb6
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2d8e
testl %r14d, %r14d
je 0x3348
movl %eax, %ebp
movzwl 0x8a(%rbx), %esi
movq %rbx, %rdi
callq 0x2db6
movw %bp, 0x8a(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bb6
testl %ebp, %ebp
je 0x337c
movq %rbx, %rdi
callq 0x2e0c
movw %ax, 0x8a(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2bb6
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5605
cmpl $0x10, %ecx
je 0x5600
movb $-0x31, %al
testl %ecx, %ecx
jne 0x560a
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_O2/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 0x5660
movl %esi, %eax
leaq 0x42f4(%rip), %rcx      # 0x9918
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x1(%rdi), %al
andb $0xc, %al
orb $0x2, %al
jmp 0x5659
andb $0xe, (%rdi)
jmp 0x565c
movb 0x1(%rdi), %al
andb $0x3, %al
orb $0x8, %al
jmp 0x5659
movb 0x1(%rdi), %al
andb $0x3, %al
orb $0x4, %al
jmp 0x5659
andb $0x7, (%rdi)
jmp 0x565c
movb 0x1(%rdi), %al
andb $0xc, %al
incb %al
movb %al, 0x1(%rdi)
movb $0x1, 0x3(%rdi)
retq
andb $0xd, (%rdi)
jmp 0x565c
andb $0xb, (%rdi)
jmp 0x565c
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x569f
movb $0x1, %al
movl %esi, %ecx
leaq 0x42bc(%rip), %rdx      # 0x9938
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
incq %rdi
jmp 0x569d
incq %rdi
movb $0x2, %al
jmp 0x569d
incq %rdi
movb $0x8, %al
jmp 0x569d
incq %rdi
movb $0x4, %al
orb %al, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5c46
addq $0x8, %rdi
movzwl %si, %edx
jmp 0x5c67
movl %esi, %ecx
andl $0xe000, %ecx           # imm = 0xE000
movb $-0x1, %al
cmpw $0xa000, %cx            # imm = 0xA000
jne 0x5c70
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
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5cc2
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 0x5ce7
testw %si, %si
js 0x5cf8
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
cmpw $0xa000, %cx            # imm = 0xA000
jne 0x5cf7
cmpb $0x1, 0x18(%rdi)
jne 0x5cf7
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 0x5cec
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpw $0x1fff, %si            # imm = 0x1FFF
ja 0x5d4e
andb $0xf, %cl
cmpb $0xa, %cl
sete 0x18(%rdi)
retq
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5d67
andb $0x1f, %cl
movzbl %cl, %eax
cmpb $0x2, %al
pushq $0x1
popq %rcx
cmovael %eax, %ecx
movb %cl, 0x24(%rdi)
retq
cmpw $0x5fff, %si            # imm = 0x5FFF
ja 0x5d75
andb $0x3, %cl
movb %cl, 0x25(%rdi)
retq
testw %si, %si
js 0x5d81
andb $0x1, %cl
movb %cl, 0x28(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpw $0xa000, %ax            # imm = 0xA000
jne 0x5d80
cmpb $0x1, 0x18(%rdi)
jne 0x5d80
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
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5dd4
addq $0x8, %rdi
movzwl %si, %edx
jmp 0x5df3
testw %si, %si
js 0x5dfd
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
cmpw $0xa000, %cx            # imm = 0xA000
jne 0x5dfc
cmpb $0x1, 0x18(%rdi)
jne 0x5dfc
movl %esi, %eax
xorl %edx, %edx
idivl 0x20(%rdi)
addq $0x10, %rdi
jmp 0x5df3
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5e3c
andb $0xf, %cl
btl $0x8, %esi
jb 0x5e64
cmpb $0xa, %cl
sete 0x18(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpw $0xa000, %ax            # imm = 0xA000
jne 0x5e72
cmpb $0x1, 0x18(%rdi)
jne 0x5e72
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
pushq $0x1
popq %rcx
cmovael %eax, %ecx
movb %cl, 0x24(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5e87
movq 0x8(%rdi), %rax
movzwl %si, %edx
addq (%rax), %rdx
jmp 0x5ea9
testw %si, %si
js 0x5eac
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
cmpw $0xa000, %cx            # imm = 0xA000
jne 0x5eab
cmpb $0x1, 0x18(%rdi)
jne 0x5eab
movzbl 0x25(%rdi), %ecx
cmpl $0x3, %ecx
ja 0x5ee7
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 0x5ea9
leal -0x8(%rcx), %edx
cmpb $0x4, %dl
ja 0x5eab
addl $-0x8, %ecx
leaq (%rdi,%rcx), %rdx
addq $0x26, %rdx
jmp 0x5ea9
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpw $0x1fff, %si            # imm = 0x1FFF
ja 0x5f10
andb $0xf, %cl
cmpb $0xa, %cl
sete 0x18(%rdi)
retq
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5f29
andb $0x7f, %cl
movzbl %cl, %eax
cmpb $0x2, %al
pushq $0x1
popq %rcx
cmovael %eax, %ecx
movb %cl, 0x24(%rdi)
retq
cmpw $0x5fff, %si            # imm = 0x5FFF
ja 0x5f34
movb %cl, 0x25(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpw $0xa000, %ax            # imm = 0xA000
jne 0x5f7c
cmpb $0x1, 0x18(%rdi)
jne 0x5f7c
movzbl 0x25(%rdi), %eax
cmpl $0x3, %eax
ja 0x5f6d
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 0x5f7c
addl $-0x8, %eax
movb %cl, 0x26(%rdi,%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x5f8e
addq $0x8, %rdi
movzwl %si, %edx
jmp 0x5fb1
testw %si, %si
js 0x5fbb
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
cmpw $0xa000, %cx            # imm = 0xA000
jne 0x5fba
cmpb $0x1, 0x20(%rdi)
jne 0x5fba
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 0x5fb1
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpw $0x1fff, %si            # imm = 0x1FFF
ja 0x5fff
cmpb $0xa, %cl
sete 0x20(%rdi)
retq
cmpw $0x2fff, %si            # imm = 0x2FFF
ja 0x600a
movb %cl, 0x21(%rdi)
retq
cmpw $0x3fff, %si            # imm = 0x3FFF
ja 0x6018
andb $0x1, %cl
movb %cl, 0x22(%rdi)
retq
cmpw $0x5fff, %si            # imm = 0x5FFF
ja 0x6026
andb $0xf, %cl
movb %cl, 0x26(%rdi)
retq
movl %esi, %eax
andl $0xe000, %eax           # imm = 0xE000
cmpw $0xa000, %ax            # imm = 0xA000
jne 0x6025
cmpb $0x1, 0x20(%rdi)
jne 0x6025
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
// File: /workspace/github_cpp_makefile_star2_O2/nicoeps[P]NicoGB/src/nicogb.cpp
// Function: NicoGB::NicoGB()
NicoGB::NicoGB() :
    memory(cartridge, joypad, timer),
    ppu(memory),
    cpu(memory, ppu),
    loaded(cartridge.loaded),
    title(cartridge.title),
    framebuffer(ppu.framebuffer) {
        timer = Timer();
        joypad = Joypad();
        cartridge = Cartridge();
        speed = 0;
        epoch = std::chrono::high_resolution_clock::from_time_t(0);
        last = millis();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %r15
callq 0x819c
leaq 0x8(%r15), %rbx
movq %rbx, %rdi
callq 0x23fc
leaq 0x80(%r15), %r13
movq %r13, %rdi
callq 0x55d4
leaq 0x88(%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x6084
leaq 0x140(%r15), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x6bd4
leaq 0x200(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2b18
andq $0x0, 0x298(%r15)
leaq 0x28(%r15), %rax
movq %rax, 0x2b0(%r15)
movq %rbx, 0x2b8(%r15)
leaq 0x148(%r15), %rax
movq %rax, 0x2c0(%r15)
leaq 0x8(%rsp), %rdi
callq 0x819c
leaq 0x8(%rsp), %rdi
movl (%rdi), %eax
movl 0x3(%rdi), %ecx
movl %ecx, 0x3(%r15)
movl %eax, (%r15)
callq 0x55d4
leaq 0x8(%rsp), %rdi
movl (%rdi), %eax
movl %eax, (%r13)
callq 0x23fc
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6b5a
movq %r14, %rdi
callq 0x5b46
movb $0x0, 0x2a8(%r15)
andq $0x0, 0x298(%r15)
movq %r15, %rdi
callq 0x6996
movq %rax, 0x2a0(%r15)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6969
jmp 0x6969
jmp 0x6969
movq %rax, %r15
movq %r12, %rdi
callq 0x5ad8
jmp 0x6979
movq %rax, %r15
movq %r14, %rdi
callq 0x5b02
jmp 0x6986
movq %rax, %r15
movq %rbx, %rdi
callq 0x5b46
movq %r15, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2b7c
movq %rbx, %rdi
callq 0x81a4
leaq 0x80(%rbx), %rdi
callq 0x55dc
leaq 0x88(%rbx), %rdi
callq 0x61a2
addq $0x140, %rbx            # imm = 0x140
movq %rbx, %rdi
popq %rbx
jmp 0x6d34
// File: /workspace/github_cpp_makefile_star2_O2/nicoeps[P]NicoGB/src/nicogb.cpp
// Function: NicoGB::tick()
void NicoGB::tick() {
    if (speed) {
        cpu.totalCycles = 0;
    }

    if (cartridge.loaded && cpu.totalCycles < 70224) {
        cpu.cycle();
    }

    if (millis() - last >= 1000/60) {
        last = millis();
        if (cartridge.loaded && !speed) {
            cpu.totalCycles -= 70224;
        }
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x2a8(%rdi)
je 0x6a67
andq $0x0, 0x210(%rbx)
movb $0x1, %al
jmp 0x6a75
cmpq $0x11250, 0x210(%rbx) # imm = 0x11250
setl %al
cmpb $0x1, 0x28(%rbx)
jne 0x6a8b
testb %al, %al
je 0x6a8b
leaq 0x200(%rbx), %rdi
callq 0x3384
movq %rbx, %rdi
callq 0x6996
subq 0x2a0(%rbx), %rax
cmpq $0x10, %rax
jl 0x6ac9
movq %rbx, %rdi
callq 0x6996
movq %rax, 0x2a0(%rbx)
cmpb $0x1, 0x28(%rbx)
jne 0x6ac9
cmpb $0x0, 0x2a8(%rbx)
jne 0x6ac9
addq $-0x11250, 0x210(%rbx) # imm = 0xFFFEEDB0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nicoeps[P]NicoGB/src/ppu.cpp
// Function: PPU::PPU(Memory&)
PPU::PPU(Memory& memory) :
    memory(memory),
    lcdc(memory.lcd.lcdc),
    stat(memory.lcd.stat),
    scy(memory.lcd.scy),
    scx(memory.lcd.scx),
    ly(memory.lcd.ly),
    lyc(memory.lcd.lyc),
    bgp(memory.lcd.bgp),
    obp0(memory.lcd.obp0),
    obp1(memory.lcd.obp1),
    wy(memory.lcd.wy),
    wx(memory.lcd.wx) {
    framebuffer = std::vector<uint32_t>(160*144);
    writebuffer = std::vector<uint32_t>(160*144);
    line = std::vector<uint8_t>(160);
    init();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movq %rsi, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
leaq 0x18(%rsi), %rax
movq %rax, 0x28(%rdi)
leaq 0x19(%rsi), %rax
movq %rax, 0x30(%rdi)
leaq 0x1a(%rsi), %rax
movq %rax, 0x38(%rdi)
leaq 0x1b(%rsi), %rax
movq %rax, 0x40(%rdi)
leaq 0x1c(%rsi), %rax
movq %rax, 0x48(%rdi)
leaq 0x1d(%rsi), %rax
movq %rax, 0x50(%rdi)
leaq 0x1e(%rsi), %rax
movq %rax, 0x58(%rdi)
leaq 0x1f(%rsi), %rax
movq %rax, 0x60(%rdi)
leaq 0x20(%rsi), %rax
movq %rax, 0x68(%rdi)
leaq 0x21(%rsi), %rax
movq %rax, 0x70(%rdi)
addq $0x22, %rsi
movq %rsi, 0x78(%rdi)
leaq 0x88(%rdi), %r15
leaq 0xa0(%rdi), %r12
movups %xmm0, 0x88(%rdi)
movups %xmm0, 0x98(%rdi)
movups %xmm0, 0xa8(%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movl $0x5a00, %esi           # imm = 0x5A00
callq 0x7bd2
leaq 0x8(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7e1e
movq %r13, %rdi
callq 0x5b6e
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movl $0x5a00, %esi           # imm = 0x5A00
callq 0x7bd2
leaq 0x8(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x7e1e
movq %r13, %rdi
callq 0x5b6e
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movl $0xa0, %esi
callq 0x7c24
leaq 0x8(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x285c
movq %rbx, %rdi
callq 0x2830
movq %r14, %rdi
callq 0x6d34
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x6d10
jmp 0x6d10
movq %rax, %r14
movq %r12, %rdi
callq 0x2830
movq %r15, %rdi
callq 0x5b6e
movq %rbx, %rdi
callq 0x5b6e
movq %r14, %rdi
callq 0x22b0
nop