// File: /workspace/github_cpp_makefile_star2_O3/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_conj_product_op<double, double>, Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false> const, Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, true>, -1, 1, false> const>, 3, 0>::run(Eigen::CwiseBinaryOp<Eigen::internal::scalar_conj_product_op<double, double>, Eigen::Block<Eigen::Matrix<double, -1, 1, 0, -1, 1>, -1, 1, false> const, Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1, 1, true>, -1, 1, false> 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 0x30(%rdi), %rax
testq %rax, %rax
je 0x30813
leaq 0x3(%rax), %r8
testq %rax, %rax
cmovnsq %rax, %r8
leaq 0x1(%rax), %rdx
movq (%rdi), %rcx
cmpq $0x3, %rdx
jae 0x30755
movq 0x28(%rdi), %rax
movsd (%rcx), %xmm0
mulsd (%rax), %xmm0
jmp 0x30811
movq %rax, %rdx
shrq $0x3f, %rdx
addq %rax, %rdx
andq $-0x2, %rdx
movupd (%rcx), %xmm0
movq 0x28(%rdi), %rsi
movupd (%rsi), %xmm1
mulpd %xmm0, %xmm1
cmpq $0x4, %rax
jl 0x307ea
andq $-0x4, %r8
movupd 0x10(%rcx), %xmm2
movupd 0x10(%rsi), %xmm0
mulpd %xmm2, %xmm0
cmpq $0x8, %rax
jb 0x307c5
movl $0x4, %edi
movupd (%rcx,%rdi,8), %xmm2
movupd 0x10(%rcx,%rdi,8), %xmm3
movupd (%rsi,%rdi,8), %xmm4
mulpd %xmm2, %xmm4
addpd %xmm4, %xmm1
movupd 0x10(%rsi,%rdi,8), %xmm2
mulpd %xmm3, %xmm2
addpd %xmm2, %xmm0
addq $0x4, %rdi
cmpq %r8, %rdi
jl 0x30796
movapd %xmm1, %xmm2
movapd %xmm0, %xmm1
addpd %xmm2, %xmm1
cmpq %r8, %rdx
jle 0x307ea
movupd (%rcx,%r8,8), %xmm0
movupd (%rsi,%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, %rdx
jge 0x30811
movsd (%rcx,%rdx,8), %xmm1
mulsd (%rsi,%rdx,8), %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x307fb
popq %rax
retq
leaq 0x1c064(%rip), %rdi     # 0x4c87e
leaq 0x1c085(%rip), %rsi     # 0x4c8a6
leaq 0x22e6d(%rip), %rcx     # 0x53695
movl $0xca, %edx
callq 0xc340