// File: /workspace/github_c_makefile_star2_O2/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 0x8490
testq %rax, %rax
je 0xdcdd7
movq %rax, %r15
leaq (,%rbx,4), %rdi
callq 0x8490
testq %rax, %rax
je 0xdce18
movq %rax, %r12
xorl %eax, %eax
cmpq %rbx, %rax
jge 0xdcc84
movl $0x1, (%r12,%rax,4)
incq %rax
jmp 0xdcc72
movsd 0xb0(%r14), %xmm0
movq %r14, %rdi
callq 0xdd154
movq 0xe8(%r14), %rax
movslq 0xdc(%r14), %rcx
movsd 0x85b5(%rip), %xmm3     # 0xe5260
movapd %xmm3, %xmm1
subsd (%rax,%rcx,8), %xmm1
movsd 0xb0(%r14), %xmm0
mulsd 0xb77b(%rip), %xmm1     # 0xe8440
divsd 0x85a3(%rip), %xmm1     # 0xe5270
movsd %xmm1, (%rsp)
addsd %xmm3, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x8650
movslq 0xc8(%r14), %rax
movsd %xmm0, (%r15,%rax,8)
movsd 0xb0(%r14), %xmm0
movsd (%rsp), %xmm1
callq 0x8650
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
movq (%r14), %rax
movl 0x8(%r14), %edx
leaq 0x100(%r14), %rbx
subq $0x30, %rsp
movq %rbx, 0x20(%rsp)
leaq 0x6fd(%rip), %rsi       # 0xdd451
movq %rsi, 0x10(%rsp)
movl %edx, 0x8(%rsp)
movq %rax, (%rsp)
andq $0x0, 0x18(%rsp)
leaq 0x63a(%rip), %rdi       # 0xdd3a8
movsd 0xcdc2(%rip), %xmm2     # 0xe9b38
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %r8
xorl %r9d, %r9d
movsd 0x84d6(%rip), %xmm4     # 0xe5260
callq 0xbddc
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0xdce5f
leaq 0x864d(%rip), %rsi      # 0xe53f0
leaq 0x480fa(%rip), %rdx     # 0x124ea4
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8271(%rip), %rsi      # 0xe5034
leaq 0x480b8(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0x9b5, %ecx            # imm = 0x9B5
jmp 0xdcfde
shll $0x3, %ebx
leaq 0x8223(%rip), %rsi      # 0xe5004
leaq 0x4808e(%rip), %rdx     # 0x124e76
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x100, %r14            # imm = 0x100
leaq 0x822d(%rip), %rsi      # 0xe5034
leaq 0x48074(%rip), %rdx     # 0x124e82
movq %r14, %rdi
movl $0x993, %ecx            # imm = 0x993
jmp 0xdce57
shll $0x2, %ebx
leaq 0x81e2(%rip), %rsi      # 0xe5004
leaq 0x29ada(%rip), %rdx     # 0x106903
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x100, %r14            # imm = 0x100
leaq 0x81ec(%rip), %rsi      # 0xe5034
leaq 0x48033(%rip), %rdx     # 0x124e82
movq %r14, %rdi
movl $0x994, %ecx            # imm = 0x994
movq %r15, %r8
jmp 0xdcfe1
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 0x12065
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0xdcec0
leaq 0x8564(%rip), %rsi      # 0xe53f0
leaq 0x4811b(%rip), %rdx     # 0x124fae
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8188(%rip), %rsi      # 0xe5034
leaq 0x47fcf(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0x9c1, %ecx            # imm = 0x9C1
jmp 0xdcfde
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 0x117fe
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0xdcf24
leaq 0x8500(%rip), %rsi      # 0xe53f0
leaq 0x4814f(%rip), %rdx     # 0x125046
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8124(%rip), %rsi      # 0xe5034
leaq 0x47f6b(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0x9cd, %ecx            # imm = 0x9CD
jmp 0xdcfde
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 0x12065
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0xdcf82
leaq 0x849f(%rip), %rsi      # 0xe53f0
leaq 0x481a1(%rip), %rdx     # 0x1250f9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x80c3(%rip), %rsi      # 0xe5034
leaq 0x47f0a(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0x9d9, %ecx            # imm = 0x9D9
jmp 0xdcfde
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 0x12065
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0xdcffd
leaq 0x8441(%rip), %rsi      # 0xe53f0
leaq 0x481e1(%rip), %rdx     # 0x125197
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x8065(%rip), %rsi      # 0xe5034
leaq 0x47eac(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0x9e5, %ecx            # imm = 0x9E5
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movslq 0x8(%r14), %rsi
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
cmpq %rax, %rcx
je 0xdd02b
movq 0x18(%r14), %rdx
movsd (%rdx,%rax,8), %xmm0
divsd -0x8(%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rax,8)
incq %rax
jmp 0xdd00d
movq (%r14), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
pushq %rbx
callq 0x139d8
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0xdd087
leaq 0x839a(%rip), %rsi      # 0xe53f0
leaq 0x481de(%rip), %rdx     # 0x12523b
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7fbe(%rip), %rsi      # 0xe5034
leaq 0x47e05(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0x9f5, %ecx            # imm = 0x9F5
jmp 0xdd0e5
movq 0x18(%r14), %rdi
movl 0x8(%r14), %esi
movq (%r14), %rdx
movq 0x28(%r14), %r8
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
pushq %rbx
callq 0x139d8
popq %rcx
popq %rdx
cmpl $0x1, %eax
jne 0xdd0f4
leaq 0x833a(%rip), %rsi      # 0xe53f0
leaq 0x481ff(%rip), %rdx     # 0x1252bc
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7f5e(%rip), %rsi      # 0xe5034
leaq 0x47da5(%rip), %rdx     # 0x124e82
movq %rbx, %rdi
movl $0xa00, %ecx            # imm = 0xA00
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0xdcfeb
movq %r15, %rdi
callq 0x8430
movq %r12, %rdi
callq 0x8430
xorl %ebp, %ebp
jmp 0xdcfeb