LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Unfold_interactions
struct interaction *Unfold_interactions(int *N_int_unfold,
					struct interaction *Int_list,
					int N_int, atom *atoms)
{
  struct interaction *Int_list_unfold=
    malloc(N_int*sizeof(struct interaction)), *tmp=Int_list;
  int DIJ_MIN=2, n=0;
  for(int k=0; k<N_int; k++){
    if(atoms[tmp->i1].chain==atoms[tmp->i2].chain &&
       abs(atoms[tmp->i1].res-atoms[tmp->i2].res)<=DIJ_MIN){
      Int_list_unfold[n]=*tmp; n++; 
    }
    tmp++;
  }
  *N_int_unfold=n;
  return(Int_list_unfold);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movslq %edx, %r13
imulq $0xc8, %r13, %rdi
callq 0x21e0
movq %rax, %r12
testl %r13d, %r13d
jle 0x8cb2
xorl %r13d, %r13d
movslq (%r15), %rax
imulq $0x70, %rax, %rax
movl 0x6c(%r14,%rax), %edx
movslq 0x4(%r15), %rcx
imulq $0x70, %rcx, %rcx
cmpl 0x6c(%r14,%rcx), %edx
jne 0x8ca5
addq %r14, %rax
addq %r14, %rcx
movl 0x64(%rax), %eax
subl 0x64(%rcx), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x2, %ecx
ja 0x8ca5
movslq %r13d, %r13
imulq $0xc8, %r13, %rdi
addq %r12, %rdi
movl $0xc8, %edx
movq %r15, %rsi
callq 0x21b0
incl %r13d
addq $0xc8, %r15
decl %ebp
jne 0x8c55
jmp 0x8cb5
xorl %r13d, %r13d
movl %r13d, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Get_chain_num
int Get_chain_num(int *apo_chain_num, char *apo_chains, int n_apo,
		   struct chain *chains, int Nchain){
  int success=1;
  for(int i=0; i<n_apo; i++){
    int j;
    for(j=0; j<Nchain; j++)if(chains[j].label==apo_chains[i])break;
    if(j==Nchain){
      printf("ERROR, chain %c not found in PDB\n",apo_chains[i]);
      success=0;
    }
    apo_chain_num[i]=j;
  }
  return(success);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
testl %edx, %edx
jle 0x8d5e
movl %r8d, %ebx
movq %rsi, %r15
movl %r8d, %r12d
movl %edx, %r14d
addq $0x34, %rcx
movq %rcx, 0x8(%rsp)
movl $0x1, 0x4(%rsp)
xorl %ebp, %ebp
movl $0x0, %r13d
testl %ebx, %ebx
jle 0x8d2b
movb (%r15,%rbp), %al
movq 0x8(%rsp), %rcx
xorl %r13d, %r13d
cmpb %al, (%rcx)
je 0x8d2b
incq %r13
addq $0x70, %rcx
cmpq %r13, %r12
jne 0x8d16
movl %r12d, %r13d
jmp 0x8d30
cmpl %ebx, %r13d
jne 0x8d4b
movsbl (%r15,%rbp), %esi
movl $0x0, 0x4(%rsp)
leaq 0x4c0ef(%rip), %rdi     # 0x54e33
xorl %eax, %eax
callq 0x20f0
movq 0x10(%rsp), %rax
movl %r13d, (%rax,%rbp,4)
incq %rbp
cmpq %r14, %rbp
jne 0x8d00
jmp 0x8d66
movl $0x1, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Get_modes_tors
void Get_modes_tors(struct Normal_Mode NM, int N_modes,
		    double **Hessian, struct Jacobian J,
		    struct axe *axe1, int naxe1, struct Reference Ref_kin,
		    atom *atoms1)
{
  float t0=clock();

  d_Diagonalize(N_modes, Hessian, NM.omega2, NM.MW_Tors, -1);
  printf("Hessian diagonalization. Time= %.2lf sec.\n", (clock()-t0)/nbtops);
  t0=clock();

  // UGO: Rescale omega^2 with mass 09/08/2022 It may induce mistakes
  //float omega_norm=Ref_kin.mass_sum/Ref_kin.N_ref;
  //for(int i=0; i<N_modes; i++)NM.omega2[i]*=omega_norm;
  
  // Allocate only relevant modes
  NM.N_relevant=NM.N;
  for(int ia=0; ia<NM.N; ia++){
    Transform_tors_modes(NM.Tors[ia], NM.MW_Tors[ia],
			 J.T_sqrt_tr, J.T_sqrt_inv_tr,
			 N_modes, naxe1);
    Convert_torsion2cart(NM.Cart[ia], atoms1, NM.Tors[ia],
			 axe1, naxe1, Ref_kin, ia);
  }
  printf("Torsional and Cartesian modes. Time= %.2lf sec.\n",
	 (clock()-t0)/nbtops);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, 0x38(%rsp)
movl %ecx, %ebp
movq %rdx, 0x60(%rsp)
movq %rsi, %rbx
movl %edi, %r14d
callq 0x20b0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0x30(%rsp)
movq 0xc0(%rsp), %rdx
movq 0xe8(%rsp), %rcx
movl %r14d, 0x44(%rsp)
movl %r14d, %edi
movq %rbx, %rsi
movq %rcx, 0x58(%rsp)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x4a559
callq 0x20b0
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
subss 0x30(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5f1d4(%rip), %xmm0    # 0x685e0
leaq 0x4b9c4(%rip), %rdi     # 0x54dd7
movb $0x1, %al
callq 0x20f0
callq 0x20b0
movq %rax, 0x48(%rsp)
movslq 0xa0(%rsp), %r13
testq %r13, %r13
jle 0x94d7
leaq 0x1b8(%rsp), %r12
leaq 0x170(%rsp), %rax
leaq 0xa0(%rsp), %rcx
movq 0x38(%rcx), %rsi
movq %rsi, 0x30(%rsp)
movq 0x40(%rcx), %r15
movq 0x38(%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x40(%rax), %rbx
xorl %r14d, %r14d
movq (%r15,%r14,8), %rdi
movq 0x58(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdx
movq 0x50(%rsp), %rcx
movl 0x44(%rsp), %r8d
movl %ebp, %r9d
callq 0x24036
movq 0x30(%rsp), %rax
movq (%rax,%r14,8), %rdi
movq (%r15,%r14,8), %rdx
movupd (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq 0x38(%rsp), %rsi
movq 0x60(%rsp), %rcx
movl %ebp, %r8d
movl %r14d, %r9d
callq 0x25c2a
incq %r14
cmpq %r14, %r13
jne 0x946a
xorps %xmm0, %xmm0
cvtsi2ssq 0x48(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
callq 0x20b0
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
subss 0x38(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5f0da(%rip), %xmm0    # 0x685e0
leaq 0x4b8f5(%rip), %rdi     # 0x54e02
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Get_modes_Cart
void Get_modes_Cart(struct Normal_Mode NM, int N_modes,
		    double **Hessian, struct Jacobian J,
		    struct axe *axe1, int naxe1, struct Reference Ref_kin)
{
  float t0=clock();
  d_Diagonalize(N_modes, Hessian, NM.omega2, NM.Cart, -1);
  printf("Hessian diagonalization. Time= %.2lf sec.\n", (clock()-t0)/nbtops);
  t0=clock();
    
  //  Convert normal modes
  struct Tors D_NM;
  D_NM.N_axes=naxe1;
  D_NM.N_Cart=NM.N_Cart;
  D_NM.coeff=malloc(1*sizeof(float));
  for(int ia=0; ia<NM.N; ia++){
    // Normalize_vector_weighted(NM.Cart[ia], Ref_kin.mass_coord, N_modes);
    D_NM.Cart=NM.Cart[ia];
    D_NM.Tors=NM.Tors[ia];
    D_NM.MW_Tors=NM.MW_Tors[ia];
    Convert_cart2torsion(&D_NM, Ref_kin, &J);
    NM.Tors_frac[ia]=Tors_fraction(&D_NM, Ref_kin.mass_coord);
  }
  printf("Torsional and Cartesian modes. Time= %.2lf sec.\n",
	 (clock()-t0)/nbtops);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebp
movq %rsi, %r14
movl %edi, %r15d
callq 0x20b0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0x30(%rsp)
movq 0xe0(%rsp), %rdx
movq 0xf8(%rsp), %rcx
movl %r15d, %edi
movq %r14, %rsi
movq %rcx, 0x38(%rsp)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x4a559
callq 0x20b0
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
subss 0x30(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5f050(%rip), %xmm0    # 0x685e0
leaq 0x4b840(%rip), %rdi     # 0x54dd7
movb $0x1, %al
callq 0x20f0
callq 0x20b0
movq %rax, 0x40(%rsp)
movl %ebp, 0x48(%rsp)
movl 0xcc(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl $0x4, %edi
callq 0x21e0
movq %rax, 0x68(%rsp)
movslq 0xc0(%rsp), %r14
testq %r14, %r14
jle 0x966b
leaq 0x1d8(%rsp), %rbp
leaq 0xc0(%rsp), %rax
movq 0x40(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq 0x48(%rax), %r15
movq 0x60(%rax), %rbx
xorl %r13d, %r13d
leaq 0x48(%rsp), %r12
movq 0x38(%rsp), %rax
movq (%rax,%r13,8), %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rax
movq (%rax,%r13,8), %rax
movq %rax, 0x60(%rsp)
movq (%r15,%r13,8), %rax
movq %rax, 0x58(%rsp)
movupd (%rbp), %xmm0
movups 0x10(%rbp), %xmm1
movups 0x20(%rbp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r12, %rdi
leaq 0x190(%rsp), %rsi
callq 0x2620b
movq 0x18(%rbp), %rsi
movq %r12, %rdi
callq 0x26615
movss %xmm0, (%rbx,%r13,4)
incq %r13
cmpq %r13, %r14
jne 0x9600
xorps %xmm0, %xmm0
cvtsi2ssq 0x40(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
callq 0x20b0
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
subss 0x38(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5ef46(%rip), %xmm0    # 0x685e0
leaq 0x4b761(%rip), %rdi     # 0x54e02
movb $0x1, %al
callq 0x20f0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Rescale_para
void Rescale_para(float kappa)
{
  printf("Rescaling force constant by factor %.4g\n", kappa);
  KAPPA*=kappa;
  K_PSI*=kappa; K_PHI*=kappa; K_OMEGA*=kappa; K_CHI*=kappa;
  K_BA*=kappa; K_BL*=kappa;
  K0=KAPPA*pow(C0,EXP_HESSIAN);
}

// Assembly:
subq $0x18, %rsp
movss %xmm0, 0x14(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x485e2(%rip), %rdi     # 0x51f66
movb $0x1, %al
callq 0x20f0
movss 0x14(%rsp), %xmm0
mulss 0x5f6df(%rip), %xmm0    # 0x69078
movss %xmm0, 0x5f6d7(%rip)    # 0x69078
movaps %xmm0, %xmm1
movsd 0x5f6ec(%rip), %xmm0    # 0x69098
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5f6da(%rip)    # 0x69098
movsd 0x5f6da(%rip), %xmm0    # 0x690a0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5f6ce(%rip)    # 0x690a0
movsd 0x5f6b6(%rip), %xmm0    # 0x69090
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5f6aa(%rip)    # 0x69090
movsd 0x5f6ba(%rip), %xmm0    # 0x690a8
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5f6ae(%rip)    # 0x690a8
movsd 0x5f6ae(%rip), %xmm0    # 0x690b0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5f6a2(%rip)    # 0x690b0
mulsd 0x5f6a2(%rip), %xmm2    # 0x690b8
movsd %xmm2, 0x5f69a(%rip)    # 0x690b8
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x5f63e(%rip), %xmm0    # 0x69074
xorps %xmm1, %xmm1
cvtss2sd 0x5f62b(%rip), %xmm1    # 0x6906c
callq 0x20a0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x5f62c(%rip)    # 0x69080
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Rescale_Hessian
double Rescale_Hessian(struct Normal_Mode NM,
		       struct interaction *Int_list, int N_int, 
		       float kappa, int anharmonic)
{

  // rescale interactions
  for(int i=0; i<N_int; i++)Int_list[i].sec_der*=kappa;

  double sum_sigma2=0; int i;
  printf("Rescaling omega2 by factor %.3g\n", kappa);

  // rescale modes
  for(i=0; i<NM.N; i++){
    if(anharmonic==0){
      NM.omega2[i]*=kappa;
      NM.sigma2[i]/=kappa;
      if(NM.select[i]==0){NM.omega[i]=0;}
      else{NM.omega[i]=sqrt(NM.omega2[i]);}
      sum_sigma2+=NM.sigma2[i];
    }else{
      NM.sigma2_anhar[i]/=kappa;
      sum_sigma2+=NM.sigma2_anhar[i];
    }
  }
  return(sum_sigma2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
leaq 0x50(%rsp), %r12
movss %xmm0, (%rsp)
cvtss2sd %xmm0, %xmm0
testl %esi, %esi
jle 0x9aa2
movl %esi, %eax
imulq $0xc8, %rax, %rax
xorl %ecx, %ecx
movsd 0x28(%rdi,%rcx), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rdi,%rcx)
addq $0xc8, %rcx
cmpq %rcx, %rax
jne 0x9a86
leaq 0x484e6(%rip), %rdi     # 0x51f8f
movb $0x1, %al
callq 0x20f0
movslq (%r12), %r14
testq %r14, %r14
jle 0x9b97
movq 0x88(%r12), %r15
movq 0x18(%r12), %rax
movq 0x20(%r12), %r13
movq 0x28(%r12), %rbp
movq 0xc0(%r12), %rcx
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
xorps %xmm3, %xmm3
movss (%rsp), %xmm1
movl %ebx, 0x4(%rsp)
movq %rax, 0x8(%rsp)
testl %ebx, %ebx
je 0x9b0a
movss (%r15,%r12,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%r15,%r12,4)
jmp 0x9b81
movss (%r13,%r12,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%r13,%r12,4)
movss (%rbp,%r12,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rbp,%r12,4)
cmpl $0x0, (%rcx,%r12,4)
je 0x9b47
movss (%r13,%r12,4), %xmm0
ucomiss %xmm3, %xmm0
jb 0x9b4c
sqrtss %xmm0, %xmm0
jmp 0x9b74
xorps %xmm0, %xmm0
jmp 0x9b74
movsd %xmm2, 0x10(%rsp)
movq %rcx, %rbx
callq 0x21d0
xorps %xmm3, %xmm3
movq %rbx, %rcx
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ebx
movsd 0x10(%rsp), %xmm2
movss (%rsp), %xmm1
movss %xmm0, (%rax,%r12,4)
movss (%rbp,%r12,4), %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm0, %xmm2
incq %r12
cmpq %r12, %r14
jne 0x9af4
jmp 0x9b9b
xorpd %xmm2, %xmm2
movapd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/main_tnm.c
// Function: Write_ref_coord_d
void Write_ref_coord_d(double *coords, int N_ref, atom *atoms, int *atom_num)
{
  double *coord=coords;
  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 0xc779
movl %esi, %eax
xorl %esi, %esi
movslq (%rcx,%rsi,4), %r8
imulq $0x70, %r8, %r9
addq %rdx, %r9
xorl %r8d, %r8d
movsd (%r9,%r8), %xmm0
movsd %xmm0, (%rdi,%r8)
addq $0x8, %r8
cmpl $0x18, %r8d
jne 0xc758
incq %rsi
addq %r8, %rdi
cmpq %rax, %rsi
jne 0xc74a
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: GetPdbId
void GetPdbId(char *pdb_file_in, char *pdbid){
     /* This subroutine pretends to get the
        PDB id from a pdb file name, and ressembles
	quite a lot my "old-and-dirty-Perl" days */

  int start=0, end=0, i,j; //end2=0

  for(i=strlen(pdb_file_in)-1;i>=0;i--){
    if (pdb_file_in[i]=='.'){
      end=i-1;
    }else if (pdb_file_in[i]=='/'){
      start=i+1; //end2=i-1;
      break;
    }
  }
  j=0;
  for (i=start;i<=end;i++){
    pdbid[j]=pdb_file_in[i];
    j++;
  }
  pdbid[j]='\0';
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x20d0
movl %eax, %ecx
decl %ecx
js 0xdce2
xorl %ecx, %ecx
leal -0x1(%rax), %edx
movzbl (%r14,%rdx), %esi
cmpl $0x2e, %esi
je 0xdccd
cmpl $0x2f, %esi
jne 0xdcd2
jmp 0xdcda
addl $-0x2, %eax
movl %eax, %ecx
movl %edx, %eax
testl %edx, %edx
jg 0xdcb9
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xdce6
xorl %ecx, %ecx
jmp 0xdd00
xorl %eax, %eax
xorl %ecx, %ecx
movl %eax, %edx
subl %eax, %ecx
incl %ecx
addq %rdx, %r14
xorl %eax, %eax
movb (%r14,%rax), %dl
movb %dl, (%rbx,%rax)
incq %rax
cmpq %rax, %rcx
jne 0xdcf1
movb $0x0, (%rbx,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Order_atoms
int Order_atoms(atom *atoms, int natoms, struct residue *seq, int Nres)
{
  int ires;
  for(ires=0; ires<Nres; ires++){
    struct residue *res=seq+ires;
    if((res->type==1)||(res->type==-1)){
      // Store side chain before CO
      Order_atoms_aa(res->atom_ptr, res->n_atom);
    }
  }
  return(1);
}

// Assembly:
testl %ecx, %ecx
jle 0xe11a
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %ecx, %r14d
shlq $0x5, %r14
xorl %r15d, %r15d
movzwl 0x18(%rbx,%r15), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0xe0fe
cmpl $0x1, %eax
jne 0xe10c
movq (%rbx,%r15), %rdi
movl 0x8(%rbx,%r15), %esi
callq 0xf94a
addq $0x20, %r15
cmpq %r15, %r14
jne 0xe0ec
popq %rbx
popq %r14
popq %r15
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Find_PDB_order
void Find_PDB_order(atom *atoms, int N_atoms)
{
  int i, i_next, res=atoms[0].res, ares=0, i2=0, i_min;
  int i_max=N_atoms+1000;
  atom *atom1=atoms, *atom2;
  for(i=0; i<N_atoms; i++){
    atom1=atoms+i;
    if(atom1->res > res){ares=i; res=atom1->res;}
    i_min=i_max; i_next=atom1->i_num+1;
    atom2=atoms+ares; i2=ares;
    while((i2<N_atoms)&&(atom2->res==res)){
      if((atom2->i_num>=i_next)&&(atom2->i_num<i_min)){
	i_min=i2; if(i_min==i_next)break;
      }
      atom2++; i2++;
    }
    if(i_min < i_max){atom1->i_next=i_min;}
    else if(i2<N_atoms){atom1->i_next=i2;}
    else{atom1->i_next=-1;}
  }
}

// Assembly:
testl %esi, %esi
jle 0xe1e2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leal 0x3e8(%rsi), %eax
leaq 0x64(%rdi), %rcx
movq %rcx, -0x8(%rsp)
movl 0x64(%rdi), %edx
movl %esi, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
movl %r10d, %ecx
imulq $0x70, %r9, %r11
movl 0x64(%rdi,%r11), %r10d
cmpl %edx, %r10d
cmovgl %r10d, %edx
movl %r9d, %r10d
cmovlel %ecx, %r10d
cmpl %esi, %r10d
jge 0xe1b3
movl 0x50(%rdi,%r11), %r15d
leal 0x1(%r15), %r14d
movslq %r10d, %rcx
imulq $0x70, %rcx, %r12
addq -0x8(%rsp), %r12
leal 0x1(%r15), %r13d
movl %eax, %ebx
movl %r10d, %ebp
cmpl %edx, (%r12)
jne 0xe1c0
movl -0x14(%r12), %ecx
cmpl %r15d, %ecx
jle 0xe1a5
cmpl %ebx, %ecx
jge 0xe1a5
movl %ebp, %ebx
cmpl %ebp, %r13d
je 0xe1ba
incl %ebp
addq $0x70, %r12
cmpl %ebp, %esi
jne 0xe18a
cmpl %eax, %ebx
jl 0xe1c5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xe1c5
movl %r14d, %ebp
movl %r14d, %ebx
cmpl %eax, %ebx
cmovgel %ebp, %ebx
addq %rdi, %r11
movl %ebx, 0x4c(%r11)
incq %r9
cmpq %r8, %r9
jne 0xe14d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Open_compressed_file
FILE *Open_compressed_file(char *name, int *Compression)
{
  FILE *file_in;
  printf("Reading %s ", name);
  *Compression=Get_compression(name);
  char command[200];
  if(*Compression){
    sprintf(command, "%s %s > %s\n", PDBCAT, name, PDBTMP);
    system(command);
    file_in=fopen(PDBTMP, "r");
  }else{
    file_in=fopen(name, "r");
  }
  if(file_in==NULL){
    printf("\nERROR, %s not found\n", name); return(NULL);
  }
  return(file_in);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x47c9e(%rip), %rdi     # 0x55e9a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
leaq 0x2(%rbx), %rax
movzbl -0x2(%rax), %ecx
cmpl $0x2e, %ecx
je 0xe219
testl %ecx, %ecx
jne 0xe224
jmp 0xe229
cmpb $0x67, -0x1(%rax)
jne 0xe224
cmpb $0x7a, (%rax)
je 0xe23c
incq %rax
jmp 0xe20a
movl $0x0, (%r14)
leaq 0x4bc47(%rip), %rsi     # 0x59e7e
movq %rbx, %rdi
jmp 0xe27d
movl $0x1, (%r14)
leaq 0x47bbd(%rip), %rsi     # 0x55e07
leaq 0x47bc2(%rip), %rdx     # 0x55e13
leaq 0x47bc0(%rip), %r14     # 0x55e18
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2270
movq %r15, %rdi
callq 0x20e0
leaq 0x4bc04(%rip), %rsi     # 0x59e7e
movq %r14, %rdi
callq 0x2220
movq %rax, %r14
testq %rax, %rax
jne 0xe29b
leaq 0x47b8f(%rip), %rdi     # 0x55e20
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
movq %r14, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Get_amm
int Get_amm(char *amm, int *exo, char *res_type_old, int hetatm, int n_exo)
{
  /* Check amino acid type */
  Code_3_2(amm, res_type_old);
  int type=0, exo_check=0;

 find_type:
  if(amm[0] == ' '){
    // Standard amino acid residue
    if(hetatm==0 || exo_check){type=1;}
    else{type=-1;} // Standard res. and HETATM => ligand
  }else if(amm[0]=='D'){
    // deoxyribo-nucleotide
    if(hetatm==0 || exo_check){type=2;}
    else{type=-2;} // Standard nuc and HETATM => ligand
  }else if(amm[0]=='R'){
    // ribo-nucleotide
    if(hetatm==0 || exo_check){type=3;}
    else{type=-3;} // Standard nuc and HETATM => ligand
  }else if(exo_check==0){
    exo_check=1;
    // Non-standard residue
    for(int i=0; i<20; i++){
      for(int j=0; j<n_modres[i]; j++){
	if(strncmp(res_type_old, modres[i]+4*j, 3)==0){
	  Code_3_2(amm, stdres[i]); *exo=1; goto find_type;
	}
      }
    }
    if(n_exo){
      for(int i=n_exo-1; i>=0; i--){
	if(strncmp(res_type_old,res_exo[i],3)==0){
	  Code_3_2(amm, res_std[i]); *exo=1; goto find_type;
	}
      }
    }
  }
  //if(type<0)type=-type;
  return(type);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebx
movl %ecx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, 0x30(%rsp)
movq %rdi, %r14
movq %rdx, %rsi
callq 0xf0a6
movl %ebx, %eax
movq %rbx, 0x20(%rsp)
leal 0x1(%rbx), %ecx
movl %ecx, 0xc(%rsp)
leaq (%rax,%rax,4), %rax
leaq 0x5b80f(%rip), %rcx     # 0x6a750
addq %rax, %rcx
movq %rcx, 0x18(%rsp)
leaq 0x5b030(%rip), %rcx     # 0x69f80
addq %rcx, %rax
addq $-0x5, %rax
movq %rax, 0x10(%rsp)
movb $0x1, %cl
xorl %eax, %eax
movq %r14, 0x28(%rsp)
xorl %ebp, %ebp
movzbl (%r14), %edx
cmpl $0x52, %edx
je 0xf04c
cmpl $0x44, %edx
je 0xf07b
cmpl $0x20, %edx
je 0xf065
testb $0x1, %cl
je 0xf095
leaq 0x5bfda(%rip), %r14     # 0x6af70
xorl %r12d, %r12d
leaq 0x5bf80(%rip), %rax     # 0x6af20
movslq (%rax,%r12,4), %r13
movq %r14, %rbx
testq %r13, %r13
jle 0xefc9
movl $0x3, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2070
testl %eax, %eax
je 0xf01a
addq $0x4, %rbx
decq %r13
jne 0xefac
incq %r12
addq $0x64, %r14
cmpq $0x14, %r12
jne 0xef99
cmpl $0x0, 0x20(%rsp)
je 0xf095
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rbx
movl 0xc(%rsp), %r14d
decl %r14d
testl %r14d, %r14d
jle 0xf095
addq $-0x5, %rbx
leaq -0x5(%rsi), %r12
movl $0x3, %edx
movq %r15, %rdi
callq 0x2070
movq %r12, %rsi
testl %eax, %eax
jne 0xeff0
jmp 0xf028
leaq (%r12,%r12,4), %rbx
leaq 0x5c71b(%rip), %rax     # 0x6b740
addq %rax, %rbx
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf0a6
movq 0x30(%rsp), %rax
movl $0x1, (%rax)
movb $0x1, %al
xorl %ecx, %ecx
jmp 0xef67
testb $0x1, %al
movl $0x3, %eax
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
cmovnel %eax, %ebp
cmpl $0x0, 0x8(%rsp)
cmovel %eax, %ebp
jmp 0xf095
cmpl $0x0, 0x8(%rsp)
setne %cl
notb %al
andb %cl, %al
movzbl %al, %ebp
negl %ebp
orl $0x1, %ebp
jmp 0xf095
movzbl %al, %eax
andl $0x1, %eax
cmpl $0x0, 0x8(%rsp)
leal -0x2(,%rax,4), %eax
movl $0x2, %ebp
cmovnel %eax, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Check_chain
int Check_chain(int *ichain, int *sel, int *na, int ini_r, int nres)
{
  int del;
  if(*na < MIN_ATOM){
    int j; for(j=ini_r; j< nres; j++)sel[j]=0;
    del=1;
  }else{
    (*ichain)++; del=0;
  }
  *na=0;
  return(del);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl (%rdx), %eax
cmpl 0x58d19(%rip), %eax     # 0x68614
jge 0xf924
movl $0x1, %ebp
cmpl %r8d, %ecx
jge 0xf928
movslq %ecx, %rax
leaq (%rsi,%rax,4), %rdi
notl %ecx
addl %r8d, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %esi, %esi
callq 0x2110
jmp 0xf928
incl (%rdi)
xorl %ebp, %ebp
movl $0x0, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Store_branch
int Store_branch(atom **atom2, char BRANCH,
		 atom *res_atom, int n_atom)
{
  atom *atom1=res_atom; int i, n=0;
  for(i=0; i<n_atom; i++){
    if(atom1->name[1]==BRANCH){
      n+=Copy_atom(atom2, res_atom, i);
    }
    atom1++;
  }
  return(n);
}

// Assembly:
testl %ecx, %ecx
jle 0xff00
movl %esi, %r9d
movq %rdi, %r8
movl %ecx, %eax
imulq $0x70, %rax, %r10
xorl %r11d, %r11d
xorl %eax, %eax
cmpb %r9b, 0x19(%rdx,%r11)
jne 0xfef6
movq (%r8), %rdi
leaq (%rdx,%r11), %rsi
movl $0xe, %ecx
rep  movsq (%rsi), %es:(%rdi)
addq $0x70, (%r8)
incl %eax
addq $0x70, %r11
cmpq %r11, %r10
jne 0xfeda
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/atoms.c
// Function: Atom_type
int Atom_type(char *name){
  if(init==0){
    num_BB=8;
    strcpy(BB_name[0],"N ");
    strcpy(BB_name[1],"CA");
    strcpy(BB_name[2],"C ");
    strcpy(BB_name[3],"CB");
    strcpy(BB_name[4],"O ");
    strcpy(BB_name[5],"CG");
    strcpy(BB_name[6],"OG");
    strcpy(BB_name[7],"SG");

    BB_length[0]=1.3301; BB_angle[0]=1.1091; // C-N,  CA-C-N
    BB_length[1]=1.4572; BB_angle[1]=1.0196; // N-CA, C-N-CA
    BB_length[2]=1.5236; BB_angle[2]=1.2018; // CA-C, N-CA-C
    BB_length[3]=1.5319; BB_angle[3]=1.2162; // CA-CB,N-CA-CB
    BB_length[4]=1.2316; BB_angle[4]=1.0359; // C-O,  CA-C-O


    init=1;
  }
  for(int i=0; i<num_BB; i++){
    if((name[0]==BB_name[i][0])&&(name[1]==BB_name[i][1]))
      return(i);
  }
  return(-1);
}

// Assembly:
cmpl $0x0, 0x69365(%rip)     # 0x79270
je 0xff23
leaq 0x586d4(%rip), %rax     # 0x685e8
movl (%rax), %eax
testl %eax, %eax
jg 0xffbf
jmp 0xffe9
leaq 0x586be(%rip), %rax     # 0x685e8
movl $0x8, (%rax)
leaq 0x59ef9(%rip), %rax     # 0x69e30
xorl %ecx, %ecx
movb %cl, 0x2(%rax)
movw $0x204e, (%rax)         # imm = 0x204E
movb %cl, 0x5(%rax)
movw $0x4143, 0x3(%rax)      # imm = 0x4143
movb %cl, 0x8(%rax)
movw $0x2043, 0x6(%rax)      # imm = 0x2043
movb %cl, 0xb(%rax)
movw $0x4243, 0x9(%rax)      # imm = 0x4243
movb %cl, 0xe(%rax)
movw $0x204f, 0xc(%rax)      # imm = 0x204F
movb %cl, 0x11(%rax)
movw $0x4743, 0xf(%rax)      # imm = 0x4743
movb %cl, 0x14(%rax)
movw $0x474f, 0x12(%rax)     # imm = 0x474F
movb %cl, 0x17(%rax)
movw $0x4753, 0x15(%rax)     # imm = 0x4753
movaps 0x46089(%rip), %xmm0    # 0x56010
leaq 0x59ec2(%rip), %rax     # 0x69e50
movaps %xmm0, (%rax)
movaps 0x46088(%rip), %xmm0    # 0x56020
leaq 0x59ed1(%rip), %rcx     # 0x69e70
movaps %xmm0, (%rcx)
movl $0x3f9da512, 0x10(%rax) # imm = 0x3F9DA512
movl $0x3f84985f, 0x10(%rcx) # imm = 0x3F84985F
movl $0x1, 0x692b6(%rip)     # 0x79270
movl $0x8, %eax
movb (%rdi), %cl
leaq 0x59e68(%rip), %rdx     # 0x69e30
incq %rdx
movl %eax, %esi
xorl %eax, %eax
cmpb -0x1(%rdx), %cl
jne 0xffdd
movb 0x1(%rdi), %r8b
cmpb (%rdx), %r8b
je 0xffee
incq %rax
addq $0x3, %rdx
cmpq %rax, %rsi
jne 0xffcf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/seqres.c
// Function: Align_seqres
void Align_seqres(int *ali_seqres, char *seqres, int N_seqres,
		  char *seq, int nres)
{
  // ali_seqres[iseqres]=resstruct
  int IDMIN=7;
  int i=0, k=0; char *s1=seqres, *s2=seq;
  for(i=0; i<N_seqres; i++){
    if((*s1==*s2)&&(k<nres)){
      int ali=1;
      if((i==0)||(ali_seqres[i-1]<0)){
	// gap, look forward
	for(int i1=i; i1<N_seqres; i1++){
	  char *t1=seqres+i1, *t2=s2; int id=0;
	  while(*t2==*t1){
	    id++; if(id==IDMIN)break; t1++; t2++;
	  }
	  if(id==IDMIN){if(i1!=i)ali=0; break;}
	}
      }
      if(ali){ali_seqres[i]=k; k++; s2++;} // Align here
      else{ali_seqres[i]=-1;} // Align forward, not here
    }else{
      ali_seqres[i]=-1;
    }
    s1++;
  }
  if(0){
    printf("%d aligned residues over %d disordered: %d\n",
	   k, N_seqres, N_seqres-k);
    printf("SEQRES:  ");
    for(i=0; i<N_seqres; i++)printf("%c", seqres[i]);
    printf("\n");
    printf("ATOMRES: ");
    for(i=0; i<N_seqres; i++){
      if(ali_seqres[i]<0){printf("-");}
      else{printf("%c", seq[ali_seqres[i]]);}
    }
    printf("\n");
    exit(8);
  }
}

// Assembly:
testl %edx, %edx
jle 0x10367
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %eax
xorl %edx, %edx
movq %rsi, %r9
xorl %r10d, %r10d
movb (%r9), %r11b
cmpb (%rcx), %r11b
sete %bl
cmpl %r8d, %r10d
setl %bpl
andb %bl, %bpl
cmpb $0x1, %bpl
jne 0x10349
testq %rdx, %rdx
je 0x102ff
cmpl $0x0, -0x4(%rdi,%rdx,4)
jns 0x1033d
movq %r9, %r14
movq %rdx, %rbx
cmpb (%rsi,%rbx), %r11b
jne 0x10328
movl $0x1, %r15d
cmpl $0x7, %r15d
je 0x10335
movb (%rcx,%r15), %bpl
leaq 0x1(%r15), %r12
cmpb (%r14,%r15), %bpl
movq %r12, %r15
je 0x10311
incq %rbx
incq %r14
cmpq %rax, %rbx
jne 0x10305
jmp 0x1033d
movl %ebx, %r11d
cmpq %rdx, %r11
jne 0x10349
movl %r10d, (%rdi,%rdx,4)
incl %r10d
incq %rcx
jmp 0x10350
movl $0xffffffff, (%rdi,%rdx,4) # imm = 0xFFFFFFFF
incq %r9
incq %rdx
cmpq %rax, %rdx
jne 0x102da
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Matrix_multiplication
void Matrix_multiplication(double *w, double **M, double *v, int n)
{
  int i, j;
  for(i=0; i<n; i++){
    double sum=0, *mi=M[i], *v0=v;
    for(j=0; j<n; j++){sum+=(*mi)*(*v0); mi++; v0++;}
    w[i]=sum;
  }
}

// Assembly:
testl %ecx, %ecx
jle 0x1063e
movl %ecx, %eax
xorl %ecx, %ecx
movq (%rsi,%rcx,8), %r8
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
movsd (%r8,%r9,8), %xmm1
mulsd (%rdx,%r9,8), %xmm1
addsd %xmm1, %xmm0
incq %r9
cmpl %r9d, %eax
jne 0x10619
movsd %xmm0, (%rdi,%rcx,8)
incq %rcx
cmpq %rax, %rcx
jne 0x1060e
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Transform_matrix
void Transform_matrix(float A[3][3], float **R){
  // Similarity transformation A'=RAR^T
  float tmp[3][3]; int i, j, k;
  for(i=0; i<3; i++){
    float *Ai=A[i];
    for(j=0; j<3; j++){
      float t=0, *Rj=R[j];
      for(k=0; k<3; k++)t+=Ai[k]*Rj[k];
      tmp[i][j]=t; 
    }
  }
  for(i=0; i<3; i++){
    float *Ri=R[i];
    for(j=0; j<3; j++){
      float t=0;
      for(k=0; k<3; k++)t+=Ri[k]*tmp[k][j];
      A[i][j]=t; 
    }
  }
}

// Assembly:
pushq %rbx
xorl %eax, %eax
movq %rdi, %rcx
leaq (%rax,%rax,2), %rdx
leaq (%rsp,%rdx,4), %rdx
addq $-0x30, %rdx
xorl %r8d, %r8d
movq (%rsi,%r8,8), %r9
xorps %xmm0, %xmm0
xorl %r10d, %r10d
movss (%rcx,%r10,4), %xmm1
mulss (%r9,%r10,4), %xmm1
addss %xmm1, %xmm0
incq %r10
cmpq $0x3, %r10
jne 0x1065e
movss %xmm0, (%rdx,%r8,4)
incq %r8
cmpq $0x3, %r8
jne 0x10654
incq %rax
addq $0xc, %rcx
cmpq $0x3, %rax
jne 0x10645
xorl %eax, %eax
leaq -0x30(%rsp), %rcx
movq (%rsi,%rax,8), %rdx
leaq (%rax,%rax,2), %r8
leaq (%rdi,%r8,4), %r8
movq %rcx, %r9
xorl %r10d, %r10d
xorps %xmm0, %xmm0
movq %r9, %r11
xorl %ebx, %ebx
movss (%rdx,%rbx,4), %xmm1
mulss (%r11), %xmm1
addss %xmm1, %xmm0
incq %rbx
addq $0xc, %r11
cmpq $0x3, %rbx
jne 0x106b4
movss %xmm0, (%r8,%r10,4)
incq %r10
addq $0x4, %r9
cmpq $0x3, %r10
jne 0x106ac
incq %rax
cmpq $0x3, %rax
jne 0x1069a
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Transform_matrix_d
void Transform_matrix_d(double **A, double **R){
  // Similarity transformation A'=RAR^T
  double tmp[3][3]; int i, j, k;
  for(i=0; i<3; i++){
    double *Ai=A[i];
    for(j=0; j<3; j++){
      double t=0, *Rj=R[j];
      for(k=0; k<3; k++)t+=Ai[k]*Rj[k];
      tmp[i][j]=t; 
    }
  }
  for(i=0; i<3; i++){
    double *Ri=R[i];
    for(j=0; j<3; j++){
      double t=0;
      for(k=0; k<3; k++)t+=Ri[k]*tmp[k][j];
      A[i][j]=t; 
    }
  }
}

// Assembly:
pushq %rbx
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
leaq (%rax,%rax,2), %rdx
leaq (%rsp,%rdx,8), %rdx
addq $-0x50, %rdx
xorl %r8d, %r8d
movq (%rsi,%r8,8), %r9
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
movsd (%rcx,%r10,8), %xmm1
mulsd (%r9,%r10,8), %xmm1
addsd %xmm1, %xmm0
incq %r10
cmpq $0x3, %r10
jne 0x1070e
movsd %xmm0, (%rdx,%r8,8)
incq %r8
cmpq $0x3, %r8
jne 0x10703
incq %rax
cmpq $0x3, %rax
jne 0x106f0
xorl %eax, %eax
leaq -0x50(%rsp), %rcx
movq (%rsi,%rax,8), %rdx
movq (%rdi,%rax,8), %r8
movq %rcx, %r9
xorl %r10d, %r10d
xorpd %xmm0, %xmm0
movq %r9, %r11
xorl %ebx, %ebx
movsd (%rdx,%rbx,8), %xmm1
mulsd (%r11), %xmm1
addsd %xmm1, %xmm0
incq %rbx
addq $0x18, %r11
cmpq $0x3, %rbx
jne 0x1075d
movsd %xmm0, (%r8,%r10,8)
incq %r10
addq $0x8, %r9
cmpq $0x3, %r10
jne 0x10754
incq %rax
cmpq $0x3, %rax
jne 0x10746
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Corr_coeff
float Corr_coeff(float *xx, float *yy, int N,
		 float *slope, float *offset)
{
  double xy=0, x1=0, y1=0, x2=0, y2=0;
  float *x=xx, *y=yy; int i;

  for(i=0; i<N; i++){
    xy += (*x)*(*y);
    x1+=(*x); x2+= (*x)*(*x);
    y1+=(*y); y2+= (*y)*(*y);
    x++; y++;
  }
  x2=N*x2-x1*x1; y2=N*y2-y1*y1; xy=N*xy-x1*y1;
  if((x2==0.0)||(y2==0.0))return(0.0);
  if(slope)*slope=xy/x2;
  if(offset)*offset=(y1-(*slope)*x1)/N;
  //printf("N= %d xy=%.2g x2=%.2g y2=%.2g\n", N, xy, x2, y2);
  return(xy/sqrt(x2*y2));
}

// Assembly:
xorpd %xmm0, %xmm0
testl %edx, %edx
jle 0x1092d
movl %edx, %eax
xorpd %xmm2, %xmm2
xorpd %xmm6, %xmm6
xorl %r9d, %r9d
xorpd %xmm1, %xmm1
movss (%rdi,%r9,4), %xmm3
movss (%rsi,%r9,4), %xmm4
movaps %xmm3, %xmm5
mulss %xmm4, %xmm5
cvtss2sd %xmm5, %xmm5
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
cvtps2pd %xmm4, %xmm3
addsd %xmm5, %xmm6
mulps %xmm4, %xmm4
cvtps2pd %xmm4, %xmm4
addpd %xmm3, %xmm1
addpd %xmm4, %xmm2
incq %r9
cmpl %r9d, %eax
jne 0x108f4
jmp 0x10939
xorpd %xmm6, %xmm6
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
movapd %xmm1, %xmm5
mulpd %xmm1, %xmm5
movapd %xmm4, %xmm3
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
mulpd %xmm2, %xmm3
subpd %xmm5, %xmm3
cmpeqpd %xmm3, %xmm0
movmskpd %xmm0, %eax
xorpd %xmm0, %xmm0
testl %eax, %eax
jne 0x109fe
pushq %rax
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
movapd 0x40712(%rip), %xmm0    # 0x51090
xorpd %xmm2, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm4, %xmm6
addsd %xmm0, %xmm6
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
testq %rcx, %rcx
je 0x109ab
movapd %xmm6, %xmm5
divsd %xmm0, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm5, (%rcx)
testq %r8, %r8
je 0x109cc
xorps %xmm5, %xmm5
cvtss2sd (%rcx), %xmm5
mulsd %xmm2, %xmm5
subsd %xmm5, %xmm1
divsd %xmm4, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, (%r8)
mulsd %xmm3, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x109e0
sqrtsd %xmm0, %xmm0
jmp 0x109ef
movsd %xmm6, (%rsp)
callq 0x22a0
movsd (%rsp), %xmm6
divsd %xmm0, %xmm6
xorps %xmm0, %xmm0
cvtsd2ss %xmm6, %xmm0
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Corr_coeff_w
float Corr_coeff_w(float *xx, float *yy, int *w, int N,
		   float *slope, float *offset, int *norm)
{
  double xy=0, x1=0, y1=0, x2=0, y2=0;
  float *x=xx, *y=yy; int i;

  (*norm)=0;
  for(i=0; i<N; i++){
    if(w[i]){
      xy += (*x)*(*y); (*norm)++;
      x1+=(*x); x2+= (*x)*(*x);
      y1+=(*y); y2+= (*y)*(*y);
    }
    x++; y++;
  }
  x2=(*norm)*x2-x1*x1; y2=(*norm)*y2-y1*y1; xy=(*norm)*xy-x1*y1;
  *slope=xy/x2; *offset=(y1-(*slope)*x1)/(*norm);
  //printf("N= %d xy=%.2g x2=%.2g y2=%.2g\n", N, xy, x2, y2);
  return(xy/sqrt(x2*y2));
}

// Assembly:
subq $0x18, %rsp
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
xorpd %xmm1, %xmm1
testl %ecx, %ecx
jle 0x10a7c
movl %ecx, %ecx
xorpd %xmm4, %xmm4
xorpd %xmm2, %xmm2
xorl %r10d, %r10d
xorl %r11d, %r11d
xorpd %xmm3, %xmm3
cmpl $0x0, (%rdx,%r11,4)
je 0x10a6a
movss (%rsi,%r11,4), %xmm0
incl %r10d
movss (%rdi,%r11,4), %xmm5
movaps %xmm5, %xmm6
shufps $0x0, %xmm5, %xmm6      # xmm6 = xmm6[0,0],xmm5[0,0]
unpcklps %xmm0, %xmm5            # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1]
mulps %xmm5, %xmm6
cvtps2pd %xmm6, %xmm6
movl %r10d, (%rax)
cvtps2pd %xmm5, %xmm5
addpd %xmm6, %xmm4
addpd %xmm5, %xmm3
mulss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm0, %xmm2
incq %r11
cmpq %r11, %rcx
jne 0x10a2a
xorps %xmm5, %xmm5
cvtsi2sd %r10d, %xmm5
jmp 0x10a8c
xorpd %xmm4, %xmm4
xorpd %xmm5, %xmm5
xorpd %xmm2, %xmm2
xorpd %xmm3, %xmm3
movapd %xmm3, %xmm6
unpckhpd %xmm3, %xmm6            # xmm6 = xmm6[1],xmm3[1]
movapd %xmm6, %xmm7
mulsd %xmm6, %xmm7
mulsd %xmm5, %xmm2
movapd %xmm3, %xmm8
unpcklpd %xmm3, %xmm8            # xmm8 = xmm8[0],xmm3[0]
mulpd %xmm3, %xmm8
movapd %xmm5, %xmm0
unpcklpd %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0]
mulpd %xmm4, %xmm0
subpd %xmm8, %xmm0
movapd %xmm0, %xmm8
unpckhpd %xmm0, %xmm8            # xmm8 = xmm8[1],xmm0[1]
movapd %xmm8, %xmm4
divsd %xmm0, %xmm4
cvtsd2ss %xmm4, %xmm4
subsd %xmm7, %xmm2
movss %xmm4, (%r8)
cvtss2sd %xmm4, %xmm4
mulsd %xmm3, %xmm4
subsd %xmm4, %xmm6
divsd %xmm5, %xmm6
xorps %xmm3, %xmm3
cvtsd2ss %xmm6, %xmm3
movss %xmm3, (%r9)
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x10b0c
sqrtsd %xmm0, %xmm0
jmp 0x10b1d
movapd %xmm8, (%rsp)
callq 0x22a0
movapd (%rsp), %xmm8
divsd %xmm0, %xmm8
xorps %xmm0, %xmm0
cvtsd2ss %xmm8, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Collectivity_norm1
float Collectivity_norm1(float *v, int N){
  double sum=0, Entropy=0;
  for(int i=0; i<N; i++){
    float w=v[i]; if(w<=0)continue; sum+=w; Entropy-=w*log(w);
  }
  if(sum==0){
    printf("ERROR in collectivity_norm1, sum= %.2g\n", sum);
    return(0);
  }
  Entropy=Entropy/sum+log(sum);
  float kappa=exp(Entropy);
  return(kappa);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
testl %esi, %esi
jle 0x10bcf
movq %rdi, %rbx
movl %esi, %r14d
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
xorps %xmm3, %xmm3
xorpd %xmm2, %xmm2
movss (%rbx,%r15,4), %xmm0
ucomiss %xmm0, %xmm3
jae 0x10b97
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
addsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movsd %xmm2, 0x8(%rsp)
callq 0x2120
xorps %xmm3, %xmm3
movsd 0x8(%rsp), %xmm2
movsd 0x18(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm0
subsd %xmm0, %xmm2
incq %r15
cmpq %r15, %r14
jne 0x10b54
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x10bab
jnp 0x10bd3
divsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x2120
addsd 0x8(%rsp), %xmm0
callq 0x22b0
cvtsd2ss %xmm0, %xmm0
jmp 0x10be9
xorpd %xmm1, %xmm1
leaq 0x45526(%rip), %rdi     # 0x56100
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x20f0
xorpd %xmm0, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Collectivity_norm2
float Collectivity_norm2(float *v, int N){
  float kappa, w; double sum=0, Entropy=0; int i;
  for(i=0; i<N; i++){
    w=v[i]*v[i]; if(w>0){sum+=w; Entropy-=w*log(w);}
  }
  if(sum>0){
    Entropy=Entropy/sum;
    Entropy+=log(sum);
  }
  kappa=exp(Entropy);
  if(isnan(kappa)){
    printf("Warning in Collectivity_norm2 ");
    printf("Entropy: %.2g sum: %.2g kappa: %.2g\n", Entropy, sum, kappa);
    printf("v: ");
    for(i=0; i<30; i++)printf(" %.2g", v[i]);
    printf(" ...\n");
    //exit(8);
  }
  return(kappa);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
testl %esi, %esi
jle 0x10c96
movl %esi, %r14d
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
xorps %xmm3, %xmm3
xorpd %xmm2, %xmm2
movss (%rbx,%r15,4), %xmm0
mulss %xmm0, %xmm0
ucomiss %xmm3, %xmm0
jbe 0x10c5f
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
addsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x2120
xorps %xmm3, %xmm3
movsd 0x18(%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm0
subsd %xmm0, %xmm1
incq %r15
cmpq %r15, %r14
jne 0x10c18
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
movsd %xmm2, 0x18(%rsp)
jbe 0x10ca4
divsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm2, %xmm0
callq 0x2120
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
jmp 0x10ca4
xorpd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
xorpd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x22b0
cvtsd2ss %xmm0, %xmm0
ucomiss %xmm0, %xmm0
jp 0x10cc6
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4545b(%rip), %rdi     # 0x56128
xorl %r15d, %r15d
xorl %eax, %eax
movss %xmm0, 0x10(%rsp)
callq 0x20f0
xorps %xmm2, %xmm2
cvtss2sd 0x10(%rsp), %xmm2
leaq 0x4545a(%rip), %rdi     # 0x56147
movsd 0x8(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movb $0x3, %al
callq 0x20f0
leaq 0x45465(%rip), %rdi     # 0x5616c
xorl %eax, %eax
callq 0x20f0
leaq 0x4545b(%rip), %r14     # 0x56170
xorps %xmm0, %xmm0
cvtss2sd (%rbx,%r15,4), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x20f0
incq %r15
cmpq $0x1e, %r15
jne 0x10d15
leaq 0x4543e(%rip), %rdi     # 0x56176
callq 0x2090
movss 0x10(%rsp), %xmm0
jmp 0x10cbc
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Collectivity_norm2_outlier
float Collectivity_norm2_outlier(float *v, int N, int *outlier){
  float kappa, w; double sum=0, Entropy=0; int i;
  for(i=0; i<N; i++){
    if(outlier && (outlier[i]))continue;
    w=v[i]*v[i]; if(w>0){sum+=w; Entropy-=w*log(w);}
  }
  Entropy=Entropy/sum+log(sum);
  kappa=exp(Entropy);
  return(kappa);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %esi, %esi
jle 0x10dc9
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, %r15d
xorpd %xmm1, %xmm1
xorl %r12d, %r12d
xorps %xmm3, %xmm3
xorpd %xmm2, %xmm2
testq %rbx, %rbx
je 0x10d7a
cmpl $0x0, (%rbx,%r12,4)
jne 0x10dbf
movss (%r14,%r12,4), %xmm0
mulss %xmm0, %xmm0
ucomiss %xmm3, %xmm0
jbe 0x10dbf
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
addsd %xmm0, %xmm2
movsd %xmm2, 0x10(%rsp)
movsd %xmm1, (%rsp)
callq 0x2120
xorps %xmm3, %xmm3
movsd 0x10(%rsp), %xmm2
movsd (%rsp), %xmm1
mulsd 0x8(%rsp), %xmm0
subsd %xmm0, %xmm1
incq %r12
cmpq %r12, %r15
jne 0x10d6e
jmp 0x10dd1
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
movapd %xmm2, %xmm0
callq 0x2120
addsd (%rsp), %xmm0
callq 0x22b0
cvtsd2ss %xmm0, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Collectivity_Renyi_norm1
float Collectivity_Renyi_norm1(float *v, int N){
  double sum=0, sum2=0, SR; int i; float w;
  for(i=0; i<N; i++){
    w=v[i]; if(w<=0)continue; sum+=w; sum2+=w*w;
  }
  SR=(sum*sum)/sum2;
  return(SR);
}

// Assembly:
testl %esi, %esi
jle 0x10e31
movl %esi, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
xorps %xmm1, %xmm1
movss (%rdi,%rcx,4), %xmm2
ucomiss %xmm2, %xmm1
jae 0x10e27
movaps %xmm2, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtps2pd %xmm3, %xmm2
addpd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x10e0c
jmp 0x10e35
xorpd %xmm0, %xmm0
movapd %xmm0, %xmm1
mulpd %xmm0, %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Area_norm1
float Area_norm1(float *v, int N){
  double sum=0, sum2=0, imean; int i; float w;
  for(i=0; i<N; i++){
    w=v[i]; if(w<=0)continue; sum+=w; sum2+=i*w;
  }
  imean=sum2/sum;
  return((N-imean-1)/(N-1));
}

// Assembly:
testl %esi, %esi
jle 0x10ee5
movl %esi, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
xorps %xmm1, %xmm1
movss (%rdi,%rcx,4), %xmm2
ucomiss %xmm2, %xmm1
jae 0x10ecf
xorps %xmm3, %xmm3
cvtsi2ss %ecx, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtps2pd %xmm3, %xmm2
addpd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x10eb0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
jmp 0x10eed
movsd 0x45203(%rip), %xmm0    # 0x560f0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
subsd %xmm0, %xmm1
addsd 0x451f8(%rip), %xmm1    # 0x560f8
decl %esi
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/vector.c
// Function: Area_norm2
float Area_norm2(float *v, int N){
  double sum=0, sum2=0, imean; int i; float w;
  for(i=0; i<N; i++){
    w=v[i]*v[i]; if(w<=0)continue; sum+=w; sum2+=i*w;
  }
  imean=sum2/sum;
  return((N-imean-1)/(N-1));
}

// Assembly:
testl %esi, %esi
jle 0x10f5d
movl %esi, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
xorps %xmm1, %xmm1
movss (%rdi,%rcx,4), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jae 0x10f47
xorps %xmm3, %xmm3
cvtsi2ss %ecx, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtps2pd %xmm3, %xmm2
addpd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x10f24
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm1, %xmm0
jmp 0x10f65
movsd 0x4518b(%rip), %xmm0    # 0x560f0
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
subsd %xmm0, %xmm1
addsd 0x45180(%rip), %xmm1    # 0x560f8
decl %esi
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/allocate_tnm.c
// Function: Allocate_tors
void Allocate_tors(struct Tors *X, int N_axes, int N_Cart, int N_modes)
{
  X->N_axes=N_axes;
  X->N_Cart=N_Cart;
  X->Cart=malloc(N_Cart*sizeof(float));
  X->Tors=malloc(N_axes*sizeof(float));
  X->MW_Tors=malloc(N_axes*sizeof(float));
  X->coeff=malloc(N_modes*sizeof(float));
  X->RMSD=0; X->M=0; 
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movslq %edx, %rdi
shlq $0x2, %rdi
callq 0x21e0
movq %rax, 0x8(%rbx)
movslq %r14d, %r14
shlq $0x2, %r14
movq %r14, %rdi
callq 0x21e0
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x21e0
movq %rax, 0x10(%rbx)
movslq %ebp, %rdi
shlq $0x2, %rdi
callq 0x21e0
movq %rax, 0x20(%rbx)
xorl %eax, %eax
movl %eax, 0x30(%rbx)
movl %eax, 0x3c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/align_tnm.c
// Function: Best_match
void Best_match(int *match1, int *free2,
		struct chain *chains1, int Nchain1,
		struct chain *chains2, int Nchain2)
{
  for(int i=0; i<Nchain1; i++){
    if(match1[i]>=0)continue;
    int imin=-1, d_min=100000, n1=chains1[i].nres;
    if((i<Nchain2)&&(free2[i])){
      d_min=abs(n1-chains2[i].nres); imin=i;
    }
    for(int j=0; j<Nchain2; j++){
      if((j==i)||(free2[j]==0))continue;
      int d=abs(n1-chains2[j].nres);
      if(d<d_min){d_min=d; imin=j;}
    }
    match1[i]=imin;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, -0x10(%rsp)
testl %ecx, %ecx
jle 0x121b8
movslq %r9d, %rax
movl %ecx, %ecx
movl %eax, %r10d
movq -0x10(%rsp), %r8
addq $0x1c, %r8
movq %r8, -0x8(%rsp)
xorl %ebx, %ebx
cmpl $0x0, (%rdi,%rbx,4)
jns 0x121ac
imulq $0x70, %rbx, %r12
movl 0x1c(%rdx,%r12), %r8d
movl $0x186a0, %r14d         # imm = 0x186A0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq %rax, %rbx
jge 0x12168
cmpl $0x0, (%rsi,%rbx,4)
je 0x12168
movl %r8d, %r15d
movq -0x10(%rsp), %r11
subl 0x1c(%r11,%r12), %r15d
movl %r15d, %r14d
negl %r14d
cmovsl %r15d, %r14d
movl %ebx, %r15d
testl %r9d, %r9d
jle 0x121a8
movq -0x8(%rsp), %r12
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x1219c
cmpl $0x0, (%rsi,%r13,4)
je 0x1219c
movl %r8d, %r11d
subl (%r12), %r11d
movl %r11d, %ebp
negl %ebp
cmovsl %r11d, %ebp
cmpl %r14d, %ebp
cmovll %r13d, %r15d
cmovll %ebp, %r14d
incq %r13
addq $0x70, %r12
cmpq %r13, %r10
jne 0x12175
movl %r15d, (%rdi,%rbx,4)
incq %rbx
cmpq %rcx, %rbx
jne 0x12128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/align_tnm.c
// Function: Test_chains
void Test_chains(int *icl, int ncl,struct chain *chains, int Nchain, int n)
{
  int i, j;
  for(j=0; j<ncl; j++){
    i=icl[j];
    if(i<0 || i>=Nchain){
      printf("ERROR, wrong index of chain in PDB%d: %d not in [0,%d]\n",
	     n, i, Nchain); exit(8);
    }
  }
}

// Assembly:
testl %esi, %esi
jle 0x129a2
movl %edx, %eax
movl %esi, %esi
xorl %r8d, %r8d
movl (%rdi,%r8,4), %edx
testl %edx, %edx
js 0x129a3
cmpl %eax, %edx
jge 0x129a3
incq %r8
cmpq %r8, %rsi
jne 0x1298e
retq
pushq %rax
leaq 0x43ac4(%rip), %rdi     # 0x5646f
movl %ecx, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x20f0
movl $0x8, %edi
callq 0x2280
// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/dof_tnm.c
// Function: Count_gaps
int Count_gaps(struct bond *bonds, int natoms){
  int Ngap=0, ichain=-1, ires=-1;
  for(int i=0; i<natoms; i++){
    struct bond *bond=bonds+i;
    if(bond->atom->chain!=ichain){
      ichain=bond->atom->chain; ires=bond->atom->res;
      continue;
    }
    if(bond->atom->res!=ires){
      if((ires>=0)&&(bond->previous!=NULL)){
	if(Distance_square(bond->r, bond->previous->r) > D2_GAP)Ngap++;
      }
      ires=bond->atom->res;
    }
  }
  printf("%d gaps found in protein\n", Ngap);
  return(Ngap);
}

// Assembly:
pushq %rbx
testl %esi, %esi
jle 0x13c5e
movss 0x54c69(%rip), %xmm0    # 0x68828
movl %esi, %eax
shlq $0x6, %rax
leaq (%rax,%rax,2), %rax
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %ebx, %ebx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq (%rdi,%rcx), %r9
movl 0x64(%r9), %esi
movl 0x6c(%r9), %r9d
cmpl %edx, %r9d
jne 0x13bf3
cmpl %r8d, %esi
jne 0x13c07
movl %r8d, %esi
jmp 0x13bf6
movl %r9d, %edx
addq $0xc0, %rcx
movl %esi, %r8d
cmpq %rcx, %rax
jne 0x13bd8
jmp 0x13c60
testl %r8d, %r8d
js 0x13bf6
movq 0x28(%rdi,%rcx), %r8
testq %r8, %r8
je 0x13bf6
movsd 0x8(%rdi,%rcx), %xmm1
movsd 0x10(%rdi,%rcx), %xmm2
subsd 0x8(%r8), %xmm1
subsd 0x10(%r8), %xmm2
movsd 0x18(%rdi,%rcx), %xmm3
subsd 0x18(%r8), %xmm3
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm3, %xmm3
addsd %xmm1, %xmm3
xorps %xmm1, %xmm1
cvtsd2ss %xmm3, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x13bf6
incl %ebx
jmp 0x13bf6
xorl %ebx, %ebx
leaq 0x42c11(%rip), %rdi     # 0x56878
movl %ebx, %esi
xorl %eax, %eax
callq 0x20f0
movl %ebx, %eax
popq %rbx
retq