// File: 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
movq %rsp, %rbp
subq $0x560, %rsp            # imm = 0x560
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x24690
movq %rax, -0x520(%rbp)
movq -0x10(%rbp), %rdi
callq 0x286d0
movq %rax, %rcx
movq -0x520(%rbp), %rax
cmpq %rcx, %rax
jne 0x4d285
jmp 0x4d2a4
leaq 0x74192(%rip), %rdi     # 0xc141e
leaq 0x73f69(%rip), %rsi     # 0xc11fc
movl $0x109, %edx            # imm = 0x109
leaq 0x74196(%rip), %rcx     # 0xc1435
callq 0x104a0
movq -0x10(%rbp), %rdi
callq 0x24690
movq %rax, -0x30(%rbp)
cmpq $0x1, -0x30(%rbp)
jg 0x4d333
movq -0x18(%rbp), %rdi
callq 0x4daf0
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x4db60
movq %rax, %rdi
callq 0x4c2a0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4d2ee
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
jmp 0x4d32a
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x4db60
movq %rax, %rdi
callq 0x4c2a0
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4d31e
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
jmp 0x4d328
movq -0x28(%rbp), %rax
movl $0x2, (%rax)
jmp 0x4d32a
movb $0x1, -0x1(%rbp)
jmp 0x4d99d
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x4d999
movq -0x10(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x4dbd0
movq -0x30(%rbp), %rdx
subq -0x48(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x4dc10
leaq -0x88(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x4dc70
leaq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4dcc0
movsd %xmm0, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x4d3cb
callq 0x4dd20
mulsd -0x40(%rbp), %xmm0
callq 0x4dd00
movsd %xmm0, -0x38(%rbp)
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4d433
movq -0x48(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x4d42e
movq -0xd0(%rbp), %rax
movl %eax, -0x524(%rbp)
movq -0x18(%rbp), %rdi
movq -0xd0(%rbp), %rax
movl %eax, %esi
callq 0x4dd30
movl -0x524(%rbp), %ecx
movl %ecx, (%rax)
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0x4d3e6
jmp 0x4d999
movq -0x50(%rbp), %rax
movl %eax, -0x528(%rbp)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rax
movl %eax, %esi
callq 0x4dd30
movl -0x528(%rbp), %ecx
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x4d656
movq -0x30(%rbp), %rax
subq -0x50(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x148(%rbp), %rdi
callq 0x4dd60
movq -0x48(%rbp), %rdx
leaq -0x120(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x4ddb0
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x4dd60
movq -0x48(%rbp), %rdx
leaq -0x190(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x4ddb0
leaq -0x120(%rbp), %rdi
leaq -0x190(%rbp), %rsi
xorl %edx, %edx
callq 0x4de00
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x228(%rbp), %rdi
callq 0x4de50
movq -0xd8(%rbp), %rdx
leaq -0x200(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x4dea0
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x298(%rbp), %rdi
callq 0x4de50
movq -0xd8(%rbp), %rdx
leaq -0x270(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x4dea0
leaq -0x200(%rbp), %rdi
leaq -0x270(%rbp), %rsi
xorl %edx, %edx
callq 0x4df00
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movq %rax, -0x530(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x4cc60
movq -0x530(%rbp), %rdi
movq %rax, %rsi
callq 0x4df50
movq -0x48(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x29c(%rbp)
movslq -0x29c(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0x4d654
movq -0x10(%rbp), %rdi
movslq -0x29c(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movsd (%rax), %xmm0
movsd %xmm0, -0x2a8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movslq -0x29c(%rbp), %rdx
callq 0x4cc60
movq %rax, %rdi
callq 0x4df90
movsd %xmm0, -0x540(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x29c(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movsd -0x540(%rbp), %xmm0
movsd %xmm0, (%rax)
leaq -0x2a8(%rbp), %rdi
callq 0x4df90
movsd %xmm0, -0x538(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movslq -0x29c(%rbp), %rdx
callq 0x4cc60
movsd -0x538(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x29c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x29c(%rbp)
jmp 0x4d597
jmp 0x4d656
movq -0x30(%rbp), %rax
subq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x2b0(%rbp)
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq $0x1, %rdx
movq -0x48(%rbp), %rcx
movq -0x2b0(%rbp), %r8
leaq -0x2d8(%rbp), %rdi
movl $0x1, %r9d
callq 0x4dfb0
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x48(%rbp), %r9
leaq -0x300(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %r8d
callq 0x4e0d0
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq $0x1, %rdx
movq -0x2b0(%rbp), %r8
movq -0x48(%rbp), %r9
leaq -0x328(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x4e200
cmpq $0x0, -0x48(%rbp)
jle 0x4d88d
movq -0x10(%rbp), %rsi
leaq -0x3f0(%rbp), %rdi
callq 0x4dbd0
movq -0x48(%rbp), %rdx
leaq -0x3e0(%rbp), %rdi
leaq -0x3f0(%rbp), %rsi
callq 0x4e2f0
leaq -0x3b0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
callq 0x4e340
leaq -0x418(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0x4e3e0
leaq -0x380(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
leaq -0x418(%rbp), %rdx
callq 0x4e380
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x440(%rbp), %rdi
callq 0x4e410
leaq -0x440(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x4e460
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x470(%rbp), %rdi
callq 0x4e410
leaq -0x448(%rbp), %rdi
leaq -0x300(%rbp), %rsi
leaq -0x470(%rbp), %rdx
callq 0x4e4a0
leaq -0x448(%rbp), %rdi
callq 0x4e4f0
movsd (%rax), %xmm0
movsd %xmm0, -0x548(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movsd -0x548(%rbp), %xmm1
movsd (%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax)
cmpq $0x0, -0x2b0(%rbp)
jle 0x4d88b
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x4f8(%rbp), %rdi
movq %rdi, -0x558(%rbp)
callq 0x4e410
movq -0x558(%rbp), %rdx
leaq -0x4d0(%rbp), %rdi
leaq -0x328(%rbp), %rsi
callq 0x4e580
leaq -0x2d8(%rbp), %rdi
callq 0x4e5d0
movq %rax, -0x550(%rbp)
jmp 0x4d837
movq -0x550(%rbp), %rax
movq %rax, -0x500(%rbp)
leaq -0x500(%rbp), %rdi
leaq -0x4d0(%rbp), %rsi
callq 0x4e600
jmp 0x4d85a
leaq -0x4d0(%rbp), %rdi
callq 0x4e640
jmp 0x4d88b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x508(%rbp)
movl %eax, -0x50c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x4e640
jmp 0x4d9ab
jmp 0x4d88d
cmpq $0x0, -0x2b0(%rbp)
jle 0x4d8d8
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movsd (%rax), %xmm0
callq 0x4dd00
ucomisd -0x38(%rbp), %xmm0
jbe 0x4d8d8
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movq %rax, %rsi
leaq -0x2d8(%rbp), %rdi
callq 0x4e660
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x4cc60
movq %rax, %rdi
callq 0x4c2a0
movsd %xmm0, -0x518(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x4d91b
xorps %xmm0, %xmm0
ucomisd -0x518(%rbp), %xmm0
jbe 0x4d919
movq -0x28(%rbp), %rax
movl $0x3, (%rax)
jmp 0x4d986
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x4d941
movsd -0x518(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4d93f
movq -0x28(%rbp), %rax
movl $0x3, (%rax)
jmp 0x4d984
movq -0x28(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x4d982
movsd -0x518(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4d967
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
jmp 0x4d980
xorps %xmm0, %xmm0
ucomisd -0x518(%rbp), %xmm0
jbe 0x4d97e
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
jmp 0x4d980
jmp 0x4d982
jmp 0x4d984
jmp 0x4d986
jmp 0x4d988
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x4d343
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x560, %rsp            # imm = 0x560
popq %rbp
retq
movq -0x508(%rbp), %rdi
callq 0x10cc0
nopw (%rax,%rax)