// File: j-faria[P]kima/eigen/Eigen/src/Cholesky/LLT.h
// Function: long Eigen::internal::llt_inplace<double, 1>::blocked<Eigen::Matrix<double, -1, -1, 0, -1, -1>>(Eigen::Matrix<double, -1, -1, 0, -1, -1>&)
static Index blocked(MatrixType& m)
  {
    eigen_assert(m.rows()==m.cols());
    Index size = m.rows();
    if(size<32)
      return unblocked(m);

    Index blockSize = size/8;
    blockSize = (blockSize/16)*16;
    blockSize = (std::min)((std::max)(blockSize,Index(8)), Index(128));

    for (Index k=0; k<size; k+=blockSize)
    {
      // partition the matrix:
      //       A00 |  -  |  -
      // lu  = A10 | A11 |  -
      //       A20 | A21 | A22
      Index bs = (std::min)(blockSize, size-k);
      Index rs = size - k - bs;
      Block<MatrixType,Dynamic,Dynamic> A11(m,k,   k,   bs,bs);
      Block<MatrixType,Dynamic,Dynamic> A21(m,k+bs,k,   rs,bs);
      Block<MatrixType,Dynamic,Dynamic> A22(m,k+bs,k+bs,rs,rs);

      Index ret;
      if((ret=unblocked(A11))>=0) return k+ret;
      if(rs>0) A11.adjoint().template triangularView<Upper>().template solveInPlace<OnTheRight>(A21);
      if(rs>0) A22.template selfadjointView<Lower>().rankUpdate(A21,typename NumTraits<RealScalar>::Literal(-1)); // bottleneck
    }
    return -1;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2f070
movq %rax, -0x1b8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2f0b0
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
cmpq %rcx, %rax
jne 0x37329
jmp 0x37348
leaq 0x82b86(%rip), %rdi     # 0xb9eb6
leaq 0x816bb(%rip), %rsi     # 0xb89f2
movl $0x155, %edx            # imm = 0x155
leaq 0x82b86(%rip), %rcx     # 0xb9ec9
callq 0x6340
movq -0x10(%rbp), %rdi
callq 0x2f070
movq %rax, -0x18(%rbp)
cmpq $0x20, -0x18(%rbp)
jge 0x3736e
movq -0x10(%rbp), %rdi
callq 0x37560
movq %rax, -0x8(%rbp)
jmp 0x37544
movq -0x18(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x10, %ecx
cqto
idivq %rcx
shlq $0x4, %rax
movq %rax, -0x20(%rbp)
movq $0x8, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7cb0
movq %rax, %rdi
movq $0x80, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x7cf0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x3753c
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x7cf0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x40(%rbp), %r9
leaq -0x88(%rbp), %rdi
callq 0x37790
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x40(%rbp), %r9
leaq -0xc0(%rbp), %rdi
callq 0x37790
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
addq -0x40(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x50(%rbp), %r9
leaq -0xf8(%rbp), %rdi
callq 0x37790
leaq -0x88(%rbp), %rdi
callq 0x37880
movq %rax, -0x100(%rbp)
cmpq $0x0, %rax
jl 0x374a5
movq -0x38(%rbp), %rax
addq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x37544
cmpq $0x0, -0x50(%rbp)
jle 0x374e5
leaq -0x170(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x37ac0
leaq -0x138(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x37af0
leaq -0x138(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x37b30
cmpq $0x0, -0x50(%rbp)
jle 0x37529
leaq -0x1a8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x37c30
movsd 0x80191(%rip), %xmm0    # 0xb7698
movsd %xmm0, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
callq 0x37c70
jmp 0x3752b
movq -0x20(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x373ce
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)