// File: /workspace/github_cpp_makefile_star2_O2/Kingsford-Group[P]ghost2/include/Eigen/src/Core/GeneralProduct.h
// Function: void Eigen::internal::gemv_selector<2, 0, true>::run<Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false>, 4>, Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false>>(Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false>, 4> const&, Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, false>&, Eigen::GeneralProduct<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, -1, false>, Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false>, 4>::Scalar const&)
static inline void run(const ProductType& prod, Dest& dest, const typename ProductType::Scalar& alpha)
  {
    typedef typename ProductType::Index Index;
    typedef typename ProductType::LhsScalar   LhsScalar;
    typedef typename ProductType::RhsScalar   RhsScalar;
    typedef typename ProductType::Scalar      ResScalar;
    typedef typename ProductType::RealScalar  RealScalar;
    typedef typename ProductType::ActualLhsType ActualLhsType;
    typedef typename ProductType::ActualRhsType ActualRhsType;
    typedef typename ProductType::LhsBlasTraits LhsBlasTraits;
    typedef typename ProductType::RhsBlasTraits RhsBlasTraits;
    typedef Map<Matrix<ResScalar,Dynamic,1>, Aligned> MappedDest;

    ActualLhsType actualLhs = LhsBlasTraits::extract(prod.lhs());
    ActualRhsType actualRhs = RhsBlasTraits::extract(prod.rhs());

    ResScalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(prod.lhs())
                                  * RhsBlasTraits::extractScalarFactor(prod.rhs());

    enum {
      // FIXME find a way to allow an inner stride on the result if packet_traits<Scalar>::size==1
      // on, the other hand it is good for the cache to pack the vector anyways...
      EvalToDestAtCompileTime = Dest::InnerStrideAtCompileTime==1,
      ComplexByReal = (NumTraits<LhsScalar>::IsComplex) && (!NumTraits<RhsScalar>::IsComplex),
      MightCannotUseDest = (Dest::InnerStrideAtCompileTime!=1) || ComplexByReal
    };

    gemv_static_vector_if<ResScalar,Dest::SizeAtCompileTime,Dest::MaxSizeAtCompileTime,MightCannotUseDest> static_dest;

    bool alphaIsCompatible = (!ComplexByReal) || (numext::imag(actualAlpha)==RealScalar(0));
    bool evalToDest = EvalToDestAtCompileTime && alphaIsCompatible;
    
    RhsScalar compatibleAlpha = get_factor<ResScalar,RhsScalar>::run(actualAlpha);

    ei_declare_aligned_stack_constructed_variable(ResScalar,actualDestPtr,dest.size(),
                                                  evalToDest ? dest.data() : static_dest.data());
    
    if(!evalToDest)
    {
      #ifdef EIGEN_DENSE_STORAGE_CTOR_PLUGIN
      int size = dest.size();
      EIGEN_DENSE_STORAGE_CTOR_PLUGIN
      #endif
      if(!alphaIsCompatible)
      {
        MappedDest(actualDestPtr, dest.size()).setZero();
        compatibleAlpha = RhsScalar(1);
      }
      else
        MappedDest(actualDestPtr, dest.size()) = dest;
    }

    general_matrix_vector_product
      <Index,LhsScalar,ColMajor,LhsBlasTraits::NeedToConjugate,RhsScalar,RhsBlasTraits::NeedToConjugate>::run(
        actualLhs.rows(), actualLhs.cols(),
        actualLhs.data(), actualLhs.outerStride(),
        actualRhs.data(), actualRhs.innerStride(),
        actualDestPtr, 1,
        compatibleAlpha);

    if (!evalToDest)
    {
      if(!alphaIsCompatible)
        dest += actualAlpha * MappedDest(actualDestPtr, dest.size());
      else
        dest = MappedDest(actualDestPtr, dest.size());
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd (%rdx), %xmm0
movq 0x8(%rsi), %rcx
movq %rcx, %rax
shrq $0x3d, %rax
je 0x254bb
movsd %xmm0, -0x18(%rbp)
callq 0x23674
movsd -0x18(%rbp), %xmm0
movq 0x8(%r14), %rcx
movq (%r14), %rax
testq %rax, %rax
je 0x254c7
xorl %edx, %edx
jmp 0x2550b
leaq (,%rcx,8), %rdi
cmpq $0x4e20, %rdi           # imm = 0x4E20
ja 0x254ee
movq %rsp, %rdx
addq $0xf, %rdi
andq $-0x10, %rdi
subq %rdi, %rdx
movq %rdx, %rsp
movq %rdx, %rax
jmp 0x2550b
movsd %xmm0, -0x18(%rbp)
callq 0x236a1
movsd -0x18(%rbp), %xmm0
movq 0x8(%r14), %rcx
xorl %edx, %edx
cmpq $0x0, (%r14)
cmoveq %rax, %rdx
leaq (,%rcx,8), %rsi
cmpq $0x4e21, %rsi           # imm = 0x4E21
movq %rdx, -0x30(%rbp)
movq %rcx, -0x28(%rbp)
setae -0x20(%rbp)
movq (%rbx), %rdx
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %r8
pushq $0x1
popq %r9
pushq $0x1
pushq %rax
callq 0x2556e
popq %rax
popq %rcx
leaq -0x30(%rbp), %rdi
callq 0x25cb2
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x25cb2
movq %rbx, %rdi
callq 0xe9f0
nop