// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x1878, %rsp           # imm = 0x1878
movq %rdi, 0x1868(%rsp)
movq %rsi, 0x1860(%rsp)
movq %rdx, 0x1858(%rsp)
movq %rcx, 0x1850(%rsp)
movq 0x1868(%rsp), %rax
movl 0x898(%rax), %eax
movl %eax, 0x181c(%rsp)
movq 0x1868(%rsp), %rax
movsd 0x8b0(%rax), %xmm0
movsd %xmm0, 0x1840(%rsp)
movq 0x1868(%rsp), %rax
movsd 0x8b8(%rax), %xmm0
movsd %xmm0, 0x1838(%rsp)
movl $0x0, 0x1820(%rsp)
movq 0x1860(%rsp), %rax
movslq 0x43c(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x1810(%rsp)
cmpq $0x0, 0x1810(%rsp)
jne 0x1bd313
movq 0x1860(%rsp), %rax
movslq 0x43c(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x180c(%rsp)
leaq 0x1000(%rsp), %rdi
movl 0x180c(%rsp), %ecx
leaq 0x14d40(%rip), %rsi     # 0x1d2004
leaq 0x3bfac(%rip), %rdx     # 0x1f9277
movb $0x0, %al
callq 0x5b9c0
movq 0x1858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x1000(%rsp), %r8
leaq 0x14d44(%rip), %rsi     # 0x1d2034
leaq 0x5459d(%rip), %rdx     # 0x211894
movl $0x54f, %ecx            # imm = 0x54F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1874(%rsp)
jmp 0x1bd568
movl $0x0, 0x1824(%rsp)
movl 0x1824(%rsp), %eax
cmpl 0x181c(%rsp), %eax
jge 0x1bd550
movsd 0x1840(%rsp), %xmm0
movsd 0x1838(%rsp), %xmm1
subsd 0x1840(%rsp), %xmm1
cvtsi2sdl 0x1824(%rsp), %xmm2
mulsd %xmm2, %xmm1
movl 0x181c(%rsp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm2
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x1830(%rsp)
movsd 0x14ec7(%rip), %xmm0    # 0x1d2248
divsd 0x1830(%rsp), %xmm0
movsd 0x14eb6(%rip), %xmm1    # 0x1d2248
subsd %xmm1, %xmm0
movsd %xmm0, 0x1848(%rsp)
movsd 0x1848(%rsp), %xmm0
movq 0x1850(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x1824(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x1860(%rsp), %rdi
movsd 0x1848(%rsp), %xmm0
leaq 0x1828(%rsp), %rsi
callq 0x9ee00
cmpl $0x1, %eax
jne 0x1bd451
leaq 0x800(%rsp), %rdi
movq 0x1860(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x14fd6(%rip), %rsi     # 0x1d23d8
leaq 0x5449f(%rip), %rdx     # 0x2118a8
movb $0x0, %al
callq 0x5b9c0
movq 0x1858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
leaq 0x800(%rsp), %r8
leaq 0x14c06(%rip), %rsi     # 0x1d2034
leaq 0x5445f(%rip), %rdx     # 0x211894
movl $0x559, %ecx            # imm = 0x559
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1874(%rsp)
jmp 0x1bd568
movsd 0x1828(%rsp), %xmm0
movq 0x1850(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x1824(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x1860(%rsp), %rdi
movsd 0x1828(%rsp), %xmm0
movq 0x1810(%rsp), %r8
movl $0x2, %esi
xorl %edx, %edx
leaq 0x1820(%rsp), %rcx
callq 0x9e9b0
cmpl $0x1, %eax
jne 0x1bd505
movq %rsp, %rdi
movq 0x1860(%rsp), %rcx
addq $0xd1c, %rcx            # imm = 0xD1C
leaq 0x14f1a(%rip), %rsi     # 0x1d23d8
leaq 0x53ffd(%rip), %rdx     # 0x2114c2
movb $0x0, %al
callq 0x5b9c0
movq 0x1858(%rsp), %rdi
addq $0x192, %rdi            # imm = 0x192
movq %rsp, %r8
leaq 0x14b4f(%rip), %rsi     # 0x1d2034
leaq 0x543a8(%rip), %rdx     # 0x211894
movl $0x55f, %ecx            # imm = 0x55F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1874(%rsp)
jmp 0x1bd568
movq 0x1810(%rsp), %rax
movq 0x1860(%rsp), %rcx
movslq 0x424(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1850(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x1824(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x1824(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1824(%rsp)
jmp 0x1bd31e
movq 0x1810(%rsp), %rdi
callq 0x8420
movl $0x0, 0x1874(%rsp)
movl 0x1874(%rsp), %eax
addq $0x1878, %rsp           # imm = 0x1878
retq
nopw (%rax,%rax)