// File: /workspace/github_c_makefile_star2_O2/lesgourg[P]class_public/build/../source/background.c
// Function: background_solve
int background_solve(
                     struct precision *ppr,
                     struct background *pba
                     ) {

  /** Summary: */

  /** - define local variables */

  /* parameters and workspace for the background_derivs function */
  struct background_parameters_and_workspace bpaw;
  /* vector of quantities to be integrated */
  double * pvecback_integration;
  /* vector of all background quantities */
  double * pvecback;
  /* comoving radius coordinate in Mpc (equal to conformal distance in flat case) */
  double comoving_radius=0.;
  /* conformal distance in Mpc (equal to comoving radius in flat case) */
  double conformal_distance;

  /* evolvers */
  extern int evolver_rk(EVOLVER_PROTOTYPE);
  extern int evolver_ndf15(EVOLVER_PROTOTYPE);
  int (*generic_evolver)(EVOLVER_PROTOTYPE) = evolver_ndf15;

  /* initial and final loga values */
  double loga_ini, loga_final;
  /* growth factor today */
  double D_today;
  /* indices for the different arrays */
  int index_loga, index_scf;
  /* what parameters are used in the output? */
  int * used_in_output;

  /* index of ncdm species */
  int n_ncdm;

  /** - setup background workspace */
  bpaw.pba = pba;
  class_alloc(pvecback,pba->bg_size*sizeof(double),pba->error_message);
  bpaw.pvecback = pvecback;

  /** - allocate vector of quantities to be integrated */
  class_alloc(pvecback_integration,pba->bi_size*sizeof(double),pba->error_message);

  /** - impose initial conditions with background_initial_conditions() */
  class_call(background_initial_conditions(ppr,pba,pvecback,pvecback_integration,&(loga_ini)),
             pba->error_message,
             pba->error_message);

  /** - Determine output vector */
  loga_final = 0.; // with our conventions, loga is in fact log(a/a_0); we integrate until today, when log(a/a_0) = 0
  pba->bt_size = ppr->background_Nloga;

  /** - allocate background tables */
  class_alloc(pba->tau_table,pba->bt_size * sizeof(double),pba->error_message);
  class_alloc(pba->z_table,pba->bt_size * sizeof(double),pba->error_message);
  class_alloc(pba->loga_table,pba->bt_size * sizeof(double),pba->error_message);

  class_alloc(pba->d2tau_dz2_table,pba->bt_size * sizeof(double),pba->error_message);
  class_alloc(pba->d2z_dtau2_table,pba->bt_size * sizeof(double),pba->error_message);

  class_alloc(pba->background_table,pba->bt_size * pba->bg_size * sizeof(double),pba->error_message);
  class_alloc(pba->d2background_dloga2_table,pba->bt_size * pba->bg_size * sizeof(double),pba->error_message);

  class_alloc(used_in_output, pba->bt_size*sizeof(int), pba->error_message);

  /** - define values of loga at which results will be stored */
  for (index_loga=0; index_loga<pba->bt_size; index_loga++) {
    pba->loga_table[index_loga] = loga_ini + index_loga*(loga_final-loga_ini)/(pba->bt_size-1);
    used_in_output[index_loga] = 1;
  }

  /** - choose the right evolver */
  switch (ppr->background_evolver) {

  case rk:
    generic_evolver = evolver_rk;
    if (pba->background_verbose > 1) {
      printf("%s\n", "Chose rk as generic_evolver");
    }
    break;

  case ndf15:
    generic_evolver = evolver_ndf15;
    if (pba->background_verbose > 1) {
      printf("%s\n", "Chose ndf15 as generic_evolver");
    }
    break;
  }

  /** - perform the integration */
  class_call(generic_evolver(background_derivs,
                             loga_ini,
                             loga_final,
                             pvecback_integration,
                             used_in_output,
                             pba->bi_size,
                             &bpaw,
                             ppr->tol_background_integration,
                             ppr->smallest_allowed_variation,
                             background_timescale, //'evaluate_timescale', required by evolver_rk but not by ndf15
                             ppr->background_integration_stepsize,
                             pba->loga_table,
                             pba->bt_size,
                             background_sources,
                             NULL, //'print_variables' in evolver_rk could be set, but, not required
                             pba->error_message),
             pba->error_message,
             pba->error_message);

  /** - recover some quantities today */
  /* -> age in Gyears */
  pba->age = pvecback_integration[pba->index_bi_time]/_Gyr_over_Mpc_;
  /* -> conformal age in Mpc */
  pba->conformal_age = pvecback_integration[pba->index_bi_tau];
  /* -> contribution of decaying dark matter and dark radiation to the critical density today: */
  if (pba->has_dcdm == _TRUE_) {
    pba->Omega0_dcdm = pvecback_integration[pba->index_bi_rho_dcdm]/pba->H0/pba->H0;
  }
  if (pba->has_dr == _TRUE_) {
    pba->Omega0_dr = pvecback_integration[pba->index_bi_rho_dr]/pba->H0/pba->H0;
  }
  /* -> scale-invariant growth rate today */
  D_today = pvecback_integration[pba->index_bi_D];

  /** - In a loop over lines, fill rest of background table for
      quantities that depend on numbers like "conformal_age" or
      "D_today" that were calculated just before */
  for (index_loga=0; index_loga < pba->bt_size; index_loga++) {

    pba->background_table[index_loga*pba->bg_size+pba->index_bg_D]*= 1./D_today;

    conformal_distance = pba->conformal_age - pba->tau_table[index_loga];
    pba->background_table[index_loga*pba->bg_size+pba->index_bg_conf_distance] = conformal_distance;

    if (pba->sgnK == 0) { comoving_radius = conformal_distance; }
    else if (pba->sgnK == 1) { comoving_radius = sin(sqrt(pba->K)*conformal_distance)/sqrt(pba->K); }
    else if (pba->sgnK == -1) { comoving_radius = sinh(sqrt(-pba->K)*conformal_distance)/sqrt(-pba->K); }

    pba->background_table[index_loga*pba->bg_size+pba->index_bg_ang_distance] = comoving_radius/(1.+pba->z_table[index_loga]);
    pba->background_table[index_loga*pba->bg_size+pba->index_bg_lum_distance] = comoving_radius*(1.+pba->z_table[index_loga]);
  }

  /** - fill tables of second derivatives (in view of spline interpolation) */
  class_call(array_spline_table_lines(pba->z_table,
                                      pba->bt_size,
                                      pba->tau_table,
                                      1,
                                      pba->d2tau_dz2_table,
                                      _SPLINE_EST_DERIV_,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);

  class_call(array_spline_table_lines(pba->tau_table,
                                      pba->bt_size,
                                      pba->z_table,
                                      1,
                                      pba->d2z_dtau2_table,
                                      _SPLINE_EST_DERIV_,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);

  class_call(array_spline_table_lines(pba->loga_table,
                                      pba->bt_size,
                                      pba->background_table,
                                      pba->bg_size,
                                      pba->d2background_dloga2_table,
                                      _SPLINE_EST_DERIV_,
                                      pba->error_message),
             pba->error_message,
             pba->error_message);

  /** - compute remaining "related parameters" */

  /**  - so-called "effective neutrino number", computed at earliest
       time in interpolation table. This should be seen as a
       definition: Neff is the equivalent number of
       instantaneously-decoupled neutrinos accounting for the
       radiation density, beyond photons */

  pba->Neff = (pba->background_table[pba->index_bg_Omega_r]
               *pba->background_table[pba->index_bg_rho_crit]
               -pba->background_table[pba->index_bg_rho_g])
    /(7./8.*pow(4./11.,4./3.)*pba->background_table[pba->index_bg_rho_g]);

  /** - send information to standard output */
  if (pba->background_verbose > 0) {
    printf(" -> age = %f Gyr\n",pba->age);
    printf(" -> conformal age = %f Mpc\n",pba->conformal_age);
    printf(" -> N_eff = %g (summed over all species that are non-relativistic at early times) \n",pba->Neff);
  }

  if (pba->background_verbose > 2) {
    if ((pba->has_dcdm == _TRUE_)&&(pba->has_dr == _TRUE_)) {
      printf("    Decaying Cold Dark Matter details: (DCDM --> DR)\n");
      printf("     -> Omega0_dcdm = %f\n",pba->Omega0_dcdm);
      printf("     -> Omega0_dr = %f\n",pba->Omega0_dr);
      printf("     -> Omega0_dr+Omega0_dcdm = %f, input value = %f\n",
             pba->Omega0_dr+pba->Omega0_dcdm,pba->Omega0_dcdmdr);
      printf("     -> Omega_ini_dcdm/Omega_b = %f\n",pba->Omega_ini_dcdm/pba->Omega0_b);
    }
    if (pba->has_scf == _TRUE_) {
      printf("    Scalar field details:\n");
      printf("     -> Omega_scf = %g, wished %g\n",
             pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_scf]/pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_crit], pba->Omega0_scf);
      if (pba->has_lambda == _TRUE_) {
        printf("     -> Omega_Lambda = %g, wished %g\n",
               pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_lambda]/pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_rho_crit], pba->Omega0_lambda);
      }
      printf("     -> parameters: [lambda, alpha, A, B] = \n");
      printf("                    [");
      for (index_scf=0; index_scf<pba->scf_parameters_size-1; index_scf++) {
        printf("%.3f, ",pba->scf_parameters[index_scf]);
      }
      printf("%.3f]\n",pba->scf_parameters[pba->scf_parameters_size-1]);
    }
  }

  /**  - store information in the background structure */
  pba->Omega0_m = pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_Omega_m];
  pba->Omega0_r = pba->background_table[(pba->bt_size-1)*pba->bg_size+pba->index_bg_Omega_r];
  pba->Omega0_de = 1. - (pba->Omega0_m + pba->Omega0_r + pba->Omega0_k);

  /* Compute the density fraction of non-free-streaming matter (in the minimal LambdaCDM model, this would be just Omega_b + Omega_cdm). This definition takes into account interating, decaying and warm dark matter, but it would need to be refined if some part of the matter component was modelled by the fluid (fld) or the scalar field (scf). */
  pba->Omega0_nfsm =  pba->Omega0_b;
  if (pba->has_cdm == _TRUE_)
    pba->Omega0_nfsm += pba->Omega0_cdm;
  if (pba->has_idm == _TRUE_)
    pba->Omega0_nfsm += pba->Omega0_idm;
  if (pba->has_dcdm == _TRUE_)
    pba->Omega0_nfsm += pba->Omega0_dcdm;
  for (n_ncdm=0;n_ncdm<pba->N_ncdm; n_ncdm++) {
    /* here we define non-free-streaming matter as: any non-relatistic species with a dimensionless ratio m/T bigger than a threshold ppr->M_nfsm_threshold; if this threshold is of the order of 10^4, this corresponds to the condition "becoming non-relativistic during radiation domination". Beware: this definition won't work in the case in which the user passes a customised p.s.d. for ncdm, such that M_ncdm is not defined.  */
    if (pba->M_ncdm[n_ncdm] > ppr->M_nfsm_threshold) {
      pba->Omega0_nfsm += pba->Omega0_ncdm[n_ncdm];
    }
  }

  free(pvecback);
  free(pvecback_integration);
  free(used_in_output);

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x848, %rsp            # imm = 0x848
movq %rsi, %rbx
movq %rdi, %r13
movq %rsi, 0x30(%rsp)
movslq 0x2b0(%rsi), %r14
leaq (,%r14,8), %rdi
callq 0x8490
testq %rax, %rax
je 0x5339e
movq %rax, %r15
movq %rax, 0x38(%rsp)
movslq 0x31c(%rbx), %r14
leaq (,%r14,8), %rdi
callq 0x8490
testq %rax, %rax
je 0x533e1
movq %rax, %r12
leaq 0x28(%rsp), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0x563a5
testl %eax, %eax
je 0x53443
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x83089(%rip), %rsi     # 0xd63f0
leaq 0x9d4ae(%rip), %rdx     # 0xf081c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x82cad(%rip), %rsi     # 0xd6034
leaq 0x9d468(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x77f, %ecx            # imm = 0x77F
movq %r14, %r8
jmp 0x53425
shll $0x3, %r14d
leaq 0x82c5b(%rip), %rsi     # 0xd6004
leaq 0xa5fec(%rip), %rdx     # 0xf939c
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82c64(%rip), %rsi     # 0xd6034
leaq 0x9d41f(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x776, %ecx            # imm = 0x776
jmp 0x53422
shll $0x3, %r14d
leaq 0x82c18(%rip), %rsi     # 0xd6004
leaq 0x9d414(%rip), %rdx     # 0xf0807
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82c21(%rip), %rsi     # 0xd6034
leaq 0x9d3dc(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x77a, %ecx            # imm = 0x77A
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x848, %rsp            # imm = 0x848
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x8(%r13), %rbp
movl %ebp, 0x2b4(%rbx)
leaq (,%rbp,8), %r14
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2c0(%rbx)
testq %rax, %rax
je 0x53576
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2c8(%rbx)
testq %rax, %rax
je 0x535ba
movq %r13, 0x10(%rsp)
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2b8(%rbx)
testq %rax, %rax
je 0x535fe
movq %rax, %r13
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2d8(%rbx)
testq %rax, %rax
je 0x53642
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2e0(%rbx)
testq %rax, %rax
je 0x53686
movslq 0x2b0(%rbx), %r14
imulq %rbp, %r14
movq %r14, (%rsp)
shlq $0x3, %r14
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2d0(%rbx)
testq %rax, %rax
je 0x536ca
movq %r14, %rdi
callq 0x8490
movq %rax, 0x2e8(%rbx)
testq %rax, %rax
je 0x53757
leaq (,%rbp,4), %rdi
callq 0x8490
testq %rax, %rax
je 0x537a1
movsd 0x28(%rsp), %xmm0
xorpd %xmm3, %xmm3
subsd %xmm0, %xmm3
leal -0x1(%rbp), %ecx
cvtsi2sd %ecx, %xmm1
xorl %ecx, %ecx
testl %ebp, %ebp
cmovlel %ecx, %ebp
cmpq %rcx, %rbp
je 0x53714
cvtsi2sd %ecx, %xmm2
mulsd %xmm3, %xmm2
divsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, (%r13,%rcx,8)
movl $0x1, (%rax,%rcx,4)
incq %rcx
jmp 0x5354a
shll $0x3, %ebp
leaq 0x82a84(%rip), %rsi     # 0xd6004
leaq 0x9d2e6(%rip), %rdx     # 0xf086d
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82a8e(%rip), %rsi     # 0xd6034
leaq 0x9d249(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x786, %ecx            # imm = 0x786
jmp 0x53396
shll $0x3, %ebp
leaq 0x82a40(%rip), %rsi     # 0xd6004
leaq 0x9d2b1(%rip), %rdx     # 0xf087c
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82a4a(%rip), %rsi     # 0xd6034
leaq 0x9d205(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x787, %ecx            # imm = 0x787
jmp 0x53396
shll $0x3, %ebp
leaq 0x829fc(%rip), %rsi     # 0xd6004
leaq 0x9d27a(%rip), %rdx     # 0xf0889
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82a06(%rip), %rsi     # 0xd6034
leaq 0x9d1c1(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x788, %ecx            # imm = 0x788
jmp 0x53396
shll $0x3, %ebp
leaq 0x829b8(%rip), %rsi     # 0xd6004
leaq 0x9d246(%rip), %rdx     # 0xf0899
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x829c2(%rip), %rsi     # 0xd6034
leaq 0x9d17d(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x78a, %ecx            # imm = 0x78A
jmp 0x53396
shll $0x3, %ebp
leaq 0x82974(%rip), %rsi     # 0xd6004
leaq 0x9d217(%rip), %rdx     # 0xf08ae
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x8297e(%rip), %rsi     # 0xd6034
leaq 0x9d139(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x78b, %ecx            # imm = 0x78B
jmp 0x53396
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0x82928(%rip), %rsi     # 0xd6004
leaq 0x9d1e0(%rip), %rdx     # 0xf08c3
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82934(%rip), %rsi     # 0xd6034
leaq 0x9d0ef(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x78d, %ecx            # imm = 0x78D
jmp 0x53396
movq 0x10(%rsp), %r13
movl 0xc(%r13), %ecx
cmpl $0x1, %ecx
je 0x537e5
testl %ecx, %ecx
jne 0x53814
leaq -0x47fe5(%rip), %r14    # 0xb750
cmpw $0x1, 0xb82(%rbx)
jle 0x5381b
movsd %xmm0, (%rsp)
movq %rax, %rbp
leaq 0x9d1a6(%rip), %rdi     # 0xf08f8
jmp 0x53805
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0x8289b(%rip), %rsi     # 0xd6004
leaq 0x9d169(%rip), %rdx     # 0xf08d9
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x828a7(%rip), %rsi     # 0xd6034
leaq 0x9d062(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x78e, %ecx            # imm = 0x78E
jmp 0x53396
shll $0x2, %ebp
leaq 0x82859(%rip), %rsi     # 0xd6004
leaq 0xa04a1(%rip), %rdx     # 0xf3c53
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0xb84, %rbx            # imm = 0xB84
leaq 0x82863(%rip), %rsi     # 0xd6034
leaq 0x9d01e(%rip), %rdx     # 0xf07f6
movq %rbx, %rdi
movl $0x790, %ecx            # imm = 0x790
jmp 0x53396
leaq -0x47a10(%rip), %r14    # 0xbddc
cmpw $0x2, 0xb82(%rbx)
jl 0x5381b
movsd %xmm0, (%rsp)
movq %rax, %rbp
leaq 0x9d10f(%rip), %rdi     # 0xf0914
callq 0x8540
movq %rbp, %rax
movsd (%rsp), %xmm0
jmp 0x5381b
leaq -0x47a3f(%rip), %r14    # 0xbddc
movl 0x31c(%rbx), %ecx
movsd 0xa28(%r13), %xmm3
movsd 0x10(%r13), %xmm2
movsd 0x18(%r13), %xmm4
movl 0x2b4(%rbx), %r11d
leaq 0xb84(%rbx), %rbp
subq $0x8, %rsp
leaq 0x37ac(%rip), %r10      # 0x56ffb
leaq 0x33d2(%rip), %rdi      # 0x56c28
leaq 0x378e(%rip), %r9       # 0x56feb
leaq 0x38(%rsp), %r8
xorpd %xmm1, %xmm1
movq %r12, %rsi
movq %rax, 0x28(%rsp)
movq %rax, %rdx
pushq %rbp
pushq $0x0
pushq %r10
pushq %r11
pushq 0x2b8(%rbx)
callq *%r14
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x538c8
leaq 0x82b5f(%rip), %rsi     # 0xd63f0
leaq 0x9d09b(%rip), %rdx     # 0xf0933
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x82783(%rip), %rsi     # 0xd6034
leaq 0x9cf3e(%rip), %rdx     # 0xf07f6
movq %rbp, %rdi
movl $0x7bc, %ecx            # imm = 0x7BC
movq %rbx, %r8
jmp 0x53425
movq %rbp, 0x18(%rsp)
movslq 0x304(%rbx), %rax
movsd (%r12,%rax,8), %xmm0
divsd 0x9b9ce(%rip), %xmm0    # 0xef2b0
movsd %xmm0, 0x190(%rbx)
movslq 0x30c(%rbx), %rax
movsd (%r12,%rax,8), %xmm0
movsd %xmm0, 0x198(%rbx)
cmpw $0x1, 0x324(%rbx)
jne 0x5392a
movslq 0x2f0(%rbx), %rax
movsd (%r12,%rax,8), %xmm0
movsd (%rbx), %xmm1
divsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b8(%rbx)
cmpw $0x1, 0x326(%rbx)
jne 0x53955
movslq 0x2f4(%rbx), %rax
movsd (%r12,%rax,8), %xmm0
movsd (%rbx), %xmm1
divsd %xmm1, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rbx)
movslq 0x310(%rbx), %rax
movsd 0x828fc(%rip), %xmm2    # 0xd6260
movapd %xmm2, %xmm3
divsd (%r12,%rax,8), %xmm3
xorl %r14d, %r14d
xorpd %xmm4, %xmm4
movsd %xmm3, (%rsp)
movslq 0x2b4(%rbx), %rsi
cmpq %rsi, %r14
jge 0x53b3f
movq 0x2d0(%rbx), %rax
movslq 0x2b0(%rbx), %rcx
movslq %r14d, %rdx
imulq %rcx, %rdx
movslq 0x298(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm3, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd 0x198(%rbx), %xmm5
movq 0x2c0(%rbx), %rcx
subsd (%rcx,%r14,8), %xmm5
movslq 0x284(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd %xmm5, (%rax,%rdx,8)
movl 0x1a8(%rbx), %eax
cmpl $-0x1, %eax
je 0x53a1a
testl %eax, %eax
je 0x53a11
cmpl $0x1, %eax
jne 0x53ada
movsd 0x1a0(%rbx), %xmm0
ucomisd 0x82852(%rip), %xmm0    # 0xd6258
jb 0x53a84
sqrtsd %xmm0, %xmm0
jmp 0x53a95
movapd %xmm5, %xmm4
jmp 0x53ada
movsd 0x1a0(%rbx), %xmm0
movsd 0x85a9e(%rip), %xmm1    # 0xd94c8
ucomisd %xmm0, %xmm1
xorpd 0x827fa(%rip), %xmm0    # 0xd6230
jb 0x53a3e
sqrtsd %xmm0, %xmm0
jmp 0x53a4f
movsd %xmm5, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm5
mulsd %xmm0, %xmm5
movapd %xmm5, %xmm0
callq 0x8390
movapd %xmm0, %xmm4
movsd 0x1a0(%rbx), %xmm0
movsd 0x85a58(%rip), %xmm1    # 0xd94c8
ucomisd %xmm0, %xmm1
xorpd 0x827b4(%rip), %xmm0    # 0xd6230
jb 0x53ab8
sqrtsd %xmm0, %xmm0
jmp 0x53ac9
movsd %xmm5, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm5
mulsd %xmm0, %xmm5
movapd %xmm5, %xmm0
callq 0x80a0
movapd %xmm0, %xmm4
movsd 0x1a0(%rbx), %xmm0
ucomisd 0x827a2(%rip), %xmm0    # 0xd6258
jae 0x53a7e
movsd %xmm4, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm4
movsd 0x8278f(%rip), %xmm2    # 0xd6260
movsd (%rsp), %xmm3
divsd %xmm0, %xmm4
movq 0x2c8(%rbx), %rax
movq 0x2d0(%rbx), %rcx
movsd (%rax,%r14,8), %xmm0
addsd %xmm2, %xmm0
movapd %xmm4, %xmm1
divsd %xmm0, %xmm1
movslq 0x2b0(%rbx), %rdx
movslq %r14d, %rsi
imulq %rdx, %rsi
movslq 0x288(%rbx), %rdx
addq %rsi, %rdx
movsd %xmm1, (%rcx,%rdx,8)
movsd (%rax,%r14,8), %xmm0
addsd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movslq 0x28c(%rbx), %rax
movslq %esi, %rdx
addq %rax, %rdx
movsd %xmm0, (%rcx,%rdx,8)
incq %r14
jmp 0x5397a
movq 0x2c0(%rbx), %rdx
movq 0x2c8(%rbx), %rdi
movq 0x2d8(%rbx), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
movq 0x20(%rsp), %r14
pushq %r14
callq 0x125a5
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0x53bae
leaq 0x82876(%rip), %rsi     # 0xd63f0
leaq 0x9cef7(%rip), %rdx     # 0xf0a78
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8249a(%rip), %rsi     # 0xd6034
leaq 0x9cc55(%rip), %rdx     # 0xf07f6
movq %r14, %rdi
movl $0x7e8, %ecx            # imm = 0x7E8
jmp 0x53c8a
movq 0x2c0(%rbx), %rdi
movl 0x2b4(%rbx), %esi
movq 0x2c8(%rbx), %rdx
movq 0x2e0(%rbx), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
pushq %r14
callq 0x125a5
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0x53c1b
leaq 0x82806(%rip), %rsi     # 0xd63f0
leaq 0x9cefc(%rip), %rdx     # 0xf0aed
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8242a(%rip), %rsi     # 0xd6034
leaq 0x9cbe5(%rip), %rdx     # 0xf07f6
movq %r14, %rdi
movl $0x7f2, %ecx            # imm = 0x7F2
jmp 0x53c8a
movq 0x2b8(%rbx), %rdi
movl 0x2b0(%rbx), %ecx
movl 0x2b4(%rbx), %esi
movq 0x2d0(%rbx), %rdx
movq 0x2e8(%rbx), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %r9d
pushq %r14
callq 0x125a5
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0x53c99
leaq 0x82795(%rip), %rsi     # 0xd63f0
leaq 0x9cf00(%rip), %rdx     # 0xf0b62
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x823b9(%rip), %rsi     # 0xd6034
leaq 0x9cb74(%rip), %rdx     # 0xf07f6
movq %r14, %rdi
movl $0x7fc, %ecx            # imm = 0x7FC
movq %rbx, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x5342f
movq 0x2d0(%rbx), %rax
movslq 0x278(%rbx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x27c(%rbx), %rcx
movslq 0x214(%rbx), %rdx
mulsd (%rax,%rcx,8), %xmm0
movsd (%rax,%rdx,8), %xmm1
subsd %xmm1, %xmm0
mulsd 0x9b5e8(%rip), %xmm1    # 0xef2b8
divsd %xmm1, %xmm0
movsd %xmm0, 0x1b0(%rbx)
cmpw $0x0, 0xb82(%rbx)
jle 0x53ef4
movsd 0x190(%rbx), %xmm0
leaq 0x9cefd(%rip), %rdi     # 0xf0bf6
movb $0x1, %al
callq 0x8030
movsd 0x198(%rbx), %xmm0
leaq 0x9cef9(%rip), %rdi     # 0xf0c08
movb $0x1, %al
callq 0x8030
movsd 0x1b0(%rbx), %xmm0
leaq 0x9ceff(%rip), %rdi     # 0xf0c24
movb $0x1, %al
callq 0x8030
cmpw $0x3, 0xb82(%rbx)
jl 0x53ef4
cmpw $0x1, 0x324(%rbx)
jne 0x53dc1
cmpw $0x1, 0x326(%rbx)
jne 0x53dc1
leaq 0x9d915(%rip), %rdi     # 0xf166a
callq 0x8540
movsd 0x1b8(%rbx), %xmm0
leaq 0x9cf0f(%rip), %rdi     # 0xf0c78
movb $0x1, %al
callq 0x8030
movsd 0x1c0(%rbx), %xmm0
leaq 0x9cf13(%rip), %rdi     # 0xf0c92
movb $0x1, %al
callq 0x8030
movsd 0x50(%rbx), %xmm1
movsd 0x1c0(%rbx), %xmm0
addsd 0x1b8(%rbx), %xmm0
leaq 0x9cf08(%rip), %rdi     # 0xf0caa
movb $0x2, %al
callq 0x8030
movsd 0x58(%rbx), %xmm0
divsd 0x20(%rbx), %xmm0
leaq 0x9cf26(%rip), %rdi     # 0xf0ce0
movb $0x1, %al
callq 0x8030
cmpw $0x1, 0x328(%rbx)
jne 0x53ef4
leaq 0x9d8c9(%rip), %rdi     # 0xf169f
callq 0x8540
movq 0x2d0(%rbx), %rax
movslq 0x2b4(%rbx), %rcx
decq %rcx
movslq 0x2b0(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x254(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x27c(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
divsd (%rax,%rdx,8), %xmm0
movsd 0x108(%rbx), %xmm1
leaq 0x9cede(%rip), %rdi     # 0xf0d05
movb $0x2, %al
callq 0x8030
cmpw $0x1, 0x32c(%rbx)
jne 0x53e8b
movq 0x2d0(%rbx), %rax
movslq 0x2b4(%rbx), %rcx
decq %rcx
movslq 0x2b0(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x224(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x27c(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
divsd (%rax,%rdx,8), %xmm0
movsd 0xf8(%rbx), %xmm1
leaq 0x9cea4(%rip), %rdi     # 0xf0d28
movb $0x2, %al
callq 0x8030
leaq 0x9d827(%rip), %rdi     # 0xf16b9
callq 0x8540
leaq 0x9ceb0(%rip), %rdi     # 0xf0d4e
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x8030
leaq 0x9ceb5(%rip), %r14     # 0xf0d64
movslq 0x168(%rbx), %rax
leaq -0x1(%rax), %rdx
movq 0x148(%rbx), %rcx
cmpq %rdx, %r13
jge 0x53edb
movsd (%rcx,%r13,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x8030
incq %r13
jmp 0x53eaf
movsd -0x8(%rcx,%rax,8), %xmm0
leaq 0x9ce83(%rip), %rdi     # 0xf0d6b
movb $0x1, %al
callq 0x8030
movq 0x10(%rsp), %r13
movq 0x2d0(%rbx), %rax
movslq 0x2b4(%rbx), %rcx
decq %rcx
movslq 0x2b0(%rbx), %rdx
imulq %rcx, %rdx
movslq 0x280(%rbx), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1c8(%rbx)
movslq 0x278(%rbx), %rcx
movslq %edx, %rdx
addq %rcx, %rdx
movsd (%rax,%rdx,8), %xmm1
movsd %xmm1, 0x1d0(%rbx)
addsd %xmm1, %xmm0
addsd 0xf0(%rbx), %xmm0
movsd 0x8230b(%rip), %xmm1    # 0xd6260
subsd %xmm0, %xmm1
movsd %xmm1, 0x1d8(%rbx)
movsd 0x20(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x320(%rbx)
jne 0x53f85
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x322(%rbx)
jne 0x53f9c
addsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
cmpw $0x1, 0x324(%rbx)
jne 0x53fb6
addsd 0x1b8(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
movl 0x70(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x53ff5
movq 0x90(%rbx), %rdx
movsd (%rdx,%rcx,8), %xmm1
ucomisd 0x88(%r13), %xmm1
jbe 0x53ff0
movq 0xa0(%rbx), %rdx
addsd (%rdx,%rcx,8), %xmm0
movsd %xmm0, 0x1e0(%rbx)
incq %rcx
jmp 0x53fc0
movq %r15, %rdi
callq 0x8430
movq %r12, %rdi
callq 0x8430
movq 0x20(%rsp), %rdi
callq 0x8430
xorl %ebp, %ebp
jmp 0x5342f