// File: /workspace/github_cpp_makefile_star2_O2/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 $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
movq 0x646bb(%rip), %rdi     # 0x96f70
leaq 0x3a140(%rip), %rsi     # 0x6c9fc
callq 0x9330
movl 0x108(%rbx), %esi
movq %rax, %rdi
callq 0x9610
leaq 0x3a131(%rip), %rsi     # 0x6ca07
movq %rax, %rdi
callq 0x9330
movl 0x10c(%rbx), %esi
movq %rax, %rdi
callq 0x9610
movq %rax, %rdi
callq 0x9170
movslq 0x108(%rbx), %rsi
movslq 0x10c(%rbx), %rdx
leaq 0x190(%rsp), %r13
movq %r13, %rdi
callq 0x3331e
movq 0x88(%rbx), %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movq 0x90(%rbx), %rax
leaq 0x148(%rsp), %rdx
movq %rax, (%rdx)
movq %r13, %rdi
callq 0x33360
leaq 0x38(%rsp), %rsi
movb $0x0, (%rsi)
movq %r13, 0x8(%rsi)
leaq 0x148(%rsp), %rdi
callq 0x3337a
movslq 0x108(%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0x333bc
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
callq 0x34154
leaq 0xa0(%rbx), %rsi
leaq 0xc0(%rbx), %rdi
movq %rdi, %r15
movq %rsi, %rbp
callq 0xe787
movslq 0x108(%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0xced2
leaq 0xd0(%rbx), %rdi
leaq 0x38(%rsp), %rsi
movq %rdi, %r12
callq 0x26bc6
leaq 0xf8(%rbx), %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x35f66
leaq 0x1d8(%rsp), %rsi
movq %r13, 0x8(%rsi)
movq %rsp, %rax
movq %rax, 0x10(%rsi)
movq %r14, 0x18(%rsi)
movq %rbp, 0x20(%rsi)
movq %r12, %r14
movq %r12, 0x28(%rsi)
movups 0x198(%rsp), %xmm0
movups %xmm0, 0x30(%rsi)
leaq 0x62b1f(%rip), %rax     # 0x95520
movq %rax, (%rsi)
leaq 0x38(%rsp), %rdi
pushq $0xf
popq %rdx
callq 0xc424
leaq 0x1ea22(%rip), %rsi     # 0x5143a
leaq 0xe0(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0xb7a6
leaq 0x38(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
xorps %xmm0, %xmm0
callq 0xcdfc
leaq 0xe0(%rsp), %rdi
callq 0x9708
leaq 0x1e9c2(%rip), %rsi     # 0x51418
leaq 0xc0(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0xb7a6
leaq 0x38(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movsd 0x20dc0(%rip), %xmm0    # 0x53840
callq 0xcdfc
leaq 0xc0(%rsp), %rdi
callq 0x9708
leaq 0x1e992(%rip), %rsi     # 0x5142b
leaq 0xa0(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0xb7a6
leaq 0x38(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movsd 0x20d6d(%rip), %xmm0    # 0x53830
callq 0xcdfc
leaq 0xa0(%rsp), %rdi
callq 0x9708
leaq 0x100(%rsp), %rdi
movb $0x0, 0x38(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
callq 0xb808
leaq 0x38(%rsp), %rdi
callq 0xc4b2
leaq 0x100(%rsp), %rdi
callq 0xba34
movq 0x64466(%rip), %rdi     # 0x96f70
leaq 0x3d5b3(%rip), %rsi     # 0x700c4
callq 0x9330
movq %rax, %r13
leaq 0x38(%rsp), %rdi
callq 0xcdf6
movq %r13, %rdi
callq 0x9540
leaq 0x39ee5(%rip), %rsi     # 0x6ca17
movq %rax, %rdi
callq 0x9330
cvtsi2sdq 0x100(%rsp), %xmm0
divsd 0x1e4dc(%rip), %xmm0    # 0x51028
cvtsd2ss %xmm0, %xmm0
movq %rax, %rdi
callq 0x9270
leaq 0x1e72d(%rip), %rsi     # 0x5128c
movq %rax, %rdi
callq 0x9330
movq %rax, %rdi
callq 0x9170
leaq 0x38(%rsp), %rdi
callq 0xcdea
movslq 0x10c(%rbx), %rdx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xebcc
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0xebf9
movq %rbp, %rdi
movq %r15, %rsi
callq 0xe787
leaq 0x38(%rsp), %rdi
callq 0xcdf0
movslq 0x108(%rbx), %rdx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xebcc
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0xebf9
leaq 0x38(%rsp), %rdi
callq 0x333e4
movq 0x10(%rsp), %rdi
callq 0x93c0
movq (%rsp), %rdi
callq 0x93c0
leaq 0x148(%rsp), %rdi
callq 0x33400
leaq 0x190(%rsp), %rdi
callq 0x33400
movb $0x1, %al
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32c6f
jmp 0x32c6f
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
jmp 0x32c48
jmp 0x32c6f
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x32c48
jmp 0x32c6f
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x9708
jmp 0x32c72
jmp 0x32c6f
movq %rax, %rbx
jmp 0x32c7c
jmp 0x32c63
jmp 0x32c63
jmp 0x32c5c
movq %rax, %rbx
jmp 0x32c9c
jmp 0x32c6f
movq %rax, %rbx
jmp 0x32c86
movq %rax, %rbx
jmp 0x32c8f
jmp 0x32c6f
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x333e4
movq 0x10(%rsp), %rdi
callq 0x93c0
movq (%rsp), %rdi
callq 0x93c0
leaq 0x148(%rsp), %rdi
callq 0x33400
leaq 0x190(%rsp), %rdi
callq 0x33400
movq %rbx, %rdi
callq 0x9640
nop