// File: /workspace/github_cpp_makefile_star2_O1/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 0x36d03
movq 0x1c2d3(%rip), %rcx     # 0x52fc8
cmpb $0x0, (%rcx)
je 0x36cff
incl 0x8(%rax)
jmp 0x36d03
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x376a4
movl %eax, %r14d
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x36d22
callq 0x13308
movl $0x1, %ebp
testb %r14b, %r14b
jne 0x36f6c
leaq 0x1cbad(%rip), %r12     # 0x538e4
movl (%r12), %r13d
movl $0x6, (%r12)
leaq 0x8(%rbx), %r14
leaq 0xa96e(%rip), %rsi      # 0x416bc
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 0xa93b(%rip), %rsi      # 0x416c5
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 0x36dc2
movq 0x1c214(%rip), %rcx     # 0x52fc8
cmpb $0x0, (%rcx)
je 0x36dbe
incl 0x8(%rax)
jmp 0x36dc2
lock
incl 0x8(%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x29634
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 0xa8cf(%rip), %rsi      # 0x416d2
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 0x36e46
callq 0x13308
leaq 0xa88b(%rip), %rsi      # 0x416d8
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 0xa85b(%rip), %rsi      # 0x416e4
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 0x36f6c
movq %rbx, %rdi
callq 0x37b6c
leaq 0x38(%rsp), %r13
leaq 0x28(%rsp), %r14
leaq 0xa806(%rip), %r15      # 0x416ee
cmpb $0x0, 0x25c(%rbx)
jne 0x36f67
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37c96
movq %r14, %rdi
movq %r15, %rsi
callq 0x70c0
xorl %r12d, %r12d
testl %eax, %eax
je 0x36f40
movq %r14, %rdi
leaq 0xa7d4(%rip), %rsi      # 0x416ec
callq 0x70c0
testl %eax, %eax
je 0x36f47
movq %r14, %rdi
leaq 0xa7c7(%rip), %rsi      # 0x416f2
callq 0x70c0
testl %eax, %eax
setne %r12b
movl $0x1, %eax
cmovel %eax, %ebp
jmp 0x36f49
movl $0x2, %ebp
jmp 0x36f49
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x36f60
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7280
testb %r12b, %r12b
jne 0x36ee8
jmp 0x36f6c
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 0x36f8f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x36f99
callq 0x13308
movq %rbx, %rdi
callq 0x7430
nop