// File: /workspace/github_cpp_makefile_star2_O1/Kingsford-Group[P]ghost2/include/Eigen/src/Core/Redux.h
// Function: Eigen::internal::redux_impl<Eigen::internal::scalar_sum_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, Eigen::Transpose<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -1, -1, 1, -1, -1> const, 0, Eigen::OuterStride<-1>> const, 1, -1, true> const, 1, -1, false> const> const, Eigen::Map<Eigen::Matrix<double, -1, 1, 0, -1, 1> const, 0, Eigen::Stride<0, 0>> const>, 3, 0>::run(Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, Eigen::Transpose<Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -1, -1, 1, -1, -1> const, 0, Eigen::OuterStride<-1>> const, 1, -1, true> const, 1, -1, false> const> const, Eigen::Map<Eigen::Matrix<double, -1, 1, 0, -1, 1> const, 0, Eigen::Stride<0, 0>> const> const&, Eigen::internal::scalar_sum_op<double> const&)
static Scalar run(const Derived& mat, const Func& func)
  {
    const Index size = mat.size();
    eigen_assert(size && "you are using an empty matrix");
    const Index packetSize = packet_traits<Scalar>::size;
    const Index alignedStart = internal::first_aligned(mat);
    enum {
      alignment = bool(Derived::Flags & DirectAccessBit) || bool(Derived::Flags & AlignedBit)
                ? Aligned : Unaligned
    };
    const Index alignedSize2 = ((size-alignedStart)/(2*packetSize))*(2*packetSize);
    const Index alignedSize = ((size-alignedStart)/(packetSize))*(packetSize);
    const Index alignedEnd2 = alignedStart + alignedSize2;
    const Index alignedEnd  = alignedStart + alignedSize;
    Scalar res;
    if(alignedSize)
    {
      PacketScalar packet_res0 = mat.template packet<alignment>(alignedStart);
      if(alignedSize>packetSize) // we have at least two packets to partly unroll the loop
      {
        PacketScalar packet_res1 = mat.template packet<alignment>(alignedStart+packetSize);
        for(Index index = alignedStart + 2*packetSize; index < alignedEnd2; index += 2*packetSize)
        {
          packet_res0 = func.packetOp(packet_res0, mat.template packet<alignment>(index));
          packet_res1 = func.packetOp(packet_res1, mat.template packet<alignment>(index+packetSize));
        }

        packet_res0 = func.packetOp(packet_res0,packet_res1);
        if(alignedEnd>alignedEnd2)
          packet_res0 = func.packetOp(packet_res0, mat.template packet<alignment>(alignedEnd2));
      }
      res = func.predux(packet_res0);

      for(Index index = 0; index < alignedStart; ++index)
        res = func(res,mat.coeff(index));

      for(Index index = alignedEnd; index < size; ++index)
        res = func(res,mat.coeff(index));
    }
    else // too small to vectorize anything.
         // since this is dynamic-size hence inefficient anyway for such small sizes, don't try to optimize.
    {
      res = mat.coeff(0);
      for(Index index = 1; index < size; ++index)
        res = func(res,mat.coeff(index));
    }

    return res;
  }

// Assembly:
pushq %rax
movq 0x70(%rdi), %rax
testq %rax, %rax
je 0x2dd16
leaq 0x3(%rax), %r8
testq %rax, %rax
cmovnsq %rax, %r8
leaq 0x1(%rax), %rsi
movq (%rdi), %rcx
movq 0x68(%rdi), %rdx
cmpq $0x3, %rsi
jae 0x2dc5c
movsd (%rcx), %xmm0
mulsd (%rdx), %xmm0
cmpq $0x2, %rax
jl 0x2dd14
movl $0x1, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x2dc41
jmp 0x2dd14
movq %rax, %rsi
shrq $0x3f, %rsi
addq %rax, %rsi
andq $-0x2, %rsi
movupd (%rcx), %xmm0
movupd (%rdx), %xmm1
mulpd %xmm0, %xmm1
cmpq $0x4, %rax
jl 0x2dced
andq $-0x4, %r8
movupd 0x10(%rcx), %xmm2
movupd 0x10(%rdx), %xmm0
mulpd %xmm2, %xmm0
cmpq $0x8, %rax
jl 0x2dcc8
movl $0x4, %edi
movupd (%rcx,%rdi,8), %xmm2
movupd 0x10(%rcx,%rdi,8), %xmm3
movupd (%rdx,%rdi,8), %xmm4
mulpd %xmm2, %xmm4
addpd %xmm4, %xmm1
movupd 0x10(%rdx,%rdi,8), %xmm2
mulpd %xmm3, %xmm2
addpd %xmm2, %xmm0
addq $0x4, %rdi
cmpq %r8, %rdi
jl 0x2dc99
movapd %xmm1, %xmm2
movapd %xmm0, %xmm1
addpd %xmm2, %xmm1
cmpq %r8, %rsi
jle 0x2dced
movupd (%rcx,%r8,8), %xmm0
movupd (%rdx,%r8,8), %xmm2
mulpd %xmm0, %xmm2
addpd %xmm2, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
cmpq %rax, %rsi
jge 0x2dd14
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x2dcfe
popq %rax
retq
leaq 0x1fb31(%rip), %rdi     # 0x4d84e
leaq 0x1fb52(%rip), %rsi     # 0x4d876
leaq 0x23479(%rip), %rcx     # 0x511a4
movl $0xca, %edx
callq 0xd340
nop