LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/main_tnm.c
// Function: Allocate_memory
void Allocate_memory(struct Normal_Mode *NM,
		     struct Jacobian *J,
		     double ***Hessian,
		     int N_axes, int N_ref, int N_Cart,
		     int N_modes, int N_res)
{

  // Hessian
  *Hessian=Allocate_mat2_d(N_modes, N_modes);
  printf("Hessian allocated\n");

  // Kinematics:
  Allocate_Jacobian(J, N_axes, N_Cart);
  printf("Jacobian allocated\n");

  // Normal modes
  Allocate_Normal_modes(NM, N_modes, N_axes, N_Cart);
  printf("Normal modes allocated\n");

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl 0x40(%rsp), %r13d
movl %r13d, %edi
movl %r13d, %esi
callq 0x43878
movq %rax, (%r14)
leaq 0x4714d(%rip), %rdi     # 0x4f8d8
callq 0x2090
movq %r15, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x210c7
leaq 0x47147(%rip), %rdi     # 0x4f8ea
callq 0x2090
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x21414
leaq 0x4713f(%rip), %rdi     # 0x4f8fd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2090
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rsi, %r15
movq %rdi, %r14
movslq %edx, %r13
imulq $0xc8, %r13, %rdi
callq 0x21d0
movq %rax, %r12
xorl %ebp, %ebp
testl %r13d, %r13d
cmovlel %ebp, %r13d
subl $0x1, %r13d
jb 0x885c
movslq (%r15), %rax
imulq $0x70, %rax, %rax
movl 0x6c(%rbx,%rax), %edx
movslq 0x4(%r15), %rcx
imulq $0x70, %rcx, %rcx
cmpl 0x6c(%rbx,%rcx), %edx
jne 0x8853
addq %rbx, %rax
addq %rbx, %rcx
movl 0x64(%rax), %eax
subl 0x64(%rcx), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x2, %ecx
ja 0x8853
movslq %ebp, %rbp
imulq $0xc8, %rbp, %rdi
addq %r12, %rdi
movl $0xc8, %edx
movq %r15, %rsi
callq 0x21a0
incl %ebp
addq $0xc8, %r15
jmp 0x8800
movl %ebp, (%r14)
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_O2/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
movl %r8d, %r13d
movq %rcx, %r15
xorl %ebp, %ebp
testl %r8d, %r8d
movl $0x0, %r14d
cmovgl %r8d, %r14d
movq %rsi, %r12
testl %edx, %edx
cmovlel %ebp, %edx
addq $0x34, %r15
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
cmpq %rdx, %rbp
je 0x8907
movq %r15, %rax
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x88d2
movb (%rax), %sil
cmpb (%r12,%rbp), %sil
je 0x88d5
incq %rbx
addq $0x70, %rax
jmp 0x88bb
movl %r14d, %ebx
cmpl %r13d, %ebx
jne 0x88ff
movsbl (%r12,%rbp), %esi
movl $0x0, 0x4(%rsp)
leaq 0x4649d(%rip), %rdi     # 0x4ed8b
xorl %eax, %eax
callq 0x20f0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl %ebx, (%rdi,%rbp,4)
incq %rbp
jmp 0x88b1
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_O2/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, 0x40(%rsp)
movl %ecx, %ebp
movq %rdx, 0x60(%rsp)
movq %rsi, %rbx
movl %edi, %r14d
callq 0x20b0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0x38(%rsp)
movq 0xc0(%rsp), %rdx
movq 0xe8(%rsp), %rcx
pushq $-0x1
popq %r8
movl %r14d, 0x4c(%rsp)
movl %r14d, %edi
movq %rbx, %rsi
movq %rcx, 0x58(%rsp)
callq 0x444de
callq 0x20b0
cvtsi2ss %rax, %xmm0
subss 0x38(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5a698(%rip), %xmm0    # 0x635e0
leaq 0x45de0(%rip), %rdi     # 0x4ed2f
movb $0x1, %al
callq 0x20f0
callq 0x20b0
movq %rax, 0x50(%rsp)
movl 0xa0(%rsp), %r12d
movq 0xe0(%rsp), %r15
movq 0x1a8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x1b0(%rsp), %rbx
movq 0xd8(%rsp), %r13
xorl %r14d, %r14d
testl %r12d, %r12d
cmovlel %r14d, %r12d
cmpq %r14, %r12
je 0x9004
movq (%r15,%r14,8), %rdi
movq 0x58(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdx
movq 0x38(%rsp), %rcx
movl 0x4c(%rsp), %r8d
movl %ebp, %r9d
callq 0x21bcc
movq (%r13,%r14,8), %rdi
movq (%r15,%r14,8), %rdx
leaq 0x1b8(%rsp), %rax
movupd (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq 0x40(%rsp), %rsi
movq 0x60(%rsp), %rcx
movl %ebp, %r8d
movl %r14d, %r9d
callq 0x235a3
incq %r14
jmp 0x8f97
cvtsi2ssq 0x50(%rsp), %xmm0
movss %xmm0, 0x40(%rsp)
callq 0x20b0
cvtsi2ss %rax, %xmm0
subss 0x40(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5a5b3(%rip), %xmm0    # 0x635e0
leaq 0x45d26(%rip), %rdi     # 0x4ed5a
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_O2/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, %r15
movl %edi, %r12d
leaq 0x1d8(%rsp), %r13
callq 0x20b0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0x30(%rsp)
movq 0xe0(%rsp), %rdx
movq 0xf8(%rsp), %rcx
pushq $-0x1
popq %r8
movl %r12d, %edi
movq %r15, %rsi
movq %rcx, 0x38(%rsp)
callq 0x444de
callq 0x20b0
cvtsi2ss %rax, %xmm0
subss 0x30(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5a526(%rip), %xmm0    # 0x635e0
leaq 0x45c6e(%rip), %rdi     # 0x4ed2f
movb $0x1, %al
callq 0x20f0
callq 0x20b0
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rbx
movl %ebp, (%rbx)
movl 0xcc(%rsp), %eax
movl %eax, 0x4(%rbx)
pushq $0x4
popq %rdi
callq 0x21d0
movq %rax, 0x20(%rbx)
movslq 0xc0(%rsp), %rbp
movq 0x100(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x108(%rsp), %rbx
movq 0x120(%rsp), %r14
xorl %r12d, %r12d
cmpq %rbp, %r12
jge 0x918c
movq 0x38(%rsp), %rax
movq (%rax,%r12,8), %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rax
movq (%rax,%r12,8), %rax
movq %rax, 0x60(%rsp)
movq (%rbx,%r12,8), %rax
movq %rax, 0x58(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq 0x48(%rsp), %r15
movq %r15, %rdi
leaq 0x190(%rsp), %rsi
callq 0x23b41
movq 0x18(%r13), %rsi
movq %r15, %rdi
callq 0x23f0c
movss %xmm0, (%r14,%r12,4)
incq %r12
jmp 0x9117
cvtsi2ssq 0x40(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
callq 0x20b0
cvtsi2ss %rax, %xmm0
subss 0x38(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x5a42b(%rip), %xmm0    # 0x635e0
leaq 0x45b9e(%rip), %rdi     # 0x4ed5a
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_O2/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 0x42a29(%rip), %rdi     # 0x4bebe
movb $0x1, %al
callq 0x20f0
movss 0x14(%rsp), %xmm0
mulss 0x5abce(%rip), %xmm0    # 0x64078
movss %xmm0, 0x5abc6(%rip)    # 0x64078
movaps %xmm0, %xmm1
movsd 0x5abdb(%rip), %xmm0    # 0x64098
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5abc9(%rip)    # 0x64098
movsd 0x5abc9(%rip), %xmm0    # 0x640a0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5abbd(%rip)    # 0x640a0
movsd 0x5aba5(%rip), %xmm0    # 0x64090
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5ab99(%rip)    # 0x64090
movsd 0x5aba9(%rip), %xmm0    # 0x640a8
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5ab9d(%rip)    # 0x640a8
movsd 0x5ab9d(%rip), %xmm0    # 0x640b0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x5ab91(%rip)    # 0x640b0
mulsd 0x5ab91(%rip), %xmm2    # 0x640b8
movsd %xmm2, 0x5ab89(%rip)    # 0x640b8
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
cvtss2sd 0x5ab33(%rip), %xmm0    # 0x64074
cvtss2sd 0x5ab23(%rip), %xmm1    # 0x6406c
callq 0x20a0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x5ab24(%rip)    # 0x64080
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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), %rbp
movss %xmm0, (%rsp)
cvtss2sd %xmm0, %xmm0
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
imulq $0xc8, %rsi, %rcx
cmpq %rax, %rcx
je 0x95aa
movsd 0x28(%rdi,%rax), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rdi,%rax)
addq $0xc8, %rax
jmp 0x958d
leaq 0x42936(%rip), %rdi     # 0x4bee7
movb $0x1, %al
callq 0x20f0
movl (%rbp), %r14d
movq 0x88(%rbp), %r15
movq 0x20(%rbp), %r12
movq 0x28(%rbp), %r13
movq 0xc0(%rbp), %rax
movq 0x18(%rbp), %rcx
xorl %ebp, %ebp
testl %r14d, %r14d
cmovlel %ebp, %r14d
xorpd %xmm2, %xmm2
xorps %xmm3, %xmm3
movss (%rsp), %xmm1
movl %ebx, 0x4(%rsp)
movq %rcx, 0x8(%rsp)
cmpq %rbp, %r14
je 0x9695
testl %ebx, %ebx
je 0x9613
movss (%r15,%rbp,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%r15,%rbp,4)
jmp 0x9685
movss (%r12,%rbp,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%r12,%rbp,4)
movss (%r13,%rbp,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%r13,%rbp,4)
cmpl $0x0, (%rax,%rbp,4)
je 0x964c
movss (%r12,%rbp,4), %xmm0
ucomiss %xmm3, %xmm0
jb 0x9651
sqrtss %xmm0, %xmm0
jmp 0x9679
xorps %xmm0, %xmm0
jmp 0x9679
movq %rax, %rbx
movsd %xmm2, 0x10(%rsp)
callq 0x21c0
xorps %xmm3, %xmm3
movsd 0x10(%rsp), %xmm2
movq 0x8(%rsp), %rcx
movq %rbx, %rax
movl 0x4(%rsp), %ebx
movss (%rsp), %xmm1
movss %xmm0, (%rcx,%rbp,4)
movss (%r13,%rbp,4), %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm0, %xmm2
incq %rbp
jmp 0x95f4
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_O2/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:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rsi, %rax
je 0xbf0e
movslq (%rcx,%rax,4), %r8
imulq $0x70, %r8, %r9
addq %rdx, %r9
xorl %r8d, %r8d
cmpl $0x18, %r8d
je 0xbf06
movsd (%r9,%r8), %xmm0
movsd %xmm0, (%rdi,%r8)
addq $0x8, %r8
jmp 0xbeee
incq %rax
addq %r8, %rdi
jmp 0xbedb
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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, %edx
xorl %esi, %esi
movl %esi, %ecx
leal -0x1(%rdx), %esi
decq %rdx
testl %edx, %edx
js 0xd3a2
movl %edx, %edi
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movzbl (%r14,%rdi), %edi
cmpl $0x2f, %edi
je 0xd3a2
decl %esi
decl %eax
cmpl $0x2e, %edi
jne 0xd37e
jmp 0xd379
decl %eax
pushq $-0x1
popq %rdx
cmovnsl %eax, %edx
incl %edx
cmpl %edx, %ecx
jl 0xd3be
movb (%r14,%rdx), %al
movb %al, (%rbx)
incq %rdx
incq %rbx
jmp 0xd3ac
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r14
xorl %r15d, %r15d
testl %ecx, %ecx
cmovlel %r15d, %ebx
shlq $0x5, %rbx
cmpq %r15, %rbx
je 0xd73b
movzwl 0x18(%r14,%r15), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0xd727
cmpl $0x1, %eax
jne 0xd735
movq (%r14,%r15), %rdi
movl 0x8(%r14,%r15), %esi
callq 0xef48
addq $0x20, %r15
jmp 0xd710
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x64(%rdi), %rax
movl 0x64(%rdi), %ecx
leal 0x3e8(%rsi), %edx
xorl %r8d, %r8d
testl %esi, %esi
movl $0x0, %r9d
cmovgl %esi, %r9d
xorl %r11d, %r11d
cmpq %r9, %r8
je 0xd7f9
imulq $0x70, %r8, %r10
leaq (%rdi,%r10), %rbx
movl 0x50(%rdi,%r10), %r14d
movl 0x64(%rdi,%r10), %r10d
cmpl %ecx, %r10d
cmovgl %r10d, %ecx
cmovgl %r8d, %r11d
leal 0x1(%r14), %r12d
movslq %r11d, %r10
imulq $0x70, %r10, %r13
addq %rax, %r13
movl %r11d, %ebp
movl %edx, %r15d
cmpl %esi, %ebp
jge 0xd7cf
cmpl %ecx, (%r13)
jne 0xd7e7
movl -0x14(%r13), %r10d
cmpl %r14d, %r10d
jle 0xd7c7
cmpl %r15d, %r10d
jge 0xd7c7
movl %ebp, %r15d
cmpl %ebp, %r12d
je 0xd7e1
incl %ebp
addq $0x70, %r13
jmp 0xd7a7
cmpl %edx, %r15d
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
cmovgel %r10d, %r15d
movl %r15d, %ebp
jmp 0xd7ee
movl %r12d, %ebp
movl %r12d, %r15d
cmpl %edx, %r15d
cmovll %r15d, %ebp
movl %ebp, 0x4c(%rbx)
incq %r8
jmp 0xd76d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x425cd(%rip), %rdi     # 0x4fdea
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
movq %rbx, %rdi
callq 0xe52a
movl %eax, (%r14)
testl %eax, %eax
je 0xd872
leaq 0x4251a(%rip), %rsi     # 0x4fd57
leaq 0x4251f(%rip), %rdx     # 0x4fd63
leaq 0x4251d(%rip), %r14     # 0x4fd68
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2260
movq %r15, %rdi
callq 0x20e0
leaq 0x46571(%rip), %rsi     # 0x53dde
movq %r14, %rdi
jmp 0xd87c
leaq 0x46565(%rip), %rsi     # 0x53dde
movq %rbx, %rdi
callq 0x2210
movq %rax, %r14
testq %rax, %rax
jne 0xd89a
leaq 0x424e0(%rip), %rdi     # 0x4fd70
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_O2/ugobas[P]tnm/read.c
// Function: Get_compression
int Get_compression(char *name){
  char *tmp=name;
  while(*tmp!='\0'){
    if((*tmp=='.')&&(*(tmp+1)=='g')&&(*(tmp+2)=='z')){
      return(1);
    }
    tmp++;
  }
  return(0);
}

// Assembly:
addq $0x2, %rdi
pushq $0x1
popq %rcx
movzbl -0x2(%rdi), %eax
cmpl $0x2e, %eax
je 0xe540
testl %eax, %eax
jne 0xe54b
jmp 0xe552
cmpb $0x67, -0x1(%rdi)
jne 0xe54b
cmpb $0x7a, (%rdi)
je 0xe550
incq %rdi
jmp 0xe531
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movl (%rdx), %eax
cmpl 0x546fd(%rip), %eax     # 0x63614
jge 0xef30
movslq %ecx, %rcx
movslq %r8d, %rdi
pushq $0x1
popq %rax
cmpq %rdi, %rcx
jge 0xef34
andl $0x0, (%rsi,%rcx,4)
incq %rcx
jmp 0xef22
incl (%rdi)
xorl %eax, %eax
andl $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/read.c
// Function: Store_chain
void Store_chain(struct chain *chp, int *ichain, int n, int *nr)
{
  (*ichain)++; 
  chp->natoms=n-chp->ini_atom;
  chp->nres=*nr; 
  *nr=0;
}

// Assembly:
incl (%rsi)
subl (%rdi), %edx
movl %edx, 0x4(%rdi)
movl (%rcx), %eax
movl %eax, 0x1c(%rdi)
andl $0x0, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/read.c
// Function: Copy_atom
int Copy_atom(atom **atom2, atom *atom1, int i)
{
  if(i<0)return(0);
  *(*atom2)=*(atom1+i);
  (*atom2)++;
  return(1);
}

// Assembly:
testl %edx, %edx
js 0xf417
movq %rdi, %rax
movq (%rdi), %rdi
movl %edx, %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rsi
pushq $0xe
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
addq $0x70, (%rax)
pushq $0x1
popq %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbx
movl %esi, %r10d
xorl %r11d, %r11d
testl %ecx, %ecx
cmovlel %r11d, %ecx
movq %rdi, %r8
imulq $0x70, %rcx, %rbx
movabsq $0xe, %r9
xorl %eax, %eax
cmpq %r11, %rbx
je 0xf45f
cmpb %r10b, 0x19(%rdx,%r11)
jne 0xf459
movq (%r8), %rdi
leaq (%rdx,%r11), %rsi
movq %r9, %rcx
rep  movsq (%rsi), %es:(%rdi)
addq $0x70, (%r8)
incl %eax
addq $0x70, %r11
jmp 0xf43a
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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, 0x64e05(%rip)     # 0x74270
je 0xf47b
leaq 0x54174(%rip), %rax     # 0x635e8
movl (%rax), %ecx
jmp 0xf515
leaq 0x54166(%rip), %rax     # 0x635e8
movl $0x8, (%rax)
leaq 0x559a1(%rip), %rax     # 0x64e30
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 0x40a81(%rip), %xmm0    # 0x4ff60
leaq 0x5596a(%rip), %rax     # 0x64e50
movaps %xmm0, (%rax)
movaps 0x40a80(%rip), %xmm0    # 0x4ff70
leaq 0x55979(%rip), %rcx     # 0x64e70
movaps %xmm0, (%rcx)
movl $0x3f9da512, 0x10(%rax) # imm = 0x3F9DA512
movl $0x3f84985f, 0x10(%rcx) # imm = 0x3F84985F
movl $0x1, 0x64d5e(%rip)     # 0x74270
pushq $0x8
popq %rcx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
leaq 0x5590d(%rip), %rsi     # 0x64e30
incq %rsi
pushq $-0x1
popq %rax
cmpq %rdx, %rcx
je 0xf54b
movb (%rdi), %r8b
cmpb -0x1(%rsi), %r8b
jne 0xf540
movb 0x1(%rdi), %r8b
cmpb (%rsi), %r8b
je 0xf549
incq %rdx
addq $0x3, %rsi
jmp 0xf529
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %r9d
cmovgl %edx, %r9d
xorl %r10d, %r10d
cmpl %eax, %edx
movl %eax, %r11d
cmovgl %edx, %r11d
cmpq %r9, %rax
je 0xf89a
movb (%rsi), %bl
cmpb (%rcx), %bl
sete %bl
cmpl %r8d, %r10d
setl %bpl
andb %bl, %bpl
cmpb $0x1, %bpl
jne 0xf88e
testq %rax, %rax
je 0xf84c
cmpl $0x0, -0x4(%rdi,%rax,4)
jns 0xf882
movl %r11d, %r11d
movq %rsi, %r14
movq %rax, %rbx
cmpq %r11, %rbx
je 0xf882
xorl %r15d, %r15d
movb (%rcx,%r15), %bpl
cmpb (%r14,%r15), %bpl
jne 0xf872
cmpl $0x6, %r15d
je 0xf87a
incq %r15
jmp 0xf85d
incq %rbx
incq %r14
jmp 0xf855
movl %ebx, %r11d
cmpq %rax, %r11
jne 0xf88e
movl %r10d, (%rdi,%rax,4)
incl %r10d
incq %rcx
jmp 0xf892
orl $-0x1, (%rdi,%rax,4)
incq %rsi
incq %rax
jmp 0xf81b
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/vector.c
// Function: Rotate
void Rotate(float *r, float **rot){
  float tmp[3];
  tmp[0]=rot[0][0]*r[0]+rot[0][1]*r[1]+rot[0][2]*r[2];
  tmp[1]=rot[1][0]*r[0]+rot[1][1]*r[1]+rot[1][2]*r[2];
  tmp[2]=rot[2][0]*r[0]+rot[2][1]*r[1]+rot[2][2]*r[2];
  r[0]=tmp[0]; r[1]=tmp[1]; r[2]=tmp[2]; 
}

// Assembly:
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm3
movss 0x8(%rdi), %xmm1
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq 0x10(%rsi), %rdx
movss 0x4(%rdx), %xmm2
mulss %xmm3, %xmm2
movss (%rdx), %xmm4
mulss %xmm0, %xmm4
addss %xmm2, %xmm4
movss 0x8(%rdx), %xmm2
mulss %xmm1, %xmm2
addss %xmm4, %xmm2
unpcklps %xmm3, %xmm3            # xmm3 = xmm3[0,0,1,1]
movss (%rcx), %xmm4
movss 0x4(%rcx), %xmm5
movss 0x8(%rcx), %xmm6
movss (%rax), %xmm7
unpcklps %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
movss 0x4(%rax), %xmm4
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
mulps %xmm3, %xmm4
movss 0x8(%rax), %xmm3
unpcklps %xmm6, %xmm3            # xmm3 = xmm3[0],xmm6[0],xmm3[1],xmm6[1]
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
mulps %xmm7, %xmm0
addps %xmm4, %xmm0
unpcklps %xmm1, %xmm1            # xmm1 = xmm1[0,0,1,1]
mulps %xmm3, %xmm1
addps %xmm0, %xmm1
movlps %xmm1, (%rdi)
movss %xmm2, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/vector.c
// Function: Rotate_d
void Rotate_d(double *r, double **rot){
  double tmp[3];
  tmp[0]=rot[0][0]*r[0]+rot[0][1]*r[1]+rot[0][2]*r[2];
  tmp[1]=rot[1][0]*r[0]+rot[1][1]*r[1]+rot[1][2]*r[2];
  tmp[2]=rot[2][0]*r[0]+rot[2][1]*r[1]+rot[2][2]*r[2];
  r[0]=tmp[0]; r[1]=tmp[1]; r[2]=tmp[2]; 
}

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm2
movsd 0x10(%rdi), %xmm1
movq (%rsi), %rcx
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rdx
movsd 0x8(%rdx), %xmm3
mulsd %xmm2, %xmm3
movsd (%rdx), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movsd 0x10(%rdx), %xmm3
mulsd %xmm1, %xmm3
addsd %xmm4, %xmm3
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm5
movsd 0x10(%rcx), %xmm6
movhpd 0x8(%rax), %xmm5        # xmm5 = xmm5[0],mem[0]
mulpd %xmm2, %xmm5
movhpd (%rax), %xmm4           # xmm4 = xmm4[0],mem[0]
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm4, %xmm0
addpd %xmm5, %xmm0
movhpd 0x10(%rax), %xmm6       # xmm6 = xmm6[0],mem[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm6, %xmm1
addpd %xmm0, %xmm1
movupd %xmm1, (%rdi)
movsd %xmm3, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %r8d
cmovgl %ecx, %r8d
movl %ecx, %ecx
cmpq %r8, %rax
je 0xfb86
movq (%rsi,%rax,8), %r9
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
cmpl %r10d, %ecx
je 0xfb7c
movsd (%r9,%r10,8), %xmm1
mulsd (%rdx,%r10,8), %xmm1
addsd %xmm1, %xmm0
incq %r10
jmp 0xfb62
movsd %xmm0, (%rdi,%rax,8)
incq %rax
jmp 0xfb52
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x3, %rax
je 0xfbe0
imulq $0xc, %rax, %rdx
addq %rsp, %rdx
addq $-0x30, %rdx
xorl %r8d, %r8d
cmpq $0x3, %r8
je 0xfbd7
movq (%rsi,%r8,8), %r9
xorps %xmm0, %xmm0
xorl %r10d, %r10d
cmpq $0x3, %r10
je 0xfbcc
movss (%rcx,%r10,4), %xmm1
mulss (%r9,%r10,4), %xmm1
addss %xmm1, %xmm0
incq %r10
jmp 0xfbb1
movss %xmm0, (%rdx,%r8,4)
incq %r8
jmp 0xfba1
incq %rax
addq $0xc, %rcx
jmp 0xfb8d
xorl %eax, %eax
leaq -0x30(%rsp), %rcx
cmpq $0x3, %rax
je 0xfc3d
movq (%rsi,%rax,8), %rdx
imulq $0xc, %rax, %r8
addq %rdi, %r8
movq %rcx, %r9
xorl %r10d, %r10d
cmpq $0x3, %r10
je 0xfc38
xorps %xmm0, %xmm0
movq %r9, %r11
xorl %ebx, %ebx
cmpq $0x3, %rbx
je 0xfc29
movss (%rdx,%rbx,4), %xmm1
mulss (%r11), %xmm1
addss %xmm1, %xmm0
incq %rbx
addq $0xc, %r11
jmp 0xfc0c
movss %xmm0, (%r8,%r10,4)
incq %r10
addq $0x4, %r9
jmp 0xfbfe
incq %rax
jmp 0xfbe7
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x3, %rax
je 0xfc96
movq (%rdi,%rax,8), %rcx
imulq $0x18, %rax, %rdx
addq %rsp, %rdx
addq $-0x50, %rdx
xorl %r8d, %r8d
cmpq $0x3, %r8
je 0xfc91
movq (%rsi,%r8,8), %r9
xorpd %xmm0, %xmm0
xorl %r10d, %r10d
cmpq $0x3, %r10
je 0xfc86
movsd (%rcx,%r10,8), %xmm1
mulsd (%r9,%r10,8), %xmm1
addsd %xmm1, %xmm0
incq %r10
jmp 0xfc6b
movsd %xmm0, (%rdx,%r8,8)
incq %r8
jmp 0xfc5a
incq %rax
jmp 0xfc42
xorl %eax, %eax
leaq -0x50(%rsp), %rcx
cmpq $0x3, %rax
je 0xfcf1
movq (%rsi,%rax,8), %rdx
movq (%rdi,%rax,8), %r8
movq %rcx, %r9
xorl %r10d, %r10d
cmpq $0x3, %r10
je 0xfcec
xorpd %xmm0, %xmm0
movq %r9, %r11
xorl %ebx, %ebx
cmpq $0x3, %rbx
je 0xfcdd
movsd (%rdx,%rbx,8), %xmm1
mulsd (%r11), %xmm1
addsd %xmm1, %xmm0
incq %rbx
addq $0x18, %r11
jmp 0xfcc0
movsd %xmm0, (%r8,%r10,8)
incq %r10
addq $0x8, %r9
jmp 0xfcb1
incq %rax
jmp 0xfc9d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %r9d
cmovgl %edx, %r9d
xorpd %xmm0, %xmm0
xorpd %xmm6, %xmm6
xorpd %xmm1, %xmm1
cmpl %eax, %r9d
je 0xfe69
movss (%rdi,%rax,4), %xmm2
movss (%rsi,%rax,4), %xmm3
movaps %xmm2, %xmm4
mulss %xmm3, %xmm4
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtps2pd %xmm3, %xmm2
cvtss2sd %xmm4, %xmm4
mulps %xmm3, %xmm3
cvtps2pd %xmm3, %xmm3
addsd %xmm4, %xmm6
addpd %xmm2, %xmm1
addpd %xmm3, %xmm0
incq %rax
jmp 0xfe32
cvtsi2sd %edx, %xmm3
movapd %xmm1, %xmm4
mulpd %xmm1, %xmm4
movapd %xmm3, %xmm2
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
mulpd %xmm0, %xmm2
subpd %xmm4, %xmm2
xorpd %xmm0, %xmm0
cmpeqpd %xmm2, %xmm0
movmskpd %xmm0, %eax
xorpd %xmm0, %xmm0
testl %eax, %eax
jne 0xff29
pushq %rax
movapd %xmm1, %xmm4
unpckhpd %xmm1, %xmm4            # xmm4 = xmm4[1],xmm1[1]
movapd 0x3b211(%rip), %xmm0    # 0x4b0c0
xorpd %xmm4, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm3, %xmm6
addsd %xmm0, %xmm6
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
testq %rcx, %rcx
je 0xfedc
movapd %xmm6, %xmm5
divsd %xmm0, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm5, (%rcx)
testq %r8, %r8
je 0xfefa
cvtss2sd (%rcx), %xmm5
mulsd %xmm4, %xmm5
subsd %xmm5, %xmm1
divsd %xmm3, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, (%r8)
mulsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xff0e
sqrtsd %xmm0, %xmm0
jmp 0xff1d
movsd %xmm6, (%rsp)
callq 0x2290
movsd (%rsp), %xmm6
divsd %xmm0, %xmm6
cvtsd2ss %xmm6, %xmm0
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, (%rax)
xorl %r10d, %r10d
testl %ecx, %ecx
cmovlel %r10d, %ecx
xorpd %xmm3, %xmm3
xorpd %xmm1, %xmm1
xorl %r11d, %r11d
xorpd %xmm2, %xmm2
cmpq %r11, %rcx
je 0xff98
cmpl $0x0, (%rdx,%r11,4)
je 0xff93
movss (%rsi,%r11,4), %xmm0
incl %r10d
movss (%rdi,%r11,4), %xmm4
movaps %xmm4, %xmm5
shufps $0x0, %xmm4, %xmm5      # xmm5 = xmm5[0,0],xmm4[0,0]
unpcklps %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
mulps %xmm4, %xmm5
cvtps2pd %xmm5, %xmm5
movl %r10d, (%rax)
cvtps2pd %xmm4, %xmm4
addpd %xmm5, %xmm3
addpd %xmm4, %xmm2
mulss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm0, %xmm1
incq %r11
jmp 0xff4e
cvtsi2sd %r10d, %xmm4
movapd %xmm2, %xmm5
unpckhpd %xmm2, %xmm5            # xmm5 = xmm5[1],xmm2[1]
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
mulsd %xmm4, %xmm1
subsd %xmm0, %xmm1
movapd %xmm2, %xmm6
unpcklpd %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0]
mulpd %xmm2, %xmm6
movapd %xmm4, %xmm0
unpcklpd %xmm4, %xmm0            # xmm0 = xmm0[0],xmm4[0]
mulpd %xmm3, %xmm0
subpd %xmm6, %xmm0
movapd %xmm0, %xmm6
unpckhpd %xmm0, %xmm6            # xmm6 = xmm6[1],xmm0[1]
movapd %xmm6, %xmm3
divsd %xmm0, %xmm3
cvtsd2ss %xmm3, %xmm3
movss %xmm3, (%r8)
cvtss2sd %xmm3, %xmm3
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm5
divsd %xmm4, %xmm5
cvtsd2ss %xmm5, %xmm2
movss %xmm2, (%r9)
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x10017
sqrtsd %xmm0, %xmm0
jmp 0x10026
movapd %xmm6, (%rsp)
callq 0x2290
movapd (%rsp), %xmm6
divsd %xmm0, %xmm6
cvtsd2ss %xmm6, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %esi, %ebx
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %ebx
movq %rdi, %r14
xorpd %xmm1, %xmm1
xorps %xmm3, %xmm3
xorpd %xmm2, %xmm2
cmpq %r15, %rbx
je 0x100a2
movss (%r14,%r15,4), %xmm0
ucomiss %xmm0, %xmm3
jae 0x1009d
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
jmp 0x10055
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jne 0x100c6
jp 0x100c6
leaq 0x3ff93(%rip), %rdi     # 0x50048
movapd %xmm2, %xmm0
movb $0x1, %al
callq 0x20f0
xorpd %xmm0, %xmm0
jmp 0x100e8
divsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm2, %xmm0
callq 0x2120
addsd 0x8(%rsp), %xmm0
callq 0x22a0
cvtsd2ss %xmm0, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %esi, %r14d
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %r14d
movq %rdi, %rbx
xorpd %xmm1, %xmm1
xorps %xmm3, %xmm3
xorpd %xmm2, %xmm2
cmpq %r15, %r14
je 0x10166
movss (%rbx,%r15,4), %xmm0
mulss %xmm0, %xmm0
ucomiss %xmm3, %xmm0
jbe 0x10161
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
jmp 0x10115
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
jbe 0x10193
divsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x2120
movsd 0x8(%rsp), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
movapd %xmm2, %xmm0
callq 0x22a0
cvtsd2ss %xmm0, %xmm0
ucomiss %xmm0, %xmm0
jp 0x101b5
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3feb4(%rip), %rdi     # 0x50070
xorl %r15d, %r15d
xorl %eax, %eax
movss %xmm0, 0x10(%rsp)
callq 0x20f0
cvtss2sd 0x10(%rsp), %xmm2
leaq 0x3feb6(%rip), %rdi     # 0x5008f
movsd 0x8(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movb $0x3, %al
callq 0x20f0
leaq 0x3fec1(%rip), %rdi     # 0x500b4
xorl %eax, %eax
callq 0x20f0
leaq 0x3feb7(%rip), %r14     # 0x500b8
cmpq $0x1e, %r15
je 0x1021c
cvtss2sd (%rbx,%r15,4), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x20f0
incq %r15
jmp 0x10201
leaq 0x3fe9b(%rip), %rdi     # 0x500be
callq 0x2090
movss 0x10(%rsp), %xmm0
jmp 0x101ab
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdx, %rbx
movl %esi, %r14d
xorl %r12d, %r12d
testl %esi, %esi
cmovlel %r12d, %r14d
movq %rdi, %r15
xorpd %xmm1, %xmm1
xorps %xmm3, %xmm3
xorpd %xmm2, %xmm2
cmpq %r12, %r14
je 0x102b6
testq %rbx, %rbx
je 0x1026c
cmpl $0x0, (%rbx,%r12,4)
jne 0x102b1
movss (%r15,%r12,4), %xmm0
mulss %xmm0, %xmm0
ucomiss %xmm3, %xmm0
jbe 0x102b1
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd %xmm2, (%rsp)
callq 0x2120
xorps %xmm3, %xmm3
movsd (%rsp), %xmm2
movsd 0x10(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm0
subsd %xmm0, %xmm2
incq %r12
jmp 0x1025b
divsd %xmm1, %xmm2
movsd %xmm2, (%rsp)
movapd %xmm1, %xmm0
callq 0x2120
addsd (%rsp), %xmm0
callq 0x22a0
cvtsd2ss %xmm0, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cmpq %rax, %rsi
je 0x10315
movss (%rdi,%rax,4), %xmm2
ucomiss %xmm2, %xmm1
jae 0x10310
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 %rax
jmp 0x102f0
movapd %xmm0, %xmm1
mulpd %xmm0, %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cmpq %rax, %rcx
je 0x103af
movss (%rdi,%rax,4), %xmm2
ucomiss %xmm2, %xmm1
jae 0x103aa
cvtsi2ss %eax, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtps2pd %xmm3, %xmm2
addpd %xmm2, %xmm0
incq %rax
jmp 0x10389
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
cvtsi2sd %esi, %xmm2
divsd %xmm1, %xmm0
subsd %xmm0, %xmm2
addsd 0x3fc75(%rip), %xmm2    # 0x50040
decl %esi
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm2
cvtsd2ss %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cmpq %rax, %rcx
je 0x10417
movss (%rdi,%rax,4), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jae 0x10412
cvtsi2ss %eax, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtps2pd %xmm3, %xmm2
addpd %xmm2, %xmm0
incq %rax
jmp 0x103ed
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
cvtsi2sd %esi, %xmm2
divsd %xmm1, %xmm0
subsd %xmm0, %xmm2
addsd 0x3fc0d(%rip), %xmm2    # 0x50040
decl %esi
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm2
cvtsd2ss %xmm2, %xmm0
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x21d0
movq %rax, 0x8(%rbx)
movslq %r14d, %r14
shlq $0x2, %r14
movq %r14, %rdi
callq 0x21d0
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x21d0
movq %rax, 0x10(%rbx)
movslq %ebp, %rdi
shlq $0x2, %rdi
callq 0x21d0
movq %rax, 0x20(%rbx)
andl $0x0, 0x30(%rbx)
andl $0x0, 0x3c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/align_tnm.c
// Function: Match_chains_by_length
void Match_chains_by_length(int *match1,
			    struct chain *chains1, int Nchain1,
			    struct chain *chains2, int Nchain2)
{
  int match2[Nchain2], free1[Nchain1], free2[Nchain2], i, j;
  for(i=0; i<Nchain1; i++){match1[i]=-1; free1[i]=1;}
  for(i=0; i<Nchain2; i++){match2[i]=-1; free2[i]=1;}
  Best_match(match1, free1, chains1, Nchain1, chains2, Nchain2);
  Best_match(match2, free2, chains2, Nchain2, chains1, Nchain1);
  for(i=0; i<Nchain1; i++){
    j=match1[i];
    if(match2[j]==i){free2[j]=0;} // Freeze reciprocal best matches
    else{match1[i]=-1;}
  }
  Best_match(match1, free1, chains1, Nchain1, chains2, Nchain2);  

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r9d
movq %rcx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r13
movl %r8d, %eax
movq %rsp, %r14
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movl %edx, %ecx
movq %rsp, %r12
leaq 0xf(,%rcx,4), %rcx
andq $-0x10, %rcx
subq %rcx, %r12
movq %r12, %rsp
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %r15d
movl %edx, -0x2c(%rbp)
cmovgl %edx, %r15d
cmpq %rax, %r15
je 0x111ab
orl $-0x1, (%r13,%rax,4)
movl $0x1, (%r12,%rax,4)
incq %rax
jmp 0x11193
xorl %eax, %eax
testl %r9d, %r9d
movl $0x0, %ecx
cmovgl %r9d, %ecx
cmpq %rax, %rcx
je 0x111cf
orl $-0x1, (%r14,%rax,4)
movl $0x1, (%rbx,%rax,4)
incq %rax
jmp 0x111b9
movq %r13, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %r8
movl %r9d, -0x30(%rbp)
callq 0x11252
movq %r14, %rdi
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
movl -0x30(%rbp), %ecx
movq -0x38(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x11252
xorl %eax, %eax
cmpq %rax, %r15
je 0x11229
movslq (%r13,%rax,4), %rcx
movl (%r14,%rcx,4), %edx
cmpq %rdx, %rax
jne 0x1121e
andl $0x0, (%rbx,%rcx,4)
jmp 0x11224
orl $-0x1, (%r13,%rax,4)
incq %rax
jmp 0x11205
movq %r13, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %r8
movl -0x30(%rbp), %r9d
callq 0x11252
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorl %eax, %eax
testl %r9d, %r9d
movl $0x0, %r10d
cmovgl %r9d, %r10d
movslq %r9d, %r9
testl %ecx, %ecx
cmovlel %eax, %ecx
movq %r8, -0x8(%rsp)
leaq 0x1c(%r8), %r11
cmpq %rcx, %rax
je 0x11312
cmpl $0x0, (%rdi,%rax,4)
jns 0x1130a
imulq $0x70, %rax, %r12
movl 0x1c(%rdx,%r12), %r8d
movl $0x186a0, %r14d         # imm = 0x186A0
cmpq %r9, %rax
jge 0x112c7
cmpl $0x0, (%rsi,%rax,4)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
je 0x112cd
movl %r8d, %r15d
movq -0x8(%rsp), %rbx
subl 0x1c(%rbx,%r12), %r15d
movl %r15d, %r14d
negl %r14d
cmovsl %r15d, %r14d
movl %eax, %r15d
jmp 0x112cd
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %r11, %r12
xorl %r13d, %r13d
cmpq %r13, %r10
je 0x11306
cmpq %r13, %rax
je 0x112fd
cmpl $0x0, (%rsi,%r13,4)
je 0x112fd
movl %r8d, %ebx
subl (%r12), %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
cmpl %r14d, %ebp
cmovll %r13d, %r15d
cmovll %ebp, %r14d
incq %r13
addq $0x70, %r12
jmp 0x112d3
movl %r15d, (%rdi,%rax,4)
incq %rax
jmp 0x1127c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq