// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/allostery.c
// Function: Pairwise_distances
void Pairwise_distances(float **d02ij, float ***r0ijk, 
			atom *atoms, int *iatom, int Na)
{
  int ia, ja, k;
  for(ia=0; ia<Na; ia++){
    double *ri=atoms[iatom[ia]].r;
    float *dij=malloc(Na*sizeof(float));
    d02ij[ia]=dij;
    float **rij=Allocate_mat2_f(Na,3);
    r0ijk[ia]=rij;
    for(ja=0; ja<ia; ja++){
      double *rj=atoms[iatom[ja]].r, sum=0;
      float *d=rij[ja];
      for(k=0; k<3; k++){
	*d=ri[k]-(*rj); sum+=(*d)*(*d); d++; rj++;
      }
      dij[ja]=sum;
      sum=sqrt(sum);
      d=rij[ja]; for(k=0; k<3; k++){(*d)/=sum; d++;}
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x62127
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movslq -0x24(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1180
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x24(%rbp), %edi
movl $0x3, %esi
callq 0x69360
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x62117
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x3, -0x30(%rbp)
jge 0x62091
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x50(%rbp), %rax
subsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, (%rax)
movq -0x60(%rbp), %rax
movss (%rax), %xmm0
movq -0x60(%rbp), %rax
mulss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
addsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x62029
movsd -0x58(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x40(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movsd -0x58(%rbp), %xmm0
callq 0x1220
movsd %xmm0, -0x58(%rbp)
movq -0x48(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x3, -0x30(%rbp)
jge 0x62107
movsd -0x58(%rbp), %xmm1
movq -0x60(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rax)
movq -0x60(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x60(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x620cd
jmp 0x62109
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x61fe3
jmp 0x62119
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x61f73
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)