// File: 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 %rbp
movq %rsp, %rbp
subq $0x4b0, %rsp            # imm = 0x4B0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x470(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq %rdi, -0x458(%rbp)
callq 0x26850
movq -0x458(%rbp), %rsi
movq %rax, %rcx
shrq $0x3f, %rcx
addq %rcx, %rax
sarq %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x468(%rbp)
movq %rcx, %rdx
callq 0x26ed0
movq -0x468(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x460(%rbp)
callq 0x27640
movq -0x460(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x27690
movq -0x458(%rbp), %rsi
movq -0x10(%rbp), %rcx
leaq -0x130(%rbp), %rdi
movq %rcx, %rdx
callq 0x27000
jmp 0x207c2
leaq -0xf8(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x27640
jmp 0x207d7
leaq -0xb8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x27690
jmp 0x207ec
movq -0x470(%rbp), %rsi
addq $0x140, %rsi            # imm = 0x140
movq -0x10(%rbp), %rcx
leaq -0x190(%rbp), %rdi
movq %rcx, %rdx
callq 0x270f0
jmp 0x2080f
leaq -0x158(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x276d0
jmp 0x20824
leaq -0x1d8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x27710
jmp 0x20836
leaq -0x1d8(%rbp), %rdi
callq 0x27750
movq %rax, -0x478(%rbp)
jmp 0x2084b
movq -0x478(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x277c0
jmp 0x2086e
leaq -0x1d8(%rbp), %rdi
callq 0x27800
leaq -0x1a8(%rbp), %rdi
callq 0x26900
movq %rax, -0x480(%rbp)
jmp 0x2088f
movq -0x480(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x27820
jmp 0x208b2
leaq -0x210(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x27860
jmp 0x208c7
leaq -0x1f0(%rbp), %rdi
callq 0x27890
movq %rax, -0x488(%rbp)
jmp 0x208dc
movq -0x488(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x278c0
jmp 0x208ff
leaq -0x210(%rbp), %rdi
callq 0x26900
movq %rax, -0x490(%rbp)
jmp 0x20914
movq -0x490(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x27a10
movq %rdx, -0x4a0(%rbp)
movq %rax, -0x498(%rbp)
jmp 0x20945
movq -0x4a0(%rbp), %rax
movq -0x498(%rbp), %rcx
movq %rcx, -0x260(%rbp)
movq %rax, -0x258(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x158(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0x279a0
jmp 0x2097d
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x27a60
jmp 0x20992
leaq -0x2b0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x27710
jmp 0x209a7
leaq -0x2b0(%rbp), %rdi
callq 0x27750
movq %rax, -0x4a8(%rbp)
jmp 0x209bc
movq -0x4a8(%rbp), %rax
movq %rax, -0x288(%rbp)
leaq -0x280(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x277c0
jmp 0x209df
leaq -0x2b0(%rbp), %rdi
callq 0x27800
movq -0x10(%rbp), %rdx
addq %rdx, %rdx
leaq -0x2c8(%rbp), %rdi
movq %rdx, %rsi
callq 0x27aa0
jmp 0x20a03
movq -0x470(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
leaq -0x2c8(%rbp), %rsi
callq 0x27ae0
jmp 0x20a1f
movq -0x470(%rbp), %rsi
addq $0x158, %rsi            # imm = 0x158
movq -0x10(%rbp), %rcx
leaq -0x300(%rbp), %rdi
movq %rcx, %rdx
callq 0x26ed0
jmp 0x20a42
leaq -0x300(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x26fc0
jmp 0x20a57
movq -0x470(%rbp), %rsi
addq $0x158, %rsi            # imm = 0x158
movq -0x10(%rbp), %rcx
leaq -0x338(%rbp), %rdi
movq %rcx, %rdx
callq 0x27000
jmp 0x20a7a
leaq -0x338(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x26fc0
jmp 0x20a8f
movq -0x470(%rbp), %rsi
addq $0x158, %rsi            # imm = 0x158
movq -0x10(%rbp), %rcx
leaq -0x370(%rbp), %rdi
movq %rcx, %rdx
callq 0x270f0
jmp 0x20ab2
leaq -0x370(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x26fc0
jmp 0x20ac7
movq -0x10(%rbp), %rdx
addq %rdx, %rdx
leaq -0x388(%rbp), %rdi
movq %rdx, %rsi
callq 0x27aa0
jmp 0x20adf
movq -0x470(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
leaq -0x388(%rbp), %rsi
callq 0x27ae0
jmp 0x20afb
movq -0x10(%rbp), %rdx
leaq -0x3c8(%rbp), %rdi
movq %rdx, %rsi
callq 0x26ad0
jmp 0x20b10
leaq -0x3b0(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0x27b10
jmp 0x20b25
movq -0x470(%rbp), %rsi
addq $0x170, %rsi            # imm = 0x170
movq -0x10(%rbp), %rcx
leaq -0x400(%rbp), %rdi
movq %rcx, %rdx
callq 0x26ed0
jmp 0x20b48
leaq -0x400(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x27b60
jmp 0x20b5d
movq -0x10(%rbp), %rdx
leaq -0x418(%rbp), %rdi
movq %rdx, %rsi
callq 0x26ad0
jmp 0x20b72
movq -0x470(%rbp), %rsi
addq $0x170, %rsi            # imm = 0x170
movq -0x10(%rbp), %rcx
leaq -0x450(%rbp), %rdi
movq %rcx, %rdx
callq 0x270f0
jmp 0x20b95
leaq -0x450(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x27ba0
jmp 0x20baa
leaq -0x280(%rbp), %rdi
callq 0x1ae20
leaq -0x230(%rbp), %rdi
callq 0x1ae20
leaq -0x210(%rbp), %rdi
callq 0x1ae20
leaq -0x1f0(%rbp), %rdi
callq 0x1ae20
leaq -0x1a8(%rbp), %rdi
callq 0x1ae20
leaq -0x158(%rbp), %rdi
callq 0x1ae20
leaq -0xb8(%rbp), %rdi
callq 0x1ae20
leaq -0x28(%rbp), %rdi
callq 0x1ae20
addq $0x4b0, %rsp            # imm = 0x4B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x27800
jmp 0x20d39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
jmp 0x20d09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x27800
jmp 0x20d09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x1ae20
leaq -0x230(%rbp), %rdi
callq 0x1ae20
leaq -0x210(%rbp), %rdi
callq 0x1ae20
leaq -0x1f0(%rbp), %rdi
callq 0x1ae20
leaq -0x1a8(%rbp), %rdi
callq 0x1ae20
leaq -0x158(%rbp), %rdi
callq 0x1ae20
leaq -0xb8(%rbp), %rdi
callq 0x1ae20
leaq -0x28(%rbp), %rdi
callq 0x1ae20
movq -0x138(%rbp), %rdi
callq 0xa7c0
nopw %cs:(%rax,%rax)