// File: /workspace/github_c_makefile_star2_O2/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
movl 0x898(%rdi), %ebp
movsd 0x8b0(%rdi), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x8b8(%rdi), %xmm0
movsd %xmm0, (%rsp)
andl $0x0, 0xc(%rsp)
movq %rdx, %r13
movq %rsi, %r14
movslq 0x43c(%rsi), %rbx
leaq (,%rbx,8), %rdi
callq 0x8490
testq %rax, %rax
je 0xd9ec8
movq %rax, %r12
movq %r13, 0x10(%rsp)
movsd 0x18(%rsp), %xmm1
movsd (%rsp), %xmm2
subsd %xmm1, %xmm2
leal -0x1(%rbp), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x20(%rsp)
xorl %ebx, %ebx
testl %ebp, %ebp
cmovlel %ebx, %ebp
leaq 0x28(%rsp), %r13
movapd %xmm1, %xmm0
movsd %xmm2, (%rsp)
cmpq %rbx, %rbp
je 0xd9f0f
cvtsi2sd %ebx, %xmm1
mulsd %xmm2, %xmm1
divsd 0x20(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0xb417(%rip), %xmm0     # 0xe5260
divsd %xmm1, %xmm0
addsd 0xb993(%rip), %xmm0     # 0xe57e8
movq 0x20(%r15), %rax
movsd %xmm0, (%rax,%rbx,8)
movq %r14, %rdi
movq %r13, %rsi
callq 0x58adb
cmpl $0x1, %eax
je 0xd9f1e
movsd 0x28(%rsp), %xmm0
movq 0x28(%r15), %rax
movsd %xmm0, (%rax,%rbx,8)
movq %r14, %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
leaq 0xc(%rsp), %rcx
movq %r12, %r8
callq 0x5887d
cmpl $0x1, %eax
je 0xd9f66
movslq 0x424(%r14), %rax
movsd (%r12,%rax,8), %xmm0
movq 0x18(%r15), %rax
movsd %xmm0, (%rax,%rbx,8)
incq %rbx
movsd 0x18(%rsp), %xmm0
movsd (%rsp), %xmm2
jmp 0xd9e26
shll $0x3, %ebx
leaq 0xb132(%rip), %rsi      # 0xe5004
leaq 0x32259(%rip), %rdx     # 0x10c132
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %r13            # imm = 0x192
leaq 0xb13c(%rip), %rsi      # 0xe5034
leaq 0x4a31c(%rip), %rdx     # 0x12421b
movq %r13, %rdi
movl $0x54f, %ecx            # imm = 0x54F
movq %r14, %r8
jmp 0xd9faf
movq %r12, %rdi
callq 0x8430
xorl %eax, %eax
jmp 0xd9fb9
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0xb4c4(%rip), %rsi      # 0xe53f0
leaq 0x4a2fc(%rip), %rdx     # 0x12422f
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0xb0dc(%rip), %rsi      # 0xe5034
leaq 0x4a2bc(%rip), %rdx     # 0x12421b
movl $0x559, %ecx            # imm = 0x559
jmp 0xd9fac
addq $0xd1c, %r14            # imm = 0xD1C
leaq 0xb47c(%rip), %rsi      # 0xe53f0
leaq 0x49f30(%rip), %rdx     # 0x123eab
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
movq 0x10(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0xb094(%rip), %rsi      # 0xe5034
leaq 0x4a274(%rip), %rdx     # 0x12421b
movl $0x55f, %ecx            # imm = 0x55F
movq %rbx, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq