// File: /workspace/github_c_makefile_star2_O3/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 0xe12a5
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 0xe3cbb
testl %eax, %eax
je 0xe130a
addq $0x192, %rbx            # imm = 0x192
leaq 0xd17c(%rip), %rsi      # 0xee3f0
leaq 0x4c7d2(%rip), %rdx     # 0x12da4d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcda0(%rip), %rsi      # 0xee034
leaq 0x4c79d(%rip), %rdx     # 0x12da38
movq %rbx, %rdi
movl $0x77c, %ecx            # imm = 0x77C
jmp 0xe12e7
leal (,%r12,8), %ecx
leaq 0xcd50(%rip), %rsi      # 0xee004
leaq 0x4c89f(%rip), %rdx     # 0x12db5a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x192, %rbx            # imm = 0x192
leaq 0xcd5c(%rip), %rsi      # 0xee034
leaq 0x4c759(%rip), %rdx     # 0x12da38
movq %rbx, %rdi
movl $0x770, %ecx            # imm = 0x770
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
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
movq 0x60(%r15), %rdx
testl %esi, %esi
jle 0xe135f
xorl %r14d, %r14d
movsd (%rdx,%r14,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x58(%r15), %rax
movsd (%rax,%r14,8), %xmm0
mulsd 0xe34a(%rip), %xmm0     # 0xef680
addsd 0x4ab6a(%rip), %xmm0    # 0x12bea8
callq 0x8670
mulsd 0x8(%rsp), %xmm0
movq 0x60(%r15), %rdx
movsd %xmm0, (%rdx,%r14,8)
incq %r14
movslq 0x2c(%rbx), %rsi
cmpq %rsi, %r14
jl 0xe1318
movq 0x58(%r15), %rdi
movq 0x68(%r15), %r8
addq $0x192, %rbx            # imm = 0x192
movq %rbx, (%rsp)
movl $0x1, %ebp
movl $0x1, %ecx
movl $0x1, %r9d
callq 0x1577e
cmpl $0x1, %eax
jne 0xe13d1
leaq 0xd05d(%rip), %rsi      # 0xee3f0
leaq 0x4c726(%rip), %rdx     # 0x12dac0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xcc81(%rip), %rsi      # 0xee034
leaq 0x4c67e(%rip), %rdx     # 0x12da38
movq %rbx, %rdi
movl $0x791, %ecx            # imm = 0x791
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0xe12f6
movq %r12, %rdi
callq 0x8410
xorl %ebp, %ebp
jmp 0xe12f6