// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/ridge_regression.c
// Function: Print_make_fit
void Print_make_fit(struct ridge_fit *F, float Lambda, char *what,
		    FILE *file_out, char *nameout, float *eval, float **evec,
		    float *yalpha, float *D, float **X, float *Y, float *ya2,
		    float E0, float Y2, float *A_ref, float *A_inf,
		    int Npar, int N, double *sum_x, double var_y)
{
  F->Lambda=Lambda;
  Score_computation(F, eval,evec,yalpha,ya2,D,E0,Y2,A_ref,A_inf,Npar,N);
  int a; for(a=0; a<Npar; a++)F->A[a]/=D[a];
  /*double sum=0; for(a=0; a<Npar; a++)sum+=F->A[a]*sum_x[a];
  F->dof[0]=F->A[0]*sum_x[0]/sum; // Internal fraction
  F->dof[1]=F->A[1]*N/sum;  // Translations
  F->dof[2]=1-F->dof[0]-F->dof[1]; // Rotations*/
  // Print
  fprintf(file_out,
	  "#\t%.3g\t%.3g\t%.3g\t%.3g\t%.3g\t%10s",
	  F->Lambda, F->Cv, F->E/var_y, F->LF_csi, F->LF_inf, what);
  if(P_FIT)for(a=0; a<Npar; a++)fprintf(file_out, "\t%.3g", F->A[a]);
  fprintf(file_out, "\n");

  if(VB2){
    char namefile[200];
    sprintf(namefile, "%s_%s.dat", nameout, what);
    FILE *file_o=fopen(namefile, "w"); int i, a;
    printf("Writing %s fit in %s\n", what, namefile);
    fprintf(file_o, "#A= ");
    for(i=0; i<Npar; i++)fprintf(file_o, " %.3g",F->A[i]);
    fprintf(file_o, "\n# Y ");
    for(i=0; i<Npar; i++)fprintf(file_o, " X%d", i+1);
    fprintf(file_o, "\n");
    fprintf(file_o, "#nu= %.3f\n", F->nu);
    fprintf(file_o, "#eval= ");
    for(i=0; i<Npar; i++)fprintf(file_o, " %.3g",eval[i]);
    fprintf(file_o, "\n");
    fprintf(file_o, "#Complete only_internal\n");
    for(i=0; i<N; i++){
      double Y=0;
      for(a=0; a<Npar; a++)Y+=F->A[a]*X[i][a];
      fprintf(file_o, "%.3f %.3f\n", Y, F->A[0]*X[i][0]);
    }
    fclose(file_o);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movq 0x58(%rbp), %rax
movl 0x50(%rbp), %eax
movl 0x48(%rbp), %eax
movq 0x40(%rbp), %rax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movss %xmm1, -0x44(%rbp)
movss %xmm2, -0x48(%rbp)
movsd %xmm3, -0x50(%rbp)
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x30(%rbp), %r8
movq 0x18(%rbp), %r9
movss -0x44(%rbp), %xmm0
movss -0x48(%rbp), %xmm1
movq 0x38(%rbp), %rbx
movq 0x40(%rbp), %r11
movl 0x48(%rbp), %r10d
movl 0x50(%rbp), %eax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x3ebe0
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl 0x48(%rbp), %eax
jge 0x3ea91
movq 0x18(%rbp), %rax
movslq -0x54(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x54(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x3ea58
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x14(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq -0x10(%rbp), %rax
movss 0x10(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
divsd -0x50(%rbp), %xmm2
movq -0x10(%rbp), %rax
movss 0x18(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
movq -0x10(%rbp), %rax
movss 0x1c(%rax), %xmm4
cvtss2sd %xmm4, %xmm4
movq -0x20(%rbp), %rdx
leaq 0x40227(%rip), %rsi     # 0x7ed0d
movb $0x5, %al
callq 0x1150
cmpl $0x0, 0x4d380(%rip)     # 0x8be74
je 0x3eb38
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl 0x48(%rbp), %eax
jge 0x3eb36
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x54(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x3de79(%rip), %rsi     # 0x7c99d
movb $0x1, %al
callq 0x1150
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x3eafd
jmp 0x3eb38
movq -0x28(%rbp), %rdi
leaq 0x3f535(%rip), %rsi     # 0x7e078
movb $0x0, %al
callq 0x1150
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)