// File: Kingsford-Group[P]ghost2/include/Eigen/src/Core/products/SelfadjointRank2Update.h
// Function: Eigen::SelfAdjointView<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, 1u>& Eigen::SelfAdjointView<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, 1u>::rankUpdate<Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, true>, -1, 1, false>, Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false>>(Eigen::MatrixBase<Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, true>, -1, 1, false>> const&, Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false>> const&, double const&)
SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo>
::rankUpdate(const MatrixBase<DerivedU>& u, const MatrixBase<DerivedV>& v, const Scalar& alpha)
{
  typedef internal::blas_traits<DerivedU> UBlasTraits;
  typedef typename UBlasTraits::DirectLinearAccessType ActualUType;
  typedef typename internal::remove_all<ActualUType>::type _ActualUType;
  typename internal::add_const_on_value_type<ActualUType>::type actualU = UBlasTraits::extract(u.derived());

  typedef internal::blas_traits<DerivedV> VBlasTraits;
  typedef typename VBlasTraits::DirectLinearAccessType ActualVType;
  typedef typename internal::remove_all<ActualVType>::type _ActualVType;
  typename internal::add_const_on_value_type<ActualVType>::type actualV = VBlasTraits::extract(v.derived());

  // If MatrixType is row major, then we use the routine for lower triangular in the upper triangular case and
  // vice versa, and take the complex conjugate of all coefficients and vector entries.

  enum { IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0 };
  Scalar actualAlpha = alpha * UBlasTraits::extractScalarFactor(u.derived())
                             * numext::conj(VBlasTraits::extractScalarFactor(v.derived()));
  if (IsRowMajor)
    actualAlpha = numext::conj(actualAlpha);

  internal::selfadjoint_rank2_update_selector<Scalar, Index,
    typename internal::remove_all<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::type>::type,
    typename internal::remove_all<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::type>::type,
    (IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)>
    ::run(_expression().const_cast_derived().data(),_expression().outerStride(),actualU,actualV,actualAlpha);

  return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x510a0
movq %rax, %rdi
callq 0x6fc20
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x52860
movq %rax, %rdi
callq 0x540f0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0x510a0
movq %rax, %rdi
callq 0x6fc60
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x52860
movq %rax, %rdi
callq 0x54140
movsd %xmm0, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4df90
movq -0x48(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x70ff0
movq %rax, %rdi
callq 0x71000
movq %rax, %rdi
callq 0x71010
movq -0x48(%rbp), %rdi
movq %rax, -0x50(%rbp)
callq 0x70ff0
movq %rax, %rdi
callq 0x55af0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x70e20
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)