// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../external/HMcode/hmcode.c
// Function: hmcode_window_nfw
int hmcode_window_nfw(
                      struct fourier *pfo,
                      double k,
                      double rv,
                      double c,
                      double *window_nfw
                      ){

  double si1, si2, ci1, ci2, ks;
  double p1, p2, p3;

  ks = k*rv/c;

  class_call(sine_integral(ks*(1.+c),
                           &si2,
                           pfo->error_message),
             pfo->error_message,
             pfo->error_message);

  class_call(sine_integral(ks,
                           &si1,
                           pfo->error_message),
             pfo->error_message,
             pfo->error_message);

  class_call(cosine_integral(ks*(1.+c),
                             &ci2,
                             pfo->error_message),
             pfo->error_message,
             pfo->error_message);

  class_call(cosine_integral(ks,
                             &ci1,
                             pfo->error_message),
             pfo->error_message,
             pfo->error_message);

  p1=cos(ks)*(ci2-ci1);
  p2=sin(ks)*(si2-si1);
  p3=sin(ks*c)/(ks*(1.+c));

  *window_nfw=p1+p2-p3;
  *window_nfw=*window_nfw/(log(1.+c)-c/(1.+c));

  return _SUCCESS_;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x888, %rsp            # imm = 0x888
movq %rsi, %r14
movq %rdi, %rbx
mulsd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd 0xa41a(%rip), %xmm1     # 0xe5260
movapd %xmm2, 0x60(%rsp)
addsd %xmm2, %xmm1
movsd %xmm0, (%rsp)
movapd %xmm1, 0x50(%rsp)
mulsd %xmm1, %xmm0
addq $0x192, %rbx            # imm = 0x192
leaq 0x40(%rsp), %rdi
movapd %xmm0, 0x70(%rsp)
movq %rbx, %rsi
callq 0x2e572
cmpl $0x1, %eax
jne 0xdaebc
leaq 0xa56b(%rip), %rsi      # 0xe53f0
leaq 0x494c7(%rip), %rdx     # 0x124353
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa18c(%rip), %rsi      # 0xe5034
leaq 0x494d7(%rip), %rdx     # 0x124386
movq %rbx, %rdi
movl $0x5f5, %ecx            # imm = 0x5F5
jmp 0xdafb4
leaq 0x48(%rsp), %rdi
movsd (%rsp), %xmm0
movq %rbx, %rsi
callq 0x2e572
cmpl $0x1, %eax
jne 0xdaf11
leaq 0xa516(%rip), %rsi      # 0xe53f0
leaq 0x494b7(%rip), %rdx     # 0x124398
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa137(%rip), %rsi      # 0xe5034
leaq 0x49482(%rip), %rdx     # 0x124386
movq %rbx, %rdi
movl $0x5fb, %ecx            # imm = 0x5FB
jmp 0xdafb4
leaq 0x30(%rsp), %rdi
movapd 0x70(%rsp), %xmm0
movq %rbx, %rsi
callq 0x2e218
cmpl $0x1, %eax
jne 0xdaf64
leaq 0xa4c0(%rip), %rsi      # 0xe53f0
leaq 0x4948d(%rip), %rdx     # 0x1243c4
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa0e1(%rip), %rsi      # 0xe5034
leaq 0x4942c(%rip), %rdx     # 0x124386
movq %rbx, %rdi
movl $0x601, %ecx            # imm = 0x601
jmp 0xdafb4
leaq 0x38(%rsp), %rdi
movsd (%rsp), %xmm0
movq %rbx, %rsi
callq 0x2e218
cmpl $0x1, %eax
jne 0xdafcc
leaq 0xa46e(%rip), %rsi      # 0xe53f0
leaq 0x49470(%rip), %rdx     # 0x1243f9
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa08f(%rip), %rsi      # 0xe5034
leaq 0x493da(%rip), %rdx     # 0x124386
movq %rbx, %rdi
movl $0x607, %ecx            # imm = 0x607
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
addq $0x888, %rsp            # imm = 0x888
popq %rbx
popq %r14
retq
movsd (%rsp), %xmm0
callq 0x86d0
movsd 0x30(%rsp), %xmm1
subsd 0x38(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd (%rsp), %xmm0
callq 0x80a0
movsd 0x40(%rsp), %xmm1
subsd 0x48(%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd (%rsp), %xmm0
mulsd 0x60(%rsp), %xmm0
callq 0x80a0
movapd %xmm0, (%rsp)
movapd 0x10(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movapd 0x50(%rsp), %xmm0
callq 0x82e0
movapd (%rsp), %xmm2
unpcklpd 0x60(%rsp), %xmm2       # xmm2 = xmm2[0],mem[0]
movapd 0x70(%rsp), %xmm1
unpcklpd 0x50(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
divpd %xmm1, %xmm2
movapd 0x10(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
subpd %xmm2, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
divsd %xmm0, %xmm1
movsd %xmm1, (%r14)
xorl %eax, %eax
jmp 0xdafc1