// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_noradiation_growth_init
int hmcode_noradiation_growth_init(
                                   struct precision *ppr,
                                   struct background *pba,
                                   struct fourier *pfo,
                                   struct hmcode_workspace *phw
                                   ){

  struct hmcode_growth *phg;
  int index_fg,index_gt, index_norad;
  int i;
  double a_ini;
  double a_final;
  double lna_ini;
  double lna_final;
  double neutrino_constant;
  double Omega_nu_rad;

  class_alloc(phg,sizeof(struct hmcode_growth),pfo->error_message);
  phw->phg = phg;

  index_fg = 0;
  class_define_index(phg->index_fg_g,_TRUE_,index_fg,1);
  class_define_index(phg->index_fg_dg,_TRUE_,index_fg,1);

  phg->fg_size = index_fg;

  index_gt = 0;
  class_define_index(phg->index_gt_g,_TRUE_,index_gt,1); //Actually g(a)/a
  class_define_index(phg->index_gt_ddg,_TRUE_,index_gt,1);
  class_define_index(phg->index_gt_intg,_TRUE_,index_gt,1);
  class_define_index(phg->index_gt_ddintg,_TRUE_,index_gt,1);
  class_define_index(phg->index_gt_Omnorad,_TRUE_,index_gt,1);
  class_define_index(phg->index_gt_ddOmnorad,_TRUE_,index_gt,1);

  phg->gt_size = index_gt;

  index_norad = 0;
  class_define_index(phg->index_norad_H2,_TRUE_,index_norad,1);
  class_define_index(phg->index_norad_AH,_TRUE_,index_norad,1);
  class_define_index(phg->index_norad_Om,_TRUE_,index_norad,1);

  phg->norad_size = index_norad;

  a_ini = 1e-4;
  a_final = 1;
  lna_ini = log(a_ini);
  lna_final = log(a_final);

  phg->a_size = 128;
  class_alloc(phg->a_table,phg->a_size*sizeof(double),pfo->error_message);
  class_alloc(phg->growth_table,phg->a_size*phg->gt_size*sizeof(double),pfo->error_message);
  class_alloc(phg->normgrowth_table,phg->a_size*sizeof(double),pfo->error_message);
  class_alloc(phg->ddnormgrowth_table,phg->a_size*sizeof(double),pfo->error_message);
  class_alloc(phg->dda_table,phg->a_size*sizeof(double),pfo->error_message);
  class_alloc(phg->pvecnorad,phg->norad_size*sizeof(double),pfo->error_message);

  for(i=0;i<phg->a_size;++i){
    phg->a_table[i] = a_ini*exp(i*(lna_final-lna_ini)/(phg->a_size-1));
  }

  phg->a_ini = a_ini;
  phg->a_final = a_final;
  phg->a_table[0]=a_ini;
  phg->a_table[phg->a_size-1]=a_final;
  phg->smallest_allowed_variation = ppr->smallest_allowed_variation;

  phg->Omega_cdm = pba->Omega0_m-pba->Omega0_b;//pba->Omega0_cdm;
  phg->Omega_b = pba->Omega0_b;
  phg->Omega_v = pba->Omega0_lambda;
  Omega_nu_rad = pba->Omega0_g*pba->Neff*7./8.*pow(4./11.,4./3.);

  phg->Omega_nu = Omega_nu_rad;
  phg->a_nu = 1;
  // These would be the expressions for mnu>0, but to emulate the default HMcode, we use the expressions above
  //phg->a_nu = pba->T_cmb*pow(4./11.,1./3.) /(mnu/pba->Neff)*(1.38064852e-23/1.60218e-19);
  //phg->Omega_nu = Omega_nu_rad*(pow(1.+pow(0.3173*1./phg->a_nu,1.83),1./1.83));

  phg->Omega_w = pba->Omega0_fld;
  phg->w0 = pba->w0_fld;
  phg->wa = pba->wa_fld;
  phg->Omega_m = 1.-phg->Omega_v-phg->Omega_w;
  phg->Tcmb = pba->T_cmb;
  phg->om_m = pba->Omega0_m*pba->h*pba->h;
  phg->fnu = pba->Omega0_ncdm_tot/pba->Omega0_m;
  class_test(pba->Omega0_scf>0,
             pfo->error_message,
             "Cannot use scalar field scf with HMcode (not yet coded)");

  class_call(hmcode_noradiation_growth_compute(pfo, phw),
             phw->phg->error_message,
             pfo->error_message);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r13
movl $0x900, %edi            # imm = 0x900
callq 0x8460
testq %rax, %rax
je 0xe8287
movq %rax, %r12
movq %rax, 0x70(%r14)
movabsq $0x400000003, %rax      # imm = 0x400000003
movq %rax, 0x40(%r12)
movl $0x5, 0x48(%r12)
movaps 0x47033(%rip), %xmm0    # 0x12f010
movups %xmm0, 0x30(%r12)
movapd 0x47035(%rip), %xmm0    # 0x12f020
movupd %xmm0, 0xc8(%r12)
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, 0xd8(%r12)
movl $0x3, 0xe0(%r12)
movl $0x80, 0x8(%r12)
movl $0x400, %edi            # imm = 0x400
callq 0x8460
movq %rax, (%r12)
testq %rax, %rax
je 0xe82c9
movl $0x1800, %edi           # imm = 0x1800
callq 0x8460
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0xe830b
movl $0x400, %edi            # imm = 0x400
callq 0x8460
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0xe834d
movl $0x400, %edi            # imm = 0x400
callq 0x8460
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0xe838f
movl $0x400, %edi            # imm = 0x400
callq 0x8460
movq %rax, 0x28(%r12)
testq %rax, %rax
je 0xe83d1
movl $0x18, %edi
callq 0x8460
movq %rax, 0xe8(%r12)
testq %rax, %rax
je 0xe8413
movl 0x8(%r12), %eax
testl %eax, %eax
jle 0xe80f8
xorl %ebp, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
mulsd 0x46e70(%rip), %xmm0    # 0x12ef38
decl %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x8670
mulsd 0x9c56(%rip), %xmm0     # 0xf1d38
movq (%r12), %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
movslq 0x8(%r12), %rax
cmpq %rax, %rbp
jl 0xe80b9
movaps 0x46f31(%rip), %xmm0    # 0x12f030
movups %xmm0, 0xb0(%r12)
movq (%r12), %rcx
movabsq $0x3f1a36e2eb1c432d, %rdx # imm = 0x3F1A36E2EB1C432D
movq %rdx, (%rcx)
cltq
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, -0x8(%rcx,%rax,8)
movsd 0xa28(%r13), %xmm0
movsd %xmm0, 0xc0(%r12)
movsd 0x340(%r15), %xmm0
movsd 0x20(%r15), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, 0x50(%r12)
movsd %xmm1, 0x58(%r12)
movsd 0x10(%r15), %xmm1
mulsd 0x328(%r15), %xmm1
mulsd 0xa5e7(%rip), %xmm1     # 0xf2760
mulsd 0xd93f(%rip), %xmm1     # 0xf5ac0
mulsd 0xda6f(%rip), %xmm1     # 0xf5bf8
movsd %xmm1, 0x88(%r12)
movq %rdx, 0x90(%r12)
movupd 0x30(%r15), %xmm1
movupd %xmm1, 0x60(%r12)
movups 0x48(%r15), %xmm2
movups %xmm2, 0x70(%r12)
movsd 0x90a5(%rip), %xmm2     # 0xf1260
subsd %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
subsd %xmm1, %xmm2
movsd %xmm2, 0x80(%r12)
movsd 0x18(%r15), %xmm1
movsd %xmm1, 0x98(%r12)
movsd 0x8(%r15), %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0xa0(%r12)
movsd 0x288(%r15), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0xa8(%r12)
movsd 0x128(%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xe8452
leaq 0x48d2e(%rip), %rsi     # 0x130f60
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x8e3c(%rip), %rsi      # 0xf1082
leaq 0x48d4b(%rip), %rdx     # 0x130f98
leaq 0x800(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8dc4(%rip), %rsi      # 0xf1034
leaq 0x48c5f(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x946, %ecx            # imm = 0x946
movq %r15, %r8
jmp 0xe84a2
leaq 0x8d76(%rip), %rsi      # 0xf1004
leaq 0x48c3d(%rip), %rdx     # 0x130ed2
movq %rsp, %r14
movq %r14, %rdi
movl $0x900, %ecx            # imm = 0x900
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8d7f(%rip), %rsi      # 0xf1034
leaq 0x48c1a(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x901, %ecx            # imm = 0x901
jmp 0xe849f
leaq 0x8d34(%rip), %rsi      # 0xf1004
leaq 0x48c1e(%rip), %rdx     # 0x130ef5
movq %rsp, %r14
movq %r14, %rdi
movl $0x400, %ecx            # imm = 0x400
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8d3d(%rip), %rsi      # 0xf1034
leaq 0x48bd8(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x921, %ecx            # imm = 0x921
jmp 0xe849f
leaq 0x8cf2(%rip), %rsi      # 0xf1004
leaq 0x48be9(%rip), %rdx     # 0x130f02
movq %rsp, %r14
movq %r14, %rdi
movl $0x1800, %ecx           # imm = 0x1800
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8cfb(%rip), %rsi      # 0xf1034
leaq 0x48b96(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x922, %ecx            # imm = 0x922
jmp 0xe849f
leaq 0x8cb0(%rip), %rsi      # 0xf1004
leaq 0x48bb9(%rip), %rdx     # 0x130f14
movq %rsp, %r14
movq %r14, %rdi
movl $0x400, %ecx            # imm = 0x400
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8cb9(%rip), %rsi      # 0xf1034
leaq 0x48b54(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x923, %ecx            # imm = 0x923
jmp 0xe849f
leaq 0x8c6e(%rip), %rsi      # 0xf1004
leaq 0x48b8d(%rip), %rdx     # 0x130f2a
movq %rsp, %r14
movq %r14, %rdi
movl $0x400, %ecx            # imm = 0x400
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8c77(%rip), %rsi      # 0xf1034
leaq 0x48b12(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x924, %ecx            # imm = 0x924
jmp 0xe849f
leaq 0x8c2c(%rip), %rsi      # 0xf1004
leaq 0x48b63(%rip), %rdx     # 0x130f42
movq %rsp, %r14
movq %r14, %rdi
movl $0x400, %ecx            # imm = 0x400
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8c35(%rip), %rsi      # 0xf1034
leaq 0x48ad0(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x925, %ecx            # imm = 0x925
jmp 0xe849f
leaq 0x8bea(%rip), %rsi      # 0xf1004
leaq 0x48b30(%rip), %rdx     # 0x130f51
movq %rsp, %r14
movq %r14, %rdi
movl $0x18, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8bf3(%rip), %rsi      # 0xf1034
leaq 0x48a8e(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x926, %ecx            # imm = 0x926
jmp 0xe849f
movq %r14, %rsi
callq 0xe84c4
testl %eax, %eax
je 0xe84c0
movl $0x100, %ecx            # imm = 0x100
addq 0x70(%r14), %rcx
leaq 0x8f82(%rip), %rsi      # 0xf13f0
leaq 0x48b35(%rip), %rdx     # 0x130faa
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0x8ba4(%rip), %rsi      # 0xf1034
leaq 0x48a3f(%rip), %rdx     # 0x130ed6
movq %rbx, %rdi
movl $0x94a, %ecx            # imm = 0x94A
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0xe84ae