// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/networkanalysis.cc
// Function: calculateNodeOverlap(ATOM_NETWORK*, VORONOI_NETWORK*)
vector< vector<double> > calculateNodeOverlap(ATOM_NETWORK *atmnet, VORONOI_NETWORK *vornet){
  unsigned int numNodes = vornet->nodes.size();
  vector< vector<double> > overlapFractions = vector< vector<double> > (numNodes, vector<double> (numNodes, 0));
  for(unsigned int i = 0; i < numNodes; i++){
    VOR_NODE n1 = vornet->nodes[i];
    for(unsigned int j = i + 1; j < numNodes; j++){
	VOR_NODE n2 = vornet->nodes[j];
	double sumRadii =  n1.rad_stat_sphere + n2.rad_stat_sphere;
	overlapFractions[i][j] = overlapFractions[j][i] = max(0.0, (sumRadii - atmnet->calcDistanceXYZ(n1.x, n1.y, n1.z, n2.x, n2.y, n2.z))/sumRadii);
      }
   }	    
    return overlapFractions;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdi, %rbp
movq 0x50(%rdx), %rax
movq %rdx, 0x28(%rsp)
subq 0x48(%rdx), %rax
sarq $0x6, %rax
movq %rax, 0x10(%rsp)
movl %eax, %r12d
leaq 0xa0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movq %r12, %rsi
callq 0x3871a
leaq 0x30(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq %rbp, %rdi
movq %r12, %rsi
callq 0x389b4
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x35784
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
cmpl $0x0, 0x10(%rsp)
je 0x3597b
movl 0x10(%rsp), %r14d
movl $0x1, %eax
movq %rax, 0x20(%rsp)
movl $0x40, %eax
movq %rax, 0x18(%rsp)
movl $0x3, %r13d
xorl %r12d, %r12d
movq %r14, 0x70(%rsp)
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rbx
movq %r12, %r15
shlq $0x6, %r15
leaq (%rbx,%r15), %rsi
addq $0x20, %rsi
movupd -0x20(%rsi), %xmm0
movupd -0x10(%rsi), %xmm1
movapd %xmm1, 0x40(%rsp)
movapd %xmm0, 0x30(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xe886
addq %r15, %rbx
movb 0x38(%rbx), %al
movb %al, 0x68(%rsp)
leaq 0x1(%r12), %rax
movq %r13, 0x80(%rsp)
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r15
movq %rax, 0x78(%rsp)
cmpq %r14, %rax
jae 0x35937
movq %rbp, %r14
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rbp
leaq (%rbx,%rbp), %rsi
addq $0x20, %rsi
movupd -0x20(%rsi), %xmm0
movupd -0x10(%rsi), %xmm1
movapd %xmm1, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xe886
movb 0x38(%rbp,%rbx), %al
movb %al, 0xd8(%rsp)
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
movsd 0xa0(%rsp), %xmm3
movsd 0xa8(%rsp), %xmm4
movsd 0xb0(%rsp), %xmm5
movq 0x88(%rsp), %rdi
callq 0x5394a
movsd 0x98(%rsp), %xmm2
addsd 0x90(%rsp), %xmm2
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
divsd %xmm2, %xmm1
maxsd 0x11d9da(%rip), %xmm1   # 0x1532c0
movq %r14, %rbp
movq (%r14), %rax
movq (%rax,%r13,8), %rcx
movsd %xmm1, (%rcx,%r12,8)
leaq (%r12,%r12,2), %rcx
movq (%rax,%rcx,8), %rax
movsd %xmm1, (%rax,%r15,8)
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x35921
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
incq %r15
addq $0x40, %rbx
addq $0x3, %r13
cmpl %r15d, 0x10(%rsp)
jne 0x3581d
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3594e
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
incq 0x20(%rsp)
addq $0x40, 0x18(%rsp)
movq 0x80(%rsp), %r13
addq $0x3, %r13
movq 0x78(%rsp), %rax
movq %rax, %r12
movq 0x70(%rsp), %r14
cmpq %r14, %rax
jne 0x357b6
movq %rbp, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x35a00
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x35a00
movq %rax, %rbx
jmp 0x35a00
movq %rax, %rbx
jmp 0x359f8
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
movq %r14, %rbp
je 0x359e1
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x359e1
movq %rax, %rbx
movq %r14, %rbp
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x359f8
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbp, %rdi
callq 0xef60
movq %rbx, %rdi
callq 0x4780