// File: j-faria[P]kima/eigen/Eigen/src/Cholesky/LLT.h
// Function: long Eigen::internal::llt_inplace<double, 1>::unblocked<Eigen::Matrix<double, -1, -1, 0, -1, -1>>(Eigen::Matrix<double, -1, -1, 0, -1, -1>&)
static Index unblocked(MatrixType& mat)
  {
    using std::sqrt;

    eigen_assert(mat.rows()==mat.cols());
    const Index size = mat.rows();
    for(Index k = 0; k < size; ++k)
    {
      Index rs = size-k-1; // remaining size

      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);

      RealScalar x = numext::real(mat.coeff(k,k));
      if (k>0) x -= A10.squaredNorm();
      if (x<=RealScalar(0))
        return k;
      mat.coeffRef(k,k) = x = sqrt(x);
      if (k>0 && rs>0) A21.noalias() -= A20 * A10.adjoint();
      if (rs>0) A21 /= x;
    }
    return -1;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2f070
movq %rax, -0x190(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2f0b0
movq %rax, %rcx
movq -0x190(%rbp), %rax
cmpq %rcx, %rax
jne 0x37599
jmp 0x375b8
leaq 0x829bd(%rip), %rdi     # 0xb9f5d
leaq 0x8144b(%rip), %rsi     # 0xb89f2
movl $0x13d, %edx            # imm = 0x13D
leaq 0x829c1(%rip), %rcx     # 0xb9f74
callq 0x6340
movq -0x10(%rbp), %rdi
callq 0x2f070
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x3777b
movq -0x18(%rbp), %rax
subq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x60(%rbp), %rdi
movl $0x1, %r9d
callq 0x37cc0
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %r9
leaq -0x98(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %r8d
callq 0x37de0
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
movq -0x28(%rbp), %r8
movq -0x20(%rbp), %r9
leaq -0xd0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x37790
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x37f30
movq %rax, %rdi
callq 0x37f10
movsd %xmm0, -0xd8(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0x3769f
leaq -0x98(%rbp), %rdi
callq 0x37fa0
movaps %xmm0, %xmm1
movsd -0xd8(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
xorps %xmm0, %xmm0
ucomisd -0xd8(%rbp), %xmm0
jb 0x376b9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x37783
movsd -0xd8(%rbp), %xmm0
callq 0x6410
movsd %xmm0, -0x198(%rbp)
movsd %xmm0, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x37fe0
movsd -0x198(%rbp), %xmm0
movsd %xmm0, (%rax)
cmpq $0x0, -0x20(%rbp)
jle 0x37751
cmpq $0x0, -0x28(%rbp)
jle 0x37751
leaq -0x180(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x380a0
leaq -0x148(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x38050
leaq -0x60(%rbp), %rdi
callq 0x380d0
movq %rax, -0x188(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x38100
cmpq $0x0, -0x28(%rbp)
jle 0x37768
leaq -0x60(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x38160
jmp 0x3776a
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x375cd
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq