LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: rlist_insert(res_node*, kdnode*, double)
static int rlist_insert(struct res_node *list, struct kdnode *item, double dist_sq)
{
	struct res_node *rnode;

	if(!(rnode = (res_node*)alloc_resnode())) {	// (res_node*) added
		return -1;
	}
	rnode->item = item;
	rnode->dist_sq = dist_sq;

	if(dist_sq >= 0.0) {
		while(list->next && list->next->dist_sq < dist_sq) {
			list = list->next;
		}
	}
	rnode->next = list->next;
	list->next = rnode;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x22d0
testq %rax, %rax
je 0x169f1
movq %r14, (%rax)
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, 0x8(%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x10(%rbx)
xorl %eax, %eax
jmp 0x169f4
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearestf
struct kdres *kd_nearestf(struct kdtree *tree, const float *pos)
{
	static double sbuf[16];
	double *bptr, *buf = 0;
	int dim = tree->dim;
	struct kdres *res;

	if(dim > 16) {
#ifndef NO_ALLOCA
		if(dim <= 256)
			bptr = buf = (double*)alloca(dim * sizeof *bptr);	// (double*) added
		else
#endif
			if(!(bptr = buf = (double*)malloc(dim * sizeof *bptr))) {	// (double*) added
				return 0;
			}
	} else {
		bptr = buf = sbuf;
	}

	while(dim-- > 0) {
		*bptr++ = *pos++;
	}

	res = kd_nearest(tree, buf);
#ifndef NO_ALLOCA
	if(tree->dim > 256)
#else
	if(tree->dim > 16)
#endif
		free(buf);
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %r12d
cmpl $0x11, %r12d
jl 0x16a43
cmpl $0x100, %r12d           # imm = 0x100
ja 0x16a4c
movq %rsp, %r15
leaq 0xf(,%r12,8), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
jmp 0x16a61
leaq 0x15a16(%rip), %r15     # 0x2c460
jmp 0x16a61
leaq (,%r12,8), %rdi
callq 0x22d0
movq %rax, %r15
testq %rax, %rax
je 0x16aab
xorl %eax, %eax
testl %r12d, %r12d
jle 0x16a7d
decl %r12d
cvtss2sd (%r14,%rax), %xmm0
movsd %xmm0, (%r15,%rax,2)
addq $0x4, %rax
jmp 0x16a63
movq %rbx, %rdi
movq %r15, %rsi
callq 0x166c4
movq %rax, %r14
cmpl $0x101, (%rbx)          # imm = 0x101
jl 0x16a9b
movq %r15, %rdi
callq 0x2260
movq %r14, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x16a9b
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest3
struct kdres *kd_nearest3(struct kdtree *tree, double x, double y, double z)
{
	double pos[3];
	pos[0] = x;
	pos[1] = y;
	pos[2] = z;
	return kd_nearest(tree, pos);
}

// Assembly:
subq $0x18, %rsp
movq %rsp, %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movsd %xmm2, 0x10(%rsi)
callq 0x166c4
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest3f
struct kdres *kd_nearest3f(struct kdtree *tree, float x, float y, float z)
{
	double pos[3];
	pos[0] = x;
	pos[1] = y;
	pos[2] = z;
	return kd_nearest(tree, pos);
}

// Assembly:
subq $0x18, %rsp
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
cvtps2pd %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
cvtss2sd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsi)
callq 0x166c4
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest_range
struct kdres *kd_nearest_range(struct kdtree *kd, const double *pos, double range)
{
	int ret;
	struct kdres *rset;

	if(!(rset = (kdres*)malloc(sizeof *rset))) {	// (kdres*) added
		return 0;
	}
	if(!(rset->rlist = (res_node*)alloc_resnode())) {	// (res_node*) added
		free(rset);
		return 0;
	}
	rset->rlist->next = 0;
	rset->tree = kd;

	if((ret = find_nearest(kd->root, pos, range, rset->rlist, 0, kd->dim)) == -1) {
		kd_res_free(rset);
		return 0;
	}
	rset->size = ret;
	kd_res_rewind(rset);
	return rset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rsi, %r14
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x22d0
testq %rax, %rax
je 0x16b6e
movq %rax, %rbx
pushq $0x18
popq %rdi
callq 0x22d0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x16b5c
movq %rax, %r15
andq $0x0, 0x10(%rax)
movq %r12, (%rbx)
movq 0x8(%r12), %rdi
movl (%r12), %ecx
movq %r14, %rsi
movsd (%rsp), %xmm0
movq %rax, %rdx
callq 0x16b7f
cmpl $-0x1, %eax
je 0x16b66
movl %eax, 0x18(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
jmp 0x16b70
movq %rbx, %rdi
callq 0x2260
jmp 0x16b6e
movq %rbx, %rdi
callq 0x167ec
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: find_nearest(kdnode*, double const*, double, res_node*, int, int)
static int find_nearest(struct kdnode *node, const double *pos, double range, struct res_node *list, int ordered, int dim)
{
	double dist_sq, dx;
	int i, ret, added_res = 0;

	if(!node) return 0;

	dist_sq = 0;
	for(i=0; i<dim; i++) {
		dist_sq += SQ(node->pos[i] - pos[i]);
	}
	if(dist_sq <= SQ(range)) {
		if(rlist_insert(list, node, ordered ? dist_sq : -1.0) == -1) {
			return -1;
		}
		added_res = 1;
	}

	dx = pos[node->dir] - node->pos[node->dir];

	ret = find_nearest(dx <= 0.0 ? node->left : node->right, pos, range, list, ordered, dim);
	if(ret >= 0 && fabs(dx) < range) {
		added_res += ret;
		ret = find_nearest(dx <= 0.0 ? node->right : node->left, pos, range, list, ordered, dim);
	}
	if(ret == -1) {
		return -1;
	}
	added_res += ret;

	return added_res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x16c98
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %ecx
cmovgl %ebx, %ecx
xorpd %xmm2, %xmm2
cmpq %rax, %rcx
je 0x16bd2
movq (%r12), %rdx
movsd (%rdx,%rax,8), %xmm1
subsd (%r15,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm2
incq %rax
jmp 0x16bb1
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
xorl %r13d, %r13d
ucomisd %xmm2, %xmm1
pushq $-0x1
popq %rbp
movsd %xmm0, 0x8(%rsp)
jb 0x16c0a
movq %r14, %rdi
movq %r12, %rsi
callq 0x169b9
cmpl $-0x1, %eax
je 0x16c9a
pushq $0x1
popq %r13
movsd 0x8(%rsp), %xmm0
movslq 0x8(%r12), %rax
movsd (%r15,%rax,8), %xmm2
movq (%r12), %rcx
subsd (%rcx,%rax,8), %xmm2
xorpd %xmm1, %xmm1
xorl %eax, %eax
movapd %xmm2, 0x10(%rsp)
ucomisd %xmm2, %xmm1
setb %al
movq 0x18(%r12,%rax,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x16b7f
testl %eax, %eax
js 0x16c8b
movapd 0xdd61(%rip), %xmm0     # 0x249b0
movapd 0x10(%rsp), %xmm2
andpd %xmm2, %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x16c8b
movapd %xmm1, %xmm0
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
ucomisd %xmm2, %xmm1
setae %cl
addl %eax, %r13d
movq 0x18(%r12,%rcx,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x16b7f
cmpl $-0x1, %eax
je 0x16c9a
addl %eax, %r13d
movl %r13d, %ebp
jmp 0x16c9a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest_rangef
struct kdres *kd_nearest_rangef(struct kdtree *kd, const float *pos, float range)
{
	static double sbuf[16];
	double *bptr, *buf = 0;
	int dim = kd->dim;
	struct kdres *res;

	if(dim > 16) {
#ifndef NO_ALLOCA
		if(dim <= 256)
			bptr = buf = (double*)alloca(dim * sizeof *bptr);	// (double*) added
		else
#endif
			if(!(bptr = buf = (double*)malloc(dim * sizeof *bptr))) {	// (double*) added
				return 0;
			}
	} else {
		bptr = buf = sbuf;
	}

	while(dim-- > 0) {
		*bptr++ = *pos++;
	}

	res = kd_nearest_range(kd, buf, range);
#ifndef NO_ALLOCA
	if(kd->dim > 256)
#else
	if(kd->dim > 16)
#endif
		free(buf);
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %r12d
cmpl $0x11, %r12d
jl 0x16ce9
cmpl $0x100, %r12d           # imm = 0x100
ja 0x16cf2
movq %rsp, %r15
leaq 0xf(,%r12,8), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
jmp 0x16d11
leaq 0x157f0(%rip), %r15     # 0x2c4e0
jmp 0x16d11
leaq (,%r12,8), %rdi
movss %xmm0, -0x24(%rbp)
callq 0x22d0
movss -0x24(%rbp), %xmm0
movq %rax, %r15
testq %rax, %rax
je 0x16d5f
xorl %eax, %eax
testl %r12d, %r12d
jle 0x16d2d
decl %r12d
cvtss2sd (%r14,%rax), %xmm1
movsd %xmm1, (%r15,%rax,2)
addq $0x4, %rax
jmp 0x16d13
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16af2
movq %rax, %r14
cmpl $0x101, (%rbx)          # imm = 0x101
jl 0x16d4f
movq %r15, %rdi
callq 0x2260
movq %r14, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x16d4f
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest_range3
struct kdres *kd_nearest_range3(struct kdtree *tree, double x, double y, double z, double range)
{
	double buf[3];
	buf[0] = x;
	buf[1] = y;
	buf[2] = z;
	return kd_nearest_range(tree, buf, range);
}

// Assembly:
subq $0x18, %rsp
movq %rsp, %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movsd %xmm2, 0x10(%rsi)
movaps %xmm3, %xmm0
callq 0x16af2
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest_range3f
struct kdres *kd_nearest_range3f(struct kdtree *tree, float x, float y, float z, float range)
{
	double buf[3];
	buf[0] = x;
	buf[1] = y;
	buf[2] = z;
	return kd_nearest_range(tree, buf, range);
}

// Assembly:
subq $0x18, %rsp
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
cvtps2pd %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
cvtss2sd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsi)
cvtss2sd %xmm3, %xmm0
callq 0x16af2
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_res_item
void *kd_res_item(struct kdres *rset, double *pos)
{
	if(rset->riter) {
		if(pos) {
			memcpy(pos, rset->riter->item->pos, rset->tree->dim * sizeof *pos);
		}
		return rset->riter->item->data;
	}
	return 0;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x16e0b
pushq %rbx
testq %rsi, %rsi
je 0x16e02
movq %rdi, %rbx
movq (%rax), %rax
movq (%rax), %rax
movq (%rdi), %rcx
movslq (%rcx), %rdx
shlq $0x3, %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x21b0
movq 0x10(%rbx), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_res_itemf
void *kd_res_itemf(struct kdres *rset, float *pos)
{
	if(rset->riter) {
		if(pos) {
			int i;
			for(i=0; i<rset->tree->dim; i++) {
				pos[i] = rset->riter->item->pos[i];
			}
		}
		return rset->riter->item->data;
	}
	return 0;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x16e4a
testq %rsi, %rsi
je 0x16e42
movq (%rdi), %rcx
movl (%rcx), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x16e42
movq (%rax), %rdi
movq (%rdi), %rdi
cvtsd2ss (%rdi,%rdx,8), %xmm0
movss %xmm0, (%rsi,%rdx,4)
incq %rdx
jmp 0x16e28
movq (%rax), %rax
movq 0x10(%rax), %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_res_item3
void *kd_res_item3(struct kdres *rset, double *x, double *y, double *z)
{
	if(rset->riter) {
		if(*x) *x = rset->riter->item->pos[0];
		if(*y) *y = rset->riter->item->pos[1];
		if(*z) *z = rset->riter->item->pos[2];
	}
	return 0;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x16eae
movsd (%rsi), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x16e66
jnp 0x16e74
movq (%rax), %rdi
movq (%rdi), %rdi
movsd (%rdi), %xmm1
movsd %xmm1, (%rsi)
movsd (%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x16e80
jnp 0x16e8f
movq (%rax), %rsi
movq (%rsi), %rsi
movsd 0x8(%rsi), %xmm0
movsd %xmm0, (%rdx)
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x16e9f
jnp 0x16eae
movq (%rax), %rax
movq (%rax), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_res_item3f
void *kd_res_item3f(struct kdres *rset, float *x, float *y, float *z)
{
	if(rset->riter) {
		if(*x) *x = rset->riter->item->pos[0];
		if(*y) *y = rset->riter->item->pos[1];
		if(*z) *z = rset->riter->item->pos[2];
	}
	return 0;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x16f0d
movss (%rsi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x16ec8
jnp 0x16ed6
movq (%rax), %rdi
movq (%rdi), %rdi
cvtsd2ss (%rdi), %xmm1
movss %xmm1, (%rsi)
movss (%rdx), %xmm1
ucomiss %xmm0, %xmm1
jne 0x16ee1
jnp 0x16ef0
movq (%rax), %rsi
movq (%rsi), %rsi
cvtsd2ss 0x8(%rsi), %xmm0
movss %xmm0, (%rdx)
movss (%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x16efe
jnp 0x16f0d
movq (%rax), %rax
movq (%rax), %rax
cvtsd2ss 0x10(%rax), %xmm0
movss %xmm0, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/emu.cpp
// Function: main
int main(int argc, char **argv) {
  if (2 != argc && 3 != argc) {
    usage(argv[0]);
    return 1;
  }

  std::string keymap;
  if (3 == argc) {
    keymap = argv[2];
  } else {
    keymap = DEFAULT_KEYMAP_FILENAME;
  }
  
  EmuVideoMemory vidMem;
  EmuWindow window(&vidMem, keymap);
  EmuProcessor processor(&window, argv[1]);
  if (window.hasError() || processor.hasError()) {
    return 1;
  }

  // Start up separate threads for the UI and processor
  std::thread winThread(win_thread_start, &window);
  std::thread procThread(proc_thread_start, &processor);

  // Join the threads
  winThread.join();
  processor.setRunning(false);
  procThread.join();
  
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10150, %rsp          # imm = 0x10150
movq %rsi, %rbx
leal -0x4(%rdi), %eax
cmpl $-0x3, %eax
ja 0x36d7
movq (%rbx), %rsi
leaq 0x60(%rsp), %rdi
leaq 0x118(%rsp), %rdx
callq 0x3880
leaq 0x60(%rsp), %rdi
callq 0x364c
leaq 0x60(%rsp), %rdi
callq 0x30f0
pushq $0x1
popq %rbp
jmp 0x37fe
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpl $0x3, %edi
jne 0x36fd
movq 0x10(%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0x34c0
jmp 0x370e
leaq 0x1919(%rip), %rsi      # 0x501d
leaq 0x38(%rsp), %rdi
callq 0x34c0
leaq 0x28(%rsp), %rdi
callq 0x3a94
leaq 0x80(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x3b68
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0x3880
leaq 0x118(%rsp), %rbx
leaq 0x80(%rsp), %r14
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x48e4
leaq 0x8(%rsp), %rdi
callq 0x30f0
pushq $0x1
popq %rbp
cmpb $0x0, 0xa8(%rsp)
jne 0x37dd
cmpb $0x0, 0x10147(%rsp)
jne 0x37dd
movq %rsp, %rdx
movq %r14, (%rdx)
leaq -0x108(%rip), %rsi      # 0x3686
leaq 0x8(%rsp), %rdi
callq 0x38bc
leaq 0x58(%rsp), %rdx
movq %rbx, (%rdx)
leaq -0x11c(%rip), %rsi      # 0x368b
movq %rsp, %rdi
callq 0x3936
leaq 0x8(%rsp), %rdi
callq 0x33f0
movb $0x0, 0x10148(%rsp)
movq %rsp, %rdi
callq 0x33f0
movq %rsp, %rdi
callq 0x39b0
leaq 0x8(%rsp), %rdi
callq 0x39b0
xorl %ebp, %ebp
leaq 0x80(%rsp), %rdi
callq 0x3f58
leaq 0x28(%rsp), %rdi
callq 0x3abc
leaq 0x38(%rsp), %rdi
callq 0x30f0
movl %ebp, %eax
addq $0x10150, %rsp          # imm = 0x10150
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0x381e
jmp 0x3839
movq %rax, %rbx
movq %rsp, %rdi
callq 0x39b0
leaq 0x8(%rsp), %rdi
callq 0x39b0
jmp 0x383c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30f0
jmp 0x383c
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3f58
jmp 0x384e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3abc
jmp 0x3869
jmp 0x3866
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x386e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x30f0
movq %rbx, %rdi
callq 0x3440
movq %rax, %rbx
jmp 0x3873
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/vidmem.cpp
// Function: EmuVideoMemory::set(unsigned char const&, unsigned char const&, unsigned char const&)
void EmuVideoMemory::set(const uint8_t& x,
                         const uint8_t& y,
                         const uint8_t& color) {
  // Decode the color. The most significant three bits represent
  // red, the middle three bits represent green, and the lowest
  // two bits represent blue. We want the color as a double from
  // 0.0 to 1.0 for cairo.
  double red = (color & 0xe0) / 255.0;
  double green = ((color & 0x1c) << 3) / 255.0;
  double blue = ((color & 0x3) << 6) / 255.0;
  // Paint the pixel specified by (x, y) to the buffer
  cairo_set_source_rgb(_cairo, red, green, blue);
  cairo_rectangle(_cairo, x, y, 1, 1);
  cairo_fill(_cairo);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movzbl (%rcx), %eax
movl %eax, %ecx
andl $-0x20, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x15ea(%rip), %xmm3     # 0x50e8
movl %eax, %ecx
andl $0x1c, %ecx
shll $0x3, %ecx
cvtsi2sd %ecx, %xmm1
divsd %xmm3, %xmm0
divsd %xmm3, %xmm1
shll $0x6, %eax
movzbl %al, %eax
cvtsi2sd %eax, %xmm2
divsd %xmm3, %xmm2
movq 0x8(%rdi), %rdi
callq 0x3190
movzbl (%r15), %eax
cvtsi2sd %eax, %xmm0
movq 0x8(%rbx), %rdi
movzbl (%r14), %eax
cvtsi2sd %eax, %xmm1
movsd 0x15ab(%rip), %xmm2     # 0x50f0
movaps %xmm2, %xmm3
callq 0x3130
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/window.cpp
// Function: EmuWindow::~EmuWindow()
EmuWindow::~EmuWindow() {
  // Destroy the cairo object
  cairo_destroy(_cairo);
  // Destroy the cairo Xlib surface
  cairo_surface_destroy(_surface);
  // Close the connection to the X server
  XCloseDisplay(_display);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x3350
movq (%rbx), %rdi
callq 0x32e0
movq 0x10(%rbx), %rdi
callq 0x34b0
leaq 0x68(%rbx), %rdi
callq 0x42c8
addq $0x38, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x4320
movq %rax, %rdi
callq 0x3b5b
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/window.cpp
// Function: EmuWindow::_draw()
void EmuWindow::_draw() {
  // Scale and paint the video memory's buffer to the window
  double scaleX = (double)_width / _vidMem->getWidth();
  double scaleY = (double)_height / _vidMem->getHeight();
  cairo_identity_matrix(_cairo);
  cairo_scale(_cairo, scaleX, scaleY);
  cairo_set_source_surface(_cairo, _vidMem->getBuffer(), 0, 0);
  cairo_pattern_set_filter(cairo_get_source(_cairo), CAIRO_FILTER_NEAREST);
  cairo_paint(_cairo);
  cairo_surface_flush(_surface);
  XFlush(_display);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cvtsi2sdl 0x2c(%rdi), %xmm0
mulsd 0x114f(%rip), %xmm0     # 0x50f8
movsd %xmm0, 0x8(%rsp)
cvtsi2sdl 0x30(%rdi), %xmm0
divsd 0x1144(%rip), %xmm0     # 0x5100
movsd %xmm0, (%rsp)
movq 0x8(%rdi), %rdi
callq 0x3160
movq 0x8(%rbx), %rdi
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x3040
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rax
movq (%rax), %rsi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x3480
movq 0x8(%rbx), %rdi
callq 0x3380
pushq $0x3
popq %rsi
movq %rax, %rdi
callq 0x34a0
movq 0x8(%rbx), %rdi
callq 0x33d0
movq (%rbx), %rdi
callq 0x3400
movq 0x10(%rbx), %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x33a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/window.cpp
// Function: EmuWindow::getInput(unsigned short const&)
uint16_t EmuWindow::getInput(const uint16_t& input_id) {
  // Return current input status. If this input_id is
  // not registered to a key or button, return 0.
  auto keySymPtr = _keyMap.find(input_id);
  if (_keyMap.end() == keySymPtr) {
    // This input isn't mapped to anything.
    return 0;
  }
  auto statePtr = _keyState.find(keySymPtr->second);
  if (_keyState.end() == statePtr) {
    // This key hasn't been pressed or released.
    return 0;
  }
  return statePtr->second;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x38, %rdi
callq 0x45f6
leaq 0x40(%rbx), %rcx
cmpq %rax, %rcx
je 0x4067
leaq 0x68(%rbx), %rdi
addq $0x28, %rax
movq %rax, %rsi
callq 0x462c
addq $0x70, %rbx
cmpq %rax, %rbx
je 0x4067
movzwl 0x28(%rax), %eax
jmp 0x4069
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/window.cpp
// Function: EmuWindow::_updateKeyState(XKeyEvent const&)
void EmuWindow::_updateKeyState(const XKeyEvent& event) {
  // Filter out auto repeat key events
  if (event.type == KeyRelease && XPending(_display)) {
    XEvent nev;
    XPeekEvent(_display, &nev);
    if (nev.type == KeyPress &&
        nev.xkey.time == event.time &&
        nev.xkey.keycode == event.keycode) {
      // Key wasn't really released, get rid of the
      // pending KeyPress event and return
      XNextEvent(_display, &nev);
      return;
    }
  }
  int keysyms_per_keycode_return;
  KeySym *keysym = XGetKeyboardMapping(_display,
                                       event.keycode,
                                       1,
                                       &keysyms_per_keycode_return);
  uint16_t status = KeyPress == event.type ? 1 : 0;
  _keyState[keysym[0]] = status;
  XFree(keysym);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x3, (%rsi)
jne 0x40cd
movq 0x10(%rbx), %rdi
callq 0x3230
testl %eax, %eax
je 0x40cd
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x30c0
cmpl $0x2, (%r15)
jne 0x40cd
movq 0x40(%rsp), %rax
cmpq 0x38(%r14), %rax
jne 0x40cd
movl 0x5c(%rsp), %eax
cmpl 0x54(%r14), %eax
jne 0x40cd
movq 0x10(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3360
jmp 0x410a
movq 0x10(%rbx), %rdi
movzbl 0x54(%r14), %esi
pushq $0x1
popq %rdx
leaq 0x8(%rsp), %rcx
callq 0x3460
movq %rax, %r15
xorl %ebp, %ebp
cmpl $0x2, (%r14)
sete %bpl
addq $0x68, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4278
movw %bp, (%rax)
movq %r15, %rdi
callq 0x32f0
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-emulator/src/processor.cpp
// Function: EmuProcessor::_setFlags(unsigned int const&, unsigned int const&, unsigned int const&, unsigned char const&)
void EmuProcessor::_setFlags(const uint32_t& dest,
                             const uint32_t& src,
                             const uint32_t& result,
                             const uint8_t& opcode) {
  // Overflow set if we added two positives and got a negative,
  // added two negatives and got a positive, subtracted a positive
  // from a negative and got a positive, or subtracted a negative
  // from a positive and got a negative
  if (OPCODE_ADD == opcode) {
    _overflowFlag =
      ((0x8000 & dest) && (0x8000 & src) && !(0x8000 & result)) ||
      (!(0x8000 & dest) && !(0x8000 & src) && (0x8000 & result));
  } else if (OPCODE_SUB == opcode || OPCODE_CMP == opcode) {
    _overflowFlag =
      ((0x8000 & dest) && !(0x8000 & src) && !(0x8000 & result)) ||
      (!(0x8000 & dest) && (0x8000 & src) && (0x8000 & result));
  } else {
    _overflowFlag = false;
  }
  // Carry set if c is too large to fit into 16 bits.
  _carryFlag = 0xffff < result;
  // Zero set if the result was zero.
  _zeroFlag = !(0xffff & result);
  // Sign flag set if the sign bit of the result is set.
  _signFlag = 0x8000 & result;
}

// Assembly:
movzbl (%r8), %eax
cmpl $0x14, %eax
je 0x4b42
cmpl $0xb, %eax
je 0x4b42
cmpl $0xa, %eax
jne 0x4b6c
testb $-0x80, 0x1(%rsi)
movl (%rdx), %eax
jne 0x4b5f
testw %ax, %ax
jns 0x4b4f
jmp 0x4b6c
testb $-0x80, 0x1(%rsi)
movl (%rdx), %eax
jne 0x4b58
testw %ax, %ax
jns 0x4b6c
movl (%rcx), %eax
shrl $0xf, %eax
andb $0x1, %al
jmp 0x4b6e
testw %ax, %ax
jns 0x4b64
jmp 0x4b6c
testw %ax, %ax
jns 0x4b6c
movb $0x1, %al
testb $-0x80, 0x1(%rcx)
je 0x4b6e
xorl %eax, %eax
movb %al, 0x1002b(%rdi)
movl (%rcx), %eax
cmpl $0x10000, %eax          # imm = 0x10000
setae 0x1002c(%rdi)
testw %ax, %ax
sete 0x1002d(%rdi)
shrl $0xf, %eax
andb $0x1, %al
movb %al, 0x1002e(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/test-case.h
// Function: main
int main(int argc, char **argv) {
  if (cli::options(argc, argv, false).matches == 0) {
    return run<function>() ? 0 : -1;
  } else {
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movl %edi, %ebp
callq 0x46ec
callq 0x47cc
leaq 0x18f9c(%rip), %r8      # 0x1d718
leaq 0x18fcd(%rip), %r9      # 0x1d750
movq %rsp, %r15
xorl %ebx, %ebx
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x4cea
movq (%r15), %r14
leaq 0x8(%rsp), %rdi
callq 0x90b0
testq %r14, %r14
jne 0x47bf
callq 0x483c
leaq 0x18fd3(%rip), %rdi     # 0x1d788
callq 0x4d2a
movzbl %al, %ebx
decl %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/test-case.h
// Function: bool efgy::test::run<efgy::test::function>(efgy::beacon<efgy::test::function>::set&)
bool run(beacons<test> &tests = global<beacons<test>>()) {
  int i = 0;
  for (const auto &f : tests) {
    i++;
    std::cout << "running test case " << i << " in batch of " << tests.size()
              << ": ";
    if (!f->run(std::cerr)) {
      std::cout << "FAIL\n";
      return false;
    }
    std::cout << "OK\n";
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rbx
leaq 0x8(%rdi), %r12
pushq $0x1
popq %rbp
movq 0x18266(%rip), %r15     # 0x1cfb0
movq 0x18297(%rip), %r13     # 0x1cfe8
cmpq %r12, %rbx
je 0x4dde
movq %r15, %rdi
leaq 0xde48(%rip), %rsi      # 0x12bac
callq 0x4260
movq %rax, %rdi
movl %ebp, %esi
callq 0x43e0
movq %rax, %rdi
leaq 0xde42(%rip), %rsi      # 0x12bbf
callq 0x4260
movq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x41c0
movq %rax, %rdi
leaq 0xdda5(%rip), %rsi      # 0x12b3d
callq 0x4260
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x11514
testb %al, %al
je 0x4dcb
movq %r15, %rdi
leaq 0xde1c(%rip), %rsi      # 0x12bd3
callq 0x4260
movq %rbx, %rdi
callq 0x42f0
movq %rax, %rbx
incl %ebp
jmp 0x4d51
movq 0x181de(%rip), %rdi     # 0x1cfb0
leaq 0xddf4(%rip), %rsi      # 0x12bcd
callq 0x4260
cmpq %r12, %rbx
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/cli.h
// Function: efgy::cli::processor<efgy::cli::option, efgy::cli::hint>::usage(std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void usage(std::ostream &out, const std::string &name = "<command>") {
    out << "Usage: " << name << " [options...] [--] [input...]\n"
        << "\n"
        << "Where [options...] is any of the following:\n";

    for (const auto &opt : opts) {
      out << "  " << opt->regex;
      if (opt->regex.size() < 25) {
        for (std::size_t i = opt->regex.size() + 1; i < 26; i++) {
          out << " ";
        }
      } else {
        out << "\n                           ";
      }
      out << opt->description << "\n";
    }

    for (const auto &hn : hints) {
      out << "\n" << hn->title << ":\n" << hn->usage();
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x3aca(%rip), %rsi      # 0x12b38
movq %rbx, %rdi
callq 0x4260
movq %rax, %rdi
movq %r14, %rsi
callq 0x4240
leaq 0x3ab8(%rip), %rsi      # 0x12b40
movq %rax, %rdi
callq 0x4260
leaq 0x3228(%rip), %rsi      # 0x122bf
movq %rax, %rdi
callq 0x4260
leaq 0x3ab9(%rip), %rsi      # 0x12b5f
movq %rax, %rdi
callq 0x4260
movq %r15, (%rsp)
movq 0x28(%r15), %r14
movq 0x18(%r14), %r13
addq $0x8, %r14
leaq 0x3ae1(%rip), %r12      # 0x12ba6
leaq 0x3adb(%rip), %rbp      # 0x12ba7
cmpq %r14, %r13
je 0xf14a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4260
movq 0x20(%r13), %rsi
movq %rax, %rdi
callq 0x4240
movq 0x20(%r13), %rax
movq 0x8(%rax), %r15
cmpq $0x18, %r15
ja 0xf10f
addq $-0x19, %r15
testq %r15, %r15
je 0xf11e
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4260
incq %r15
jmp 0xf0fa
movq %rbx, %rdi
leaq 0x3a73(%rip), %rsi      # 0x12b8c
callq 0x4260
movq 0x20(%r13), %rsi
addq $0x40, %rsi
movq %rbx, %rdi
callq 0x4240
movq %rax, %rdi
leaq 0x3187(%rip), %rsi      # 0x122bf
callq 0x4260
movq %r13, %rdi
callq 0x42f0
movq %rax, %r13
jmp 0xf0cc
movq (%rsp), %rax
movq 0x30(%rax), %r14
movq 0x18(%r14), %r15
addq $0x8, %r14
leaq 0x3a28(%rip), %r12      # 0x12b89
leaq 0x8(%rsp), %r13
cmpq %r14, %r15
je 0xf1c4
movq %rbx, %rdi
leaq 0x314a(%rip), %rsi      # 0x122bf
callq 0x4260
movq 0x20(%r15), %rsi
movq %rax, %rdi
callq 0x4240
movq %rax, %rdi
movq %r12, %rsi
callq 0x4260
movq %rax, %rbp
movq 0x20(%r15), %rsi
addq $0x20, %rsi
movq %r13, %rdi
callq 0xf1e8
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4240
movq %r13, %rdi
callq 0x4110
movq %r15, %rdi
callq 0x42f0
movq %rax, %r15
jmp 0xf166
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x4400
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/cli.h
// Function: efgy::cli::processor<efgy::cli::option, efgy::cli::hint>::apply(int, char**)
void apply(int argc, char *argv[]) {
    std::vector<std::string> args;
    for (int i = 0; i < argc; i++) {
      args.push_back(argv[i]);
    }
    apply(args);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %r12
andq $0x0, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %r15d
leaq 0x28(%rsp), %r13
leaq 0x7(%rsp), %rbp
cmpq %rbx, %r15
je 0xf26a
movq (%r14,%rbx,8), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x4bd0
movq %r12, %rdi
movq %r13, %rsi
callq 0xf43a
movq %r13, %rdi
callq 0x4110
incq %rbx
jmp 0xf23e
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xf2b8
leaq 0x10(%rsp), %rdi
callq 0x90b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf294
movq %rax, %rbx
jmp 0xf2a6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4110
leaq 0x10(%rsp), %rdi
callq 0x90b0
movq %rbx, %rdi
callq 0x4400
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/cli.h
// Function: efgy::cli::processor<efgy::cli::option, efgy::cli::hint>::apply(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void apply(const std::vector<std::string> &args) {
    bool doneWithArgs = false;
    bool firstArg = true;

    for (const auto &arg : args) {
      if (arg == "--") {
        doneWithArgs = true;
        continue;
      }

      bool haveMatch = false;

      if (!doneWithArgs) {
        for (const auto &opt : opts) {
          std::smatch match;
          if (std::regex_match(arg, match, opt->match) && opt->handler(match)) {
            matches++;
            haveMatch = true;
          }
        }
      }

      if (!haveMatch && !firstArg) {
        remainder.push_back(arg);
      }

      firstArg = false;
    }

    if (showUsage && (matches == 0) && (args.size() > 0) &&
        (remainder.size() == 0)) {
      usage(std::cout, args[0]);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rsi), %r15
movq %rsi, 0x8(%rsp)
movq 0x8(%rsi), %r14
leaq 0x8(%rdi), %rax
movq %rax, 0x18(%rsp)
movb $0x1, %al
movl %eax, (%rsp)
xorl %r13d, %r13d
leaq 0x38bc(%rip), %r12      # 0x12ba9
leaq 0x20(%rsp), %rbp
movq %r14, 0x10(%rsp)
cmpq %r14, %r15
je 0xf3e3
movq %r15, %rdi
movq %r12, %rsi
callq 0x932b
testb %al, %al
je 0xf317
movb $0x1, %r13b
jmp 0xf3da
testb $0x1, %r13b
je 0xf330
testb $0x1, (%rsp)
je 0xf3c6
movl $0x0, (%rsp)
jmp 0xf30f
movl %r13d, 0x4(%rsp)
movq 0x28(%rbx), %r12
movq 0x18(%r12), %r14
addq $0x8, %r12
xorl %r13d, %r13d
cmpq %r12, %r14
je 0xf39f
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq 0x20(%r14), %rdx
addq $0x60, %rdx
movq %r15, %rdi
movq %rbp, %rsi
xorl %ecx, %ecx
callq 0xf530
testb %al, %al
je 0xf38a
movq 0x20(%r14), %rdi
addq $0x20, %rdi
movq %rbp, %rsi
callq 0xf54c
testb %al, %al
je 0xf38a
incq (%rbx)
movb $0x1, %r13b
movq %rbp, %rdi
callq 0xf9f4
movq %r14, %rdi
callq 0x42f0
movq %rax, %r14
jmp 0xf345
orb (%rsp), %r13b
testb $0x1, %r13b
movq 0x10(%rsp), %r14
leaq 0x37f6(%rip), %r12      # 0x12ba9
movl 0x4(%rsp), %r13d
je 0xf3c6
movl $0x0, (%rsp)
xorl %r13d, %r13d
jmp 0xf3da
movq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0xc534
movl $0x0, (%rsp)
addq $0x20, %r15
jmp 0xf2f7
cmpb $0x1, 0x20(%rbx)
jne 0xf416
cmpq $0x0, (%rbx)
jne 0xf416
movq 0x8(%rsp), %rax
movq (%rax), %rdx
cmpq %rdx, 0x8(%rax)
je 0xf416
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0xf416
movq 0xdba2(%rip), %rsi      # 0x1cfb0
movq %rbx, %rdi
callq 0xf050
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xf9f4
movq %rbx, %rdi
callq 0x4400
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/test-case.h
// Function: efgy::test::function::run(std::ostream&)
bool run(std::ostream &log) {
    try {
      return func(log);
    } catch (std::exception &e) {
      std::cerr << "Exception: " << e.what() << "\n";
    } catch (...) {
      std::cerr << "Unknown Exception\n";
    }
    return false;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x115b2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %r14
movq %rax, %rdi
callq 0x40d0
cmpl $0x2, %r14d
jne 0x11574
movq %rax, %rbx
movq 0xbaa8(%rip), %rdi      # 0x1cfe8
leaq 0x16a3(%rip), %rsi      # 0x12bea
callq 0x4260
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4260
leaq 0xd55(%rip), %rsi       # 0x122bf
movq %rax, %rdi
callq 0x4260
jmp 0x11587
movq 0xba6d(%rip), %rdi      # 0x1cfe8
leaq 0x1655(%rip), %rsi      # 0x12bd7
callq 0x4260
callq 0x43b0
xorl %eax, %eax
jmp 0x1151d
movq %rax, %rbx
callq 0x43b0
jmp 0x115a2
movq %rax, %rbx
callq 0x43b0
movq %rbx, %rdi
callq 0x4400
movq %rax, %rdi
callq 0x502b
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]spamidea/getsender.cc
// Function: flattenDomain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
string flattenDomain(const std::string& input, const vector<string>& repl)
{
  for(const auto& r: repl) {
    auto pos = input.find(r);
    if(pos != string::npos) {
      return "*."+r;
    }
  }
  return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %r15
movq 0x8(%rdx), %r12
cmpq %r12, %r15
je 0x47bf
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4590
cmpq $-0x1, %rax
jne 0x47cc
addq $0x20, %r15
jmp 0x47a1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4410
jmp 0x47de
leaq 0xd925(%rip), %rsi      # 0x120f8
movq %rbx, %rdi
movq %r15, %rdx
callq 0x50e1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]spamidea/getsender.cc
// Function: processFile(boost::filesystem::path const&)
void processFile(const boost::filesystem::path& p)
{
  FILE* fp = fopen(p.c_str(), "r");
  if(!fp) {
    cerr<<"Could not open " << p.string() << " for reading"<<endl;
    exit(EXIT_FAILURE);
  }
  processReceived(fp);
  fclose(fp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xd9fa(%rip), %rsi      # 0x1283f
callq 0x4390
testq %rax, %rax
je 0x4e69
movq %rax, %r14
movq %rax, %rdi
callq 0x4d5b
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42d0
movq 0x18178(%rip), %rdi     # 0x1cfe8
leaq 0xd2e5(%rip), %rsi      # 0x1215c
callq 0x42c0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42a0
leaq 0xd2de(%rip), %rsi      # 0x1216c
movq %rax, %rdi
callq 0x42c0
movq %rax, %rdi
callq 0x4160
pushq $0x1
popq %rdi
callq 0x43a0
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]spamidea/getsender.cc
// Function: processDir(boost::filesystem::path const&)
void processDir(const boost::filesystem::path& p)
{
  for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(p), {}))
    if (boost::filesystem::is_regular_file(entry))
      processFile(entry);
    else if (boost::filesystem::is_directory(entry))
      processDir(entry);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x54d6
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x5466
leaq 0x10(%rsp), %rdi
callq 0x5e1a
leaq 0x18(%rsp), %rdi
callq 0x5e1a
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4efd
lock
incl (%rax)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x4f0e
lock
incl (%rax)
leaq 0x8(%rsp), %rbx
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5503
testb %al, %al
je 0x4f64
movq %rbx, %rdi
callq 0x650c
movq %rax, %r15
movq %rax, %rdi
callq 0x550d
testb %al, %al
je 0x4f46
movq %r15, %rdi
callq 0x4e34
jmp 0x4f5a
movq %r15, %rdi
callq 0x552e
testb %al, %al
je 0x4f5a
movq %r15, %rdi
callq 0x4ea6
movq %rbx, %rdi
callq 0x11f50
jmp 0x4f16
movq %rsp, %rdi
callq 0x5e1a
leaq 0x8(%rsp), %rdi
callq 0x5e1a
leaq 0x20(%rsp), %rdi
callq 0x5550
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5e1a
leaq 0x18(%rsp), %rdi
callq 0x5e1a
jmp 0x4fc4
jmp 0x4fa5
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5e1a
leaq 0x8(%rsp), %rdi
callq 0x5e1a
leaq 0x20(%rsp), %rdi
callq 0x5550
movq %rbx, %rdi
callq 0x4500
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]spamidea/getsender.cc
// Function: main
int main(int argc, char**argv)
{
  for(int n = 1 ; n < argc; ++n) {
    boost::filesystem::path p(argv[n]);
    if (boost::filesystem::exists(p)) {
      if (boost::filesystem::is_regular_file(p))
        processFile(p);
      else if (boost::filesystem::is_directory(p)) {
        processDir(p);
      }
    }
  }
  
  ofstream plot2("plot2.dot");
  plot2 << "digraph { " <<endl;
  g_mtn.emitLinks(plot2);
  plot2 << "}"<<endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movslq %edi, %r15
pushq $0x1
popq %r12
leaq 0x8(%rsp), %r14
cmpq %r15, %r12
jge 0x503d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x5566
movq %r14, %rdi
callq 0x5573
testb %al, %al
je 0x5030
movq %r14, %rdi
callq 0x5596
testb %al, %al
je 0x501c
movq %r14, %rdi
callq 0x4e34
jmp 0x5030
movq %r14, %rdi
callq 0x55b9
testb %al, %al
je 0x5030
movq %r14, %rdi
callq 0x4ea6
movq %r14, %rdi
callq 0x4140
incq %r12
jmp 0x4fe9
leaq 0xd135(%rip), %rsi      # 0x12179
leaq 0x8(%rsp), %rbx
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x4330
leaq 0xd128(%rip), %rsi      # 0x12183
movq %rbx, %rdi
callq 0x42c0
movq %rax, %rdi
callq 0x4160
leaq 0x18696(%rip), %rdi     # 0x1d708
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x55dc
leaq 0xd109(%rip), %rsi      # 0x1218e
leaq 0x8(%rsp), %rdi
callq 0x42c0
movq %rax, %rdi
callq 0x4160
leaq 0x8(%rsp), %rdi
callq 0x4460
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4460
jmp 0x50ce
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4140
movq %rbx, %rdi
callq 0x4500
// File: /workspace/github_cpp_makefile_star2_O2/ahupowerdns[P]spamidea/getsender.cc
// Function: MailTreeNode::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MailTreeNode* add(const std::string& name)
  {
    string rname = flattenDomain(name, {"sendgrid.net", "github.net", "outlook.com"});

    if(rname == d_name) {
      ++d_count;
      return this;
    }
    
    for(auto& mtn : d_children) {
      if(mtn->d_name == rname) {
        ++mtn->d_count;
        ++d_count;
        return mtn.get();
      }
    }
    d_children.emplace_back(std::make_unique<MailTreeNode>(rname));
    (*d_children.rbegin())->d_count = 1;
    ++d_count;
    return d_children.rbegin()->get();
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xcf49(%rip), %rsi      # 0x121ba
leaq 0x40(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x5822
leaq 0x60(%rsp), %r12
leaq 0xcf38(%rip), %rsi      # 0x121c7
leaq 0x6(%rsp), %rdx
movq %r12, %rdi
callq 0x5822
leaq 0x80(%rsp), %r12
leaq 0xcf27(%rip), %rsi      # 0x121d2
leaq 0x5(%rsp), %rdx
movq %r12, %rdi
callq 0x5822
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
pushq $0x3
popq %rdx
leaq 0x4(%rsp), %rcx
callq 0x59a8
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r15, %rsi
callq 0x478c
leaq 0x28(%rsp), %rdi
callq 0x59e2
pushq $0x40
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x40, %rdi
callq 0x4140
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x52ef
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x5a03
movq %rbx, %r14
testb %al, %al
jne 0x5386
leaq 0x28(%rbx), %r14
movq 0x28(%rbx), %r12
movq 0x30(%rbx), %r13
leaq 0x8(%rsp), %r15
cmpq %r13, %r12
je 0x5346
movq (%r12), %rdi
movq %r15, %rsi
callq 0x5a03
testb %al, %al
jne 0x537e
addq $0x8, %r12
jmp 0x532b
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5a67
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x5a2c
leaq 0x40(%rsp), %rdi
callq 0x595a
movq 0x30(%rbx), %rax
movq -0x8(%rax), %r14
movl $0x1, 0x20(%r14)
jmp 0x5386
movq (%r12), %r14
incl 0x20(%r14)
incl 0x20(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x4140
movq %r14, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x595a
jmp 0x53b9
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4140
jmp 0x540f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59e2
jmp 0x53d7
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x40, %rdi
callq 0x4140
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x53db
jmp 0x540f
jmp 0x53f6
movq %rax, %rbx
addq $-0x20, %r12
movq %r12, %rdi
callq 0x4140
cmpq %r14, %r12
jne 0x53f9
jmp 0x540f
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4500
// File: /workspace/github_cpp_makefile_star2_O2/NathanWine[P]2048-AI-Solvers/src/MonteCarlo.cpp
// Function: simulateOneRun(Game)
std::pair<int, int> simulateOneRun(Game game) {
    Game game_cpy = game;
    int first_move = -1;

    while(game_cpy.canContinue()) {
        board before_state = game_cpy.state;
        std::vector<int> move_bank = {UP, DOWN, LEFT, RIGHT};

        while (before_state == game_cpy.state) {
            int random_pos = DISTS[move_bank.size() - 1](rng);
            int chosen_move = move_bank[random_pos];

            switch(chosen_move) {
                case UP:
                    game_cpy.up(false);
                    break;
                case DOWN:
                    game_cpy.down(false);
                    break;
                case LEFT:
                    game_cpy.left(false);
                    break;
                case RIGHT:
                    game_cpy.right(false);
                    break;
            }
            if (first_move == -1) {
                first_move = chosen_move;
            }
            move_bank.erase(move_bank.begin() + random_pos);
        }
    }

    std::pair<int, int> ret(first_move, game_cpy.score);
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rsi
leaq 0x20(%rsp), %rdi
callq 0x29e8
pushq $-0x1
popq %r13
leaq 0x50(%rsp), %r15
leaq 0xbf89(%rip), %rbp      # 0xe560
leaq 0x5a52(%rip), %r14      # 0x8030
leaq 0x20(%rsp), %rdi
callq 0x56a2
testb %al, %al
je 0x26fc
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
callq 0x29fa
movaps 0x5a0c(%rip), %xmm0     # 0x8010
movaps %xmm0, 0x40(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
pushq $0x4
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x2a54
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
callq 0x2a8a
testb %al, %al
je 0x26e5
movq 0x10(%rsp), %rax
subq 0x8(%rsp), %rax
leaq 0xd2aa(%rip), %rcx      # 0xf8f0
leaq (%rcx,%rax,2), %rdi
addq $-0x8, %rdi
movq %rbp, %rsi
callq 0x2ab4
movslq %eax, %rbx
movq 0x8(%rsp), %rax
movl (%rax,%rbx,4), %r12d
cmpq $0x3, %r12
ja 0x26a7
movslq (%r14,%r12,4), %rax
addq %r14, %rax
jmpq *%rax
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x5944
jmp 0x26a7
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x59e0
jmp 0x26a7
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x5a08
jmp 0x26a7
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x59b8
cmpl $-0x1, %r13d
cmovel %r12d, %r13d
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
leaq (%rax,%rbx,4), %rsi
addq $0x4, %rsi
cmpq %rdx, %rsi
je 0x26d7
leaq (%rax,%rbx,4), %rdi
subq %rsi, %rdx
callq 0x2280
movq 0x10(%rsp), %rdx
addq $-0x4, %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2620
leaq 0x8(%rsp), %rdi
callq 0x2e28
movq %r15, %rdi
callq 0x2abc
jmp 0x25de
movl 0x20(%rsp), %ebx
leaq 0x28(%rsp), %rdi
callq 0x2abc
shlq $0x20, %rbx
movl %r13d, %eax
orq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2740
jmp 0x272a
movq %rax, %r14
jmp 0x274a
jmp 0x2733
jmp 0x2733
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2e28
leaq 0x50(%rsp), %rdi
callq 0x2abc
leaq 0x28(%rsp), %rdi
callq 0x2abc
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/NathanWine[P]2048-AI-Solvers/src/MonteCarlo.cpp
// Function: monteCarloSolve(int, int, int, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
int monteCarloSolve(int n, int runs, int display_level,
    std::vector<int> &scores, std::vector<int> &highest_tiles) {

    int successes = 0;
    for (int i = 0; i < n; ++i) {
        std::pair<int, int> result = monteCarloSimulateGame(runs, display_level, Game());
        if (result.first >= WIN) {
            successes++;
        }
        highest_tiles.push_back(result.first);
        scores.push_back(result.second);
    }
    return successes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movl %edi, %r13d
xorl %r14d, %r14d
testl %edi, %edi
cmovlel %r14d, %r13d
leaq 0x18(%rsp), %rbx
subl $0x1, %r13d
jb 0x29c1
movq %rbx, %rdi
callq 0x2ade
movl %r12d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x275c
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2abc
xorl %eax, %eax
cmpl $0x800, 0x8(%rsp)       # imm = 0x800
setge %al
addl %eax, %r14d
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2c1c
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x2c1c
jmp 0x2969
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2abc
movq %rbx, %rdi
callq 0x22c0