LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/AACE.cpp
// Function: AACE::GetTypes(Chain const&)
std::vector<int> AACE::GetTypes(const Chain &C) {

	int n = 0;

	std::map<std::string, int>::iterator it;
	std::vector<int> types(C.nAtoms);

	for (int i = 0; i < C.nRes; i++) {

		std::string rname(C.residue[i].name);

		for (int j = 0; j < C.residue[i].nAtoms; j++) {

			/* ACE atom type */
			std::string name = rname + "_"
					+ std::string(C.residue[i].atom[j].name);

			it = ATOM_IDX.find(name);
			if (it != ATOM_IDX.end()) {
				types[n] = it->second;
			} else {
				types[n] = -1;
			}
			n++;
		}
	}

	return types;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movslq 0x38(%rdx), %rsi
leaq 0x68(%rsp), %rdx
movq %rdi, 0x10(%rsp)
callq 0x11832
movq %rbx, 0x38(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x30(%rsp)
xorl %ecx, %ecx
leaq 0x48(%rsp), %rdx
leaq 0xa8(%rsp), %rbp
leaq 0x88(%rsp), %rbx
xorl %r15d, %r15d
movq %r14, 0x20(%rsp)
movslq 0x48(%r14), %rax
cmpq %rax, %rcx
jge 0x11060
movq 0x40(%r14), %rax
movq %rcx, 0x28(%rsp)
imulq $0x188, %rcx, %rcx      # imm = 0x188
movq %rcx, 0x40(%rsp)
leaq (%rax,%rcx), %rsi
incq %rsi
leaq 0x68(%rsp), %rdi
callq 0xdbd4
movslq %r15d, %r15
movq %r15, 0x18(%rsp)
pushq $0x4
popq %r13
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x40(%rsp), %r14
movslq 0x18(%rax,%r14), %rax
cmpq %rax, %r12
jge 0x1103a
movq %rbp, %rdi
leaq 0x68(%rsp), %rsi
leaq 0x9f2a(%rip), %rdx      # 0x1aeca
callq 0x118ea
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax,%r14), %rsi
addq %r13, %rsi
movq %rbx, %rdi
leaq 0xf(%rsp), %rdx
callq 0xdbd4
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x11883
movq %rbx, %r15
movq %rbx, %rdi
callq 0x2100
movq %rbp, %rbx
movq %rbp, %rdi
callq 0x2100
movq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x11fdc
pushq $-0x1
popq %rcx
cmpq 0x30(%rsp), %rax
je 0x11006
movl 0x40(%rax), %ecx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rdx
movl %ecx, (%rax,%rdx,4)
incq %rdx
movq %rdx, 0x18(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x2100
incq %r12
addq $0x60, %r13
movq %rbx, %rbp
movq %r15, %rbx
jmp 0x10f75
leaq 0x68(%rsp), %rdi
callq 0x2100
movq 0x28(%rsp), %rcx
incq %rcx
leaq 0x48(%rsp), %rdx
movq 0x20(%rsp), %r14
movq 0x18(%rsp), %r15
jmp 0x10f33
movq 0x10(%rsp), %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x110b7
movq %rax, %r14
leaq 0x48(%rsp), %rdi
jmp 0x110a8
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x2100
jmp 0x110a0
movq %rax, %r14
jmp 0x110ad
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0x2100
leaq 0x68(%rsp), %rdi
callq 0x2100
movq 0x10(%rsp), %rdi
callq 0xfd86
movq %r14, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/AACE.cpp
// Function: AACE::GetEnergy(Chain const&, std::vector<int, std::allocator<int>> const&)
double AACE::GetEnergy(const Chain &C, const std::vector<int> &t) {

	double E = 0.0;

	for (int i = 0; i < C.nAtoms; i++) {

		if (t[i] < 0) {
			continue;
		}

		Atom *A = C.atom[i];

		kdres *res = kd_nearest_range3f(C.kd, A->x, A->y, A->z, dmax);
		double pos[3];

		while (!kd_res_end(res)) {

			int j = ((Atom**) kd_res_item(res, pos)) - C.atom;
			if (t[j] >= 0 && i > j
			/* && C.atom[i]->residue != C.atom[j]->residue */) {
				E += J[t[i]][t[j]];
			}
			kd_res_next(res);
		}
		kd_res_free(res);
	}

	return E;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
movslq 0x38(%r14), %rax
cmpq %rax, %rbp
jge 0x1119e
movq (%rbx), %rax
cmpl $0x0, (%rax,%rbp,4)
js 0x11196
movq 0x30(%r14), %rax
movq (%rax,%rbp,8), %rax
cvtsd2ss 0x10(%rax), %xmm0
cvtsd2ss 0x18(%rax), %xmm1
cvtsd2ss 0x20(%rax), %xmm2
movq 0x50(%r14), %rdi
cvtsd2ss 0x70(%r15), %xmm3
callq 0x16d86
movq %rax, %r13
movq %r13, %rdi
callq 0x16db1
testl %eax, %eax
jne 0x1118e
movq %r13, %rdi
movq %r12, %rsi
callq 0x16dd1
subq 0x30(%r14), %rax
shrq $0x3, %rax
movslq %eax, %rdx
movq (%rbx), %rcx
movslq (%rcx,%rdx,4), %rax
testq %rax, %rax
js 0x11184
cmpq %rdx, %rbp
jle 0x11184
movq 0x68(%r15), %rdx
movslq (%rcx,%rbp,4), %rcx
movq (%rdx,%rcx,8), %rcx
movsd 0x8(%rsp), %xmm0
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r13, %rdi
callq 0x16dbc
jmp 0x11134
movq %r13, %rdi
callq 0x167ec
incq %rbp
jmp 0x110f1
movsd 0x8(%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/AACE.cpp
// Function: AACE::GetEnergy(Complex const&, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
double AACE::GetEnergy(const Complex &C, const std::vector<int> &tRec,
		const std::vector<int> &tLig) {

	double E = 0;

	for (int i = 0; i < C.Receptor.nAtoms; i++) {

		if (tRec[i] < 0) {
			continue;
		}

		Atom *A = C.Receptor.atom[i];

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

			continue;

		}

		kdres *res = kd_nearest_range3f(kd, A->x, A->y, A->z, dmax);
		double pos[3];

		while (!kd_res_end(res)) {

			int j = ((Atom**) kd_res_item(res, pos)) - C.Ligand.atom;
			if (tLig[j] >= 0) {
				E += J[tRec[i]][tLig[j]];
			}
			kd_res_next(res);
		}
		kd_res_free(res);
	}

	return E;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorpd %xmm0, %xmm0
xorl %r13d, %r13d
movslq 0x68(%r15), %rax
cmpq %rax, %r13
jge 0x11386
movq (%r14), %rax
cmpl $0x0, (%rax,%r13,4)
js 0x1137e
movq 0x60(%r15), %rax
movq 0xf0(%r15), %rdi
movq (%rax,%r13,8), %rcx
movsd 0x10(%rcx), %xmm5
movq 0x10(%rdi), %rax
movq 0x8(%rax), %rdx
movsd (%rdx), %xmm1
movsd 0x70(%r12), %xmm3
subsd %xmm3, %xmm1
ucomisd %xmm5, %xmm1
ja 0x1137e
movsd 0x18(%rcx), %xmm1
movsd 0x8(%rdx), %xmm2
subsd %xmm3, %xmm2
ucomisd %xmm1, %xmm2
ja 0x1137e
movsd 0x20(%rcx), %xmm2
movsd 0x10(%rdx), %xmm4
subsd %xmm3, %xmm4
ucomisd %xmm2, %xmm4
ja 0x1137e
movq 0x10(%rax), %rax
movsd (%rax), %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm5
ja 0x1137e
movsd 0x8(%rax), %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm1
ja 0x1137e
movsd 0x10(%rax), %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm2
ja 0x1137e
movsd %xmm0, 0x8(%rsp)
cvtsd2ss %xmm5, %xmm0
cvtsd2ss %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm2
cvtsd2ss %xmm3, %xmm3
callq 0x16d86
movq %rax, %rbp
movq %rbp, %rdi
callq 0x16db1
testl %eax, %eax
jne 0x11370
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x16dd1
subq 0xd0(%r15), %rax
shrq $0x3, %rax
cltq
movq (%rbx), %rcx
movslq (%rcx,%rax,4), %rax
testq %rax, %rax
js 0x11366
movq 0x68(%r12), %rcx
movq (%r14), %rdx
movslq (%rdx,%r13,4), %rdx
movq (%rcx,%rdx,8), %rcx
movsd 0x8(%rsp), %xmm0
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
callq 0x16dbc
jmp 0x11313
movq %rbp, %rdi
callq 0x167ec
movsd 0x8(%rsp), %xmm0
incq %r13
jmp 0x11239
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/RRCE.cpp
// Function: RRCE::RRCE(RRCE::RRCE_TYPE, double, int)
RRCE::RRCE(RRCE_TYPE type, double d, int k) :
		h(NULL), J(NULL), dmax(d) {

	char *DATADIR = getenv("TMDOCKDAT");
	if (DATADIR == NULL) {
		printf("Error: environment variable 'TMDOCKDAT' not set\n");
		exit(1);
	}

	const int STRMAX = 1000;
	char tname[STRMAX], rrce_name[STRMAX];

	switch (type) {

	case RRCE20RC:
		sprintf(tname, "%s/RRCE20RC/table.%.1fA_k%d", DATADIR, dmax, k);
		sprintf(rrce_name, "RRCE20RC_%.1fA_k%d", dmax, k);
		break;

	case RRCE20SCC:
		sprintf(tname, "%s/RRCE20SCC/table.%.1fA_k%d", DATADIR, dmax, k);
		sprintf(rrce_name, "RRCE20SCC_%.1fA_k%d", dmax, k);
		break;

	case RRCE20CB:
		sprintf(tname, "%s/RRCE20CB/table.%.1fA_k%d", DATADIR, dmax, k);
		sprintf(rrce_name, "RRCE20CB_%.1fA_k%d", dmax, k);
		break;

	default:
		printf("Error: wrong RRCE type (%d)\n", type);
		exit(1);
		break;

	}

	Allocate(20);

	ReadCouplings(tname);

	name = rrce_name;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7e8, %rsp            # imm = 0x7E8
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
xorps %xmm1, %xmm1
movups %xmm1, (%rdi)
movsd %xmm0, 0x8(%rsp)
movsd %xmm0, 0x10(%rdi)
leaq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
leaq 0x87a2(%rip), %rdi      # 0x1ad40
callq 0x2280
testq %rax, %rax
je 0x12644
leal -0x1(%r14), %ecx
cmpl $0x3, %ecx
jae 0x12652
leaq 0x18(%rbx), %r14
movl %ecx, %ecx
leaq 0xaf7a(%rip), %rdx      # 0x1d540
movslq (%rdx,%rcx,4), %rsi
addq %rdx, %rsi
leaq 0xaf78(%rip), %rdx      # 0x1d54c
movslq (%rdx,%rcx,4), %r15
addq %rdx, %r15
leaq 0x400(%rsp), %r12
movq %r12, %rdi
movq %rax, %rdx
movsd 0x8(%rsp), %xmm0
movl %ebp, %ecx
movb $0x1, %al
callq 0x2080
movsd 0x10(%rbx), %xmm0
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %edx
movb $0x1, %al
callq 0x2080
pushq $0x14
popq %rsi
movq %rbx, %rdi
callq 0x1267e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x126dc
movq %r14, %rdi
movq %r13, %rsi
callq 0x23d0
addq $0x7e8, %rsp            # imm = 0x7E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x889f(%rip), %rdi      # 0x1aeea
callq 0x2330
jmp 0x12663
leaq 0xaf8e(%rip), %rdi      # 0x1d5e7
movl %r14d, %esi
xorl %eax, %eax
callq 0x2050
pushq $0x1
popq %rdi
callq 0x2270
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/RRCE.cpp
// Function: RRCE::RRCE(RRCE const&)
RRCE::RRCE(const RRCE &source) :
		h(NULL), J(NULL), dmax(source.dmax), name(source.name) {

	const int N = 20;

	Allocate(N);

	memcpy(h, source.h, N * sizeof(double));
	for (int i = 0; i < N; i++) {
		memcpy(J[i], source.J[i], N * sizeof(double));
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rdi)
addq $0x18, %rdi
addq $0x18, %rsi
callq 0x22e0
pushq $0x14
popq %rsi
movq %r14, %rdi
callq 0x1267e
movq (%r14), %rdi
movq (%rbx), %rsi
movl $0xa0, %edx
callq 0x21b0
xorl %r15d, %r15d
cmpq $0x14, %r15
je 0x12829
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movl $0xa0, %edx
callq 0x21b0
incq %r15
jmp 0x12804
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/RRCE.cpp
// Function: RRCE::operator=(RRCE const&)
RRCE & RRCE::operator =(const RRCE & source) {

	assert(this != &source);

	const int N = 20;

	Free(N);

	dmax = source.dmax;
	name = source.name;

	Allocate(N);

	memcpy(h, source.h, N * sizeof(double));
	for (int i = 0; i < N; i++) {
		memcpy(J[i], source.J[i], N * sizeof(double));
	}

	return *this;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq %rsi, %rdi
je 0x12a2e
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x14
popq %rbp
movl %ebp, %esi
callq 0x12966
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%rbx)
leaq 0x18(%r14), %rsi
leaq 0x18(%rbx), %rdi
callq 0x2140
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1267e
movq (%rbx), %rdi
movq (%r14), %rsi
movl $0xa0, %edx
callq 0x21b0
xorl %r15d, %r15d
cmpq $0x14, %r15
je 0x12a20
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rsi
movl $0xa0, %edx
callq 0x21b0
incq %r15
jmp 0x129fb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x843f(%rip), %rdi      # 0x1ae74
leaq 0xabd7(%rip), %rsi      # 0x1d613
leaq 0xabdd(%rip), %rcx      # 0x1d620
movl $0x87, %edx
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O2/gjoni[P]iPot/src/RRCE.cpp
// Function: RRCE::GetEnergy(Chain const&)
double RRCE::GetEnergy(const Chain &C) {

	double E = 0.0;

	for (int i = 0; i < C.nRes; i++) {

		char ti = C.residue[i].type;
		if (ti < 0 || ti > 19) {
			continue;
		}

		Residue *R = &(C.residue[i]);

		kdres *res = kd_nearest_range3f(C.kdCent, R->centroid[0],
				R->centroid[1], R->centroid[2], dmax);
		double pos[3];

		while (!kd_res_end(res)) {

			Atom *Aj = (Atom*) kd_res_item(res, pos);
			int j = Aj->residue - C.residue;
			char tj = Aj->residue->type;
			if (tj >= 0 && tj < 20 && i < j) {
				E += J[(int) ti][(int) tj];
			}
			kd_res_next(res);
		}
		kd_res_free(res);
	}

	return E;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
movslq 0x48(%rbx), %rax
cmpq %rax, %r13
jge 0x12b8d
movq 0x40(%rbx), %rax
imulq $0x188, %r13, %rcx      # imm = 0x188
movsbq (%rax,%rcx), %rbp
cmpq $0x13, %rbp
ja 0x12b85
addq %rcx, %rax
cvtsd2ss 0x20(%rax), %xmm0
cvtsd2ss 0x28(%rax), %xmm1
cvtsd2ss 0x30(%rax), %xmm2
movq 0x60(%rbx), %rdi
cvtsd2ss 0x10(%r14), %xmm3
callq 0x16d86
movq %rax, %r12
movq %r12, %rdi
callq 0x16db1
testl %eax, %eax
jne 0x12b7d
movq %r12, %rdi
movq %r15, %rsi
callq 0x16dd1
movq 0x40(%rax), %rax
movsbq (%rax), %rcx
cmpq $0x13, %rcx
ja 0x12b73
subq 0x40(%rbx), %rax
cqto
movl $0x188, %esi            # imm = 0x188
idivq %rsi
cltq
cmpq %rax, %r13
jge 0x12b73
movq 0x8(%r14), %rax
movq (%rax,%rbp,8), %rax
movsd 0x8(%rsp), %xmm0
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x16dbc
jmp 0x12b20
movq %r12, %rdi
callq 0x167ec
incq %r13
jmp 0x12ad5
movsd 0x8(%rsp), %xmm0
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/RRCE.cpp
// Function: RRCE::GetEnergy(Complex const&)
double RRCE::GetEnergy(const Complex &C) {

	double E = 0;

	for (int i = 0; i < C.Receptor.nRes; i++) {

		char ti = C.Receptor.residue[i].type;
		if (ti < 0 || ti > 19) {
			continue;
		}

		Residue *R = &(C.Receptor.residue[i]);
		double *ci = R->centroid;

		/* check whether the current atom is within the bounding box
		 * of the Receptor */
		kdtree *kd = C.Ligand.kdCent;
		if (ci[0] < kd->rect->min[0] - dmax || ci[1] < kd->rect->min[1] - dmax
				|| ci[2] < kd->rect->min[2] - dmax
				|| ci[0] > kd->rect->max[0] + dmax
				|| ci[1] > kd->rect->max[1] + dmax
				|| ci[2] > kd->rect->max[2] + dmax) {

			continue;

		}

		kdres *res = kd_nearest_range3f(kd, ci[0], ci[1], ci[2], dmax);
		double pos[3];

		while (!kd_res_end(res)) {

			Atom *Aj = (Atom*) kd_res_item(res, pos);
			char tj = Aj->residue->type;

			if (tj >= 0 && tj < 20) {
				E += J[(int) ti][(int) tj];
			}
			kd_res_next(res);
		}
		kd_res_free(res);
	}

	return E;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
movslq 0x78(%rbx), %rax
cmpq %rax, %r13
jge 0x12cfb
movq 0x70(%rbx), %rax
imulq $0x188, %r13, %rcx      # imm = 0x188
movsbq (%rax,%rcx), %rbp
cmpq $0x13, %rbp
ja 0x12cf3
addq %rcx, %rax
movq 0x100(%rbx), %rdi
movsd 0x20(%rax), %xmm5
movq 0x10(%rdi), %rcx
movq 0x8(%rcx), %rdx
movsd (%rdx), %xmm1
movsd 0x10(%r14), %xmm3
subsd %xmm3, %xmm1
ucomisd %xmm5, %xmm1
ja 0x12cf3
movsd 0x28(%rax), %xmm1
movsd 0x8(%rdx), %xmm2
subsd %xmm3, %xmm2
ucomisd %xmm1, %xmm2
ja 0x12cf3
movsd 0x30(%rax), %xmm2
movsd 0x10(%rdx), %xmm4
subsd %xmm3, %xmm4
ucomisd %xmm2, %xmm4
ja 0x12cf3
movq 0x10(%rcx), %rax
movsd (%rax), %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm5
ja 0x12cf3
movsd 0x8(%rax), %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm1
ja 0x12cf3
movsd 0x10(%rax), %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm2
ja 0x12cf3
movsd %xmm0, 0x8(%rsp)
cvtsd2ss %xmm5, %xmm0
cvtsd2ss %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm2
cvtsd2ss %xmm3, %xmm3
callq 0x16d86
movq %rax, %r12
movq %r12, %rdi
callq 0x16db1
testl %eax, %eax
jne 0x12ce5
movq %r12, %rdi
movq %r15, %rsi
callq 0x16dd1
movq 0x40(%rax), %rax
movzbl (%rax), %eax
cmpq $0x13, %rax
ja 0x12cdb
movq 0x8(%r14), %rcx
movq (%rcx,%rbp,8), %rcx
movsd 0x8(%rsp), %xmm0
addsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x16dbc
jmp 0x12c9e
movq %r12, %rdi
callq 0x167ec
movsd 0x8(%rsp), %xmm0
incq %r13
jmp 0x12bc2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $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 0xdcb4
addq $-0x60, %r12
addq $0x60, %r15
cmpq $-0x120, %r12           # imm = 0xFEE0
jne 0x12de0
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 0x12ef0
leaq 0x1(%rbx), %rdi
leaq 0x1(%r14), %rsi
callq 0x21e0
movslq 0x18(%rbx), %rbp
pushq $0x60
popq %rcx
movq %rbp, %rax
mulq %rcx
seto %cl
orq $0x8, %rax
pushq $-0x1
popq %rdi
testb %cl, %cl
cmoveq %rax, %rdi
movq %rdi, 0x10(%rsp)
callq 0x2030
movq %rbp, (%rax)
movq %rax, 0x8(%rsp)
leaq 0x8(%rax), %r13
testl %ebp, %ebp
je 0x12e91
imulq $-0x60, %rbp, %r15
xorl %r12d, %r12d
movq %r13, %rbp
movq %rbp, %rdi
callq 0xdcb4
addq $-0x60, %r12
addq $0x60, %rbp
cmpq %r12, %r15
jne 0x12e7c
movq %r13, 0x10(%rbx)
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0x18(%rbx), %rax
cmpq %rax, %r12
jge 0x12ec8
movq 0x10(%r14), %rsi
addq %r15, %rsi
addq %r15, %r13
movq %r13, %rdi
callq 0xddf4
movq 0x10(%rbx), %r13
movq %rbx, 0x40(%r13,%r15)
incq %r12
addq $0x60, %r15
jmp 0x12e9b
movq %rbx, %rdi
callq 0x12f88
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 0xc0bd(%rip), %rdi      # 0x1efb4
leaq 0xc0c1(%rip), %rsi      # 0x1efbf
leaq 0xc0ca(%rip), %rcx      # 0x1efcf
pushq $0x23
popq %rdx
callq 0x2160
jmp 0x12f43
movq %rax, %r14
testq %r12, %r12
je 0x12f32
negq %r12
movq 0x8(%rsp), %r15
addq $-0x58, %r15
leaq (%r15,%r12), %rdi
callq 0xddf2
addq $-0x60, %r12
jne 0x12f23
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x23f0
jmp 0x12f46
movq %rax, %r14
movl $0xf8, %r15d
leaq (%rbx,%r15), %rdi
callq 0xddf2
addq $-0x60, %r15
cmpq $-0x28, %r15
jne 0x12f4c
jmp 0x12f7f
movq %rax, %r14
testq %r12, %r12
je 0x12f7f
negq %r12
addq $-0x28, %rbx
leaq (%rbx,%r12), %rdi
callq 0xddf2
addq $-0x60, %r12
jne 0x12f70
movq %r14, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rdi, %rbx
movl 0x18(%rdi), %ebp
movq 0x10(%rdi), %r14
xorl %eax, %eax
testl %ebp, %ebp
movl $0x0, 0xc(%rsp)
cmovlel %eax, %ebp
addq $0x4, %r14
movl $0x0, 0x10(%rsp)
xorl %r13d, %r13d
movl $0x0, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
subq $0x1, %rbp
jb 0x130cb
leaq -0x4(%r14), %r12
movzbl (%r14), %r15d
cmpl $0x43, %r15d
je 0x13014
cmpl $0x4f, %r15d
je 0x1300b
cmpl $0x4e, %r15d
jne 0x1303f
cmpb $0x0, 0x1(%r14)
jne 0x1303f
movq %r12, 0x160(%rbx)
movb $0x1, %al
movl %eax, 0x14(%rsp)
jmp 0x13095
cmpb $0x0, 0x1(%r14)
jne 0x1303f
jmp 0x1308b
cmpb $0x41, 0x1(%r14)
jne 0x13026
cmpb $0x0, 0x2(%r14)
je 0x130ad
cmpb $0x42, 0x1(%r14)
jne 0x13038
cmpb $0x0, 0x2(%r14)
je 0x130bc
cmpb $0x0, 0x1(%r14)
je 0x1309e
movq %r14, %rdi
leaq 0x7b1b(%rip), %rsi      # 0x1ab64
callq 0x2300
testl %eax, %eax
je 0x1308b
cmpb $0x48, %r15b
jne 0x13095
cmpb $0x31, 0x1(%r14)
jne 0x13066
cmpb $0x0, 0x2(%r14)
je 0x13082
cmpb $0x32, 0x1(%r14)
jne 0x13074
cmpb $0x0, 0x2(%r14)
je 0x13082
cmpb $0x33, 0x1(%r14)
jne 0x13095
cmpb $0x0, 0x2(%r14)
jne 0x13095
movb $0x1, 0x158(%rbx)
jmp 0x13095
movq %r12, 0x178(%rbx)
movb $0x1, %r13b
addq $0x60, %r14
jmp 0x12fce
movq %r12, 0x170(%rbx)
movb $0x1, %al
movl %eax, 0x10(%rsp)
jmp 0x13095
movq %r12, 0x168(%rbx)
movb $0x1, %al
movl %eax, 0xc(%rsp)
jmp 0x13095
movq %r12, 0x180(%rbx)
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x13095
movl 0x14(%rsp), %edx
andb $0x1, %dl
movl 0xc(%rsp), %eax
andb $0x1, %al
movl 0x10(%rsp), %ecx
andb $0x1, %cl
addb %al, %cl
andb $0x1, %r13b
movl 0x8(%rsp), %eax
andb $0x1, %al
addb %r13b, %al
addb %cl, %al
addb %dl, %al
movzbl %al, %eax
addq $0x18, %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/Residue.cpp
// Function: Residue::SetType(char const*)
char Residue::SetType(const char* name) {

	for (int i = 0; i < 24; i++) {
		if (strcmp(name, AAA3[i]) == 0) {
			return i;
		}
	}
	return 23;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
leaq 0xbc2b(%rip), %r15      # 0x1ef50
xorl %ebx, %ebx
cmpq $0x18, %rbx
je 0x13345
movq %r14, %rdi
movq %r15, %rsi
callq 0x2300
testl %eax, %eax
je 0x13347
incq %rbx
addq $0x4, %r15
jmp 0x13327
movb $0x17, %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
andq $0x0, 0x30(%rdi)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rdi)
cmpb $0x7, (%rdi)
jne 0x13385
movq 0x168(%rdi), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x20(%rdi)
movsd 0x18(%rax), %xmm0
movsd %xmm0, 0x28(%rdi)
movsd 0x20(%rax), %xmm1
jmp 0x133f6
leaq 0x20(%rdi), %rax
movl 0x18(%rdi), %ecx
movq 0x10(%rdi), %rdx
xorl %esi, %esi
testl %ecx, %ecx
movl $0x0, %r8d
cmovgl %ecx, %r8d
imulq $0x60, %r8, %r8
xorpd %xmm1, %xmm1
cmpq %rsi, %r8
je 0x133e2
movsd 0x10(%rdx,%rsi), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, 0x20(%rdi)
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd 0x18(%rdx,%rsi), %xmm0
movsd %xmm0, 0x28(%rdi)
addsd 0x20(%rdx,%rsi), %xmm1
movsd %xmm1, 0x30(%rdi)
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
addq $0x60, %rsi
movapd %xmm2, %xmm0
jmp 0x133a6
cvtsi2sd %ecx, %xmm2
divsd %xmm2, %xmm1
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm0
movupd %xmm0, (%rax)
movsd %xmm1, 0x30(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x13a25
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
movb %al, (%rdi)
incq %rdi
incq %rsi
callq 0x21e0
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), %cl
movb %cl, 0x1c(%rbx)
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x1396e
leaq -0x8(%r12), %r15
movq -0x8(%r12), %r13
testq %r13, %r13
je 0x1395b
addq $-0x60, %r12
imulq $0x60, %r13, %rbp
leaq (%r12,%rbp), %rdi
callq 0xddf2
addq $-0x60, %rbp
jne 0x1394c
imulq $0x60, %r13, %rsi
orq $0x8, %rsi
movq %r15, %rdi
callq 0x23f0
movl 0x18(%rbx), %eax
movslq %eax, %rbp
pushq $0x60
popq %rcx
movq %rbp, %rax
mulq %rcx
seto %cl
orq $0x8, %rax
pushq $-0x1
popq %rdi
testb %cl, %cl
cmoveq %rax, %rdi
movq %rdi, 0x10(%rsp)
callq 0x2030
movq %rbp, (%rax)
movq %rax, 0x8(%rsp)
leaq 0x8(%rax), %r12
testl %ebp, %ebp
je 0x139c3
imulq $-0x60, %rbp, %r15
xorl %r13d, %r13d
movq %r12, %rbp
movq %rbp, %rdi
callq 0xdcb4
addq $-0x60, %r13
addq $0x60, %rbp
cmpq %r13, %r15
jne 0x139ae
movq %r12, 0x10(%rbx)
xorl %r15d, %r15d
xorl %r13d, %r13d
movslq 0x18(%rbx), %rax
cmpq %rax, %r13
jge 0x139fa
movq 0x10(%r14), %rsi
addq %r15, %rsi
addq %r15, %r12
movq %r12, %rdi
callq 0xddf4
movq 0x10(%rbx), %r12
movq %rbx, 0x40(%r12,%r15)
incq %r13
addq $0x60, %r15
jmp 0x139cd
movq %rbx, %rdi
callq 0x12f88
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 0x7448(%rip), %rdi      # 0x1ae74
leaq 0xb58c(%rip), %rsi      # 0x1efbf
leaq 0xb640(%rip), %rcx      # 0x1f07a
movl $0x9f, %edx
callq 0x2160
movq %rax, %rbx
testq %r13, %r13
je 0x13a67
negq %r13
movq 0x8(%rsp), %r14
addq $-0x58, %r14
leaq (%r14,%r13), %rdi
callq 0xddf2
addq $-0x60, %r13
jne 0x13a58
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x23f0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x14fa2
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
leaq 0x30(%rbx), %r15
leaq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0xea4a
movl $0xa0, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0xea4a
movq %rbx, %rdi
callq 0x1425e
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
movslq 0x78(%rbx), %rdx
callq 0x21b0
movq 0x20(%rbx), %rdi
movq 0x20(%r14), %rsi
movslq 0xe8(%rbx), %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x21b0
movq %rax, %r14
movq %r15, %rdi
callq 0xec14
jmp 0x1424e
movq %rax, %r14
movq %rbx, %rdi
callq 0x150e4
movq %r14, %rdi
callq 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x14403
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1436e
leaq 0x30(%r14), %rsi
leaq 0x30(%rbx), %rdi
callq 0xecee
movl $0xa0, %edi
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0xecee
movq %rbx, %rdi
callq 0x1425e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x14ff2
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
movslq 0x78(%rbx), %rdx
callq 0x21b0
movq 0x20(%rbx), %rdi
movq 0x20(%r14), %rsi
movslq 0xe8(%rbx), %rdx
callq 0x21b0
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xdec6(%rip), %rdi      # 0x222d0
leaq 0xdeca(%rip), %rsi      # 0x222db
leaq 0xded3(%rip), %rcx      # 0x222eb
pushq $0x3b
popq %rdx
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
callq 0x1533b
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x158cf
subq (%rbx), %rax
sarq $0x3, %rax
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x150b2
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
cvtsd2ss %xmm0, %xmm3
xorl %r13d, %r13d
movb $0x1, %bpl
leaq 0x18(%rsp), %r15
movslq 0xe8(%rbx), %rax
cmpq %rax, %r13
jge 0x1478c
movq 0xe0(%rbx), %rax
imulq $0x188, %r13, %rcx      # imm = 0x188
movq 0x168(%rax,%rcx), %rcx
testq %rcx, %rcx
je 0x14784
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 0x14784
movsd 0x18(%rcx), %xmm1
movsd 0x8(%rdx), %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
ja 0x14784
movsd 0x20(%rcx), %xmm2
movsd 0x10(%rdx), %xmm5
subsd %xmm0, %xmm5
ucomisd %xmm2, %xmm5
ja 0x14784
movq 0x10(%rax), %rax
movsd (%rax), %xmm5
addsd %xmm0, %xmm5
ucomisd %xmm5, %xmm4
ja 0x14784
movsd 0x8(%rax), %xmm5
addsd %xmm0, %xmm5
ucomisd %xmm5, %xmm1
ja 0x14784
movsd 0x10(%rax), %xmm5
addsd %xmm0, %xmm5
ucomisd %xmm5, %xmm2
ja 0x14784
movsd %xmm0, 0x10(%rsp)
cvtsd2ss %xmm4, %xmm0
cvtsd2ss %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm2
movss %xmm3, 0xc(%rsp)
callq 0x16d86
movq %rax, %r12
movq %r13, %r14
shlq $0x20, %r14
movq %r12, %rdi
callq 0x16db1
testl %eax, %eax
jne 0x14770
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
callq 0x16dd1
movq 0x40(%rax), %rax
subq 0x70(%rbx), %rax
cqto
movl $0x188, %ecx            # imm = 0x188
idivq %rcx
movq 0x18(%rbx), %rcx
cltq
movb %bpl, (%rcx,%rax)
movq 0x20(%rbx), %rcx
movb %bpl, (%rcx,%r13)
movl %eax, %eax
orq %r14, %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x151fa
movq %r12, %rdi
callq 0x16dbc
jmp 0x14714
movq %r12, %rdi
callq 0x167ec
movsd 0x10(%rsp), %xmm0
movss 0xc(%rsp), %xmm3
incq %r13
jmp 0x1462c
movq %rbx, %rdi
callq 0x145dc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movq 0x90(%rdi), %rdi
movq 0x10(%rdi), %rax
movq 0x8(%rax), %rbp
movq 0x10(%rax), %rdx
xorl %r14d, %r14d
movb $0x1, %r15b
movslq 0xe8(%rbx), %rax
cmpq %rax, %r14
jge 0x14ba8
movq 0xe0(%rbx), %rax
imulq $0x188, %r14, %rcx      # imm = 0x188
movsd 0x20(%rax,%rcx), %xmm4
movsd (%rbp), %xmm1
subsd %xmm0, %xmm1
ucomisd %xmm4, %xmm1
ja 0x14ba0
leaq (%rax,%rcx), %rsi
addq $0x20, %rsi
movsd 0x8(%rsi), %xmm1
movsd 0x8(%rbp), %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
ja 0x14ba0
movsd 0x10(%rsi), %xmm2
movsd 0x10(%rbp), %xmm3
subsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
ja 0x14ba0
movsd (%rdx), %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm3, %xmm4
ja 0x14ba0
movsd 0x8(%rdx), %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm3, %xmm1
ja 0x14ba0
movsd 0x10(%rdx), %xmm1
addsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
ja 0x14ba0
movq %rdx, (%rsp)
movq %rdi, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x16af2
movq %rax, %r13
movq %r14, %r12
shlq $0x20, %r12
movq %r13, %rdi
callq 0x16db1
testl %eax, %eax
jne 0x14b89
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
callq 0x16dd1
movq 0x40(%rax), %rax
subq 0x70(%rbx), %rax
cqto
movl $0x188, %ecx            # imm = 0x188
idivq %rcx
movq 0x18(%rbx), %rcx
cltq
movb %r15b, (%rcx,%rax)
movq 0x20(%rbx), %rcx
movb %r15b, (%rcx,%r14)
movl %eax, %eax
orq %r12, %rax
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0x151fa
movq %r13, %rdi
callq 0x16dbc
jmp 0x14b2b
movq %r13, %rdi
callq 0x167ec
movsd 0x10(%rsp), %xmm0
movq 0x8(%rsp), %rdi
movq (%rsp), %rdx
incq %r14
jmp 0x14a66
movq %rbx, %rdi
callq 0x145dc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
andl $0x0, 0x28(%rdi)
movl 0x78(%rdi), %eax
movq 0x18(%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
xorl %esi, %esi
cmpq %rdx, %rax
je 0x14e99
cmpb $0x1, (%rcx,%rdx)
jne 0x14e94
incl %esi
movl %esi, 0x28(%rdi)
incq %rdx
jmp 0x14e84
andl $0x0, 0x2c(%rdi)
movl 0xe8(%rdi), %eax
movq 0x20(%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
xorl %esi, %esi
cmpq %rdx, %rax
je 0x14ec5
cmpb $0x1, (%rcx,%rdx)
jne 0x14ec0
incl %esi
movl %esi, 0x2c(%rdi)
incq %rdx
jmp 0x14eb0
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x14ee2
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 0x14f74
leaq 0xa19d(%rip), %rax      # 0x1f0b0
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x14420
jmp 0x14f65
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x14bc0
jmp 0x14f65
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x147a4
jmp 0x14f65
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x14a3c
jmp 0x14f65
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x1460c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x14e70
leaq 0xa042(%rip), %rdi      # 0x1efbd
leaq 0xd359(%rip), %rsi      # 0x222db
leaq 0xd38f(%rip), %rcx      # 0x22318
movl $0x1a0, %edx            # imm = 0x1A0
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1638f
andq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1638d
callq 0x163d7
andq $0x0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x163d6
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x1638f
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x1638f
testq %r14, %r14
je 0x163bf
movq 0x10(%rbx), %rdi
callq *%r14
movq (%rbx), %rdi
callq 0x2260
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2260
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x8(%rdi), %r14
movslq (%rdi), %r15
xorl %ebp, %ebp
movq (%r14), %rcx
testq %rcx, %rcx
je 0x1644e
movslq 0x8(%rcx), %rsi
leal 0x1(%rsi), %eax
cltd
idivl %r15d
movl %edx, %ebp
movq (%rcx), %rax
movsd (%rax,%rsi,8), %xmm0
xorl %eax, %eax
ucomisd (%rbx,%rsi,8), %xmm0
setbe %al
leaq (%rcx,%rax,8), %r14
addq $0x18, %r14
jmp 0x1641d
pushq $0x28
popq %rdi
callq 0x22d0
movq %rax, %r12
pushq $-0x1
popq %rax
testq %r12, %r12
je 0x16520
movq %r13, 0x8(%rsp)
leaq (,%r15,8), %r13
movq %r13, %rdi
callq 0x22d0
movq %rax, (%r12)
testq %rax, %rax
je 0x164ff
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x21b0
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r12)
movl %ebp, 0x8(%r12)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%r12)
movq %r12, (%r14)
movq 0x8(%rsp), %r14
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x1650c
movl (%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x16520
movsd (%rbx,%rdx,8), %xmm0
movq 0x8(%rdi), %rsi
movsd (%rsi,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x164ea
movsd %xmm0, (%rsi,%rdx,8)
movsd (%rbx,%rdx,8), %xmm0
movq 0x10(%rdi), %rsi
ucomisd (%rsi,%rdx,8), %xmm0
jbe 0x164fa
movsd %xmm0, (%rsi,%rdx,8)
incq %rdx
jmp 0x164c7
movq %r12, %rdi
callq 0x2260
pushq $-0x1
popq %rax
jmp 0x16520
movl %r15d, %edi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x1652f
movq %rax, 0x10(%r14)
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_O2/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
pushq $0x18
popq %rdi
callq 0x22d0
testq %rax, %rax
je 0x165b5
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 0x165ad
movq %rax, %r13
movq %r12, %rdi
callq 0x22d0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x165a5
movq %rax, %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21b0
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x21b0
jmp 0x165b7
movq %r13, %rdi
callq 0x2260
movq %rbx, %rdi
callq 0x2260
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_O2/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
movl (%rdi), %r13d
cmpl $0x11, %r13d
jl 0x16609
cmpl $0x100, %r13d           # imm = 0x100
ja 0x16612
movq %rsp, %r12
leaq 0xf(,%r13,8), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
jmp 0x16627
leaq 0x15dd0(%rip), %r12     # 0x2c3e0
jmp 0x16627
leaq (,%r13,8), %rdi
callq 0x22d0
movq %rax, %r12
testq %rax, %rax
je 0x16676
xorl %eax, %eax
testl %r13d, %r13d
jle 0x16643
decl %r13d
cvtss2sd (%r15,%rax), %xmm0
movsd %xmm0, (%r12,%rax,2)
addq $0x4, %rax
jmp 0x16629
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x163fb
movl %eax, %r14d
cmpl $0x101, (%rbx)          # imm = 0x101
jl 0x16664
movq %r12, %rdi
callq 0x2260
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %r14
jmp 0x16664
// File: /workspace/github_cpp_makefile_star2_O2/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 0x163fb
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
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 0x163fb
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x167d9
movq %rdi, %r13
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x167d9
movq %rsi, %r15
pushq $0x20
popq %rdi
callq 0x22d0
testq %rax, %rax
je 0x167d9
movq %rax, %rbx
pushq $0x18
popq %rdi
callq 0x22d0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x167d1
movq %rax, %r14
andq $0x0, 0x10(%rax)
movq %r13, (%rbx)
movl (%r12), %edi
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
callq 0x1652f
testq %rax, %rax
je 0x167c7
movq %rax, %r12
movq 0x8(%r13), %rdi
andq $0x0, (%rsp)
movq %rdi, 0x8(%rsp)
movl (%r13), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x16782
movq (%rdi), %rdx
movsd (%rdx,%rcx,8), %xmm1
subsd (%r15,%rcx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
incq %rcx
jmp 0x1675d
leaq 0x8(%rsp), %r13
movq %rsp, %rcx
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %r8
callq 0x16826
movq %r12, %rdi
callq 0x163d7
movq (%r13), %rsi
testq %rsi, %rsi
je 0x167c7
movq %r14, %rdi
callq 0x169b9
cmpl $-0x1, %eax
je 0x167c7
movl $0x1, 0x18(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
jmp 0x167db
movq %rbx, %rdi
callq 0x167ec
jmp 0x167d9
movq %rbx, %rdi
callq 0x2260
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq