// File: /workspace/github_c_makefile_star2_O2/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 0x8490
testq %rax, %rax
je 0xd91b2
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 0xdb933
testl %eax, %eax
je 0xd9215
addq $0x192, %rbx            # imm = 0x192
leaq 0xc26f(%rip), %rsi      # 0xe53f0
leaq 0x4b735(%rip), %rdx     # 0x1248bd
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xbe93(%rip), %rsi      # 0xe5034
leaq 0x4b700(%rip), %rdx     # 0x1248a8
movq %rbx, %rdi
movl $0x77c, %ecx            # imm = 0x77C
jmp 0xd91f4
leal (,%r12,8), %ecx
leaq 0xbe43(%rip), %rsi      # 0xe5004
leaq 0x4b802(%rip), %rdx     # 0x1249ca
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x192, %rbx            # imm = 0x192
leaq 0xbe4f(%rip), %rsi      # 0xe5034
leaq 0x4b6bc(%rip), %rdx     # 0x1248a8
movq %rbx, %rdi
movl $0x770, %ecx            # imm = 0x770
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movslq 0x2c(%rbx), %rsi
cmpq %rsi, %r14
jge 0xd9265
movq 0x58(%r15), %rax
movq 0x60(%r15), %rcx
movsd (%rcx,%r14,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rax,%r14,8), %xmm0
mulsd 0xd505(%rip), %xmm0     # 0xe6748
addsd 0x49acd(%rip), %xmm0    # 0x122d18
callq 0x86a0
mulsd 0x8(%rsp), %xmm0
movq 0x60(%r15), %rax
movsd %xmm0, (%rax,%r14,8)
incq %r14
jmp 0xd9218
movq 0x58(%r15), %rdi
movq 0x60(%r15), %rdx
movq 0x68(%r15), %r8
addq $0x192, %rbx            # imm = 0x192
movq %rbx, (%rsp)
pushq $0x1
popq %rbp
movl %ebp, %ecx
movl %ebp, %r9d
callq 0x139d8
cmpl $0x1, %eax
jne 0xd92d3
leaq 0xc15b(%rip), %rsi      # 0xe53f0
leaq 0x4b694(%rip), %rdx     # 0x124930
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xbd7f(%rip), %rsi      # 0xe5034
leaq 0x4b5ec(%rip), %rdx     # 0x1248a8
movq %rbx, %rdi
movl $0x791, %ecx            # imm = 0x791
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0xd9201
movq %r12, %rdi
callq 0x8430
xorl %ebp, %ebp
jmp 0xd9201