// File: /workspace/github_cpp_makefile_star2_O2/mororo18[P]simplex-method/src/model.cpp
// Function: Model::obj_func::output_generate[abi:cxx11]()
std::string Model::obj_func::output_generate(){
    std::string output;

    std::string func = "Z = ";
    std::string opt1;
    std::string opt2;
    std::string opt3;
    
    //std::cout << func;
    //output.append(func);
    output = func;

    for(int i = 0; i < coef.size(); i++){
        std::stringstream coef_stream;
        coef_stream << std::setprecision(OUT_PRECISION) << coef[i];

        std::string coef_str = coef_stream.str();

        opt1 = " " + coef_str + " " + var_name[i];
        opt2 = " + " + coef_str + " " + var_name[i];
        opt3 = coef_str + " " + var_name[i];

        if(coef[i] < 0){
            //std::cout << opt1;
            output.append(opt1);
        }else if(i != 0){
            //std::cout << " + " << coef[i] << " " << var_name[i];
            //std::cout << opt2;
            output.append(opt2);
        }else{
            //std::cout << coef[i] << " " << var_name[i];
            //std::cout << opt3;
            output.append(opt3);
        }
    }
    //std::cout << std::endl;
    output.append("\n");

    //std::cout << output;

    return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x3d3a(%rip), %rsi      # 0xc594
leaq 0xc0(%rsp), %rdi
leaq 0x120(%rsp), %rdx
movq %rbx, 0x10(%rsp)
callq 0x20b0
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
leaq 0x50(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x2110
movq $0x0, 0x8(%rsp)
leaq 0xe0(%rsp), %rbx
xorl %r12d, %r12d
movq 0x28(%r15), %rax
subq 0x20(%r15), %rax
sarq $0x3, %rax
movq %r12, 0x18(%rsp)
cmpq %r12, %rax
jbe 0x8acc
leaq 0x120(%rsp), %rdi
callq 0x2130
movq 0x130(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x138(%rsp,%rax)
movq 0x20(%r15), %rax
movq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x130(%rsp), %rdi
callq 0x2280
leaq 0x20(%rsp), %r12
movq %r12, %rdi
leaq 0x138(%rsp), %rsi
callq 0x2260
movq %rbx, %rdi
movq %rbx, %r13
leaq 0x3ab1(%rip), %rbx      # 0xc3fa
movq %rbx, %rsi
movq %r12, %rdx
callq 0x958d
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %r12
movq %r13, %rsi
movq %rbx, %rdx
callq 0x956e
movq 0x8(%r15), %rdx
addq 0x8(%rsp), %rdx
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x96b8
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x20e0
movq %rbp, %rdi
callq 0x20e0
movq %rbp, %r13
movq %r12, %rbx
movq %r12, %rdi
callq 0x20e0
movq %r12, %rdi
leaq 0x3a3e(%rip), %rsi      # 0xc3fc
leaq 0x20(%rsp), %rdx
callq 0x958d
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x3a25(%rip), %rdx      # 0xc3fa
callq 0x956e
movq 0x8(%rsp), %rax
movq 0x8(%r15), %rdx
addq %rax, %rdx
leaq 0x100(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x96b8
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x21e0
movq %r12, %rdi
callq 0x20e0
movq %r13, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x20e0
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x39cd(%rip), %rdx      # 0xc3fa
callq 0x9603
movq 0x8(%r15), %rdx
movq 0x8(%rsp), %r14
addq %r14, %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x96b8
leaq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x21e0
movq %r12, %rdi
callq 0x20e0
movq %r13, %rdi
callq 0x20e0
testq %r14, %r14
leaq 0x40(%rsp), %rsi
cmoveq %rbp, %rsi
movq %r15, %r13
movq 0x20(%r15), %rax
xorpd %xmm0, %xmm0
movq 0x18(%rsp), %r12
ucomisd (%rax,%r12,8), %xmm0
leaq 0x60(%rsp), %rax
cmovaq %rax, %rsi
movq 0x10(%rsp), %rdi
callq 0x22f0
leaq 0x20(%rsp), %rdi
callq 0x20e0
leaq 0x120(%rsp), %rdi
callq 0x2140
incq %r12
addq $0x20, %r14
movq %r14, 0x8(%rsp)
movq %r13, %r15
jmp 0x88cd
leaq 0x39dd(%rip), %rsi      # 0xc4b0
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x22d0
leaq 0xa0(%rsp), %rdi
callq 0x20e0
leaq 0x40(%rsp), %rdi
callq 0x20e0
leaq 0x60(%rsp), %rdi
callq 0x20e0
leaq 0xc0(%rsp), %rdi
callq 0x20e0
movq %rbx, %rax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x8bba
jmp 0x8bcc
jmp 0x8b5b
jmp 0x8b60
jmp 0x8b49
jmp 0x8b5b
jmp 0x8b5b
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x8b70
jmp 0x8b65
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x20e0
jmp 0x8b68
movq %rax, %rbx
jmp 0x8b75
movq %rax, %rbx
jmp 0x8b7f
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x20e0
leaq 0x20(%rsp), %rdi
callq 0x20e0
leaq 0x120(%rsp), %rdi
callq 0x2140
leaq 0xa0(%rsp), %rdi
callq 0x20e0
leaq 0x40(%rsp), %rdi
callq 0x20e0
leaq 0x60(%rsp), %rdi
callq 0x20e0
leaq 0xc0(%rsp), %rdi
callq 0x20e0
movq 0x10(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x22c0
movq %rax, %rbx
jmp 0x8b8c
nop