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

  struct hmcode_growth *phg;
  int i;
  double *pvec_growth;
  int *used_in_output;
  //int (*generic_evolver)() = evolver_ndf15;
  double f;
  /* This could be moved to the precision stucture, but to be sure to
     get the same as the original HMcode, we hard-code it to the same
     value: */
  double tol_hmcode_growth_integration = 1e-10;

  /* evolvers */
  extern int evolver_rk(EVOLVER_PROTOTYPE);
  extern int evolver_ndf15(EVOLVER_PROTOTYPE);
  int (*generic_evolver)(EVOLVER_PROTOTYPE) = evolver_ndf15;

  phg = phw->phg;

  class_alloc(pvec_growth,phg->fg_size*sizeof(double),phg->error_message);
  class_alloc(used_in_output,phg->fg_size*sizeof(int),phg->error_message);

  for(i=0;i<phg->fg_size;++i){
    used_in_output[i] = _TRUE_;
  }

  class_call(hmcode_norad(phg, phg->a_ini),
             phg->error_message,
             phg->error_message);

  f = 1.-phg->pvecnorad[phg->index_norad_Om];

  pvec_growth[phg->index_fg_g] = pow(phg->a_ini,1.-3.*f/5.);
  pvec_growth[phg->index_fg_dg] = (1.-3.*f/5.)*pow(phg->a_ini,-3.*f/5.);

  /** - perform the integration */
  class_call(generic_evolver(hmcode_growth_derivs,
                             phg->a_ini,
                             phg->a_final,
                             pvec_growth,
                             used_in_output,
                             phg->fg_size,
                             phg,
                             tol_hmcode_growth_integration,
                             phg->smallest_allowed_variation,
                             NULL,
                             1.,
                             phg->a_table,
                             phg->a_size,
                             hmcode_growth_sources,
                             NULL,
                             phg->error_message),
             phg->error_message,
             phg->error_message);

  class_call(array_spline_table_line_to_line(
                                             phg->a_table,
                                             phg->a_size,
                                             phg->growth_table,
                                             phg->gt_size,
                                             phg->index_gt_g,
                                             phg->index_gt_ddg,
                                             _SPLINE_EST_DERIV_,
                                             phg->error_message),
             phg->error_message,
             phg->error_message);

  class_call(array_integrate_spline_table_line_to_line(
                                                       phg->a_table,
                                                       phg->a_size,
                                                       phg->growth_table,
                                                       phg->gt_size,
                                                       phg->index_gt_g,
                                                       phg->index_gt_ddg,
                                                       phg->index_gt_intg,
                                                       phg->error_message),
             phg->error_message,
             phg->error_message);

  class_call(array_spline_table_line_to_line(
                                             phg->a_table,
                                             phg->a_size,
                                             phg->growth_table,
                                             phg->gt_size,
                                             phg->index_gt_intg,
                                             phg->index_gt_ddintg,
                                             _SPLINE_EST_DERIV_,
                                             phg->error_message),
             phg->error_message,
             phg->error_message);

  class_call(array_spline_table_line_to_line(
                                             phg->a_table,
                                             phg->a_size,
                                             phg->growth_table,
                                             phg->gt_size,
                                             phg->index_gt_Omnorad,
                                             phg->index_gt_ddOmnorad,
                                             _SPLINE_EST_DERIV_,
                                             phg->error_message),
             phg->error_message,
             phg->error_message);

  for(i=0;i<phg->a_size;++i){
    phg->normgrowth_table[i] /= phg->normgrowth_table[phg->a_size-1];
    //printf("%i - %.10e %.10e \n",i,phg->a_table[i],phg->normgrowth_table[i]);
  }

  class_call(array_spline_table_columns(
                                        phg->a_table,
                                        phg->a_size,
                                        phg->normgrowth_table,
                                        1,
                                        phg->ddnormgrowth_table,
                                        _SPLINE_EST_DERIV_,
                                        phg->error_message),
             phg->error_message,
             phg->error_message);

  class_call(array_spline_table_columns(
                                        phg->normgrowth_table,
                                        phg->a_size,
                                        phg->a_table,
                                        1,
                                        phg->dda_table,
                                        _SPLINE_EST_DERIV_,
                                        phg->error_message),
             phg->error_message,
             phg->error_message);

  for(i=0;i<phg->a_size;++i){
    //printf("%i - %.10e %.10e %.10e \n",i,phg->a_table[i],phg->ddnormgrowth_table[i],phg->dda_table[i]);
  }

  free(pvec_growth);
  free(used_in_output);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x810, %rsp            # imm = 0x810
