LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/screened_interactions.c
// Function: Screening_distance_old
int Screening_distance_old(float *d2_nb, float *d2_bo,
			   int res1, struct store *store1,
			   atom *atom2, atom *atoms)
{
  int res2=atom2->res;
  while(store1 != NULL){
    atom *atom3=atoms+store1->i;
    if(atom3!=atom2){
      float d_13=store1->x, d_23=Dist2(atom2->r, atom3->r);
      int bond=Bond(atom3->res, res1, d_13, res2, d_23);
      if(d_23 > d_13){
	if(bond){if(d_23 < *d2_bo)*d2_bo=d_23;}
	else{if(d_23 < *d2_nb)*d2_nb=d_23;}
      }else{
	if(bond){if(d_13 < *d2_bo)*d2_bo=d_13;}
	else{if(d_13 < *d2_nb)*d2_nb=d_13;}
      }
    }
    store1=store1->next;
  }
  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
testq %rcx, %rcx
je 0x20f9e
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r12
movl 0x64(%r8), %r13d
movslq (%r15), %rax
imulq $0x70, %rax, %rax
addq %rbx, %rax
cmpq %r14, %rax
je 0x20f91
movss 0x4(%r15), %xmm0
movss %xmm0, 0x14(%rsp)
movsd (%r14), %xmm2
movsd 0x8(%r14), %xmm1
subsd (%rax), %xmm2
mulsd %xmm2, %xmm2
subsd 0x8(%rax), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
movsd 0x10(%r14), %xmm2
subsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
movss %xmm1, 0x10(%rsp)
movl 0x64(%rax), %edi
movl %ebp, %esi
movl %r13d, %edx
callq 0x19128
movss 0x10(%rsp), %xmm2
movss 0x14(%rsp), %xmm1
ucomiss %xmm1, %xmm2
jbe 0x20f4a
testl %eax, %eax
je 0x20f61
movss (%r12), %xmm0
ucomiss %xmm2, %xmm0
jbe 0x20f91
movss %xmm2, (%r12)
jmp 0x20f91
testl %eax, %eax
je 0x20f7a
movss (%r12), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x20f91
movss %xmm1, (%r12)
jmp 0x20f91
movq 0x8(%rsp), %rax
movss (%rax), %xmm0
ucomiss %xmm2, %xmm0
jbe 0x20f91
movq 0x8(%rsp), %rax
movss %xmm2, (%rax)
jmp 0x20f91
movq 0x8(%rsp), %rax
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x20f91
movq 0x8(%rsp), %rax
movss %xmm1, (%rax)
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x20eb6
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Center_atoms
void Center_atoms(atom *atoms, int N_atoms, struct Reference Ref)
{
  double r_tot[3], M_tot=0; int iref, i, j;
  for(j=0; j<3; j++)r_tot[j]=0;
  for(iref=0; iref< Ref.N_ref; iref++){
    double *r=atoms[Ref.atom_num[iref]].r;
    double m = Ref.mass_atom[iref];
    M_tot+=m; for(j=0; j<3; j++)r_tot[j]+=m*r[j];
  }
  for(j=0; j<3; j++)r_tot[j]/=M_tot;
  for(i=0; i<N_atoms; i++){
    for(j=0; j<3; j++)atoms[i].r[j]-=r_tot[j];
  }
}

// Assembly:
xorpd %xmm0, %xmm0
movapd %xmm0, -0x18(%rsp)
movq $0x0, -0x8(%rsp)
movslq 0x8(%rsp), %rax
testq %rax, %rax
jle 0x21535
leaq 0x8(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq 0x28(%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movslq (%rdx,%r8,4), %r9
imulq $0x70, %r9, %r9
addq %rdi, %r9
xorps %xmm1, %xmm1
cvtss2sd (%rcx,%r8,4), %xmm1
xorl %r10d, %r10d
movsd (%r9,%r10,8), %xmm2
mulsd %xmm1, %xmm2
addsd -0x18(%rsp,%r10,8), %xmm2
movsd %xmm2, -0x18(%rsp,%r10,8)
incq %r10
cmpq $0x3, %r10
jne 0x21506
addsd %xmm1, %xmm0
incq %r8
cmpq %rax, %r8
jne 0x214ef
jmp 0x21539
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd -0x18(%rsp,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rsp,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x2153b
testl %esi, %esi
jle 0x21583
movl %esi, %eax
xorl %ecx, %ecx
xorl %edx, %edx
movsd (%rdi,%rdx,8), %xmm0
subsd -0x18(%rsp,%rdx,8), %xmm0
movsd %xmm0, (%rdi,%rdx,8)
incq %rdx
cmpq $0x3, %rdx
jne 0x2155e
incq %rcx
addq $0x70, %rdi
cmpq %rax, %rcx
jne 0x2155c
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Internal_Jacobian
int Internal_Jacobian(// Output:
		      struct Jacobian J,
		      // Input:
		      struct Reference Ref,
		      atom *atoms, int N_atoms,
		      struct axe *axes, int N_axes)
{
  // Jacobian: derivatives with respect to torsions for all atoms
  // (only internal degrees of freedom)
  int i, j, k;
  for(k=0; k<N_axes; k++){
    float *Jacobian_a=J.Jacobian_ar[k]; int jj=0;
    struct axe *axe=axes+k;
    for(i=0; i<Ref.N_ref; i++){
      double *rot,  *shift;
      if((i>=axe->first_kin)&&(i<=axe->last_kin)){
	rot=axe->local_rot;  shift=axe->local_shift;
      }else{
	rot=axe->global_rot; shift=axe->global_shift;
      }
      double *ri=atoms[Ref.atom_num[i]].r;
      double r[3]; for(j=0; j<3; j++)r[j]=ri[j];
      double dk[3]; Vector_product_d(dk, rot, r);
      for(j=0; j<3; j++){
	Jacobian_a[jj]=(dk[j]+shift[j]); jj++;
      }
    }
  }

  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, 0x10(%rsp)
testl %ecx, %ecx
jle 0x221da
movq %rdi, %r14
leaq 0x108(%rsp), %rax
leaq 0xc0(%rsp), %rdx
movq 0x10(%rdx), %rdx
movq %rdx, 0x20(%rsp)
movl (%rax), %edx
movq %rdx, 0x18(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0x40(%rsp)
movl %ecx, %eax
movq %rax, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rbx
cmpl $0x0, 0x18(%rsp)
jle 0x221bb
movq 0x8(%rsp), %rcx
imulq $0x158, %rcx, %r15      # imm = 0x158
addq 0x10(%rsp), %r15
movq 0x20(%rsp), %rax
movq (%rax,%rcx,8), %rax
movq %rax, 0x48(%rsp)
leaq 0xd8(%r15), %rax
movq %rax, 0x30(%rsp)
leaq 0xa8(%r15), %rax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
movslq 0x18(%r15), %rax
cmpq %rax, %rbp
jl 0x22140
movslq 0x1c(%r15), %rax
movl $0xc0, %r12d
movq 0x30(%rsp), %rsi
cmpq %rax, %rbp
jle 0x2214b
movl $0x90, %r12d
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rax
movslq (%rax,%rbp,4), %rax
imulq $0x70, %rax, %rax
movq 0x10(%r14,%rax), %rcx
movq %rcx, 0x60(%rsp)
movups (%r14,%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1086b
movslq %r13d, %r13
movq 0x48(%rsp), %rax
leaq (%rax,%r13,4), %rcx
addq %rbx, %r12
xorl %eax, %eax
movsd 0x70(%rsp,%rax,8), %xmm0
addsd (%r12,%rax,8), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rcx,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x2218c
incq %rbp
addq %rax, %r13
cmpq 0x18(%rsp), %rbp
jne 0x22123
movq 0x8(%rsp), %rcx
incq %rcx
addq $0x158, %rbx            # imm = 0x158
movq %rcx, 0x8(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x220dc
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Eckart_test
void Eckart_test(float **Jacobian_ar, int N_axes,
		 atom *atoms, int N_atoms,
		 struct Reference Ref, struct axe *axes)
{
  printf("Testing Eckart conditions for each axis (%d)\n", N_axes);
  int EV=0;
  for(int k=0; k<N_axes; k++){
    EV+=Test_Eckart(Jacobian_ar[k], atoms, N_atoms, Ref, k, axes+k);
  }
  if(EV){
    printf("ERROR, %d violations of the Eckart conditions\n", EV);
    exit(8);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rdx, 0x30(%rsp)
movl %esi, %r12d
movq %rdi, %r15
leaq 0x36684(%rip), %rdi     # 0x58895
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x20f0
testl %r12d, %r12d
jle 0x2226e
leaq 0x70(%rsp), %r13
movl %r12d, %r14d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq (%r15,%r12,8), %rdi
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq 0x30(%rsp), %rsi
movl %r12d, %ecx
movq %rbx, %r8
callq 0x2350f
addl %eax, %ebp
incq %r12
addq $0x158, %rbx            # imm = 0x158
cmpq %r12, %r14
jne 0x2222c
testl %ebp, %ebp
jne 0x22281
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3663b(%rip), %rdi     # 0x588c3
movl %ebp, %esi
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Transpose_matrix
float **Transpose_matrix(float **M, int n1, int n2){
  float **M_tr=Allocate_mat2_f(n2, n1); int i, j;
  for(i=0; i<n2; i++){
    for(j=0; j<n1; j++)M_tr[i][j]=M[j][i];
  }
  return(M_tr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %edi
callq 0x496ae
testl %ebp, %ebp
jle 0x229a0
movl %ebp, %ecx
movl %ebx, %edx
xorl %esi, %esi
testl %ebx, %ebx
jle 0x22998
movq (%rax,%rsi,8), %rdi
xorl %r8d, %r8d
movq (%r14,%r8,8), %r9
movss (%r9,%rsi,4), %xmm0
movss %xmm0, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rdx
jne 0x22980
incq %rsi
cmpq %rcx, %rsi
jne 0x22975
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Transpose_matrix_d2f
float **Transpose_matrix_d2f(double **M, int n1, int n2){
  float **M_tr=Allocate_mat2_f(n2, n1); int i, j;
  for(i=0; i<n2; i++){
    for(j=0; j<n1; j++)M_tr[i][j]=M[j][i];
  }
  return(M_tr);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %edi
callq 0x496ae
testl %ebp, %ebp
jle 0x229ef
movl %ebp, %ecx
movl %ebx, %edx
xorl %esi, %esi
testl %ebx, %ebx
jle 0x229e7
movq (%rax,%rsi,8), %rdi
xorl %r8d, %r8d
movq (%r14,%r8,8), %r9
xorps %xmm0, %xmm0
cvtsd2ss (%r9,%rsi,8), %xmm0
movss %xmm0, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rdx
jne 0x229cc
incq %rsi
cmpq %rcx, %rsi
jne 0x229c1
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Inertia_tensor
void Inertia_tensor(double **inertia, double **corr_sum,
	            double *r_sum, double M_sum)
{
  // Only upper diagonal of corr_sum is needed
  int i, j; double r2;
  for(i=0; i<3; i++){
    for(j=i; j<3; j++)
      inertia[i][j]=corr_sum[i][j]-r_sum[i]*r_sum[j]/M_sum;
  }
  r2=inertia[0][0]+inertia[1][1]+inertia[2][2];
  for(i=0; i<3; i++){
    inertia[i][i]=r2-inertia[i][i];
    for(j=i+1; j<3; j++){
      inertia[i][j]=-inertia[i][j];
      inertia[j][i]= inertia[i][j];
    }
  }
}

// Assembly:
xorl %eax, %eax
movq (%rsi,%rax,8), %rcx
movq (%rdi,%rax,8), %r8
movq %rax, %r9
movsd (%rcx,%r9,8), %xmm1
movsd (%rdx,%rax,8), %xmm2
mulsd (%rdx,%r9,8), %xmm2
divsd %xmm0, %xmm2
subsd %xmm2, %xmm1
movsd %xmm1, (%r8,%r9,8)
incq %r9
cmpq $0x3, %r9
jne 0x22d56
incq %rax
cmpq $0x3, %rax
jne 0x22d4b
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movsd (%rax), %xmm0
addsd 0x8(%rcx), %xmm0
movq 0x10(%rdi), %rax
addsd 0x10(%rax), %xmm0
xorl %eax, %eax
movapd 0x2e2e6(%rip), %xmm1    # 0x51090
movq (%rdi,%rax,8), %rcx
movapd %xmm0, %xmm2
subsd (%rcx,%rax,8), %xmm2
movsd %xmm2, (%rcx,%rax,8)
cmpq $0x1, %rax
ja 0x22de8
movq %rax, %rdx
movsd 0x8(%rcx,%rdx,8), %xmm2
xorpd %xmm1, %xmm2
movlpd %xmm2, 0x8(%rcx,%rdx,8)
movq 0x8(%rdi,%rdx,8), %rsi
movlpd %xmm2, (%rsi,%rax,8)
incq %rdx
cmpq $0x2, %rdx
jne 0x22dc5
incq %rax
cmpq $0x3, %rax
jne 0x22daa
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Dof_overlap
int Dof_overlap(struct axe *axe_k, struct axe *axe_l)
{
  // dof k<=l. Returns 1 if they move a common subset of atoms
  if((axe_l->first_kin>=axe_k->first_kin)&&
     (axe_l->last_kin <=axe_k->last_kin)){
    return(1);
  }else if((axe_k->last_kin < axe_l->first_kin)||
	   (axe_l->last_kin < axe_k->first_kin)){
    return(0);
  }
  printf("ERROR, not nested axes\n");
  printf("k: type %c first_kin: %d last_kin: %d\n",
	 axe_k->type, axe_k->first_kin, axe_k->last_kin);
  printf("l: type %c first_kin: %d last_kin: %d\n",
	 axe_l->type, axe_l->first_kin, axe_l->last_kin);
  exit(8);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rsi), %edx
movl 0x18(%rdi), %ecx
cmpl %ecx, %edx
jl 0x22e14
movl 0x1c(%rbx), %esi
movl $0x1, %eax
cmpl 0x1c(%r14), %esi
jle 0x22e21
xorl %eax, %eax
cmpl %edx, 0x1c(%r14)
jl 0x22e21
cmpl %ecx, 0x1c(%rbx)
jge 0x22e29
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x35c65(%rip), %rdi     # 0x58a95
callq 0x2090
movsbl (%r14), %esi
movl 0x18(%r14), %edx
movl 0x1c(%r14), %ecx
leaq 0x35b36(%rip), %rdi     # 0x5897e
xorl %eax, %eax
callq 0x20f0
movsbl (%rbx), %esi
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0x35b46(%rip), %rdi     # 0x589a5
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Kinetic_energy_Jac
int Kinetic_energy_Jac(struct Jacobian J, struct Reference Ref, int N_axes)
{
  // Compute kinetic energy tensor T=T_sqrt T_sqrt^T (only internal dof)
  // Lower tridiagonal matrix T[i][j] with j<=i
  int k, l, j, diff=0;
  for(l=0; l<N_axes; l++){
    float *Jl=J.Jacobian_ar[l];
    for(k=0; k<=l; k++){
      float *Jk=J.Jacobian_ar[k]; double sum=0;
      for(j=0; j<Ref.N_Cart; j++)sum+=Jk[j]*Jl[j]*Ref.mass_coord[j];
      if(fabs(sum-J.T[l][k])>0.0001*fabs(J.T[l][l])){
	printf("%d %d %.6f %.6f\n", l, k, sum, J.T[l][k]);
	diff++;
      }
      J.T[l][k]=sum;
      if(l!=k)J.T[k][l]=J.T[l][k];
    }
  }
  if(diff){
    printf("ERROR, %d components of the kinetic energy are different\n",
	   diff); exit(8);
  }else{
    printf("All components of the kinetic energy are equal\n"); exit(8);
  }
  if(DEBUG){
    int ini=N_axes-20;
    printf("###  Kinetic energy matrix (calc):\n");
    for(k=ini; k<ini+20; k++){
      for(l=ini; l<=k; l++)printf(" %.4g", J.T[k][l]);
      printf("\n");
    }
  }
  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %esi, %esi
testl %edi, %edi
jle 0x22fb9
leaq 0xa8(%rsp), %rax
leaq 0x60(%rsp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x20(%rcx), %rbp
movl 0x4(%rax), %r15d
movq 0x18(%rax), %r13
movl %edi, %eax
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
movl $0x1, %edi
movapd 0x3446f(%rip), %xmm3    # 0x57330
movsd 0x32cb7(%rip), %xmm4    # 0x55b80
xorl %esi, %esi
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %rbx
xorl %r12d, %r12d
movq %rdi, 0x18(%rsp)
testl %r15d, %r15d
jle 0x22f13
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %rax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movss (%rax,%rcx,4), %xmm1
mulss (%rbx,%rcx,4), %xmm1
mulss (%r13,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %r15
jne 0x22ef0
jmp 0x22f17
xorpd %xmm0, %xmm0
movq (%rbp,%r14,8), %rax
movsd (%rax,%r12,8), %xmm1
movapd %xmm0, %xmm5
subsd %xmm1, %xmm5
andpd %xmm3, %xmm5
movsd (%rax,%r14,8), %xmm2
andpd %xmm3, %xmm2
mulsd %xmm4, %xmm2
ucomisd %xmm2, %xmm5
jbe 0x22f81
leaq 0x35754(%rip), %rdi     # 0x5869d
movl %esi, 0x4(%rsp)
movl %r14d, %esi
movl %r12d, %edx
movb $0x2, %al
movsd %xmm0, 0x20(%rsp)
callq 0x20f0
movsd 0x20(%rsp), %xmm0
movsd 0x32c12(%rip), %xmm4    # 0x55b80
movapd 0x343ba(%rip), %xmm3    # 0x57330
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %esi
incl %esi
movq (%rbp,%r14,8), %rax
movsd %xmm0, (%rax,%r12,8)
cmpq %r12, %r14
je 0x22f9c
movq (%rbp,%r12,8), %rax
movsd %xmm0, (%rax,%r14,8)
incq %r12
cmpq %rdi, %r12
jne 0x22edc
incq %r14
incq %rdi
cmpq 0x10(%rsp), %r14
jne 0x22ecb
testl %esi, %esi
jne 0x22fcb
leaq 0x35ae8(%rip), %rdi     # 0x58aac
callq 0x2090
jmp 0x22fd9
leaq 0x356dc(%rip), %rdi     # 0x586ae
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Sum_inertia
float Sum_inertia(double *mr_tot, double **corr_sum,
		  atom *atoms, struct Reference Ref,
		  int ini_ref, int end_ref)
{
  double M_tot=0; int i, j;
  for(int iref=ini_ref; iref<=end_ref; iref++){
    double *r=atoms[Ref.atom_num[iref]].r;
    double m = Ref.mass_atom[iref];
    M_tot+=m;
    for(i=0; i<3; i++){
      float mri=m*r[i]; mr_tot[i]+=mri;
      for(j=i; j<3; j++)corr_sum[i][j]+=mri*r[j];
    }
  }
  return(M_tot);
}

// Assembly:
xorpd %xmm0, %xmm0
cmpl %r8d, %ecx
jg 0x23084
pushq %r14
pushq %rbx
leaq 0x18(%rsp), %r9
movq 0x10(%r9), %rax
movq 0x28(%r9), %r9
movslq %ecx, %rcx
incl %r8d
xorpd %xmm0, %xmm0
movslq (%r9,%rcx,4), %r10
imulq $0x70, %r10, %r10
addq %rdx, %r10
xorps %xmm1, %xmm1
cvtss2sd (%rax,%rcx,4), %xmm1
xorl %r11d, %r11d
movsd (%r10,%r11,8), %xmm2
mulsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
cvtss2sd %xmm2, %xmm2
movsd (%rdi,%r11,8), %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%rdi,%r11,8)
movq (%rsi,%r11,8), %rbx
movq %r11, %r14
movsd (%r10,%r14,8), %xmm3
mulsd %xmm2, %xmm3
addsd (%rbx,%r14,8), %xmm3
movsd %xmm3, (%rbx,%r14,8)
incq %r14
cmpq $0x3, %r14
jne 0x23049
incq %r11
cmpq $0x3, %r11
jne 0x23020
addsd %xmm1, %xmm0
incq %rcx
cmpl %ecx, %r8d
jne 0x2300a
cvtsd2ss %xmm0, %xmm0
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Compute_Jtilde
int Compute_Jtilde(struct Jacobian *J)
{
  // Jtilde = J L^t(-1)
  // Jtilde_ia = sum_b J_ib L^t(-1)_ba =  sum_b J_ib L(-1)_ab
  // Jtilde_ai = L(-1)_ab sum_b J_bi => LJtilde = J
  int a, i, b;

  if(J->Jtilde_ar==NULL)
    J->Jtilde_ar=Allocate_mat2_f(J->N_axes, J->N_Cart);
  if(J->T_sqrt_inv!=NULL){
    // T_sqrt is not lower diagonal!
    for(a=0; a<J->N_kin; a++){
      for(i=0; i<J->N_Cart; i++){
	double sum=0;
	for(b=0; b<J->N_axes; b++)
	  sum+=J->T_sqrt_inv[a][b]*J->Jacobian_ar[b][i];
	J->Jtilde_ar[a][i]=sum;
      }
    }
  }else{
    // Exploit that T_sqrt is lower diagonal
    // T_sqrt Jtilde = J
    double *X=malloc(J->N_axes*sizeof(double));
    double *Y=malloc(J->N_axes*sizeof(double));
    for(i=0; i<J->N_Cart; i++){
      for(a=0; a<J->N_axes; a++)Y[a]=J->Jacobian_ar[a][i];
      Forward_substitution(X, J->T_sqrt, Y, J->N_axes);
      for(a=0; a<J->N_axes; a++)J->Jtilde_ar[a][i]=X[a];
    }
    free(X); free(Y);
  }
  return(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
jne 0x230c8
movl (%rbx), %edi
movl 0x4(%rbx), %esi
callq 0x496ae
movq %rax, 0x18(%rbx)
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x2314b
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x231ee
movl 0x4(%rbx), %edx
xorl %esi, %esi
testl %edx, %edx
jle 0x2313e
movl (%rbx), %edi
movq 0x18(%rbx), %r8
movq (%r8,%rsi,8), %r8
xorl %r9d, %r9d
testl %edi, %edi
jle 0x2312d
movq (%rax,%rsi,8), %r10
movq 0x10(%rbx), %r11
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movss (%r10,%r14,4), %xmm1
movq (%r11,%r14,8), %r15
mulss (%r15,%r9,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r14
cmpq %r14, %rdi
jne 0x23107
cvtsd2ss %xmm0, %xmm0
jmp 0x23130
xorps %xmm0, %xmm0
movss %xmm0, (%r8,%r9,4)
incq %r9
cmpq %rdx, %r9
jne 0x230f4
incq %rsi
cmpq %rcx, %rsi
jne 0x230e3
jmp 0x231ee
movslq (%rbx), %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x21d0
movq %rax, %r14
movq %r15, %rdi
callq 0x21d0
movq %rax, %r15
cmpl $0x0, 0x4(%rbx)
jle 0x231de
xorl %r12d, %r12d
movslq (%rbx), %rcx
testq %rcx, %rcx
jle 0x2319a
movq 0x10(%rbx), %rax
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
xorps %xmm0, %xmm0
cvtss2sd (%rsi,%r12,4), %xmm0
movsd %xmm0, (%r15,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x2317f
movq 0x28(%rbx), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x499a8
movslq (%rbx), %rax
testq %rax, %rax
jle 0x231d2
movq 0x18(%rbx), %rcx
xorl %edx, %edx
xorps %xmm0, %xmm0
cvtsd2ss (%r14,%rdx,8), %xmm0
movq (%rcx,%rdx,8), %rsi
movss %xmm0, (%rsi,%r12,4)
incq %rdx
cmpq %rdx, %rax
jne 0x231b7
incq %r12
movslq 0x4(%rbx), %rax
cmpq %rax, %r12
jl 0x23171
movq %r14, %rdi
callq 0x2050
movq %r15, %rdi
callq 0x2050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Normal_vector
void Normal_vector(double *v, struct bond *bond, double *vers)
{
  double *r0=NULL; int j;
  if((bond)&&(bond->previous)&&(bond->previous->previous)&&
     (bond->previous->previous->atom)){
    r0=bond->previous->previous->atom->r;
  }
  if(r0==NULL){
    printf("ERROR, no previous atom found for bond angle\n");
    goto error_normal;
  }
  double *r1=bond->previous->atom->r, dr[3];
  for(j=0; j<3; j++)dr[j]=r1[j]-r0[j];
  Vector_product_d(v, vers, dr);
  // Normalize:
  double v2=0; for(j=0; j<3; j++)v2+=v[j]*v[j];
  if(v2<=0){
    printf("ERROR for bond angle, zero norm (%.6f) of rotation axis\n",v2);
    goto error_normal;
  }
  v2=1./sqrt(v2); for(j=0; j<3; j++)v[j]*=v2;
  return;
 error_normal:
  printf("atoms: %s %d %s %d prev. bond: %d prev. prev.: %d\n",
	 bond->previous->atom->name, bond->previous->atom->res,
	 bond->atom->name, bond->atom->res,
	 bond->previous->i_atom, bond->previous->previous->i_atom);
  exit(8);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2372f
movq 0x28(%r14), %rax
testq %rax, %rax
je 0x2372f
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x2372f
movq (%rax), %rax
jmp 0x23731
xorl %eax, %eax
testq %rax, %rax
je 0x237d3
movq 0x28(%r14), %rcx
movq (%rcx), %rcx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
subsd (%rax,%rsi,8), %xmm0
movsd %xmm0, 0x10(%rsp,%rsi,8)
incq %rsi
cmpq $0x3, %rsi
jne 0x23743
leaq 0x10(%rsp), %rax
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x1086b
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rbx,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x3, %rax
jne 0x23775
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x237e1
ucomisd %xmm1, %xmm0
jb 0x237a1
sqrtsd %xmm0, %xmm0
jmp 0x237a6
callq 0x2290
movsd 0x2d892(%rip), %xmm1    # 0x51040
divsd %xmm0, %xmm1
xorl %eax, %eax
movsd (%rbx,%rax,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x237b4
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x35301(%rip), %rdi     # 0x58adb
callq 0x2090
jmp 0x237ef
leaq 0x3512a(%rip), %rdi     # 0x58912
movb $0x1, %al
callq 0x20f0
movq (%r14), %rcx
movq 0x28(%r14), %rax
movq (%rax), %rsi
movl 0x64(%rsi), %edx
addq $0x18, %rsi
movl 0x64(%rcx), %r8d
addq $0x18, %rcx
movl 0x20(%rax), %r9d
movq 0x28(%rax), %rax
movl 0x20(%rax), %eax
movl %eax, (%rsp)
leaq 0x3512e(%rip), %rdi     # 0x5894b
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Allocate_Jacobian
void Allocate_Jacobian(struct Jacobian *J, int N_axes, int N_Cart)
{
  J->N_axes=N_axes; J->N_Cart=N_Cart;
  J->T=Allocate_mat2_d(N_axes,N_axes);
  J->T_sqrt=Allocate_mat2_d(N_axes,N_axes);
  J->Jacobian_ar=Allocate_mat2_f(N_axes,N_Cart);
  J->Jtilde_ar=NULL;  // Allocate_mat2_f(N_axes,N_Cart);
  J->T_sqrt_tr=NULL;
  J->T_sqrt_inv=NULL;
  J->T_sqrt_inv_tr=NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %esi, %edi
callq 0x49798
movq %rax, 0x20(%r14)
movl %ebp, %edi
movl %ebp, %esi
callq 0x49798
movq %rax, 0x28(%r14)
movl %ebp, %edi
movl %ebx, %esi
callq 0x496ae
movq %rax, 0x10(%r14)
xorl %eax, %eax
movq %rax, 0x18(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movq %rax, 0x40(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Empty_Jacobian
void Empty_Jacobian(struct Jacobian J)
{
  if(J.T!=NULL)Empty_matrix_d(J.T, J.N_axes);
  if(J.Jacobian_ar!=NULL)Empty_matrix_f(J.Jacobian_ar, J.N_axes);
  if(J.Jtilde_ar!=NULL)Empty_matrix_f(J.Jtilde_ar, J.N_axes);
  if(J.T_sqrt!=NULL)Empty_matrix_d(J.T_sqrt, J.N_axes);
  if(J.T_sqrt_inv!=NULL)Empty_matrix_f(J.T_sqrt_inv, J.N_axes);
  if(J.T_sqrt_tr!=NULL)Empty_matrix_f(J.T_sqrt_tr, J.N_kin); //modyves: this was never freed
}

// Assembly:
pushq %rbx
leaq 0x10(%rsp), %rbx
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x23890
movl (%rbx), %esi
callq 0x49642
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x238a0
movl (%rbx), %esi
callq 0x4960c
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x238b0
movl (%rbx), %esi
callq 0x4960c
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x238c0
movl (%rbx), %esi
callq 0x49642
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x238d0
movl (%rbx), %esi
callq 0x4960c
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x238e2
movl 0x8(%rbx), %esi
popq %rbx
jmp 0x4960c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/kinetic_tnm.c
// Function: Det_33
float Det_33(float **rot){
  float det=
    rot[0][0]*(rot[1][1]*rot[2][2]-rot[1][2]*rot[2][1])-
    rot[0][1]*(rot[1][0]*rot[2][2]-rot[1][2]*rot[2][0])+
    rot[0][2]*(rot[1][0]*rot[2][1]-rot[1][1]*rot[2][0]);
  return(det);
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movss (%rcx), %xmm0
movss 0x4(%rcx), %xmm1
movq 0x10(%rdi), %rdx
movss 0x8(%rdx), %xmm2
movss 0x8(%rcx), %xmm3
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movaps %xmm5, %xmm6
mulss %xmm3, %xmm6
movaps %xmm1, %xmm7
mulss %xmm2, %xmm7
subss %xmm6, %xmm7
mulss %xmm4, %xmm3
mulss %xmm0, %xmm2
subss %xmm3, %xmm2
mulss 0x4(%rax), %xmm2
mulss (%rax), %xmm7
mulss %xmm5, %xmm0
subss %xmm2, %xmm7
mulss %xmm1, %xmm4
subss %xmm4, %xmm0
mulss 0x8(%rax), %xmm0
addss %xmm7, %xmm0
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Empty_Normal_modes
void Empty_Normal_modes(struct Normal_Mode NM)
{

  // Cleaning normal modes
  Empty_matrix_f(NM.Cart, NM.N);
  Empty_matrix_f(NM.Tors, NM.N);
  Empty_matrix_f(NM.MW_Tors, NM.N);
  free(NM.omega2);
  free(NM.omega);
  free(NM.select); //modyves: was never freed
  free(NM.sigma2);
  free(NM.Cart_coll);
  free(NM.Tors_coll);
  free(NM.MW_Tors_coll);
  free(NM.Tors_frac);
  free(NM.sort);
  free(NM.Anharmonicity);
  free(NM.Anharm_struct);
  free(NM.Max_factor);
  free(NM.Max_RMSD);
  free(NM.Max_dev); 
  free(NM.cart_fluct);
  free(NM.tors_fluct);
  free(NM.confchange2);

}

// Assembly:
pushq %rbx
movq 0x48(%rsp), %rdi
movl 0x10(%rsp), %ebx
movl %ebx, %esi
callq 0x4960c
movq 0x50(%rsp), %rdi
movl %ebx, %esi
callq 0x4960c
movq 0x58(%rsp), %rdi
movl %ebx, %esi
callq 0x4960c
movq 0x30(%rsp), %rdi
callq 0x2050
movq 0x28(%rsp), %rdi
callq 0x2050
movq 0xd0(%rsp), %rdi
callq 0x2050
movq 0x38(%rsp), %rdi
callq 0x2050
movq 0x78(%rsp), %rdi
callq 0x2050
movq 0x80(%rsp), %rdi
callq 0x2050
movq 0x88(%rsp), %rdi
callq 0x2050
movq 0x70(%rsp), %rdi
callq 0x2050
movq 0xc8(%rsp), %rdi
callq 0x2050
movq 0xa8(%rsp), %rdi
callq 0x2050
movq 0xb0(%rsp), %rdi
callq 0x2050
movq 0xb8(%rsp), %rdi
callq 0x2050
movq 0xc0(%rsp), %rdi
callq 0x2050
movq 0x90(%rsp), %rdi
callq 0x2050
movq 0x68(%rsp), %rdi
callq 0x2050
movq 0x60(%rsp), %rdi
callq 0x2050
movq 0x40(%rsp), %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Normal_modes_INM
void Normal_modes_INM(int N,           //degrees of freedom
		      struct interaction *Int_list, int N_int,
		      atom *atoms, int N_atoms,
		      double **Hessian, float **eigen_vector,
		      float *eigen_value, float *eigen_B,
		      float *B_CA, float *Cart_collectivity)
{
  int i;

  Compute_Hessian_INM(Hessian, N, Int_list, N_int, atoms);
  d_Diagonalize(N, Hessian, eigen_value, eigen_vector, -1);
  Compute_Bfact_INM(B_CA, eigen_B, N, eigen_value, eigen_vector);
  for(i=0; i<N; i++)
    Cart_collectivity[i]=Collectivity_norm2(eigen_vector[i], N)/N;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %rcx, %r8
movl %edx, %ecx
movq %rsi, %rdx
movl %edi, %ebx
movq 0x40(%rsp), %r14
movq 0x58(%rsp), %r12
movq 0x50(%rsp), %r13
movq 0x48(%rsp), %rbp
movq %r9, %rdi
movl %ebx, %esi
callq 0x23f36
movl %ebx, %edi
movq %r15, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x4a4d2
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
movq %rbp, %rcx
movq %r14, %r8
callq 0x2400a
testl %ebx, %ebx
jle 0x23f27
cvtsi2ss %ebx, %xmm0
movss %xmm0, 0x4(%rsp)
movq 0x60(%rsp), %r15
movl %ebx, %r12d
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
movl %ebx, %esi
callq 0x110b6
divss 0x4(%rsp), %xmm0
movss %xmm0, (%r15,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x23f08
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Compute_Hessian_INM
void Compute_Hessian_INM (double **Hessian, int N,
			  struct interaction *Int_list, int N_int,
			  atom *atoms)
{
  int i, j, n;

  for(i=0; i<N; i++)for(j=0; j<N; j++)Hessian[i][j]=0;

  for(n=0; n<N_int; n++){
    float h=Int_list[n].sec_der;
    i=(atoms+Int_list[n].i1)->res;
    j=(atoms+Int_list[n].i2)->res;
    Hessian[i][j]=-h; Hessian[j][i]=-h;
    Hessian[i][i]+=h; Hessian[j][j]+=h;
  }
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, 0x4(%rsp)
movq %rdx, %r14
movq %rdi, %r15
testl %esi, %esi
jle 0x23f75
movl %esi, %r13d
leaq (,%r13,8), %r12
xorl %ebp, %ebp
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2110
incq %rbp
cmpq %rbp, %r13
jne 0x23f5f
movl 0x4(%rsp), %eax
testl %eax, %eax
jle 0x23ffb
movl %eax, %eax
imulq $0xc8, %rax, %rax
xorl %ecx, %ecx
movaps 0x329a1(%rip), %xmm0    # 0x56930
xorps %xmm1, %xmm1
cvtsd2ss 0x28(%r14,%rcx), %xmm1
movslq (%r14,%rcx), %rdx
imulq $0x70, %rdx, %rdx
movslq 0x64(%rbx,%rdx), %rdx
movslq 0x4(%r14,%rcx), %rsi
imulq $0x70, %rsi, %rsi
movslq 0x64(%rbx,%rsi), %rsi
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
xorps %xmm0, %xmm1
movq (%r15,%rdx,8), %rdi
cvtss2sd %xmm1, %xmm1
movsd %xmm1, (%rdi,%rsi,8)
movq (%r15,%rsi,8), %r8
movsd %xmm1, (%r8,%rdx,8)
movsd (%rdi,%rdx,8), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, (%rdi,%rdx,8)
addsd (%r8,%rsi,8), %xmm2
movsd %xmm2, (%r8,%rsi,8)
addq $0xc8, %rcx
cmpq %rcx, %rax
jne 0x23f8f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Compute_Bfact_INM
int Compute_Bfact_INM(float *B_CA, float *eigen_B, int N,
		      float *eigen_value, float **eigen_vector)
{
  int ia, i; double B, B_ia;
  for(i=0; i<N; i++)eigen_B[i]=0;

  for(i=0; i<N; i++){
    B=0;
    for(ia=0; ia<N; ia++){
      if(eigen_value[ia] < E_MIN)continue;
      B_ia= eigen_vector[ia][i]*eigen_vector[ia][i]/eigen_value[ia];
      B += B_ia; eigen_B[ia]+=B_ia;
    }
    B_CA[i]=B;
  }
  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movl %edx, %r13d
testl %edx, %edx
jle 0x2403c
leaq (,%r13,4), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2110
testl %ebp, %ebp
jle 0x240a0
xorl %eax, %eax
leaq 0x450ab(%rip), %rcx     # 0x690f4
xorpd %xmm0, %xmm0
xorl %edx, %edx
movss (%r14,%rdx,4), %xmm1
movss (%rcx), %xmm2
ucomiss %xmm1, %xmm2
ja 0x24086
movq (%rbx,%rdx,8), %rsi
movss (%rsi,%rax,4), %xmm2
mulss %xmm2, %xmm2
divss %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
addsd %xmm1, %xmm0
addss (%r15,%rdx,4), %xmm2
movss %xmm2, (%r15,%rdx,4)
incq %rdx
cmpq %rdx, %r13
jne 0x2404f
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%rax,4)
incq %rax
cmpq %r13, %rax
jne 0x24049
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Compute_Bfact_ANM
int Compute_Bfact_ANM(float *B_CA, float *eigen_B, float *eigen_value,
		      float **eigen_vector, int N, int N_atoms)
{
  int ia, i_atom, j, k;
  double B, B_ia; float *ev;

  for(ia=0; ia< N; ia++)eigen_B[ia]=0;
  for(i_atom=0; i_atom<N_atoms; i_atom++){
    k = 3*i_atom; B=0;
    for(ia=0; ia< N; ia++){
      if(eigen_value[ia] < E_MIN)continue;
      ev=eigen_vector[ia]+k; B_ia=0;
      for(j=0; j<3; j++){B_ia += (*ev)*(*ev); ev++;}
      B_ia /= eigen_value[ia];
      B += B_ia; eigen_B[ia]+=B_ia;
    }
    B_CA[i_atom]=B;
  }
  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl %r8d, %ebp
testl %r8d, %r8d
jle 0x243a8
leaq (,%rbp,4), %rdx
movq %r12, %rdi
xorl %esi, %esi
movl %r9d, 0x4(%rsp)
callq 0x2110
movl 0x4(%rsp), %r9d
testl %r9d, %r9d
jle 0x2444b
movl %r9d, %eax
xorl %ecx, %ecx
leaq 0x44d37(%rip), %rdx     # 0x690f4
xorl %esi, %esi
testl %ebx, %ebx
jle 0x24431
xorpd %xmm0, %xmm0
xorl %edi, %edi
movss (%r15,%rdi,4), %xmm1
movss (%rdx), %xmm2
ucomiss %xmm1, %xmm2
ja 0x24423
movq (%r14,%rdi,8), %r8
addq %rcx, %r8
xorps %xmm2, %xmm2
xorl %r9d, %r9d
movss (%r8,%r9,4), %xmm3
mulss %xmm3, %xmm3
cvtss2sd %xmm3, %xmm3
addsd %xmm3, %xmm2
incq %r9
cmpl $0x3, %r9d
jne 0x243e5
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm2
addsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12,%rdi,4), %xmm1
addsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, (%r12,%rdi,4)
incq %rdi
cmpq %rbp, %rdi
jne 0x243c9
cvtsd2ss %xmm0, %xmm0
jmp 0x24434
xorps %xmm0, %xmm0
movss %xmm0, (%r13,%rsi,4)
incq %rsi
addq $0xc, %rcx
cmpq %rax, %rsi
jne 0x243bf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Transform_tors_modes
void Transform_tors_modes(float *Tors_mode, float *Masswtd_Tors_mode,
			  float **T_sqrt_tr, float **T_sqrt_inv_tr,
			  int N_modes, int N_axes)
{
  int ib, j;
  float *Mw_ev=Masswtd_Tors_mode;
  float *ev=Tors_mode;

  if(KINETIC==0){
    for(ib=0; ib<N_modes; ib++){
      *ev=*Mw_ev; ev++; Mw_ev++;
    }
  }else if(T_sqrt_inv_tr){
    // ev= T_sqrt_inv Masswtd_ev
    for(ib=0; ib<N_axes; ib++){
      double sum=0; float *t=T_sqrt_inv_tr[ib];
      Mw_ev=Masswtd_Tors_mode;
      for(j=0; j<N_modes; j++){
	sum+=(*Mw_ev)*(*t); Mw_ev++; t++;
      }
      *ev=sum; ev++;
    }
  }else{
    // Solve (L^t)EV = Mw_EV by backward_substitution
    // x_i =(v_i - sum_j>i L_ji x_j)/L_ii
    double x[N_modes];
    int nn=N_modes-1;
    double *x1=x+nn; Mw_ev=Masswtd_Tors_mode+nn; ev=Tors_mode+nn;
    for(ib=nn; ib>=0; ib--){
      *x1=*Mw_ev; double *x2=x1+1; float *t=T_sqrt_tr[ib]+ib+1;
      for(j=ib+1; j<N_modes; j++){*x1-= (*x2)*(*t); t++; x2++;}
      (*x1)/=T_sqrt_tr[ib][ib];
      *ev=*x1; ev--; Mw_ev--; x1--;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x44196(%rip), %rax     # 0x68604
cmpl $0x0, (%rax)
je 0x244d8
testq %rcx, %rcx
je 0x244fc
testl %r9d, %r9d
jle 0x245cd
movl %r9d, %eax
movl %r8d, %edx
xorl %r9d, %r9d
testl %r8d, %r8d
jle 0x244c0
movq (%rcx,%r9,8), %r10
xorpd %xmm0, %xmm0
xorl %r11d, %r11d
movss (%rsi,%r11,4), %xmm1
mulss (%r10,%r11,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r11
cmpl %r11d, %edx
jne 0x2449e
cvtsd2ss %xmm0, %xmm0
jmp 0x244c3
xorps %xmm0, %xmm0
movss %xmm0, (%rdi)
addq $0x4, %rdi
incq %r9
cmpq %rax, %r9
jne 0x2448e
jmp 0x245cd
testl %r8d, %r8d
jle 0x245cd
movl %r8d, %eax
xorl %ecx, %ecx
movss (%rsi,%rcx,4), %xmm0
movss %xmm0, (%rdi,%rcx,4)
incq %rcx
cmpl %ecx, %eax
jne 0x244e6
jmp 0x245cd
movq %rsp, %rax
movl %r8d, %ecx
movq %rsp, %r9
leaq 0xf(,%rcx,8), %r10
andq $-0x10, %r10
subq %r10, %r9
movq %r9, %rsp
testl %r8d, %r8d
jle 0x245ca
movslq %r8d, %r10
decl %r8d
leaq (%rdi,%r10,4), %rdi
addq $-0x4, %rdi
leaq (%rsi,%r10,4), %rsi
addq $-0x4, %rsi
leaq (%r9,%r10,8), %r9
addq $-0x8, %r9
leaq 0x4(,%r8,4), %r10
xorl %r11d, %r11d
movq %r9, %rbx
xorps %xmm0, %xmm0
cvtss2sd (%rsi), %xmm0
movsd %xmm0, (%rbx)
movq (%rdx,%r8,8), %r14
leaq 0x1(%r8), %r15
cmpq %rcx, %r15
jge 0x2458f
movsd (%rbx), %xmm0
leaq (%r14,%r10), %r15
movq %r11, %r12
xorps %xmm1, %xmm1
cvtss2sd (%r15,%r12,4), %xmm1
mulsd 0x8(%r9,%r12,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
incq %r12
testl %r12d, %r12d
jne 0x2456f
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r8,4), %xmm0
movsd (%rbx), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, (%rdi)
addq $-0x4, %rdi
addq $-0x4, %rsi
addq $-0x8, %rbx
leaq -0x1(%r8), %r14
decq %r11
testq %r8, %r8
movq %r14, %r8
jg 0x2454c
movq %rax, %rsp
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Transform_tors_modes_old
void Transform_tors_modes_old(float *Tors_mode, float *Masswtd_Tors_mode,
			      double **T_sqrt, double **T_sqrt_inv,
			      int N_modes, int N_axes)
{
  int ib, j;
  float *Mw_ev=Masswtd_Tors_mode;
  float *ev=Tors_mode;

  if(KINETIC==0){
    for(ib=0; ib<N_modes; ib++)ev[ib]=Mw_ev[ib];
  }else if(T_sqrt_inv){
    // ev= T_sqrt_inv Masswtd_ev
    for(ib=0; ib<N_axes; ib++){
      double sum=0;
      for(j=0; j<N_modes; j++)sum+=Mw_ev[j]*T_sqrt_inv[j][ib];
      ev[ib]=sum;
    }
  }else{
    // Solve (L^t)EV = M_EV by backward_substitution
    // x_i =(v_i - sum_j>i L_ji x_j)/L_ii
    double *x=malloc(N_modes*sizeof(double));
    for(ib=N_modes-1; ib>=0; ib--){
      x[ib]=Mw_ev[ib];
      for(j=ib+1; j<N_modes; j++)x[ib]-= x[j]*T_sqrt[j][ib];
      x[ib]/=T_sqrt[ib][ib];
      ev[ib]=x[ib];
    }
    free(x);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x44013(%rip), %rax     # 0x68604
cmpl $0x0, (%rax)
je 0x24648
testq %rcx, %rcx
je 0x2466e
testl %r9d, %r9d
jle 0x24663
movl %r9d, %eax
movl %ebp, %edx
xorl %esi, %esi
testl %ebp, %ebp
jle 0x24635
xorpd %xmm0, %xmm0
xorl %edi, %edi
xorps %xmm1, %xmm1
cvtss2sd (%rbx,%rdi,4), %xmm1
movq (%rcx,%rdi,8), %r8
mulsd (%r8,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rdx
jne 0x24611
cvtsd2ss %xmm0, %xmm0
jmp 0x24638
xorps %xmm0, %xmm0
movss %xmm0, (%r14,%rsi,4)
incq %rsi
cmpq %rax, %rsi
jne 0x24607
jmp 0x24663
testl %ebp, %ebp
jle 0x24663
movl %ebp, %eax
xorl %ecx, %ecx
movss (%rbx,%rcx,4), %xmm0
movss %xmm0, (%r14,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x24650
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movslq %ebp, %rdi
shlq $0x3, %rdi
callq 0x21d0
testl %ebp, %ebp
jle 0x2470a
movl %ebp, %ecx
leaq (%r15,%rcx,8), %rdx
leaq (%rax,%rcx,8), %rsi
movq %rcx, %rdi
leaq -0x1(%rdi), %r8
xorps %xmm0, %xmm0
cvtss2sd -0x4(%rbx,%rdi,4), %xmm0
movsd %xmm0, -0x8(%rax,%rdi,8)
cmpq %rcx, %rdi
jge 0x246d9
movsd (%rax,%r8,8), %xmm0
xorl %r9d, %r9d
movsd (%rsi,%r9,8), %xmm1
movq (%rdx,%r9,8), %r10
mulsd (%r10,%r8,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r8,8)
incq %r9
leal (%rdi,%r9), %r10d
cmpl %ebp, %r10d
jl 0x246b3
movq (%r15,%r8,8), %r9
movsd (%rax,%r8,8), %xmm0
divsd (%r9,%r8,8), %xmm0
movsd %xmm0, (%rax,%r8,8)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r14,%r8,4)
addq $-0x8, %rdx
addq $-0x8, %rsi
cmpq $0x1, %rdi
movq %r8, %rdi
jg 0x24692
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Axes_path
void Axes_path(int *main1, int *main2, int *side1, int *side2,
	       struct axe *axes, int i, int nmain, int naxes)
{
  *main1=-1; *main2=-1; *side1=-1; *side2=-1;
  if(i < nmain){
    *main1=axes[i].first_main;
    *main2=i;
  }else{
    *main1=axes[i].first_main;
    *main2=axes[i].last_main;
    *side1=axes[i].first_side;
    *side2=i;
  }
  if((*main2 >= nmain) ||
     (*main2 < *main1)||
     (*side2 < *side1)||
     (*side2>=naxes)){
    printf("ERROR, wrong axes path\n");
    printf("i= %d res= %d main1= %d res=%d main2= %d res=%d",
	   i, (axes[i].bond)->atom->res,
	   *main1, (axes[*main1].bond)->atom->res,
	   *main2, (axes[*main2].bond)->atom->res);
    if(*side1>=0)
      printf(" side1= %d res=%d side2= %d res=%d\n",
	     *side1, (axes+*side1)->bond->atom->res,
	     *side2, (axes[*side2].bond)->atom->res);
    exit(8);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x50(%rsp), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, (%rdi)
movl %ecx, (%rsi)
movl %ecx, (%rdx)
movl %ecx, (%r14)
movslq %r9d, %rbx
imulq $0x158, %rbx, %rcx      # imm = 0x158
cmpl %eax, %r9d
jge 0x25b25
addq %r8, %rcx
addq $0x20, %rcx
movq %r13, %rdx
movq %r12, %rsi
jmp 0x25b40
addq %r8, %rcx
addq $0x28, %rcx
movl -0x8(%rcx), %edx
movl %edx, (%r13)
movl -0x4(%rcx), %edx
movl %edx, (%r12)
movq %r15, %rdx
movq %r14, %rsi
movl (%rcx), %ecx
movl %ecx, (%rdx)
movl %ebp, (%rsi)
movl (%r12), %ecx
cmpl %eax, %ecx
jge 0x25b71
cmpl (%r13), %ecx
jl 0x25b71
movl (%r14), %eax
cmpl 0x58(%rsp), %eax
jge 0x25b71
cmpl (%r15), %eax
jl 0x25b71
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x339de(%rip), %rdi     # 0x59556
movq %r8, 0x10(%rsp)
callq 0x2090
imulq $0x158, %rbx, %rax      # imm = 0x158
movq 0x10(%rsp), %rsi
movq 0x8(%rsi,%rax), %rax
movq (%rax), %rax
movl 0x64(%rax), %edx
movslq (%r13), %rcx
imulq $0x158, %rcx, %rax      # imm = 0x158
movq 0x8(%rsi,%rax), %rax
movq (%rax), %rax
movl 0x64(%rax), %r8d
movslq (%r12), %r9
imulq $0x158, %r9, %rax       # imm = 0x158
movq %rsi, %rbx
movq 0x8(%rsi,%rax), %rax
movq (%rax), %rax
movl 0x64(%rax), %eax
movl %eax, (%rsp)
leaq 0x33805(%rip), %rdi     # 0x593d8
movl %ebp, %esi
xorl %eax, %eax
callq 0x20f0
movslq (%r15), %rsi
testq %rsi, %rsi
js 0x25c1a
imulq $0x158, %rsi, %rax      # imm = 0x158
movq 0x8(%rbx,%rax), %rax
movq (%rax), %rax
movl 0x64(%rax), %edx
movslq (%r14), %rcx
imulq $0x158, %rcx, %rax      # imm = 0x158
movq 0x8(%rbx,%rax), %rax
movq (%rax), %rax
movl 0x64(%rax), %r8d
leaq 0x337f5(%rip), %rdi     # 0x59408
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Select_atoms
int Select_atoms(int *atom_num,  atom *atoms, int N_atoms, char *SEL)
{
  // if ali=1 select only aligned atoms, otherwise select all
  int i_atom, n=0; atom *atom1=atoms;
  for(i_atom=0; i_atom<N_atoms; i_atom++){
    if(Selection(atom1->name, atom1, SEL)){
	atom_num[n]=i_atom; n++;
    }
    atom1++;
  }
  return(n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edx, %edx
jle 0x25e64
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
xorl %r13d, %r13d
leaq 0x18(%r15), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x27218
testl %eax, %eax
je 0x25e56
movslq %r14d, %r14
movl %r13d, (%r12,%r14,4)
incl %r14d
addq $0x70, %r15
incl %r13d
cmpl %r13d, %ebp
jne 0x25e39
jmp 0x25e67
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Mass
float Mass(atom *atom){
  char *atom_name=atom->name;
  if(atom_name[0]=='C')return(12);
  if(atom_name[0]=='N')return(14); // Adding one hydrogen atom mass
  if(atom_name[0]=='O')return(16);
  if(atom_name[0]=='H')return(1);
  if(atom_name[0]=='P')return(31);
  if(strncmp(atom_name, "SE", 2)==0)return(79); // Selenium
  if(atom_name[0]=='S')return(32);
  printf("WARNING, unusual atom %s\n", atom_name);
  return(12);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x18(%rdi), %bpl
movzbl %bpl, %eax
movss 0x32e4d(%rip), %xmm0    # 0x58cdc
leal -0x48(%rax), %ecx
cmpl $0x8, %ecx
ja 0x25eb1
leaq 0x32dae(%rip), %rax     # 0x58c4c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movss 0x2b161(%rip), %xmm0    # 0x51010
jmp 0x25f23
cmpl $0x43, %eax
je 0x25f23
addq $0x18, %rbx
leaq 0x32fd9(%rip), %rsi     # 0x58e9a
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2070
testl %eax, %eax
je 0x25f00
cmpb $0x53, %bpl
jne 0x25f0a
movss 0x32e10(%rip), %xmm0    # 0x58cf0
jmp 0x25f23
movss 0x32dfa(%rip), %xmm0    # 0x58ce4
jmp 0x25f23
movss 0x32dec(%rip), %xmm0    # 0x58ce0
jmp 0x25f23
movss 0x32dea(%rip), %xmm0    # 0x58ce8
jmp 0x25f23
movss 0x32de4(%rip), %xmm0    # 0x58cec
jmp 0x25f23
leaq 0x32f6f(%rip), %rdi     # 0x58e80
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
movss 0x32db9(%rip), %xmm0    # 0x58cdc
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Align_references
int Align_references(struct ali_atoms *ali_atoms,
		     struct Reference Ref1, atom *atoms1)
{
  int N_ref=Ref1.N_ref;
  ali_atoms->ali1=malloc(N_ref*sizeof(int));
  ali_atoms->ali2=malloc(N_ref*sizeof(int));
  ali_atoms->mass=malloc(N_ref*sizeof(float));
  int iali=0;
  for(int i=0; i<N_ref; i++){
    int j=atoms1[Ref1.atom_num[i]].ali;
    if(j>=0){
      ali_atoms->ali1[iali]=Ref1.atom_num[i];
      ali_atoms->ali2[iali]=j;
      ali_atoms->mass[iali]=Ref1.mass_atom[i];
      iali++;
    }
  }
  printf("%d aligned reference atoms\n", iali);
  ali_atoms->N_ref=iali; ali_atoms->N_Cart=3*iali;
  return(iali);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x40(%rsp), %rbp
leaq (,%rbp,4), %r13
movq %r13, %rdi
callq 0x21d0
movq %rax, %r15
movq %rax, (%rbx)
movq %r13, %rdi
callq 0x21d0
movq %rax, %r12
movq %rax, 0x8(%rbx)
movq %r13, %rdi
callq 0x21d0
movq %rax, 0x10(%rbx)
testq %rbp, %rbp
jle 0x25fbd
leaq 0x40(%rsp), %rdx
movq 0x10(%rdx), %rcx
movq 0x28(%rdx), %rdx
xorl %esi, %esi
xorl %r13d, %r13d
movslq (%rdx,%rsi,4), %rdi
imulq $0x70, %rdi, %r8
movl 0x54(%r14,%r8), %r8d
testl %r8d, %r8d
js 0x25fb3
movslq %r13d, %r13
movl %edi, (%r15,%r13,4)
movl %r8d, (%r12,%r13,4)
movss (%rcx,%rsi,4), %xmm0
movss %xmm0, (%rax,%r13,4)
incl %r13d
incq %rsi
cmpq %rsi, %rbp
jne 0x25f88
jmp 0x25fc0
xorl %r13d, %r13d
leaq 0x32de9(%rip), %rdi     # 0x58db0
movl %r13d, %esi
xorl %eax, %eax
callq 0x20f0
movl %r13d, 0x18(%rbx)
leal (%r13,%r13,2), %eax
movl %eax, 0x1c(%rbx)
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Match_references
void Match_references(int *kin_cc, struct Reference Ref1, struct Reference Ref)
{
  // kin_cc[i] = Kinetic atom corresponding to ref atom i in Ref1
  int j=0;
  for(int i=0; i<Ref1.N_ref; i++){
    while(Ref.atom_num[j]!=Ref1.atom_num[i])j++;
    if(j>=Ref.N_ref){
      printf("ERROR, unmatched reference %d atom %d out of %d %d\n",
	     i, Ref1.atom_num[i], Ref1.N_ref, Ref.N_ref); exit(8);
    }
    kin_cc[i]=j;
  }
}

// Assembly:
pushq %rax
movslq 0x10(%rsp), %rcx
testq %rcx, %rcx
jle 0x2603c
leaq 0x40(%rsp), %rdx
leaq 0x10(%rsp), %rsi
movq 0x28(%rdx), %rax
movq 0x28(%rsi), %r9
movl (%rdx), %r8d
xorl %esi, %esi
xorl %r10d, %r10d
movl (%r9,%rsi,4), %edx
movslq %r10d, %r10
decq %r10
movq %r10, %r11
incq %r10
cmpl %edx, 0x4(%rax,%r11,4)
jne 0x2601e
cmpl %r10d, %r8d
jle 0x2603e
movl %r10d, (%rdi,%rsi,4)
incq %rsi
cmpq %rcx, %rsi
jne 0x26014
popq %rax
retq
leaq 0x32d87(%rip), %rdi     # 0x58dcc
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Empty_Ref
void Empty_Ref(struct Reference *Ref){
  free(Ref->atom_num);
  free(Ref->mass_atom);
  free(Ref->mass_coord);
  free(Ref->mass_sqrt);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/nma.c
// Function: Compute_MW
void Compute_MW(float *MW_Tors, float *Tors, struct Jacobian *J){
  // Compute Masswtd_Tors_dev = T_sqrt Delta_theta
  int N=J->N_axes, a, b;
  for(a=0; a<N; a++){
    double W=0;
    if(J->T_sqrt_inv){ // T_sqrt is not lower diagonal! DMW =L^t Dtheta
      for(b=0; b<N; b++)W+=J->T_sqrt[b][a]*Tors[b];
    }else{  // b<a
      for(b=a; b<N; b++)W+=J->T_sqrt[b][a]*Tors[b];
    }
    MW_Tors[a]=W;
  }
}

// Assembly:
movslq (%rdx), %rax
testq %rax, %rax
jle 0x26abd
pushq %r15
pushq %r14
pushq %rbx
movq 0x30(%rdx), %rcx
xorl %r8d, %r8d
movq %rax, %r9
movq %rsi, %r10
xorl %r11d, %r11d
testq %rcx, %rcx
je 0x26a6e
movq 0x28(%rdx), %rbx
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movq (%rbx,%r14,8), %r15
xorps %xmm1, %xmm1
cvtss2sd (%rsi,%r14,4), %xmm1
mulsd (%r15,%r11,8), %xmm1
addsd %xmm1, %xmm0
incq %r14
cmpq %r14, %rax
jne 0x26a4d
jmp 0x26a9b
movq 0x28(%rdx), %rbx
addq %r8, %rbx
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movq (%rbx,%r14,8), %r15
xorps %xmm1, %xmm1
cvtss2sd (%r10,%r14,4), %xmm1
mulsd (%r15,%r11,8), %xmm1
addsd %xmm1, %xmm0
incq %r14
cmpq %r14, %r9
jne 0x26a7c
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rdi,%r11,4)
incq %r11
addq $0x4, %r10
addq $0x8, %r8
decq %r9
cmpq %rax, %r11
jne 0x26a3d
popq %rbx
popq %r14
popq %r15
retq