// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x6998, %rsp           # imm = 0x6998
movq %rdi, 0x6988(%rsp)
movq %rsi, 0x6980(%rsp)
movq %rdx, 0x6978(%rsp)
movq %rcx, 0x6970(%rsp)
movq %r8, 0x6968(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x6948(%rsp)
movq 0x6988(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x6960(%rsp)
movq 0x6980(%rsp), %rax
movswl 0x4be(%rax), %eax
cmpl $0x1, %eax
jne 0xac621
movl $0x0, 0x692c(%rsp)
cmpl $0x2710, 0x692c(%rsp) # imm = 0x2710
jge 0xac596
movl $0x1, 0x6928(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x6948(%rsp)
movl $0x0, 0x6924(%rsp)
movl 0x6924(%rsp), %eax
movq 0x6980(%rsp), %rcx
cmpl 0x248(%rcx), %eax
jge 0xac558
movq 0x6980(%rsp), %rax
movq 0x4d8(%rax), %rax
movslq 0x6924(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x6980(%rsp), %rax
movq 0x4e0(%rax), %rax
movslq 0x6924(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x6980(%rsp), %rax
movq 0x500(%rax), %rax
movslq 0x6924(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x6980(%rsp), %rax
movq 0x270(%rax), %rax
movslq 0x6924(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x6980(%rsp), %rax
movq 0x510(%rax), %rax
movslq 0x6924(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x125e27(%rip), %xmm2   # 0x1d2248
divsd 0x6960(%rsp), %xmm2
movsd 0x125e16(%rip), %xmm3   # 0x1d2248
subsd %xmm3, %xmm2
xorl %eax, %eax
movl %eax, %ecx
leaq 0x6958(%rsp), %r8
leaq 0x6950(%rsp), %r9
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xa15d0
cmpl $0x1, %eax
jne 0xac4d2
leaq 0x60f0(%rsp), %rdi
movq 0x6980(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x125f55(%rip), %rsi    # 0x1d23d8
leaq 0x1443d9(%rip), %rdx    # 0x1f0863
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x60f0(%rsp), %r8
leaq 0x125b85(%rip), %rsi    # 0x1d2034
leaq 0x144483(%rip), %rdx    # 0x1f0939
movl $0xa8f, %ecx            # imm = 0xA8F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movsd 0x6950(%rsp), %xmm0
movsd 0x6948(%rsp), %xmm1
movsd 0x1271ac(%rip), %xmm2   # 0x1d3698
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x6948(%rsp)
movsd 0x6950(%rsp), %xmm0
divsd 0x6958(%rsp), %xmm0
movsd 0x128f81(%rip), %xmm1   # 0x1d5498
subsd %xmm1, %xmm0
movaps 0x125d0e(%rip), %xmm1   # 0x1d2230
pand %xmm1, %xmm0
movq 0x6988(%rsp), %rax
ucomisd 0x50(%rax), %xmm0
jbe 0xac540
movl $0x0, 0x6928(%rsp)
jmp 0xac542
movl 0x6924(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6924(%rsp)
jmp 0xac376
cmpl $0x1, 0x6928(%rsp)
jne 0xac564
jmp 0xac596
movsd 0x125cf4(%rip), %xmm0   # 0x1d2260
mulsd 0x6960(%rsp), %xmm0
movsd %xmm0, 0x6960(%rsp)
jmp 0xac580
movl 0x692c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x692c(%rsp)
jmp 0xac343
cmpl $0x2710, 0x692c(%rsp) # imm = 0x2710
jne 0xac61f
leaq 0x58f0(%rsp), %rdi
leaq 0x1443a5(%rip), %rsi    # 0x1f0957
movb $0x0, %al
callq 0x5b9c0
leaq 0x50f0(%rsp), %rdi
leaq 0x58f0(%rsp), %rcx
leaq 0x125ab2(%rip), %rsi    # 0x1d2082
leaq 0x128e08(%rip), %rdx    # 0x1d53df
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x50f0(%rsp), %r8
leaq 0x125a38(%rip), %rsi    # 0x1d2034
leaq 0x144336(%rip), %rdx    # 0x1f0939
movl $0xa9e, %ecx            # imm = 0xA9E
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
jmp 0xac621
movq 0x6980(%rsp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x6938(%rsp)
movq 0x6980(%rsp), %rax
movswl 0x4c4(%rax), %eax
cmpl $0x1, %eax
jne 0xac66d
movq 0x6980(%rsp), %rax
movsd 0xe8(%rax), %xmm0
addsd 0x6938(%rsp), %xmm0
movsd %xmm0, 0x6938(%rsp)
movq 0x6980(%rsp), %rax
movswl 0x4c6(%rax), %eax
cmpl $0x1, %eax
jne 0xac6a3
movq 0x6980(%rsp), %rax
movsd 0xf8(%rax), %xmm0
addsd 0x6938(%rsp), %xmm0
movsd %xmm0, 0x6938(%rsp)
movsd 0x6938(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0x6980(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x1265b7(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x90(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x6960(%rsp), %xmm0
movsd 0x128dd0(%rip), %xmm1   # 0x1d54c8
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x98(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x6930(%rsp)
movq 0x6980(%rsp), %rax
movswl 0x4be(%rax), %eax
cmpl $0x1, %eax
jne 0xac745
movsd 0x6948(%rsp), %xmm0
addsd 0x6930(%rsp), %xmm0
movsd %xmm0, 0x6930(%rsp)
movq 0x6980(%rsp), %rax
movswl 0x4b8(%rax), %eax
cmpl $0x1, %eax
jne 0xac820
movq 0x6980(%rsp), %rax
movsd 0x120(%rax), %xmm0
movq 0x6980(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x6980(%rsp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x6960(%rsp), %xmm0
movsd 0x129209(%rip), %xmm1   # 0x1d59a8
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x88(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x480(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rax
movswl 0xd1a(%rax), %eax
cmpl $0x3, %eax
jle 0xac81e
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x480(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x6980(%rsp), %rax
movsd 0x120(%rax), %xmm1
leaq 0x144196(%rip), %rdi    # 0x1f09ad
movb $0x2, %al
callq 0x8030
jmp 0xac820
movq 0x6980(%rsp), %rax
movswl 0x4ba(%rax), %eax
cmpl $0x1, %eax
jne 0xac986
movq 0x6980(%rsp), %rax
movswl 0x4b8(%rax), %eax
cmpl $0x1, %eax
jne 0xac965
movsd 0x6960(%rsp), %xmm0
movsd 0x126e27(%rip), %xmm1   # 0x1d3688
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x128c27(%rip), %xmm0   # 0x1d5498
mulsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x480(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x6980(%rsp), %rax
mulsd 0x110(%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x6980(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x126ddd(%rip), %xmm1   # 0x1d3698
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x70(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rsp)
movsd 0x6938(%rsp), %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x6940(%rsp)
movsd 0x6940(%rsp), %xmm0
movq 0x6980(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x6980(%rsp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x6960(%rsp), %xmm0
movsd 0x128b96(%rip), %xmm1   # 0x1d54c8
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x80(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x484(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xac984
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x484(%rcx), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0xac986
movq 0x6980(%rsp), %rax
movswl 0x4c2(%rax), %eax
cmpl $0x1, %eax
jne 0xacb1c
movq 0x6980(%rsp), %rax
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x6980(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x1262bb(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x68(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x6910(%rsp)
movq 0x6980(%rsp), %rdi
movsd 0x6960(%rsp), %xmm0
leaq 0x6908(%rsp), %rsi
leaq 0x6900(%rsp), %rdx
leaq 0x68f8(%rsp), %rcx
callq 0xa1970
cmpl $0x1, %eax
jne 0xaca80
leaq 0x48f0(%rsp), %rdi
movq 0x6980(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x1259a7(%rip), %rsi    # 0x1d23d8
leaq 0x143f92(%rip), %rdx    # 0x1f09ca
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x48f0(%rsp), %r8
leaq 0x1255d7(%rip), %rsi    # 0x1d2034
leaq 0x143ed5(%rip), %rdx    # 0x1f0939
movl $0xacf, %ecx            # imm = 0xACF
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movsd 0x6910(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x68f8(%rsp), %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x488(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rax
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x68f8(%rsp), %xmm0
callq 0x8670
movaps %xmm0, %xmm1
movsd 0x60(%rsp), %xmm0
leaq 0x143f10(%rip), %rdi    # 0x1f0a07
movb $0x2, %al
callq 0x8030
movq 0x6980(%rsp), %rax
movsd 0xe8(%rax), %xmm0
leaq 0x143f1c(%rip), %rdi    # 0x1f0a31
movb $0x1, %al
callq 0x8030
movq 0x6980(%rsp), %rax
movswl 0x4bc(%rax), %eax
cmpl $0x1, %eax
jne 0xad2be
movq 0x6980(%rsp), %rax
movswl 0x148(%rax), %eax
cmpl $0x1, %eax
jne 0xacd23
movq 0x6980(%rsp), %rax
movq 0x168(%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x6918(%rsp)
movsd 0x125c60(%rip), %xmm0   # 0x1d27d0
divsd 0x6918(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x128941(%rip), %xmm0   # 0x1d54c8
mulsd 0x6930(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x6918(%rsp), %xmm0
movsd 0x1260d9(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x48(%rsp), %xmm0
movsd 0x126adb(%rip), %xmm2   # 0x1d3698
mulsd %xmm2, %xmm1
movsd 0x141baf(%rip), %xmm2   # 0x1ee778
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x50(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x6980(%rsp), %rax
mulsd 0x150(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x6918(%rsp), %xmm0
movsd 0x126060(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x126a68(%rip), %xmm0   # 0x1d3698
mulsd %xmm0, %xmm1
movsd 0x141b3c(%rip), %xmm0   # 0x1ee778
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xacca3
movsd 0x1255f7(%rip), %xmm0   # 0x1d2248
divsd 0x6918(%rsp), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rax
movswl 0xd1a(%rax), %eax
cmpl $0x0, %eax
jle 0xacca1
movsd 0x6918(%rsp), %xmm0
leaq 0x143dc0(%rip), %rdi    # 0x1f0a5a
movb $0x1, %al
callq 0x8030
jmp 0xacca3
movsd 0x125fd5(%rip), %xmm0   # 0x1d2c80
mulsd 0x6960(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x6980(%rsp), %rdi
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0xa11c0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x6980(%rsp), %rax
mulsd 0x158(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x494(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xacd7b
movq 0x6980(%rsp), %rax
movsd 0x150(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rax
movsd 0x158(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x494(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rax
cmpl $0x3, 0x160(%rax)
jne 0xad161
movq 0x6980(%rsp), %rax
movsd 0x1c0(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xad107
jp 0xad107
movq 0x6980(%rsp), %rax
movsd 0x1d0(%rax), %xmm1
movsd 0x125a15(%rip), %xmm0   # 0x1d27e0
callq 0x8610
movsd %xmm0, 0x48e8(%rsp)
movq 0x6980(%rsp), %rax
movsd 0x1b8(%rax), %xmm1
movsd 0x1259ef(%rip), %xmm0   # 0x1d27e0
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x125447(%rip), %xmm0   # 0x1d2248
divsd %xmm1, %xmm0
movsd %xmm0, 0x48e0(%rsp)
movsd 0x48e8(%rsp), %xmm0
movsd 0x125429(%rip), %xmm1   # 0x1d2248
ucomisd %xmm1, %xmm0
jne 0xacea3
jp 0xacea3
leaq 0x40e0(%rsp), %rdi
leaq 0x12b44a(%rip), %rsi    # 0x1d8280
movb $0x0, %al
callq 0x5b9c0
leaq 0x38e0(%rsp), %rdi
leaq 0x40e0(%rsp), %rcx
leaq 0x12522e(%rip), %rsi    # 0x1d2082
leaq 0x143c27(%rip), %rdx    # 0x1f0a82
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x38e0(%rsp), %r8
leaq 0x1251b4(%rip), %rsi    # 0x1d2034
leaq 0x143ab2(%rip), %rdx    # 0x1f0939
movl $0xb00, %ecx            # imm = 0xB00
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movsd 0x12982d(%rip), %xmm0   # 0x1d66d8
movsd %xmm0, 0x38d8(%rsp)
movq 0x6980(%rsp), %rax
movsd 0x20(%rax), %xmm0
movq 0x6980(%rsp), %rax
addsd 0x28(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x48e0(%rsp), %xmm0
movsd 0x1267b3(%rip), %xmm1   # 0x1d3698
callq 0x8610
movsd %xmm0, 0x20(%rsp)
movsd 0x38d8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x48e0(%rsp), %xmm0
movsd 0x1285b8(%rip), %xmm1   # 0x1d54c8
callq 0x8610
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x28(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x38d0(%rsp)
movsd 0x38d0(%rsp), %xmm0
movsd 0x1252f8(%rip), %xmm1   # 0x1d2248
subsd 0x48e8(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x38c8(%rsp)
movq 0x6980(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x38c8(%rsp), %xmm0
movsd 0x125cff(%rip), %xmm1   # 0x1d2c88
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38c0(%rsp)
movsd 0x1266ec(%rip), %xmm0   # 0x1d3698
mulsd 0x48e8(%rsp), %xmm0
mulsd 0x38c0(%rsp), %xmm0
mulsd 0x38c0(%rsp), %xmm0
movsd %xmm0, 0x38b8(%rsp)
movsd 0x1266c0(%rip), %xmm0   # 0x1d3698
divsd 0x48e8(%rsp), %xmm0
movsd %xmm0, 0x38b0(%rsp)
movsd 0x38b0(%rsp), %xmm0
movq 0x6980(%rsp), %rax
movsd 0x125c7d(%rip), %xmm1   # 0x1d2c80
mulsd 0x210(%rax), %xmm1
movq 0x6980(%rsp), %rax
movsd 0x210(%rax), %xmm2
addsd %xmm2, %xmm2
movsd 0x1257a9(%rip), %xmm3   # 0x1d27d0
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x126665(%rip), %xmm1   # 0x1d36a0
callq 0x8610
movsd %xmm0, 0x38a8(%rsp)
movsd 0x38b8(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38a8(%rsp), %xmm0
movq 0x6980(%rsp), %rax
movsd 0x125c0f(%rip), %xmm1   # 0x1d2c80
mulsd 0x210(%rax), %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x6980(%rsp), %rax
movsd %xmm0, 0x1c0(%rax)
movsd 0x38a8(%rsp), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x38a8(%rsp), %xmm0
movq 0x6980(%rsp), %rax
movsd %xmm0, 0x150(%rax)
movq 0x6980(%rsp), %rax
movsd 0x158(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x494(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xad15f
movq 0x6980(%rsp), %rax
movsd 0x150(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rax
movsd 0x158(%rax), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x494(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0xad161
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0xad1a5
jmp 0xad1eb
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0xad29f
leaq 0x30a0(%rsp), %rdi
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x490(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x143856(%rip), %rsi    # 0x1f0a88
movb $0x2, %al
callq 0x5b9c0
leaq 0x28a0(%rsp), %rdi
leaq 0x30a0(%rsp), %rcx
leaq 0x124e32(%rip), %rsi    # 0x1d2082
leaq 0x14386d(%rip), %rdx    # 0x1f0ac4
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x28a0(%rsp), %r8
leaq 0x124db8(%rip), %rsi    # 0x1d2034
leaq 0x1436b6(%rip), %rdx    # 0x1f0939
movl $0xb1b, %ecx            # imm = 0xB1B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x48c(%rcx), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0x6980(%rsp), %rdi
movsd 0x6960(%rsp), %xmm0
movq 0x6970(%rsp), %rsi
movq 0x6978(%rsp), %rcx
movl $0x1, %edx
callq 0x9f0d0
cmpl $0x1, %eax
jne 0xad35b
leaq 0x20a0(%rsp), %rdi
movq 0x6980(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x1250cc(%rip), %rsi    # 0x1d23d8
leaq 0x143822(%rip), %rdx    # 0x1f0b35
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x20a0(%rsp), %r8
leaq 0x124cfc(%rip), %rsi    # 0x1d2034
leaq 0x1435fa(%rip), %rdx    # 0x1f0939
movl $0xb23, %ecx            # imm = 0xB23
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x404(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x124ec9(%rip), %xmm1   # 0x1d2248
subsd %xmm1, %xmm0
movaps 0x124ea6(%rip), %xmm1   # 0x1d2230
pand %xmm1, %xmm0
movq 0x6988(%rsp), %rax
ucomisd 0x20(%rax), %xmm0
jbe 0xad439
leaq 0x18a0(%rsp), %rdi
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x404(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x1437b3(%rip), %rsi    # 0x1f0b7f
movb $0x1, %al
callq 0x5b9c0
leaq 0x10a0(%rsp), %rdi
leaq 0x18a0(%rsp), %rcx
leaq 0x124c98(%rip), %rsi    # 0x1d2082
leaq 0x143804(%rip), %rdx    # 0x1f0bf5
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x10a0(%rsp), %r8
leaq 0x124c1e(%rip), %rsi    # 0x1d2034
leaq 0x14351c(%rip), %rdx    # 0x1f0939
movl $0xb2b, %ecx            # imm = 0xB2B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x384(%rcx), %rcx
xorps %xmm0, %xmm0
ucomisd (%rax,%rcx,8), %xmm0
jb 0xad4f6
leaq 0x8a0(%rsp), %rdi
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x384(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x1437b0(%rip), %rsi    # 0x1f0c39
movb $0x1, %al
callq 0x5b9c0
leaq 0xa0(%rsp), %rdi
leaq 0x8a0(%rsp), %rcx
leaq 0x124bdb(%rip), %rsi    # 0x1d2082
leaq 0x1437af(%rip), %rdx    # 0x1f0c5d
movb $0x0, %al
callq 0x5b9c0
movq 0x6980(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0xa0(%rsp), %r8
leaq 0x124b61(%rip), %rsi    # 0x1d2034
leaq 0x14345f(%rip), %rdx    # 0x1f0939
movl $0xb33, %ecx            # imm = 0xB33
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x6994(%rsp)
jmp 0xad679
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x384(%rcx), %rcx
movsd 0x12576b(%rip), %xmm1   # 0x1d2c80
mulsd (%rax,%rcx,8), %xmm1
movsd 0x124d26(%rip), %xmm0   # 0x1d2248
divsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x498(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x6960(%rsp), %xmm1
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x384(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm1
movsd 0x124cd9(%rip), %xmm0   # 0x1d2248
divsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x4a0(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x4a0(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x1260df(%rip), %xmm0   # 0x1d3698
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x49c(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x4a4(%rcx), %rcx
movsd 0x124c42(%rip), %xmm0   # 0x1d2248
movsd %xmm0, (%rax,%rcx,8)
movsd 0x12566d(%rip), %xmm0   # 0x1d2c80
mulsd 0x6960(%rsp), %xmm0
movq 0x6978(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x384(%rcx), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x6970(%rsp), %rax
movq 0x6980(%rsp), %rcx
movslq 0x4a8(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x6960(%rsp), %xmm0
callq 0x82f0
movq 0x6968(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x0, 0x6994(%rsp)
movl 0x6994(%rsp), %eax
addq $0x6998, %rsp           # imm = 0x6998
retq
nopl (%rax,%rax)