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

  int ng;
  int index_pk;

  /** - allocate arrays of the hmcode workspace */

  class_alloc(phw->rtab,ppr->n_hmcode_tables*sizeof(double),pfo->error_message);
  class_alloc(phw->stab,ppr->n_hmcode_tables*sizeof(double),pfo->error_message);
  class_alloc(phw->ddstab,ppr->n_hmcode_tables*sizeof(double),pfo->error_message);

  ng = ppr->n_hmcode_tables;

  class_alloc(phw->growtable,ng*sizeof(double),pfo->error_message);
  class_alloc(phw->ztable,ng*sizeof(double),pfo->error_message);
  class_alloc(phw->tautable,ng*sizeof(double),pfo->error_message);

  class_alloc(phw->sigma_8,pfo->pk_size*sizeof(double *),pfo->error_message);
  class_alloc(phw->sigma_disp,pfo->pk_size*sizeof(double *),pfo->error_message);
  class_alloc(phw->sigma_disp_100,pfo->pk_size*sizeof(double *),pfo->error_message);
  class_alloc(phw->sigma_prime,pfo->pk_size*sizeof(double *),pfo->error_message);

  for (index_pk=0; index_pk<pfo->pk_size; index_pk++){
    class_alloc(phw->sigma_8[index_pk],pfo->tau_size*sizeof(double),pfo->error_message);
    class_alloc(phw->sigma_disp[index_pk],pfo->tau_size*sizeof(double),pfo->error_message);
    class_alloc(phw->sigma_disp_100[index_pk],pfo->tau_size*sizeof(double),pfo->error_message);
    class_alloc(phw->sigma_prime[index_pk],pfo->tau_size*sizeof(double),pfo->error_message);
  }

  /** - fill table with scale independent growth factor */

  class_call(hmcode_fill_growtab(ppr,pba,pfo,phw),
             pfo->error_message,
             pfo->error_message);

  class_alloc(phw->pk_wiggle, pfo->nk_wiggle*sizeof(double), pfo->error_message);
  class_alloc(phw->ddpk_wiggle, pfo->nk_wiggle*sizeof(double), pfo->error_message);
  class_alloc(phw->lnk_wiggle, pfo->nk_wiggle*sizeof(double), pfo->error_message);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movslq 0x898(%rdi), %rbp
movq %rbp, %r13
shlq $0x3, %r13
movq %r13, %rdi
callq 0x8460
movq %rax, (%r14)
testq %rax, %rax
je 0xe5119
movq %r13, %rdi
callq 0x8460
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0xe515f
movq %r13, %rdi
callq 0x8460
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xe51a5
movq %r13, %rdi
callq 0x8460
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0xe51eb
movq %r13, %rdi
callq 0x8460
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0xe522d
movq %r13, %rdi
callq 0x8460
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xe526f
movslq 0x64(%rbx), %r13
leaq (,%r13,8), %rbp
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x30(%r14)
testq %rax, %rax
je 0xe52b1
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x38(%r14)
testq %rax, %rax
je 0xe52f7
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0xe533d
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0xe5380
movq %r13, 0x8(%rsp)
testl %r13d, %r13d
jle 0xe50be
movslq 0x140(%rbx), %rbp
movq %rbp, (%rsp)
shlq $0x3, %rbp
xorl %r13d, %r13d
movq %rbp, %rdi
callq 0x8460
movq 0x30(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x30(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe5474
movq %rbp, %rdi
callq 0x8460
movq 0x38(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x38(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe54be
movq %rbp, %rdi
callq 0x8460
movq 0x40(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x40(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe5508
movq %rbp, %rdi
callq 0x8460
movq 0x48(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x48(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe5552
incq %r13
cmpq %r13, 0x8(%rsp)
jne 0xe5034
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xe562a
testl %eax, %eax
je 0xe53e2
addq $0x192, %rbx            # imm = 0x192
leaq 0xc30b(%rip), %rsi      # 0xf13f0
leaq 0x4ae77(%rip), %rdx     # 0x12ff63
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xbf2f(%rip), %rsi      # 0xf1034
leaq 0x4ad56(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3c3, %ecx            # imm = 0x3C3
jmp 0xe53c1
leal (,%rbp,8), %ecx
leaq 0xbedd(%rip), %rsi      # 0xf1004
leaq 0x4ad2a(%rip), %rdx     # 0x12fe58
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbee9(%rip), %rsi      # 0xf1034
leaq 0x4ad10(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3a9, %ecx            # imm = 0x3A9
jmp 0xe53c1
leal (,%rbp,8), %ecx
leaq 0xbe97(%rip), %rsi      # 0xf1004
leaq 0x4ad04(%rip), %rdx     # 0x12fe78
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbea3(%rip), %rsi      # 0xf1034
leaq 0x4acca(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3aa, %ecx            # imm = 0x3AA
jmp 0xe53c1
leal (,%rbp,8), %ecx
leaq 0xbe51(%rip), %rsi      # 0xf1004
leaq 0x4acc8(%rip), %rdx     # 0x12fe82
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbe5d(%rip), %rsi      # 0xf1034
leaq 0x4ac84(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3ab, %ecx            # imm = 0x3AB
jmp 0xe53c1
leaq 0xbe12(%rip), %rsi      # 0xf1004
leaq 0x4ac95(%rip), %rdx     # 0x12fe8e
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbe1b(%rip), %rsi      # 0xf1034
leaq 0x4ac42(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3af, %ecx            # imm = 0x3AF
jmp 0xe53c1
leaq 0xbdd0(%rip), %rsi      # 0xf1004
leaq 0x4ac62(%rip), %rdx     # 0x12fe9d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbdd9(%rip), %rsi      # 0xf1034
leaq 0x4ac00(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b0, %ecx            # imm = 0x3B0
jmp 0xe53c1
leaq 0xbd8e(%rip), %rsi      # 0xf1004
leaq 0x4ac2c(%rip), %rdx     # 0x12fea9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbd97(%rip), %rsi      # 0xf1034
leaq 0x4abbe(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b1, %ecx            # imm = 0x3B1
jmp 0xe53c1
shll $0x3, %r13d
leaq 0xbd48(%rip), %rsi      # 0xf1004
leaq 0x4abf4(%rip), %rdx     # 0x12feb7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbd51(%rip), %rsi      # 0xf1034
leaq 0x4ab78(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b3, %ecx            # imm = 0x3B3
jmp 0xe53c1
shll $0x3, %r13d
leaq 0xbd02(%rip), %rsi      # 0xf1004
leaq 0x4abbb(%rip), %rdx     # 0x12fec4
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbd0b(%rip), %rsi      # 0xf1034
leaq 0x4ab32(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b4, %ecx            # imm = 0x3B4
jmp 0xe53c1
shll $0x3, %r13d
leaq 0xbcbc(%rip), %rsi      # 0xf1004
leaq 0x4ab85(%rip), %rdx     # 0x12fed4
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbcc5(%rip), %rsi      # 0xf1034
leaq 0x4aaec(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b5, %ecx            # imm = 0x3B5
jmp 0xe53c1
shll $0x3, %r13d
leaq 0xbc79(%rip), %rsi      # 0xf1004
leaq 0x4ab56(%rip), %rdx     # 0x12fee8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbc82(%rip), %rsi      # 0xf1034
leaq 0x4aaa9(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b6, %ecx            # imm = 0x3B6
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x2c(%rbx), %r12
movq %r12, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x8460
movq %rax, 0x60(%r14)
testq %rax, %rax
je 0xe559c
movq %r15, %rdi
callq 0x8460
movq %rax, 0x68(%r14)
testq %rax, %rax
je 0xe55e3
movq %r15, %rdi
callq 0x8460
movq %rax, %rcx
movq %rax, 0x58(%r14)
xorl %eax, %eax
testq %rcx, %rcx
jne 0xe53d0
leal (,%r12,8), %ecx
leaq 0xbbc8(%rip), %rsi      # 0xf1004
leaq 0x4ab65(%rip), %rdx     # 0x12ffa8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbbd4(%rip), %rsi      # 0xf1034
leaq 0x4a9fb(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3c7, %ecx            # imm = 0x3C7
jmp 0xe53c1
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xbb7e(%rip), %rsi      # 0xf1004
leaq 0x4aa6c(%rip), %rdx     # 0x12fef9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbb8a(%rip), %rsi      # 0xf1034
leaq 0x4a9b1(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3b9, %ecx            # imm = 0x3B9
jmp 0xe53c1
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xbb34(%rip), %rsi      # 0xf1004
leaq 0x4aa39(%rip), %rdx     # 0x12ff10
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbb40(%rip), %rsi      # 0xf1034
leaq 0x4a967(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3ba, %ecx            # imm = 0x3BA
jmp 0xe53c1
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xbaea(%rip), %rsi      # 0xf1004
leaq 0x4aa09(%rip), %rdx     # 0x12ff2a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbaf6(%rip), %rsi      # 0xf1034
leaq 0x4a91d(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3bb, %ecx            # imm = 0x3BB
jmp 0xe53c1
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xbaa0(%rip), %rsi      # 0xf1004
leaq 0x4a9dd(%rip), %rdx     # 0x12ff48
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xbaac(%rip), %rsi      # 0xf1034
leaq 0x4a8d3(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3bc, %ecx            # imm = 0x3BC
jmp 0xe53c1
leal (,%r12,8), %ecx
leaq 0xba59(%rip), %rsi      # 0xf1004
leaq 0x4a9d6(%rip), %rdx     # 0x12ff88
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xba65(%rip), %rsi      # 0xf1034
leaq 0x4a88c(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3c5, %ecx            # imm = 0x3C5
jmp 0xe53c1
leal (,%r12,8), %ecx
leaq 0xba12(%rip), %rsi      # 0xf1004
leaq 0x4a99e(%rip), %rdx     # 0x12ff97
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xba1e(%rip), %rsi      # 0xf1034
leaq 0x4a845(%rip), %rdx     # 0x12fe62
movq %rbx, %rdi
movl $0x3c6, %ecx            # imm = 0x3C6
jmp 0xe53c1