// File: /workspace/github_c_makefile_star2_O1/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 0xab4e(%rip), %xmm1     # 0xf1260
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 0x3119a
cmpl $0x1, %eax
jne 0xe6788
leaq 0xac9f(%rip), %rsi      # 0xf13f0
leaq 0x49d5b(%rip), %rdx     # 0x1304b3
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xa8c0(%rip), %rsi      # 0xf1034
leaq 0x49d6b(%rip), %rdx     # 0x1304e6
movq %rbx, %rdi
movl $0x5f5, %ecx            # imm = 0x5F5
jmp 0xe6880
leaq 0x48(%rsp), %rdi
movsd (%rsp), %xmm0
movq %rbx, %rsi
callq 0x3119a
cmpl $0x1, %eax
jne 0xe67dd
leaq 0xac4a(%rip), %rsi      # 0xf13f0
leaq 0x49d4b(%rip), %rdx     # 0x1304f8
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xa86b(%rip), %rsi      # 0xf1034
leaq 0x49d16(%rip), %rdx     # 0x1304e6
movq %rbx, %rdi
movl $0x5fb, %ecx            # imm = 0x5FB
jmp 0xe6880
leaq 0x30(%rsp), %rdi
movapd 0x70(%rsp), %xmm0
movq %rbx, %rsi
callq 0x30e40
cmpl $0x1, %eax
jne 0xe6830
leaq 0xabf4(%rip), %rsi      # 0xf13f0
leaq 0x49d21(%rip), %rdx     # 0x130524
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xa815(%rip), %rsi      # 0xf1034
leaq 0x49cc0(%rip), %rdx     # 0x1304e6
movq %rbx, %rdi
movl $0x601, %ecx            # imm = 0x601
jmp 0xe6880
leaq 0x38(%rsp), %rdi
movsd (%rsp), %xmm0
movq %rbx, %rsi
callq 0x30e40
cmpl $0x1, %eax
jne 0xe689a
leaq 0xaba2(%rip), %rsi      # 0xf13f0
leaq 0x49d04(%rip), %rdx     # 0x130559
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xa7c3(%rip), %rsi      # 0xf1034
leaq 0x49c6e(%rip), %rdx     # 0x1304e6
movq %rbx, %rdi
movl $0x607, %ecx            # imm = 0x607
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
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 0xe688f