// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/background.c
// Function: background_output_budget
int background_output_budget(
                             struct background* pba
                             ) {

  double budget_matter, budget_radiation, budget_other,budget_neutrino;
  int index_ncdm;

  budget_matter = 0;
  budget_radiation = 0;
  budget_other = 0;
  budget_neutrino = 0;

  //The name for the class_print_species macro can be at most 30 characters total
  if (pba->background_verbose > 1) {

    printf(" ---------------------------- Budget equation ----------------------- \n");

    printf(" ---> Nonrelativistic Species \n");
    class_print_species("Bayrons",b);
    budget_matter+=pba->Omega0_b;
    if (pba->has_cdm == _TRUE_) {
      class_print_species("Cold Dark Matter",cdm);
      budget_matter+=pba->Omega0_cdm;
    }
    if (pba->has_idm == _TRUE_){
      class_print_species("Interacting DM - idr,b,g",idm);
      budget_matter+=pba->Omega0_idm;
    }
    if (pba->has_dcdm == _TRUE_) {
      class_print_species("Decaying Cold Dark Matter",dcdm);
      budget_matter+=pba->Omega0_dcdm;
    }
   if (pba->has_scf == _TRUE_ && (pba->scf_potential == axion && pba->n_axion == 1) ) {
      class_print_species("Axion DM",scf);
      budget_matter+=pba->Omega0_scf;
    }



    if (pba->N_ncdm > 0) {
      printf(" ---> Non-Cold Dark Matter Species (incl. massive neutrinos)\n");
    }
    if (pba->N_ncdm > 0) {
      for (index_ncdm=0;index_ncdm<pba->N_ncdm;++index_ncdm) {
        printf("-> %-26s%-4d Omega = %-15g , omega = %-15g\n","Non-Cold Species Nr.",index_ncdm+1,pba->Omega0_ncdm[index_ncdm],pba->Omega0_ncdm[index_ncdm]*pba->h*pba->h);
        budget_neutrino+=pba->Omega0_ncdm[index_ncdm];
        budget_matter+=pba->Omega0_ncdm[index_ncdm];
      }
    }

    printf(" ---> Relativistic Species \n");
    class_print_species("Photons",g);
    budget_radiation+=pba->Omega0_g;
    if (pba->has_ur == _TRUE_) {
      class_print_species("Ultra-relativistic relics",ur);
      budget_radiation+=pba->Omega0_ur;
    }
    if (pba->has_dr == _TRUE_) {
      class_print_species("Dark Radiation (from decay)",dr);
      budget_radiation+=pba->Omega0_dr;
    }
    if (pba->has_idr == _TRUE_) {
      class_print_species("Interacting Dark Radiation",idr);
      budget_radiation+=pba->Omega0_idr;
    }

    if ((pba->has_lambda == _TRUE_) || (pba->has_fld == _TRUE_) || (pba->has_scf == _TRUE_) || (pba->has_curvature == _TRUE_)) {
      printf(" ---> Other Content \n");
    }
    if (pba->has_lambda == _TRUE_) {
      class_print_species("Cosmological Constant",lambda);
      budget_other+=pba->Omega0_lambda;
    }
    if (pba->has_fld == _TRUE_) {
      class_print_species("Dark Energy Fluid",fld);
      budget_other+=pba->Omega0_fld;
    }
    if (pba->has_scf == _TRUE_ && !(pba->scf_potential == axion && pba->n_axion == 1) ) {
      class_print_species("Scalar Field",scf);
      budget_other+=pba->Omega0_scf;
      // printf("pba->Omega0_axion %e\n", pba->Omega0_axion);
      if(pba->Omega0_axion!=0 && pba->Omega0_scf == 0.0){
        class_print_species("Scalar Axion",axion);
        budget_other+=pba->Omega0_axion;
      }
    }
    // if(pba->has_scf && (pba->scf_potential == axion || pba->scf_potential == phi_2n)){
    //   _class_print_species_("Axion",axion);
    //   budget_other+=pba->Omega0_axion;
    // }
    if (pba->has_curvature == _TRUE_) {
      class_print_species("Spatial Curvature",k);
      budget_other+=pba->Omega0_k;
    }

    printf(" ---> Total budgets \n");
    printf(" Radiation                        Omega = %-15g , omega = %-15g \n",budget_radiation,budget_radiation*pba->h*pba->h);
    printf(" Non-relativistic                 Omega = %-15g , omega = %-15g \n",budget_matter,budget_matter*pba->h*pba->h);
    if (pba->N_ncdm > 0) {
      printf(" - Non-Free-Streaming Matter      Omega = %-15g , omega = %-15g \n",pba->Omega0_nfsm,pba->Omega0_nfsm*pba->h*pba->h);
      printf(" - Non-Cold Dark Matter           Omega = %-15g , omega = %-15g \n",budget_neutrino,budget_neutrino*pba->h*pba->h);
    }
    if ((pba->has_lambda == _TRUE_) || (pba->has_fld == _TRUE_) || (pba->has_scf == _TRUE_) || (pba->has_curvature == _TRUE_)) {
      printf(" Other Content                    Omega = %-15g , omega = %-15g \n",budget_other,budget_other*pba->h*pba->h);
    }
    printf(" TOTAL                            Omega = %-15g , omega = %-15g \n",budget_radiation+budget_matter+budget_other,(budget_radiation+budget_matter+budget_other)*pba->h*pba->h);
    printf(" -------------------------------------------------------------------- \n");
  }

  return _SUCCESS_;
}

