// File: /workspace/github_c_makefile_star2_O3/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 0xb08c(%rip), %xmm1     # 0xee260
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 0x3105e
cmpl $0x1, %eax
jne 0xe324a
leaq 0xb1dd(%rip), %rsi      # 0xee3f0
leaq 0x4a2c9(%rip), %rdx     # 0x12d4e3
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xadfe(%rip), %rsi      # 0xee034
leaq 0x4a2d9(%rip), %rdx     # 0x12d516
movq %rbx, %rdi
movl $0x5f5, %ecx            # imm = 0x5F5
jmp 0xe3342
leaq 0x48(%rsp), %rdi
movsd (%rsp), %xmm0
movq %rbx, %rsi
callq 0x3105e
cmpl $0x1, %eax
jne 0xe329f
leaq 0xb188(%rip), %rsi      # 0xee3f0
leaq 0x4a2b9(%rip), %rdx     # 0x12d528
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xada9(%rip), %rsi      # 0xee034
leaq 0x4a284(%rip), %rdx     # 0x12d516
movq %rbx, %rdi
movl $0x5fb, %ecx            # imm = 0x5FB
jmp 0xe3342
leaq 0x30(%rsp), %rdi
movapd 0x70(%rsp), %xmm0
movq %rbx, %rsi
callq 0x30d04
cmpl $0x1, %eax
jne 0xe32f2
leaq 0xb132(%rip), %rsi      # 0xee3f0
leaq 0x4a28f(%rip), %rdx     # 0x12d554
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xad53(%rip), %rsi      # 0xee034
leaq 0x4a22e(%rip), %rdx     # 0x12d516
movq %rbx, %rdi
movl $0x601, %ecx            # imm = 0x601
jmp 0xe3342
leaq 0x38(%rsp), %rdi
movsd (%rsp), %xmm0
movq %rbx, %rsi
callq 0x30d04
cmpl $0x1, %eax
jne 0xe335c
leaq 0xb0e0(%rip), %rsi      # 0xee3f0
leaq 0x4a272(%rip), %rdx     # 0x12d589
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xad01(%rip), %rsi      # 0xee034
leaq 0x4a1dc(%rip), %rdx     # 0x12d516
movq %rbx, %rdi
movl $0x607, %ecx            # imm = 0x607
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x888, %rsp            # imm = 0x888
popq %rbx
popq %r14
retq
movsd (%rsp), %xmm0
callq 0x86a0
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 0x82c0
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 0xe3351