// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/geno/augmentedLagrangian.cpp
// Function: AugmentedLagrangian::solve()
SolverStatus AugmentedLagrangian::solve() 
{  
  static const double gamma = 2;
  //  static const double rhoMin = 1E-6;
  //  static const double rhoMax = 10;
    
  Scalar rho = 0;
//  Vector y = Vector::Zero(_genoNLP.getM());
  _genoNLP.getStartingPointDual(_y.data());
  //  std::cout << "y= " << y.transpose() << std::endl;
  AugmentedNLP augmentedNLP(_genoNLP, rho, _y);
  size_t mEqualities = augmentedNLP.mEqualities();
  size_t mInequalities = augmentedNLP.mInequalities();
  std::vector<int> cType = augmentedNLP.cType();
  

  /*
  _genoNLP.getStartingPoint(_x.data());
  Vector dummyG(_genoNLP.getN());
  _genoNLP.functionValueAndGradient(_x.data(), _f, dummyG.data());
  double dummyF;
  augmentedNLP.functionValueAndGradient(_x.data(), dummyF, dummyG.data());
  Vector constraintError = augmentedNLP.constraintError();

  for (size_t i = 0; i < mInequalities; ++i)
    if (constraintError(mEqualities + i) < 0)
      constraintError(mEqualities + i) = 0;
  std::cout << "constraint Error = " << constraintError.transpose() << std::endl;
  rho = 2 * (std::abs(_f) + 1) / constraintError.squaredNorm();
  if (rho < rhoMin)
    rho = rhoMin;
  if(rho > rhoMax)
    rho = rhoMax;
  */

  Vector constraintError;
  Vector cl = augmentedNLP.cl();
  Vector cu = augmentedNLP.cu();
  Vector dummyG(_genoNLP.getN());
  rho = 1.0;

  LBFGSB solver(augmentedNLP, _correctionPairs, _verbose);
  //NEWTONB solver(augmentedNLP, _correctionPairs);
  if (_tol != -1) solver.setParameter("pgtol", _tol);
  if (_tolFun != -1) solver.setParameter("factr", _tolFun);
  double oldFactor = INF;
  double tau = 0.5;
  double lambdaMin = -1E20;
  double lambdaMax = 1E20;
  double muMax = 1E20;
  double muMin = -1E20;
  SolverStatus status = SOLVED;
  
  for (size_t iter = 0; iter < _maxIter; ++iter) 
  {
    if (_verbose)
      std::cout << "rho = " << rho << std::endl;

    augmentedNLP.setParams(rho, _y);
    solver.restart();
    status = solver.solve();
    if ((status != SOLVED) && (status != SUBOPTIMAL))
      break;
    constraintError = augmentedNLP.constraintError();
    Vector trueConstraintError(constraintError);
    for (size_t i = 0; i < mInequalities; ++i) {
      if (cType[i+mEqualities] == 2)
        if (trueConstraintError(mEqualities + i) > 0)
          trueConstraintError(mEqualities + i) = 0;

      if (cType[i+mEqualities] == 4)
	if (trueConstraintError(mEqualities + i) < 0)
	  trueConstraintError(mEqualities + i) = 0;
    }
    double constraintErrorNorm = 
      trueConstraintError.lpNorm<Eigen::Infinity>();

    _x = Vector::Map(solver.x(), _x.size());

    //    std::cout << "cl " << cl.transpose() << std::endl;
    //    std::cout << "cu " << cu.transpose() << std::endl;
    //    std::cout << "constraint Values " << augmentedNLP.constraintValues().transpose() << std::endl;
    //    std::cout << "y " << y.transpose() << std::endl;
    if (constraintErrorNorm < _constraintsTol)
      break;

    //    y = y + rho * constraintError;

    _y.head(mEqualities) +=  rho * constraintError.head(mEqualities);

    //safeguard Lagrange multiplier for equality constraints
    for (size_t i = 0; i < mEqualities; ++i) {
      if (_y(i) < lambdaMin)
	_y(i) = lambdaMin;
      if (_y(i) > lambdaMax)
	_y(i) = lambdaMax;
    }


    Vector constraintValues = augmentedNLP.constraintValues();

    // compute new Lagrange multiplier and safeguard it
    for (size_t i = 0; i < mInequalities; ++i) {
      if (cType[i+mEqualities] == 2) {
	_y(i+mEqualities) += rho * constraintError(i+mEqualities);
        if (_y(i+mEqualities) > 0)
          _y(i+mEqualities) = 0;
      }

      if (cType[i+mEqualities] == 3) {
	double yLB = std::min(0.0, _y(i+mEqualities));
	double yUB = std::max(0.0, _y(i+mEqualities));
	yLB += rho * (constraintValues(i+mEqualities) - cl(i));
	yUB += rho * (constraintValues(i+mEqualities) - cu(i));
	yLB = std::min(0.0, yLB);
	yUB = std::max(0.0, yUB);

	_y(i+mEqualities) = yLB + yUB;

      }

      if (cType[i+mEqualities] == 4) {
        _y(i+mEqualities) += rho * constraintError(i+mEqualities);
 	if (_y(i+mEqualities) < 0)
	  _y(i+mEqualities) = 0;
      }

      if (_y(i+mEqualities) < muMin)
        _y(i+mEqualities) = muMin;
      if (_y(i+mEqualities) > muMax)
	_y(i+mEqualities) = muMax;
    }
    
    //    double factor = constraintErrorNorm;

    double factor = 0;
    // need to have the if there since if there are no equalities Eigen will make a mistake
    if (mEqualities)  factor = constraintError.head(mEqualities).lpNorm<Eigen::Infinity>();

    //    std::cout << "factor = " << factor << std::endl;
    for (size_t i = 0; i < mInequalities; ++i) {
      factor = std::max(std::abs(std::max(constraintError(mEqualities + i), -_y(mEqualities + i) / rho)), factor);
    }
    if (factor > tau * oldFactor) {
      rho *= gamma;
    }
    oldFactor = factor;
  }
  _genoNLP.functionValueAndGradient(_x.data(), _f, dummyG.data());
  return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478, %rsp            # imm = 0x478
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq (%rdi), %rdi
movq 0x38(%r14), %rsi
movq (%rdi), %rax
callq *0x40(%rax)
movq (%r14), %rsi
leaq 0x178(%rsp), %rbx
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, 0xb8(%rsp)
movq %r15, %rdx
callq 0xee3a
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %r12
leaq 0x1f0(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0xf1aa
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
leaq 0x1d0(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x10120
leaq 0x1e0(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x10120
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, %rbx
testq %rax, %rax
js 0xec70
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
je 0xe201
cmpq %rax, %rbx
ja 0xe1d3
leaq (,%rbx,8), %rdi
callq 0x9450
cmpq $0x1, %rbx
setne %dl
testb $0xf, %al
setne %cl
testb %cl, %dl
jne 0xec51
movq %rax, 0x50(%rsp)
testq %rax, %rax
jne 0xe20a
movl $0x8, %edi
callq 0x9180
movq 0x77dcc(%rip), %rcx     # 0x85fb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x77dd6(%rip), %rsi     # 0x85fc8
movq 0x77d97(%rip), %rdx     # 0x85f90
movq %rax, %rdi
callq 0x9640
movq $0x0, 0x50(%rsp)
movq 0x18(%r14), %rdx
movzbl 0x60(%r14), %ecx
leaq 0x218(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x185b0
movsd 0x50(%r14), %xmm0
ucomisd 0x4e1ba(%rip), %xmm0    # 0x5c3f0
jne 0xe23a
jnp 0xe299
leaq 0xf0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4e1e3(%rip), %rsi     # 0x5c430
leaq 0x4e1e1(%rip), %rdx     # 0x5c435
leaq 0xe0(%rsp), %rdi
callq 0xdadc
movsd 0x50(%r14), %xmm0
leaq 0x218(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x18fd2
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0xe299
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x9350
movsd 0x58(%r14), %xmm0
ucomisd 0x4e149(%rip), %xmm0    # 0x5c3f0
jne 0xe2ab
jnp 0xe30a
leaq 0xd0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4e178(%rip), %rsi     # 0x5c436
leaq 0x4e176(%rip), %rdx     # 0x5c43b
leaq 0xc0(%rsp), %rdi
callq 0xdadc
movsd 0x58(%r14), %xmm0
leaq 0x218(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x18fd2
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0xe30a
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x9350
cmpq $0x0, 0x48(%r14)
je 0xeac4
leaq (,%r13,8), %rax
movq %rax, 0x58(%rsp)
leaq (,%r13,4), %rax
movq %rax, 0xb0(%rsp)
movsd 0x4e0be(%rip), %xmm0    # 0x5c3f8
movaps %xmm0, 0x20(%rsp)
movsd 0x4e0b9(%rip), %xmm0    # 0x5c400
movapd %xmm0, 0x100(%rsp)
xorl %ebx, %ebx
cmpb $0x1, 0x60(%r14)
jne 0xe3ad
movl $0x6, %edx
movq 0x77c5b(%rip), %rdi     # 0x85fc0
leaq 0x4e0d0(%rip), %rsi     # 0x5c43c
callq 0x93b0
movq 0x77c48(%rip), %rdi     # 0x85fc0
movapd 0x20(%rsp), %xmm0
callq 0x9570
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x9330
movsbl %al, %esi
movq %rbp, %rdi
callq 0x9040
movq %rax, %rdi
callq 0x9230
leaq 0x178(%rsp), %rdi
movapd 0x20(%rsp), %xmm0
movq 0xb8(%rsp), %rsi
callq 0xf22a
leaq 0x218(%rsp), %rdi
callq 0x1795a
leaq 0x218(%rsp), %rdi
callq 0x17ef0
cmpl $0x1, %eax
movl %eax, 0x34(%rsp)
ja 0xead8
movq %rbx, 0x60(%rsp)
movq 0x208(%rsp), %r15
movq 0x210(%rsp), %rbp
cmpq %rbp, 0x8(%rsp)
jne 0xe411
movq (%rsp), %rax
jmp 0xe471
testq %rbp, %rbp
js 0xec32
movq (%rsp), %rdi
callq 0x93d0
testq %rbp, %rbp
je 0xe466
movabsq $0x1fffffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFFFF
cmpq %rax, %rbp
ja 0xebe5
leaq (,%rbp,8), %rdi
callq 0x9450
cmpq $0x1, %rbp
setne %cl
testb $0xf, %al
setne %dl
testb %dl, %cl
jne 0xec51
testq %rax, %rax
jne 0xe468
jmp 0xebe5
xorl %eax, %eax
movq %rax, (%rsp)
movq %rbp, 0x8(%rsp)
movq %rbp, %rcx
shrq $0x3f, %rcx
addq %rbp, %rcx
andq $-0x2, %rcx
cmpq $0x2, %rbp
jl 0xe49b
xorl %edx, %edx
movapd (%r15,%rdx,8), %xmm0
movapd %xmm0, (%rax,%rdx,8)
addq $0x2, %rdx
cmpq %rcx, %rdx
jl 0xe487
cmpq %rbp, %rcx
jge 0xe4b3
movsd (%r15,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbp
jne 0xe4a0
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x10120
testq %r12, %r12
je 0xe55a
movq 0x98(%rsp), %rax
movq 0x40(%rsp), %rcx
movq 0x58(%rsp), %rdx
addq %rcx, %rdx
movq %r13, %rsi
movq %r12, %rdi
xorl %r8d, %r8d
movl (%rax,%rsi,4), %r9d
cmpl $0x4, %r9d
je 0xe523
cmpl $0x2, %r9d
jne 0xe54b
testq %rsi, %rsi
js 0xeb69
cmpq %rsi, 0x48(%rsp)
jle 0xeb69
movsd (%rdx), %xmm0
ucomisd 0x4df09(%rip), %xmm0    # 0x5c420
jbe 0xe54b
leaq (%r8,%r13), %r9
leaq (%rcx,%r9,8), %r9
jmp 0xe544
testq %rsi, %rsi
js 0xeb69
cmpq %rsi, 0x48(%rsp)
jle 0xeb69
xorpd %xmm0, %xmm0
ucomisd (%rdx), %xmm0
movq %rdx, %r9
jbe 0xe54b
movq $0x0, (%r9)
incq %r8
incq %rsi
addq $0x8, %rdx
decq %rdi
jne 0xe4e7
cmpq $0x0, 0x48(%rsp)
je 0xe5ac
leaq 0x40(%rsp), %rax
movq %rax, 0x110(%rsp)
jle 0xec13
movq 0x40(%rsp), %rax
movq %rax, 0x140(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x150(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x101d8
movsd %xmm0, 0x38(%rsp)
jmp 0xe5b6
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x18fc6
movq 0x30(%r14), %rcx
testq %rcx, %rcx
js 0xeba7
movq 0x28(%r14), %rdx
movq %rcx, %rsi
movabsq $0x7ffffffffffffffe, %rdi # imm = 0x7FFFFFFFFFFFFFFE
andq %rdi, %rsi
cmpq $0x2, %rcx
jb 0xe5ff
xorl %edi, %edi
movupd (%rax,%rdi,8), %xmm0
movapd %xmm0, (%rdx,%rdi,8)
addq $0x2, %rdi
cmpq %rsi, %rdi
jb 0xe5ec
cmpq %rcx, %rsi
jge 0xe616
movsd (%rax,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0xe604
movsd 0x8(%r14), %xmm0
ucomisd 0x38(%rsp), %xmm0
ja 0xeace
testq %r13, %r13
setns %cl
movq (%rsp), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0xebc6
testq %r13, %r13
js 0xeb88
cmpq %r13, 0x8(%rsp)
jl 0xeb88
cmpq %r13, 0x40(%r14)
jl 0xeb88
movq 0x38(%r14), %rcx
movq %r13, %rdx
testb $0x7, %cl
jne 0xe679
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1, %edx
cmpq %r13, %rdx
cmovaeq %r13, %rdx
testq %rdx, %rdx
movapd 0x20(%rsp), %xmm1
je 0xe6a1
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0xe686
movq %r13, %rdi
subq %rdx, %rdi
movq %rdi, %rsi
shrq $0x3f, %rsi
addq %rdi, %rsi
andq $-0x2, %rsi
addq %rdx, %rsi
cmpq $0x2, %rdi
jl 0xe6e4
movapd 0x20(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movupd (%rax,%rdx,8), %xmm1
mulpd %xmm0, %xmm1
addpd (%rcx,%rdx,8), %xmm1
movapd %xmm1, (%rcx,%rdx,8)
addq $0x2, %rdx
cmpq %rsi, %rdx
jl 0xe6c8
cmpq %r13, %rsi
movapd 0x20(%rsp), %xmm1
jge 0xe70a
movsd (%rax,%rsi,8), %xmm0
mulsd %xmm1, %xmm0
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %r13
jne 0xe6ef
testq %r13, %r13
je 0xe75c
movq 0x38(%r14), %rax
movq 0x40(%r14), %rcx
testq %rcx, %rcx
movl $0x0, %edx
cmovleq %rdx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xeb69
movsd (%rax,%rdx,8), %xmm1
movsd 0x4dccd(%rip), %xmm0    # 0x5c408
ucomisd %xmm1, %xmm0
ja 0xe74f
movsd 0x4dcc7(%rip), %xmm0    # 0x5c410
ucomisd %xmm0, %xmm1
jbe 0xe754
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r13
jne 0xe725
leaq 0x68(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x10120
testq %r12, %r12
je 0xe974
movq 0x40(%r14), %rax
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdi
movapd 0x20(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movq 0x38(%r14), %r8
movq 0x58(%rsp), %r11
addq %r11, %r8
movq (%rsp), %r9
addq %r11, %r9
movq 0x68(%rsp), %r10
addq %r11, %r10
movq 0x98(%rsp), %r11
addq 0xb0(%rsp), %r11
xorl %r15d, %r15d
leaq (%r15,%r13), %rbp
movl (%r11,%r15,4), %ebx
cmpl $0x4, %ebx
je 0xe8d8
cmpl $0x3, %ebx
je 0xe834
cmpl $0x2, %ebx
jne 0xe92d
testq %rbp, %rbp
js 0xeb69
cmpq %rbp, 0x8(%rsp)
jle 0xeb69
cmpq %rbp, %rax
jle 0xeb69
movsd (%r9,%r15,8), %xmm1
mulsd 0x20(%rsp), %xmm1
addsd (%r8,%r15,8), %xmm1
movsd %xmm1, (%r8,%r15,8)
ucomisd 0x4dbf7(%rip), %xmm1    # 0x5c420
ja 0xe917
jmp 0xe923
testq %rbp, %rbp
js 0xeb69
cmpq %rbp, 0x40(%r14)
jle 0xeb69
cmpq %rbp, %rcx
jle 0xeb69
testq %r15, %r15
js 0xeb69
cmpq %r15, 0x90(%rsp)
jle 0xeb69
cmpq %r15, %rsi
jle 0xeb69
movsd (%r8,%r15,8), %xmm1
xorpd %xmm2, %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movapd %xmm1, %xmm3
cmpltpd %xmm2, %xmm3
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
andpd %xmm3, %xmm1
movsd (%r10,%r15,8), %xmm2
movsd (%rdi,%r15,8), %xmm3
movhpd (%rdx,%r15,8), %xmm3    # xmm3 = xmm3[0],mem[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
subpd %xmm3, %xmm2
mulpd %xmm0, %xmm2
addpd %xmm1, %xmm2
movq %xmm2, %xmm3            # xmm3 = xmm2[0],zero
xorpd %xmm1, %xmm1
shufpd $0x2, %xmm2, %xmm1      # xmm1 = xmm1[0],xmm2[1]
cmpltpd %xmm1, %xmm3
andpd %xmm2, %xmm3
pshufd $0xee, %xmm3, %xmm1     # xmm1 = xmm3[2,3,2,3]
addsd %xmm3, %xmm1
movsd %xmm1, (%r8,%r15,8)
jmp 0xe923
testq %rbp, %rbp
js 0xeb69
cmpq %rbp, 0x8(%rsp)
jle 0xeb69
cmpq %rbp, %rax
jle 0xeb69
movsd (%r9,%r15,8), %xmm1
mulsd 0x20(%rsp), %xmm1
addsd (%r8,%r15,8), %xmm1
movsd %xmm1, (%r8,%r15,8)
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0xe923
movq $0x0, (%r8,%r15,8)
xorpd %xmm1, %xmm1
cmpq %rbp, %rax
jg 0xe946
jmp 0xeb69
testq %rbp, %rbp
js 0xeb69
cmpq %rbp, 0x40(%r14)
jle 0xeb69
movsd (%r8,%r15,8), %xmm1
movsd 0x4daba(%rip), %xmm2    # 0x5c408
ucomisd %xmm1, %xmm2
ja 0xe962
movsd 0x4dab4(%rip), %xmm2    # 0x5c410
ucomisd %xmm2, %xmm1
jbe 0xe968
movsd %xmm2, (%r8,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0xe7cd
testq %r13, %r13
je 0xe9f3
movq 0x8(%rsp), %rax
cmpq %r13, %rax
movq 0x60(%rsp), %rbx
jl 0xeb88
movq (%rsp), %rcx
movq %rcx, 0x138(%rsp)
movq %r13, 0x140(%rsp)
movq %rsp, %rdx
movq %rdx, 0x150(%rsp)
movq $0x0, 0x158(%rsp)
movq %rax, 0x168(%rsp)
movq %rcx, 0x118(%rsp)
movq %rax, 0x128(%rsp)
leaq 0x138(%rsp), %rax
movq %rax, 0x130(%rsp)
leaq 0x110(%rsp), %rdi
leaq 0x1f(%rsp), %rsi
callq 0x102c2
jmp 0xe9fc
xorpd %xmm0, %xmm0
movq 0x60(%rsp), %rbx
testq %r12, %r12
je 0xea56
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x38(%r14), %rdx
movq 0x40(%r14), %rsi
movq %r13, %rdi
movq %r12, %r8
cmpq %rdi, %rcx
jle 0xeb69
cmpq %rdi, %rsi
jle 0xeb69
movsd (%rdx,%rdi,8), %xmm1
xorpd 0x4d989(%rip), %xmm1    # 0x5c3c0
divsd 0x20(%rsp), %xmm1
maxsd (%rax,%rdi,8), %xmm1
andpd 0x4d986(%rip), %xmm1    # 0x5c3d0
maxsd %xmm1, %xmm0
incq %rdi
decq %r8
jne 0xea18
movsd %xmm0, 0x38(%rsp)
movq 0x68(%rsp), %rdi
callq 0x93d0
movq 0x40(%rsp), %rdi
callq 0x93d0
movapd 0x100(%rsp), %xmm2
mulsd 0x4d997(%rip), %xmm2    # 0x5c418
movapd 0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
movsd 0x38(%rsp), %xmm3
cmpltsd %xmm3, %xmm2
andpd %xmm2, %xmm0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movapd %xmm2, 0x20(%rsp)
incq %rbx
movapd %xmm3, 0x100(%rsp)
cmpq 0x48(%r14), %rbx
jb 0xe352
jmp 0xead8
movl $0x0, 0x34(%rsp)
jmp 0xead8
movq 0x40(%rsp), %rdi
callq 0x93d0
movq (%r14), %rdi
movq 0x28(%r14), %rsi
addq $0x20, %r14
movq (%rdi), %rax
movq %r14, %rdx
movq 0x50(%rsp), %rbx
movq %rbx, %rcx
callq *0x48(%rax)
leaq 0x218(%rsp), %rdi
callq 0xf2f6
movq %rbx, %rdi
callq 0x93d0
movq 0x78(%rsp), %rdi
callq 0x93d0
movq 0x88(%rsp), %rdi
callq 0x93d0
movq (%rsp), %rdi
callq 0x93d0
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xeb46
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x9350
leaq 0x178(%rsp), %rdi
callq 0xf428
movl 0x34(%rsp), %eax
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e6d5(%rip), %rdi     # 0x5d245
leaq 0x4e6eb(%rip), %rsi     # 0x5d262
leaq 0x4e707(%rip), %rcx     # 0x5d285
movl $0x1a9, %edx            # imm = 0x1A9
callq 0x9200
leaq 0x4dc5c(%rip), %rdi     # 0x5c7eb
leaq 0x4db80(%rip), %rsi     # 0x5c716
leaq 0x4db92(%rip), %rcx     # 0x5c72f
movl $0x93, %edx
callq 0x9200
leaq 0x4dff9(%rip), %rdi     # 0x5cba7
leaq 0x4dd6f(%rip), %rsi     # 0x5c924
leaq 0x4eba2(%rip), %rcx     # 0x5d75e
movl $0xa3, %edx
callq 0x9200
leaq 0x4dcad(%rip), %rdi     # 0x5c87a
leaq 0x4dd50(%rip), %rsi     # 0x5c924
leaq 0x4dd64(%rip), %rcx     # 0x5c93f
movl $0xaf, %edx
callq 0x9200
movl $0x8, %edi
callq 0x9180
movq 0x773ba(%rip), %rcx     # 0x85fb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x773c4(%rip), %rsi     # 0x85fc8
movq 0x77385(%rip), %rdx     # 0x85f90
movq %rax, %rdi
callq 0x9640
leaq 0x4ddd7(%rip), %rdi     # 0x5c9f1
leaq 0x4de14(%rip), %rsi     # 0x5ca35
leaq 0x4e9df(%rip), %rcx     # 0x5d607
movl $0x19d, %edx            # imm = 0x19D
callq 0x9200
leaq 0x4e23f(%rip), %rdi     # 0x5ce78
leaq 0x4e097(%rip), %rsi     # 0x5ccd7
leaq 0x4e3c0(%rip), %rcx     # 0x5d007
movl $0x11d, %edx            # imm = 0x11D
callq 0x9200
leaq 0x4e114(%rip), %rdi     # 0x5cd6c
leaq 0x4e1c7(%rip), %rsi     # 0x5ce26
leaq 0x4e1df(%rip), %rcx     # 0x5ce45
movl $0xa1, %edx
callq 0x9200
leaq 0x4dfd6(%rip), %rdi     # 0x5cc4d
leaq 0x4e059(%rip), %rsi     # 0x5ccd7
leaq 0x4e075(%rip), %rcx     # 0x5ccfa
movl $0x138, %edx            # imm = 0x138
callq 0x9200
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r15, %rdi
je 0xed18
movq 0xd0(%rsp), %rsi
jmp 0xecc3
jmp 0xed15
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0xed18
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x9350
jmp 0xed18
jmp 0xed15
jmp 0xed15
movq %rax, %rbx
jmp 0xed25
jmp 0xecea
movq %rax, %rbx
jmp 0xed39
movq %rax, %rbx
jmp 0xed46
movq %rax, %rbx
jmp 0xed6c
movq %rax, %rbx
jmp 0xed2f
movq %rax, %rbx
movq 0x68(%rsp), %rdi
callq 0x93d0
jmp 0xed09
jmp 0xed06
jmp 0xed15
jmp 0xed06
jmp 0xed15
movq %rax, %rbx
movq 0x40(%rsp), %rdi
callq 0x93d0
jmp 0xed18
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0xf2f6
movq 0x50(%rsp), %rdi
callq 0x93d0
movq 0x78(%rsp), %rdi
callq 0x93d0
movq 0x88(%rsp), %rdi
callq 0x93d0
movq (%rsp), %rdi
callq 0x93d0
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xed6c
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x9350
leaq 0x178(%rsp), %rdi
callq 0xf428
movq %rbx, %rdi
callq 0x9680
nop