// File: canzarlab[P]Trajan/geno/lbfgsb.cpp
// Function: LBFGSB::updateB()
void LBFGSB::updateB() {
  Scalar ys = _y.dot(_s);
  Scalar yy = _y.dot(_y);
  Scalar const eps = std::numeric_limits<Scalar>::epsilon();
  if (ys > (eps * yy)) {
    //		  _theta = _y.dot(_y) / ys / 2;  // TODO redo
    _theta = _y.dot(_y) / ys;
    Vector yws = _y;
    Vector sws = _s;
    yws = yws.cwiseProduct(_workingSet);
    sws = sws.cwiseProduct(_workingSet);

    if (_S.cols() < _m) {
      _S.conservativeResize(_S.rows(), _S.cols() + 1);
      _Y.conservativeResize(_Y.rows(), _Y.cols() + 1);
      _SY.conservativeResize(_SY.rows() + 1, _SY.cols() + 1);
      _SS.conservativeResize(_SS.rows() + 1, _SS.cols() + 1);
      _SYws.conservativeResize(_SYws.rows() + 1, _SYws.cols() + 1);
      _SSws.conservativeResize(_SSws.rows() + 1, _SSws.cols() + 1);
      _YYws.conservativeResize(_YYws.rows() + 1, _YYws.cols() + 1);
    }  
    _S.col(_index) = _s;
    _Y.col(_index) = _y;
    
    _SY.col(_index) = _S.transpose()*_y;
    _SS.col(_index) = _S.transpose()*_s;
    _SYws.col(_index) = _S.transpose() * yws;
    _SSws.col(_index) = _S.transpose() * sws;
    _SYws.row(_index) = _Y.transpose() * sws;
    _SY.row(_index) = _Y.transpose()*_s;
    _YYws.col(_index) = _Y.transpose() * yws;
    _SS.row(_index) = _SS.col(_index).eval();
    _SSws.row(_index) = _SSws.col(_index).eval();
    _YYws.row(_index) = _YYws.col(_index).eval();
  
    _index = (_index + 1) % _m;
   } else {
    std::clog << "skipping LBFGS-B update\n";
    return;
  }
  _Q = Matrix::Identity(_S.cols(), _S.cols());
  if (_S.cols() >= _m) {  // rotate by index % m to the right
    std::rotate(_Q.data(), _Q.data() + ((_m - _index) % _m) * _m,
		_Q.data() + _m * _m);
  }
  Matrix SS2 = _Q * _SS * _Q.transpose();
  Matrix SY2 = _Q * _SY * _Q.transpose();
  Matrix D = Matrix(_SY.rows(), _SY.cols());
  D.setZero();
  D.diagonal() = SY2.diagonal();
  Matrix L = SY2.triangularView<Eigen::StrictlyLower>();

  Matrix tmp(D.rows() * 2, 2 * D.cols());
  tmp.topLeftCorner(D.rows(), D.cols()) = _theta * SS2;
  tmp.topRightCorner(D.rows(), D.cols()) = L;
  tmp.bottomLeftCorner(D.rows(), D.cols()) = L.transpose();
  tmp.bottomRightCorner(D.rows(), D.cols()) = -D;

  Eigen::FullPivLU<Matrix> lu(tmp);
  _M = lu.inverse();

  _M.topLeftCorner(D.rows(), D.cols()) *= pow(_theta, 2);
  _M.topRightCorner(D.rows(), D.cols()) *= _theta;
  _M.bottomLeftCorner(D.rows(), D.cols()) *= _theta;

  _M.topLeftCorner(D.rows(), D.cols()) = _Q.transpose() * _M.topLeftCorner(D.rows(), D.cols()) * _Q;
  _M.topRightCorner(D.rows(), D.cols()) = _Q.transpose() * _M.topRightCorner(D.rows(), D.cols()) * _Q;
  _M.bottomLeftCorner(D.rows(), D.cols()) = _Q.transpose() * _M.bottomLeftCorner(D.rows(), D.cols()) * _Q;
  _M.bottomRightCorner(D.rows(), D.cols()) = _Q.transpose() * _M.bottomRightCorner(D.rows(), D.cols()) * _Q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1040, %rsp           # imm = 0x1040
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0xcb8(%rbp)
movq %rsi, %rdi
addq $0x98, %rdi
addq $0x88, %rsi
callq 0x266e0
movq -0xcb8(%rbp), %rsi
movsd %xmm0, -0x10(%rbp)
movq %rsi, %rdi
addq $0x98, %rdi
addq $0x98, %rsi
callq 0x266e0
movsd %xmm0, -0x18(%rbp)
callq 0x26750
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0xeee32(%rip), %xmm1    # 0x10dc60
mulsd -0x18(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x1f972
movq -0xcb8(%rbp), %rsi
addq $0x98, %rsi
movq %rsi, -0xcc0(%rbp)
movq %rsi, %rdi
callq 0x266e0
movq -0xcc0(%rbp), %rsi
movq -0xcb8(%rbp), %rax
movsd -0x10(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0xd8(%rax)
leaq -0x30(%rbp), %rdi
callq 0x144f0
movq -0xcb8(%rbp), %rsi
addq $0x88, %rsi
leaq -0x40(%rbp), %rdi
callq 0x144f0
jmp 0x1ee9b
movq -0xcb8(%rbp), %rdx
addq $0x1e0, %rdx            # imm = 0x1E0
leaq -0x68(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x26760
jmp 0x1eeb8
leaq -0x30(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x267d0
jmp 0x1eec7
movq -0xcb8(%rbp), %rdx
addq $0x1e0, %rdx            # imm = 0x1E0
leaq -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x26760
jmp 0x1eee4
leaq -0x40(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x267d0
jmp 0x1eef3
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26800
movq %rax, -0xcc8(%rbp)
jmp 0x1ef0f
movq -0xcc8(%rbp), %rax
movq -0xcb8(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jge 0x1f232
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0xcd8(%rbp)
callq 0x26850
movq %rax, -0xcd0(%rbp)
jmp 0x1ef4a
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26800
movq %rax, -0xce0(%rbp)
jmp 0x1ef66
movq -0xcd0(%rbp), %rsi
movq -0xcd8(%rbp), %rdi
movq -0xce0(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1ef85
movq -0xcb8(%rbp), %rdi
addq $0xc0, %rdi
movq %rdi, -0xcf0(%rbp)
callq 0x26850
movq %rax, -0xce8(%rbp)
jmp 0x1efa8
movq -0xcb8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x26800
movq %rax, -0xcf8(%rbp)
jmp 0x1efc4
movq -0xce8(%rbp), %rsi
movq -0xcf0(%rbp), %rdi
movq -0xcf8(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1efe3
movq -0xcb8(%rbp), %rdi
addq $0xe0, %rdi
movq %rdi, -0xd08(%rbp)
callq 0x26850
movq %rax, -0xd00(%rbp)
jmp 0x1f006
movq -0xcb8(%rbp), %rdi
movq -0xd00(%rbp), %rax
incq %rax
movq %rax, -0xd18(%rbp)
addq $0xe0, %rdi
callq 0x26800
movq %rax, -0xd10(%rbp)
jmp 0x1f033
movq -0xd18(%rbp), %rsi
movq -0xd08(%rbp), %rdi
movq -0xd10(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1f052
movq -0xcb8(%rbp), %rdi
addq $0xf8, %rdi
movq %rdi, -0xd28(%rbp)
callq 0x26850
movq %rax, -0xd20(%rbp)
jmp 0x1f075
movq -0xcb8(%rbp), %rdi
movq -0xd20(%rbp), %rax
incq %rax
movq %rax, -0xd38(%rbp)
addq $0xf8, %rdi
callq 0x26800
movq %rax, -0xd30(%rbp)
jmp 0x1f0a2
movq -0xd38(%rbp), %rsi
movq -0xd28(%rbp), %rdi
movq -0xd30(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1f0c1
movq -0xcb8(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
movq %rdi, -0xd48(%rbp)
callq 0x26850
movq %rax, -0xd40(%rbp)
jmp 0x1f0e4
movq -0xcb8(%rbp), %rdi
movq -0xd40(%rbp), %rax
incq %rax
movq %rax, -0xd58(%rbp)
addq $0x188, %rdi            # imm = 0x188
callq 0x26800
movq %rax, -0xd50(%rbp)
jmp 0x1f111
movq -0xd58(%rbp), %rsi
movq -0xd48(%rbp), %rdi
movq -0xd50(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1f130
movq -0xcb8(%rbp), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movq %rdi, -0xd68(%rbp)
callq 0x26850
movq %rax, -0xd60(%rbp)
jmp 0x1f153
movq -0xcb8(%rbp), %rdi
movq -0xd60(%rbp), %rax
incq %rax
movq %rax, -0xd78(%rbp)
addq $0x1a0, %rdi            # imm = 0x1A0
callq 0x26800
movq %rax, -0xd70(%rbp)
jmp 0x1f180
movq -0xd78(%rbp), %rsi
movq -0xd68(%rbp), %rdi
movq -0xd70(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1f19f
movq -0xcb8(%rbp), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movq %rdi, -0xd88(%rbp)
callq 0x26850
movq %rax, -0xd80(%rbp)
jmp 0x1f1c2
movq -0xcb8(%rbp), %rdi
movq -0xd80(%rbp), %rax
incq %rax
movq %rax, -0xd98(%rbp)
addq $0x1b8, %rdi            # imm = 0x1B8
callq 0x26800
movq %rax, -0xd90(%rbp)
jmp 0x1f1ef
movq -0xd98(%rbp), %rsi
movq -0xd88(%rbp), %rdi
movq -0xd90(%rbp), %rdx
incq %rdx
callq 0x26820
jmp 0x1f20e
jmp 0x1f232
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1f964
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1f95b
movq -0xcb8(%rbp), %rax
movq %rax, %rcx
addq $0x88, %rcx
movq %rcx, -0xda0(%rbp)
movq %rax, %rsi
addq $0xa8, %rsi
movq 0x80(%rax), %rdx
leaq -0xb8(%rbp), %rdi
callq 0x26870
jmp 0x1f269
movq -0xda0(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x268c0
jmp 0x1f27e
movq -0xcb8(%rbp), %rax
movq %rax, %rcx
addq $0x98, %rcx
movq %rcx, -0xda8(%rbp)
movq %rax, %rsi
addq $0xc0, %rsi
movq 0x80(%rax), %rdx
leaq -0xf0(%rbp), %rdi
callq 0x26870
jmp 0x1f2b5
movq -0xda8(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x268c0
jmp 0x1f2ca
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26900
movq %rax, -0xdb0(%rbp)
jmp 0x1f2e6
movq -0xcb8(%rbp), %rsi
movq -0xdb0(%rbp), %rax
movq %rax, -0x108(%rbp)
addq $0x98, %rsi
leaq -0x108(%rbp), %rdi
callq 0x26930
movq %rdx, -0xdc0(%rbp)
movq %rax, -0xdb8(%rbp)
jmp 0x1f31e
movq -0xcb8(%rbp), %rax
movq -0xdc0(%rbp), %rcx
movq -0xdb8(%rbp), %rdx
movq %rdx, -0x100(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rax, %rsi
addq $0xe0, %rsi
movq 0x80(%rax), %rdx
leaq -0x140(%rbp), %rdi
callq 0x26870
jmp 0x1f360
leaq -0x140(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x26980
jmp 0x1f375
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26900
movq %rax, -0xdc8(%rbp)
jmp 0x1f391
movq -0xcb8(%rbp), %rsi
movq -0xdc8(%rbp), %rax
movq %rax, -0x158(%rbp)
addq $0x88, %rsi
leaq -0x158(%rbp), %rdi
callq 0x26930
movq %rdx, -0xdd8(%rbp)
movq %rax, -0xdd0(%rbp)
jmp 0x1f3c9
movq -0xcb8(%rbp), %rax
movq -0xdd8(%rbp), %rcx
movq -0xdd0(%rbp), %rdx
movq %rdx, -0x150(%rbp)
movq %rcx, -0x148(%rbp)
movq %rax, %rsi
addq $0xf8, %rsi
movq 0x80(%rax), %rdx
leaq -0x190(%rbp), %rdi
callq 0x26870
jmp 0x1f40b
leaq -0x190(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x26980
jmp 0x1f420
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26900
movq %rax, -0xde0(%rbp)
jmp 0x1f43c
movq -0xde0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x26930
movq %rdx, -0xdf0(%rbp)
movq %rax, -0xde8(%rbp)
jmp 0x1f46a
movq -0xcb8(%rbp), %rax
movq -0xdf0(%rbp), %rcx
movq -0xde8(%rbp), %rdx
movq %rdx, -0x1a0(%rbp)
movq %rcx, -0x198(%rbp)
movq %rax, %rsi
addq $0x188, %rsi            # imm = 0x188
movq 0x80(%rax), %rdx
leaq -0x1e0(%rbp), %rdi
callq 0x26870
jmp 0x1f4ac
leaq -0x1e0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x26980
jmp 0x1f4c1
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26900
movq %rax, -0xdf8(%rbp)
jmp 0x1f4dd
movq -0xdf8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x26930
movq %rdx, -0xe08(%rbp)
movq %rax, -0xe00(%rbp)
jmp 0x1f50b
movq -0xcb8(%rbp), %rax
movq -0xe08(%rbp), %rcx
movq -0xe00(%rbp), %rdx
movq %rdx, -0x1f0(%rbp)
movq %rcx, -0x1e8(%rbp)
movq %rax, %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
movq 0x80(%rax), %rdx
leaq -0x230(%rbp), %rdi
callq 0x26870
jmp 0x1f54d
leaq -0x230(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x26980
jmp 0x1f562
movq -0xcb8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x26900
movq %rax, -0xe10(%rbp)
jmp 0x1f57e
movq -0xe10(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq -0x248(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x26930
movq %rdx, -0xe20(%rbp)
movq %rax, -0xe18(%rbp)
jmp 0x1f5ac
movq -0xcb8(%rbp), %rax
movq -0xe20(%rbp), %rcx
movq -0xe18(%rbp), %rdx
movq %rdx, -0x240(%rbp)
movq %rcx, -0x238(%rbp)
movq %rax, %rsi
addq $0x188, %rsi            # imm = 0x188
movq 0x80(%rax), %rdx
leaq -0x280(%rbp), %rdi
callq 0x269c0
jmp 0x1f5ee
leaq -0x280(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x26a10
jmp 0x1f603
movq -0xcb8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x26900
movq %rax, -0xe28(%rbp)
jmp 0x1f61f
movq -0xcb8(%rbp), %rsi
movq -0xe28(%rbp), %rax
movq %rax, -0x298(%rbp)
addq $0x88, %rsi
leaq -0x298(%rbp), %rdi
callq 0x26930
movq %rdx, -0xe38(%rbp)
movq %rax, -0xe30(%rbp)
jmp 0x1f657
movq -0xcb8(%rbp), %rax
movq -0xe38(%rbp), %rcx
movq -0xe30(%rbp), %rdx
movq %rdx, -0x290(%rbp)
movq %rcx, -0x288(%rbp)
movq %rax, %rsi
addq $0xe0, %rsi
movq 0x80(%rax), %rdx
leaq -0x2d0(%rbp), %rdi
callq 0x269c0
jmp 0x1f699
leaq -0x2d0(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x26a10
jmp 0x1f6ae
movq -0xcb8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x26900
movq %rax, -0xe40(%rbp)
jmp 0x1f6ca
movq -0xe40(%rbp), %rax
movq %rax, -0x2e8(%rbp)
leaq -0x2e8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x26930
movq %rdx, -0xe50(%rbp)
movq %rax, -0xe48(%rbp)
jmp 0x1f6f8
movq -0xcb8(%rbp), %rax
movq -0xe50(%rbp), %rcx
movq -0xe48(%rbp), %rdx
movq %rdx, -0x2e0(%rbp)
movq %rcx, -0x2d8(%rbp)
movq %rax, %rsi
addq $0x1b8, %rsi            # imm = 0x1B8
movq 0x80(%rax), %rdx
leaq -0x320(%rbp), %rdi
callq 0x26870
jmp 0x1f73a
leaq -0x320(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x26980
jmp 0x1f74f
movq -0xcb8(%rbp), %rax
movq %rax, %rsi
addq $0xf8, %rsi
movq 0x80(%rax), %rdx
leaq -0x368(%rbp), %rdi
callq 0x26870
jmp 0x1f775
leaq -0x330(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x26a50
jmp 0x1f78a
movq -0xcb8(%rbp), %rax
movq %rax, %rsi
addq $0xf8, %rsi
movq 0x80(%rax), %rdx
leaq -0x3a0(%rbp), %rdi
callq 0x269c0
jmp 0x1f7b0
leaq -0x3a0(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x26a90
jmp 0x1f7c5
leaq -0x330(%rbp), %rdi
callq 0xff40
movq -0xcb8(%rbp), %rax
movq %rax, %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
movq 0x80(%rax), %rdx
leaq -0x3e8(%rbp), %rdi
callq 0x26870
jmp 0x1f7f7
leaq -0x3b0(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x26a50
jmp 0x1f80c
movq -0xcb8(%rbp), %rax
movq %rax, %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
movq 0x80(%rax), %rdx
leaq -0x420(%rbp), %rdi
callq 0x269c0
jmp 0x1f832
leaq -0x420(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0x26a90
jmp 0x1f847
leaq -0x3b0(%rbp), %rdi
callq 0xff40
movq -0xcb8(%rbp), %rax
movq %rax, %rsi
addq $0x1b8, %rsi            # imm = 0x1B8
movq 0x80(%rax), %rdx
leaq -0x468(%rbp), %rdi
callq 0x26870
jmp 0x1f879
leaq -0x430(%rbp), %rdi
leaq -0x468(%rbp), %rsi
callq 0x26a50
jmp 0x1f88e
movq -0xcb8(%rbp), %rax
movq %rax, %rsi
addq $0x1b8, %rsi            # imm = 0x1B8
movq 0x80(%rax), %rdx
leaq -0x4a0(%rbp), %rdi
callq 0x269c0
jmp 0x1f8b4
leaq -0x4a0(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x26a90
jmp 0x1f8c9
leaq -0x430(%rbp), %rdi
callq 0xff40
movq -0xcb8(%rbp), %rcx
movq 0x80(%rcx), %rax
addq $0x1, %rax
cqto
idivq 0x78(%rcx)
movq -0xcb8(%rbp), %rax
movq %rdx, 0x80(%rax)
leaq -0x40(%rbp), %rdi
callq 0xff40
leaq -0x30(%rbp), %rdi
callq 0xff40
jmp 0x1f98a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x330(%rbp), %rdi
callq 0xff40
jmp 0x1f95b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0xff40
jmp 0x1f95b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x430(%rbp), %rdi
callq 0xff40
leaq -0x40(%rbp), %rdi
callq 0xff40
leaq -0x30(%rbp), %rdi
callq 0xff40
jmp 0x2070c
movq 0x1815d7(%rip), %rdi    # 0x1a0f50
leaq 0xee528(%rip), %rsi     # 0x10dea8
callq 0xa440
jmp 0x20649
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26800
movq -0xcb8(%rbp), %rdi
movq %rax, -0xe58(%rbp)
addq $0xa8, %rdi
callq 0x26800
movq -0xe58(%rbp), %rsi
movq %rax, %rdx
leaq -0x4b8(%rbp), %rdi
callq 0x26ad0
movq -0xcb8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
leaq -0x4b8(%rbp), %rsi
callq 0x26b30
movq -0xcb8(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26800
movq -0xcb8(%rbp), %rcx
cmpq 0x78(%rcx), %rax
jl 0x1faad
movq -0xcb8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x26bb0
movq -0xcb8(%rbp), %rdi
movq %rax, -0xe68(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x26bb0
movq -0xcb8(%rbp), %rdi
movq %rax, -0xe70(%rbp)
movq 0x78(%rdi), %rax
subq 0x80(%rdi), %rax
cqto
idivq 0x78(%rdi)
movq -0xe70(%rbp), %rax
movq %rdx, %rcx
imulq 0x78(%rdi), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xe60(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x26bb0
movq -0xcb8(%rbp), %rcx
movq -0xe68(%rbp), %rdi
movq -0xe60(%rbp), %rsi
movq %rax, %rdx
movq 0x78(%rcx), %rax
imulq 0x78(%rcx), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x26b60
movq -0xcb8(%rbp), %rsi
movq %rsi, %rdi
addq $0x128, %rdi            # imm = 0x128
movq %rdi, -0xe88(%rbp)
addq $0xf8, %rsi
callq 0x26bd0
movq -0xe88(%rbp), %rdi
movq %rax, -0x4f8(%rbp)
movq %rdx, -0x4f0(%rbp)
callq 0x26900
movq %rax, -0x500(%rbp)
leaq -0x4e8(%rbp), %rdi
movq %rdi, -0xe90(%rbp)
leaq -0x4f8(%rbp), %rsi
leaq -0x500(%rbp), %rdx
callq 0x26c20
movq -0xe90(%rbp), %rsi
leaq -0x4d0(%rbp), %rdi
callq 0x26c70
movq -0xcb8(%rbp), %rsi
movq -0xe88(%rbp), %rdi
addq $0xe0, %rsi
callq 0x26bd0
movq %rdx, -0xe80(%rbp)
movq %rax, -0xe78(%rbp)
jmp 0x1fb50
movq -0xcb8(%rbp), %rdi
movq -0xe80(%rbp), %rax
movq -0xe78(%rbp), %rcx
movq %rcx, -0x540(%rbp)
movq %rax, -0x538(%rbp)
addq $0x128, %rdi            # imm = 0x128
callq 0x26900
movq %rax, -0xe98(%rbp)
jmp 0x1fb88
movq -0xe98(%rbp), %rax
movq %rax, -0x548(%rbp)
leaq -0x530(%rbp), %rdi
leaq -0x540(%rbp), %rsi
leaq -0x548(%rbp), %rdx
callq 0x26c20
jmp 0x1fbb2
leaq -0x518(%rbp), %rdi
leaq -0x530(%rbp), %rsi
callq 0x26c70
jmp 0x1fbc7
movq -0xcb8(%rbp), %rdi
addq $0xe0, %rdi
callq 0x26850
movq %rax, -0xea0(%rbp)
jmp 0x1fbe3
movq -0xcb8(%rbp), %rdi
movq -0xea0(%rbp), %rax
movq %rax, -0x568(%rbp)
addq $0xe0, %rdi
callq 0x26800
movq %rax, -0xea8(%rbp)
jmp 0x1fc0d
movq -0xea8(%rbp), %rax
movq %rax, -0x570(%rbp)
leaq -0x560(%rbp), %rdi
leaq -0x568(%rbp), %rsi
leaq -0x570(%rbp), %rdx
callq 0x26cb0
jmp 0x1fc37
leaq -0x560(%rbp), %rdi
callq 0x26d20
jmp 0x1fc45
leaq -0x580(%rbp), %rdi
leaq -0x518(%rbp), %rsi
callq 0x26d50
jmp 0x1fc5a
leaq -0x590(%rbp), %rdi
leaq -0x560(%rbp), %rsi
callq 0x26d50
jmp 0x1fc6f
leaq -0x590(%rbp), %rdi
leaq -0x580(%rbp), %rsi
callq 0x26d90
jmp 0x1fc84
leaq -0x518(%rbp), %rdi
callq 0x26dc0
movq %rax, -0xeb0(%rbp)
jmp 0x1fc99
movq -0xeb0(%rbp), %rax
movq %rax, -0x5b0(%rbp)
leaq -0x5a8(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
callq 0x26df0
jmp 0x1fcbc
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xeb8(%rbp)
jmp 0x1fcd1
movq -0xeb8(%rbp), %rax
addq %rax, %rax
movq %rax, -0x5d0(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xec0(%rbp)
jmp 0x1fcf7
movq -0xec0(%rbp), %rax
addq %rax, %rax
movq %rax, -0x5d8(%rbp)
leaq -0x5c8(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
leaq -0x5d8(%rbp), %rdx
callq 0x26cb0
jmp 0x1fd24
movq -0xcb8(%rbp), %rsi
addq $0xd8, %rsi
leaq -0x608(%rbp), %rdi
leaq -0x4d0(%rbp), %rdx
callq 0x26e30
jmp 0x1fd47
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xec8(%rbp)
jmp 0x1fd5c
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xed0(%rbp)
jmp 0x1fd71
movq -0xed0(%rbp), %rcx
movq -0xec8(%rbp), %rdx
leaq -0x640(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x26ed0
jmp 0x1fd94
leaq -0x640(%rbp), %rdi
leaq -0x608(%rbp), %rsi
callq 0x26f20
jmp 0x1fda9
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xed8(%rbp)
jmp 0x1fdbe
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xee0(%rbp)
jmp 0x1fdd3
movq -0xee0(%rbp), %rcx
movq -0xed8(%rbp), %rdx
leaq -0x678(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x26f60
jmp 0x1fdf6
leaq -0x678(%rbp), %rdi
leaq -0x5a8(%rbp), %rsi
callq 0x26fc0
jmp 0x1fe0b
leaq -0x5a8(%rbp), %rdi
callq 0x26900
movq %rax, -0xee8(%rbp)
jmp 0x1fe20
movq -0xee8(%rbp), %rax
movq %rax, -0x680(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xef0(%rbp)
jmp 0x1fe43
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xef8(%rbp)
jmp 0x1fe58
movq -0xef8(%rbp), %rcx
movq -0xef0(%rbp), %rdx
leaq -0x6b8(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x27000
jmp 0x1fe7b
leaq -0x6b8(%rbp), %rdi
leaq -0x680(%rbp), %rsi
callq 0x27060
jmp 0x1fe90
leaq -0x6c8(%rbp), %rdi
leaq -0x560(%rbp), %rsi
callq 0x270a0
jmp 0x1fea5
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xf00(%rbp)
jmp 0x1feba
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xf08(%rbp)
jmp 0x1fecf
movq -0xf08(%rbp), %rcx
movq -0xf00(%rbp), %rdx
leaq -0x700(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x270f0
jmp 0x1fef2
leaq -0x700(%rbp), %rdi
leaq -0x6c8(%rbp), %rsi
callq 0x27170
jmp 0x1ff07
leaq -0x780(%rbp), %rdi
leaq -0x5c8(%rbp), %rsi
callq 0x271b0
jmp 0x1ff1c
leaq -0x800(%rbp), %rdi
leaq -0x780(%rbp), %rsi
callq 0x27360
jmp 0x1ff31
movq -0xcb8(%rbp), %rdi
addq $0x110, %rdi            # imm = 0x110
leaq -0x800(%rbp), %rsi
callq 0x27430
jmp 0x1ff4d
leaq -0x800(%rbp), %rdi
callq 0x27460
movq -0xcb8(%rbp), %rax
movsd 0xd8(%rax), %xmm0
movsd 0xeb438(%rip), %xmm1    # 0x10b3a8
callq 0xa7b0
movq -0xcb8(%rbp), %rax
movsd %xmm0, -0x808(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xf18(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xf10(%rbp)
jmp 0x1ffa6
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xf20(%rbp)
jmp 0x1ffbb
movq -0xf20(%rbp), %rcx
movq -0xf10(%rbp), %rdx
movq -0xf18(%rbp), %rsi
leaq -0x840(%rbp), %rdi
callq 0x26ed0
jmp 0x1ffde
leaq -0x840(%rbp), %rdi
leaq -0x808(%rbp), %rsi
callq 0x27480
jmp 0x1fff3
movq -0xcb8(%rbp), %rax
movq %rax, %rcx
addq $0xd8, %rcx
movq %rcx, -0xf38(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xf30(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xf28(%rbp)
jmp 0x2002d
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xf40(%rbp)
jmp 0x20042
movq -0xf40(%rbp), %rcx
movq -0xf28(%rbp), %rdx
movq -0xf30(%rbp), %rsi
leaq -0x878(%rbp), %rdi
callq 0x26f60
jmp 0x20065
movq -0xf38(%rbp), %rsi
leaq -0x878(%rbp), %rdi
callq 0x27480
jmp 0x2007a
movq -0xcb8(%rbp), %rax
movq %rax, %rcx
addq $0xd8, %rcx
movq %rcx, -0xf58(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xf50(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xf48(%rbp)
jmp 0x200b4
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xf60(%rbp)
jmp 0x200c9
movq -0xf60(%rbp), %rcx
movq -0xf48(%rbp), %rdx
movq -0xf50(%rbp), %rsi
leaq -0x8b0(%rbp), %rdi
callq 0x27000
jmp 0x200ec
movq -0xf58(%rbp), %rsi
leaq -0x8b0(%rbp), %rdi
callq 0x27480
jmp 0x20101
movq -0xcb8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x26900
movq %rax, -0xf68(%rbp)
jmp 0x2011d
movq -0xcb8(%rbp), %rax
movq -0xf68(%rbp), %rcx
movq %rcx, -0x940(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xf78(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xf70(%rbp)
jmp 0x20154
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xf80(%rbp)
jmp 0x20169
movq -0xf80(%rbp), %rcx
movq -0xf70(%rbp), %rdx
movq -0xf78(%rbp), %rsi
leaq -0x978(%rbp), %rdi
callq 0x26ed0
jmp 0x2018c
leaq -0x938(%rbp), %rdi
leaq -0x940(%rbp), %rsi
leaq -0x978(%rbp), %rdx
callq 0x27500
jmp 0x201a8
movq -0xcb8(%rbp), %rdx
addq $0x128, %rdx            # imm = 0x128
leaq -0x8f8(%rbp), %rdi
leaq -0x938(%rbp), %rsi
callq 0x27550
jmp 0x201cb
movq -0xcb8(%rbp), %rax
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xf90(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xf88(%rbp)
jmp 0x201f4
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xf98(%rbp)
jmp 0x20209
movq -0xf98(%rbp), %rcx
movq -0xf88(%rbp), %rdx
movq -0xf90(%rbp), %rsi
leaq -0x9b0(%rbp), %rdi
callq 0x26ed0
jmp 0x2022c
leaq -0x9b0(%rbp), %rdi
leaq -0x8f8(%rbp), %rsi
callq 0x275a0
jmp 0x20241
movq -0xcb8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x26900
movq %rax, -0xfa0(%rbp)
jmp 0x2025d
movq -0xcb8(%rbp), %rax
movq -0xfa0(%rbp), %rcx
movq %rcx, -0xa40(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xfb0(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xfa8(%rbp)
jmp 0x20294
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xfb8(%rbp)
jmp 0x202a9
movq -0xfb8(%rbp), %rcx
movq -0xfa8(%rbp), %rdx
movq -0xfb0(%rbp), %rsi
leaq -0xa78(%rbp), %rdi
callq 0x26f60
jmp 0x202cc
leaq -0xa38(%rbp), %rdi
leaq -0xa40(%rbp), %rsi
leaq -0xa78(%rbp), %rdx
callq 0x27500
jmp 0x202e8
movq -0xcb8(%rbp), %rdx
addq $0x128, %rdx            # imm = 0x128
leaq -0x9f8(%rbp), %rdi
leaq -0xa38(%rbp), %rsi
callq 0x27550
jmp 0x2030b
movq -0xcb8(%rbp), %rax
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xfc8(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xfc0(%rbp)
jmp 0x20334
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xfd0(%rbp)
jmp 0x20349
movq -0xfd0(%rbp), %rcx
movq -0xfc0(%rbp), %rdx
movq -0xfc8(%rbp), %rsi
leaq -0xab0(%rbp), %rdi
callq 0x26f60
jmp 0x2036c
leaq -0xab0(%rbp), %rdi
leaq -0x9f8(%rbp), %rsi
callq 0x275a0
jmp 0x20381
movq -0xcb8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x26900
movq %rax, -0xfd8(%rbp)
jmp 0x2039d
movq -0xcb8(%rbp), %rax
movq -0xfd8(%rbp), %rcx
movq %rcx, -0xb40(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0xfe8(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xfe0(%rbp)
jmp 0x203d4
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0xff0(%rbp)
jmp 0x203e9
movq -0xff0(%rbp), %rcx
movq -0xfe0(%rbp), %rdx
movq -0xfe8(%rbp), %rsi
leaq -0xb78(%rbp), %rdi
callq 0x27000
jmp 0x2040c
leaq -0xb38(%rbp), %rdi
leaq -0xb40(%rbp), %rsi
leaq -0xb78(%rbp), %rdx
callq 0x27500
jmp 0x20428
movq -0xcb8(%rbp), %rdx
addq $0x128, %rdx            # imm = 0x128
leaq -0xaf8(%rbp), %rdi
leaq -0xb38(%rbp), %rsi
callq 0x27550
jmp 0x2044b
movq -0xcb8(%rbp), %rax
addq $0x110, %rax            # imm = 0x110
movq %rax, -0x1000(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0xff8(%rbp)
jmp 0x20474
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0x1008(%rbp)
jmp 0x20489
movq -0x1008(%rbp), %rcx
movq -0xff8(%rbp), %rdx
movq -0x1000(%rbp), %rsi
leaq -0xbb0(%rbp), %rdi
callq 0x27000
jmp 0x204ac
leaq -0xbb0(%rbp), %rdi
leaq -0xaf8(%rbp), %rsi
callq 0x275a0
jmp 0x204c1
movq -0xcb8(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x26900
movq %rax, -0x1010(%rbp)
jmp 0x204dd
movq -0xcb8(%rbp), %rax
movq -0x1010(%rbp), %rcx
movq %rcx, -0xc40(%rbp)
addq $0x110, %rax            # imm = 0x110
movq %rax, -0x1020(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0x1018(%rbp)
jmp 0x20514
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0x1028(%rbp)
jmp 0x20529
movq -0x1028(%rbp), %rcx
movq -0x1018(%rbp), %rdx
movq -0x1020(%rbp), %rsi
leaq -0xc78(%rbp), %rdi
callq 0x270f0
jmp 0x2054c
leaq -0xc38(%rbp), %rdi
leaq -0xc40(%rbp), %rsi
leaq -0xc78(%rbp), %rdx
callq 0x27500
jmp 0x20568
movq -0xcb8(%rbp), %rdx
addq $0x128, %rdx            # imm = 0x128
leaq -0xbf8(%rbp), %rdi
leaq -0xc38(%rbp), %rsi
callq 0x27550
jmp 0x2058b
movq -0xcb8(%rbp), %rax
addq $0x110, %rax            # imm = 0x110
movq %rax, -0x1038(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x26850
movq %rax, -0x1030(%rbp)
jmp 0x205b4
leaq -0x560(%rbp), %rdi
callq 0x26800
movq %rax, -0x1040(%rbp)
jmp 0x205c9
movq -0x1040(%rbp), %rcx
movq -0x1030(%rbp), %rdx
movq -0x1038(%rbp), %rsi
leaq -0xcb0(%rbp), %rdi
callq 0x270f0
jmp 0x205ec
leaq -0xcb0(%rbp), %rdi
leaq -0xbf8(%rbp), %rsi
callq 0x275a0
jmp 0x20601
leaq -0x780(%rbp), %rdi
callq 0x275e0
leaq -0x5c8(%rbp), %rdi
callq 0x1ae20
leaq -0x5a8(%rbp), %rdi
callq 0x1ae20
leaq -0x560(%rbp), %rdi
callq 0x1ae20
leaq -0x518(%rbp), %rdi
callq 0x1ae20
leaq -0x4d0(%rbp), %rdi
callq 0x1ae20
addq $0x1040, %rsp           # imm = 0x1040
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x20700
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x206f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x206e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x206dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x206d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x206c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x800(%rbp), %rdi
callq 0x27460
leaq -0x780(%rbp), %rdi
callq 0x275e0
leaq -0x5c8(%rbp), %rdi
callq 0x1ae20
leaq -0x5a8(%rbp), %rdi
callq 0x1ae20
leaq -0x560(%rbp), %rdi
callq 0x1ae20
leaq -0x518(%rbp), %rdi
callq 0x1ae20
leaq -0x4d0(%rbp), %rdi
callq 0x1ae20
movq -0x48(%rbp), %rdi
callq 0xa7c0
nopw %cs:(%rax,%rax)