// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rsi), %r15
movq %r15, %rax
shrq $0x3d, %rax
jne 0x2be3d
movq %rdi, %r14
movsd (%rdx), %xmm0
movq (%rsi), %rax
testq %rax, %rax
je 0x2bdbe
xorl %ebx, %ebx
jmp 0x2bdfc
leaq (,%r15,8), %rdi
cmpq $0x9c4, %r15            # imm = 0x9C4
ja 0x2bde5
movq %rsp, %rbx
addq $0xf, %rdi
andq $-0x10, %rdi
subq %rdi, %rbx
movq %rbx, %rsp
movq %rbx, %rax
jmp 0x2bdfc
movsd %xmm0, -0x20(%rbp)
callq 0xd750
movsd -0x20(%rbp), %xmm0
movq %rax, %rbx
testq %rax, %rax
je 0x2be6b
movq (%r14), %rdx
movq 0x8(%r14), %rdi
movq 0x10(%r14), %rsi
movq 0x20(%r14), %rcx
movq 0x28(%r14), %r8
movl $0x1, %r9d
pushq $0x1
pushq %rax
callq 0x2be8a
addq $0x10, %rsp
cmpq $0x9c5, %r15            # imm = 0x9C5
jb 0x2be32
movq %rbx, %rdi
callq 0xd660
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0xd260
movq 0x4d122(%rip), %rcx     # 0x78f70
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x4d144(%rip), %rsi     # 0x78fa0
movq 0x4d0dd(%rip), %rdx     # 0x78f40
movq %rax, %rdi
callq 0xd990
jmp 0x2be3d
movq %rax, %r14
cmpq $0x9c5, %r15            # imm = 0x9C5
jb 0x2be81
movq %rbx, %rdi
callq 0xd660
movq %r14, %rdi
callq 0xd9c0
nop