// File: /workspace/github_c_makefile_star2_O1/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 0xe5770
movq %rax, %r12
movq %rbp, 0x10(%rsp)
testl %ebx, %ebx
jle 0xe5761
movsd (%rsp), %xmm0
subsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsp)
leal -0x1(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
xorl %ebp, %ebp
leaq 0x20(%rsp), %r13
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
mulsd (%rsp), %xmm1
divsd 0x28(%rsp), %xmm1
addsd 0x18(%rsp), %xmm1
movsd 0xbb7f(%rip), %xmm0     # 0xf1260
divsd %xmm1, %xmm0
addsd 0xc0fb(%rip), %xmm0     # 0xf17e8
movq 0x20(%r15), %rax
movsd %xmm0, (%rax,%rbp,8)
movq %r14, %rdi
movq %r13, %rsi
callq 0x5efb7
cmpl $0x1, %eax
je 0xe57b9
movsd 0x20(%rsp), %xmm0
movq 0x28(%r15), %rax
movsd %xmm0, (%rax,%rbp,8)
movsd 0x20(%rsp), %xmm0
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
leaq 0xc(%rsp), %rcx
movq %r12, %r8
callq 0x5ed53
cmpl $0x1, %eax
je 0xe5801
movslq 0x424(%r14), %rax
movsd (%r12,%rax,8), %xmm0
movq 0x18(%r15), %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
cmpq %rbp, %rbx
jne 0xe56c1
movq %r12, %rdi
callq 0x8410
xorl %eax, %eax
jmp 0xe5856
shll $0x3, %r13d
leaq 0xb889(%rip), %rsi      # 0xf1004
leaq 0x32ad0(%rip), %rdx     # 0x118252
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbp            # imm = 0x192
leaq 0xb892(%rip), %rsi      # 0xf1034
leaq 0x4abd2(%rip), %rdx     # 0x13037b
movq %rbp, %rdi
movl $0x54f, %ecx            # imm = 0x54F
movq %r14, %r8
jmp 0xe584a
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0xbc29(%rip), %rsi      # 0xf13f0
leaq 0x4abc1(%rip), %rdx     # 0x13038f
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0xb841(%rip), %rsi      # 0xf1034
leaq 0x4ab81(%rip), %rdx     # 0x13037b
movl $0x559, %ecx            # imm = 0x559
jmp 0xe5847
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0xbbe1(%rip), %rsi      # 0xf13f0
leaq 0x4a7f5(%rip), %rdx     # 0x13000b
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0xb7f9(%rip), %rsi      # 0xf1034
leaq 0x4ab39(%rip), %rdx     # 0x13037b
movl $0x55f, %ecx            # imm = 0x55F
movq %r15, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq