// File: 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
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0x88(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x11030
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x62c30
movb %al, -0x6d(%rbp)
jmp 0x62101
leaq -0x28(%rbp), %rdi
callq 0x11060
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x62113
jmp 0x62139
movl $0x1, -0x4(%rbp)
jmp 0x62361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x11060
jmp 0x6236d
movq -0x80(%rbp), %rdi
leaq 0x43820(%rip), %rax     # 0xa5964
movl (%rax), %ecx
movl %ecx, -0x38(%rbp)
movl $0x6, (%rax)
addq $0x8, %rdi
movq %rdi, -0xa8(%rbp)
leaq 0x1158a(%rip), %rsi     # 0x736eb
callq 0x82b0
movq %rax, %rdi
movq 0x42e40(%rip), %rsi     # 0xa4fb0
callq 0x8300
movq -0xa8(%rbp), %rdi
leaq 0x11571(%rip), %rsi     # 0x736f4
callq 0x82b0
movq -0x88(%rbp), %rsi
movq %rax, -0xa0(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x11030
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x40060
movq %rax, -0x90(%rbp)
jmp 0x621c2
movq -0x90(%rbp), %rdi
movq 0x42de0(%rip), %rsi     # 0xa4fb0
callq 0x8300
movq %rax, -0xb0(%rbp)
jmp 0x621de
movq -0xb0(%rbp), %rdi
leaq 0x11515(%rip), %rsi     # 0x73701
callq 0x82b0
movq %rax, -0xb8(%rbp)
jmp 0x621fa
movq -0xb8(%rbp), %rdi
movq 0x42da8(%rip), %rsi     # 0xa4fb0
callq 0x8300
jmp 0x6220f
leaq -0x48(%rbp), %rdi
callq 0x11060
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
leaq 0x114e0(%rip), %rsi     # 0x73707
callq 0x82b0
movq %rax, %rdi
movq 0x42d7a(%rip), %rsi     # 0xa4fb0
callq 0x8300
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
leaq 0x114c9(%rip), %rsi     # 0x73713
callq 0x82b0
movq %rax, %rdi
movq 0x42d57(%rip), %rsi     # 0xa4fb0
callq 0x8300
movq -0x80(%rbp), %rax
movl -0x38(%rbp), %edx
leaq 0x436f8(%rip), %rcx     # 0xa5964
movl %edx, (%rcx)
testb $0x1, 0x25c(%rax)
je 0x6229d
movl $0x1, -0x4(%rbp)
jmp 0x62361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x11060
jmp 0x6236d
movq -0x80(%rbp), %rdi
callq 0x632e0
movq -0x80(%rbp), %rax
movb 0x25c(%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x622bb
jmp 0x6235a
movq -0x80(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x634a0
leaq -0x68(%rbp), %rdi
leaq 0x1144a(%rip), %rsi     # 0x7371d
callq 0x50ce0
testb $0x1, %al
jne 0x622de
jmp 0x622ee
movl $0x2, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x62341
leaq -0x68(%rbp), %rdi
leaq 0x11422(%rip), %rsi     # 0x7371b
callq 0x50ce0
testb $0x1, %al
jne 0x62304
jmp 0x62314
movl $0x0, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x62341
leaq -0x68(%rbp), %rdi
leaq 0x11402(%rip), %rsi     # 0x73721
callq 0x50ce0
testb $0x1, %al
jne 0x6232a
jmp 0x6233a
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x62341
movl $0x0, -0x6c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x8578
movl -0x6c(%rbp), %eax
testl %eax, %eax
je 0x62355
jmp 0x62353
jmp 0x62361
jmp 0x622a6
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x84d0
nopw %cs:(%rax,%rax)