// File: /workspace/github_c_makefile_star2_O3/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), %rbx
movslq 0xd0(%rbx), %r12
leaq (,%r12,8), %rdi
callq 0x8460
testq %rax, %rax
je 0xe526e
movq %rax, %r14
leaq (,%r12,4), %rdi
callq 0x8460
testq %rax, %rax
je 0xe52b1
movq %rax, %r15
testl %r12d, %r12d
jle 0xe5132
leal 0x3(%r12), %eax
decq %r12
movq %r12, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %eax
shlq $0x4, %rax
movdqa 0xd9db(%rip), %xmm1     # 0xf2a30
movdqa 0x9c23(%rip), %xmm2     # 0xeec80
xorl %ecx, %ecx
movdqa 0x9c29(%rip), %xmm3     # 0xeec90
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0xd9c9(%rip), %xmm5     # 0xf2a40
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0xe50b3
movl $0x1, (%r15,%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xe50ca
movl $0x1, 0x4(%r15,%rcx)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0xe510a
movl $0x1, 0x8(%r15,%rcx)
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xe511d
movl $0x1, 0xc(%r15,%rcx)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0xe5077
movsd 0xb0(%rbx), %xmm0
movq %rbx, %rdi
callq 0xe55fe
movq 0xe8(%rbx), %rax
movslq 0xdc(%rbx), %rcx
movsd 0x9108(%rip), %xmm3     # 0xee260
movapd %xmm3, %xmm1
subsd (%rax,%rcx,8), %xmm1
movsd 0xb0(%rbx), %xmm0
mulsd 0xc30f(%rip), %xmm1     # 0xf1480
divsd 0x90f7(%rip), %xmm1     # 0xee270
movsd %xmm1, (%rsp)
addsd %xmm3, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x8620
movslq 0xc8(%rbx), %rax
movsd %xmm0, (%r14,%rax,8)
movsd 0xb0(%rbx), %xmm0
movsd (%rsp), %xmm1
callq 0x8620
mulsd 0x8(%rsp), %xmm0
movslq 0xcc(%rbx), %rax
movsd %xmm0, (%r14,%rax,8)
movsd 0xb0(%rbx), %xmm0
movsd 0xb8(%rbx), %xmm1
movl 0xd0(%rbx), %ecx
movsd 0xc0(%rbx), %xmm3
movl 0x8(%rbx), %eax
leaq 0x100(%rbx), %r12
subq $0x8, %rsp
leaq 0x709(%rip), %r10       # 0xe58fb
leaq 0x659(%rip), %rdi       # 0xe5852
movsd 0xda77(%rip), %xmm2     # 0xf2c78
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
movl $0x0, %r9d
movsd 0x9048(%rip), %xmm4     # 0xee260
pushq %r12
pushq $0x0
pushq %r10
pushq %rax
pushq (%rbx)
callq 0xd6b8
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0xe52fa
leaq 0x91b6(%rip), %rsi      # 0xee3f0
leaq 0x48df3(%rip), %rdx     # 0x12e034
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8dda(%rip), %rsi      # 0xee034
leaq 0x48db1(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0x9b5, %ecx            # imm = 0x9B5
jmp 0xe547c
shll $0x3, %r12d
leaq 0x8d8b(%rip), %rsi      # 0xee004
leaq 0x48d86(%rip), %rdx     # 0x12e006
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x100, %rbx            # imm = 0x100
leaq 0x8d94(%rip), %rsi      # 0xee034
leaq 0x48d6b(%rip), %rdx     # 0x12e012
movq %rbx, %rdi
movl $0x993, %ecx            # imm = 0x993
jmp 0xe52f2
shll $0x2, %r12d
leaq 0x8d48(%rip), %rsi      # 0xee004
leaq 0x2a7a0(%rip), %rdx     # 0x10fa63
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x100, %rbx            # imm = 0x100
leaq 0x8d51(%rip), %rsi      # 0xee034
leaq 0x48d28(%rip), %rdx     # 0x12e012
movq %rbx, %rdi
movl $0x994, %ecx            # imm = 0x994
movq %r14, %r8
jmp 0xe547f
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movl 0x30(%rbx), %ecx
movl 0x34(%rbx), %r8d
movl 0x38(%rbx), %r9d
pushq %r12
pushq $0x1
callq 0x13d65
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe535c
leaq 0x90c8(%rip), %rsi      # 0xee3f0
leaq 0x48e0f(%rip), %rdx     # 0x12e13e
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8cec(%rip), %rsi      # 0xee034
leaq 0x48cc3(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0x9c1, %ecx            # imm = 0x9C1
jmp 0xe547c
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movl 0x30(%rbx), %ecx
movl 0x34(%rbx), %r8d
movl 0x38(%rbx), %r9d
movl 0x3c(%rbx), %eax
pushq %r12
pushq %rax
callq 0x134f5
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe53c0
leaq 0x9064(%rip), %rsi      # 0xee3f0
leaq 0x48e43(%rip), %rdx     # 0x12e1d6
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8c88(%rip), %rsi      # 0xee034
leaq 0x48c5f(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0x9cd, %ecx            # imm = 0x9CD
jmp 0xe547c
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movl 0x30(%rbx), %ecx
movl 0x3c(%rbx), %r8d
movl 0x40(%rbx), %r9d
pushq %r12
pushq $0x1
callq 0x13d65
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe541f
leaq 0x9002(%rip), %rsi      # 0xee3f0
leaq 0x48e94(%rip), %rdx     # 0x12e289
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8c26(%rip), %rsi      # 0xee034
leaq 0x48bfd(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0x9d9, %ecx            # imm = 0x9D9
jmp 0xe547c
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movl 0x30(%rbx), %ecx
movl 0x44(%rbx), %r8d
movl 0x48(%rbx), %r9d
pushq %r12
pushq $0x1
callq 0x13d65
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe549d
leaq 0x8fa3(%rip), %rsi      # 0xee3f0
leaq 0x48ed3(%rip), %rdx     # 0x12e327
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8bc7(%rip), %rsi      # 0xee034
leaq 0x48b9e(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0x9e5, %ecx            # imm = 0x9E5
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movslq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
testq %rsi, %rsi
jle 0xe54c4
xorl %eax, %eax
movsd (%rdx,%rax,8), %xmm0
divsd -0x8(%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rax,8)
incq %rax
cmpq %rax, %rsi
jne 0xe54ac
movq (%rbx), %rdi
movq 0x20(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %r12
callq 0x1577e
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe5527
leaq 0x8efa(%rip), %rsi      # 0xee3f0
leaq 0x48ece(%rip), %rdx     # 0x12e3cb
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8b1e(%rip), %rsi      # 0xee034
leaq 0x48af5(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0x9f5, %ecx            # imm = 0x9F5
jmp 0xe558f
movq 0x18(%rbx), %rdi
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
movq 0x28(%rbx), %r8
subq $0x8, %rsp
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
pushq %r12
callq 0x1577e
addq $0x10, %rsp
cmpl $0x1, %eax
jne 0xe559e
leaq 0x8e90(%rip), %rsi      # 0xee3f0
leaq 0x48ee5(%rip), %rdx     # 0x12e44c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x8ab4(%rip), %rsi      # 0xee034
leaq 0x48a8b(%rip), %rdx     # 0x12e012
movq %r12, %rdi
movl $0xa00, %ecx            # imm = 0xA00
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0xe548b
movq %r14, %rdi
callq 0x8410
movq %r15, %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0xe548b