movq 0x70(%rsi), %r14
movslq 0xd0(%r14), %rbx
leaq (,%rbx,8), %rdi
callq 0x8460
testq %rax, %rax
je 0xe8677
movq %rax, %r15
leaq (,%rbx,4), %rdi
callq 0x8460
testq %rax, %rax
je 0xe86b8
movq %rax, %r12
cmpl $0x0, 0xd0(%r14)
jle 0xe8533
xorl %eax, %eax
movl $0x1, (%r12,%rax,4)
incq %rax
movslq 0xd0(%r14), %rcx
cmpq %rcx, %rax
jl 0xe851c
movsd 0xb0(%r14), %xmm0
movq %r14, %rdi
callq 0xe8a0b
movq 0xe8(%r14), %rax
movslq 0xdc(%r14), %rcx
movsd 0x8d06(%rip), %xmm3     # 0xf1260
movapd %xmm3, %xmm1
subsd (%rax,%rcx,8), %xmm1
movsd 0xb0(%r14), %xmm0
mulsd 0xbefc(%rip), %xmm1     # 0xf4470
divsd 0x8cf4(%rip), %xmm1     # 0xf1270
movsd %xmm1, (%rsp)
addsd %xmm3, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x8620
movslq 0xc8(%r14), %rax
movsd %xmm0, (%r15,%rax,8)
movsd 0xb0(%r14), %xmm0
movsd (%rsp), %xmm1
callq 0x8620
mulsd 0x8(%rsp), %xmm0
movslq 0xcc(%r14), %rax
movsd %xmm0, (%r15,%rax,8)
movsd 0xb0(%r14), %xmm0
movsd 0xb8(%r14), %xmm1
movl 0xd0(%r14), %ecx
movsd 0xc0(%r14), %xmm3
movl 0x8(%r14), %eax
leaq 0x100(%r14), %rbx
subq $0x8, %rsp
leaq 0x726(%rip), %r10       # 0xe8d21
leaq 0x674(%rip), %rdi       # 0xe8c76
movsd 0xd63e(%rip), %xmm2     # 0xf5c48
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
movl $0x0, %r9d
movsd 0x8c3f(%rip), %xmm4     # 0xf1260
pushq %rbx
pushq $0x0
pushq %r10
pushq %rax
pushq (%r14)
callq 0xd5d4
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0xe86ff
leaq 0x8dad(%rip), %rsi      # 0xf13f0
leaq 0x489ba(%rip), %rdx     # 0x131004
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x89d1(%rip), %rsi      # 0xf1034
leaq 0x48978(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0x9b5, %ecx            # imm = 0x9B5
jmp 0xe8886
shll $0x3, %ebx
leaq 0x8983(%rip), %rsi      # 0xf1004
leaq 0x4894e(%rip), %rdx     # 0x130fd6
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x100, %r14            # imm = 0x100
leaq 0x898d(%rip), %rsi      # 0xf1034
leaq 0x48934(%rip), %rdx     # 0x130fe2
movq %r14, %rdi
movl $0x993, %ecx            # imm = 0x993
jmp 0xe86f7
shll $0x2, %ebx
leaq 0x8942(%rip), %rsi      # 0xf1004
leaq 0x2a34a(%rip), %rdx     # 0x112a13
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x100, %r14            # imm = 0x100
leaq 0x894c(%rip), %rsi      # 0xf1034
leaq 0x488f3(%rip), %rdx     # 0x130fe2
movq %r14, %rdi
movl $0x994, %ecx            # imm = 0x994
movq %r15, %r8
jmp 0xe8889
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movl 0x30(%r14), %ecx
movl 0x34(%r14), %r8d
movl 0x38(%r14), %r9d
pushq %rbx
pushq $0x1
callq 0x13c30
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe8762
leaq 0x8cc2(%rip), %rsi      # 0xf13f0
leaq 0x489d9(%rip), %rdx     # 0x13110e
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x88e6(%rip), %rsi      # 0xf1034
leaq 0x4888d(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0x9c1, %ecx            # imm = 0x9C1
jmp 0xe8886
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movl 0x30(%r14), %ecx
movl 0x34(%r14), %r8d
movl 0x38(%r14), %r9d
movl 0x3c(%r14), %eax
pushq %rbx
pushq %rax
callq 0x1337c
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe87c8
leaq 0x8c5c(%rip), %rsi      # 0xf13f0
leaq 0x48a0b(%rip), %rdx     # 0x1311a6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8880(%rip), %rsi      # 0xf1034
leaq 0x48827(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0x9cd, %ecx            # imm = 0x9CD
jmp 0xe8886
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movl 0x30(%r14), %ecx
movl 0x3c(%r14), %r8d
movl 0x40(%r14), %r9d
pushq %rbx
pushq $0x1
callq 0x13c30
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe8828
leaq 0x8bf9(%rip), %rsi      # 0xf13f0
leaq 0x48a5b(%rip), %rdx     # 0x131259
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x881d(%rip), %rsi      # 0xf1034
leaq 0x487c4(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0x9d9, %ecx            # imm = 0x9D9
jmp 0xe8886
movq (%r14), %rdi
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movl 0x30(%r14), %ecx
movl 0x44(%r14), %r8d
movl 0x48(%r14), %r9d
pushq %rbx
pushq $0x1
callq 0x13c30
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe88a7
leaq 0x8b99(%rip), %rsi      # 0xf13f0
leaq 0x48a99(%rip), %rdx     # 0x1312f7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x87bd(%rip), %rsi      # 0xf1034
leaq 0x48764(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0x9e5, %ecx            # imm = 0x9E5
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
movl %ebp, %eax
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movslq 0x8(%r14), %rsi
testq %rsi, %rsi
jle 0xe88ce
movq 0x18(%r14), %rax
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
divsd -0x8(%rax,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0xe88b6
movq (%r14), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %rbx
callq 0x15654
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe8934
leaq 0x8aed(%rip), %rsi      # 0xf13f0
leaq 0x48a91(%rip), %rdx     # 0x13139b
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8711(%rip), %rsi      # 0xf1034
leaq 0x486b8(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0x9f5, %ecx            # imm = 0x9F5
jmp 0xe899c
movq 0x18(%r14), %rdi
movl 0x8(%r14), %esi
movq (%r14), %rdx
movq 0x28(%r14), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %rbx
callq 0x15654
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe89ab
leaq 0x8a83(%rip), %rsi      # 0xf13f0
leaq 0x48aa8(%rip), %rdx     # 0x13141c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x86a7(%rip), %rsi      # 0xf1034
leaq 0x4864e(%rip), %rdx     # 0x130fe2
movq %rbx, %rdi
movl $0xa00, %ecx            # imm = 0xA00
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0xe8895
movq %r15, %rdi
callq 0x8410
movq %r12, %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0xe8895