LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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:
testl %edx, %edx
jle 0x32b1d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
cmpl $0x0, 0x54(%rbx)
je 0x32b09
movq %rbx, %rdi
callq 0x25e79
movslq %r12d, %r12
movss %xmm0, (%r14,%r12,4)
incl %r12d
addq $0x70, %rbx
decq %r15
jne 0x32aef
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %edx, %edx
jle 0x32b6b
movl %edx, %eax
movl %edx, %ecx
leaq 0x8(%rsi), %r8
xorl %edx, %edx
leaq (%rdx,%rdx,2), %r9
shlq $0x6, %r9
cmpl $0x0, 0x20(%rsi,%r9)
js 0x32b6e
xorl %r9d, %r9d
xorps %xmm0, %xmm0
cvtsd2ss (%r8,%r9,2), %xmm0
movss %xmm0, (%rdi,%r9)
addq $0x4, %r9
cmpq $0xc, %r9
jne 0x32b3f
incq %rdx
addq $0xc0, %r8
addq %r9, %rdi
cmpq %rcx, %rdx
jne 0x32b2c
retq
xorl %eax, %eax
retq
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
testl %esi, %esi
jle 0x32c63
xorl %eax, %eax
xorpd %xmm0, %xmm0
movaps 0x24799(%rip), %xmm1    # 0x57320
movss 0x28241(%rip), %xmm2    # 0x5add0
movss 0x2823d(%rip), %xmm3    # 0x5add4
movss 0x28239(%rip), %xmm4    # 0x5add8
movss 0x28235(%rip), %xmm5    # 0x5addc
xorps %xmm6, %xmm6
movsd 0x1e48e(%rip), %xmm7    # 0x51040
movq %rdi, %rcx
cmpl $0x4, %eax
jb 0x32c53
leal -0x3(%rax), %r8d
xorl %edx, %edx
movq %rdi, %r9
xorps %xmm8, %xmm8
xorl %r10d, %r10d
movss (%rcx,%r10,4), %xmm9
subss (%r9,%r10,4), %xmm9
movaps %xmm9, %xmm10
andps %xmm1, %xmm10
ucomiss %xmm2, %xmm10
ja 0x32c3d
ucomiss %xmm3, %xmm10
ja 0x32c44
mulss %xmm9, %xmm9
addss %xmm9, %xmm8
ucomiss %xmm4, %xmm8
ja 0x32c3d
ucomiss %xmm5, %xmm8
ja 0x32c44
incq %r10
cmpq $0x3, %r10
jne 0x32bce
ucomiss %xmm6, %xmm8
jne 0x32c15
jnp 0x32c78
movaps %xmm8, %xmm9
mulss %xmm8, %xmm9
mulss %xmm8, %xmm9
xorps %xmm8, %xmm8
cvtss2sd %xmm9, %xmm8
movapd %xmm7, %xmm9
divsd %xmm8, %xmm9
addsd %xmm9, %xmm0
jmp 0x32c44
addl $0xa, %edx
addq $0x78, %r9
addq $0xc, %r9
incl %edx
cmpl %r8d, %edx
jl 0x32bc7
addq $0xc, %rcx
incl %eax
cmpl %esi, %eax
jne 0x32bb5
jmp 0x32c67
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
popq %rax
retq
leaq 0x282b3(%rip), %rdi     # 0x5af32
movl %eax, %esi
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
movl $0x0, 0xc(%rsp)
testl %r9d, %r9d
js 0x32cd7
cvtss2sd %xmm0, %xmm0
leaq 0x281fb(%rip), %rsi     # 0x5aec5
movq %r15, %rdi
movl %r9d, %edx
movb $0x1, %al
callq 0x2190
testl %ebp, %ebp
jle 0x32d91
addq $0x64, %r12
xorl %r13d, %r13d
xorl %ebx, %ebx
cmpl $0x0, -0x10(%r12)
js 0x32d85
movslq (%r12), %rax
shlq $0x5, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax), %r14
addq $0xd, %r14
movswl 0x7(%r14), %esi
leaq 0xc(%rsp), %rdi
callq 0x271f8
xorl %eax, %eax
cmpl $0x1869f, %r13d         # imm = 0x1869F
setl %al
addl %eax, %r13d
leaq -0x4c(%r12), %rcx
movsbl -0x1(%r14), %r9d
movslq %ebx, %rbx
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rbx,4), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%rax,%rbx,4), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rax,%rbx,4), %xmm2
xorps %xmm4, %xmm4
cvtss2sd -0x48(%r12), %xmm4
movq %r14, (%rsp)
movq %r15, %rdi
leaq 0x28178(%rip), %rsi     # 0x5aee3
movl %r13d, %edx
leaq 0xc(%rsp), %r8
movsd 0x1e2c5(%rip), %xmm3    # 0x51040
movb $0x5, %al
callq 0x2190
addl $0x3, %ebx
addq $0x70, %r12
decl %ebp
jne 0x32ce8
leaq 0x2650d(%rip), %rdi     # 0x592a5
movl $0x7, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x2280
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x46744(%rip)     # 0x79508
jne 0x32e01
movl $0x1, 0x46738(%rip)     # 0x79508
movss %xmm2, 0xc(%rsp)
movss %xmm1, 0x14(%rsp)
movss %xmm0, 0x10(%rsp)
callq 0x32e47
movq %rax, %rdi
callq 0x5050c
movss 0x10(%rsp), %xmm0
movss 0x14(%rsp), %xmm1
movss 0xc(%rsp), %xmm2
movl $0x1, %eax
ucomiss %xmm0, %xmm1
ja 0x32e42
subss %xmm0, %xmm1
divss %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
callq 0x22a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
xorl %eax, %eax
callq 0x50647
xorps %xmm1, %xmm1
cvtss2sd 0xc(%rsp), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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), %rdi
leal 0xffff(%rdi), %eax
testq %rdi, %rdi
cmovnsl %edi, %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
subl %eax, %edi
callq 0x2160
callq 0x20b0
cmpq $0xf4240, %rax          # imm = 0xF4240
jb 0x32e74
callq 0x22b0
cltq
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r14
movss %xmm0, 0x4(%rsp)
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
movl %r8d, %r13d
testl %r8d, %r8d
jle 0x32ed2
leaq (,%r13,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
testl %r15d, %r15d
jle 0x32f26
movl %r15d, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x502bc
testl %ebp, %ebp
jle 0x32f1e
movq 0x10(%rsp), %rax
mulss (%rax,%r12,4), %xmm0
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %rax
xorl %ecx, %ecx
movss (%rax,%rcx,4), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm1
addsd (%rbx,%rcx,8), %xmm1
movsd %xmm1, (%rbx,%rcx,8)
incq %rcx
cmpl %ecx, %r13d
jne 0x32eff
incq %r12
cmpq %r15, %r12
jne 0x32edd
testl %ebp, %ebp
jle 0x32f4b
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
xorl %eax, %eax
movsd (%rbx,%rax,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0x32f35
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r14
movss %xmm0, 0x4(%rsp)
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
movl %r8d, %r13d
testl %r8d, %r8d
jle 0x32f9e
leaq (,%r13,4), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2110
testl %r15d, %r15d
jle 0x32fee
movl %r15d, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x502bc
testl %ebp, %ebp
jle 0x32fe6
movq 0x10(%rsp), %rax
mulss (%rax,%r12,4), %xmm0
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %rax
xorl %ecx, %ecx
movss (%rax,%rcx,4), %xmm1
mulss %xmm0, %xmm1
addss (%rbx,%rcx,4), %xmm1
movss %xmm1, (%rbx,%rcx,4)
incq %rcx
cmpl %ecx, %r13d
jne 0x32fcb
incq %r12
cmpq %r15, %r12
jne 0x32fa9
testl %ebp, %ebp
movss 0x4(%rsp), %xmm1
jle 0x33010
xorl %eax, %eax
movss (%rbx,%rax,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0x32ffa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x0, 0x30(%rsp)
testl %edx, %edx
jle 0x3314e
movq %rdi, %r14
movl %edx, %eax
movq %rax, 0x10(%rsp)
movl $0x1, %edx
leaq 0x30(%rsp), %r13
xorl %eax, %eax
movq %rsi, 0x18(%rsp)
movq %rax, 0x20(%rsp)
imulq $0x70, %rax, %r12
movl 0x60(%rsi,%r12), %eax
cmpl $-0xc, %eax
jl 0x33136
addq %rsi, %r12
cltq
imulq $0x4ec4ec4f, %rax, %rax # imm = 0x4EC4EC4F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
addl %edx, %eax
incl %eax
movl %eax, 0xc(%rsp)
xorl %r15d, %r15d
movsbl 0x34(%r12), %ecx
movl 0x60(%r12), %r8d
movq %r14, %rdi
leaq 0x27e71(%rip), %rsi     # 0x5af1a
movq %rdx, 0x28(%rsp)
xorl %eax, %eax
callq 0x2190
movslq %r15d, %rbx
xorl %ebp, %ebp
movslq 0x60(%r12), %rax
cmpq %rax, %rbx
jge 0x330f2
movq 0x58(%r12), %rax
movsbl (%rax,%rbx), %edi
callq 0x1fbd8
movq %r13, %rdi
movl %eax, %esi
callq 0x271f8
movq %r14, %rdi
leaq 0x27e47(%rip), %rsi     # 0x5af2d
movq %r13, %rdx
xorl %eax, %eax
callq 0x2190
jmp 0x3310b
movl $0x4, %esi
movl $0x1, %edx
leaq 0x262bc(%rip), %rdi     # 0x593bf
movq %r14, %rcx
callq 0x2280
incq %rbx
decl %ebp
cmpl $-0xd, %ebp
jne 0x330ba
subl %ebp, %r15d
movl $0xa, %edi
movq %r14, %rsi
callq 0x2140
movq 0x28(%rsp), %rdx
incl %edx
cmpl 0xc(%rsp), %edx
jne 0x33094
movq 0x20(%rsp), %rax
incq %rax
cmpq 0x10(%rsp), %rax
movq 0x18(%rsp), %rsi
jne 0x33059
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %esi, %esi
jle 0x33197
movl %esi, %eax
xorl %esi, %esi
movslq (%rcx,%rsi,4), %r8
imulq $0x70, %r8, %r9
addq %rdx, %r9
xorl %r8d, %r8d
xorps %xmm0, %xmm0
cvtsd2ss (%r9,%r8,2), %xmm0
movss %xmm0, (%rdi,%r8)
addq $0x4, %r8
cmpl $0xc, %r8d
jne 0x33173
incq %rsi
addq %r8, %rdi
cmpq %rax, %rsi
jne 0x33165
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %esi, %esi
jle 0x331d3
movl %esi, %eax
xorl %esi, %esi
movl (%rcx,%rsi,4), %r8d
leal (%r8,%r8,2), %r8d
movslq %r8d, %r8
leaq (%rdx,%r8,4), %r9
xorl %r8d, %r8d
movss (%r9,%r8), %xmm0
movss %xmm0, (%rdi,%r8)
addq $0x4, %r8
cmpl $0xc, %r8d
jne 0x331b2
incq %rsi
addq %r8, %rdi
cmpq %rax, %rsi
jne 0x331a0
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %edx, %edx
jle 0x33200
xorl %eax, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
cvtss2sd (%rsi,%rcx), %xmm0
movsd %xmm0, (%rdi,%rcx,2)
addq $0x4, %rcx
cmpq $0xc, %rcx
jne 0x331dc
addq $0x70, %rdi
incl %eax
addq %rcx, %rsi
cmpl %edx, %eax
jne 0x331da
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq $0x0, 0x28(%rdi)
testl %edx, %edx
jle 0x33c0b
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
leaq (%r14,%r12), %rsi
leaq (%r15,%r12), %rdi
movl $0xc0, %edx
callq 0x21a0
testl %ebp, %ebp
je 0x33bf6
movq 0x28(%r14,%r12), %rax
subq %r14, %rax
shrq $0x6, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
leaq (%rax,%rax,2), %rax
shlq $0x6, %rax
addq %r15, %rax
movq %rax, 0x28(%r15,%r12)
incl %ebp
addq $0xc0, %r12
cmpl %ebp, %ebx
jne 0x33bbc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl 0x8(%rsp), %eax
movl %eax, 0x18(%rdi)
movl 0xc(%rsp), %eax
movl %eax, 0x1c(%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_O1/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:
testl %edx, %edx
jle 0x36b6b
xorl %eax, %eax
movl $0x1, %ecx
movsd (%rsi,%rcx,8), %xmm0
movsd %xmm0, -0x8(%rdi,%rcx,8)
incq %rcx
cmpl $0x4, %ecx
jne 0x36b47
addq $0x70, %rdi
addq $0xc0, %rsi
incl %eax
cmpl %edx, %eax
jne 0x36b42
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r12
movq %rsi, -0x38(%rbp)
movq %rdi, %r13
movslq 0x10(%rbp), %r14
leal (%r14,%r14,2), %edi
leaq 0xf(,%rdi,4), %rbx
andq $-0x10, %rbx
movq %rsp, %r15
subq %rbx, %r15
movq %r15, %rsp
testq %r14, %r14
jle 0x38c09
movl (%rdx), %eax
cmpl $0x2, %edi
movl $0x1, %esi
cmovgel %edi, %esi
xorl %edi, %edi
movss (%r12,%rdi,4), %xmm0
testl %eax, %eax
jle 0x38bfb
cvtss2sd %xmm0, %xmm0
movq 0x10(%rdx), %r8
xorl %r10d, %r10d
movq (%r8,%r10,8), %r11
movss (%r11,%rdi,4), %xmm1
mulss (%rcx,%r10,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r10
cmpq %r10, %rax
jne 0x38bd7
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r15,%rdi,4)
incq %rdi
cmpq %rsi, %rdi
jne 0x38bc2
leaq 0x10(%rbp), %rax
testq %r9, %r9
je 0x38c32
movq 0x10(%rax), %rdx
movq %r9, %rdi
movq %r15, %rsi
movl %r14d, %ecx
callq 0x4e010
leaq 0x10(%rbp), %rax
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r13)
movq 0x40(%rbp), %r13
testq %r12, %r12
je 0x38c53
movq 0x10(%rax), %rdx
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %ecx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
jmp 0x38c56
xorps %xmm0, %xmm0
testq %r13, %r13
je 0x38cd6
movss %xmm0, -0x2c(%rbp)
movq %rsp, %r12
movq %rsp, %rdi
subq %rbx, %rdi
movq %rdi, %rsp
testl %r14d, %r14d
leaq 0x10(%rbp), %r9
jle 0x38cb3
movq 0x28(%r9), %rax
xorl %ecx, %ecx
movq %rdi, %rdx
movl (%rax,%rcx,4), %esi
leal (%rsi,%rsi,2), %esi
movslq %esi, %rsi
leaq (,%rsi,4), %r8
addq %r13, %r8
xorl %esi, %esi
movss (%r8,%rsi), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpl $0xc, %esi
jne 0x38c94
incq %rcx
addq %rsi, %rdx
cmpq %r14, %rcx
jne 0x38c7e
movq 0x10(%r9), %rdx
movq %r15, %rsi
movl %r14d, %ecx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, (%rax)
movq %r12, %rsp
movss -0x2c(%rbp), %xmm0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/simulation.c
// Function: Test_buildup
float Test_buildup(struct bond *bonds, atom *atoms, int natoms, int naxes)
{
  printf("Testing build up\n");
  // Compute new conformation
  float coord_old[3*natoms], coord_new[3*natoms];
  Set_bonds_measure(bonds, natoms, atoms);
  Put_coord(coord_old, bonds, natoms);
  Build_up(bonds, natoms, NULL, naxes);
  Put_coord(coord_new, bonds, natoms);
  float mass[natoms]; for(int i=0; i<natoms; i++)mass[i]=1;
  float RMSD=rmsd_mclachlan_f(coord_old, coord_new, mass, natoms);
  printf("RMSD with no torsion change: %.2g\n", RMSD);
  if(RMSD > 0.5){
    printf("ERROR in Test_buildup, RMSD= %.2f\n", RMSD);
    exit(8);
  }
  return(RMSD);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x2c(%rbp)
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r12
leaq 0x230ba(%rip), %rdi     # 0x5bdc2
callq 0x2090
leal (%rbx,%rbx,2), %eax
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
movq %r12, %rdi
movl %ebx, %esi
movq %r13, %rdx
callq 0x1512b
movl %ebx, %r13d
testl %ebx, %ebx
jle 0x38de3
leaq 0x8(%r12), %rax
xorl %edi, %edi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
leaq (%rdi,%rdi,2), %rsi
shlq $0x6, %rsi
cmpl $0x0, 0x20(%r12,%rsi)
js 0x38d8d
xorl %esi, %esi
xorps %xmm0, %xmm0
cvtsd2ss (%rax,%rsi,2), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x38d65
incq %rdi
addq $0xc0, %rax
addq %rsi, %rdx
cmpq %r13, %rdi
jne 0x38d53
movq %r12, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x154bb
testl %ebx, %ebx
jle 0x38df2
leaq 0x8(%r12), %rax
xorl %ecx, %ecx
movq %r15, %rdx
leaq (%rcx,%rcx,2), %rsi
shlq $0x6, %rsi
cmpl $0x0, 0x20(%r12,%rsi)
js 0x38df2
xorl %esi, %esi
xorps %xmm0, %xmm0
cvtsd2ss (%rax,%rsi,2), %xmm0
movss %xmm0, (%rdx,%rsi)
addq $0x4, %rsi
cmpq $0xc, %rsi
jne 0x38db9
incq %rcx
addq $0xc0, %rax
addq %rsi, %rdx
cmpq %r13, %rcx
jne 0x38da7
jmp 0x38df2
movq %r12, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl -0x2c(%rbp), %ecx
callq 0x154bb
movq %rsp, %rdx
leaq 0xf(,%r13,4), %rax
andq $-0x10, %rax
subq %rax, %rdx
movq %rdx, %rsp
testl %ebx, %ebx
jle 0x38e1c
xorl %eax, %eax
movl $0x3f800000, (%rdx,%rax,4) # imm = 0x3F800000
incq %rax
cmpq %rax, %r13
jne 0x38e0d
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %ecx
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
cvtss2sd %xmm0, %xmm0
leaq 0x22944(%rip), %rdi     # 0x5b781
movsd %xmm0, -0x38(%rbp)
movb $0x1, %al
callq 0x20f0
movss -0x2c(%rbp), %xmm0
ucomiss 0x1cd27(%rip), %xmm0    # 0x55b7c
ja 0x38e66
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22937(%rip), %rdi     # 0x5b7a4
movsd -0x38(%rbp), %xmm0
movb $0x1, %al
callq 0x20f0
movl $0x8, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/simulation.c
// Function: Test_standard
int Test_standard(struct bond *bonds, int natoms){
  int n=0;
  for(int i=0; i<natoms; i++){
    struct bond *bond=bonds+i;
    if((bond->len>=0)||(bond->angle>=0))continue;  // exclude pseudo-bonds
    if(bond->previous==NULL)continue;
    int na=Atom_type(bond->atom->name);
    if((na<0)||(na>4))continue;
    float d1=bond->l-BB_length[na], d2;
    if(bond->previous->previous){
      d2=bond->r_cos_theta/bond->l-cos(BB_angle[na]);
    }else{
      d2=0;
    }
    if((fabs(d1)>0.01)||(fabs(d2)>0.01)){
      printf("WARNING %c%d %s %.3f %.3f\n",
	     bond->atom->aa, bond->atom->res+1, bond->atom->name, d1, d2);
      n++;
    }
  }
  if(n){
    printf("WARNING, %d errors in standardize bonds\n", n); return(n);
  }
  printf("Standard bonds successfully tested\n");
  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %esi, %esi
jle 0x3ab03
movq %rdi, %r14
movl %esi, %eax
shlq $0x6, %rax
leaq (%rax,%rax,2), %r12
xorl %r13d, %r13d
leaq 0x2f461(%rip), %rbp     # 0x69e50
leaq 0x2f47a(%rip), %r15     # 0x69e70
xorl %ebx, %ebx
cmpl $0x0, 0x34(%r14,%r13)
jns 0x3aa08
cmpl $0x0, 0x38(%r14,%r13)
js 0x3aa19
addq $0xc0, %r13
cmpq %r13, %r12
jne 0x3a9f8
jmp 0x3ab05
cmpq $0x0, 0x28(%r14,%r13)
je 0x3aa08
movq (%r14,%r13), %rdi
addq $0x18, %rdi
callq 0x10374
cmpl $0x4, %eax
ja 0x3aa08
movl %eax, %eax
xorps %xmm0, %xmm0
cvtss2sd (%rbp,%rax,4), %xmm0
movsd 0x58(%r14,%r13), %xmm2
movq 0x28(%r14,%r13), %rcx
cmpq $0x0, 0x28(%rcx)
je 0x3aaa0
movsd 0x60(%r14,%r13), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
movsd %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtss2sd (%r15,%rax,4), %xmm0
movsd %xmm2, 0x8(%rsp)
callq 0x2130
movsd 0x8(%rsp), %xmm2
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
jmp 0x3aaa3
xorps %xmm1, %xmm1
subsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
movaps %xmm0, %xmm2
movaps 0x1c874(%rip), %xmm3    # 0x57330
andps %xmm3, %xmm2
movsd 0x1c899(%rip), %xmm4    # 0x57360
ucomisd %xmm4, %xmm2
ja 0x3aadd
movaps %xmm1, %xmm2
andps %xmm3, %xmm2
ucomisd %xmm4, %xmm2
jbe 0x3aa08
movq (%r14,%r13), %rcx
movsbl 0x68(%rcx), %esi
movl 0x64(%rcx), %edx
incl %edx
addq $0x18, %rcx
leaq 0x21043(%rip), %rdi     # 0x5bb38
movb $0x2, %al
callq 0x20f0
incl %ebx
jmp 0x3aa08
xorl %ebx, %ebx
testl %ebx, %ebx
je 0x3ab1b
leaq 0x21043(%rip), %rdi     # 0x5bb53
movl %ebx, %esi
xorl %eax, %eax
callq 0x20f0
jmp 0x3ab29
leaq 0x21307(%rip), %rdi     # 0x5be29
callq 0x2090
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/simulation.c
// Function: Compute_RMSD
float Compute_RMSD(float f, float *Diff_Tors, int naxes,
		   struct bond *bonds_ini, struct bond *bonds, int natoms1,
		   struct Reference Ref1, float *coord_ref_2)
{
  double diff_tors[naxes];
  for(int i=0; i<naxes; i++)diff_tors[i]=f*Diff_Tors[i];
  Copy_bonds(bonds, bonds_ini, natoms1);
  Build_up(bonds, natoms1, diff_tors, naxes);
  float coord_all[3*natoms1];
  Put_coord(coord_all, bonds, natoms1);
  float coord_new[Ref1.N_Cart];
  Write_ref_coord(coord_new, Ref1.N_ref, coord_all, Ref1.atom_num);
  float RMSD=
    rmsd_mclachlan_f(coord_ref_2, coord_new, Ref1.mass_atom, Ref1.N_ref);
  return(RMSD);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movq %rcx, %r14
movq %rdx, %r13
movl %esi, %eax
movq %rsp, %rdx
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
subq %rcx, %rdx
movq %rdx, %rsp
movl %esi, -0x2c(%rbp)
testl %esi, %esi
jle 0x3b0ee
xorl %ecx, %ecx
movss (%rdi,%rcx,4), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm1
movsd %xmm1, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x3b0d4
movq %rdx, -0x38(%rbp)
movq $0x0, 0x28(%r14)
testl %r8d, %r8d
movq %r8, %rbx
jle 0x3b155
xorl %r12d, %r12d
xorl %r15d, %r15d
leaq (%r12,%r13), %rsi
leaq (%r14,%r12), %rdi
movl $0xc0, %edx
callq 0x21a0
testl %r15d, %r15d
je 0x3b143
movq 0x28(%r13,%r12), %rax
subq %r13, %rax
shrq $0x6, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
cltq
leaq (%rax,%rax,2), %rax
shlq $0x6, %rax
addq %r14, %rax
movq %rax, 0x28(%r14,%r12)
incl %r15d
addq $0xc0, %r12
movq %rbx, %r8
cmpl %r15d, %r8d
jne 0x3b108
leaq 0x10(%rbp), %r13
movq %r14, %rdi
movl %r8d, %esi
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x154bb
leal (%rbx,%rbx,2), %eax
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
testl %ebx, %ebx
jle 0x3b1d0
movl %ebx, %ecx
leaq 0x8(%r14), %rdx
xorl %esi, %esi
movq %rax, %rdi
leaq (%rsi,%rsi,2), %r8
shlq $0x6, %r8
cmpl $0x0, 0x20(%r14,%r8)
js 0x3b1d0
xorl %r8d, %r8d
xorps %xmm0, %xmm0
cvtsd2ss (%rdx,%r8,2), %xmm0
movss %xmm0, (%rdi,%r8)
addq $0x4, %r8
cmpq $0xc, %r8
jne 0x3b1a5
incq %rsi
addq $0xc0, %rdx
addq %r8, %rdi
cmpq %rcx, %rsi
jne 0x3b192
movl 0x4(%r13), %ecx
movq %rsp, %rsi
leaq 0xf(,%rcx,4), %rcx
andq $-0x10, %rcx
subq %rcx, %rsi
movq %rsi, %rsp
movslq (%r13), %rcx
testq %rcx, %rcx
jle 0x3b22e
movq 0x28(%r13), %rdx
xorl %edi, %edi
movq %rsi, %r8
movl (%rdx,%rdi,4), %r9d
leal (%r9,%r9,2), %r9d
movslq %r9d, %r9
leaq (%rax,%r9,4), %r10
xorl %r9d, %r9d
movss (%r10,%r9), %xmm0
movss %xmm0, (%r8,%r9)
addq $0x4, %r9
cmpl $0xc, %r9d
jne 0x3b20d
incq %rdi
addq %r9, %r8
cmpq %rcx, %rdi
jne 0x3b1fb
movq 0x10(%r13), %rdx
movq -0x40(%rbp), %rdi
callq 0x4e010
cvtsd2ss %xmm0, %xmm0
leaq -0x28(%rbp), %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/force2confchange.c
// Function: Read_force
int Read_force(float *Force_input_cart, atom *atoms1,
	       int *atom_num1, int N_ref, char *FILE_FORCE)
{
  FILE *file_in=fopen(FILE_FORCE, "r");
  int iref=0, res; float f1, f2, f3;
  char name[20], aa1[5], string[1000];
  if(file_in==NULL){
    printf("ERROR, I could not find file with input force %s\n",
	   FILE_FORCE); return(-1);
  }
  while(fgets(string, sizeof(string), file_in)!=NULL){
    sscanf(string, "%s%s%d%f%f%f", name, aa1, &res, &f1, &f2, &f3);
    if(Find_atom_seq1(&iref, name, aa1, res, atoms1,atom_num1, N_ref)<0){
      printf("ERROR, reference number not found for %s", string);
      return(-1);
    }
    Force_input_cart[3*iref]=f1;
    Force_input_cart[3*iref+1]=f2;
    Force_input_cart[3*iref+2]=f3;
  }
  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %r8, %r15
movq %rdi, %rbx
leaq 0x1e828(%rip), %rsi     # 0x59eda
movq %r8, %rdi
callq 0x2210
testq %rax, %rax
je 0x3b75c
movq %rax, %r14
leaq 0x40(%rsp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rax, %rdx
callq 0x2170
testq %rax, %rax
je 0x3b774
leaq 0x40(%rsp), %r12
leaq 0x14(%rsp), %r13
leaq 0x10(%rsp), %r15
xorl %ebp, %ebp
movq %r12, %rdi
leaq 0x2088d(%rip), %rsi     # 0x5bf89
leaq 0x20(%rsp), %rdx
leaq 0x1b(%rsp), %rcx
movq %r13, %r8
movq %r15, %r9
xorl %eax, %eax
leaq 0x8(%rsp), %r10
pushq %r10
leaq 0x14(%rsp), %r10
pushq %r10
callq 0x21f0
addq $0x10, %rsp
movss 0x10(%rsp), %xmm0
movss %xmm0, (%rbx)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x4(%rbx)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x8(%rbx)
movq %r12, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %r14, %rdx
callq 0x2170
testq %rax, %rax
jne 0x3b6f2
jmp 0x3b776
leaq 0x207f4(%rip), %rdi     # 0x5bf57
movq %r15, %rsi
xorl %eax, %eax
callq 0x20f0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x3b776
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/mutation.c
// Function: Mainchain
int Mainchain(char *atom_name){
  if(strncmp(atom_name,"N ",2)==0)return(1);
  if(strncmp(atom_name,"CA",2)==0)return(1);
  if(strncmp(atom_name,"C ",2)==0)return(1);
  if(strncmp(atom_name,"O ",2)==0)return(1);
  return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x16a5f(%rip), %rsi     # 0x55f23
movl $0x2, %edx
callq 0x2070
movl $0x1, %ebp
testl %eax, %eax
je 0x3f523
leaq 0x15c8c(%rip), %rsi     # 0x5516a
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2070
testl %eax, %eax
je 0x3f523
leaq 0x16a30(%rip), %rsi     # 0x55f26
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2070
testl %eax, %eax
je 0x3f523
leaq 0x16a1b(%rip), %rsi     # 0x55f29
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2070
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/mutation.c
// Function: Convert_to_tors
float *Convert_to_tors(float *Cart, int N3, float **J_ar, int N_axes)
{
  // Torsional force = J^t f = sum_i dr_i/dphi_a f_i
  float *Tors=malloc(N_axes*sizeof(float)); int a, i;
  for(a=0; a<N_axes; a++){
    double sum=0; float *J=J_ar[a], *f=Cart;
    for(i=0; i<N3; i++){sum+=(*J)*(*f); J++; f++;}
    Tors[a]=sum;
  }
  return(Tors);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movslq %ecx, %r12
leaq (,%r12,4), %rdi
callq 0x21d0
testl %r12d, %r12d
jle 0x3f59c
movl %r15d, %ecx
movl %ebp, %edx
xorl %esi, %esi
testl %ebp, %ebp
jle 0x3f58c
movq (%rbx,%rsi,8), %rdi
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movss (%rdi,%r8,4), %xmm1
mulss (%r14,%r8,4), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %r8
cmpl %r8d, %edx
jne 0x3f56a
cvtsd2ss %xmm0, %xmm0
jmp 0x3f58f
xorps %xmm0, %xmm0
movss %xmm0, (%rax,%rsi,4)
incq %rsi
cmpq %rcx, %rsi
jne 0x3f55b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/mutation.c
// Function: Cosine
float Cosine(float *scale, float *xx, float *yy, int n)
{
  double sum_xy=0, sum_x2=0, sum_y2=0;
  float *x=xx, *y=yy;
  for(int i=0; i<n; i++){
    sum_xy+=(*x)*(*y);
    sum_x2+=(*x)*(*x);
    sum_y2+=(*y)*(*y);
    x++; y++;
  }
  if(sum_x2){
    *scale=sqrt(sum_y2/sum_x2);
    return(sum_xy/sqrt(sum_x2*sum_y2));
  }else{
    *scale=0;
    return(0);
  }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorpd %xmm4, %xmm4
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
testl %ecx, %ecx
jle 0x3f600
movl %ecx, %eax
xorl %ecx, %ecx
movss (%rsi,%rcx,4), %xmm1
movss (%rdx,%rcx,4), %xmm2
movaps %xmm1, %xmm3
mulss %xmm2, %xmm3
cvtss2sd %xmm3, %xmm3
addsd %xmm3, %xmm4
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm1, %xmm5
mulss %xmm2, %xmm2
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
addsd %xmm1, %xmm6
incq %rcx
cmpl %ecx, %eax
jne 0x3f5c5
ucomisd %xmm0, %xmm5
jne 0x3f608
jnp 0x3f626
movapd %xmm6, %xmm0
divsd %xmm5, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movsd %xmm4, 0x8(%rsp)
jb 0x3f632
sqrtsd %xmm0, %xmm0
jmp 0x3f653
movl $0x0, (%rbx)
xorpd %xmm0, %xmm0
jmp 0x3f688
movsd %xmm5, 0x18(%rsp)
movsd %xmm6, 0x10(%rsp)
callq 0x2290
xorpd %xmm1, %xmm1
movsd 0x10(%rsp), %xmm6
movsd 0x18(%rsp), %xmm5
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx)
mulsd %xmm6, %xmm5
ucomisd %xmm1, %xmm5
jb 0x3f66e
xorps %xmm0, %xmm0
sqrtsd %xmm5, %xmm0
jmp 0x3f677
movapd %xmm5, %xmm0
callq 0x2290
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/mutation.c
// Function: Extract_reference_atoms
int Extract_reference_atoms(int *resatom, atom *atoms, int natoms,
			    struct residue *seq, int Nres)
{
  char SEL[4]="CA"; if(strcmp(REF_CC, "CB")==0)strcpy(SEL, "CB");
  int Na=0; 
  // resatom[i]= Reference atom for residue i
  // Center of mass and inertia tensor

  for(int i=0; i<natoms; i++){
    atom *atm=atoms+i;
    if((strncmp(atm->name, SEL, 2)!=0)&&
       ((seq[atm->res].amm!='G')||(strncmp(atm->name, "CA", 2)!=0)))continue;
    resatom[Na]=i; Na++;
  }
  if(Na!=Nres)printf("WARNING, %d residues expected, %d found\n", Nres, Na);
  if(Na > Nres){printf("Leaving\n"); return(0);}
  return(Na);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
movl $0x4143, 0x8(%rsp)      # imm = 0x4143
leaq 0x292f8(%rip), %rax     # 0x69e94
movzwl (%rax), %ecx
xorl $0x4243, %ecx           # imm = 0x4243
movzbl 0x2(%rax), %eax
orw %cx, %ax
jne 0x40bba
movb $0x0, 0xa(%rsp)
movw $0x4243, 0x8(%rsp)      # imm = 0x4243
movl %r8d, 0xc(%rsp)
testl %edx, %edx
jle 0x40c2d
movl %edx, %r12d
addq $0x64, %r15
xorl %ebp, %ebp
xorl %r13d, %r13d
leaq -0x4c(%r15), %rbx
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2070
testl %eax, %eax
je 0x40c10
movslq (%r15), %rax
shlq $0x5, %rax
cmpb $0x47, 0x13(%r14,%rax)
jne 0x40c1f
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x14563(%rip), %rsi     # 0x5516a
callq 0x2070
testl %eax, %eax
jne 0x40c1f
movslq %r13d, %r13
movq 0x10(%rsp), %rax
movl %ebp, (%rax,%r13,4)
incl %r13d
incq %rbp
addq $0x70, %r15
cmpq %rbp, %r12
jne 0x40bcf
jmp 0x40c30
xorl %r13d, %r13d
movl 0xc(%rsp), %ebx
cmpl %ebx, %r13d
je 0x40c4c
leaq 0x1b417(%rip), %rdi     # 0x5c057
movl %ebx, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x20f0
cmpl %ebx, %r13d
jle 0x40c60
leaq 0x1bfde(%rip), %rdi     # 0x5cc36
callq 0x2090
xorl %r13d, %r13d
movl %r13d, %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/optimization.c
// Function: Find_max_quad
float Find_max_quad(float x1, float x2, float x3,
		    float y1, float y2, float y3,
		    float MIN, float MAX)
{

 float yprime_2=((y1-y2)/(x1-x2));
  float yprime_3=((y1-y3)/(x1-x3));
  if(yprime_2 == yprime_3){
    // Singular data, return maximum value
    printf("WARNING in Find_max_quad, equal derivatives\n");
    float xmax=x2, ymax=y2;
    if(y1>ymax){ymax=y1; xmax=x1;}
    if(y3>ymax){xmax=x3;}
    return(xmax);
  }
  float a=(yprime_2-yprime_3)/(x2-x3);
  if(a>0){
    // Second derivative is positive, no maximum!
    //printf("WARNING, second derivative >0\n");
    printf("WARNING in Find_max_quad, second derivative %.2g >0\n", a);
    float xmax=x2, ymax=y2;
    if(y1>ymax){ymax=y1; xmax=x1;}
    if(y3>ymax){xmax=x3;}
    return(xmax);
  }
  float x0=0.5*(x1+x2)-yprime_2/(2*a);
  //printf("a= %.2f x0= %.2f\n", a, x0);
  if(x0<MIN){x0=(x1+MIN)/2;}
  //else if(x0>MAX){x0=(x3+MAX)/2;}
  return(x0);
}

// Assembly:
subq $0x58, %rsp
movaps %xmm0, %xmm8
movaps %xmm3, %xmm0
subss %xmm4, %xmm0
movaps %xmm8, %xmm7
subss %xmm1, %xmm7
divss %xmm7, %xmm0
movaps %xmm3, %xmm7
subss %xmm5, %xmm7
movaps %xmm8, %xmm9
subss %xmm2, %xmm9
divss %xmm9, %xmm7
ucomiss %xmm7, %xmm0
jne 0x411b6
jp 0x411b6
leaq 0x1bbb7(%rip), %rdi     # 0x5cd45
movaps %xmm3, 0x40(%rsp)
movaps %xmm8, 0x10(%rsp)
movaps %xmm2, 0x30(%rsp)
movss %xmm5, 0xc(%rsp)
movss %xmm4, 0x8(%rsp)
movaps %xmm1, 0x20(%rsp)
callq 0x2090
jmp 0x4120b
movaps %xmm0, %xmm9
subss %xmm7, %xmm9
movaps %xmm1, %xmm7
subss %xmm2, %xmm7
divss %xmm7, %xmm9
xorps %xmm7, %xmm7
ucomiss %xmm7, %xmm9
jbe 0x4124c
xorps %xmm0, %xmm0
cvtss2sd %xmm9, %xmm0
leaq 0x1bb2d(%rip), %rdi     # 0x5cd10
movb $0x1, %al
movaps %xmm3, 0x40(%rsp)
movaps %xmm8, 0x10(%rsp)
movaps %xmm2, 0x30(%rsp)
movss %xmm5, 0xc(%rsp)
movss %xmm4, 0x8(%rsp)
movaps %xmm1, 0x20(%rsp)
callq 0x20f0
movaps 0x40(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movaps %xmm1, %xmm2
cmpltss %xmm0, %xmm2
movaps 0x10(%rsp), %xmm3
andps %xmm2, %xmm3
andnps 0x20(%rsp), %xmm2
orps %xmm3, %xmm2
maxss %xmm1, %xmm0
cmpltss 0xc(%rsp), %xmm0
movaps %xmm0, %xmm1
andnps %xmm2, %xmm1
andps 0x30(%rsp), %xmm0
orps %xmm1, %xmm0
addq $0x58, %rsp
retq
addss %xmm8, %xmm1
xorps %xmm2, %xmm2
cvtss2sd %xmm1, %xmm2
addss %xmm9, %xmm9
divss %xmm9, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0xfdea(%rip), %xmm2     # 0x51058
subsd %xmm0, %xmm2
cvtsd2ss %xmm2, %xmm2
addss %xmm6, %xmm8
mulss 0x148f8(%rip), %xmm8    # 0x55b7c
movaps %xmm2, %xmm0
cmpltss %xmm6, %xmm0
movaps %xmm0, %xmm1
andnps %xmm2, %xmm1
andps %xmm8, %xmm0
jmp 0x41244
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/optimization.c
// Function: Rearrange_points
void Rearrange_points(float *x1, float *x2, float *x3,
		      float *y1, float *y2, float *y3,
		      float x0, float y0)
{
  if(y0<*y1){
    *x3=*x2; *y3=*y2;
    *x2=*x1; *y2=*y1;
    *x1=x0;  *y1=y0;
  }else if(y0<*y2){
    *x3=*x2; *y3=*y2;
    *x2=x0;  *y2=y0;
  }else if(y0<*y3){
    *x1=*x2; *y1=*y2;
    *x2=x0; *y2=y0;
  }else{
    *x1=*x2; *y1=*y2;
    *x2=*x3; *y2=*y3;
    *x3=x0;  *y3=y0;
  }
}

// Assembly:
movss (%rcx), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x412b5
movss (%rsi), %xmm2
movss %xmm2, (%rdx)
movss (%r8), %xmm2
movss %xmm2, (%r9)
jmp 0x412ee
movss (%r8), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x412cd
movq %rsi, %rdi
movq %rdx, %rsi
movq %r8, %rcx
movq %r9, %r8
jmp 0x412ee
movss (%r9), %xmm2
ucomiss %xmm1, %xmm2
movss (%rsi), %xmm2
movss %xmm2, (%rdi)
movss (%r8), %xmm2
movss %xmm2, (%rcx)
movq %rdx, %rdi
movq %r9, %rcx
ja 0x41305
movss (%rdi), %xmm2
movss %xmm2, (%rsi)
movss (%rcx), %xmm2
movss %xmm2, (%r8)
movq %rdi, %rsi
movq %rcx, %r8
movss %xmm0, (%rsi)
movss %xmm1, (%r8)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/output_tnm.c
// Function: Check_make_dir
int Check_make_dir(char *outdir){
  char name_out[1000]; FILE *file_out;
  if(outdir[0]=='\0')return(0);
  sprintf(name_out, "%s/%s", outdir, "tmp");
  file_out=fopen(name_out, "w");
  if(file_out!=NULL){fclose(file_out); return(1);}
  sprintf(name_out, "mkdir -p %s\n", outdir);
  if(system(name_out)==0)return(1);
  return(0);
}

// Assembly:
cmpb $0x0, (%rdi)
je 0x41ebf
pushq %r14
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rdi, %rbx
leaq 0x1b099(%rip), %rsi     # 0x5cf1e
leaq 0x1b098(%rip), %rcx     # 0x5cf24
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2260
leaq 0x1539d(%rip), %rsi     # 0x57240
movq %r14, %rdi
callq 0x2210
testq %rax, %rax
je 0x41ec2
movq %rax, %rdi
callq 0x20c0
movl $0x1, %eax
jmp 0x41eea
xorl %eax, %eax
retq
leaq 0x1b05f(%rip), %rsi     # 0x5cf28
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2260
movq %r14, %rdi
callq 0x20e0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/output_tnm.c
// Function: Print_cart_fluct
void Print_cart_fluct(int *atom_num, int N_atom, float *fluct,
		      atom *atoms, struct residue *seq,
		      char *name, char *type)
{
  float MAX_B=50.0;
  int i, ia=0, n=1;
  FILE *file_out=fopen(name, "w");
  printf("Writing %s\n", name);
  fprintf(file_out, "REMARK %d B_factor = %s\n",n, type);

  { // Normalize such that max_fluctuation = MAX_B
    float max_f=0, norm;
    for(i=0; i<N_atom; i++)if(fluct[i]>max_f)max_f=fluct[i];
    norm=MAX_B/max_f; for(i=0; i<N_atom; i++)fluct[i]*=norm;
  }
  for(i=0; i<N_atom; i++){
    Print_atom(atoms+atom_num[i], &ia, fluct[i], seq, file_out);
  }
  fprintf(file_out, "TER\n");
  fclose(file_out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbp
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
leaq 0x15311(%rip), %rsi     # 0x57240
movq %r9, %rdi
callq 0x2210
movq %rax, %r12
leaq 0xfd9a(%rip), %rdi      # 0x51cdb
movq %rbp, %rsi
xorl %eax, %eax
callq 0x20f0
leaq 0x1afe3(%rip), %rsi     # 0x5cf35
movq %r12, %rdi
movl $0x1, %edx
movq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x2190
movl %ebx, %esi
testl %ebx, %ebx
jle 0x41f88
xorps %xmm1, %xmm1
xorl %eax, %eax
movss (%r15,%rax,4), %xmm0
maxss %xmm1, %xmm0
incq %rax
movaps %xmm0, %xmm1
cmpq %rax, %rsi
jne 0x41f71
jmp 0x41f8b
xorps %xmm0, %xmm0
movq %r14, %rbp
testl %ebx, %ebx
jle 0x41fb8
movss 0x1adda(%rip), %xmm1    # 0x5cd74
divss %xmm0, %xmm1
xorl %eax, %eax
movss (%r15,%rax,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%r15,%rax,4)
incq %rax
cmpq %rax, %rsi
jne 0x41fa0
testl %ebx, %ebx
movq %r13, %rdx
movq %r12, %r13
movq 0x18(%rsp), %rbx
jle 0x42009
xorl %r14d, %r14d
movq %r15, 0x20(%rsp)
movslq (%rbx,%r14,4), %rax
imulq $0x70, %rax, %rdi
addq %rdx, %rdi
movss (%r15,%r14,4), %xmm0
movq %rsi, %r15
leaq 0xc(%rsp), %rsi
movq %rdx, %r12
movq %rbp, %rdx
movq %r13, %rcx
callq 0x42038
movq %r15, %rsi
movq 0x20(%rsp), %r15
movq %r12, %rdx
incq %r14
cmpq %r14, %rsi
jne 0x41fcf
leaq 0x1af3e(%rip), %rdi     # 0x5cf4e
movl $0x4, %esi
movl $0x1, %edx
movq %r13, %rcx
callq 0x2280
movq %r13, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/output_tnm.c
// Function: Print_atom
void Print_atom(atom *atom, int *num, float B, struct residue *seq,
		FILE *file_out)
{
  struct residue *s=seq+atom->res;
  char aaname3[4]; Name3(aaname3, s->i_aa);
  (*num)++; int jatom=*num; if(jatom>99999)jatom=99999;
  fprintf(file_out,
	  "ATOM  %5d  %4s%3s %c%4d   %8.3f%8.3f%8.3f%6.2f%6.2f\n",
	  jatom, atom->name, aaname3, 'A', atom->res+1,
	  atom->r[0], atom->r[1], atom->r[2], 1.0, B);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movss %xmm0, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movslq 0x64(%rdi), %rax
shlq $0x5, %rax
movswl 0x14(%rdx,%rax), %esi
leaq 0x14(%rsp), %r12
movq %r12, %rdi
callq 0x271f8
movl (%r14), %edx
incl %edx
movl %edx, (%r14)
movl $0x1869f, %eax          # imm = 0x1869F
cmpl %eax, %edx
cmovgel %eax, %edx
leaq 0x18(%r15), %rcx
movl 0x64(%r15), %eax
incl %eax
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movsd 0x10(%r15), %xmm2
cvtss2sd 0x10(%rsp), %xmm4
movl %eax, (%rsp)
leaq 0x1af49(%rip), %rsi     # 0x5cff2
movsd 0xef8f(%rip), %xmm3     # 0x51040
movq %rbx, %rdi
movq %r12, %r8
movl $0x41, %r9d
movb $0x5, %al
callq 0x2190
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/ugobas[P]tnm/output_tnm.c
// Function: Print_structures
void Print_structures(char *pdbout,
		      double *atom_str1, atom *atoms1,
		      struct residue *seq1, char chain1,
		      double *atom_str2, atom *atoms2,
		      struct residue *seq2, char chain2,
		      int *atom_num, int N_ref, int N_cart,
		      float **Cart_mode, float *coeff,
		      int *sort, int N_MODE_PRINT, int N_modes)
{
  double *atom_tmp;
  int imod=0, kmod=0, nmod, i;
  if(N_MODE_PRINT<=0)return;
  if(N_MODE_PRINT < N_modes){nmod = N_MODE_PRINT;}else{nmod= N_modes;}

  // Print reference structure
  //Write_coord(pdbout,atom_str1,atoms1,atom_num,N_ref,seq1,chain1,kmod);
  // kmod++;
  atom_tmp=malloc(N_cart*sizeof(double));
  for(i=0; i<N_cart; i++)atom_tmp[i]=atom_str1[i];

  for(imod=0; imod< nmod; imod++){
    int ik=sort[imod];
    float *mode=Cart_mode[ik];
    /* Update intermediate structure */
    for(i=0;i<N_cart;i++)atom_tmp[i]+=coeff[ik]*mode[i];
    Write_coord(pdbout,atom_tmp,atoms1,atom_num,N_ref,seq1,chain1,kmod);
    kmod++;
  }

  // Print experimental structure 2
  //Write_coord(pdbout,atom_str2,atoms2,atom_num,N_ref,seq2,chain2,-1);
  printf("Writing %s\n", pdbout);
  free(atom_tmp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xc8(%rsp), %ebp
testl %ebp, %ebp
jle 0x423fc
movq %rsi, 0x10(%rsp)
movl %r8d, (%rsp)
movl 0xd0(%rsp), %ebx
movq 0xc0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0xa8(%rsp), %r14d
movl 0xa0(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpl %ebx, %ebp
cmovgel %ebx, %ebp
movslq %r14d, %r13
leaq (,%r13,8), %rdi
callq 0x21d0
movq %rax, %r12
movl %r14d, %r15d
testl %r13d, %r13d
jle 0x42345
leaq (,%r15,8), %rdx
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x21a0
testl %ebx, %ebx
jle 0x423d3
cmpl $0x2, %ebp
movl $0x1, %ebx
cmovgel %ebp, %ebx
xorl %ebp, %ebp
movsbl (%rsp), %r13d
testl %r14d, %r14d
jle 0x423a3
movq 0x28(%rsp), %rax
movslq (%rax,%rbp,4), %rcx
movq 0x18(%rsp), %rax
movq (%rax,%rcx,8), %rax
movq 0x20(%rsp), %rdx
movss (%rdx,%rcx,4), %xmm0
xorl %ecx, %ecx
movss (%rax,%rcx,4), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm1
addsd (%r12,%rcx,8), %xmm1
movsd %xmm1, (%r12,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x42382
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x4(%rsp), %r8d
movq 0x40(%rsp), %r9
pushq %rbp
pushq %r13
callq 0x4240b
addq $0x10, %rsp
incq %rbp
cmpq %rbx, %rbp
jne 0x4235f
leaq 0xf901(%rip), %rdi      # 0x51cdb
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x20f0
movq %r12, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq