// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/background.c
// Function: background_initial_conditions
int background_initial_conditions(
                                  struct precision *ppr,
                                  struct background *pba,
                                  double * pvecback, /* vector with argument pvecback[index_bg] (must be already allocated, normal format is sufficient) */
                                  double * pvecback_integration, /* vector with argument pvecback_integration[index_bi] (must be already allocated with size pba->bi_size) */
                                  double * loga_ini
                                  ) {

  /** Summary: */

  /** - define local variables */

  /* scale factor */
  double a;

  double rho_ncdm, p_ncdm, rho_ncdm_rel_tot=0.;
  double f,Omega_rad, rho_rad;
  int counter,is_early_enough,n_ncdm;
  double scf_lambda;
  double rho_fld_today;
  double w_fld,dw_over_da_fld,integral_fld;

  /** - fix initial value of \f$ a \f$ */
  a = ppr->a_ini_over_a_today_default;

  /**  If we have ncdm species, perhaps we need to start earlier
       than the standard value for the species to be relativistic.
       This could happen for some WDM models.
  */

  if (pba->has_ncdm == _TRUE_) {

    for (counter=0; counter < _MAX_IT_; counter++) {

      is_early_enough = _TRUE_;
      rho_ncdm_rel_tot = 0.;

      for (n_ncdm=0; n_ncdm<pba->N_ncdm; n_ncdm++) {


        class_call(background_ncdm_momenta(pba->q_ncdm_bg[n_ncdm],
                                           pba->w_ncdm_bg[n_ncdm],
                                           pba->q_size_ncdm_bg[n_ncdm],
                                           pba->M_ncdm[n_ncdm],
                                           pba->factor_ncdm[n_ncdm],
                                           1./a-1.0,
                                           NULL,
                                           &rho_ncdm,
                                           &p_ncdm,
                                           NULL,
                                           NULL),
                   pba->error_message,
                   pba->error_message);
        rho_ncdm_rel_tot += 3.*p_ncdm;
        if (fabs(p_ncdm/rho_ncdm-1./3.)>ppr->tol_ncdm_initial_w) {
          is_early_enough = _FALSE_;
        }
      }
      if (is_early_enough == _TRUE_) {
        break;
      }
      else {
        a *= _SCALE_BACK_;
      }
    }
    class_test(counter == _MAX_IT_,
               pba->error_message,
               "Search for initial scale factor a such that all ncdm species are relativistic failed.");
  }

  /* Set initial values of {B} variables: */
  Omega_rad = pba->Omega0_g;
  if (pba->has_ur == _TRUE_) {
    Omega_rad += pba->Omega0_ur;
  }
  if (pba->has_idr == _TRUE_) {
    Omega_rad += pba->Omega0_idr;
  }
  rho_rad = Omega_rad*pow(pba->H0,2)/pow(a,4);
  if (pba->has_ncdm == _TRUE_) {
    /** - We must add the relativistic contribution from NCDM species */
    rho_rad += rho_ncdm_rel_tot;
  }
  if (pba->has_dcdm == _TRUE_) {
    /* Remember that the critical density today in CLASS conventions is H0^2 */
    pvecback_integration[pba->index_bi_rho_dcdm] =
      pba->Omega_ini_dcdm*pba->H0*pba->H0*pow(a,-3);
    if (pba->background_verbose > 3)
      printf("Density is %g. Omega_ini=%g\n",pvecback_integration[pba->index_bi_rho_dcdm],pba->Omega_ini_dcdm);
  }

  if (pba->has_dr == _TRUE_) {
    if (pba->has_dcdm == _TRUE_) {
      /**  - f is the critical density fraction of DR. The exact solution is:
       *
       * `f = -Omega_rad+pow(pow(Omega_rad,3./2.)+0.5*pow(a,6)*pvecback_integration[pba->index_bi_rho_dcdm]*pba->Gamma_dcdm/pow(pba->H0,3),2./3.);`
       *
       * but it is not numerically stable for very small f which is always the case.
       * Instead we use the Taylor expansion of this equation, which is equivalent to
       * ignoring f(a) in the Hubble rate.
       */
      f = 1./3.*pow(a,6)*pvecback_integration[pba->index_bi_rho_dcdm]*pba->Gamma_dcdm/pow(pba->H0,3)/sqrt(Omega_rad);
      pvecback_integration[pba->index_bi_rho_dr] = f*pba->H0*pba->H0/pow(a,4);
    }
    else{
      /** There is also a space reserved for a future case where dr is not sourced by dcdm */
      pvecback_integration[pba->index_bi_rho_dr] = 0.0;
    }
  }

  if (pba->has_fld == _TRUE_) {

    /* rho_fld today */
    rho_fld_today = pba->Omega0_fld * pow(pba->H0,2);

    /* integrate rho_fld(a) from a_ini to a_0, to get rho_fld(a_ini) given rho_fld(a0) */
    class_call(background_w_fld(pba,a,&w_fld,&dw_over_da_fld,&integral_fld), pba->error_message, pba->error_message);

    /* Note: for complicated w_fld(a) functions with no simple
       analytic integral, this is the place were you should compute
       numerically the simple 1d integral [int_{a_ini}^{a_0} 3
       [(1+w_fld)/a] da] (e.g. with the Romberg method?) instead of
       calling background_w_fld */

    /* rho_fld at initial time */
    pvecback_integration[pba->index_bi_rho_fld] = rho_fld_today * exp(integral_fld);
    printf("pba->Omega0_fld %e  exp(integral_fld) %e\n", pba->Omega0_fld,exp(integral_fld));
    printf("pba->Omega0_ur %e  exp(integral_fld) %e\n", pba->Omega0_ur);

  }

  /** - Fix initial value of \f$ \phi, \phi' \f$
   * set directly in the radiation attractor => fixes the units in terms of rho_ur
   *
   * TODO:
   * - There seems to be some small oscillation when it starts.
   * - Check equations and signs. Sign of phi_prime?
   * - is rho_ur all there is early on?
   */
  if (pba->has_scf == _TRUE_) {
    if (pba->attractor_ic_scf == _TRUE_) {
      scf_lambda = pba->scf_parameters[0];

      pvecback_integration[pba->index_bi_phi_scf] = -1/scf_lambda*
        log(rho_rad*4./(3*pow(scf_lambda,2)-12))*pba->phi_ini_scf;
      if (3.*pow(scf_lambda,2)-12. < 0) {
        /** - --> If there is no attractor solution for scf_lambda, assign some value. Otherwise would give a nan.*/
        pvecback_integration[pba->index_bi_phi_scf] = 1./scf_lambda;//seems to do the work
        if (pba->background_verbose > 0) {
          printf(" No attractor IC for lambda = %.3e ! \n ",scf_lambda);
        }
      }
      pvecback_integration[pba->index_bi_phi_prime_scf] = 2.*a*sqrt(V_scf(pba,pvecback_integration[pba->index_bi_phi_scf]))*pba->phi_prime_ini_scf;
    }
    else {
      // printf("Not using attractor initial conditions\n");
      /** - --> If no attractor initial conditions are assigned, gets the provided ones. */
      pvecback_integration[pba->index_bi_phi_scf] = pba->phi_ini_scf;
      pvecback_integration[pba->index_bi_phi_prime_scf] = pba->phi_prime_ini_scf;
    }

    if(pba->scf_potential == phi_2n){
      if(pba->V0_phi2n == 0.0){
        double fa = pow(10,pba->log10_fraction_axion_ac);
        double un_plus_zc = 1/pow(10,pba->log10_axion_ac);
        class_test(fa==1,pba->error_message,"f_axion cannot be strictly 1");
        double Omega_rad = 2.47310e-5*1.445;//hardcoded for simplicity; in any case this is an approximate guess for f(zc) and zc
        double Omega_LCDM=(pba->Omega0_b+pba->Omega0_cdm)*pow(un_plus_zc,3)+Omega_rad*pow(un_plus_zc,4);
        double Omega_tot=Omega_LCDM/(1-fa);
        double H = pba->H0*pow(Omega_tot,0.5);
        double Vphi =3*fa*H*H;//in CLASS, V is in unit of Mpl^2/Mpc^2. no extra factor Mpl^2.
        double ratio = 3/fa;//units of 1/Mpl^2
        double phi_i=pow(ratio/(2*pba->n_axion*(2*pba->n_axion-1)),-0.5); //units of Mpl
        pba->V0_phi2n = Vphi/pow(phi_i,2*pba->n_axion);
        pvecback_integration[pba->index_bi_phi_scf] = phi_i;
        pba->phi_ini_scf = phi_i;
        // printf("phi_i %e pba->V0_phi2n  %e v2 %e\n",phi_i,pba->V0_phi2n,H*H*9/(2*pba->n_axion*(2*pba->n_axion-1)*pow(phi_i,2*pba->n_axion-2))); //check that the 2 ways of calculating V0 agrees.
        pvecback_integration[pba->index_bi_phi_prime_scf] =  pba->phi_prime_ini_scf;
      }else{
        // printf("phi_i %e pba->V0_phi2n %e \n",pba->phi_ini_scf,pba->V0_phi2n); //check that the 2 ways of calculating V0 agrees.

        pvecback_integration[pba->index_bi_phi_scf] = pba->phi_ini_scf;
        pvecback_integration[pba->index_bi_phi_prime_scf] =  pba->phi_prime_ini_scf;
      }

    }

    class_test(!isfinite(pvecback_integration[pba->index_bi_phi_scf]) ||
               !isfinite(pvecback_integration[pba->index_bi_phi_scf]),
               pba->error_message,
               "initial phi = %e phi_prime = %e -> check initial conditions",
               pvecback_integration[pba->index_bi_phi_scf],
               pvecback_integration[pba->index_bi_phi_scf]);

    pvecback_integration[pba->index_bi_rho_scf] = 0; //VP: in axiclass we initialise the fluid scf variable to 0, we will update its value when needed at the time of the switch.
  }
  // printf("Calling background functions.\n");//print_trigger
  /* Infer pvecback from pvecback_integration */
  class_call(background_functions(pba, a, pvecback_integration, normal_info, pvecback),
             pba->error_message,
             pba->error_message);

  /* Just checking that our initial time indeed is deep enough in the radiation
     dominated regime */
  class_test(fabs(pvecback[pba->index_bg_Omega_r]-1.) > ppr->tol_initial_Omega_r,

             pba->error_message,
             "Omega_r = %e, not close enough to 1. Decrease a_ini_over_a_today_default in order to start from radiation domination.",
             pvecback[pba->index_bg_Omega_r]);

  /** - compute initial proper time, assuming radiation-dominated
      universe since Big Bang and therefore \f$ t=1/(2H) \f$ (good
      approximation for most purposes) */

  class_test(pvecback[pba->index_bg_H] <= 0.,
             pba->error_message,
             "H = %e instead of strictly positive",pvecback[pba->index_bg_H]);

  pvecback_integration[pba->index_bi_time] = 1./(2.* pvecback[pba->index_bg_H]);

  /** - compute initial conformal time, assuming radiation-dominated
      universe since Big Bang and therefore \f$ \tau=1/(aH) \f$
      (good approximation for most purposes) */
  pvecback_integration[pba->index_bi_tau] = 1./(a * pvecback[pba->index_bg_H]);

  /** - compute initial sound horizon, assuming \f$ c_s=1/\sqrt{3} \f$ initially */
  pvecback_integration[pba->index_bi_rs] = pvecback_integration[pba->index_bi_tau]/sqrt(3.);

  /** - set initial value of D and D' in RD. D and D' need only be set up to an overall constant, since they will later be re-normalized. From Ma&Bertschinger, one can derive D ~ (ktau)^2 at early times, from which one finds D'/D = 2 aH (assuming aH=1/tau during RD) */
  pvecback_integration[pba->index_bi_D] = 1.;
  pvecback_integration[pba->index_bi_D_prime] = 2.*a*pvecback[pba->index_bg_H];

  /** - return the value finally chosen for the initial log(a) */
  *loga_ini = log(a);

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1088, %rsp           # imm = 0x1088
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, 0x40(%rsp)
movsd (%rdi), %xmm0
cmpw $0x1, 0x4be(%rsi)
jne 0x5fc54
movq %r12, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movq %r14, 0x38(%rsp)
xorl %r12d, %r12d
leaq 0x68(%rsp), %rbp
leaq 0x60(%rsp), %r14
xorl %eax, %eax
cmpl $0x2710, %eax           # imm = 0x2710
je 0x5fc60
movl %eax, 0x28(%rsp)
movsd 0x85711(%rip), %xmm1    # 0xe5260
divsd %xmm0, %xmm1
addsd 0x85c8d(%rip), %xmm1    # 0xe57e8
movsd %xmm1, 0x20(%rsp)
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
pushq $0x1
popq %r15
movsd %xmm0, 0x30(%rsp)
movslq 0x248(%rbx), %rax
cmpq %rax, %r13
movsd %xmm1, 0x18(%rsp)
jge 0x5fc37
movq 0x4d8(%rbx), %rax
movq (%rax,%r13,8), %rdi
movq 0x4e0(%rbx), %rax
movq (%rax,%r13,8), %rsi
movq 0x500(%rbx), %rax
movl (%rax,%r13,4), %edx
movq 0x270(%rbx), %rax
movsd (%rax,%r13,8), %xmm0
movq 0x510(%rbx), %rax
movsd (%rax,%r13,8), %xmm1
xorps %xmm2, %xmm2
movups %xmm2, (%rsp)
movsd 0x20(%rsp), %xmm2
xorl %ecx, %ecx
movq %rbp, %r8
movq %r14, %r9
callq 0x59e8b
movsd 0x60(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd 0x86b59(%rip), %xmm1    # 0xe6748
movsd 0x18(%rsp), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x18(%rsp)
movsd 0x18(%rsp), %xmm1
divsd 0x68(%rsp), %xmm0
addsd 0x89ded(%rip), %xmm0    # 0xe9a00
andpd 0x85625(%rip), %xmm0    # 0xe5240
movq 0x40(%rsp), %rax
ucomisd 0x50(%rax), %xmm0
movsd 0x30(%rsp), %xmm0
cmoval %r12d, %r15d
incq %r13
jmp 0x5fb72
cmpl $0x1, %r15d
je 0x5fccb
mulsd 0x85647(%rip), %xmm0    # 0xe5290
movl 0x28(%rsp), %eax
incl %eax
jmp 0x5fb38
xorpd %xmm1, %xmm1
movsd %xmm1, 0x18(%rsp)
jmp 0x5fcda
leaq 0xa3d1d(%rip), %rsi     # 0x103984
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x85402(%rip), %rsi     # 0xe5082
leaq 0x88710(%rip), %rdx     # 0xe8397
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x8538a(%rip), %rsi     # 0xe5034
leaq 0xa3cb5(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xa9e, %ecx            # imm = 0xA9E
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
jmp 0x605be
movq 0x38(%rsp), %r14
movq 0x50(%rsp), %r15
movq 0x48(%rsp), %r12
movsd 0x10(%rbx), %xmm1
cmpw $0x1, 0x4c4(%rbx)
jne 0x5fcf1
addsd 0xe8(%rbx), %xmm1
cmpw $0x1, 0x4c6(%rbx)
jne 0x5fd03
addsd 0xf8(%rbx), %xmm1
movsd (%rbx), %xmm2
mulsd %xmm2, %xmm2
movsd %xmm1, 0x28(%rsp)
mulsd %xmm1, %xmm2
movsd %xmm2, 0x20(%rsp)
movsd 0x886d5(%rip), %xmm1    # 0xe83f8
movsd %xmm0, 0x30(%rsp)
callq 0x8650
movsd 0x20(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movzwl 0x4b8(%rbx), %eax
cmpw $0x1, 0x4be(%rbx)
jne 0x5fd53
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
cmpw $0x1, %ax
jne 0x5fdbf
movsd (%rbx), %xmm0
movsd 0x120(%rbx), %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x886bf(%rip), %xmm1    # 0xe8440
movsd 0x30(%rsp), %xmm0
callq 0x8650
mulsd 0x18(%rsp), %xmm0
movslq 0x480(%rbx), %rax
movsd %xmm0, (%r15,%rax,8)
cmpw $0x4, 0xd1a(%rbx)
jl 0x5fdbf
movsd 0x120(%rbx), %xmm1
leaq 0xa3c22(%rip), %rdi     # 0x1039da
movb $0x2, %al
callq 0x8030
cmpw $0x1, 0x4ba(%rbx)
movsd 0x30(%rsp), %xmm0
jne 0x5fe9d
xorpd %xmm1, %xmm1
cmpw $0x1, 0x4b8(%rbx)
jne 0x5fe90
movsd 0x86863(%rip), %xmm1    # 0xe6650
callq 0x8650
mulsd 0x8860e(%rip), %xmm0    # 0xe8408
movslq 0x480(%rbx), %rax
mulsd (%r15,%rax,8), %xmm0
mulsd 0x110(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd (%rbx), %xmm0
movsd 0x86927(%rip), %xmm1    # 0xe6748
callq 0x8650
movsd 0x18(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
xorpd %xmm1, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x5fe4c
sqrtsd %xmm0, %xmm0
jmp 0x5fe51
callq 0x82d0
movsd 0x18(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd (%rbx), %xmm0
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x88583(%rip), %xmm1    # 0xe83f8
movsd 0x30(%rsp), %xmm0
callq 0x8650
movsd 0x18(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
movslq 0x484(%rbx), %rax
movsd %xmm1, (%r15,%rax,8)
pushq $0x1
popq %rbp
cmpw $0x1, 0x4c2(%rbx)
jne 0x5ffab
movsd (%rbx), %xmm1
movsd %xmm1, 0x28(%rsp)
movsd 0x38(%rbx), %xmm1
movsd %xmm1, 0x18(%rsp)
leaq 0x78(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x58(%rsp), %rcx
movq %rbx, %rdi
callq 0x5a0e7
testl %eax, %eax
je 0x5ff23
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x85504(%rip), %rsi     # 0xe53f0
leaq 0xa3b04(%rip), %rdx     # 0x1039f7
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x85125(%rip), %rsi     # 0xe5034
leaq 0xa3a50(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xacf, %ecx            # imm = 0xACF
jmp 0x603ba
movsd 0x28(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd 0x18(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
callq 0x86a0
mulsd 0x18(%rsp), %xmm0
movslq 0x488(%rbx), %rax
movsd %xmm0, (%r15,%rax,8)
movsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm1
leaq 0xa3ab2(%rip), %rdi     # 0x103a34
movsd 0x18(%rsp), %xmm0
movb $0x2, %al
callq 0x8030
movsd 0xe8(%rbx), %xmm0
leaq 0xa3ac0(%rip), %rdi     # 0x103a5e
movb $0x1, %al
callq 0x8030
movsd 0x30(%rsp), %xmm0
cmpw $0x1, 0x4bc(%rbx)
jne 0x60363
cmpw $0x1, 0x148(%rbx)
jne 0x600ad
movq 0x168(%rbx), %rax
movsd (%rax), %xmm1
movsd 0x8580e(%rip), %xmm3    # 0xe57e8
movsd 0x20(%rsp), %xmm0
mulsd 0x88410(%rip), %xmm0    # 0xe83f8
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd 0x86750(%rip), %xmm2    # 0xe6748
movsd %xmm1, 0x28(%rsp)
divsd %xmm1, %xmm3
movsd %xmm3, 0x20(%rsp)
addsd 0xa19c8(%rip), %xmm2    # 0x1019d8
movsd %xmm2, 0x18(%rsp)
divsd %xmm2, %xmm0
callq 0x82e0
mulsd 0x20(%rsp), %xmm0
mulsd 0x150(%rbx), %xmm0
movslq 0x490(%rbx), %rax
movsd %xmm0, (%r15,%rax,8)
xorpd %xmm1, %xmm1
ucomisd 0x18(%rsp), %xmm1
jbe 0x60085
movsd 0x85212(%rip), %xmm0    # 0xe5260
divsd 0x28(%rsp), %xmm0
movsd %xmm0, (%r15,%rax,8)
cmpw $0x0, 0xd1a(%rbx)
jle 0x60085
leaq 0xa3a1c(%rip), %rdi     # 0x103a87
movsd 0x28(%rsp), %xmm0
movb $0x1, %al
callq 0x8030
movslq 0x490(%rbx), %rax
movsd (%r15,%rax,8), %xmm0
movsd 0x30(%rsp), %xmm1
addsd %xmm1, %xmm1
movsd %xmm1, 0x18(%rsp)
movq %rbx, %rdi
callq 0x59b15
ucomisd 0x851b3(%rip), %xmm0    # 0xe5258
jb 0x600cc
sqrtsd %xmm0, %xmm0
jmp 0x600d1
movsd 0x150(%rbx), %xmm0
movslq 0x490(%rbx), %rax
movsd %xmm0, (%r15,%rax,8)
movsd 0x158(%rbx), %xmm0
jmp 0x600e7
callq 0x82d0
movsd 0x18(%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
mulsd 0x158(%rbx), %xmm0
movslq 0x494(%rbx), %rcx
movsd %xmm0, (%r15,%rcx,8)
cmpl $0x3, 0x160(%rbx)
jne 0x602a4
movsd 0x1c0(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x602ad
jp 0x602ad
movsd 0x1d0(%rbx), %xmm1
movsd 0x856c3(%rip), %xmm0    # 0xe57f0
callq 0x8650
movsd %xmm0, 0x18(%rsp)
movsd 0x1b8(%rbx), %xmm1
movsd 0x856a8(%rip), %xmm0    # 0xe57f0
callq 0x8650
movsd 0x18(%rsp), %xmm1
ucomisd 0x85105(%rip), %xmm1    # 0xe5260
jne 0x60163
jnp 0x6055b
movsd 0x850f5(%rip), %xmm2    # 0xe5260
divsd %xmm0, %xmm2
movsd %xmm2, 0x38(%rsp)
movsd 0x20(%rbx), %xmm0
addsd 0x28(%rbx), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x865bb(%rip), %xmm1    # 0xe6748
movapd %xmm2, %xmm0
callq 0x8650
movsd %xmm0, 0x28(%rsp)
movsd 0x88254(%rip), %xmm1    # 0xe83f8
movsd 0x38(%rsp), %xmm0
callq 0x8650
mulsd 0x898b1(%rip), %xmm0    # 0xe9a68
movsd 0x28(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd 0x85091(%rip), %xmm1    # 0xe5260
subsd 0x18(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd (%rbx), %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x85ac5(%rip), %xmm1    # 0xe5cb0
callq 0x8650
mulsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm3
movapd %xmm3, %xmm2
movsd 0x86540(%rip), %xmm1    # 0xe6748
mulsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x20(%rsp)
divsd %xmm3, %xmm1
movapd %xmm1, %xmm0
movsd 0x210(%rbx), %xmm2
addsd %xmm2, %xmm2
movsd 0x855b2(%rip), %xmm1    # 0xe57e8
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x881ee(%rip), %xmm1    # 0xe8438
callq 0x8650
movsd %xmm0, 0x18(%rsp)
movsd 0x210(%rbx), %xmm1
addsd %xmm1, %xmm1
callq 0x8650
movsd 0x20(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x1c0(%rbx)
movslq 0x490(%rbx), %rax
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%r15,%rax,8)
movsd %xmm0, 0x150(%rbx)
movsd 0x158(%rbx), %xmm0
movslq 0x494(%rbx), %rcx
jmp 0x602ca
movslq 0x490(%rbx), %rax
jmp 0x602d0
movsd 0x150(%rbx), %xmm0
movslq 0x490(%rbx), %rax
movsd %xmm0, (%r15,%rax,8)
movsd 0x158(%rbx), %xmm0
movsd %xmm0, (%r15,%rcx,8)
movq (%r15,%rax,8), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x60351
leaq 0xa37bf(%rip), %rsi     # 0x103ab5
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movdqa %xmm0, %xmm1
movb $0x2, %al
callq 0x2e014
leaq 0x84d6f(%rip), %rsi     # 0xe5082
leaq 0xa37d7(%rip), %rdx     # 0x103af1
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x84cf7(%rip), %rsi     # 0xe5034
leaq 0xa3622(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xb1b, %ecx            # imm = 0xB1B
jmp 0x605b4
movslq 0x48c(%rbx), %rax
andq $0x0, (%r15,%rax,8)
movsd 0x30(%rsp), %xmm0
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r12, %rcx
callq 0x58c54
testl %eax, %eax
je 0x603c2
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x85068(%rip), %rsi     # 0xe53f0
leaq 0xa37d3(%rip), %rdx     # 0x103b62
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x84c89(%rip), %rsi     # 0xe5034
leaq 0xa35b4(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xb23, %ecx            # imm = 0xB23
movq %r14, %r8
jmp 0x605b7
movslq 0x404(%rbx), %rax
movsd (%r12,%rax,8), %xmm0
movsd 0x85411(%rip), %xmm1    # 0xe57e8
addsd %xmm0, %xmm1
andpd 0x84e5d(%rip), %xmm1    # 0xe5240
movq 0x40(%rsp), %rax
ucomisd 0x20(%rax), %xmm1
jbe 0x6044d
leaq 0xa37b6(%rip), %rsi     # 0x103bac
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x84c73(%rip), %rsi     # 0xe5082
leaq 0xa380c(%rip), %rdx     # 0x103c22
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x84bfb(%rip), %rsi     # 0xe5034
leaq 0xa3526(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xb2b, %ecx            # imm = 0xB2B
jmp 0x605b4
movslq 0x384(%rbx), %rax
movsd (%r12,%rax,8), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x60500
addsd %xmm0, %xmm0
movsd 0x84dec(%rip), %xmm1    # 0xe5260
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
movslq 0x498(%rbx), %rcx
movsd %xmm2, (%r15,%rcx,8)
movsd (%r12,%rax,8), %xmm2
movsd 0x30(%rsp), %xmm0
mulsd %xmm0, %xmm2
divsd %xmm2, %xmm1
movslq 0x4a0(%rbx), %rcx
movsd %xmm1, (%r15,%rcx,8)
divsd 0xa152e(%rip), %xmm1    # 0x1019e0
movslq 0x49c(%rbx), %rcx
movsd %xmm1, (%r15,%rcx,8)
movslq 0x4a4(%rbx), %rcx
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, (%r15,%rcx,8)
movapd %xmm0, %xmm1
addsd %xmm0, %xmm1
mulsd (%r12,%rax,8), %xmm1
movslq 0x4a8(%rbx), %rax
movsd %xmm1, (%r15,%rax,8)
callq 0x82e0
movsd %xmm0, (%r14)
xorl %ebp, %ebp
jmp 0x605be
leaq 0xa375f(%rip), %rsi     # 0x103c66
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x84b62(%rip), %rsi     # 0xe5082
leaq 0xa3763(%rip), %rdx     # 0x103c8a
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x84aea(%rip), %rsi     # 0xe5034
leaq 0xa3415(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xb33, %ecx            # imm = 0xB33
jmp 0x605b4
leaq 0x8afec(%rip), %rsi     # 0xeb54e
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x84b07(%rip), %rsi     # 0xe5082
leaq 0xa352d(%rip), %rdx     # 0x103aaf
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0xd1c, %rbx            # imm = 0xD1C
leaq 0x84a8f(%rip), %rsi     # 0xe5034
leaq 0xa33ba(%rip), %rdx     # 0x103966
movq %rbx, %rdi
movl $0xb00, %ecx            # imm = 0xB00
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
movl %ebp, %eax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq