LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Residue.cpp
// Function: Residue::Residue(Residue const&)
Residue::Residue(const Residue &source) :
		type(source.type), seqNum(source.seqNum), insCode(source.insCode), atom(
		NULL), nAtoms(source.nAtoms), chainId(source.chainId), ntFlag(
				source.ntFlag), ctFlag(source.ctFlag), N(NULL), CA(NULL), O(
		NULL), CB(NULL) {

	assert(nAtoms > 0); /* pedantic check */

	strcpy(name, source.name);

	atom = new Atom[nAtoms];
	for (int i = 0; i < nAtoms; i++) {
		atom[i] = source.atom[i];
		atom[i].residue = this;
	}

	SetBBAtoms(); /* N, CA, C, O, CB are pointers - they need  to be reinitialized */

	memcpy(centroid, source.centroid, 3 * sizeof(double));

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
movb %al, (%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movb 0xc(%rsi), %al
movb %al, 0xc(%rdi)
movq $0x0, 0x10(%rdi)
movl 0x18(%rsi), %eax
movl %eax, 0x18(%rdi)
movb 0x1c(%rsi), %al
movb %al, 0x1c(%rdi)
leaq 0x38(%rdi), %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq 0xe50c
addq $-0x60, %r12
addq $0x60, %r15
cmpq $-0x120, %r12           # imm = 0xFEE0
jne 0x13db1
movb 0x158(%r14), %al
movb %al, 0x158(%rbx)
movb 0x159(%r14), %al
movb %al, 0x159(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x160(%rbx)
movups %xmm0, 0x178(%rbx)
cmpl $0x0, 0x18(%rbx)
jle 0x13eda
leaq 0x1(%rbx), %rdi
leaq 0x1(%r14), %rsi
callq 0x21f0
movslq 0x18(%rbx), %r13
movl $0x60, %ecx
movq %r13, %rax
mulq %rcx
seto %cl
orq $0x8, %rax
movq $-0x1, %rdi
testb %cl, %cl
cmoveq %rax, %rdi
movq %rdi, 0x10(%rsp)
callq 0x2030
movq %r13, (%rax)
movq %rax, 0x8(%rsp)
leaq 0x8(%rax), %r12
testl %r13d, %r13d
je 0x13e76
shlq $0x5, %r13
leaq (,%r13,2), %r15
addq %r13, %r15
negq %r15
xorl %ebp, %ebp
movq %r12, %r13
movq %r13, %rdi
callq 0xe50c
addq $-0x60, %rbp
addq $0x60, %r13
cmpq %rbp, %r15
jne 0x13e61
movq %r12, 0x10(%rbx)
cmpl $0x0, 0x18(%rbx)
jle 0x13eb2
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rsi
addq %r15, %rsi
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0xe69c
movq 0x10(%rbx), %rax
movq %rbx, 0x40(%rax,%r15)
incq %r12
movslq 0x18(%rbx), %rax
addq $0x60, %r15
cmpq %rax, %r12
jl 0x13e86
movq %rbx, %rdi
callq 0x13f74
movups 0x20(%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd0d3(%rip), %rdi      # 0x20fb4
leaq 0xd0d7(%rip), %rsi      # 0x20fbf
leaq 0xd0e0(%rip), %rcx      # 0x20fcf
movl $0x23, %edx
callq 0x2160
jmp 0x13efb
movq %rax, %r14
jmp 0x13f32
movq %rax, %r14
testq %rbp, %rbp
je 0x13f23
negq %rbp
movq 0x8(%rsp), %r15
addq $-0x58, %r15
leaq (%r15,%rbp), %rdi
callq 0xe69a
addq $-0x60, %rbp
jne 0x13f14
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x23d0
movl $0xf8, %r15d
leaq (%rbx,%r15), %rdi
callq 0xe69a
addq $-0x60, %r15
cmpq $-0x28, %r15
jne 0x13f38
jmp 0x13f6b
movq %rax, %r14
testq %r12, %r12
je 0x13f6b
negq %r12
addq $-0x28, %rbx
leaq (%rbx,%r12), %rdi
callq 0xe69a
addq $-0x60, %r12
jne 0x13f5c
movq %r14, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Residue.cpp
// Function: Residue::SetBBAtoms()
int Residue::SetBBAtoms() {

	bool flN = false, flCA = false, flC = false, flO = false, flCB = false;

	for (int i = 0; i < nAtoms; i++) {
		if (strcmp(atom[i].name, "N") == 0) {
			N = &(atom[i]);
			flN = true;
		} else if (strcmp(atom[i].name, "CA") == 0) {
			CA = &(atom[i]);
			flCA = true;
		} else if (strcmp(atom[i].name, "CB") == 0) {
			CB = &(atom[i]);
			flCB = true;
		} else if (strcmp(atom[i].name, "C") == 0) {
			C = &(atom[i]);
			flC = true;
		} else if (strcmp(atom[i].name, "O") == 0
				|| strcmp(atom[i].name, "OXT") == 0) {
			O = &(atom[i]);
			flO = true;
		} else if (strcmp(atom[i].name, "H1") == 0) {
			ntFlag = true;
		} else if (strcmp(atom[i].name, "H2") == 0) {
			ntFlag = true;
		} else if (strcmp(atom[i].name, "H3") == 0) {
			ntFlag = true;
		} else if (strcmp(atom[i].name, "OXT") == 0) {
			ctFlag = true;
		}
	}

	int n = flN + flCA + flC + flO + flCB;

	return n;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq 0x18(%rdi), %r12
testq %r12, %r12
jle 0x14103
movq %rdi, %rbx
movq 0x10(%rdi), %r15
xorl %r13d, %r13d
leaq 0x8ba8(%rip), %r14      # 0x1cb48
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
leaq 0x4(%r15), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x22f0
testl %eax, %eax
je 0x14084
movq %rbp, %rdi
leaq 0x868d(%rip), %rsi      # 0x1c66e
callq 0x22f0
testl %eax, %eax
je 0x14090
movq %rbp, %rdi
leaq 0x867d(%rip), %rsi      # 0x1c675
callq 0x22f0
testl %eax, %eax
je 0x1409f
movq %rbp, %rdi
leaq 0x102da(%rip), %rsi     # 0x242e9
callq 0x22f0
testl %eax, %eax
je 0x140bd
movq %rbp, %rdi
leaq 0x8b19(%rip), %rsi      # 0x1cb3f
callq 0x22f0
testl %eax, %eax
je 0x140ae
movq %rbp, %rdi
leaq 0x8b2b(%rip), %rsi      # 0x1cb64
callq 0x22f0
testl %eax, %eax
je 0x140ae
movq %rbp, %rdi
leaq 0x866d(%rip), %rsi      # 0x1c6b9
callq 0x22f0
testl %eax, %eax
je 0x1407b
movq %rbp, %rdi
leaq 0x89ed(%rip), %rsi      # 0x1ca4c
callq 0x22f0
testl %eax, %eax
je 0x1407b
movq %rbp, %rdi
leaq 0xd035(%rip), %rsi      # 0x210a7
callq 0x22f0
testl %eax, %eax
jne 0x140ca
movb $0x1, 0x158(%rbx)
jmp 0x140ca
movq %r15, 0x160(%rbx)
movb $0x1, %r13b
jmp 0x140ca
movq %r15, 0x168(%rbx)
movb $0x1, %al
movl %eax, 0x14(%rsp)
jmp 0x140ca
movq %r15, 0x180(%rbx)
movb $0x1, %al
movl %eax, 0x10(%rsp)
jmp 0x140ca
movq %r15, 0x178(%rbx)
movb $0x1, %al
movl %eax, 0xc(%rsp)
jmp 0x140ca
movq %r15, 0x170(%rbx)
movb $0x1, %al
movl %eax, 0x8(%rsp)
addq $0x60, %r15
decq %r12
jne 0x13fc0
andb $0x1, %r13b
movl 0x14(%rsp), %eax
andb $0x1, %al
movl 0x8(%rsp), %ecx
andb $0x1, %cl
addb %al, %cl
movl 0xc(%rsp), %edx
andb $0x1, %dl
movl 0x10(%rsp), %eax
andb $0x1, %al
addb %dl, %al
addb %cl, %al
addb %r13b, %al
movzbl %al, %eax
jmp 0x14105
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Residue.cpp
// Function: Residue::SetCentroid()
void Residue::SetCentroid() {

	centroid[0] = centroid[1] = centroid[2] = 0.0;

	if (type == 7 /* GLY */) {
		centroid[0] = CA->x;
		centroid[1] = CA->y;
		centroid[2] = CA->z;
	} else /* other residues */{
		for (int j = 0; j < nAtoms; j++) {
			centroid[0] += atom[j].x;
			centroid[1] += atom[j].y;
			centroid[2] += atom[j].z;
		}
		centroid[0] /= nAtoms;
		centroid[1] /= nAtoms;
		centroid[2] /= nAtoms;
	}

}

// Assembly:
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rdi)
movq $0x0, 0x30(%rdi)
cmpb $0x7, (%rdi)
jne 0x143e4
movq 0x168(%rdi), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd 0x18(%rax), %xmm0
movsd %xmm0, 0x28(%rdi)
movsd 0x20(%rax), %xmm0
jmp 0x14463
movslq 0x18(%rdi), %rax
testq %rax, %rax
jle 0x14437
movsd 0x30(%rdi), %xmm0
movsd 0x28(%rdi), %xmm1
movsd 0x20(%rdi), %xmm2
movq 0x10(%rdi), %rcx
movq %rax, %rdx
shlq $0x5, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
addsd 0x10(%rcx,%rsi), %xmm2
movsd %xmm2, 0x20(%rdi)
addsd 0x18(%rcx,%rsi), %xmm1
movsd %xmm1, 0x28(%rdi)
addsd 0x20(%rcx,%rsi), %xmm0
movsd %xmm0, 0x30(%rdi)
addq $0x60, %rsi
cmpq %rsi, %rdx
jne 0x1440d
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x20(%rdi), %xmm0
movsd 0x28(%rdi), %xmm2
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rdi)
divsd %xmm1, %xmm2
movsd %xmm2, 0x28(%rdi)
movsd 0x30(%rdi), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Residue.cpp
// Function: Residue::operator=(Residue const&)
Residue & Residue::operator =(const Residue & source) {

	assert(this != &source); /* an attempt to assign Residue to itself */

	type = source.type;
	strcpy(name, source.name);
	seqNum = source.seqNum;
	insCode = source.insCode;
	nAtoms = source.nAtoms;
	chainId = source.chainId;

	delete[] atom;

	atom = new Atom[nAtoms];
	for (int i = 0; i < nAtoms; i++) {
		atom[i] = source.atom[i];
		atom[i].residue = this;
	}

	SetBBAtoms();

	memcpy(centroid, source.centroid, 3 * sizeof(double));

	return *this;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq %rsi, %rdi
je 0x14c36
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
movb %al, (%rdi)
incq %rdi
incq %rsi
callq 0x21f0
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movb 0xc(%r14), %al
movb %al, 0xc(%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x18(%rbx)
movb 0x1c(%r14), %al
movb %al, 0x1c(%rbx)
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x14b65
leaq -0x8(%r12), %r15
movq -0x8(%r12), %r13
testq %r13, %r13
je 0x14b4e
addq $-0x60, %r12
movq %r13, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %rbp
leaq (%r12,%rbp), %rdi
callq 0xe69a
addq $-0x60, %rbp
jne 0x14b3f
shlq $0x5, %r13
leaq 0x8(,%r13,2), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0x23d0
movslq 0x18(%rbx), %r13
movl $0x60, %ecx
movq %r13, %rax
mulq %rcx
seto %cl
orq $0x8, %rax
movq $-0x1, %rdi
testb %cl, %cl
cmoveq %rax, %rdi
movq %rdi, 0x10(%rsp)
callq 0x2030
leaq 0x8(%rax), %r12
movq %rax, 0x8(%rsp)
movq %r13, (%rax)
testq %r13, %r13
je 0x14bcf
shlq $0x5, %r13
leaq (,%r13,2), %r15
addq %r13, %r15
negq %r15
xorl %ebp, %ebp
movq %r12, %r13
movq %r13, %rdi
callq 0xe50c
addq $-0x60, %rbp
addq $0x60, %r13
cmpq %rbp, %r15
jne 0x14bba
movq %r12, 0x10(%rbx)
cmpl $0x0, 0x18(%rbx)
jle 0x14c0b
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rsi
addq %r15, %rsi
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0xe69c
movq 0x10(%rbx), %rax
movq %rbx, 0x40(%rax,%r15)
incq %r12
movslq 0x18(%rbx), %rax
addq $0x60, %r15
cmpq %rax, %r12
jl 0x14bdf
movq %rbx, %rdi
callq 0x13f74
movups 0x20(%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8237(%rip), %rdi      # 0x1ce74
leaq 0xc37b(%rip), %rsi      # 0x20fbf
leaq 0xc42f(%rip), %rcx      # 0x2107a
movl $0x9f, %edx
callq 0x2160
movq %rax, %rbx
testq %rbp, %rbp
je 0x14c78
negq %rbp
movq 0x8(%rsp), %r14
addq $-0x58, %r14
leaq (%r14,%rbp), %rdi
callq 0xe69a
addq $-0x60, %rbp
jne 0x14c69
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x23d0
movq %rbx, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::Complex(Complex const&)
Complex::Complex(const Complex & C) :
		contacts(C.contacts), intRec(NULL), intLig(NULL), intRecN(C.intRecN), intLigN(
				C.intLigN), Receptor(C.Receptor), Ligand(C.Ligand) {

	AllocateComplex();

	/* copy interface residues */
	memcpy(intRec, C.intRec, Receptor.nRes * sizeof(bool));
	memcpy(intLig, C.intLig, Ligand.nRes * sizeof(bool));

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1635c
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
movl 0x2c(%r14), %eax
movl %eax, 0x2c(%rbx)
leaq 0x30(%rbx), %r15
leaq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0xf4a0
movl $0xa0, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0xf4a0
movslq 0x78(%rbx), %r15
movq %r15, %rdi
callq 0x22d0
movq %rax, %r12
movq %rax, 0x18(%rbx)
movslq 0xe8(%rbx), %r13
movq %r13, %rdi
callq 0x22d0
movq %rax, %rbp
movq %rax, 0x20(%rbx)
movq 0x18(%r14), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x21c0
movq 0x20(%r14), %rsi
movq %rbp, %rdi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
movq %rax, %r14
movq %r15, %rdi
callq 0xf676
jmp 0x15445
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x15459
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2230
movq %r14, %rdi
callq 0x2390
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::operator=(Complex const&)
Complex & Complex::operator =(const Complex & C) {

	assert(this != &C); /* error: an attempt to assign Complex to itself */

	FreeComplex();

	/* copy proteins */
	Receptor = C.Receptor;
	Ligand = C.Ligand;

	AllocateComplex();

	/* copy interface residues and contacts */
	contacts = C.contacts;
	memcpy(intRec, C.intRec, Receptor.nRes * sizeof(bool));
	memcpy(intLig, C.intLig, Ligand.nRes * sizeof(bool));
	intRecN = C.intRecN;
	intLigN = C.intLigN;

	return *this;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rsi, %rdi
je 0x15691
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x2270
movq 0x20(%rbx), %rdi
callq 0x2270
leaq 0x30(%r14), %rsi
leaq 0x30(%rbx), %rdi
callq 0xf75e
movl $0xa0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0xf75e
movslq 0x78(%rbx), %rdi
callq 0x22d0
movq %rax, 0x18(%rbx)
movslq 0xe8(%rbx), %rdi
callq 0x22d0
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x163d2
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
movslq 0x78(%rbx), %rdx
callq 0x21c0
movq 0x20(%rbx), %rdi
movq 0x20(%r14), %rsi
movslq 0xe8(%rbx), %rdx
callq 0x21c0
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
movl 0x2c(%r14), %eax
movl %eax, 0x2c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xec48(%rip), %rdi      # 0x242e0
leaq 0xec4c(%rip), %rsi      # 0x242eb
leaq 0xec55(%rip), %rcx      # 0x242fb
movl $0x3b, %edx
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::ArrangeContatcs()
void Complex::ArrangeContatcs() {

	std::sort(contacts.begin(), contacts.end());
	std::vector<std::pair<int, int> >::iterator it;
	it = std::unique(contacts.begin(), contacts.end());
	contacts.resize(it - contacts.begin());

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x158d9
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1668d
movq %r14, %rdi
movq %r15, %rsi
callq 0x16740
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x16b18
subq (%rbx), %rax
sarq $0x3, %rax
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x164e6
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::SetInterface2(double)
void Complex::SetInterface2(double d) {

	/* search for interface residues */
	kdres *res;
	double pos[3];
	for (int i = 0; i < Ligand.nRes; i++) {

		Atom *A = Ligand.residue[i].CA;

		if (A == NULL) {
			continue;
		}

		/* check whether the current atom is within the bounding box
		 * of the Receptor */
		kdtree *kdCA = Receptor.kdCA;
		if (A->x < kdCA->rect->min[0] - d || A->y < kdCA->rect->min[1] - d
				|| A->z < kdCA->rect->min[2] - d
				|| A->x > kdCA->rect->max[0] + d
				|| A->y > kdCA->rect->max[1] + d
				|| A->z > kdCA->rect->max[2] + d) {

			continue;

		}

		/* find neighbors of A in the Receptor */
		res = kd_nearest_range3f(kdCA, A->x, A->y, A->z, d);
		while (!kd_res_end(res)) {
			//int idx = (Residue*) kd_res_item(res, pos) - Receptor.residues;
			Atom *A = (Atom*) kd_res_item(res, pos);
			int idx = A->residue - Receptor.residue;
			intRec[idx] = true;
			intLig[i] = true;
			contacts.push_back(std::make_pair(idx, i));
			kd_res_next(res);
		}
		kd_res_free(res);

	}

	ArrangeContatcs();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpl $0x0, 0xe8(%rdi)
jle 0x15a97
cvtsd2ss %xmm0, %xmm3
xorl %r13d, %r13d
leaq 0x20(%rsp), %r15
movabsq $0x7d6343eb1a1f58d1, %rbp # imm = 0x7D6343EB1A1F58D1
movq 0xe0(%rbx), %rax
imulq $0x188, %r13, %rcx      # imm = 0x188
movq 0x168(%rax,%rcx), %rcx
testq %rcx, %rcx
je 0x15a84
movq 0x88(%rbx), %rdi
movsd 0x10(%rcx), %xmm4
movq 0x10(%rdi), %rax
movq 0x8(%rax), %rdx
movsd (%rdx), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
ja 0x15a84
movsd 0x18(%rcx), %xmm1
movsd 0x8(%rdx), %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
ja 0x15a84
movsd 0x20(%rcx), %xmm2
movsd 0x10(%rdx), %xmm5
subsd %xmm0, %xmm5
ucomisd %xmm2, %xmm5
ja 0x15a84
movq 0x10(%rax), %rax
movsd (%rax), %xmm5
addsd %xmm0, %xmm5
ucomisd %xmm5, %xmm4
ja 0x15a84
movsd 0x8(%rax), %xmm5
addsd %xmm0, %xmm5
ucomisd %xmm5, %xmm1
ja 0x15a84
movsd 0x10(%rax), %xmm5
addsd %xmm0, %xmm5
ucomisd %xmm5, %xmm2
ja 0x15a84
movsd %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsd2ss %xmm4, %xmm0
cvtsd2ss %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm2
movss %xmm3, 0xc(%rsp)
callq 0x181ac
movq %rax, %r12
movq %rax, %rdi
callq 0x181e8
testl %eax, %eax
jne 0x15a70
movq %r13, %r14
shlq $0x20, %r14
movq %r12, %rdi
movq %r15, %rsi
callq 0x18208
movq 0x40(%rax), %rax
subq 0x70(%rbx), %rax
sarq $0x3, %rax
imulq %rbp, %rax
movq 0x18(%rbx), %rcx
cltq
movb $0x1, %dl
movb %dl, (%rcx,%rax)
movq 0x20(%rbx), %rcx
movb %dl, (%rcx,%r13)
movl %eax, %eax
orq %r14, %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0x16534
movq %r12, %rdi
callq 0x181f3
movq %r12, %rdi
callq 0x181e8
testl %eax, %eax
je 0x15a17
movq %r12, %rdi
callq 0x17c0b
movsd 0x10(%rsp), %xmm0
movss 0xc(%rsp), %xmm3
incq %r13
movslq 0xe8(%rbx), %rax
cmpq %rax, %r13
jl 0x15930
movq %rbx, %rdi
callq 0x15898
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::SetInterface4(double)
void Complex::SetInterface4(double d) {

	/* search for interface residues */
	double pos[3];
	kdtree *kd = Receptor.kdCent;
	double *min = kd->rect->min;
	double *max = kd->rect->max;
	for (int i = 0; i < Ligand.nRes; i++) {

		double *xyz = Ligand.residue[i].centroid;

		/* check whether the current atom is within the bounding box
		 * of the Receptor */
		if (xyz[0] < min[0] - d || xyz[1] < min[1] - d || xyz[2] < min[2] - d
				|| xyz[0] > max[0] + d || xyz[1] > max[1] + d
				|| xyz[2] > max[2] + d) {

			continue;

		}

		/* find neighbors of A in the Receptor */
		kdres *res = kd_nearest_range(kd, xyz, d);
		while (!kd_res_end(res)) {
			//int idxRec = (Residue*) kd_res_item(res, pos) - Receptor.residues;
			Atom *A = (Atom*) kd_res_item(res, pos);
			int idxRec = A->residue - Receptor.residue;
			intRec[idxRec] = true;
			intLig[i] = true;
			contacts.push_back(std::make_pair(idxRec, i));
			kd_res_next(res);
		}
		kd_res_free(res);

	}

	ArrangeContatcs();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpl $0x0, 0xe8(%rdi)
jle 0x15f13
movq 0x90(%rbx), %rdi
movq 0x10(%rdi), %rax
movq 0x8(%rax), %rbp
movq 0x10(%rax), %rdx
xorl %r15d, %r15d
leaq 0x20(%rsp), %r14
movq 0xe0(%rbx), %rax
imulq $0x188, %r15, %rcx      # imm = 0x188
movsd 0x20(%rax,%rcx), %xmm4
movsd (%rbp), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
ja 0x15f00
leaq (%rax,%rcx), %rsi
addq $0x20, %rsi
movsd 0x8(%rsi), %xmm1
movsd 0x8(%rbp), %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
ja 0x15f00
movsd 0x10(%rsi), %xmm2
movsd 0x10(%rbp), %xmm3
subsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x15f00
movsd (%rdx), %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm3, %xmm4
ja 0x15f00
movsd 0x8(%rdx), %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm3, %xmm1
ja 0x15f00
movsd 0x10(%rdx), %xmm1
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
ja 0x15f00
movq %rdx, (%rsp)
movq %rdi, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x17ef5
movq %rax, %r13
movq %rax, %rdi
callq 0x181e8
testl %eax, %eax
jne 0x15ee9
movq %r15, %r12
shlq $0x20, %r12
movq %r13, %rdi
movq %r14, %rsi
callq 0x18208
movq 0x40(%rax), %rax
subq 0x70(%rbx), %rax
sarq $0x3, %rax
movabsq $0x7d6343eb1a1f58d1, %rcx # imm = 0x7D6343EB1A1F58D1
imulq %rcx, %rax
movq 0x18(%rbx), %rcx
cltq
movb $0x1, %dl
movb %dl, (%rcx,%rax)
movq 0x20(%rbx), %rcx
movb %dl, (%rcx,%r15)
movl %eax, %eax
orq %r12, %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0x16534
movq %r13, %rdi
callq 0x181f3
movq %r13, %rdi
callq 0x181e8
testl %eax, %eax
je 0x15e86
movq %r13, %rdi
callq 0x17c0b
movsd 0x10(%rsp), %xmm0
movq 0x8(%rsp), %rdi
movq (%rsp), %rdx
incq %r15
movslq 0xe8(%rbx), %rax
cmpq %rax, %r15
jl 0x15dc5
movq %rbx, %rdi
callq 0x15898
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::CountIntRes()
void Complex::CountIntRes() {

	intRecN = 0;
	for (int i = 0; i < Receptor.nRes; i++) {
		if (intRec[i]) {
			intRecN++;
		}
	}

	intLigN = 0;
	for (int i = 0; i < Ligand.nRes; i++) {
		if (intLig[i]) {
			intLigN++;
		}
	}

}

// Assembly:
movl $0x0, 0x28(%rdi)
movslq 0x78(%rdi), %rax
testq %rax, %rax
jle 0x16250
movl 0x28(%rdi), %ecx
movq 0x18(%rdi), %rdx
xorl %esi, %esi
cmpb $0x1, (%rdx,%rsi)
jne 0x16248
incl %ecx
movl %ecx, 0x28(%rdi)
incq %rsi
cmpq %rsi, %rax
jne 0x1623d
movl $0x0, 0x2c(%rdi)
movslq 0xe8(%rdi), %rax
testq %rax, %rax
jle 0x1627f
movl 0x2c(%rdi), %ecx
movq 0x20(%rdi), %rdx
xorl %esi, %esi
cmpb $0x1, (%rdx,%rsi)
jne 0x16277
incl %ecx
movl %ecx, 0x2c(%rdi)
incq %rsi
cmpq %rsi, %rax
jne 0x1626c
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/Complex.cpp
// Function: Complex::SetInterface(double, int)
void Complex::SetInterface(double dist, int mode) {

	contacts.clear();
	memset(intRec, 0, Receptor.nRes * sizeof(bool));
	memset(intLig, 0, Ligand.nRes * sizeof(bool));

	if (mode == 1) {
		SetInterface1(dist);
	} else if (mode == 2) {
		SetInterface2(dist);
	} else if (mode == 3) {
		SetInterface3(dist);
	} else if (mode == 4) {
		SetInterface4(dist);
	} else if (mode == 5) {
		SetInterface5(dist);
	} else {
		assert(0); /* error: wrong mode for interface extraction */
	}

	CountIntRes();

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movsd %xmm0, (%rsp)
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x1629c
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rdi
movslq 0x78(%rbx), %rdx
xorl %esi, %esi
callq 0x2150
movq 0x20(%rbx), %rdi
movslq 0xe8(%rbx), %rdx
xorl %esi, %esi
callq 0x2150
decl %r14d
cmpl $0x4, %r14d
ja 0x1632e
leaq 0xadf3(%rip), %rax      # 0x210c0
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x156b0
jmp 0x1631f
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x15f2a
jmp 0x1631f
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x15aae
jmp 0x1631f
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x15d8c
jmp 0x1631f
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x158fc
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x16224
leaq 0xac88(%rip), %rdi      # 0x20fbd
leaq 0xdfaf(%rip), %rsi      # 0x242eb
leaq 0xdfe5(%rip), %rcx      # 0x24328
movl $0x1a0, %edx            # imm = 0x1A0
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_clear
void kd_clear(struct kdtree *tree)
{
	clear_rec(tree->root, tree->destr);
	tree->root = 0;

	if (tree->rect) {
		hyperrect_free(tree->rect);
		tree->rect = 0;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x18(%rbx), %rsi
callq 0x17756
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x17754
callq 0x1779e
movq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: clear_rec(kdnode*, void (*)(void*))
static void clear_rec(struct kdnode *node, void (*destr)(void*))
{
	if(!node) return;

	clear_rec(node->left, destr);
	clear_rec(node->right, destr);
	
	if(destr) {
		destr(node->data);
	}
	free(node->pos);
	free(node);
}

// Assembly:
testq %rdi, %rdi
je 0x1779d
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x17756
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x17756
testq %r14, %r14
je 0x17786
movq 0x10(%rbx), %rdi
callq *%r14
movq (%rbx), %rdi
callq 0x2270
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2270
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_insert
int kd_insert(struct kdtree *tree, const double *pos, void *data)
{
	if (insert_rec(&tree->root, pos, data, 0, tree->dim)) {
		return -1;
	}

	if (tree->rect == 0) {
		tree->rect = hyperrect_create(tree->dim, pos, pos);
	} else {
		hyperrect_extend(tree->rect, pos);
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movl (%r14), %r8d
xorl %ecx, %ecx
callq 0x1784c
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x17844
movq 0x10(%r14), %rdx
testq %rdx, %rdx
je 0x17830
movslq (%rdx), %rax
testq %rax, %rax
jle 0x17842
movq 0x8(%rdx), %rcx
movq 0x10(%rdx), %rdx
xorl %esi, %esi
movsd (%rbx,%rsi,8), %xmm0
movsd (%rcx,%rsi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x17815
movsd %xmm0, (%rcx,%rsi,8)
movsd (%rbx,%rsi,8), %xmm0
ucomisd (%rdx,%rsi,8), %xmm0
jbe 0x17826
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x17800
jmp 0x17842
movl (%r14), %edi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x17912
movq %rax, 0x10(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: insert_rec(kdnode**, double const*, void*, int, int)
static int insert_rec(struct kdnode **nptr, const double *pos, void *data, int dir, int dim)
{
	int new_dir;
	struct kdnode *node;

	if(!*nptr) {
		if(!(node = (kdnode*)malloc(sizeof *node))) {	// (kdnode*) added
			return -1;
		}
		if(!(node->pos = (double*)malloc(dim * sizeof *node->pos))) {	// (double*) added
			free(node);
			return -1;
		}
		memcpy(node->pos, pos, dim * sizeof *node->pos);
		node->data = data;
		node->dir = dir;
		node->left = node->right = 0;
		*nptr = node;
		return 0;
	}

	node = *nptr;
	new_dir = (node->dir + 1) % dim;
	if(pos[node->dir] < node->pos[node->dir]) {
		return insert_rec(&(*nptr)->left, pos, data, new_dir, dim);
	}
	return insert_rec(&(*nptr)->right, pos, data, new_dir, dim);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %ebp
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %r12
movq (%r12), %rcx
testq %rcx, %rcx
je 0x1789e
movslq 0x8(%rcx), %rsi
leal 0x1(%rsi), %eax
cltd
idivl %r15d
movl %edx, %ebp
movq (%rcx), %rax
movsd (%rax,%rsi,8), %xmm0
ucomisd (%r14,%rsi,8), %xmm0
jbe 0x17895
addq $0x18, %rcx
movq %rcx, %r12
jmp 0x17866
addq $0x20, %rcx
movq %rcx, %r12
jmp 0x17866
movl $0x28, %edi
callq 0x22d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x17901
movq %rax, %r13
movslq %r15d, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x22d0
movq %rax, (%r13)
testq %rax, %rax
je 0x178f9
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21c0
movq (%rsp), %rax
movq %rax, 0x10(%r13)
movl %ebp, 0x8(%r13)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%r13)
movq %r13, (%r12)
xorl %ebx, %ebx
jmp 0x17901
movq %r13, %rdi
callq 0x2270
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: hyperrect_create(int, double const*, double const*)
static struct kdhyperrect* hyperrect_create(int dim, const double *min, const double *max)
{
	size_t size = dim * sizeof(double);
	struct kdhyperrect* rect = 0;

	if (!(rect = (kdhyperrect*)malloc(sizeof(struct kdhyperrect)))) {	// (kdhyperrect*) added
		return 0;
	}

	rect->dim = dim;
	if (!(rect->min = (double*)malloc(size))) {	// (double*) added
		free(rect);
		return 0;
	}
	if (!(rect->max = (double*)malloc(size))) {	// (double*) added
		free(rect->min);
		free(rect);
		return 0;
	}
	memcpy(rect->min, min, size);
	memcpy(rect->max, max, size);

	return rect;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
movl $0x18, %edi
callq 0x22d0
testq %rax, %rax
je 0x1799a
movq %rax, %rbx
movslq %ebp, %rax
leaq (,%rax,8), %r12
movl %eax, (%rbx)
movq %r12, %rdi
callq 0x22d0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x17992
movq %rax, %r13
movq %r12, %rdi
callq 0x22d0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1798a
movq %rax, %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21c0
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21c0
jmp 0x1799c
movq %r13, %rdi
callq 0x2270
movq %rbx, %rdi
callq 0x2270
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_insertf
int kd_insertf(struct kdtree *tree, const float *pos, void *data)
{
	static double sbuf[16];
	double *bptr, *buf = 0;
	int res, dim = tree->dim;

	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 -1;
			}
	} else {
		bptr = buf = sbuf;
	}

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

	res = kd_insert(tree, buf, data);
#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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq (%rdi), %r13
cmpq $0x11, %r13
jl 0x179f2
leaq (,%r13,8), %rdi
cmpl $0x100, %r13d           # imm = 0x100
jg 0x179fb
movq %rsp, %r12
addq $0xf, %rdi
andq $-0x10, %rdi
subq %rdi, %r12
movq %r12, %rsp
jmp 0x17a08
leaq 0x159d7(%rip), %r12     # 0x2d3d0
jmp 0x17a08
callq 0x22d0
movq %rax, %r12
testq %rax, %rax
je 0x17a61
testl %r13d, %r13d
jle 0x17a2e
incl %r13d
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtss2sd (%r15,%rax), %xmm0
movsd %xmm0, (%r12,%rax,2)
decl %r13d
addq $0x4, %rax
cmpl $0x1, %r13d
jg 0x17a12
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x177c2
movl %eax, %r14d
cmpl $0x101, (%rbx)          # imm = 0x101
jl 0x17a4f
movq %r12, %rdi
callq 0x2270
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x17a4f
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_insert3
int kd_insert3(struct kdtree *tree, double x, double y, double z, void *data)
{
	double buf[3];
	buf[0] = x;
	buf[1] = y;
	buf[2] = z;
	return kd_insert(tree, buf, data);
}

// Assembly:
subq $0x18, %rsp
movq %rsi, %rdx
movq %rsp, %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movsd %xmm2, 0x10(%rsi)
callq 0x177c2
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_insert3f
int kd_insert3f(struct kdtree *tree, float x, float y, float z, void *data)
{
	double buf[3];
	buf[0] = x;
	buf[1] = y;
	buf[2] = z;
	return kd_insert(tree, buf, data);
}

// Assembly:
subq $0x18, %rsp
movq %rsi, %rdx
cvtss2sd %xmm0, %xmm0
movq %rsp, %rsi
movsd %xmm0, (%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsi)
callq 0x177c2
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gjoni[P]iPot/src/kdtree.cpp
// Function: kd_nearest
struct kdres *kd_nearest(struct kdtree *kd, const double *pos)
{
	struct kdhyperrect *rect;
	struct kdnode *result;
	struct kdres *rset;
	double dist_sq;
	int i;

	if (!kd) return 0;
	if (!kd->rect) return 0;

	/* Allocate result set */
	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;

	/* Duplicate the bounding hyperrectangle, we will work on the copy */
	if (!(rect = hyperrect_duplicate(kd->rect))) {
		kd_res_free(rset);
		return 0;
	}

	/* Our first guesstimate is the root node */
	result = kd->root;
	dist_sq = 0;
	for (i = 0; i < kd->dim; i++)
		dist_sq += SQ(result->pos[i] - pos[i]);

	/* Search for the nearest neighbour recursively */
	kd_nearest_i(kd->root, pos, &result, &dist_sq, rect);

	/* Free the copy of the hyperrect */
	hyperrect_free(rect);

	/* Store the result */
	if (result) {
		if (rlist_insert(rset->rlist, result, -1.0) == -1) {
			kd_res_free(rset);
			return 0;
		}
		rset->size = 1;
		kd_res_rewind(rset);
		return rset;
	} else {
		kd_res_free(rset);
		return 0;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x17bf8
movq %rdi, %r13
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x17bf8
movq %rsi, %r15
movl $0x20, %edi
callq 0x22d0
testq %rax, %rax
je 0x17bf8
movq %rax, %rbx
movl $0x18, %edi
callq 0x22d0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x17bf0
movq %rax, %r14
movq $0x0, 0x10(%rax)
movq %r13, (%rbx)
movl (%r12), %edi
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
callq 0x17912
testq %rax, %rax
je 0x17be6
movq %rax, %r12
movq 0x8(%r13), %rdi
movq %rdi, 0x8(%rsp)
movq $0x0, (%rsp)
movslq (%r13), %rax
testq %rax, %rax
jle 0x17b86
movsd (%rsp), %xmm0
movq (%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
subsd (%r15,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
incq %rdx
cmpq %rdx, %rax
jne 0x17b66
leaq 0x8(%rsp), %r13
movq %rsp, %rcx
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %r8
callq 0x17c50
movq %r12, %rdi
callq 0x1779e
movq (%r13), %r15
testq %r15, %r15
je 0x17be6
movl $0x18, %edi
callq 0x22d0
testq %rax, %rax
je 0x17be6
movq %r15, (%rax)
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, 0x8(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x10(%r14)
movl $0x1, 0x18(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x17bfa
movq %rbx, %rdi
callq 0x17c0b
jmp 0x17bf8
movq %rbx, %rdi
callq 0x2270
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movslq (%rdi), %r12
cmpq $0x11, %r12
jl 0x17e36
leaq (,%r12,8), %rdi
cmpl $0x100, %r12d           # imm = 0x100
jg 0x17e3f
movq %rsp, %r15
addq $0xf, %rdi
andq $-0x10, %rdi
subq %rdi, %r15
movq %r15, %rsp
jmp 0x17e4c
leaq 0x15613(%rip), %r15     # 0x2d450
jmp 0x17e4c
callq 0x22d0
movq %rax, %r15
testq %rax, %rax
je 0x17ea0
testl %r12d, %r12d
jle 0x17e72
incl %r12d
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtss2sd (%r14,%rax), %xmm0
movsd %xmm0, (%r15,%rax,2)
decl %r12d
addq $0x4, %rax
cmpl $0x1, %r12d
jg 0x17e56
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17abf
movq %rax, %r14
cmpl $0x101, (%rbx)          # imm = 0x101
jl 0x17e90
movq %r15, %rdi
callq 0x2270
movq %r14, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x17e90
// File: /workspace/github_cpp_makefile_star2_O1/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 0x17abf
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
cvtss2sd %xmm0, %xmm0
movq %rsp, %rsi
movsd %xmm0, (%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsi)
callq 0x17abf
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x20, %edi
callq 0x22d0
testq %rax, %rax
je 0x17f78
movq %rax, %rbx
movl $0x18, %edi
callq 0x22d0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x17f66
movq %rax, %r15
movq $0x0, 0x10(%rax)
movq %r12, (%rbx)
movq 0x8(%r12), %rdi
movl (%r12), %ecx
movq %r14, %rsi
movsd (%rsp), %xmm0
movq %rax, %rdx
callq 0x17f89
cmpl $-0x1, %eax
je 0x17f70
movl %eax, 0x18(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
jmp 0x17f7a
movq %rbx, %rdi
callq 0x2270
jmp 0x17f78
movq %rbx, %rdi
callq 0x17c0b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0x17fd2
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testl %ecx, %ecx
jle 0x17fd9
movq (%r12), %rax
movl %ebx, %ecx
xorpd %xmm2, %xmm2
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm1
subsd (%r15,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm2
incq %rdx
cmpq %rdx, %rcx
jne 0x17fb5
jmp 0x17fdd
xorl %ebp, %ebp
jmp 0x180bc
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
xorl %ebp, %ebp
ucomisd %xmm2, %xmm1
movsd %xmm0, 0x8(%rsp)
jb 0x1802e
movl $0x18, %edi
callq 0x22d0
testq %rax, %rax
je 0x180b7
movq %r12, (%rax)
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, 0x8(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x10(%r14)
movl $0x1, %ebp
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 0x17f89
testl %eax, %eax
js 0x180ae
movapd 0xe94d(%rip), %xmm0     # 0x269c0
movapd 0x10(%rsp), %xmm2
andpd %xmm2, %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x180ae
movapd %xmm1, %xmm0
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
ucomisd %xmm2, %xmm1
setae %cl
addl %eax, %ebp
movq 0x18(%r12,%rcx,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x17f89
cmpl $-0x1, %eax
je 0x180b7
addl %eax, %ebp
jmp 0x180bc
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movslq (%rdi), %r12
cmpq $0x11, %r12
jl 0x1810d
leaq (,%r12,8), %rdi
cmpl $0x100, %r12d           # imm = 0x100
jg 0x18116
movq %rsp, %r15
addq $0xf, %rdi
andq $-0x10, %rdi
subq %rdi, %r15
movq %r15, %rsp
jmp 0x1812d
leaq 0x153bc(%rip), %r15     # 0x2d4d0
jmp 0x1812d
movss %xmm0, -0x24(%rbp)
callq 0x22d0
movss -0x24(%rbp), %xmm0
movq %rax, %r15
testq %rax, %rax
je 0x18185
testl %r12d, %r12d
jle 0x18153
incl %r12d
xorl %eax, %eax
xorps %xmm1, %xmm1
cvtss2sd (%r14,%rax), %xmm1
movsd %xmm1, (%r15,%rax,2)
decl %r12d
addq $0x4, %rax
cmpl $0x1, %r12d
jg 0x18137
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17ef5
movq %rax, %r14
cmpl $0x101, (%rbx)          # imm = 0x101
jl 0x18175
movq %r15, %rdi
callq 0x2270
movq %r14, %rax
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x18175
// File: /workspace/github_cpp_makefile_star2_O1/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 0x17ef5
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
cvtss2sd %xmm0, %xmm0
movq %rsp, %rsi
movsd %xmm0, (%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsi)
xorps %xmm0, %xmm0
cvtss2sd %xmm3, %xmm0
callq 0x17ef5
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18242
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x18235
movq (%rax), %rax
movq (%rax), %rax
movq (%rbx), %rcx
movslq (%rcx), %rdx
shlq $0x3, %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x21c0
movq 0x10(%rbx), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18283
testq %rsi, %rsi
je 0x1827b
movq (%rdi), %rcx
movslq (%rcx), %rcx
testq %rcx, %rcx
jle 0x1827b
movq (%rax), %rdx
movq (%rdx), %rdx
xorl %edi, %edi
xorps %xmm0, %xmm0
cvtsd2ss (%rdx,%rdi,8), %xmm0
movss %xmm0, (%rsi,%rdi,4)
incq %rdi
cmpq %rdi, %rcx
jne 0x18266
movq (%rax), %rax
movq 0x10(%rax), %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x182e7
movsd (%rsi), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x1829f
jnp 0x182ad
movq (%rax), %rdi
movq (%rdi), %rdi
movsd (%rdi), %xmm1
movsd %xmm1, (%rsi)
movsd (%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x182b9
jnp 0x182c8
movq (%rax), %rsi
movq (%rsi), %rsi
movsd 0x8(%rsi), %xmm0
movsd %xmm0, (%rdx)
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x182d8
jnp 0x182e7
movq (%rax), %rax
movq (%rax), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1834f
movss (%rsi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x18301
jnp 0x18312
movq (%rax), %rdi
movq (%rdi), %rdi
xorps %xmm1, %xmm1
cvtsd2ss (%rdi), %xmm1
movss %xmm1, (%rsi)
movss (%rdx), %xmm1
ucomiss %xmm0, %xmm1
jne 0x1831d
jnp 0x1832f
movq (%rax), %rsi
movq (%rsi), %rsi
xorps %xmm0, %xmm0
cvtsd2ss 0x8(%rsi), %xmm0
movss %xmm0, (%rdx)
movss (%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x1833d
jnp 0x1834f
movq (%rax), %rax
movq (%rax), %rax
xorps %xmm0, %xmm0
cvtsd2ss 0x10(%rax), %xmm0
movss %xmm0, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2510(%rip), %xmm3     # 0x60e8
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 0x3160
movzbl (%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movq 0x8(%rbx), %rdi
movzbl (%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x24cb(%rip), %xmm2     # 0x60f0
movaps %xmm2, %xmm3
callq 0x3100
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3490
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3320
movq (%rbx), %rdi
callq 0x32b0
movq 0x10(%rbx), %rdi
callq 0x34b0
leaq 0x68(%rbx), %rdi
callq 0x45fe
addq $0x38, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x464e
movq %rax, %rdi
callq 0x3c3b