// File: /workspace/github_cpp_makefile_star2_O3/eryxcc[P]lois/src/solvers.cpp
// Function: lois::SolverIncremental::solve(lois::rbool)
virtual int solve(rbool phi) { 
  
    if(isNotInSMTLogic(phi)) return 1;

    OutputLanguage sav = outlan;

//    std::string s = readline();
//    if(s != "") printf("{%s}\n", s.c_str());

    outlan = SMT_INC;

    ofs << "(push 1)" << std::endl;
    ofs << "(assert\n    " << phi << std::endl << "    )" << std::endl;
    ofs << "(check-sat)" << std::endl;
    ofs << "(pop 1)" << std::endl;

    outlan = sav;
    if(crashed) return 1;
    pump();
    while(!crashed) {
      std::string s = readline();
      if(s == "sat") return 2;
      if(s == "unsat") return 0;
      if(s == "unknown") return 1;
      }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x36807
movq 0x1b7cf(%rip), %rcx     # 0x51fc8
cmpb $0x0, (%rcx)
je 0x36803
incl 0x8(%rax)
jmp 0x36807
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x371b2
movl %eax, %r14d
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x36826
callq 0x133fc
movl $0x1, %ebp
testb %r14b, %r14b
jne 0x36a70
leaq 0x1c0b1(%rip), %r12     # 0x528ec
movl (%r12), %r13d
movl $0x6, (%r12)
leaq 0x8(%rbx), %r14
leaq 0x9e46(%rip), %rsi      # 0x40698
movl $0x8, %edx
movq %r14, %rdi
callq 0x72c0
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7250
movsbl %al, %esi
movq %r14, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x7190
leaq 0x9e13(%rip), %rsi      # 0x406a1
movl $0xc, %edx
movq %r14, %rdi
callq 0x72c0
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x368c6
movq 0x1b710(%rip), %rcx     # 0x51fc8
cmpb $0x0, (%rcx)
je 0x368c2
incl 0x8(%rax)
jmp 0x368c6
lock
incl 0x8(%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x297cc
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x7250
movsbl %al, %esi
movq %r15, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x7190
movq %rax, %r15
leaq 0x9da7(%rip), %rsi      # 0x406ae
movl $0x5, %edx
movq %rax, %rdi
callq 0x72c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x7250
movsbl %al, %esi
movq %r15, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x7190
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3694a
callq 0x133fc
leaq 0x9d63(%rip), %rsi      # 0x406b4
movl $0xb, %edx
movq %r14, %rdi
callq 0x72c0
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7250
movsbl %al, %esi
movq %r14, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x7190
leaq 0x9d33(%rip), %rsi      # 0x406c0
movl $0x7, %edx
movq %r14, %rdi
callq 0x72c0
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7250
movsbl %al, %esi
movq %r14, %rdi
callq 0x7030
movq %rax, %rdi
callq 0x7190
movl %r13d, (%r12)
cmpb $0x0, 0x25c(%rbx)
jne 0x36a70
movq %rbx, %rdi
callq 0x37614
leaq 0x38(%rsp), %r13
leaq 0x28(%rsp), %r14
leaq 0x9cde(%rip), %r15      # 0x406ca
cmpb $0x0, 0x25c(%rbx)
jne 0x36a6b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3775a
movq %r14, %rdi
movq %r15, %rsi
callq 0x70c0
xorl %r12d, %r12d
testl %eax, %eax
je 0x36a44
movq %r14, %rdi
leaq 0x9cac(%rip), %rsi      # 0x406c8
callq 0x70c0
testl %eax, %eax
je 0x36a4b
movq %r14, %rdi
leaq 0x9c9f(%rip), %rsi      # 0x406ce
callq 0x70c0
testl %eax, %eax
setne %r12b
movl $0x1, %eax
cmovel %eax, %ebp
jmp 0x36a4d
movl $0x2, %ebp
jmp 0x36a4d
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x36a64
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7280
testb %r12b, %r12b
jne 0x369ec
jmp 0x36a70
movl $0x1, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
jmp 0x36a93
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x36a9d
callq 0x133fc
movq %rbx, %rdi
callq 0x7430
nop