// File: /workspace/github_cpp_makefile_star2_O2/canzarlab[P]Trajan/geno/lbfgsb.cpp
// Function: LBFGSB::choleskyFactorK()
void LBFGSB::choleskyFactorK() {
  Index n = _K.rows() / 2;
  Matrix A1 = -_K.topLeftCorner(n, n);
  Matrix A2 = -_K.bottomLeftCorner(n, n);
  Matrix A3 = _K.bottomRightCorner(n, n);

  Matrix L1 = A1.llt().matrixL();
  Matrix U1 = L1.transpose();
  Matrix B2 = A2;
  U1.triangularView<Eigen::Upper>().solveInPlace<Eigen::OnTheRight>(B2);
  Matrix B3 = A3 + B2*B2.transpose();
  Matrix L3 = B3.llt().matrixL();

  _L = Matrix::Zero(n * 2, 2 * n);
  _L.topLeftCorner(n, n) = L1;
  _L.bottomLeftCorner(n, n) = B2;
  _L.bottomRightCorner(n, n) = L3;

  _E = Matrix::Zero(n * 2, 2 * n);
  _E.topLeftCorner(n, n) = -Matrix::Identity(n, n);
  _E.bottomRightCorner(n, n) = Matrix::Identity(n, n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, %rbx
leaq 0x140(%rdi), %r15
movq 0x148(%rdi), %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
movq %rax, %r14
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %rax, %rcx
callq 0x133b2
movq 0x30(%r12), %rax
movq %rsp, %rsi
movq %rax, 0x30(%rsi)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x110(%rsp), %rdi
callq 0x207fa
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x133e8
movq 0x78(%rsp), %rax
movq %rsp, %rsi
movq %rax, 0x30(%rsi)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups 0x68(%rsp), %xmm2
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0xf8(%rsp), %rdi
callq 0x207fa
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x13406
leaq 0xe0(%rsp), %rdi
movq %rsp, %rsi
callq 0x20aba
movq %rsp, %rdi
leaq 0x110(%rsp), %rsi
callq 0x20d6e
movq %rsp, %rdi
callq 0x135ba
leaq 0x48(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xc8(%rsp), %r15
movq %r15, %rdi
callq 0x2424e
movq %rsp, %r12
movq (%r12), %rdi
callq 0x93c0
movq %r15, (%r12)
leaq 0x128(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x24466
leaq 0x98(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x246b4
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x98(%rsp), %r15
movq %r15, %rsi
callq 0x135e4
leaq 0x80(%rsp), %rsi
movq %r15, (%rsi)
movq %r15, %rdi
callq 0x13638
leaq 0x48(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
movq %rcx, %rdx
callq 0x1361c
leaq 0xb0(%rsp), %rdi
movq %rsp, %rsi
callq 0x25090
movq %rsp, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x20d6e
movq %rsp, %rdi
callq 0x135ba
leaq 0x48(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x80(%rsp), %rdi
callq 0x2424e
movq %rsp, %r12
movq (%r12), %rdi
callq 0x93c0
movq %r14, %r15
addq %r14, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x1365c
leaq 0x158(%rbx), %r12
movq %rsp, %rsi
movq %r12, %rdi
callq 0x25651
movq %rsp, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x133b2
movq %rsp, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x19fa7
movq %rsp, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x133e8
movq %rsp, %rdi
leaq 0x98(%rsp), %rsi
callq 0x19fa7
movq %rsp, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x13406
movq %rsp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x19fa7
movq %rsp, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x1365c
addq $0x170, %rbx            # imm = 0x170
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x25651
leaq 0x140(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x132c6
movups 0x140(%rsp), %xmm0
movups %xmm0, 0x50(%rsp)
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x133b2
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq 0x25784
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x132c6
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r14, %rcx
callq 0x13406
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq 0x258b6
movq 0x80(%rsp), %rdi
callq 0x93c0
movq 0xb0(%rsp), %rdi
callq 0x93c0
movq 0x98(%rsp), %rdi
callq 0x93c0
movq 0x128(%rsp), %rdi
callq 0x93c0
movq 0xc8(%rsp), %rdi
callq 0x93c0
movq 0xe0(%rsp), %rdi
callq 0x93c0
movq 0xf8(%rsp), %rdi
callq 0x93c0
movq 0x110(%rsp), %rdi
callq 0x93c0
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x10128
jmp 0x10128
movq %rax, %rbx
jmp 0x10138
jmp 0x101b7
movq %rax, %rbx
jmp 0x10152
movq %rax, %rbx
jmp 0x1015f
movq %rax, %rbx
jmp 0x1016c
jmp 0x10128
jmp 0x10128
jmp 0x10128
jmp 0x10128
jmp 0x10128
jmp 0x10128
movq %rax, %rbx
movq 0x80(%rsp), %rdi
callq 0x93c0
movq 0xb0(%rsp), %rdi
callq 0x93c0
movq 0x98(%rsp), %rdi
callq 0x93c0
movq 0x128(%rsp), %rdi
callq 0x93c0
movq 0xc8(%rsp), %rdi
callq 0x93c0
movq 0xe0(%rsp), %rdi
callq 0x93c0
movq 0xf8(%rsp), %rdi
callq 0x93c0
movq 0x110(%rsp), %rdi
callq 0x93c0
movq %rbx, %rdi
callq 0x9640
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x10133
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x10167
movq %rax, %rbx
jmp 0x10179
movq %rax, %rbx
jmp 0x10186
movq %rax, %rbx
jmp 0x10145