LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/nma.c
// Function: Compute_force
void Compute_force(struct Tors *Force, float *cc, struct Normal_Mode NM)
{
  // Compute force from projection of conformation change on normal modes
  int i, a;
  Force->Cart=malloc(NM.N_Cart*sizeof(float));
  for(i=0; i<NM.N_Cart; i++)Force->Cart[i]=0;
  Force->Tors=malloc(NM.N_axes*sizeof(float));
  Force->MW_Tors=malloc(NM.N_axes*sizeof(float));
  for(i=0; i<NM.N_axes; i++){Force->Tors[i]=0; Force->MW_Tors[i]=0;}
  Force->coeff=malloc(NM.N*sizeof(float));
  for(a=0; a<NM.N_relevant; a++){
    if((NM.select[a]==0)||(NM.sigma2[a]==0))continue;
    float c=NM.omega2[a]*cc[a];
    float *x=NM.Cart[a], *u=NM.Tors[a], *w=NM.MW_Tors[a];
    for(i=0; i<NM.N_Cart; i++){Force->Cart[i]+=c*(*x); x++;}
    for(i=0; i<NM.N_axes; i++){
      Force->Tors[i]+=c*(*u); u++;
      Force->MW_Tors[i]+=c*(*w); w++;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
leaq 0x50(%rsp), %r15
movslq 0xc(%r15), %rbx
movq %rbx, %rdi
shlq $0x2, %rdi
callq 0x21d0
movq %rax, %r14
movq %r12, (%rsp)
movq %rax, 0x8(%r12)
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ebp
cmovgl %ebx, %ebp
cmpq %rax, %rbp
je 0x267f8
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x267e9
movslq 0x8(%r15), %r13
movq %r13, %r12
shlq $0x2, %r12
movq %r12, %rdi
callq 0x21d0
movq %rax, %r15
movq (%rsp), %rbx
movq %rax, 0x18(%rbx)
movq %r12, %rdi
callq 0x21d0
movq %rax, %r12
movq %rax, 0x10(%rbx)
xorl %eax, %eax
testl %r13d, %r13d
movl $0x0, %ebx
cmovgl %r13d, %ebx
cmpq %rax, %rbx
je 0x26847
andl $0x0, (%r15,%rax,4)
andl $0x0, (%r12,%rax,4)
incq %rax
jmp 0x26833
leaq 0x50(%rsp), %r13
movslq (%r13), %rdi
shlq $0x2, %rdi
callq 0x21d0
movq (%rsp), %rcx
movq %rax, 0x20(%rcx)
movl 0x10(%r13), %eax
movq 0xc0(%r13), %rcx
movq 0x28(%r13), %rdx
movq 0x20(%r13), %rsi
movq %rsi, (%rsp)
movq 0x38(%r13), %rsi
movq %rsi, 0x8(%rsp)
movq 0x40(%r13), %r8
movq 0x48(%r13), %r9
xorl %r10d, %r10d
testl %eax, %eax
cmovlel %r10d, %eax
xorps %xmm0, %xmm0
cmpq %rax, %r10
je 0x26937
cmpl $0x0, (%rcx,%r10,4)
je 0x268b2
movss (%rdx,%r10,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0x268b7
jp 0x268b7
incq %r10
jmp 0x26895
movq (%rsp), %rsi
movss (%rsi,%r10,4), %xmm1
movq 0x10(%rsp), %rsi
mulss (%rsi,%r10,4), %xmm1
movq 0x8(%rsp), %rsi
movq (%rsi,%r10,8), %rsi
movq (%r8,%r10,8), %r11
movq (%r9,%r10,8), %r13
xorl %edi, %edi
cmpq %rdi, %rbp
je 0x268fe
movss (%rsi,%rdi,4), %xmm2
mulss %xmm1, %xmm2
addss (%r14,%rdi,4), %xmm2
movss %xmm2, (%r14,%rdi,4)
incq %rdi
jmp 0x268df
xorl %esi, %esi
cmpq %rsi, %rbx
je 0x268b2
movss (%r11,%rsi,4), %xmm2
mulss %xmm1, %xmm2
addss (%r15,%rsi,4), %xmm2
movss %xmm2, (%r15,%rsi,4)
movss (%r13,%rsi,4), %xmm2
mulss %xmm1, %xmm2
addss (%r12,%rsi,4), %xmm2
movss %xmm2, (%r12,%rsi,4)
incq %rsi
jmp 0x26900
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/nma.c
// Function: Cartesian_force
void Cartesian_force(float *Cart_force, float *atom_diff,
		     double **Hessian,int N_Cart)
{
  int i, j;
  for(i=0; i<N_Cart; i++){
    double sum=0;
    for(j=0; j<N_Cart; j++)sum+=Hessian[i][j]*atom_diff[j];
    Cart_force[i]=sum;
  }
}

// Assembly:
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %r8d
cmovgl %ecx, %r8d
movl %ecx, %ecx
cmpq %r8, %rax
je 0x2698e
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x26980
movq (%rdx,%rax,8), %r10
cvtss2sd (%rsi,%r9,4), %xmm1
mulsd (%r10,%r9,8), %xmm1
addsd %xmm1, %xmm0
incq %r9
jmp 0x26962
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rdi,%rax,4)
incq %rax
jmp 0x26956
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/nma.c
// Function: Torsional_force
void Torsional_force(struct Tors Force, struct Tors *Diff, double **Hessian,
		     int N_axes, int N_ref, int *atom_num,
		     float **Jacobian_ar, int N_int,
		     struct interaction *Int_list, atom *atoms, int natoms)
{
  int N_Cart=3*N_ref, i, j, a; double sum;
  for(i=0; i<N_axes; i++){
    sum=0;
    for(j=0; j<N_axes; j++)sum += Hessian[i][j]*Diff->MW_Tors[j];
    Force.Tors[i]=sum;
  }
  // Cartesian force fr= HrJDelta_theta
  float dr[N_Cart];
  for(i=0; i<N_Cart; i++){
    sum=0; for(a=0; a<N_axes; a++)sum+=Jacobian_ar[a][i]*Diff->Tors[a];
    dr[i]=sum;
  }
  double **H=Allocate_mat2_d(N_Cart, N_Cart);
  Compute_Hessian_ANM(H,N_ref,atom_num,Int_list,N_int,atoms,natoms);
  for(i=0; i<N_Cart; i++){
    sum=0; for(j=0; j<N_Cart; j++)sum += H[i][j]*dr[j];
    Force.Cart[i]=sum;
  }
  Empty_matrix_d(H, N_Cart);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, -0x50(%rbp)
movl %ecx, %r14d
movl 0x68(%rbp), %eax
movq %rax, -0x48(%rbp)
movq 0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movl 0x50(%rbp), %eax
movl %eax, -0x2c(%rbp)
leaq 0x10(%rbp), %r8
xorl %ecx, %ecx
testl %edx, %edx
movl $0x0, %eax
cmovgl %edx, %eax
movl %edx, %edx
movq 0x18(%r8), %r8
cmpq %rax, %rcx
je 0x26a17
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
cmpq %r10, %rdx
je 0x26a08
movq (%rsi,%rcx,8), %r11
movq 0x10(%rdi), %rbx
cvtss2sd (%rbx,%r10,4), %xmm1
mulsd (%r11,%r10,8), %xmm1
addsd %xmm1, %xmm0
incq %r10
jmp 0x269e6
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r8,%rcx,4)
incq %rcx
jmp 0x269da
leal (%r14,%r14,2), %ebx
leaq 0xf(,%rbx,4), %rcx
andq $-0x10, %rcx
movq %rsp, %r12
subq %rcx, %r12
movq %r12, %rsp
xorl %ecx, %ecx
testl %ebx, %ebx
movl %ebx, %r13d
cmovlel %ecx, %r13d
cmpq %r13, %rcx
je 0x26a78
xorps %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rax
je 0x26a69
movq (%r9,%rdx,8), %rsi
movss (%rsi,%rcx,4), %xmm1
movq 0x18(%rdi), %rsi
mulss (%rsi,%rdx,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x26a45
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%rcx,4)
incq %rcx
jmp 0x26a3b
movl %ebx, %edi
movl %ebx, %esi
callq 0x43878
movq %rax, %r15
subq $0x8, %rsp
movq %rax, %rdi
movl %r14d, %esi
movq -0x50(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x40(%rbp), %r9
pushq -0x48(%rbp)
callq 0x21885
addq $0x10, %rsp
leaq 0x10(%rbp), %rax
movq 0x8(%rax), %rax
xorl %ecx, %ecx
cmpq %r13, %rcx
je 0x26ae9
xorps %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rbx
je 0x26adb
movq (%r15,%rcx,8), %rsi
cvtss2sd (%r12,%rdx,4), %xmm1
mulsd (%rsi,%rdx,8), %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x26abe
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rax,%rcx,4)
incq %rcx
jmp 0x26ab4
movq %r15, %rdi
movl %ebx, %esi
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4372a
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/nma.c
// Function: Compute_Max_dev
float Compute_Max_dev(float *Cart_mode, float omega2, int N_Cart,
		      float *mass_sqrt)
{
  float Max_dev=0; int i;
  for(i=0; i< N_Cart; i++){
    float x=fabs(Cart_mode[i]); //*mass_sqrt[i];
    if(x>Max_dev)Max_dev=x;
  }
  return(Max_dev/sqrt(omega2));
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
xorps %xmm2, %xmm2
movaps 0x2a71e(%rip), %xmm1    # 0x51230
cmpq %rax, %rsi
je 0x26b2b
movss (%rdi,%rax,4), %xmm3
andps %xmm1, %xmm3
maxss %xmm2, %xmm3
incq %rax
movaps %xmm3, %xmm2
jmp 0x26b12
cvtss2sd %xmm2, %xmm2
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x26b42
sqrtsd %xmm0, %xmm0
jmp 0x26b56
pushq %rax
movsd %xmm2, (%rsp)
callq 0x2290
movsd (%rsp), %xmm2
addq $0x8, %rsp
divsd %xmm0, %xmm2
cvtsd2ss %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/nma.c
// Function: Tors_outliers
void Tors_outliers(int *outlier_tors, int naxe, int *outlier, int Na,
		   struct axe *axe, struct chain *chains, int Nchain)
{
  int a=0, a_ini=0;
  for(a=0; a<naxe; a++)outlier_tors[a]=0;
  for(int c=0; c<Nchain; c++){
    struct chain *ch=chains+c;
    int i=ch->ini_res, end_res=ch->ini_res+ch->nres-1;
    while(1){
      if((outlier[i]==0)&&(outlier[i+1]==0))break;
      while(1){
	int a=Get_tors(axe, naxe, i, a_ini);
	if(a>=0){outlier_tors[a]=1; a_ini=a+1;}
	else{break;}
      }
      i++; if(i>=end_res)break;
    }
    i=end_res;
    while(1)
    	{if((outlier[i]==0)&&(outlier[i-1]==0))break;
      	 while(1){
			int a=Get_tors(axe, naxe, i, a_ini);
			if(a>=0){outlier_tors[a]=1; a_ini=a+1;}
			else{break;}
      		}
      	i--;
      	if(i<=ch->ini_res)break;
    	}
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r14
movq %rdx, (%rsp)
movl %esi, %ebp
movq %rdi, %r12
movl 0x60(%rsp), %edx
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
cmpq %rax, %rcx
je 0x26b9d
andl $0x0, (%r12,%rax,4)
incq %rax
jmp 0x26b8e
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, 0x10(%rsp)
xorl %r13d, %r13d
cmpq 0x10(%rsp), %rax
je 0x26c7a
movq %rax, 0x20(%rsp)
imulq $0x70, %rax, %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, 0x18(%rsp)
movslq 0x18(%rcx,%rax), %r15
movl 0x1c(%rcx,%rax), %eax
addl %r15d, %eax
decl %eax
movslq %eax, %rbx
movq (%rsp), %rax
cmpl $0x0, (%rax,%r15,4)
jne 0x26c07
movq (%rsp), %rax
cmpl $0x0, 0x4(%rax,%r15,4)
jne 0x26c07
jmp 0x26c23
movl %eax, %ecx
movl $0x1, (%r12,%rcx,4)
incl %eax
movl %eax, %r13d
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x26c89
testl %eax, %eax
jns 0x26bf8
incq %r15
cmpq %rbx, %r15
jl 0x26bdf
movq 0x18(%rsp), %r15
movq (%rsp), %rax
cmpl $0x0, (%rax,%rbx,4)
jne 0x26c4e
movq (%rsp), %rax
cmpl $0x0, -0x4(%rax,%rbx,4)
jne 0x26c4e
jmp 0x26c6d
movl %eax, %ecx
movl $0x1, (%r12,%rcx,4)
incl %eax
movl %eax, %r13d
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x26c89
testl %eax, %eax
jns 0x26c3f
decq %rbx
movslq 0x18(%r15), %rax
cmpq %rax, %rbx
jg 0x26c28
movq 0x20(%rsp), %rax
incq %rax
jmp 0x26bac
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/nma.c
// Function: Get_tors
int Get_tors(struct axe *axe, int naxe, int res, int a_ini){
  for(int a=a_ini; a<naxe; a++){
    if((axe[a].bond)->atom->res == res){
      return(a);
    }else if((axe[a].bond)->atom->res > res){
      return(-1);
    }
  }
  return(-1);
}

// Assembly:
movslq %ecx, %rcx
movslq %esi, %rsi
imulq $0x158, %rcx, %rax      # imm = 0x158
addq %rax, %rdi
addq $0x8, %rdi
pushq $-0x1
popq %rax
cmpq %rsi, %rcx
jge 0x26cc1
movq (%rdi), %r8
movq (%r8), %r8
cmpl %edx, 0x64(%r8)
je 0x26cbf
jg 0x26cc1
incq %rcx
addq $0x158, %rdi            # imm = 0x158
jmp 0x26ca0
movl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/Fit_B_factors.c
// Function: Compute_correlation
float Compute_correlation(float **Cart_mode, float *sigma2,
			  int N_modes, int i1, int i2)
{
  int ia, k1=3*i1, k2=3*i2;
  double corr=0;
  for(ia=0; ia< N_modes; ia++){
    if(sigma2[ia]==0)continue;
    float *x1=Cart_mode[ia]+k1;
    float *x2=Cart_mode[ia]+k2;
    double xx=x1[0]*x2[0]+x1[1]*x2[1]+x1[2]*x2[2];
    corr += xx*sigma2[ia];
  }
  return(corr);
}

// Assembly:
leal (%rcx,%rcx,2), %eax
leal (%r8,%r8,2), %ecx
cltq
movslq %ecx, %rcx
xorl %r8d, %r8d
testl %edx, %edx
cmovlel %r8d, %edx
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cmpq %r8, %rdx
je 0x27732
movss (%rsi,%r8,4), %xmm2
ucomiss %xmm1, %xmm2
jne 0x276e9
jnp 0x2772d
movq (%rdi,%r8,8), %r9
movss 0x4(%r9,%rax,4), %xmm3
mulss 0x4(%r9,%rcx,4), %xmm3
movss (%r9,%rax,4), %xmm4
mulss (%r9,%rcx,4), %xmm4
addss %xmm3, %xmm4
movss 0x8(%r9,%rax,4), %xmm3
mulss 0x8(%r9,%rcx,4), %xmm3
addss %xmm4, %xmm3
cvtss2sd %xmm3, %xmm3
cvtss2sd %xmm2, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm2, %xmm0
incq %r8
jmp 0x276d7
cvtsd2ss %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/Fit_B_factors.c
// Function: Print_data
void Print_data(float **X, float *Y, int N, int Npar, char *name){
  char nameout[100];
  sprintf(nameout, "%s_Bfact_data_fits.dat", name);
  FILE *file_out=fopen(nameout, "w");
  printf("Writing %s\n", nameout);
  int a,i;
  /*float *norm=malloc(Npar*sizeof(float)); 
  for(a=0; a<Npar; a++){
    double sum=0;
    for(i=0; i<N; i++)sum+=X[i][a]*X[i][a];
    norm[a]=sqrt(sum/N);
    }*/
  fprintf(file_out, "#Y ENM const x y z xx xy xz yy yz zz\n");
  for(i=0; i<N; i++){
    fprintf(file_out, "%.3f\t",Y[i]);
    for(a=0; a<Npar; a++)fprintf(file_out, "%.3f\t",X[i][a]);
    fprintf(file_out, "\n");
  }
  fclose(file_out);
  //free(norm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebx
movl %edx, %r14d
movq %rsi, (%rsp)
movq %rdi, %r12
leaq 0x2bd88(%rip), %rsi     # 0x53858
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r8, %rdx
xorl %eax, %eax
callq 0x2260
leaq 0x29664(%rip), %rsi     # 0x51150
movq %rbp, %rdi
callq 0x2210
movq %rax, %r13
leaq 0x241a9(%rip), %rdi     # 0x4bca7
movq %rbp, %rsi
xorl %eax, %eax
callq 0x20f0
leaq 0x2bd60(%rip), %rdi     # 0x5386f
pushq $0x25
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x2280
testl %ebx, %ebx
cmovlel %r15d, %ebx
testl %r14d, %r14d
cmovlel %r15d, %r14d
movq %r14, 0x8(%rsp)
leaq 0x2bd5f(%rip), %rbp     # 0x53895
cmpq 0x8(%rsp), %r15
je 0x27b88
movq (%rsp), %rax
cvtss2sd (%rax,%r15,4), %xmm0
movq %r13, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x2190
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0x27b78
movq (%r12,%r15,8), %rax
cvtss2sd (%rax,%r14,4), %xmm0
movq %r13, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x2190
incq %r14
jmp 0x27b57
pushq $0xa
popq %rdi
movq %r13, %rsi
callq 0x2140
incq %r15
jmp 0x27b36
movq %r13, %rdi
callq 0x20c0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/Fit_B_factors.c
// Function: Find_outliers_mean
int Find_outliers_mean(int *outlier, float *y, int N, float sig){
  double y1=0; int i;
  for(i=0; i<N; i++)y1+=y[i];
  float max=sig*y1/N; int n=0;
  for(i=0; i<N; i++){
    if(outlier[i])continue;
    if(y[i]>max){outlier[i]=1; n++;}
  }
  return(n);
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
xorpd %xmm1, %xmm1
cmpq %rax, %rcx
je 0x27bc2
cvtss2sd (%rsi,%rax,4), %xmm2
addsd %xmm2, %xmm1
incq %rax
jmp 0x27baf
cvtss2sd %xmm0, %xmm0
mulsd %xmm0, %xmm1
cvtsi2sd %edx, %xmm0
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x27bfd
cmpl $0x0, (%rdi,%rdx,4)
jne 0x27bf8
movss (%rsi,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x27bf8
movl $0x1, (%rdi,%rdx,4)
incl %eax
incq %rdx
jmp 0x27bda
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/Fit_B_factors.c
// Function: Find_outliers_Z
int Find_outliers_Z(int *outlier, float *y, int N, float sig){
  double y1=0, y2=0; float *yy=y; int i;
  for(i=0; i<N; i++){
    y1+=*yy; y2+=(*yy)*(*yy); yy++;
  }
  y1/=N; y2=y2-N*y1*y1; if(N>1)y2=sqrt(y2/(N-1));
  float max=y1+sig*y2, min=y1-sig*y2; int n=0;
  for(i=0; i<N; i++){
    if(outlier[i])continue;
    if((y[i]>max)||(y[i]<min)){outlier[i]=1; n++;}
  }
  return(n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movapd %xmm0, %xmm3
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %r15d
cmovgl %edx, %r15d
xorpd %xmm0, %xmm0
cmpl %eax, %r15d
je 0x27c43
movss (%rbx,%rax,4), %xmm1
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
cvtps2pd %xmm2, %xmm1
addpd %xmm1, %xmm0
incq %rax
jmp 0x27c23
cvtsi2sd %edx, %xmm1
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
divsd %xmm1, %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
cmpl $0x2, %edx
jl 0x27c9b
decl %edx
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x27c7e
sqrtsd %xmm0, %xmm0
jmp 0x27c9b
movss %xmm3, 0xc(%rsp)
movapd %xmm2, 0x10(%rsp)
callq 0x2290
movapd 0x10(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
cvtss2sd %xmm3, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
subsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm1
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %r15
je 0x27ce5
cmpl $0x0, (%r14,%rcx,4)
jne 0x27ce0
movss (%rbx,%rcx,4), %xmm2
ucomiss %xmm0, %xmm2
ja 0x27cd6
ucomiss %xmm2, %xmm1
jbe 0x27ce0
movl $0x1, (%r14,%rcx,4)
incl %eax
incq %rcx
jmp 0x27cbb
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/Fit_B_factors.c
// Function: Fit_no_outliers
float Fit_no_outliers(int *outlier, float *XX, float *YY, int N,
		      float *slope, float *offset)
{
  int k=0; float X[N], Y[N];
  for(int i=0; i<N; i++){
    if(outlier[i])continue;
    X[k]=XX[i]; Y[k]=YY[i]; k++;
  }
  float r=Corr_coeff(X, Y, k, slope, offset);
  return(r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %ecx, %r10d
movq %rsp, %rax
leaq 0xf(,%r10,4), %r11
andq $-0x10, %r11
subq %r11, %rax
movq %rax, %rsp
movq %rsp, %r10
subq %r11, %r10
movq %r10, %rsp
xorl %ebx, %ebx
testl %ecx, %ecx
cmovlel %ebx, %ecx
xorl %r11d, %r11d
cmpq %rbx, %rcx
je 0x27d4c
cmpl $0x0, (%rdi,%rbx,4)
jne 0x27d47
movss (%rsi,%rbx,4), %xmm0
movslq %r11d, %r11
movss %xmm0, (%rax,%r11,4)
movss (%rdx,%rbx,4), %xmm0
movss %xmm0, (%r10,%r11,4)
incl %r11d
incq %rbx
jmp 0x27d20
movq %rax, %rdi
movq %r10, %rsi
movl %r11d, %edx
movq %r8, %rcx
movq %r9, %r8
callq 0xfe18
leaq -0x8(%rbp), %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/ridge_regression.c
// Function: Print_make_fit
void Print_make_fit(struct ridge_fit *F, float Lambda, char *what,
		    FILE *file_out, char *nameout, float *eval, float **evec,
		    float *yalpha, float *D, float **X, float *Y, float *ya2,
		    float E0, float Y2, float *A_ref, float *A_inf,
		    int Npar, int N, double *sum_x, double var_y)
{
  F->Lambda=Lambda;
  Score_computation(F, eval,evec,yalpha,ya2,D,E0,Y2,A_ref,A_inf,Npar,N);
  int a; for(a=0; a<Npar; a++)F->A[a]/=D[a];
  /*double sum=0; for(a=0; a<Npar; a++)sum+=F->A[a]*sum_x[a];
  F->dof[0]=F->A[0]*sum_x[0]/sum; // Internal fraction
  F->dof[1]=F->A[1]*N/sum;  // Translations
  F->dof[2]=1-F->dof[0]-F->dof[1]; // Rotations*/
  // Print
  fprintf(file_out,
	  "#\t%.3g\t%.3g\t%.3g\t%.3g\t%.3g\t%10s",
	  F->Lambda, F->Cv, F->E/var_y, F->LF_csi, F->LF_inf, what);
  if(P_FIT)for(a=0; a<Npar; a++)fprintf(file_out, "\t%.3g", F->A[a]);
  fprintf(file_out, "\n");

  if(VB2){
    char namefile[200];
    sprintf(namefile, "%s_%s.dat", nameout, what);
    FILE *file_o=fopen(namefile, "w"); int i, a;
    printf("Writing %s fit in %s\n", what, namefile);
    fprintf(file_o, "#A= ");
    for(i=0; i<Npar; i++)fprintf(file_o, " %.3g",F->A[i]);
    fprintf(file_o, "\n# Y ");
    for(i=0; i<Npar; i++)fprintf(file_o, " X%d", i+1);
    fprintf(file_o, "\n");
    fprintf(file_o, "#nu= %.3f\n", F->nu);
    fprintf(file_o, "#eval= ");
    for(i=0; i<Npar; i++)fprintf(file_o, " %.3g",eval[i]);
    fprintf(file_o, "\n");
    fprintf(file_o, "#Complete only_internal\n");
    for(i=0; i<N; i++){
      double Y=0;
      for(a=0; a<Npar; a++)Y+=F->A[a]*X[i][a];
      fprintf(file_o, "%.3f %.3f\n", Y, F->A[0]*X[i][0]);
    }
    fclose(file_o);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm3, (%rsp)
movq %r9, %r10
movq %r8, %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x40(%rsp), %r13
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %r9
movq 0x58(%rsp), %r11
movl 0x60(%rsp), %r12d
movl 0x68(%rsp), %ebp
movss %xmm0, 0xc(%rdi)
subq $0x8, %rsp
movq %rcx, %rsi
movq %rax, %rdx
movq %r10, %rcx
movaps %xmm1, %xmm0
movaps %xmm2, %xmm1
pushq %rbp
pushq %r12
pushq %r11
callq 0x28d95
addq $0x20, %rsp
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
cmpq %rax, %r12
je 0x28ce0
movq (%r14), %rcx
movss (%rcx,%rax,4), %xmm0
divss (%r13,%rax,4), %xmm0
movss %xmm0, (%rcx,%rax,4)
incq %rax
jmp 0x28cc2
cvtss2sd 0xc(%r14), %xmm0
cvtss2sd 0x14(%r14), %xmm1
cvtss2sd 0x10(%r14), %xmm2
divsd (%rsp), %xmm2
cvtss2sd 0x18(%r14), %xmm3
cvtss2sd 0x1c(%r14), %xmm4
leaq 0x2ae74(%rip), %rsi     # 0x53b7e
movq %rbx, %rdi
movq %r15, %rdx
movb $0x5, %al
callq 0x2190
cmpl $0x0, 0x3b192(%rip)     # 0x63eb0
je 0x28d4a
xorl %r13d, %r13d
leaq 0x28aba(%rip), %r15     # 0x517e4
cmpq %r13, %r12
je 0x28d4a
movq (%r14), %rax
cvtss2sd (%rax,%r13,4), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x2190
incq %r13
jmp 0x28d2a
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/confchange.c
// Function: Select_cc2
int Select_cc2(float *dx2, int nres1, float *Dcart, atom *atoms1,
	       struct Reference Ref, char *name)
{
  int n=0, i, j;
  for(i=0; i<Ref.N_ref; i++){
    if(strncmp(atoms1[Ref.atom_num[i]].name, name, 2)!=0)continue;
    float *Dc=Dcart+3*i; double d2=0;
    for(j=0; j<3; j++){d2+=(*Dc)*(*Dc); Dc++;}
    dx2[n]=d2; n++;
    if(n > nres1){
      printf("ERROR in Select_cc2, too many %s atoms > %d residues\n",
	     name, nres1); return(0);
    }
  }
  if(n!=nres1){
    printf("WARNING in Select_cc2, %d %s atoms but %d residues\n",
	   n, name, nres1);
  }
  return(n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movl %esi, 0x4(%rsp)
movq %rdi, 0x10(%rsp)
movl 0x50(%rsp), %r13d
movq 0x78(%rsp), %rbx
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
xorl %ebp, %ebp
cmpq %r13, %r14
je 0x2a5bf
movslq (%rbx,%r14,4), %rax
imulq $0x70, %rax, %rax
leaq (%r15,%rax), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0x2070
testl %eax, %eax
jne 0x2a5b6
xorpd %xmm0, %xmm0
xorl %eax, %eax
cmpl $0x3, %eax
je 0x2a59d
movss (%r12,%rax,4), %xmm1
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x2a581
cvtsd2ss %xmm0, %xmm0
movslq %ebp, %rax
movq 0x10(%rsp), %rcx
movss %xmm0, (%rcx,%rax,4)
cmpl 0x4(%rsp), %ebp
jge 0x2a5e2
incl %ebp
incq %r14
addq $0xc, %r12
jmp 0x2a555
movl 0x4(%rsp), %ecx
cmpl %ecx, %ebp
jne 0x2a5cb
movl %ecx, %ebp
jmp 0x2a5fb
leaq 0x2a370(%rip), %rdi     # 0x54942
movl %ebp, %esi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x20f0
jmp 0x2a5fb
leaq 0x2a323(%rip), %rdi     # 0x5490c
xorl %ebp, %ebp
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
xorl %eax, %eax
callq 0x20f0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/confchange.c
// Function: RMSD_CA
float RMSD_CA(float *coord_1, float *coord_2, struct Reference Ref,
	      atom *atoms, int nres, struct ali_atoms ali_atoms)
{
  int n3=3*nres; float coord_CA1[n3], coord_CA2[n3], mass[nres];
  int k=0, n=0;
  for(int i=0; i<ali_atoms.N_ref; i++){
    if(strncmp(atoms[Ref.atom_num[i]].name, "CA", 2))continue;
    int ii=3*i; mass[n]=ali_atoms.mass[i]; n++;
    if(n>nres){printf("ERROR, too many CA atoms\n"); exit(8);}
    for(int j=0; j<3; j++){
      coord_CA1[k]=coord_1[ii]; 
      coord_CA2[k]=coord_2[ii];
      ii++; k++;
    }
  }
  float rmsd=rmsd_mclachlan_f(coord_CA1, coord_CA2, mass, n);
  return(rmsd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, -0x40(%rbp)
leal (%rcx,%rcx,2), %eax
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
movq %rsp, %rsi
subq %rax, %rsi
movq %rsi, -0x38(%rbp)
movq %rsi, %rsp
movq %rsp, %rsi
subq %rax, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rsp
movq %rcx, -0x58(%rbp)
movl %ecx, %eax
movq %rsp, %r9
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movl 0x58(%rbp), %r11d
movq 0x38(%rbp), %rbx
xorl %r14d, %r14d
testl %r11d, %r11d
cmovlel %r14d, %r11d
movq 0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
xorl %r12d, %r12d
xorl %r10d, %r10d
xorl %r13d, %r13d
cmpq %r11, %r14
je 0x2b9a4
movslq (%rbx,%r14,4), %rax
imulq $0x70, %rax, %rax
cmpb $0x43, 0x18(%rdx,%rax)
jne 0x2b998
addq %rdx, %rax
addq $0x18, %rax
cmpb $0x41, 0x1(%rax)
jne 0x2b998
movq -0x50(%rbp), %rax
movss (%rax,%r14,4), %xmm0
movslq %r10d, %rax
movss %xmm0, (%r9,%rax,4)
cmpl -0x58(%rbp), %r10d
jge 0x2b9ca
movl %r12d, %eax
movq -0x48(%rbp), %rcx
leaq (%rcx,%rax,4), %r15
movq -0x40(%rbp), %rcx
leaq (%rcx,%rax,4), %rsi
incl %r10d
movslq %r13d, %rax
leal 0x3(%rax), %r13d
movslq %r13d, %rdi
subq %rax, %rdi
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax,4), %rcx
movq -0x30(%rbp), %r8
leaq (%r8,%rax,4), %rax
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x2b998
movss (%rsi,%r8,4), %xmm0
movss %xmm0, (%rcx,%r8,4)
movss (%r15,%r8,4), %xmm0
movss %xmm0, (%rax,%r8,4)
incq %r8
jmp 0x2b976
incq %r14
addl $0x3, %r12d
jmp 0x2b8fa
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %r9, %rdx
movl %r10d, %ecx
callq 0x47a64
cvtsd2ss %xmm0, %xmm0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x292b6(%rip), %rdi     # 0x54c87
callq 0x2090
pushq $0x8
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/confchange.c
// Function: Periodic_angles
int Periodic_angles(double *dphi, struct axe *axe, int n)
{
  float pi=acos(-1), twopi=2*pi; int m=0;
  for(int i=0; i<n; i++){
    if(axe[i].type=='l')continue;
    if((dphi[i]<=pi)&&(dphi[i]>=-pi))continue;
    while(dphi[i]>pi)dphi[i]-=twopi;
    while(dphi[i]<-pi)dphi[i]+=twopi;
    m++;
  }
  printf("%d angles > pi=%.5f changed\n", m, pi);
  return(m);
}

// Assembly:
pushq %rbx
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movapd 0x25678(%rip), %xmm0    # 0x51240
movsd 0x28010(%rip), %xmm1    # 0x53be0
movsd 0x28020(%rip), %xmm2    # 0x53bf8
movsd 0x28008(%rip), %xmm3    # 0x53be8
movsd 0x28008(%rip), %xmm4    # 0x53bf0
xorl %ebx, %ebx
cmpq %rdx, %rax
je 0x2bc36
imulq $0x158, %rax, %rcx      # imm = 0x158
cmpb $0x6c, (%rsi,%rcx)
je 0x2bc31
movsd (%rdi,%rax,8), %xmm5
movapd %xmm5, %xmm6
andpd %xmm0, %xmm6
ucomisd %xmm6, %xmm1
jae 0x2bc31
ucomisd %xmm1, %xmm5
jbe 0x2bc29
addsd %xmm2, %xmm5
movsd %xmm5, (%rdi,%rax,8)
jmp 0x2bc0f
addsd %xmm4, %xmm5
movsd %xmm5, (%rdi,%rax,8)
ucomisd %xmm5, %xmm3
ja 0x2bc20
incl %ebx
incq %rax
jmp 0x2bbea
leaq 0x28d39(%rip), %rdi     # 0x54976
movsd 0x27f9b(%rip), %xmm0    # 0x53be0
movl %ebx, %esi
movb $0x1, %al
callq 0x20f0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/confchange.c
// Function: RMS
float RMS(float *v, int n, int *outlier){
  double RMS=0; int m=n;
  for(int i=0; i<n; i++){
    if(outlier && (outlier[i])){m--; continue;}
    RMS+=v[i]*v[i];
  }
  RMS=sqrt(RMS/m);
  return(RMS);
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
xorpd %xmm0, %xmm0
cmpq %rax, %rcx
je 0x2bc8c
testq %rdx, %rdx
je 0x2bc76
cmpl $0x0, (%rdx,%rax,4)
je 0x2bc76
decl %esi
jmp 0x2bc87
movss (%rdi,%rax,4), %xmm1
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x2bc62
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2bca4
sqrtsd %xmm0, %xmm0
jmp 0x2bcae
pushq %rax
callq 0x2290
addq $0x8, %rsp
cvtsd2ss %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/confchange.c
// Function: RMSD_confchange
float RMSD_confchange(float cc, float *mode, double *d_phi,
		      float *coord_all, float *coord_new,
		      double *d_phi_opt, int naxes, struct bond *bonds,
		      atom *atoms, int natoms, struct Reference Ref,
		      float *coord_2)
{
  // angular distance
  for(int i=0; i<naxes; i++)d_phi[i]=d_phi_opt[i]+cc*mode[i];
  Set_bonds_measure(bonds, natoms, atoms);
  Build_up(bonds, natoms, d_phi, naxes);
  Put_coord(coord_all, bonds, natoms);
  Write_ref_coord(coord_new, Ref.N_ref, coord_all, Ref.atom_num);
  float rmsd2=rmsd_mclachlan_f(coord_2, coord_new, Ref.mass_atom, Ref.N_ref);
  return(rmsd2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movl 0x50(%rsp), %r12d
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %r14
xorl %eax, %eax
testl %r9d, %r9d
movl $0x0, %ecx
cmovgl %r9d, %ecx
cmpq %rax, %rcx
je 0x2d94f
movss (%rdi,%rax,4), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm1
addsd (%r8,%rax,8), %xmm1
movsd %xmm1, (%r13,%rax,8)
incq %rax
jmp 0x2d92b
movq %r14, %rdi
movl %r12d, %esi
callq 0x139f6
movq %r14, %rdi
movl %r12d, %esi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x13d70
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x2f358
leaq 0x58(%rsp), %r14
movl (%r14), %ebp
movq 0x28(%r14), %rcx
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x2f9b8
movq 0x10(%r14), %rdx
movq 0x88(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x47a64
cvtsd2ss %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Set_masses
void Set_masses(float *mass, atom *atoms, int natoms){
  int n=0, i;
  for(i=0; i<natoms; i++){
    //ALIGN
    if(atoms[i].ali==0)continue;
    mass[n] = Mass(atoms+i); n++;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testl %edx, %edx
cmovlel %r12d, %ebx
subq $0x1, %rbx
jb 0x2f34c
cmpl $0x0, 0x54(%r14)
je 0x2f346
movq %r14, %rdi
callq 0x233c9
movslq %r12d, %r12
movss %xmm0, (%r15,%r12,4)
incl %r12d
addq $0x70, %r14
jmp 0x2f325
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Put_coord
int Put_coord(float *coord_all, struct bond *bonds, int natoms)
{
  float *coord=coord_all; int i;
  for(i=0; i<natoms; i++){
    if(bonds[i].i_atom<0)break;
    for(int j=0; j<3; j++){*coord=bonds[i].r[j]; coord++;}
  }
  return(i);
}

// Assembly:
movl %edx, %eax
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %eax
leaq 0x8(%rsi), %rdx
cmpq %rax, %rcx
je 0x2f3a5
imulq $0xc0, %rcx, %r8
cmpl $0x0, 0x20(%rsi,%r8)
js 0x2f3a3
xorl %r8d, %r8d
cmpq $0xc, %r8
je 0x2f394
cvtsd2ss (%rdx,%r8,2), %xmm0
movss %xmm0, (%rdi,%r8)
addq $0x4, %r8
jmp 0x2f37c
incq %rcx
addq $0xc0, %rdx
addq %r8, %rdi
jmp 0x2f365
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Energy_clashes
float Energy_clashes(float *r, int N){
  float dthr=1.2, dthr2=dthr*dthr;
  float dthr_large=7*dthr, dthr2_large=dthr_large*dthr_large;
  int large_skip=10, r_skip=3*large_skip;
  double E_sum=0;
  int i, j, k;
  float *ri=r;
  for(i=0; i<N; i++){
    float *rj=r;
    for(j=0; j<i-3; j++){
      float dd=0, d;
      for(k=0; k<3; k++){
	d=ri[k]-rj[k];
	if(fabs(d)> dthr_large){
	  j+=large_skip; rj+=r_skip; goto next_j;
	}
	if(fabs(d)> dthr)goto next_j;
	dd += d*d;
	if(dd > dthr2_large){
	  j+=large_skip; rj+=r_skip; goto next_j;
	}
	if(dd > dthr2)goto next_j;
      }
      if(dd==0){
	printf("ERROR, zero distance for atoms %d and %d\n", i, j);
	exit(8);
      }else{
	E_sum+=1./(dd*dd*dd);
      }
    next_j: rj+=3;
    }
    ri+=3;
  }
  return(E_sum/N);
}

// Assembly:
pushq %rax
movl %esi, %eax
xorl %esi, %esi
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
movsd 0x1bc84(%rip), %xmm2    # 0x4b048
movaps 0x21e65(%rip), %xmm3    # 0x51230
movss 0x2590d(%rip), %xmm4    # 0x54ce0
movss 0x25909(%rip), %xmm5    # 0x54ce4
movss 0x25905(%rip), %xmm6    # 0x54ce8
movss 0x25901(%rip), %xmm7    # 0x54cec
movq %rdi, %r8
cmpl %ecx, %esi
je 0x2f499
leal -0x3(%rsi), %r9d
xorl %edx, %edx
movq %rdi, %r10
cmpl %r9d, %edx
jge 0x2f48e
xorps %xmm8, %xmm8
xorl %r11d, %r11d
cmpq $0x3, %r11
je 0x2f459
movss (%r8,%r11,4), %xmm9
subss (%r10,%r11,4), %xmm9
movaps %xmm9, %xmm10
andps %xmm3, %xmm10
ucomiss %xmm4, %xmm10
ja 0x2f450
ucomiss %xmm5, %xmm10
ja 0x2f483
mulss %xmm9, %xmm9
addss %xmm9, %xmm8
ucomiss %xmm6, %xmm8
ja 0x2f450
incq %r11
ucomiss %xmm7, %xmm8
jbe 0x2f40f
jmp 0x2f483
addl $0xa, %edx
addq $0x78, %r10
jmp 0x2f483
ucomiss %xmm1, %xmm8
jne 0x2f461
jnp 0x2f4a7
movaps %xmm8, %xmm9
mulss %xmm8, %xmm9
mulss %xmm8, %xmm9
cvtss2sd %xmm9, %xmm8
movapd %xmm2, %xmm9
divsd %xmm8, %xmm9
addsd %xmm9, %xmm0
addq $0xc, %r10
incl %edx
jmp 0x2f3ff
addq $0xc, %r8
incl %esi
jmp 0x2f3ee
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
popq %rax
retq
leaq 0x2599c(%rip), %rdi     # 0x54e4a
xorl %eax, %eax
callq 0x20f0
pushq $0x8
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Print_PDB
void Print_PDB(FILE *file_out, atom *atoms, int natoms, float *atom_str3,
	       struct residue *seq, int k, float rmsd)
{
  int i, ij=0, j=0; atom *atom1=atoms;
  char aaname3[10]; for(i=0; i<4; i++)aaname3[i]='\0';
  if(k>=0)fprintf(file_out, "MODEL %d RMSD from PDB= %.3f\n", k, rmsd);
  for(i=0; i<natoms; i++){
    //ALIGN
    if(atom1->ali<0){atom1++; continue;}
    int res=atom1->res; Name3(aaname3,seq[res].i_aa);
    if(j < 99999)j++;
    fprintf(file_out,
	    "ATOM  %5d  %3s %3s %c%4s    %8.3f%8.3f%8.3f%6.2f%6.2f\n",
	    j,atom1->name,aaname3,seq[res].chain, seq[res].pdbres,
	    atom_str3[ij],atom_str3[ij+1],atom_str3[ij+2],1.0,
	    atom1->B_factor);
    ij+=3;
    atom1++;
  }
  fprintf(file_out, "ENDMDL\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
xorl %eax, %eax
cmpq $0x4, %rax
je 0x2f4f1
movb $0x0, 0x2e(%rsp,%rax)
incq %rax
jmp 0x2f4e1
testl %r9d, %r9d
js 0x2f510
cvtss2sd %xmm0, %xmm0
leaq 0x258dc(%rip), %rsi     # 0x54ddd
movq 0x10(%rsp), %rdi
movl %r9d, %edx
movb $0x1, %al
callq 0x2190
xorl %ebx, %ebx
testl %ebp, %ebp
cmovlel %ebx, %ebp
addq $0x64, %r12
xorl %r14d, %r14d
subl $0x1, %ebp
jb 0x2f5c4
cmpl $0x0, -0x10(%r12)
js 0x2f5bb
movslq (%r12), %rax
shlq $0x5, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax), %r13
addq $0xd, %r13
movswl 0x7(%r13), %esi
leaq 0x2e(%rsp), %r15
movq %r15, %rdi
callq 0x24647
xorl %eax, %eax
cmpl $0x1869f, %r14d         # imm = 0x1869F
setl %al
addl %eax, %r14d
leaq -0x4c(%r12), %rcx
movsbl -0x1(%r13), %r9d
movslq %ebx, %rbx
movq 0x18(%rsp), %rax
cvtss2sd (%rax,%rbx,4), %xmm0
cvtss2sd 0x4(%rax,%rbx,4), %xmm1
cvtss2sd 0x8(%rax,%rbx,4), %xmm2
cvtss2sd -0x48(%r12), %xmm4
movq %r13, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x25858(%rip), %rsi     # 0x54dfb
movl %r14d, %edx
movq %r15, %r8
movsd 0x1ba97(%rip), %xmm3    # 0x4b048
movb $0x5, %al
callq 0x2190
addl $0x3, %ebx
addq $0x70, %r12
jmp 0x2f51e
leaq 0x23be7(%rip), %rdi     # 0x531b2
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
movq 0x10(%rsp), %rcx
callq 0x2280
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Metropolis
int Metropolis(float Ene_tmp, float Ene, float T)
{
  // Initialize random numbers
  if(INIRAN==0){
     INIRAN=1;
     unsigned long iran=randomgenerator();
     InitRandom( (RANDOMTYPE)iran);
     //RANFACTOR=pow(12.0,1/3.0);
  }
  if(Ene_tmp < Ene)return(1);
  float fact=exp((Ene-Ene_tmp)/T);
  //float ran=RandomFloating()*RANFACTOR;
  //if(ran < fact)return(1);
  if(RandomFloating() < fact)return(1);
  return(0);
}

// Assembly:
subq $0x18, %rsp
cmpl $0x0, 0x44f13(%rip)     # 0x74508
jne 0x2f632
movl $0x1, 0x44f07(%rip)     # 0x74508
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x14(%rsp)
movss %xmm0, 0x10(%rsp)
callq 0x2f672
movq %rax, %rdi
callq 0x49ebc
movss 0x10(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
movss 0xc(%rsp), %xmm2
ucomiss %xmm0, %xmm1
jbe 0x2f63c
pushq $0x1
popq %rax
jmp 0x2f66d
subss %xmm0, %xmm1
divss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm0
callq 0x22a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
xorl %eax, %eax
callq 0x49ffd
cvtss2sd 0xc(%rsp), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: randomgenerator
unsigned long randomgenerator(void){

     unsigned long tm;
     time_t seconds;

     time(&seconds);
     srand((unsigned)(seconds % 65536));
     do   /* waiting time equal 1 second */
       tm= clock();
     while (tm/CLOCKS_PER_SEC < (unsigned)(1));
     return((unsigned long) (rand()));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movl $0x10000, %ecx          # imm = 0x10000
cqto
idivq %rcx
movq %rdx, %rdi
callq 0x2160
callq 0x20b0
cmpq $0xf4240, %rax          # imm = 0xF4240
jb 0x2f699
callq 0x22b0
cltq
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Extract_dphi
void Extract_dphi(double *d_phi, float **Tors_mode, float *sigma,
		  int N_modes, int N_axes, float factor, long *idum)
{
  float gasdev(long *idum);
  int i, k; float z, coeff;

  for(i=0; i<N_axes; i++)d_phi[i]=0;
  for(k=0; k<N_modes; k++){
    z=gasdev(idum);
    coeff = z*sigma[k];
    double *phi=d_phi; float *mode=Tors_mode[k];
    for(i=0; i<N_axes; i++){*phi += coeff*(*mode); phi++; mode++;}
  }
  for(i=0; i<N_axes; i++)d_phi[i]*=factor;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movss %xmm0, 0xc(%rsp)
movl %r8d, %ebx
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x2f6f2
andq $0x0, (%r14,%rax,8)
incq %rax
jmp 0x2f6e3
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
cmpq %r12, %r15
je 0x2f740
movq 0x10(%rsp), %rdi
callq 0x49cbc
mulss (%r13,%r15,4), %xmm0
movq (%rbp,%r15,8), %rax
xorl %ecx, %ecx
cmpl %ecx, %ebx
je 0x2f73b
movss (%rax,%rcx,4), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm1
addsd (%r14,%rcx,8), %xmm1
movsd %xmm1, (%r14,%rcx,8)
incq %rcx
jmp 0x2f719
incq %r15
jmp 0x2f6fc
cvtss2sd 0xc(%rsp), %xmm0
xorl %eax, %eax
cmpq %rax, %rbx
je 0x2f762
movsd (%r14,%rax,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r14,%rax,8)
incq %rax
jmp 0x2f748
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Extract_dx
void Extract_dx(float *dx, float **Cart_mode, float *sigma,
		int N_modes, int N_Cart, float factor, long *idum)
{
  float gasdev(long *idum);
  int i, k; float z, coeff;

  for(i=0; i<N_Cart; i++)dx[i]=0;
  for(k=0; k<N_modes; k++){
    z=gasdev(idum);
    coeff = z*sigma[k];
    float *x=dx, *mode=Cart_mode[k];
    for(i=0; i<N_Cart; i++){*x += coeff*(*mode); x++; mode++;}
  }
  for(i=0; i<N_Cart; i++)dx[i]*=factor;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movss %xmm0, 0xc(%rsp)
movl %r8d, %ebx
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
xorl %eax, %eax
testl %r8d, %r8d
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x2f7b0
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x2f7a1
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
cmpq %r12, %r15
je 0x2f7fa
movq 0x10(%rsp), %rdi
callq 0x49cbc
mulss (%r13,%r15,4), %xmm0
movq (%rbp,%r15,8), %rax
xorl %ecx, %ecx
cmpl %ecx, %ebx
je 0x2f7f5
movss (%rax,%rcx,4), %xmm1
mulss %xmm0, %xmm1
addss (%r14,%rcx,4), %xmm1
movss %xmm1, (%r14,%rcx,4)
incq %rcx
jmp 0x2f7d7
incq %r15
jmp 0x2f7ba
xorl %eax, %eax
cmpq %rax, %rbx
je 0x2f818
movss (%r14,%rax,4), %xmm0
mulss 0xc(%rsp), %xmm0
movss %xmm0, (%r14,%rax,4)
incq %rax
jmp 0x2f7fc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Print_seqres
void Print_seqres(FILE *file_out, struct chain *chains, int Nchain)
{
  char aaname3[8]; for(int i=0; i<8; i++)aaname3[i]='\0';
  int line=1;
  for(int i=0; i<Nchain; i++){
    struct chain *ch=chains+i;
    int lines=ch->N_seqres/13+1, k=0;
    for(int l=0; l<lines; l++){
      fprintf(file_out, "SEQRES %3d %c %4d ",
	      line, ch->label, ch->N_seqres);
      for(int j=0; j<13; j++){
	if(k<ch->N_seqres){
	  Name3(aaname3, Code_AA(ch->seqres[k]));
	  fprintf(file_out, " %3s", aaname3);
	}else{
	  fprintf(file_out, "    ");
	}
	k++;
      }
      fprintf(file_out, "\n"); line++;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
xorl %eax, %eax
cmpq $0x8, %rax
je 0x2f84f
movb $0x0, 0x30(%rsp,%rax)
incq %rax
jmp 0x2f83f
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, 0x18(%rsp)
pushq $0x1
popq %r9
leaq 0x30(%rsp), %rbx
pushq $0x1
popq %r13
xorl %eax, %eax
cmpq 0x18(%rsp), %rax
je 0x2f96e
movq %rax, 0x20(%rsp)
imulq $0x70, %rax, %rcx
movq 0x10(%rsp), %rsi
movl 0x60(%rsi,%rcx), %eax
cltd
pushq $0xd
popq %rdi
idivl %edi
testl %eax, %eax
pushq $-0x1
popq %rdx
cmovsl %edx, %eax
leaq (%rsi,%rcx), %r14
addl %r9d, %eax
incl %eax
movl %eax, 0x4(%rsp)
xorl %ebp, %ebp
cmpl 0x4(%rsp), %r9d
je 0x2f95a
movl %edi, 0xc(%rsp)
movslq %edi, %r12
movsbl 0x34(%r14), %ecx
movl 0x60(%r14), %r8d
movq %r15, %rdi
leaq 0x25569(%rip), %rsi     # 0x54e32
movq %r9, 0x28(%rsp)
movl %r9d, %edx
xorl %eax, %eax
callq 0x2190
movslq %ebp, %rbp
leal 0xd(%rbp), %eax
movl %eax, 0x8(%rsp)
cmpq %rbp, %r12
je 0x2f937
movslq 0x60(%r14), %rax
cmpq %rax, %rbp
jge 0x2f91d
movq 0x58(%r14), %rax
movsbl (%rax,%rbp), %edi
callq 0x1d91c
movq %rbx, %rdi
movl %eax, %esi
callq 0x24647
movq %r15, %rdi
leaq 0x25534(%rip), %rsi     # 0x54e45
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2190
jmp 0x2f932
leaq 0x239a8(%rip), %rdi     # 0x532cc
pushq $0x4
popq %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x2280
incq %rbp
jmp 0x2f8e2
pushq $0xa
popq %rdi
movq %r15, %rsi
callq 0x2140
movq 0x28(%rsp), %r9
incl %r9d
movl 0xc(%rsp), %edi
addl $0xd, %edi
movl 0x8(%rsp), %ebp
jmp 0x2f8a4
movq 0x20(%rsp), %rax
incq %rax
movl 0x4(%rsp), %ecx
movl %ecx, %r9d
jmp 0x2f86a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Write_ref_coord_atom
void Write_ref_coord_atom(float *coord_ref, int N_ref, atom *atoms,
                          int *atom_num)
{
  float *coord=coord_ref;
  for(int i=0;i<N_ref;i++){
    double *r=atoms[atom_num[i]].r;
    for(int j=0; j<3; j++){*coord=*r; coord++; r++;}
  }
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rsi, %rax
je 0x2f9b7
movslq (%rcx,%rax,4), %r8
imulq $0x70, %r8, %r9
addq %rdx, %r9
xorl %r8d, %r8d
cmpl $0xc, %r8d
je 0x2f9af
cvtsd2ss (%r9,%r8,2), %xmm0
movss %xmm0, (%rdi,%r8)
addq $0x4, %r8
jmp 0x2f997
incq %rax
addq %r8, %rdi
jmp 0x2f984
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Write_ref_coord
void Write_ref_coord(float *coord_ref, int N_ref, float *coord_all,
		     int *atom_num)
{
  float *coord=coord_ref;
  for(int i=0;i<N_ref;i++){
    float *r=coord_all+3*atom_num[i];
    for(int j=0; j<3; j++){*coord=*r; coord++; r++;}
  }
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rsi, %rax
je 0x2f9f3
imull $0x3, (%rcx,%rax,4), %r8d
movslq %r8d, %r8
leaq (%rdx,%r8,4), %r9
xorl %r8d, %r8d
cmpl $0xc, %r8d
je 0x2f9eb
movss (%r9,%r8), %xmm0
movss %xmm0, (%rdi,%r8)
addq $0x4, %r8
jmp 0x2f9d3
incq %rax
addq %r8, %rdi
jmp 0x2f9bf
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Put_atoms
int Put_atoms(atom *atoms, float *coords, int natoms){
  atom *atom=atoms; float *coord=coords;
  for(int i=0; i<natoms; i++){
    for(int j=0; j<3; j++){atom->r[j]=*coord; coord++;}
    atom++;
  }
  return(0);
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
cmpl %edx, %eax
je 0x2fa22
xorl %ecx, %ecx
cmpq $0xc, %rcx
je 0x2fa17
cvtss2sd (%rsi,%rcx), %xmm0
movsd %xmm0, (%rdi,%rcx,2)
addq $0x4, %rcx
jmp 0x2fa01
addq $0x70, %rdi
incl %eax
addq %rcx, %rsi
jmp 0x2f9fb
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Copy_bonds
void Copy_bonds(struct bond *bonds1, struct bond *bonds, int natoms)
{
  struct bond *bond1=bonds1, *bond=bonds;
  bond1->previous=NULL;
  for(int i=0; i<natoms; i++){
    *bond1=*bond;
    //if(bond->i_atom<0)break;
    if(i){
      bond1->previous=bonds1+(int)(bond->previous-bonds);
    }
    bond++; bond1++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x28(%rdi)
movl %edx, %ebp
movq %rsi, %r14
xorl %r15d, %r15d
testl %edx, %edx
cmovlel %r15d, %ebp
movl $0xc0, %r12d
xorl %r13d, %r13d
cmpl %r13d, %ebp
je 0x3023a
leaq (%rbx,%r15), %rdi
leaq (%r14,%r15), %rsi
movl $0xc0, %edx
callq 0x21a0
testl %r13d, %r13d
je 0x3022e
movq 0x28(%r14,%r15), %rax
subq %r14, %rax
cqto
idivq %r12
cltq
imulq $0xc0, %rax, %rax
addq %rbx, %rax
movq %rax, 0x28(%rbx,%r15)
incl %r13d
addq $0xc0, %r15
jmp 0x301f4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Copy_ali
void Copy_ali(struct ali_atoms *ali_a, struct Reference Ref)
{    
  ali_a->N_ref=Ref.N_ref; ali_a->N_Cart=Ref.N_Cart;
  ali_a->ali1=Ref.atom_num;
  ali_a->ali2=Ref.atom_num;
  ali_a->mass=Ref.mass_atom;
}

// Assembly:
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rdi)
movq 0x30(%rsp), %rax
movq %rax, (%rdi)
movq %rax, 0x8(%rdi)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: Copy_atoms_bonds
void Copy_atoms_bonds(atom *atoms, struct bond *bonds, int natoms){
  atom *atom=atoms; struct bond *bond=bonds;
  for(int i=0; i<natoms; i++){
    double *r1=atom->r, *r2=bond->r;
    for(int j=0; j<3; j++){*r1=*r2; r1++; r2++;}
    atom++; bond++;
  }
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
pushq $0x1
popq %rcx
cmpl %edx, %eax
je 0x32970
movq %rcx, %r8
cmpl $0x4, %r8d
je 0x32961
movsd (%rsi,%r8,8), %xmm0
movsd %xmm0, -0x8(%rdi,%r8,8)
incq %r8
jmp 0x32949
addq $0x70, %rdi
addq $0xc0, %rsi
incl %eax
jmp 0x32942
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/simulation.c
// Function: RMSD_LIN
float RMSD_LIN(float *RMSD_target, float *RMSD_full,
	       struct Jacobian *J, float *Delta_phi,
	       struct Reference Ref,
	       float *coord_ref_1, float *coord_ref_2,
	       float *coord_full)
{
  // Compute new conformation
  int N_Cart=3*Ref.N_ref;
  float RMSD=0, coord_lin[N_Cart];
  for(int i=0; i<N_Cart; i++){
    double X=coord_ref_1[i];
    for(int a=0; a<J->N_axes; a++)
      X+=J->Jacobian_ar[a][i]*Delta_phi[a];
    coord_lin[i]=X;
  }
  if(coord_ref_2){
    *RMSD_target=
      rmsd_mclachlan_f(coord_ref_2, coord_lin, Ref.mass_atom, Ref.N_ref);
  }
  if(coord_ref_1){
    RMSD=rmsd_mclachlan_f(coord_ref_1, coord_lin, Ref.mass_atom, Ref.N_ref);
  }
  if(coord_full){
    float coord_ref[N_Cart];
    Write_ref_coord(coord_ref, Ref.N_ref, coord_full, Ref.atom_num);
    *RMSD_full=
      rmsd_mclachlan_f(coord_ref, coord_lin, Ref.mass_atom, Ref.N_ref);
  }
  //printf("RMSD_lin= %.2f (ini) %.2f (end) %.2f (torsional)\n",
  //	 RMSD, *RMSD_target, *RMSD_full);
  return(RMSD);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rsi, -0x38(%rbp)
movq %rdi, %r15
leaq 0x10(%rbp), %rax
movl (%rax), %r14d
leal (%r14,%r14,2), %eax
leaq 0xf(,%rax,4), %rbx
andq $-0x10, %rbx
movq %rsp, %r12
subq %rbx, %r12
movq %r12, %rsp
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
xorl %edi, %edi
cmpq %rax, %rdi
je 0x3425a
cvtss2sd (%r13,%rdi,4), %xmm0
movl (%rdx), %r8d
testl %r8d, %r8d
cmovlel %esi, %r8d
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x3424b
movq 0x10(%rdx), %r11
movq (%r11,%r10,8), %r11
movss (%r11,%rdi,4), %xmm1
mulss (%rcx,%r10,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r10
jmp 0x34225
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%rdi,4)
incq %rdi
jmp 0x3420c
testq %r9, %r9
je 0x3427e
leaq 0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq %r9, %rdi
movq %r12, %rsi
movl %r14d, %ecx
callq 0x47a64
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15)
testq %r13, %r13
je 0x3429f
leaq 0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq %r13, %rdi
movq %r12, %rsi
movl %r14d, %ecx
callq 0x47a64
cvtsd2ss %xmm0, %xmm0
jmp 0x342a2
xorps %xmm0, %xmm0
movq 0x40(%rbp), %rdx
testq %rdx, %rdx
je 0x342f5
movq %rsp, %r13
movq %rsp, %r15
subq %rbx, %r15
movq %r15, %rsp
leaq 0x10(%rbp), %rbx
movq 0x28(%rbx), %rcx
movq %r15, %rdi
movl %r14d, %esi
movss %xmm0, -0x2c(%rbp)
callq 0x2f9b8
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %ecx
callq 0x47a64
cvtsd2ss %xmm0, %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, (%rax)
movss -0x2c(%rbp), %xmm0
movq %r13, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq