// File: /workspace/github_cpp_makefile_star2_O1/Kingsford-Group[P]ghost2/include/Eigen/src/Jacobi/Jacobi.h
// Function: Eigen::JacobiRotation<double>::makeGivens(double const&, double const&, double*, Eigen::internal::false_type)
void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::false_type)
{
  using std::sqrt;
  using std::abs;
  if(q==Scalar(0))
  {
    m_c = p<Scalar(0) ? Scalar(-1) : Scalar(1);
    m_s = Scalar(0);
    if(r) *r = abs(p);
  }
  else if(p==Scalar(0))
  {
    m_c = Scalar(0);
    m_s = q<Scalar(0) ? Scalar(1) : Scalar(-1);
    if(r) *r = abs(q);
  }
  else if(abs(p) > abs(q))
  {
    Scalar t = q/p;
    Scalar u = sqrt(Scalar(1) + numext::abs2(t));
    if(p<Scalar(0))
      u = -u;
    m_c = Scalar(1)/u;
    m_s = -t * m_c;
    if(r) *r = p * u;
  }
  else
  {
    Scalar t = p/q;
    Scalar u = sqrt(Scalar(1) + numext::abs2(t));
    if(q<Scalar(0))
      u = -u;
    m_s = -Scalar(1)/u;
    m_c = -t * m_s;
    if(r) *r = q * u;
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movsd (%rdx), %xmm4
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm4
movsd (%rsi), %xmm5
jne 0x34391
jp 0x34391
xorl %eax, %eax
ucomisd %xmm5, %xmm0
seta %al
leaq 0x14e2e(%rip), %rcx     # 0x491a0
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%r14)
movq $0x0, 0x8(%r14)
testq %rbx, %rbx
je 0x343d5
movsd (%r12), %xmm1
jmp 0x343c9
movq %rdx, %r15
ucomisd %xmm0, %xmm5
jne 0x343e1
jp 0x343e1
movq $0x0, (%r14)
xorl %eax, %eax
ucomisd (%r15), %xmm0
seta %al
leaq 0x14ddc(%rip), %rcx     # 0x49190
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%r14)
testq %rbx, %rbx
je 0x343d5
movsd (%r15), %xmm1
andpd 0x14d5f(%rip), %xmm1    # 0x49130
movsd %xmm1, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movapd 0x14d47(%rip), %xmm0    # 0x49130
movapd %xmm5, %xmm1
andpd %xmm0, %xmm1
andpd %xmm4, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x3441f
divsd %xmm5, %xmm4
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
addsd 0x14c51(%rip), %xmm0    # 0x49060
xorpd %xmm5, %xmm5
ucomisd %xmm5, %xmm0
jb 0x34446
sqrtsd %xmm0, %xmm0
jmp 0x34459
divsd %xmm4, %xmm5
movapd %xmm5, %xmm0
mulsd %xmm5, %xmm0
addsd 0x14c2d(%rip), %xmm0    # 0x49060
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm0
jb 0x344b3
sqrtsd %xmm0, %xmm0
jmp 0x344c6
movapd %xmm4, (%rsp)
callq 0xd3f0
xorpd %xmm5, %xmm5
movapd (%rsp), %xmm4
movsd (%r12), %xmm1
movapd 0x14cd9(%rip), %xmm2    # 0x49140
movapd %xmm0, %xmm3
xorpd %xmm2, %xmm3
cmpltsd %xmm5, %xmm1
andpd %xmm1, %xmm3
andnpd %xmm0, %xmm1
orpd %xmm3, %xmm1
movsd 0x14bd8(%rip), %xmm0    # 0x49060
divsd %xmm1, %xmm0
movsd %xmm0, (%r14)
xorpd %xmm2, %xmm4
mulsd %xmm0, %xmm4
movsd %xmm4, 0x8(%r14)
testq %rbx, %rbx
je 0x343d5
mulsd (%r12), %xmm1
jmp 0x343d1
movapd %xmm5, (%rsp)
callq 0xd3f0
xorpd %xmm4, %xmm4
movapd (%rsp), %xmm5
movsd (%r15), %xmm1
movapd 0x14c6d(%rip), %xmm2    # 0x49140
movapd %xmm0, %xmm3
xorpd %xmm2, %xmm3
cmpltsd %xmm4, %xmm1
andpd %xmm1, %xmm3
andnpd %xmm0, %xmm1
orpd %xmm3, %xmm1
movsd 0x14b84(%rip), %xmm0    # 0x49078
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%r14)
xorpd %xmm2, %xmm5
mulsd %xmm0, %xmm5
movsd %xmm5, (%r14)
testq %rbx, %rbx
je 0x343d5
mulsd (%r15), %xmm1
jmp 0x343d1