// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/main_tnm.c
// Function: Print_summary
double Print_summary(char *name_out, char *name1, char *parameters, int Nchain,
		     struct Normal_Mode NM,
		     char *out_B1, char *out_B2, float Tors_fluct,
		     struct axe *axes, int N_axes, int N_main,
		     int Nskip, int N_atoms, int N_res, int N_diso,
		     int N_int, int N_inter, float Cont_overlap,
		     int N_disc_coll, int N_disc_freq, int N_disc_out,
		     float mass_sum,
		     struct Normal_Mode NM_unfold,
		     int N_int_unfold, double E_cont_unfold, int FOLDING,
		     struct Normal_Mode NM_apo, int N_int_inter,
		     double Econt_holo, double Econt_bind, int BINDING,
		     float *mass_coord, int *Cart_interface, int N_Cart_inter,
		     int *rigid_inter, int N_rigid)
{
  FILE *file_out;

  printf("Writing %s\n", name_out);
  file_out=fopen(name_out, "w");

  //float r02=pow(N_res, 2/3);
  //float c=(float)N_int/(float)N_res;
  //float Surf=(cont_inf -c)*r02;
  float Surf=N_res-N_int_long/cont_inf;

  fprintf(file_out, "%s\n", parameters);
  fprintf(file_out, "protein               %s\n", name1);
  fprintf(file_out, "Nchain                %d\n", Nchain);
  fprintf(file_out, "Nres                  %d\n", N_res);
  fprintf(file_out, "Mass                  %.0f\n", mass_sum);
  fprintf(file_out, "Degrees of freedom    %d\n", NM.N);
  fprintf(file_out, "Rigid Deg of freed    %d\n", N_rigid);
  fprintf(file_out, "Side chain            %d\n", N_axes-N_main);
  fprintf(file_out, "Skipped main chain    %d\n", Nskip);
  fprintf(file_out, "Discarded modes coll. %d\n", N_disc_coll);
  fprintf(file_out, "Discarded modes freq. %d\n", N_disc_freq);
  fprintf(file_out, "Discarded modes outl. %d\n", N_disc_out);
  fprintf(file_out, "Disordered gaps       %d\n", N_diso);
  fprintf(file_out, "Native interactions   %d\n", N_int);
  if(Cont_overlap >= 0)
    fprintf(file_out, "Overlap with MIN int. %.3f\n", Cont_overlap);
  if(Nchain>1)fprintf(file_out, "Interchain contacts    %d\n", N_inter);
  fprintf(file_out, "Force constant at %.1fA %.4g\n", C0, KAPPA);
  if(TEMPERATURE>0)
    fprintf(file_out, "Temperature:          %.3g K\n", TEMPERATURE);
  fprintf(file_out, "Estimated surface     %.4g\n", Surf);
  fprintf(file_out, "Contact energy        %.4g\n", Econt_holo);

  int anharmonic=0;
  G_NM_holo=
    Print_thermal(anharmonic, file_out, NM, out_B1, axes, N_main, N_res,Nchain,
		  NM_unfold, N_int_unfold, N_int, E_cont_unfold, FOLDING,
		  NM_apo, N_int_inter, Econt_bind, BINDING, 
		  mass_coord,Cart_interface,N_Cart_inter,rigid_inter,N_rigid);
  fprintf(file_out, "Torsional_RMSD_Harm   %.3f\n", Tors_fluct);
  fprintf(file_out, "#\n");

  if(ANHARMONIC){
    anharmonic=1;
    Print_thermal(anharmonic, file_out, NM, out_B2, axes,N_main,N_res,Nchain,
		  NM_unfold, N_int_unfold, N_int, E_cont_unfold, FOLDING,
		  NM_apo, N_int_inter, Econt_bind, BINDING, 
		  mass_coord,Cart_interface,N_Cart_inter,rigid_inter,N_rigid);
    fprintf(file_out, "#\n");
  }
  fclose(file_out);
  return(G_NM_holo);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movl 0x320(%rbp), %eax
movq 0x318(%rbp), %rax
movl 0x310(%rbp), %eax
movq 0x308(%rbp), %rax
movq 0x300(%rbp), %rax
movl 0x2f8(%rbp), %eax
movl 0x2f0(%rbp), %eax
leaq 0x220(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl 0x218(%rbp), %eax
movl 0x210(%rbp), %eax
leaq 0x140(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl 0x138(%rbp), %eax
movl 0x130(%rbp), %eax
movl 0x128(%rbp), %eax
movl 0x120(%rbp), %eax
movl 0x118(%rbp), %eax
movl 0x110(%rbp), %eax
movl 0x108(%rbp), %eax
movl 0x100(%rbp), %eax
movl 0xf8(%rbp), %eax
movl 0xf0(%rbp), %eax
movl 0xe8(%rbp), %eax
movq 0xe0(%rbp), %rax
leaq 0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movss %xmm0, -0x5c(%rbp)
movss %xmm1, -0x60(%rbp)
movss %xmm2, -0x64(%rbp)
movsd %xmm3, -0x70(%rbp)
movsd %xmm4, -0x78(%rbp)
movsd %xmm5, -0x80(%rbp)
movq -0x30(%rbp), %rsi
leaq 0x6b891(%rip), %rdi     # 0x774ee
movb $0x0, %al
callq 0x10d0
movq -0x30(%rbp), %rdi
leaq 0x70703(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x88(%rbp)
cvtsi2ssl 0x108(%rbp), %xmm0
cvtsi2ssl 0x81155(%rip), %xmm1 # 0x8cde0
divss 0x7e555(%rip), %xmm1    # 0x8a1e8
subss %xmm1, %xmm0
movss %xmm0, -0x8c(%rbp)
movq -0x88(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x76da7(%rip), %rsi     # 0x82a58
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0x6bac9(%rip), %rsi     # 0x77793
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl -0x44(%rbp), %edx
leaq 0x6bacb(%rip), %rsi     # 0x777ad
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x108(%rbp), %edx
leaq 0x6baca(%rip), %rsi     # 0x777c7
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movss -0x64(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x6bac6(%rip), %rsi     # 0x777e1
movb $0x1, %al
callq 0x1150
movq -0x98(%rbp), %rax
movq -0x88(%rbp), %rdi
movl (%rax), %edx
leaq 0x6bac4(%rip), %rsi     # 0x777fd
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x320(%rbp), %edx
leaq 0x6bac3(%rip), %rsi     # 0x77817
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0xe8(%rbp), %edx
subl 0xf0(%rbp), %edx
leaq 0x6babc(%rip), %rsi     # 0x77831
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0xf8(%rbp), %edx
leaq 0x6babb(%rip), %rsi     # 0x7784b
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x128(%rbp), %edx
leaq 0x6baba(%rip), %rsi     # 0x77865
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x130(%rbp), %edx
leaq 0x6bab9(%rip), %rsi     # 0x7787f
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x138(%rbp), %edx
leaq 0x6bab8(%rip), %rsi     # 0x77899
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x110(%rbp), %edx
leaq 0x6bab7(%rip), %rsi     # 0x778b3
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movl 0x118(%rbp), %edx
leaq 0x6bab6(%rip), %rsi     # 0x778cd
movb $0x0, %al
callq 0x1150
movss -0x60(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xbe49
movq -0x88(%rbp), %rdi
movss -0x60(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x6baa5(%rip), %rsi     # 0x778e7
movb $0x1, %al
callq 0x1150
cmpl $0x1, -0x44(%rbp)
jle 0xbe6a
movq -0x88(%rbp), %rdi
movl 0x120(%rbp), %edx
leaq 0x6baa0(%rip), %rsi     # 0x77903
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movss 0x801bb(%rip), %xmm0    # 0x8c034
cvtss2sd %xmm0, %xmm0
movss 0x801b3(%rip), %xmm1    # 0x8c038
cvtss2sd %xmm1, %xmm1
leaq 0x6ba8e(%rip), %rsi     # 0x7791e
movb $0x2, %al
callq 0x1150
movss 0x7e2b1(%rip), %xmm0    # 0x8a150
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xbec8
movq -0x88(%rbp), %rdi
movss 0x7e29a(%rip), %xmm0    # 0x8a150
cvtss2sd %xmm0, %xmm0
leaq 0x6ba7b(%rip), %rsi     # 0x7793c
movb $0x1, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movss -0x8c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x6ba78(%rip), %rsi     # 0x7795a
movb $0x1, %al
callq 0x1150
movq -0x88(%rbp), %rdi
movsd -0x78(%rbp), %xmm0
leaq 0x6ba7a(%rip), %rsi     # 0x77976
movb $0x1, %al
callq 0x1150
movq -0x98(%rbp), %rsi
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0xd0(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rdx
movq 0xe0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl 0xf0(%rbp), %r8d
movl 0x108(%rbp), %r9d
movl -0x44(%rbp), %r10d
movl 0x210(%rbp), %r11d
movl 0x118(%rbp), %ebx
movsd -0x70(%rbp), %xmm0
movl 0x218(%rbp), %r14d
movl 0x2f0(%rbp), %r15d
movsd -0x80(%rbp), %xmm1
movl 0x2f8(%rbp), %r12d
movq 0x300(%rbp), %r13
movq 0x308(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl 0x310(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq 0x318(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl 0x320(%rbp), %eax
movl %eax, -0xcc(%rbp)
movq %rsp, %rax
movq %rax, -0xe8(%rbp)
movl $0x1a, %ecx
movq %rcx, -0xe0(%rbp)
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq -0xa8(%rbp), %rsi
movq -0xe0(%rbp), %rcx
movq %rax, %rdi
addq $0x1c0, %rdi            # imm = 0x1C0
rep  movsq (%rsi), %es:(%rdi)
movq -0xa0(%rbp), %rsi
movq -0xe0(%rbp), %rcx
movq %rax, %rdi
addq $0xd8, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq -0xd8(%rbp), %rsi
movl -0xd0(%rbp), %edi
movl -0xcc(%rbp), %ecx
movl %ecx, 0x2c0(%rax)
movq -0xc8(%rbp), %rcx
movq %rcx, 0x2b8(%rax)
movl -0xbc(%rbp), %ecx
movl %ecx, 0x2b0(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x2a8(%rax)
movq -0xb0(%rbp), %rcx
movq %r13, 0x2a0(%rax)
movl %r12d, 0x298(%rax)
movl %r15d, 0x290(%rax)
movl %r14d, 0x1b8(%rax)
movl %ebx, 0x1b0(%rax)
movl %r11d, 0x1a8(%rax)
movl %r10d, 0xd0(%rax)
callq 0xc320
movsd %xmm0, 0x7fed8(%rip)    # 0x8bf68
movq -0x88(%rbp), %rdi
movss -0x5c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x6b8eb(%rip), %rsi     # 0x77992
movb $0x1, %al
callq 0x1150
movq -0x88(%rbp), %rdi
leaq 0x75861(%rip), %rsi     # 0x8191d
movb $0x0, %al
callq 0x1150
cmpl $0x0, 0x7fec6(%rip)     # 0x8bf90
je 0xc26a
movq -0x98(%rbp), %rsi
movl $0x1, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x110(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x58(%rbp), %rdx
movq 0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl 0xf0(%rbp), %r8d
movl 0x108(%rbp), %r9d
movl -0x44(%rbp), %r10d
movl 0x210(%rbp), %r11d
movl 0x118(%rbp), %ebx
movsd -0x70(%rbp), %xmm0
movl 0x218(%rbp), %r14d
movl 0x2f0(%rbp), %r15d
movsd -0x80(%rbp), %xmm1
movl 0x2f8(%rbp), %r12d
movq 0x300(%rbp), %r13
movq 0x308(%rbp), %rax
movq %rax, -0xf8(%rbp)
movl 0x310(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq 0x318(%rbp), %rax
movq %rax, -0x108(%rbp)
movl 0x320(%rbp), %eax
movl %eax, -0x10c(%rbp)
movq %rsp, %rax
movq %rax, -0x128(%rbp)
movl $0x1a, %ecx
movq %rcx, -0x120(%rbp)
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq -0xa8(%rbp), %rsi
movq -0x120(%rbp), %rcx
movq %rax, %rdi
addq $0x1c0, %rdi            # imm = 0x1C0
rep  movsq (%rsi), %es:(%rdi)
movq -0xa0(%rbp), %rsi
movq -0x120(%rbp), %rcx
movq %rax, %rdi
addq $0xd8, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq -0x118(%rbp), %rsi
movl -0x110(%rbp), %edi
movl -0x10c(%rbp), %ecx
movl %ecx, 0x2c0(%rax)
movq -0x108(%rbp), %rcx
movq %rcx, 0x2b8(%rax)
movl -0xfc(%rbp), %ecx
movl %ecx, 0x2b0(%rax)
movq -0xf8(%rbp), %rcx
movq %rcx, 0x2a8(%rax)
movq -0xf0(%rbp), %rcx
movq %r13, 0x2a0(%rax)
movl %r12d, 0x298(%rax)
movl %r15d, 0x290(%rax)
movl %r14d, 0x1b8(%rax)
movl %ebx, 0x1b0(%rax)
movl %r11d, 0x1a8(%rax)
movl %r10d, 0xd0(%rax)
callq 0xc320
movq -0x88(%rbp), %rdi
leaq 0x756ba(%rip), %rsi     # 0x8191d
movb $0x0, %al
callq 0x1150
movq -0x88(%rbp), %rdi
callq 0x10a0
movsd 0x7fcea(%rip), %xmm0    # 0x8bf68
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq