// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/psd.cc
// Function: calcSpheresDistance(ATOM_NETWORK, std::vector<std::pair<Point, double>, std::allocator<std::pair<Point, double>>>&, std::vector<double, std::allocator<double>>&)
void calcSpheresDistance(ATOM_NETWORK atomnetwork, vector <pair <Point, double> > &sphereAndRadii, vector <double> &distanceBetweenSpheres){
	for (int a=0; a<sphereAndRadii.size(); a++){
		Point coord1 = sphereAndRadii.at(a).first; double Radius1 = sphereAndRadii.at(a).second;
		double SpheresDistanceCalc = 0;
		double minDistance = 1000000;
		for (int b=0; b<sphereAndRadii.size(); b++){
			Point coord2 = sphereAndRadii.at(b).first; double Radius2 = sphereAndRadii.at(b).second;
			if (Radius1>=2 && Radius1<=2.15){
				if (Radius2>=2 && Radius2<=2.15){
					if (a !=b){
						double checkDistance = atomnetwork.calcDistanceXYZ(coord1[0], coord1[1], coord1[2], coord2[0], coord2[1], coord2[2]);
						minDistance = min(minDistance, checkDistance);
						SpheresDistanceCalc = minDistance; 
					}
				}
			}
		}
		distanceBetweenSpheres.push_back(SpheresDistanceCalc);
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, 0x18(%rsp)
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
xorl %r15d, %r15d
pushq $0x1
popq %r13
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x6a87a
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a990
movups (%rax), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x80(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a990
movsd 0x18(%rax), %xmm0
andq $0x0, 0x10(%rsp)
movsd 0x9a2ef(%rip), %xmm1    # 0x1049e0
cmplepd %xmm0, %xmm1
movsd 0x9a2da(%rip), %xmm2    # 0x1049d8
cmplepd %xmm2, %xmm0
andpd %xmm1, %xmm0
movd %xmm0, %ebx
xorl %ebp, %ebp
movsd 0x9a2d3(%rip), %xmm0    # 0x1049e8
movsd %xmm0, 0x8(%rsp)
movl %ebx, 0x4(%rsp)
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x5, %rax
cmpq %rbp, %rax
jbe 0x6a863
movq %r14, %rdi
movq %rbp, %rsi
callq 0x6a990
movupd (%rax), %xmm0
movapd %xmm0, 0x50(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x60(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x6a990
testb $0x1, %bl
je 0x6a85b
cmpq %rbp, %r15
je 0x6a85b
movsd 0x18(%rax), %xmm0
ucomisd 0x9a265(%rip), %xmm0    # 0x1049e0
jb 0x6a85b
movsd 0x9a24f(%rip), %xmm1    # 0x1049d8
ucomisd %xmm0, %xmm1
jb 0x6a85b
movq %r15, %rbx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r15, %rdi
movl %r13d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %r15, %rdi
pushq $0x2
popq %r15
movl %r15d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
leaq 0x50(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r12, %rdi
movl %r13d, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r12, %rdi
movl %r15d, %esi
movq %rbx, %r15
movl 0x4(%rsp), %ebx
callq 0x63c78
movsd (%rax), %xmm5
movq 0x20(%rsp), %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
movsd 0x28(%rsp), %xmm4
callq 0x3f636
minsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
incq %rbp
jmp 0x6a71f
movq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xac88
incq %r15
jmp 0x6a6a0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq