// File: /workspace/github_c_makefile_star2_O2/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 0x8490
movq %rax, (%r14)
testq %rax, %rax
je 0xd9874
movq %r13, %rdi
callq 0x8490
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0xd98ba
movq %r13, %rdi
callq 0x8490
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0xd9900
movq %r13, %rdi
callq 0x8490
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0xd9946
movq %r13, %rdi
callq 0x8490
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0xd9988
movq %r13, %rdi
callq 0x8490
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0xd99ca
movslq 0x64(%rbx), %rbp
movq %rbp, %r13
shlq $0x3, %r13
movq %r13, %rdi
callq 0x8490
movq %rax, 0x30(%r14)
testq %rax, %rax
je 0xd9a0c
movq %r13, %rdi
callq 0x8490
movq %rax, 0x38(%r14)
testq %rax, %rax
je 0xd9a52
movq %r13, %rdi
callq 0x8490
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0xd9a98
movq %r13, %rdi
callq 0x8490
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0xd9ade
movq %rbp, %rcx
xorl %ebp, %ebp
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movq %rax, 0x8(%rsp)
cmpq %rbp, 0x8(%rsp)
je 0xd9b24
movslq 0x140(%rbx), %r13
movq %r13, (%rsp)
shlq $0x3, %r13
movq %r13, %rdi
callq 0x8490
movq 0x30(%r14), %rcx
movq %rax, (%rcx,%rbp,8)
movq 0x30(%r14), %rax
cmpq $0x0, (%rax,%rbp,8)
je 0xd9b7f
movq %r13, %rdi
callq 0x8490
movq 0x38(%r14), %rcx
movq %rax, (%rcx,%rbp,8)
movq 0x38(%r14), %rax
cmpq $0x0, (%rax,%rbp,8)
je 0xd9bc9
movq %r13, %rdi
callq 0x8490
movq 0x40(%r14), %rcx
movq %rax, (%rcx,%rbp,8)
movq 0x40(%r14), %rax
cmpq $0x0, (%rax,%rbp,8)
je 0xd9c10
movq %r13, %rdi
callq 0x8490
movq 0x48(%r14), %rcx
movq %rax, (%rcx,%rbp,8)
movq 0x48(%r14), %rax
cmpq $0x0, (%rax,%rbp,8)
leaq 0x1(%rbp), %rbp
jne 0xd9790
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xb7c8(%rip), %rsi      # 0xe5004
leaq 0x4a5a5(%rip), %rdx     # 0x123de8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb7d4(%rip), %rsi      # 0xe5034
leaq 0x4a49b(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3bc, %ecx            # imm = 0x3BC
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb782(%rip), %rsi      # 0xe5004
leaq 0x4a46f(%rip), %rdx     # 0x123cf8
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb78e(%rip), %rsi      # 0xe5034
leaq 0x4a455(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3a9, %ecx            # imm = 0x3A9
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb73c(%rip), %rsi      # 0xe5004
leaq 0x4a449(%rip), %rdx     # 0x123d18
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb748(%rip), %rsi      # 0xe5034
leaq 0x4a40f(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3aa, %ecx            # imm = 0x3AA
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb6f6(%rip), %rsi      # 0xe5004
leaq 0x4a40d(%rip), %rdx     # 0x123d22
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb702(%rip), %rsi      # 0xe5034
leaq 0x4a3c9(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3ab, %ecx            # imm = 0x3AB
jmp 0xd9c55
leaq 0xb6b7(%rip), %rsi      # 0xe5004
leaq 0x4a3da(%rip), %rdx     # 0x123d2e
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb6c0(%rip), %rsi      # 0xe5034
leaq 0x4a387(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3af, %ecx            # imm = 0x3AF
jmp 0xd9c55
leaq 0xb675(%rip), %rsi      # 0xe5004
leaq 0x4a3a7(%rip), %rdx     # 0x123d3d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb67e(%rip), %rsi      # 0xe5034
leaq 0x4a345(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b0, %ecx            # imm = 0x3B0
jmp 0xd9c55
leaq 0xb633(%rip), %rsi      # 0xe5004
leaq 0x4a371(%rip), %rdx     # 0x123d49
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb63c(%rip), %rsi      # 0xe5034
leaq 0x4a303(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b1, %ecx            # imm = 0x3B1
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb5ea(%rip), %rsi      # 0xe5004
leaq 0x4a336(%rip), %rdx     # 0x123d57
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb5f6(%rip), %rsi      # 0xe5034
leaq 0x4a2bd(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b3, %ecx            # imm = 0x3B3
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb5a4(%rip), %rsi      # 0xe5004
leaq 0x4a2fd(%rip), %rdx     # 0x123d64
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb5b0(%rip), %rsi      # 0xe5034
leaq 0x4a277(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b4, %ecx            # imm = 0x3B4
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb55e(%rip), %rsi      # 0xe5004
leaq 0x4a2c7(%rip), %rdx     # 0x123d74
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb56a(%rip), %rsi      # 0xe5034
leaq 0x4a231(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b5, %ecx            # imm = 0x3B5
jmp 0xd9c55
leal (,%rbp,8), %ecx
leaq 0xb518(%rip), %rsi      # 0xe5004
leaq 0x4a295(%rip), %rdx     # 0x123d88
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb524(%rip), %rsi      # 0xe5034
leaq 0x4a1eb(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b6, %ecx            # imm = 0x3B6
jmp 0xd9c55
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xd9d90
testl %eax, %eax
je 0xd9c74
addq $0x192, %rbx            # imm = 0x192
leaq 0xb8a5(%rip), %rsi      # 0xe53f0
leaq 0x4a2b1(%rip), %rdx     # 0x123e03
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xb4c9(%rip), %rsi      # 0xe5034
leaq 0x4a190(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3c3, %ecx            # imm = 0x3C3
jmp 0xd9c55
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xb473(%rip), %rsi      # 0xe5004
leaq 0x4a201(%rip), %rdx     # 0x123d99
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb47f(%rip), %rsi      # 0xe5034
leaq 0x4a146(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3b9, %ecx            # imm = 0x3B9
jmp 0xd9c55
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xb429(%rip), %rsi      # 0xe5004
leaq 0x4a1ce(%rip), %rdx     # 0x123db0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb435(%rip), %rsi      # 0xe5034
leaq 0x4a0fc(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3ba, %ecx            # imm = 0x3BA
jmp 0xd9c55
movq (%rsp), %rax
leal (,%rax,8), %ecx
leaq 0xb3e2(%rip), %rsi      # 0xe5004
leaq 0x4a1a1(%rip), %rdx     # 0x123dca
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb3ee(%rip), %rsi      # 0xe5034
leaq 0x4a0b5(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3bb, %ecx            # imm = 0x3BB
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
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 0x8490
movq %rax, 0x60(%r14)
testq %rax, %rax
je 0xd9d02
movq %r15, %rdi
callq 0x8490
movq %rax, 0x68(%r14)
testq %rax, %rax
je 0xd9d49
movq %r15, %rdi
callq 0x8490
movq %rax, %rcx
movq %rax, 0x58(%r14)
xorl %eax, %eax
testq %rcx, %rcx
jne 0xd9c62
leal (,%r12,8), %ecx
leaq 0xb33a(%rip), %rsi      # 0xe5004
leaq 0x4a177(%rip), %rdx     # 0x123e48
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb346(%rip), %rsi      # 0xe5034
leaq 0x4a00d(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3c7, %ecx            # imm = 0x3C7
jmp 0xd9c55
leal (,%r12,8), %ecx
leaq 0xb2f3(%rip), %rsi      # 0xe5004
leaq 0x4a110(%rip), %rdx     # 0x123e28
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb2ff(%rip), %rsi      # 0xe5034
leaq 0x49fc6(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3c5, %ecx            # imm = 0x3C5
jmp 0xd9c55
leal (,%r12,8), %ecx
leaq 0xb2ac(%rip), %rsi      # 0xe5004
leaq 0x4a0d8(%rip), %rdx     # 0x123e37
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xb2b8(%rip), %rsi      # 0xe5034
leaq 0x49f7f(%rip), %rdx     # 0x123d02
movq %rbx, %rdi
movl $0x3c6, %ecx            # imm = 0x3C6
jmp 0xd9c55