// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_nowiggle_init
int hmcode_nowiggle_init(
                         struct fourier *pfo,
                         double **lnpk_l,
                         double **ddlnpk_l,
                         int index_pk,
                         struct hmcode_workspace *phw
                         ) {

  int i;
  double loganorm = log(1/(2.*_PI_*_PI_));
  double * pk_nw;

  /* Temporary array to store P_nowiggle (will not be used here) */

  class_alloc(pk_nw, pfo->nk_wiggle*sizeof(double), pfo->error_message);

  /* Get P_wiggle = P_l - P_nowiggle */

  class_call(hmcode_nowiggle(pfo,
                             lnpk_l[index_pk],
                             ddlnpk_l[index_pk],
                             pfo->nk_wiggle,
                             phw->lnk_wiggle,
                             pk_nw,
                             phw->pk_wiggle),
             pfo->error_message,
             pfo->error_message);

  /* Transform P_wiggle into a dimensionless linear spectrum {cal
     P}_wiggle = k^3/(2pi^2) P_l, where {cal P}_l would scale like
     k^(4+n_s) for k<k_eq. Store the result in phw->pk_wiggle. */

  for(i=0;i<pfo->nk_wiggle;++i){
    phw->pk_wiggle[i] = phw->pk_wiggle[i]*exp(3.*phw->lnk_wiggle[i]+loganorm);
  }

  /* Spline phw->pk_wiggle w.r.t. ln(k), to be able to
     interpolate later on. */

  class_call(array_spline_table_columns(phw->lnk_wiggle,
                                        pfo->nk_wiggle,
                                        phw->pk_wiggle,
                                        1,
                                        phw->ddpk_wiggle,
                                        _SPLINE_EST_DERIV_,
                                        pfo->error_message),
             pfo->error_message,
             pfo->error_message);

  free(pk_nw);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x2c(%rdi), %r12
movq %r12, %rdi
shlq $0x3, %rdi
callq 0x8460
testq %rax, %rax
je 0xe47c7
movslq %ebp, %rcx
movq (%r14,%rcx,8), %rsi
movq (%r13,%rcx,8), %rdx
movq 0x58(%r15), %r8
movq 0x60(%r15), %rcx
movq %rcx, (%rsp)
movq %rbx, %rdi
movl %r12d, %ecx
movq %rax, %r12
movq %rax, %r9
callq 0xe71f9
testl %eax, %eax
je 0xe482c
addq $0x192, %rbx            # imm = 0x192
leaq 0xcc5a(%rip), %rsi      # 0xf13f0
leaq 0x4c280(%rip), %rdx     # 0x130a1d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xc87e(%rip), %rsi      # 0xf1034
leaq 0x4c24b(%rip), %rdx     # 0x130a08
movq %rbx, %rdi
movl $0x77c, %ecx            # imm = 0x77C
jmp 0xe4809
leal (,%r12,8), %ecx
leaq 0xc82e(%rip), %rsi      # 0xf1004
leaq 0x4c34d(%rip), %rdx     # 0x130b2a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x192, %rbx            # imm = 0x192
leaq 0xc83a(%rip), %rsi      # 0xf1034
leaq 0x4c207(%rip), %rdx     # 0x130a08
movq %rbx, %rdi
movl $0x770, %ecx            # imm = 0x770
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x2c(%rbx), %esi
testl %esi, %esi
jle 0xe4881
xorl %r14d, %r14d
movq 0x58(%r15), %rax
movq 0x60(%r15), %rcx
movsd (%rcx,%r14,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rax,%r14,8), %xmm0
mulsd 0xde28(%rip), %xmm0     # 0xf2680
addsd 0x4a618(%rip), %xmm0    # 0x12ee78
callq 0x8670
mulsd 0x8(%rsp), %xmm0
movq 0x60(%r15), %rax
movsd %xmm0, (%rax,%r14,8)
incq %r14
movslq 0x2c(%rbx), %rsi
cmpq %rsi, %r14
jl 0xe4836
movq 0x58(%r15), %rdi
movq 0x60(%r15), %rdx
movq 0x68(%r15), %r8
addq $0x192, %rbx            # imm = 0x192
movq %rbx, (%rsp)
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
callq 0x15654
cmpl $0x1, %eax
jne 0xe48f7
leaq 0xcb37(%rip), %rsi      # 0xf13f0
leaq 0x4c1d0(%rip), %rdx     # 0x130a90
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xc75b(%rip), %rsi      # 0xf1034
leaq 0x4c128(%rip), %rdx     # 0x130a08
movq %rbx, %rdi
movl $0x791, %ecx            # imm = 0x791
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0xe4818
movq %r12, %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0xe4818