// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/background.c
// Function: background_checks
int background_checks(
                      struct precision* ppr,
                      struct background* pba
                      ) {

  /** - define local variables */
  int n_ncdm;
  double rho_ncdm_rel,rho_nu_rel;
  double N_dark;
  double w_fld, dw_over_da, integral_fld;
  int filenum=0;

  /** - control that we have photons and baryons in the problem */
  class_test((pba->Omega0_g<=0) || (pba->Omega0_b<=0),
             pba->error_message,
             "CLASS is conceived to work in a universe containing at least two species: photons and baryons. You could work in the limit where Omega_g or Omega_b are very small, but not zero");

  /** - control that cosmological parameter values make sense, otherwise inform user */

  /* H0 in Mpc^{-1} */
  /* Many users asked for this test to be supressed. It is commented out. */
  /*class_test((pba->H0 < _H0_SMALL_)||(pba->H0 > _H0_BIG_),
    pba->error_message,
    "H0=%g out of bounds (%g<H0<%g) \n",pba->H0,_H0_SMALL_,_H0_BIG_);*/

  /* consistency between h and H0 */
  class_test(fabs(pba->h * 1.e5 / _c_  / pba->H0 -1.)>ppr->smallest_allowed_variation,
             pba->error_message,
             "inconsistency between Hubble and reduced Hubble parameters: you have H0=%f/Mpc=%fkm/s/Mpc, but h=%f",pba->H0,pba->H0/1.e5* _c_,pba->h);

  /* T_cmb in K */
  /* Many users asked for this test to be supressed. It is commented out. */
  /*class_test((pba->T_cmb < _TCMB_SMALL_)||(pba->T_cmb > _TCMB_BIG_),
    pba->error_message,
    "T_cmb=%g out of bounds (%g<T_cmb<%g)",pba->T_cmb,_TCMB_SMALL_,_TCMB_BIG_);*/

  /* Omega_k */
  /* Many users asked for this test to be supressed. It is commented out. */
  /*class_test((pba->Omega0_k < _OMEGAK_SMALL_)||(pba->Omega0_k > _OMEGAK_BIG_),
    pba->error_message,
    "Omegak = %g out of bounds (%g<Omegak<%g) \n",pba->Omega0_k,_OMEGAK_SMALL_,_OMEGAK_BIG_);*/

  /* fluid equation of state */
  if (pba->has_fld == _TRUE_) {

    class_call(background_w_fld(pba,0.,&w_fld,&dw_over_da,&integral_fld), pba->error_message, pba->error_message);
    //
    // class_test(w_fld >= 1./3.,
    //            pba->error_message,
    //            "Your choice for w(a--->0)=%g is suspicious, since it is bigger than 1/3 there cannot be radiation domination at early times\n",
    //            w_fld);
  }

  /* Varying fundamental constants */
  if (pba->has_varconst == _TRUE_) {
    class_test(pba->varconst_alpha <= 0,
               pba->error_message,
               "incorrect fine structure constant before transition");
    class_test(pba->varconst_me <= 0,
               pba->error_message,
               "incorrect effective electron mass before transition");
    class_test(pba->varconst_transition_redshift < 0,
               pba->error_message,
               "incorrect transition redshift");
  }

  /** - in verbose mode, send to standard output some additional information on non-obvious background parameters */
  if (pba->background_verbose > 0) {

    if (pba->has_ncdm == _TRUE_) {

      /* loop over ncdm species */
      for (n_ncdm=0;n_ncdm<pba->N_ncdm; n_ncdm++) {

        /* inform if p-s-d read in files */
        if (pba->got_files[n_ncdm] == _TRUE_) {
          printf(" -> ncdm species i=%d read from file %s\n",n_ncdm+1,pba->ncdm_psd_files+filenum*_ARGUMENT_LENGTH_MAX_);
          filenum++;
        }

        /* inform the user also about the value of the ncdm
           masses in eV and about */
        printf(" -> non-cold dark matter species with i=%d has m_i = %e eV (so m_i / omega_i =%e eV)\n",
               n_ncdm+1,
               pba->m_ncdm_in_eV[n_ncdm],
               pba->m_ncdm_in_eV[n_ncdm]*pba->deg_ncdm[n_ncdm]/pba->Omega0_ncdm[n_ncdm]/pba->h/pba->h);

        /* call this function to get rho_ncdm */
        background_ncdm_momenta(pba->q_ncdm_bg[n_ncdm],
                                pba->w_ncdm_bg[n_ncdm],
                                pba->q_size_ncdm_bg[n_ncdm],
                                0.,
                                pba->factor_ncdm[n_ncdm],
                                0.,
                                NULL,
                                &rho_ncdm_rel,
                                NULL,
                                NULL,
                                NULL);

        /* inform user of the contribution of each species to
           radiation density (in relativistic limit): should be
           between 1.01 and 1.02 for each active neutrino species;
           evaluated as rho_ncdm/rho_nu_rel where rho_nu_rel is the
           density of one neutrino in the instantaneous decoupling
           limit, i.e. assuming T_nu=(4/11)^1/3 T_gamma (this comes
           from the definition of N_eff) */
        rho_nu_rel = 56.0/45.0*pow(_PI_,6)*pow(4.0/11.0,4.0/3.0)*_G_/pow(_h_P_,3)/pow(_c_,7)*
          pow(_Mpc_over_m_,2)*pow(pba->T_cmb*_k_B_,4);

        printf(" -> ncdm species i=%d sampled with %d (resp. %d) points for purpose of background (resp. perturbation) integration. In the relativistic limit it gives Delta N_eff = %g\n",
               n_ncdm+1,
               pba->q_size_ncdm_bg[n_ncdm],
               pba->q_size_ncdm[n_ncdm],
               rho_ncdm_rel/rho_nu_rel);
      }
    }

    /* contribution of interacting dark radiation _idr to N_eff */
    if (pba->has_idr == _TRUE_) {
      N_dark = pba->Omega0_idr/7.*8./pow(4./11.,4./3.)/pba->Omega0_g;
      printf(" -> dark radiation Delta Neff %e\n",N_dark);
    }
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x5898, %rsp           # imm = 0x5898
movq %rdi, 0x5888(%rsp)
movq %rsi, 0x5880(%rsp)
movl $0x0, 0x5844(%rsp)
movq 0x5880(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x10(%rax), %xmm0
jae 0xa51e6
movq 0x5880(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x20(%rax), %xmm0
jb 0xa5262
leaq 0x5040(%rsp), %rdi
leaq 0x14a956(%rip), %rsi    # 0x1efb4b
movb $0x0, %al
callq 0x5b9c0
leaq 0x4840(%rsp), %rdi
leaq 0x5040(%rsp), %rcx
leaq 0x12ce6f(%rip), %rsi    # 0x1d2082
leaq 0x14a9e2(%rip), %rdx    # 0x1efbfc
movb $0x0, %al
callq 0x5b9c0
movq 0x5880(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x4840(%rsp), %r8
leaq 0x12cdf5(%rip), %rsi    # 0x1d2034
leaq 0x14a9df(%rip), %rdx    # 0x1efc25
movl $0x843, %ecx            # imm = 0x843
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x5894(%rsp)
jmp 0xa5a06
movq 0x5880(%rsp), %rax
movsd 0x13147e(%rip), %xmm0   # 0x1d66f0
mulsd 0x8(%rax), %xmm0
movsd 0x1313b1(%rip), %xmm1   # 0x1d6630
divsd %xmm1, %xmm0
movq 0x5880(%rsp), %rax
divsd (%rax), %xmm0
movsd 0x12cfb1(%rip), %xmm1   # 0x1d2248
subsd %xmm1, %xmm0
movaps 0x12cf8e(%rip), %xmm1   # 0x1d2230
pand %xmm1, %xmm0
movq 0x5888(%rsp), %rax
ucomisd 0xa28(%rax), %xmm0
jbe 0xa5375
leaq 0x4040(%rsp), %rdi
movq 0x5880(%rsp), %rax
movsd (%rax), %xmm0
movq 0x5880(%rsp), %rax
movsd (%rax), %xmm1
movsd 0x13140c(%rip), %xmm2   # 0x1d66f0
divsd %xmm2, %xmm1
movsd 0x131340(%rip), %xmm2   # 0x1d6630
mulsd %xmm2, %xmm1
movq 0x5880(%rsp), %rax
movsd 0x8(%rax), %xmm2
leaq 0x14a92f(%rip), %rsi    # 0x1efc37
movb $0x3, %al
callq 0x5b9c0
leaq 0x3840(%rsp), %rdi
leaq 0x4040(%rsp), %rcx
leaq 0x12cd5c(%rip), %rsi    # 0x1d2082
leaq 0x14a96e(%rip), %rdx    # 0x1efc9b
movb $0x0, %al
callq 0x5b9c0
movq 0x5880(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x3840(%rsp), %r8
leaq 0x12cce2(%rip), %rsi    # 0x1d2034
leaq 0x14a8cc(%rip), %rdx    # 0x1efc25
movl $0x850, %ecx            # imm = 0x850
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x5894(%rsp)
jmp 0xa5a06
movq 0x5880(%rsp), %rax
movswl 0x4c2(%rax), %eax
cmpl $0x1, %eax
jne 0xa5429
movq 0x5880(%rsp), %rdi
xorps %xmm0, %xmm0
leaq 0x5858(%rsp), %rsi
leaq 0x5850(%rsp), %rdx
leaq 0x5848(%rsp), %rcx
callq 0xa1970
cmpl $0x1, %eax
jne 0xa5427
leaq 0x3040(%rsp), %rdi
movq 0x5880(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x12d000(%rip), %rsi    # 0x1d23d8
leaq 0x149db5(%rip), %rdx    # 0x1ef194
movb $0x0, %al
callq 0x5b9c0
movq 0x5880(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x3040(%rsp), %r8
leaq 0x12cc30(%rip), %rsi    # 0x1d2034
leaq 0x14a81a(%rip), %rdx    # 0x1efc25
movl $0x861, %ecx            # imm = 0x861
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x5894(%rsp)
jmp 0xa5a06
jmp 0xa5429
movq 0x5880(%rsp), %rax
movswl 0x4ca(%rax), %eax
cmpl $0x1, %eax
jne 0xa55f0
movq 0x5880(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x2e8(%rax), %xmm0
jb 0xa54d2
leaq 0x2840(%rsp), %rdi
leaq 0x14a87e(%rip), %rsi    # 0x1efce3
movb $0x0, %al
callq 0x5b9c0
leaq 0x2040(%rsp), %rdi
leaq 0x2840(%rsp), %rcx
leaq 0x12cbff(%rip), %rsi    # 0x1d2082
leaq 0x14a88d(%rip), %rdx    # 0x1efd17
movb $0x0, %al
callq 0x5b9c0
movq 0x5880(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x2040(%rsp), %r8
leaq 0x12cb85(%rip), %rsi    # 0x1d2034
leaq 0x14a76f(%rip), %rdx    # 0x1efc25
movl $0x86d, %ecx            # imm = 0x86D
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x5894(%rsp)
jmp 0xa5a06
movq 0x5880(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x2f0(%rax), %xmm0
jb 0xa5563
leaq 0x1840(%rsp), %rdi
leaq 0x14a83a(%rip), %rsi    # 0x1efd30
movb $0x0, %al
callq 0x5b9c0
leaq 0x1040(%rsp), %rdi
leaq 0x1840(%rsp), %rcx
leaq 0x12cb6e(%rip), %rsi    # 0x1d2082
leaq 0x14a849(%rip), %rdx    # 0x1efd64
movb $0x0, %al
callq 0x5b9c0
movq 0x5880(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x1040(%rsp), %r8
leaq 0x12caf4(%rip), %rsi    # 0x1d2034
leaq 0x14a6de(%rip), %rdx    # 0x1efc25
movl $0x870, %ecx            # imm = 0x870
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x5894(%rsp)
jmp 0xa5a06
movq 0x5880(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x300(%rax), %xmm0
jbe 0xa55ee
leaq 0x840(%rsp), %rdi
leaq 0x14a7f3(%rip), %rsi    # 0x1efd7a
movb $0x0, %al
callq 0x5b9c0
leaq 0x40(%rsp), %rdi
leaq 0x840(%rsp), %rcx
leaq 0x12cae0(%rip), %rsi    # 0x1d2082
leaq 0x14a7ef(%rip), %rdx    # 0x1efd98
movb $0x0, %al
callq 0x5b9c0
movq 0x5880(%rsp), %rdi
addq $0xd1c, %rdi            # imm = 0xD1C
leaq 0x40(%rsp), %r8
leaq 0x12ca69(%rip), %rsi    # 0x1d2034
leaq 0x14a653(%rip), %rdx    # 0x1efc25
movl $0x873, %ecx            # imm = 0x873
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x5894(%rsp)
jmp 0xa5a06
jmp 0xa55f0
movq 0x5880(%rsp), %rax
movswl 0xd1a(%rax), %eax
cmpl $0x0, %eax
jle 0xa59fb
movq 0x5880(%rsp), %rax
movswl 0x4be(%rax), %eax
cmpl $0x1, %eax
jne 0xa5968
movl $0x0, 0x587c(%rsp)
movl 0x587c(%rsp), %eax
movq 0x5880(%rsp), %rcx
cmpl 0x248(%rcx), %eax
jge 0xa5966
movq 0x5880(%rsp), %rax
movq 0x258(%rax), %rax
movslq 0x587c(%rsp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0xa56aa
movl 0x587c(%rsp), %esi
addl $0x1, %esi
movq 0x5880(%rsp), %rax
movq 0x250(%rax), %rdx
movl 0x5844(%rsp), %eax
shll $0xa, %eax
cltq
addq %rax, %rdx
leaq 0x14a72c(%rip), %rdi    # 0x1efdbe
movb $0x0, %al
callq 0x8030
movl 0x5844(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5844(%rsp)
movl 0x587c(%rsp), %esi
addl $0x1, %esi
movq 0x5880(%rsp), %rax
movq 0x278(%rax), %rax
movslq 0x587c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x5880(%rsp), %rax
movq 0x278(%rax), %rax
movslq 0x587c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x5880(%rsp), %rax
movq 0x2b0(%rax), %rax
movslq 0x587c(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
movq 0x5880(%rsp), %rax
movq 0x280(%rax), %rax
movslq 0x587c(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm1
movq 0x5880(%rsp), %rax
divsd 0x8(%rax), %xmm1
movq 0x5880(%rsp), %rax
divsd 0x8(%rax), %xmm1
leaq 0x149ae1(%rip), %rdi    # 0x1ef226
movb $0x2, %al
callq 0x8030
movq 0x5880(%rsp), %rax
movq 0x4d8(%rax), %rax
movslq 0x587c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x5880(%rsp), %rax
movq 0x4e0(%rax), %rax
movslq 0x587c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x5880(%rsp), %rax
movq 0x500(%rax), %rax
movslq 0x587c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x5880(%rsp), %rax
movq 0x510(%rax), %rax
movslq 0x587c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
xorps %xmm2, %xmm2
xorl %eax, %eax
movl %eax, %r9d
leaq 0x5870(%rsp), %r8
movaps %xmm2, %xmm0
movq %r9, %rcx
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0xa15d0
movsd 0x12f7f4(%rip), %xmm0   # 0x1d4fe0
movsd 0x12de94(%rip), %xmm1   # 0x1d3688
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x148f34(%rip), %xmm0   # 0x1ee738
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x130e3a(%rip), %xmm0   # 0x1d6650
movsd 0x12fcf2(%rip), %xmm1   # 0x1d5510
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd 0x130e20(%rip), %xmm1   # 0x1d6658
mulsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x130dee(%rip), %xmm0   # 0x1d6638
movsd 0x12de46(%rip), %xmm1   # 0x1d3698
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x130dbe(%rip), %xmm0   # 0x1d6630
movsd 0x12df0e(%rip), %xmm1   # 0x1d3788
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x130dc6(%rip), %xmm0   # 0x1d6660
movsd 0x12d3de(%rip), %xmm1   # 0x1d2c80
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x5880(%rsp), %rax
movsd 0x130d76(%rip), %xmm0   # 0x1d6640
mulsd 0x18(%rax), %xmm0
movsd 0x12fbf1(%rip), %xmm1   # 0x1d54c8
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x5868(%rsp)
movl 0x587c(%rsp), %esi
addl $0x1, %esi
movq 0x5880(%rsp), %rax
movq 0x500(%rax), %rax
movslq 0x587c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x5880(%rsp), %rax
movq 0x508(%rax), %rax
movslq 0x587c(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movsd 0x5870(%rsp), %xmm0
divsd 0x5868(%rsp), %xmm0
leaq 0x14a49e(%rip), %rdi    # 0x1efde7
movb $0x1, %al
callq 0x8030
movl 0x587c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x587c(%rsp)
jmp 0xa562b
jmp 0xa5968
movq 0x5880(%rsp), %rax
movswl 0x4c6(%rax), %eax
cmpl $0x1, %eax
jne 0xa59f9
movq 0x5880(%rsp), %rax
movsd 0xf8(%rax), %xmm0
movsd 0x12ddf4(%rip), %xmm1   # 0x1d3788
divsd %xmm1, %xmm0
movsd 0x12fb38(%rip), %xmm1   # 0x1d54d8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x130c9e(%rip), %xmm0   # 0x1d6650
movsd 0x12fb56(%rip), %xmm1   # 0x1d5510
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x5880(%rsp), %rax
divsd 0x10(%rax), %xmm0
movsd %xmm0, 0x5860(%rsp)
movsd 0x5860(%rsp), %xmm0
leaq 0x14a49e(%rip), %rdi    # 0x1efe90
movb $0x1, %al
callq 0x8030
jmp 0xa59fb
movl $0x0, 0x5894(%rsp)
movl 0x5894(%rsp), %eax
addq $0x5898, %rsp           # imm = 0x5898
retq
nopw %cs:(%rax,%rax)