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

  double z, ainit, amax, scalefactor, tau_growth;
  int index_scalefactor, last_index, ng;
  double *pvecback;

  ng = ppr->n_hmcode_tables;
  ainit = ppr->ainit_for_growtab;
  amax = ppr->amax_for_growtab;

  last_index = 0;

  class_alloc(pvecback,pba->bg_size*sizeof(double),pfo->error_message);

  for (index_scalefactor=0;index_scalefactor<ng;index_scalefactor++){
    scalefactor = ainit+(amax-ainit)*(index_scalefactor)/(ng-1);
    z = 1./scalefactor-1.;

    phw->ztable[index_scalefactor] = z;

    class_call(background_tau_of_z(pba, z, &tau_growth),
               pba->error_message,
               pfo->error_message);

    phw->tautable[index_scalefactor] = tau_growth;

    class_call(background_at_tau(pba,tau_growth,long_info,inter_normal,&last_index,pvecback),
               pba->error_message,
               pfo->error_message);

    phw->growtable[index_scalefactor] = pvecback[pba->index_bg_D];

  }

  free(pvecback);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r14
movl 0x898(%rdi), %ebx
movsd 0x8b0(%rdi), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x8b8(%rdi), %xmm0
movsd %xmm0, (%rsp)
movl $0x0, 0xc(%rsp)
movslq 0x43c(%rsi), %r13
leaq (,%r13,8), %rdi
callq 0x8460
testq %rax, %rax
je 0xe223c
movq %rax, %r12
movq %rbp, 0x10(%rsp)
testl %ebx, %ebx
jle 0xe222d
movsd (%rsp), %xmm0
subsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
leal -0x1(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rsp)
xorl %ebp, %ebp
leaq 0x28(%rsp), %r13
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
mulsd (%rsp), %xmm1
divsd 0x20(%rsp), %xmm1
addsd 0x18(%rsp), %xmm1
movsd 0xc0ad(%rip), %xmm0     # 0xee260
divsd %xmm1, %xmm0
addsd 0xc629(%rip), %xmm0     # 0xee7e8
movq 0x20(%r15), %rax
movsd %xmm0, (%rax,%rbp,8)
movq %r14, %rdi
movq %r13, %rsi
callq 0x5c896
cmpl $0x1, %eax
je 0xe2285
movsd 0x28(%rsp), %xmm0
movq 0x28(%r15), %rax
movsd %xmm0, (%rax,%rbp,8)
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
leaq 0xc(%rsp), %rcx
movq %r12, %r8
callq 0x5c63f
cmpl $0x1, %eax
je 0xe22cd
movslq 0x424(%r14), %rax
movsd (%r12,%rax,8), %xmm0
movq 0x18(%r15), %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
cmpq %rbp, %rbx
jne 0xe2193
movq %r12, %rdi
callq 0x8410
xorl %eax, %eax
jmp 0xe2322
shll $0x3, %r13d
leaq 0xbdbd(%rip), %rsi      # 0xee004
leaq 0x33044(%rip), %rdx     # 0x115292
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbp            # imm = 0x192
leaq 0xbdc6(%rip), %rsi      # 0xee034
leaq 0x4b136(%rip), %rdx     # 0x12d3ab
movq %rbp, %rdi
movl $0x54f, %ecx            # imm = 0x54F
movq %r14, %r8
jmp 0xe2316
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0xc15d(%rip), %rsi      # 0xee3f0
leaq 0x4b125(%rip), %rdx     # 0x12d3bf
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0xbd75(%rip), %rsi      # 0xee034
leaq 0x4b0e5(%rip), %rdx     # 0x12d3ab
movl $0x559, %ecx            # imm = 0x559
jmp 0xe2313
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0xc115(%rip), %rsi      # 0xee3f0
leaq 0x4ad59(%rip), %rdx     # 0x12d03b
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0xbd2d(%rip), %rsi      # 0xee034
leaq 0x4b09d(%rip), %rdx     # 0x12d3ab
movl $0x55f, %ecx            # imm = 0x55F
movq %r15, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq