// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/nma.c
// Function: Print_B_fact
void Print_B_fact(float *B_TNM, float *B_pred_all, float *B_exp,
		  int N, atom *atoms, int *atom_ref, struct residue *seq,
		  char *name, char *what, float cc, float slope,
		  float *dof, char ridge)
{
  char nameout[200];  int i;
  atom *atom1=NULL;
  FILE *file_out;

  //sprintf(nameout, "%s_%s.dat", name, what);
  sprintf(nameout, "%s.MSF.dat", name);
  file_out=fopen(nameout, "w");
  printf("Writing %s\n", nameout);
  if(B_pred_all && B_exp) {
    fprintf(file_out, "# Ridge regression of type %c\n", ridge);
    fprintf(file_out, "# slope=%.4g corr.=%.3f (%s)\n", slope, cc, what);
    fprintf(file_out, "# Internal_fluct= %.3f", dof[0]);
    fprintf(file_out, " Translation_fluct= %.3f", dof[1]);
    fprintf(file_out, " Rotation_fluct= %.3f\n", dof[2]);
    fprintf(file_out, "# aa_pos_chain pred_msd_int pred_msd_all B/(8pi^2/3)\n");
  }else{
    fprintf(file_out, "# aa_pos_chain pred_msd_internal\n");
  }
  
  for(i=0; i<N; i++){atom1=atoms+atom_ref[i];
    struct residue *r=seq+atom1->res;
    int j;
    for(j=(int)sizeof(r->pdbres)-1; j>=0; j--){
      if(r->pdbres[j]==' '){r->pdbres[j]='\0';}
      else{break;}
    }
    for(j=0; j<(int)sizeof(r->pdbres); j++)
    	if(r->pdbres[j]!=' ')break;
    char name[20];
    sprintf(name, "%c%s%c", r->amm, r->pdbres+j, r->chain);
    fprintf(file_out, "%s\t%.4g", name, B_TNM[i]);
    if(B_pred_all && B_exp)
      fprintf(file_out, "\t%7.3f\t%7.3f", B_pred_all[i], B_exp[i]);
    fprintf(file_out, "\n");
  }
  fclose(file_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movb 0x30(%rbp), %al
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movss %xmm0, -0x34(%rbp)
movss %xmm1, -0x38(%rbp)
movq $0x0, -0x110(%rbp)
leaq -0x100(%rbp), %rdi
movq 0x18(%rbp), %rdx
leaq 0x44053(%rip), %rsi     # 0x7e26f
movb $0x0, %al
callq 0x1200
leaq -0x100(%rbp), %rdi
leaq 0x42141(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x118(%rbp)
leaq -0x100(%rbp), %rsi
leaq 0x3d2a3(%rip), %rdi     # 0x774ee
movb $0x0, %al
callq 0x10d0
cmpq $0x0, -0x10(%rbp)
je 0x3a328
cmpq $0x0, -0x18(%rbp)
je 0x3a328
movq -0x118(%rbp), %rdi
movsbl 0x30(%rbp), %edx
leaq 0x44000(%rip), %rsi     # 0x7e27a
movb $0x0, %al
callq 0x1150
movq -0x118(%rbp), %rdi
movss -0x38(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x34(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movq 0x20(%rbp), %rdx
leaq 0x43ff4(%rip), %rsi     # 0x7e299
movb $0x2, %al
callq 0x1150
movq -0x118(%rbp), %rdi
movq 0x28(%rbp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x43ff1(%rip), %rsi     # 0x7e2b7
movb $0x1, %al
callq 0x1150
movq -0x118(%rbp), %rdi
movq 0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x43fe6(%rip), %rsi     # 0x7e2ce
movb $0x1, %al
callq 0x1150
movq -0x118(%rbp), %rdi
movq 0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x43fdd(%rip), %rsi     # 0x7e2e7
movb $0x1, %al
callq 0x1150
movq -0x118(%rbp), %rdi
leaq 0x43fdf(%rip), %rsi     # 0x7e2fe
movb $0x0, %al
callq 0x1150
jmp 0x3a33d
movq -0x118(%rbp), %rdi
leaq 0x43ffe(%rip), %rsi     # 0x7e334
movb $0x0, %al
callq 0x1150
movl $0x0, -0x104(%rbp)
movl -0x104(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3a50e
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq -0x104(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x110(%rbp)
movq 0x10(%rbp), %rax
movq -0x110(%rbp), %rcx
movslq 0x64(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movl $0x5, -0x124(%rbp)
cmpl $0x0, -0x124(%rbp)
jl 0x3a3e9
movq -0x120(%rbp), %rax
movslq -0x124(%rbp), %rcx
movsbl 0xd(%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0x3a3d4
movq -0x120(%rbp), %rax
movslq -0x124(%rbp), %rcx
movb $0x0, 0xd(%rax,%rcx)
jmp 0x3a3d6
jmp 0x3a3e9
jmp 0x3a3d8
movl -0x124(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x3a39e
movl $0x0, -0x124(%rbp)
cmpl $0x6, -0x124(%rbp)
jge 0x3a429
movq -0x120(%rbp), %rax
movslq -0x124(%rbp), %rcx
movsbl 0xd(%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x3a416
jmp 0x3a429
jmp 0x3a418
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x3a3f3
leaq -0x140(%rbp), %rdi
movq -0x120(%rbp), %rax
movsbl 0x13(%rax), %edx
movq -0x120(%rbp), %rcx
addq $0xd, %rcx
movslq -0x124(%rbp), %rax
addq %rax, %rcx
movq -0x120(%rbp), %rax
movsbl 0xc(%rax), %r8d
leaq 0x40fcb(%rip), %rsi     # 0x7b42e
movb $0x0, %al
callq 0x1200
movq -0x118(%rbp), %rdi
leaq -0x140(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x104(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x43ec3(%rip), %rsi     # 0x7e356
movb $0x1, %al
callq 0x1150
cmpq $0x0, -0x10(%rbp)
je 0x3a4e5
cmpq $0x0, -0x18(%rbp)
je 0x3a4e5
movq -0x118(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x104(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x18(%rbp), %rax
movslq -0x104(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x43e80(%rip), %rsi     # 0x7e35e
movb $0x2, %al
callq 0x1150
movq -0x118(%rbp), %rdi
leaq 0x43b85(%rip), %rsi     # 0x7e078
movb $0x0, %al
callq 0x1150
movl -0x104(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x104(%rbp)
jmp 0x3a347
movq -0x118(%rbp), %rdi
callq 0x10a0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)