// File: /workspace/github_cpp_makefile_star2_O1/canzarlab[P]Trajan/geno/augmentedLagrangian.cpp
// Function: AugmentedNLP::computeConstraintError()
void computeConstraintError()
  {
    _constraintError = _constraintValues;

    // for equality constraints
    _constraintError.head(_mEqualities) -= _cl.head(_mEqualities);

    for (size_t i = 0; i < _mInequalities; ++i)
    {
      if (_cType[i+_mEqualities] == 2)
      {
	// lower bound not -INF
	_constraintError(i+_mEqualities) -= _cl(i+_mEqualities);
      }
      if (_cType[i+_mEqualities] == 3)
      {
	// lower bound not -INF and upper not INF
	double err = std::max(_constraintError(i+_mEqualities) - _cu(i + _mEqualities), 0.0);
	err = std::min(_constraintError(i+_mEqualities) - _cl(i+_mEqualities), err);
	_constraintError(i+_mEqualities) = err;
	//	std::cout << "c = " << _constraintError(i+_mEqualities) << std::endl;
	//	std::cout << "e = " << err << std::endl;
	//	std::cout << "lb= " << _cl(i+_mEqualities) << std::endl;
	//	std::cout << "ub= " << _cu(i+_mEqualities) << std::endl;
      }
      if (_cType[i+_mEqualities] == 4)
      {
	// upper bound not INF
	_constraintError(i+_mEqualities) -= _cu(i+_mEqualities);
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x90(%rdi), %r14
movq 0x30(%rdi), %r12
movq 0x38(%rdi), %r15
cmpq %r15, 0x98(%rdi)
je 0xfc81
testq %r15, %r15
js 0xff44
movl $0x1, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x10056
movq 0x98(%rbx), %rax
cmpq %r15, %rax
jne 0xff06
movq (%r14), %rcx
movq %rax, %rdx
shrq $0x3f, %rdx
addq %rax, %rdx
andq $-0x2, %rdx
cmpq $0x2, %rax
jl 0xfcbe
xorl %esi, %esi
movapd (%r12,%rsi,8), %xmm0
movapd %xmm0, (%rcx,%rsi,8)
addq $0x2, %rsi
cmpq %rdx, %rsi
jl 0xfcaa
cmpq %rax, %rdx
jge 0xfcd6
movsd (%r12,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0xfcc3
movq 0x20(%rbx), %rax
movq 0x58(%rbx), %rcx
testq %rcx, %rcx
sete %dl
testq %rax, %rax
setns %sil
orb %dl, %sil
je 0xff25
testq %rax, %rax
js 0xfee7
cmpq %rax, 0x60(%rbx)
jl 0xfee7
cmpq %rax, 0x98(%rbx)
jl 0xfee7
movq 0x90(%rbx), %rdx
movq %rax, %rdi
testb $0x7, %dl
jne 0xfd32
movl %edx, %edi
shrl $0x3, %edi
andl $0x1, %edi
cmpq %rax, %rdi
cmovgeq %rax, %rdi
movq %rax, %r8
subq %rdi, %r8
movq %r8, %rsi
shrq $0x3f, %rsi
addq %r8, %rsi
andq $-0x2, %rsi
testq %rdi, %rdi
jle 0xfd68
xorl %r9d, %r9d
movsd (%rdx,%r9,8), %xmm0
subsd (%rcx,%r9,8), %xmm0
movsd %xmm0, (%rdx,%r9,8)
incq %r9
cmpq %r9, %rdi
jne 0xfd4e
addq %rdi, %rsi
cmpq $0x2, %r8
jl 0xfd8d
movupd (%rcx,%rdi,8), %xmm0
movapd (%rdx,%rdi,8), %xmm1
subpd %xmm0, %xmm1
movapd %xmm1, (%rdx,%rdi,8)
addq $0x2, %rdi
cmpq %rsi, %rdi
jl 0xfd71
cmpq %rax, %rsi
jge 0xfda9
movsd (%rdx,%rsi,8), %xmm0
subsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xfd92
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xfebf
movq 0x20(%rbx), %rcx
movq 0x60(%rbx), %rdx
movq 0x98(%rbx), %rsi
movq 0x70(%rbx), %rdi
leaq (,%rcx,8), %r8
movq 0x90(%rbx), %r9
addq %r8, %r9
movq 0x68(%rbx), %r10
addq %r8, %r10
addq 0x58(%rbx), %r8
leaq (,%rcx,4), %r11
addq 0x78(%rbx), %r11
xorl %r14d, %r14d
leaq (%rcx,%r14), %r15
movl (%r11,%r14,4), %ebp
cmpl $0x4, %ebp
je 0xfe91
cmpl $0x3, %ebp
je 0xfe4c
cmpl $0x2, %ebp
jne 0xfeb3
testq %r15, %r15
js 0xfec8
cmpq %r15, 0x60(%rbx)
jle 0xfec8
cmpq %r15, %rsi
jle 0xfec8
movsd (%r9,%r14,8), %xmm0
subsd (%r8,%r14,8), %xmm0
movsd %xmm0, (%r9,%r14,8)
cmpl $0x4, %ebp
je 0xfe91
cmpl $0x3, %ebp
jne 0xfeb3
testq %r15, %r15
js 0xfec8
cmpq %r15, 0x98(%rbx)
jle 0xfec8
cmpq %r15, %rdi
jle 0xfec8
cmpq %r15, %rdx
jle 0xfec8
movsd (%r9,%r14,8), %xmm0
movapd %xmm0, %xmm1
subsd (%r10,%r14,8), %xmm1
xorpd %xmm2, %xmm2
subsd (%r8,%r14,8), %xmm0
maxsd %xmm1, %xmm2
minsd %xmm0, %xmm2
movsd %xmm2, (%r9,%r14,8)
cmpl $0x4, %ebp
jne 0xfeb3
testq %r15, %r15
js 0xfec8
cmpq %r15, 0x70(%rbx)
jle 0xfec8
cmpq %r15, %rsi
jle 0xfec8
movsd (%r9,%r14,8), %xmm0
subsd (%r10,%r14,8), %xmm0
movsd %xmm0, (%r9,%r14,8)
incq %r14
cmpq %r14, %rax
jne 0xfdf5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4d356(%rip), %rdi     # 0x5d225
leaq 0x4d36c(%rip), %rsi     # 0x5d242
leaq 0x4d388(%rip), %rcx     # 0x5d265
movl $0x1a9, %edx            # imm = 0x1A9
callq 0x9200
leaq 0x4c8dd(%rip), %rdi     # 0x5c7cb
leaq 0x4c801(%rip), %rsi     # 0x5c6f6
leaq 0x4c813(%rip), %rcx     # 0x5c70f
movl $0x93, %edx
callq 0x9200
leaq 0x4d153(%rip), %rdi     # 0x5d060
leaq 0x4c605(%rip), %rsi     # 0x5c519
leaq 0x4d3d1(%rip), %rcx     # 0x5d2ec
movl $0x2d1, %edx            # imm = 0x2D1
callq 0x9200
leaq 0x4c92e(%rip), %rdi     # 0x5c85a
leaq 0x4c9d1(%rip), %rsi     # 0x5c904
leaq 0x4c9e5(%rip), %rcx     # 0x5c91f
movl $0xaf, %edx
callq 0x9200
leaq 0x4cf0d(%rip), %rdi     # 0x5ce58
leaq 0x4cd65(%rip), %rsi     # 0x5ccb7
leaq 0x4d08e(%rip), %rcx     # 0x5cfe7
movl $0x11d, %edx            # imm = 0x11D
callq 0x9200
nop