// File: /workspace/github_cpp_makefile_star2_O2/Kingsford-Group[P]ghost2/include/Eigen/src/Cholesky/LDLT.h
// Function: bool Eigen::internal::ldlt_inplace<1>::unblocked<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Transpositions<-1, -1, int>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>(Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::Transpositions<-1, -1, int>&, Eigen::Matrix<double, -1, 1, 0, -1, 1>&, Eigen::internal::SignMatrix&)
static bool unblocked(MatrixType& mat, TranspositionType& transpositions, Workspace& temp, SignMatrix& sign)
  {
    using std::abs;
    typedef typename MatrixType::Scalar Scalar;
    typedef typename MatrixType::RealScalar RealScalar;
    typedef typename MatrixType::Index Index;
    eigen_assert(mat.rows()==mat.cols());
    const Index size = mat.rows();

    if (size <= 1)
    {
      transpositions.setIdentity();
      if (numext::real(mat.coeff(0,0)) > 0) sign = PositiveSemiDef;
      else if (numext::real(mat.coeff(0,0)) < 0) sign = NegativeSemiDef;
      else sign = ZeroSign;
      return true;
    }

    RealScalar cutoff(0), biggest_in_corner;

    for (Index k = 0; k < size; ++k)
    {
      // Find largest diagonal element
      Index index_of_biggest_in_corner;
      biggest_in_corner = mat.diagonal().tail(size-k).cwiseAbs().maxCoeff(&index_of_biggest_in_corner);
      index_of_biggest_in_corner += k;

      if(k == 0)
      {
        // The biggest overall is the point of reference to which further diagonals
        // are compared; if any diagonal is negligible compared
        // to the largest overall, the algorithm bails.
        cutoff = abs(NumTraits<Scalar>::epsilon() * biggest_in_corner);
      }

      // Finish early if the matrix is not full rank.
      if(biggest_in_corner < cutoff)
      {
        for(Index i = k; i < size; i++) transpositions.coeffRef(i) = i;
        break;
      }

      transpositions.coeffRef(k) = index_of_biggest_in_corner;
      if(k != index_of_biggest_in_corner)
      {
        // apply the transposition while taking care to consider only
        // the lower triangular part
        Index s = size-index_of_biggest_in_corner-1; // trailing size after the biggest element
        mat.row(k).head(k).swap(mat.row(index_of_biggest_in_corner).head(k));
        mat.col(k).tail(s).swap(mat.col(index_of_biggest_in_corner).tail(s));
        std::swap(mat.coeffRef(k,k),mat.coeffRef(index_of_biggest_in_corner,index_of_biggest_in_corner));
        for(int i=k+1;i<index_of_biggest_in_corner;++i)
        {
          Scalar tmp = mat.coeffRef(i,k);
          mat.coeffRef(i,k) = numext::conj(mat.coeffRef(index_of_biggest_in_corner,i));
          mat.coeffRef(index_of_biggest_in_corner,i) = numext::conj(tmp);
        }
        if(NumTraits<Scalar>::IsComplex)
          mat.coeffRef(index_of_biggest_in_corner,k) = numext::conj(mat.coeff(index_of_biggest_in_corner,k));
      }

      // partition the matrix:
      //       A00 |  -  |  -
      // lu  = A10 | A11 |  -
      //       A20 | A21 | A22
      Index rs = size - k - 1;
      Block<MatrixType,Dynamic,1> A21(mat,k+1,k,rs,1);
      Block<MatrixType,1,Dynamic> A10(mat,k,0,1,k);
      Block<MatrixType,Dynamic,Dynamic> A20(mat,k+1,0,rs,k);

      if(k>0)
      {
        temp.head(k) = mat.diagonal().head(k).asDiagonal() * A10.adjoint();
        mat.coeffRef(k,k) -= (A10 * temp.head(k)).value();
        if(rs>0)
          A21.noalias() -= A20 * temp.head(k);
      }
      if((rs>0) && (abs(mat.coeffRef(k,k)) > cutoff))
        A21 /= mat.coeffRef(k,k);

      RealScalar realAkk = numext::real(mat.coeffRef(k,k));
      if (sign == PositiveSemiDef) {
        if (realAkk < 0) sign = Indefinite;
      } else if (sign == NegativeSemiDef) {
        if (realAkk > 0) sign = Indefinite;
      } else if (sign == ZeroSign) {
        if (realAkk > 0) sign = PositiveSemiDef;
        else if (realAkk < 0) sign = NegativeSemiDef;
      }
    }

    return true;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rcx, 0x18(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x8(%rdi), %rbx
cmpq 0x10(%rdi), %rbx
jne 0x243e8
movq %rdi, %r13
cmpq $0x2, %rbx
jge 0x23ef0
movq 0x20(%rsp), %rdi
callq 0x2448a
movq (%r13), %rax
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setbe %al
incl %eax
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
cmovbel %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, %al
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movabsq $0x100000000, %r14      # imm = 0x100000000
movq %r13, 0x30(%rsp)
movq %rbx, %r15
subq %r12, %r15
je 0x23edc
movsd %xmm1, 0x10(%rsp)
movq %r13, 0x48(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %r15, %rdx
callq 0x244a2
movupd 0xa0(%rsp), %xmm0
movapd %xmm0, 0xf0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x118(%rsp)
leaq 0xf0(%rsp), %rdi
movq %rsp, %rsi
callq 0x244c8
movq (%rsp), %rax
leaq (%rax,%r12), %rbp
movq %rbp, (%rsp)
movapd %xmm0, %xmm1
mulsd 0x1c180(%rip), %xmm1    # 0x40108
testq %r12, %r12
je 0x23f95
movsd 0x10(%rsp), %xmm1
jmp 0x23f9d
andpd 0x1c193(%rip), %xmm1    # 0x40130
ucomisd %xmm0, %xmm1
ja 0x240f4
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
movslq %r12d, %rdx
movl %ebp, (%rcx,%rdx,4)
testq %rax, %rax
je 0x24121
notq %rbp
addq %rbx, %rbp
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq 0x30(%rsp), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x248ec
leaq 0xf0(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x244f2
movq (%rsp), %rdx
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x248ec
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
leaq 0x78(%rsp), %rsi
movq %r12, %rdx
callq 0x244f2
leaq 0xf0(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x24506
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x24bca
leaq 0xf0(%rsp), %rdi
leaq 0x48(%rsp), %rsi
movq %rbp, %rdx
callq 0x24518
movq (%rsp), %rdx
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0x24bca
movq %r14, %rdi
leaq 0x78(%rsp), %rsi
movq %rbp, %rdx
callq 0x24518
leaq 0xf0(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x24530
movq (%r13), %rsi
movq 0x8(%r13), %rax
movq %rax, %rcx
imulq %r12, %rcx
leaq (%rsi,%rcx,8), %rcx
movq (%rsp), %rdx
movq %rdx, %rdi
imulq %rax, %rdi
movsd (%rcx,%r12,8), %xmm0
leaq (%rsi,%rdx,8), %rsi
movsd (%rsi,%rdi,8), %xmm1
movsd %xmm1, (%rcx,%r12,8)
movsd %xmm0, (%rsi,%rdi,8)
leal 0x1(%r12), %edi
movslq %edi, %rdi
cmpq %rdi, %rdx
jle 0x24121
movsd (%rcx,%rdi,8), %xmm0
movq %rax, %r8
imulq %rdi, %r8
movsd (%rsi,%r8,8), %xmm1
movsd %xmm1, (%rcx,%rdi,8)
movsd %xmm0, (%rsi,%r8,8)
incl %edi
jmp 0x240cb
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %r12, %rcx
shlq $0x20, %rcx
movq %r12, %rdx
cmpq %rdx, %rbx
je 0x24307
movq %rcx, %rsi
sarq $0x1e, %rsi
movl %edx, (%rax,%rsi)
incq %rdx
addq %r14, %rcx
jmp 0x24106
leaq -0x1(%r15), %r8
movq %r8, 0x40(%rsp)
leaq 0x1(%r12), %rbp
leaq 0x78(%rsp), %rdi
movq 0x30(%rsp), %r13
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
pushq $0x1
popq %r14
movq %r14, %r9
callq 0x24542
leaq 0x168(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movq %r12, %r9
callq 0x245cc
leaq 0x1b8(%rsp), %rdi
movq %r13, %rsi
movq %rbp, 0x38(%rsp)
movq %rbp, %rdx
xorl %ecx, %ecx
movq 0x40(%rsp), %r8
movq %r12, %r9
callq 0x24656
testq %r12, %r12
je 0x2430f
movq %r13, 0x158(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x158(%rsp), %rsi
movq %r12, %rdx
callq 0x246c4
movups 0x48(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x168(%rsp), %rax
movq 0x178(%rsp), %rcx
movq %rax, 0x190(%rsp)
movq %rcx, 0x1a0(%rsp)
leaq 0x180(%rsp), %rax
movups (%rax), %xmm0
leaq 0x1a8(%rsp), %rax
movups %xmm0, (%rax)
leaq 0xf0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x25012
leaq 0x1e0(%rsp), %r14
movq %r14, %rdi
movq 0x28(%rsp), %rbp
movq %rbp, %rsi
movq %r12, %rdx
callq 0x246d8
movq %r14, %rdi
leaq 0xf0(%rsp), %r14
movq %r14, %rsi
callq 0x2518a
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x246d8
leaq 0xa0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
movq %r14, %rdx
callq 0x25260
movq 0x8(%r13), %rax
imulq %r12, %rax
shlq $0x3, %rax
addq (%r13), %rax
movsd (%rax,%r12,8), %xmm0
subsd 0xa0(%rsp), %xmm0
movsd %xmm0, (%rax,%r12,8)
cmpq $0x2, %r15
movabsq $0x100000000, %r14      # imm = 0x100000000
jl 0x24353
leaq 0xa0(%rsp), %r15
movq %r15, %rdi
movq 0x28(%rsp), %rsi
movq %r12, %rdx
callq 0x246d8
leaq 0xf0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x1b8(%rsp), %rsi
movq %r15, %rdx
callq 0x253ea
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
callq 0x25440
movq 0x140(%rsp), %rdi
callq 0xe670
jmp 0x2431f
incq %r12
jmp 0x243c7
cmpq $0x2, %r15
movabsq $0x100000000, %r14      # imm = 0x100000000
jl 0x24353
movq 0x8(%r13), %rax
imulq %r12, %rax
shlq $0x3, %rax
addq (%r13), %rax
movsd (%rax,%r12,8), %xmm0
andpd 0x1bdf3(%rip), %xmm0    # 0x40130
ucomisd 0x10(%rsp), %xmm0
jbe 0x24353
leaq (%rax,%r12,8), %rsi
leaq 0x78(%rsp), %rdi
callq 0x246ec
movq 0x8(%r13), %rax
imulq %r12, %rax
shlq $0x3, %rax
addq (%r13), %rax
movsd (%rax,%r12,8), %xmm2
movq 0x18(%rsp), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0x243a3
cmpl $0x1, %eax
movsd 0x8(%rsp), %xmm0
je 0x24394
testl %eax, %eax
jne 0x243bc
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm0
jmp 0x2439c
ucomisd 0x1bce4(%rip), %xmm2    # 0x40080
pushq $0x3
popq %rax
jbe 0x243bc
jmp 0x243b5
xorl %eax, %eax
ucomisd 0x1bcd3(%rip), %xmm2    # 0x40080
movsd 0x8(%rsp), %xmm0
jbe 0x243d6
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movq 0x38(%rsp), %r12
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x23f06
jmp 0x23edc
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm0
pushq $0x1
jmp 0x2439e
leaq 0x20d22(%rip), %rdi     # 0x45111
leaq 0x20af9(%rip), %rsi     # 0x44eef
leaq 0x20d2b(%rip), %rcx     # 0x45128
movl $0x109, %edx            # imm = 0x109
callq 0xe380
movq %rax, %rbx
movq 0x140(%rsp), %rdi
callq 0xe670
movq %rbx, %rdi
callq 0xe9f0
nop