// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_norad
int hmcode_norad(
                 struct hmcode_growth *phg,
                 double a
                 ){

  double AHnr_nu, H2nr_nu;
  double w_v = -1.;
  double w_de = phg->w0+(1.-a)*phg->wa;
  double X_de = pow(a, -3.*(1.+phg->w0+phg->wa))*exp(-3.*phg->wa*(1.-a));
  double Om_norad;
  double AH_norad, H2_norad;
  double a3;

  a3 = a*a*a;

  if( a > phg->a_nu ){
    AHnr_nu = phg->Omega_nu/a3;
    H2nr_nu = phg->Omega_nu/a3;
  }
  else{
    H2nr_nu = 0.;
    AHnr_nu = 0.;
  }

  AH_norad = -(phg->Omega_cdm/a3+phg->Omega_b/a3+AHnr_nu+phg->Omega_v*(1.+3.*w_v) + phg->Omega_w*(1.+3.*w_de)*X_de)/2.;
  H2_norad = (phg->Omega_cdm/a3 + phg->Omega_b/a3 + H2nr_nu + phg->Omega_v + phg->Omega_w*X_de + (1.-phg->Omega_m-phg->Omega_v-phg->Omega_w)/a/a);

  H2_norad+=phg->Omega_nu*(pow(1.+pow(0.3173*a/phg->a_nu,1.83),1./1.83)-1.)/a3/a;//Correction from inconsistent modeling between X_nu and H2_norad in HMcode

  if( a > phg->a_nu ){
    Om_norad = phg->Omega_m/a3/H2_norad;
  }
  else{
    Om_norad = (phg->Omega_cdm + phg->Omega_b)/a3/H2_norad;
  }
  phg->pvecnorad[phg->index_norad_H2] = H2_norad;
  phg->pvecnorad[phg->index_norad_AH] = AH_norad;
  phg->pvecnorad[phg->index_norad_Om] = Om_norad;

  return _SUCCESS_;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
movsd 0x70(%rdi), %xmm1
movsd 0x78(%rdi), %xmm2
movsd 0x8836(%rip), %xmm3     # 0xf1260
movapd %xmm3, %xmm4
subsd %xmm0, %xmm4
movsd %xmm4, 0x8(%rsp)
movsd %xmm1, 0x68(%rsp)
addsd %xmm3, %xmm1
movsd %xmm2, 0x60(%rsp)
addsd %xmm2, %xmm1
mulsd 0xba1c(%rip), %xmm1     # 0xf4470
callq 0x8620
movsd %xmm0, 0x58(%rsp)
movsd 0xba09(%rip), %xmm0     # 0xf4470
mulsd 0x78(%rbx), %xmm0
mulsd 0x8(%rsp), %xmm0
callq 0x8670
movsd %xmm0, 0x28(%rsp)
movsd (%rsp), %xmm3
movapd %xmm3, %xmm2
mulsd %xmm3, %xmm2
mulsd %xmm3, %xmm2
movsd 0x90(%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm3
jbe 0xe8aac
movsd 0x88(%rbx), %xmm0
divsd %xmm2, %xmm0
movsd %xmm2, 0x40(%rsp)
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x58(%rbx), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x60(%rbx), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x68(%rbx), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x80(%rbx), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x88(%rbx), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x46438(%rip), %xmm0    # 0x12ef40
mulsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movsd 0x4642f(%rip), %xmm1    # 0x12ef48
callq 0x8620
addsd 0x873a(%rip), %xmm0     # 0xf1260
movsd 0x46422(%rip), %xmm1    # 0x12ef50
callq 0x8620
movsd (%rsp), %xmm1
ucomisd 0x90(%rbx), %xmm1
jbe 0xe8b4c
movsd 0x80(%rbx), %xmm1
jmp 0xe8b56
movsd 0x50(%rbx), %xmm1
addsd 0x58(%rbx), %xmm1
movsd 0x58(%rsp), %xmm5
mulsd 0x28(%rsp), %xmm5
movsd 0x40(%rsp), %xmm8
movsd 0x10(%rsp), %xmm3
divsd %xmm8, %xmm3
movsd 0x18(%rsp), %xmm2
divsd %xmm8, %xmm2
addsd %xmm3, %xmm2
movsd 0x50(%rsp), %xmm7
addsd %xmm2, %xmm7
movsd 0x38(%rsp), %xmm9
movapd %xmm9, %xmm2
addsd %xmm7, %xmm2
movsd 0x30(%rsp), %xmm10
movapd %xmm10, %xmm3
mulsd %xmm5, %xmm3
addsd %xmm2, %xmm3
movsd 0x86a7(%rip), %xmm4     # 0xf1260
movapd %xmm4, %xmm2
subsd 0x20(%rsp), %xmm2
subsd %xmm9, %xmm2
subsd %xmm10, %xmm2
movsd (%rsp), %xmm6
divsd %xmm6, %xmm2
divsd %xmm6, %xmm2
addsd %xmm3, %xmm2
addsd 0x8c02(%rip), %xmm0     # 0xf17e8
movsd 0x48(%rsp), %xmm3
mulsd %xmm0, %xmm3
divsd %xmm8, %xmm3
divsd %xmm6, %xmm3
addsd %xmm2, %xmm3
divsd %xmm8, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd 0x60(%rsp), %xmm0
addsd 0x68(%rsp), %xmm0
mulsd 0x9a64(%rip), %xmm0     # 0xf2680
addsd %xmm4, %xmm0
mulsd %xmm10, %xmm0
addsd %xmm9, %xmm9
subsd %xmm9, %xmm7
mulsd %xmm5, %xmm0
addsd %xmm7, %xmm0
divsd %xmm3, %xmm1
movq 0xe8(%rbx), %rax
movslq 0xd4(%rbx), %rcx
movsd %xmm3, (%rax,%rcx,8)
mulsd 0xb812(%rip), %xmm0     # 0xf4468
movslq 0xd8(%rbx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movslq 0xdc(%rbx), %rcx
movsd %xmm1, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq