// File: /workspace/github_c_makefile_star2_O3/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 0xe1beb
movq %r13, %rdi
callq 0x8460
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0xe1c31
movq %r13, %rdi
callq 0x8460
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xe1c77
movq %r13, %rdi
callq 0x8460
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0xe1cbd
movq %r13, %rdi
callq 0x8460
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0xe1cff
movq %r13, %rdi
callq 0x8460
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xe1d41
movslq 0x64(%rbx), %r13
leaq (,%r13,8), %rbp
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x30(%r14)
testq %rax, %rax
je 0xe1d83
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x38(%r14)
testq %rax, %rax
je 0xe1dc9
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0xe1e0f
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0xe1e52
movq %r13, 0x8(%rsp)
testl %r13d, %r13d
jle 0xe1b90
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 0xe1f46
movq %rbp, %rdi
callq 0x8460
movq 0x38(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x38(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe1f90
movq %rbp, %rdi
callq 0x8460
movq 0x40(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x40(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe1fda
movq %rbp, %rdi
callq 0x8460
movq 0x48(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x48(%r14), %rax
cmpq $0x0, (%rax,%r13,8)
je 0xe2024
incq %r13
cmpq %r13, 0x8(%rsp)
jne 0xe1b06
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xe20fc
testl %eax, %eax
je 0xe1eb4
addq $0x192, %rbx            # imm = 0x192
leaq 0xc839(%rip), %rsi      # 0xee3f0
leaq 0x4b3d5(%rip), %rdx     # 0x12cf93
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xc45d(%rip), %rsi      # 0xee034
leaq 0x4b2b4(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3c3, %ecx            # imm = 0x3C3
jmp 0xe1e93
leal (,%rbp,8), %ecx
leaq 0xc40b(%rip), %rsi      # 0xee004
leaq 0x4b288(%rip), %rdx     # 0x12ce88
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc417(%rip), %rsi      # 0xee034
leaq 0x4b26e(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3a9, %ecx            # imm = 0x3A9
jmp 0xe1e93
leal (,%rbp,8), %ecx
leaq 0xc3c5(%rip), %rsi      # 0xee004
leaq 0x4b262(%rip), %rdx     # 0x12cea8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc3d1(%rip), %rsi      # 0xee034
leaq 0x4b228(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3aa, %ecx            # imm = 0x3AA
jmp 0xe1e93
leal (,%rbp,8), %ecx
leaq 0xc37f(%rip), %rsi      # 0xee004
leaq 0x4b226(%rip), %rdx     # 0x12ceb2
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc38b(%rip), %rsi      # 0xee034
leaq 0x4b1e2(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3ab, %ecx            # imm = 0x3AB
jmp 0xe1e93
leaq 0xc340(%rip), %rsi      # 0xee004
leaq 0x4b1f3(%rip), %rdx     # 0x12cebe
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc349(%rip), %rsi      # 0xee034
leaq 0x4b1a0(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3af, %ecx            # imm = 0x3AF
jmp 0xe1e93
leaq 0xc2fe(%rip), %rsi      # 0xee004
leaq 0x4b1c0(%rip), %rdx     # 0x12cecd
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc307(%rip), %rsi      # 0xee034
leaq 0x4b15e(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b0, %ecx            # imm = 0x3B0
jmp 0xe1e93
leaq 0xc2bc(%rip), %rsi      # 0xee004
leaq 0x4b18a(%rip), %rdx     # 0x12ced9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc2c5(%rip), %rsi      # 0xee034
leaq 0x4b11c(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b1, %ecx            # imm = 0x3B1
jmp 0xe1e93
shll $0x3, %r13d
leaq 0xc276(%rip), %rsi      # 0xee004
leaq 0x4b152(%rip), %rdx     # 0x12cee7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc27f(%rip), %rsi      # 0xee034
leaq 0x4b0d6(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b3, %ecx            # imm = 0x3B3
jmp 0xe1e93
shll $0x3, %r13d
leaq 0xc230(%rip), %rsi      # 0xee004
leaq 0x4b119(%rip), %rdx     # 0x12cef4
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc239(%rip), %rsi      # 0xee034
leaq 0x4b090(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b4, %ecx            # imm = 0x3B4
jmp 0xe1e93
shll $0x3, %r13d
leaq 0xc1ea(%rip), %rsi      # 0xee004
leaq 0x4b0e3(%rip), %rdx     # 0x12cf04
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc1f3(%rip), %rsi      # 0xee034
leaq 0x4b04a(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b5, %ecx            # imm = 0x3B5
jmp 0xe1e93
shll $0x3, %r13d
leaq 0xc1a7(%rip), %rsi      # 0xee004
leaq 0x4b0b4(%rip), %rdx     # 0x12cf18
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc1b0(%rip), %rsi      # 0xee034
leaq 0x4b007(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b6, %ecx            # imm = 0x3B6
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
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 0xe206e
movq %r15, %rdi
callq 0x8460
movq %rax, 0x68(%r14)
testq %rax, %rax
je 0xe20b5
movq %r15, %rdi
callq 0x8460
movq %rax, %rcx
movq %rax, 0x58(%r14)
xorl %eax, %eax
testq %rcx, %rcx
jne 0xe1ea2
leal (,%r12,8), %ecx
leaq 0xc0f6(%rip), %rsi      # 0xee004
leaq 0x4b0c3(%rip), %rdx     # 0x12cfd8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc102(%rip), %rsi      # 0xee034
leaq 0x4af59(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3c7, %ecx            # imm = 0x3C7
jmp 0xe1e93
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xc0ac(%rip), %rsi      # 0xee004
leaq 0x4afca(%rip), %rdx     # 0x12cf29
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc0b8(%rip), %rsi      # 0xee034
leaq 0x4af0f(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3b9, %ecx            # imm = 0x3B9
jmp 0xe1e93
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xc062(%rip), %rsi      # 0xee004
leaq 0x4af97(%rip), %rdx     # 0x12cf40
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc06e(%rip), %rsi      # 0xee034
leaq 0x4aec5(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3ba, %ecx            # imm = 0x3BA
jmp 0xe1e93
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xc018(%rip), %rsi      # 0xee004
leaq 0x4af67(%rip), %rdx     # 0x12cf5a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xc024(%rip), %rsi      # 0xee034
leaq 0x4ae7b(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3bb, %ecx            # imm = 0x3BB
jmp 0xe1e93
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xbfce(%rip), %rsi      # 0xee004
leaq 0x4af3b(%rip), %rdx     # 0x12cf78
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xbfda(%rip), %rsi      # 0xee034
leaq 0x4ae31(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3bc, %ecx            # imm = 0x3BC
jmp 0xe1e93
leal (,%r12,8), %ecx
leaq 0xbf87(%rip), %rsi      # 0xee004
leaq 0x4af34(%rip), %rdx     # 0x12cfb8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xbf93(%rip), %rsi      # 0xee034
leaq 0x4adea(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3c5, %ecx            # imm = 0x3C5
jmp 0xe1e93
leal (,%r12,8), %ecx
leaq 0xbf40(%rip), %rsi      # 0xee004
leaq 0x4aefc(%rip), %rdx     # 0x12cfc7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xbf4c(%rip), %rsi      # 0xee034
leaq 0x4ada3(%rip), %rdx     # 0x12ce92
movq %rbx, %rdi
movl $0x3c6, %ecx            # imm = 0x3C6
jmp 0xe1e93