// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/LP.cpp
// Function: LP::SolveLP()
bool LP::SolveLP()
{
    clog << "nr_rows = " << nr_rows << " and nr_cols = " << nr_cols << endl;

    SpMat A(nr_rows, nr_cols);
    A.setFromTriplets(Triplets.begin(), Triplets.end());
    SpMat A_t = A.transpose();
    Vector b = Vector::Ones(nr_rows);

    x = warm_x;
    //x = Vector::Zero(nr_cols);
    y = Vector::Zero(nr_rows);

    Vector c1 = -c;
    PackingJRF simpleJRF(A, b, c1, warm_x, y);
    AugmentedLagrangian solver(simpleJRF, 15);
    solver.setParameter("verbose", false);
    solver.setParameter("pgtol", 1e-1); // should influence running time a lot
    solver.setParameter("constraintsTol", 1e-3);
    Timer timeGeno;
    timeGeno.start();
    solver.solve();
    timeGeno.stop();

    clog << "f = " << solver.f() << " computed in time: " << timeGeno.secs() << " secs" << endl;

    warm_x = x = Vector::ConstMapType(solver.x(), nr_cols);
    y = Vector::ConstMapType(solver.y(), nr_rows);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq 0x51169(%rip), %r14     # 0x85f78
leaq 0x390b2(%rip), %rsi     # 0x6dec8
movl $0xa, %edx
movq %r14, %rdi
callq 0x93b0
movl 0x108(%rbx), %esi
movq %r14, %rdi
callq 0x9650
movq %rax, %r14
leaq 0x39098(%rip), %rsi     # 0x6ded3
movl $0xf, %edx
movq %rax, %rdi
callq 0x93b0
movl 0x10c(%rbx), %esi
movq %r14, %rdi
callq 0x9650
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9330
movsbl %al, %esi
movq %r14, %rdi
callq 0x9040
movq %rax, %rdi
callq 0x9230
movslq 0x108(%rbx), %rsi
movslq 0x10c(%rbx), %rdx
leaq 0xf0(%rsp), %rdi
movb $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
callq 0x37f02
movq 0x88(%rbx), %rax
leaq 0x88(%rsp), %rdi
movq %rax, (%rdi)
movq 0x90(%rbx), %rax
leaq 0x138(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xf0(%rsp), %r14
leaq 0x1c8(%rsp), %rcx
movq %r14, %rdx
callq 0x37fd4
xorl %eax, %eax
leaq 0x88(%rsp), %rsi
movb %al, (%rsi)
movq %r14, 0x8(%rsi)
leaq 0x138(%rsp), %rdi
movb %al, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
callq 0x38fe2
movslq 0x108(%rbx), %rax
movq %rax, 0x88(%rsp)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x98(%rsp)
testq %rax, %rax
js 0x35526
leaq 0x8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x36fea
leaq 0xc0(%rbx), %r15
movq 0xa0(%rbx), %r12
movq 0xa8(%rbx), %r14
cmpq %r14, 0xc8(%rbx)
je 0x34fa2
testq %r14, %r14
js 0x35564
movl $0x1, %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0xff4c
cmpq %r14, 0xc8(%rbx)
jne 0x35583
movq (%r15), %rax
movq %r14, %rcx
shrq $0x3f, %rcx
addq %r14, %rcx
andq $-0x2, %rcx
cmpq $0x2, %r14
jl 0x34fcd
xorl %edx, %edx
movaps (%r12,%rdx,8), %xmm0
movaps %xmm0, (%rax,%rdx,8)
addq $0x2, %rdx
cmpq %rcx, %rdx
jl 0x34fbb
cmpq %r14, %rcx
jge 0x34fe5
movsd (%r12,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x34fd2
movslq 0x108(%rbx), %r12
testq %r12, %r12
js 0x35526
leaq 0xd0(%rbx), %r14
cmpq %r12, 0xd8(%rbx)
je 0x35025
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0xff4c
cmpq %r12, 0xd8(%rbx)
jne 0x355b1
movq %r15, (%rsp)
movl %r12d, %r15d
movq %r14, %r13
movq (%r14), %rbp
movl %r15d, %r14d
andl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
cmpl $0x2, %r15d
jb 0x35069
cmpl $0x3, %r14d
movl $0x2, %eax
cmovael %r14d, %eax
leaq -0x8(,%rax,8), %rdx
andq $-0x10, %rdx
addq $0x10, %rdx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x91c0
cmpl %r12d, %r14d
je 0x3508c
shrl %r15d
shlq $0x4, %r15
addq %r15, %rbp
shlq $0x3, %r12
subq %r15, %r12
movq %rbp, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x91c0
leaq 0xf8(%rbx), %rax
leaq 0x88(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x78(%rsp), %rbp
movq %rbp, %rdi
callq 0x393be
movq %r13, %r14
leaq 0xa0(%rbx), %r12
leaq 0x1c8(%rsp), %rsi
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsi)
leaq 0x8(%rsp), %rax
movq %rax, 0x10(%rsi)
movq %rbp, 0x18(%rsi)
movq %r12, 0x20(%rsi)
movq %r13, 0x28(%rsi)
movups 0xf8(%rsp), %xmm0
movups %xmm0, 0x30(%rsi)
leaq 0x4f437(%rip), %rax     # 0x84528
movq %rax, (%rsi)
leaq 0x88(%rsp), %rdi
movl $0xf, %edx
callq 0xdf50
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2733c(%rip), %rsi     # 0x5c452
leaq 0x2733c(%rip), %rdx     # 0x5c459
leaq 0x58(%rsp), %rdi
callq 0xdadc
leaq 0x88(%rsp), %rdi
leaq 0x58(%rsp), %rsi
xorps %xmm0, %xmm0
callq 0xed94
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x35153
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x9350
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x272cd(%rip), %rsi     # 0x5c430
leaq 0x272cb(%rip), %rdx     # 0x5c435
leaq 0x38(%rsp), %rdi
callq 0xdadc
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movsd 0x286b7(%rip), %xmm0    # 0x5d840
callq 0xed94
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x351a5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x9350
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2728e(%rip), %rsi     # 0x5c443
leaq 0x27295(%rip), %rdx     # 0x5c451
leaq 0x18(%rsp), %rdi
callq 0xdadc
leaq 0x88(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movsd 0x28655(%rip), %xmm0    # 0x5d830
callq 0xed94
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x351f7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x9350
leaq 0x190(%rsp), %rdi
movb $0x0, 0x28(%rdi)
leaq 0x1b0(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%r13)
movq %r13, %rsi
callq 0x9590
movb $0x1, 0x8(%r13)
leaq 0x88(%rsp), %rdi
callq 0xe0ee
leaq 0x1a0(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9590
movq (%rbp), %rax
movq 0x8(%rbp), %r15
subq -0x10(%rbp), %rax
subq -0x8(%rbp), %r15
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq %rax, %r15
addq -0x20(%rbp), %r15
movq 0x50d13(%rip), %rdi     # 0x85f78
leaq 0x3a570(%rip), %rsi     # 0x6f7dc
movl $0x4, %edx
callq 0x93b0
leaq 0x88(%rsp), %rdi
callq 0xed8e
movq 0x50cee(%rip), %rdi     # 0x85f78
callq 0x9570
movq %rax, %r13
leaq 0x38c4a(%rip), %rsi     # 0x6dee3
movl $0x13, %edx
movq %rax, %rdi
callq 0x93b0
xorps %xmm0, %xmm0
cvtsi2sd %r15, %xmm0
divsd 0x26d72(%rip), %xmm0    # 0x5c028
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movq %r13, %rdi
callq 0x9570
movq %rax, %r13
leaq 0x26fbc(%rip), %rsi     # 0x5c28c
movl $0x5, %edx
movq %rax, %rdi
callq 0x93b0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x9330
movsbl %al, %esi
movq %r13, %rdi
callq 0x9040
movq %rax, %rdi
callq 0x9230
leaq 0x88(%rsp), %rdi
callq 0xed82
movslq 0x10c(%rbx), %rbp
testq %rbp, %rbp
js 0x35545
movq %rax, %r13
cmpq %rbp, 0xc8(%rbx)
je 0x3534f
movl $0x1, %ecx
movq (%rsp), %rdi
movq %rbp, %rsi
movq %rbp, %rdx
callq 0xff4c
cmpq %rbp, 0xc8(%rbx)
jne 0x3559a
movl %ebp, %edx
movq (%rsp), %rax
movq (%rax), %rax
movl %edx, %ecx
andl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
cmpl $0x2, %edx
jb 0x3537a
xorl %edx, %edx
movups (%r13,%rdx,8), %xmm0
movaps %xmm0, (%rax,%rdx,8)
addq $0x2, %rdx
cmpq %rcx, %rdx
jb 0x35367
cmpl %ebp, %ecx
jge 0x35392
movsd (%r13,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbp
jne 0x3537e
movq 0xc0(%rbx), %r13
movq 0xc8(%rbx), %r15
cmpq %r15, 0xa8(%rbx)
je 0x353d2
testq %r15, %r15
js 0x35564
movl $0x1, %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0xff4c
cmpq %r15, 0xa8(%rbx)
jne 0x35583
movq (%r12), %rax
movq %r15, %rcx
shrq $0x3f, %rcx
addq %r15, %rcx
andq $-0x2, %rcx
cmpq $0x2, %r15
jl 0x353ff
xorl %edx, %edx
movaps (%r13,%rdx,8), %xmm0
movaps %xmm0, (%rax,%rdx,8)
addq $0x2, %rdx
cmpq %rcx, %rdx
jl 0x353ec
cmpq %r15, %rcx
jge 0x35418
movsd (%r13,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x35404
leaq 0x88(%rsp), %rdi
callq 0xed88
movslq 0x108(%rbx), %r12
testq %r12, %r12
js 0x35545
movq %rax, %r15
cmpq %r12, 0xd8(%rbx)
je 0x35461
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0xff4c
cmpq %r12, 0xd8(%rbx)
jne 0x3559a
movl %r12d, %edx
movq (%r14), %rax
movl %edx, %ecx
andl $0x7ffffffe, %ecx       # imm = 0x7FFFFFFE
cmpl $0x2, %edx
jb 0x35488
xorl %edx, %edx
movups (%r15,%rdx,8), %xmm0
movaps %xmm0, (%rax,%rdx,8)
addq $0x2, %rdx
cmpq %rcx, %rdx
jb 0x35476
cmpl %r12d, %ecx
jge 0x354a0
movsd (%r15,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x3548d
movq 0xc0(%rsp), %rdi
callq 0x93d0
movq 0xb0(%rsp), %rdi
callq 0x93d0
movq 0x78(%rsp), %rdi
callq 0x93d0
movq 0x8(%rsp), %rdi
callq 0x93d0
leaq 0x160(%rsp), %rbx
movq -0x10(%rbx), %rdi
callq 0x93d0
movq -0x8(%rbx), %rdi
callq 0x93d0
movq %rbx, %rdi
callq 0x37fb2
leaq 0x118(%rsp), %rbx
movq -0x10(%rbx), %rdi
callq 0x93d0
movq -0x8(%rbx), %rdi
callq 0x93d0
movq %rbx, %rdi
callq 0x37fb2
movb $0x1, %al
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2702f(%rip), %rdi     # 0x5c55c
leaq 0x270bd(%rip), %rsi     # 0x5c5f1
leaq 0x27eb1(%rip), %rcx     # 0x5d3ec
movl $0x4a, %edx
callq 0x9200
leaq 0x2765b(%rip), %rdi     # 0x5cba7
leaq 0x273d1(%rip), %rsi     # 0x5c924
leaq 0x28204(%rip), %rcx     # 0x5d75e
movl $0xa3, %edx
callq 0x9200
leaq 0x2790d(%rip), %rdi     # 0x5ce78
leaq 0x27765(%rip), %rsi     # 0x5ccd7
leaq 0x27a8e(%rip), %rcx     # 0x5d007
movl $0x11d, %edx            # imm = 0x11D
callq 0x9200
leaq 0x27af6(%rip), %rdi     # 0x5d080
leaq 0x26fa8(%rip), %rsi     # 0x5c539
leaq 0x27d74(%rip), %rcx     # 0x5d30c
jmp 0x355c6
leaq 0x27adf(%rip), %rdi     # 0x5d080
leaq 0x26f91(%rip), %rsi     # 0x5c539
leaq 0x393ae(%rip), %rcx     # 0x6e95d
jmp 0x355c6
leaq 0x27ac8(%rip), %rdi     # 0x5d080
leaq 0x26f7a(%rip), %rsi     # 0x5c539
leaq 0x27f1d(%rip), %rcx     # 0x5d4e3
movl $0x2d1, %edx            # imm = 0x2D1
callq 0x9200
jmp 0x3566a
jmp 0x35637
jmp 0x35637
jmp 0x3566a
jmp 0x3566a
jmp 0x3566a
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x3566d
movq 0x28(%rsp), %rsi
jmp 0x35626
jmp 0x3566a
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r15, %rdi
je 0x3566d
movq 0x48(%rsp), %rsi
jmp 0x35626
jmp 0x3566a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x3566d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x9350
jmp 0x3566d
jmp 0x3566a
movq %rax, %rbx
jmp 0x35687
movq %rax, %rbx
jmp 0x35691
movq %rax, %rbx
jmp 0x3569b
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x37fb2
jmp 0x356a8
movq %rax, %rbx
jmp 0x356a8
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x37fb2
jmp 0x356b5
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
callq 0x93d0
movq 0xb0(%rsp), %rdi
callq 0x93d0
movq 0x78(%rsp), %rdi
callq 0x93d0
movq 0x8(%rsp), %rdi
callq 0x93d0
leaq 0x138(%rsp), %rdi
callq 0x35fc8
leaq 0xf0(%rsp), %rdi
callq 0x35fc8
movq %rbx, %rdi
callq 0x9680
nop