// Assembly:
cmpw $0x2, 0xd1a(%rdi)
jl 0x61fd1
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0xabbf0(%rip), %rdi     # 0x10d519
callq 0x8510
leaq 0xabc2b(%rip), %rdi     # 0x10d560
callq 0x8510
movsd 0x8(%rbx), %xmm2
movsd 0x20(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab82a(%rip), %rdi     # 0x10d181
leaq 0xab84b(%rip), %rsi     # 0x10d1a9
movb $0x2, %al
callq 0x8030
xorpd %xmm1, %xmm1
addsd 0x20(%rbx), %xmm1
cmpw $0x1, 0x4b4(%rbx)
jne 0x619b2
movsd %xmm1, (%rsp)
movsd 0x8(%rbx), %xmm2
movsd 0x28(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab7e7(%rip), %rdi     # 0x10d181
leaq 0xab832(%rip), %rsi     # 0x10d1d3
movb $0x2, %al
callq 0x8030
movsd (%rsp), %xmm1
addsd 0x28(%rbx), %xmm1
cmpw $0x1, 0x4b6(%rbx)
jne 0x619fc
movsd %xmm1, (%rsp)
movsd 0x8(%rbx), %xmm2
movsd 0xf0(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab7a0(%rip), %rdi     # 0x10d181
leaq 0xab7c9(%rip), %rsi     # 0x10d1b1
movb $0x2, %al
callq 0x8030
movsd (%rsp), %xmm1
addsd 0xf0(%rbx), %xmm1
cmpw $0x1, 0x4b8(%rbx)
jne 0x61a46
movsd 0x330(%rbx), %xmm0
movsd %xmm1, (%rsp)
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab756(%rip), %rdi     # 0x10d181
leaq 0xab798(%rip), %rsi     # 0x10d1ca
movb $0x2, %al
callq 0x8030
movsd (%rsp), %xmm1
addsd 0x330(%rbx), %xmm1
cmpw $0x1, 0x4bc(%rbx)
jne 0x61aad
cmpl $0x2, 0x160(%rbx)
jne 0x61aad
movsd 0x210(%rbx), %xmm0
ucomisd 0x8c7f7(%rip), %xmm0    # 0xee260
jne 0x61aad
jp 0x61aad
movsd %xmm1, (%rsp)
movsd 0x8(%rbx), %xmm2
movsd 0x128(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab6ef(%rip), %rdi     # 0x10d181
leaq 0xab74b(%rip), %rsi     # 0x10d1e4
movb $0x2, %al
callq 0x8030
movsd (%rsp), %xmm1
addsd 0x128(%rbx), %xmm1
movsd %xmm1, (%rsp)
cmpl $0x0, 0x248(%rbx)
jle 0x61b6a
leaq 0xabab9(%rip), %rdi     # 0x10d57f
callq 0x8510
cmpl $0x0, 0x248(%rbx)
jle 0x61b6a
movq 0x280(%rbx), %rax
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
leaq 0xab700(%rip), %r14     # 0x10d1ed
leaq 0xab725(%rip), %r15     # 0x10d219
movsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd %xmm1, 0x18(%rsp)
leaq 0x1(%r13), %r12
movsd (%rax,%r13,8), %xmm0
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
movb $0x2, %al
callq 0x8030
movsd 0x18(%rsp), %xmm1
movq 0x280(%rbx), %rax
movsd (%rax,%r13,8), %xmm0
addsd %xmm0, %xmm1
movsd (%rsp), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, (%rsp)
movsd (%rsp), %xmm0
movslq 0x248(%rbx), %rcx
movq %r12, %r13
cmpq %rcx, %r12
jl 0x61af9
jmp 0x61b73
xorpd %xmm1, %xmm1
movsd (%rsp), %xmm0
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, (%rsp)
leaq 0xaba37(%rip), %rdi     # 0x10d5bc
callq 0x8510
movsd 0x8(%rbx), %xmm2
movsd 0x10(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab5da(%rip), %rdi     # 0x10d181
leaq 0xab680(%rip), %rsi     # 0x10d22e
movb $0x2, %al
callq 0x8030
xorpd %xmm0, %xmm0
addsd 0x10(%rbx), %xmm0
cmpw $0x1, 0x4c4(%rbx)
jne 0x61c0a
movsd 0x8(%rbx), %xmm2
movsd %xmm0, 0x10(%rsp)
movsd 0xe8(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab593(%rip), %rdi     # 0x10d181
leaq 0xab641(%rip), %rsi     # 0x10d236
movb $0x2, %al
callq 0x8030
movsd 0x10(%rsp), %xmm0
addsd 0xe8(%rbx), %xmm0
cmpw $0x1, 0x4ba(%rbx)
jne 0x61c56
movsd %xmm0, 0x10(%rsp)
movsd 0x338(%rbx), %xmm0
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab547(%rip), %rdi     # 0x10d181
leaq 0xab60f(%rip), %rsi     # 0x10d250
movb $0x2, %al
callq 0x8030
movsd 0x10(%rsp), %xmm0
addsd 0x338(%rbx), %xmm0
cmpw $0x1, 0x4c6(%rbx)
movsd %xmm0, 0x10(%rsp)
jne 0x61ca8
movsd 0x8(%rbx), %xmm2
movsd 0xf8(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab4fb(%rip), %rdi     # 0x10d181
leaq 0xab5df(%rip), %rsi     # 0x10d26c
movb $0x2, %al
callq 0x8030
movsd 0x10(%rsp), %xmm0
addsd 0xf8(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
cmpw $0x1, 0x4c0(%rbx)
je 0x61cda
cmpw $0x1, 0x4c2(%rbx)
je 0x61cda
cmpw $0x1, 0x4bc(%rbx)
je 0x61cda
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpw $0x1, 0x4c8(%rbx)
jne 0x61d34
leaq 0xab8f7(%rip), %rdi     # 0x10d5d8
callq 0x8510
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpw $0x1, 0x4c0(%rbx)
jne 0x61d34
movsd 0x8(%rbx), %xmm2
movsd 0x30(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab46a(%rip), %rdi     # 0x10d181
leaq 0xab569(%rip), %rsi     # 0x10d287
movb $0x2, %al
callq 0x8030
xorpd %xmm0, %xmm0
addsd 0x30(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
cmpw $0x1, 0x4c2(%rbx)
jne 0x61d7a
movsd 0x8(%rbx), %xmm2
movsd 0x38(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab426(%rip), %rdi     # 0x10d181
leaq 0xab53b(%rip), %rsi     # 0x10d29d
movb $0x2, %al
callq 0x8030
movsd 0x8(%rsp), %xmm0
addsd 0x38(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
cmpw $0x1, 0x4bc(%rbx)
jne 0x61e45
cmpl $0x2, 0x160(%rbx)
jne 0x61da9
movsd 0x210(%rbx), %xmm0
ucomisd 0x8c4bf(%rip), %xmm0    # 0xee260
jne 0x61da9
jnp 0x61e45
movsd 0x8(%rbx), %xmm2
movsd 0x128(%rbx), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab3b8(%rip), %rdi     # 0x10d181
leaq 0xab4df(%rip), %rsi     # 0x10d2af
movb $0x2, %al
callq 0x8030
movsd 0x128(%rbx), %xmm1
movsd 0x1e0(%rbx), %xmm0
movsd 0x8(%rsp), %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x61e03
jnp 0x61e45
ucomisd %xmm2, %xmm1
jne 0x61e45
jp 0x61e45
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab35e(%rip), %rdi     # 0x10d181
leaq 0xab492(%rip), %rsi     # 0x10d2bc
movb $0x2, %al
callq 0x8030
movsd 0x8(%rsp), %xmm0
addsd 0x1e0(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
cmpw $0x1, 0x4c8(%rbx)
jne 0x61e91
movsd 0x2d0(%rbx), %xmm0
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab312(%rip), %rdi     # 0x10d181
leaq 0xab453(%rip), %rsi     # 0x10d2c9
movb $0x2, %al
callq 0x8030
movsd 0x8(%rsp), %xmm0
addsd 0x2d0(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xab755(%rip), %rdi     # 0x10d5ed
callq 0x8510
movsd 0x8(%rbx), %xmm2
movsd 0x10(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab420(%rip), %rdi     # 0x10d2db
movb $0x2, %al
callq 0x8030
movsd 0x8(%rbx), %xmm2
movsd (%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab43e(%rip), %rdi     # 0x10d31d
movb $0x2, %al
callq 0x8030
cmpl $0x0, 0x248(%rbx)
jle 0x61f3b
movsd 0x358(%rbx), %xmm0
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab450(%rip), %rdi     # 0x10d35f
movb $0x2, %al
callq 0x8030
movsd 0x8(%rbx), %xmm2
movsd 0x18(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab46d(%rip), %rdi     # 0x10d3a1
movb $0x2, %al
callq 0x8030
cmpw $0x1, 0x4c0(%rbx)
je 0x61f63
cmpw $0x1, 0x4c2(%rbx)
je 0x61f63
cmpw $0x1, 0x4bc(%rbx)
je 0x61f63
cmpw $0x1, 0x4c8(%rbx)
jne 0x61f88
movsd 0x8(%rbx), %xmm2
movsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab462(%rip), %rdi     # 0x10d3e3
movb $0x2, %al
callq 0x8030
movsd (%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd 0x8(%rbx), %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
leaq 0xab474(%rip), %rdi     # 0x10d425
movb $0x2, %al
callq 0x8030
leaq 0xab643(%rip), %rdi     # 0x10d602
callq 0x8510
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
xorl %eax, %eax
retq