// File: /workspace/github_cpp_makefile_star2_O3/eryxcc[P]lois/src/solvers.cpp
// Function: lois::SolverIncremental::SolverIncremental(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
SolverIncremental(std::string c) { 
    // fprintf(stderr, "[create incremental %d]\n", inccounter);
    sprintf(buf, "incremental%d.smt", inccounter++);
    lastsolver = buf;

    crashed = false; last = emptycontext;
    // ofs << "(declare-sort A 0)\n";

    ourindent = 0;
    
    if(pipe(solver_input))
      throw other_exception("pipe input");
    if(pipe(solver_output))
      throw other_exception("pipe output");
    
    child = fork();
    if(child < 0) throw other_exception("fork");
    else if(child == 0) {
      wearechild = true;
      close(solver_input[1]);
      close(solver_output[0]);
      dup2(solver_output[1], 1);
      dup2(solver_input[0], 0);
      int err = system(c.c_str());
//    fprintf(stderr, "[kill %s]\n", buf);
      exit(0);
      }
    
    close(solver_input[0]);
    close(solver_output[1]);

    ofs.open(buf, std::ofstream::out);
    ofs << "(set-logic " << smtLogic << ")\n";
    ofs << "(define-fun min ((a "<<smtsort()<<") (b "<<smtsort()<<")) "<<smtsort()<<" (ite (<= a b) a b))\n";
    ofs << "(define-fun max ((a "<<smtsort()<<") (b "<<smtsort()<<")) "<<smtsort()<<" (ite (>= a b) a b))\n";
//  fprintf(stderr, "[print logic %s]\n", buf);

    filepipe = open(buf, O_RDONLY);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x1b744(%rip), %rax     # 0x518f8
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x73f0
xorps %xmm0, %xmm0
movups %xmm0, 0x260(%r14)
leaq 0x220(%r14), %r15
movl 0x1c6ed(%rip), %edx     # 0x528c8
leal 0x1(%rdx), %eax
movl %eax, 0x1c6e4(%rip)     # 0x528c8
leaq 0xa413(%rip), %rsi      # 0x405fe
movq %r15, %rdi
xorl %eax, %eax
callq 0x7080
movq 0x1c6b4(%rip), %r13     # 0x528b0
leaq 0x1c6a5(%rip), %rbp     # 0x528a8
movq %r15, %rdi
callq 0x7130
movq %rbp, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x7380
movb $0x0, 0x25c(%r14)
leaq 0x1c533(%rip), %rsi     # 0x52760
movq (%rsi), %rax
movq %rax, 0x260(%r14)
leaq 0x268(%r14), %rdi
addq $0x8, %rsi
callq 0x1615e
movl $0x0, 0x270(%r14)
leaq 0x208(%r14), %r13
movq %r13, %rdi
callq 0x7310
testl %eax, %eax
jne 0x36511
leaq 0x210(%r14), %rbp
movq %rbp, %rdi
callq 0x7310
testl %eax, %eax
jne 0x36575
callq 0x70a0
movl %eax, 0x218(%r14)
testl %eax, %eax
js 0x365d6
je 0x3662c
movl (%r13), %edi
callq 0x7460
movl 0x214(%r14), %edi
callq 0x7460
movq %rbx, %rdi
movq %r15, %rsi
movl $0x10, %edx
callq 0x7060
leaq 0xa366(%rip), %rsi      # 0x4062c
movl $0xb, %edx
movq %rbx, %rdi
callq 0x72c0
movq 0x1c5ae(%rip), %rsi     # 0x52888
movq 0x1c5af(%rip), %rdx     # 0x52890
movq %rbx, %rdi
callq 0x72c0
leaq 0xa37a(%rip), %rsi      # 0x4066a
movl $0x2, %edx
movq %rax, %rdi
callq 0x72c0
leaq 0xa334(%rip), %rsi      # 0x40638
movl $0x14, %edx
movq %rbx, %rdi
callq 0x72c0
leaq 0x8(%rsp), %rdi
callq 0x346fd
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x72c0
movq %rax, %r12
leaq 0xa316(%rip), %rsi      # 0x4064d
movl $0x5, %edx
movq %rax, %rdi
callq 0x72c0
leaq 0x48(%rsp), %rdi
callq 0x346fd
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r12, %rdi
callq 0x72c0
movq %rax, %r12
leaq 0xa2e9(%rip), %rsi      # 0x40653
movl $0x3, %edx
movq %rax, %rdi
callq 0x72c0
leaq 0x28(%rsp), %rdi
callq 0x346fd
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x72c0
leaq 0xa2bd(%rip), %rsi      # 0x40657
movl $0x15, %edx
movq %rax, %rdi
callq 0x72c0
leaq 0x38(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x363c2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7280
leaq 0x58(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x363dd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7280
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x363f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7280
leaq 0xa26e(%rip), %rsi      # 0x4066d
movl $0x14, %edx
movq %rbx, %rdi
callq 0x72c0
leaq 0x8(%rsp), %rdi
callq 0x346fd
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x72c0
movq %rax, %r12
leaq 0xa21b(%rip), %rsi      # 0x4064d
movl $0x5, %edx
movq %rax, %rdi
callq 0x72c0
leaq 0x48(%rsp), %rdi
callq 0x346fd
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r12, %rdi
callq 0x72c0
movq %rax, %r12
leaq 0xa1ee(%rip), %rsi      # 0x40653
movl $0x3, %edx
movq %rax, %rdi
callq 0x72c0
leaq 0x28(%rsp), %rdi
callq 0x346fd
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r12, %rdi
callq 0x72c0
leaq 0xa1ed(%rip), %rsi      # 0x40682
movl $0x15, %edx
movq %rax, %rdi
callq 0x72c0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
leaq 0x18(%rsp), %r12
je 0x364be
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7280
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x364d5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7280
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x364ec
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7280
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x71c0
movl %eax, 0x21c(%r14)
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x7150
movq %rax, %r12
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xa0df(%rip), %rsi      # 0x40610
leaq 0xa0e2(%rip), %rdx      # 0x4061a
leaq 0xa8(%rsp), %rdi
callq 0x1c74a
movb $0x1, %bpl
leaq 0xa8(%rsp), %rsi
movq %r12, %rdi
callq 0x3514c
xorl %ebp, %ebp
leaq 0x1b03f(%rip), %rsi     # 0x515a0
leaq -0x13d2(%rip), %rdx     # 0x35196
movq %r12, %rdi
callq 0x7400
jmp 0x3662c
movl $0x28, %edi
callq 0x7150
movq %rax, %r12
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xa086(%rip), %rsi      # 0x4061b
leaq 0xa08a(%rip), %rdx      # 0x40626
leaq 0x88(%rsp), %rdi
callq 0x1c74a
movb $0x1, %bpl
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
callq 0x3514c
xorl %ebp, %ebp
leaq 0x1afdb(%rip), %rsi     # 0x515a0
leaq -0x1436(%rip), %rdx     # 0x35196
movq %r12, %rdi
callq 0x7400
jmp 0x3662c
movl $0x28, %edi
callq 0x7150
movq %rax, %r12
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xa034(%rip), %rsi      # 0x40627
leaq 0xa031(%rip), %rdx      # 0x4062b
leaq 0x68(%rsp), %rdi
callq 0x1c74a
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
movq %r12, %rdi
callq 0x3514c
xorl %ebp, %ebp
leaq 0x1af83(%rip), %rsi     # 0x515a0
leaq -0x148e(%rip), %rdx     # 0x35196
movq %r12, %rdi
callq 0x7400
movb $0x1, 0x1c24d(%rip)     # 0x52880
movl 0x20c(%r14), %edi
callq 0x7460
movl (%rbp), %edi
callq 0x7460
movl 0x214(%r14), %edi
movl $0x1, %esi
callq 0x7240
movl 0x208(%r14), %edi
xorl %esi, %esi
callq 0x7240
movq (%r12), %rdi
callq 0x7210
xorl %edi, %edi
callq 0x72f0
jmp 0x367a3
movq %rax, %r15
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x366cd
movq 0x78(%rsp), %rsi
jmp 0x366c5
jmp 0x366d7
movq %rax, %r15
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x366cd
movq 0x98(%rsp), %rsi
jmp 0x366c5
jmp 0x366d7
movq %rax, %r15
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x366cd
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x7280
testb %bpl, %bpl
jne 0x366da
jmp 0x367a6
movq %rax, %r15
movq %r12, %rdi
callq 0x71b0
jmp 0x367a6
jmp 0x36718
jmp 0x36734
jmp 0x367a3
jmp 0x36763
jmp 0x36783
jmp 0x367a3
movq %rax, %r15
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x3671b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7280
jmp 0x3671b
movq %rax, %r15
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x36737
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7280
jmp 0x36737
movq %rax, %r15
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
jmp 0x3678f
movq %rax, %r15
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36766
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7280
jmp 0x36766
movq %rax, %r15
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36786
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7280
jmp 0x36786
movq %rax, %r15
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x367a6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7280
jmp 0x367a6
movq %rax, %r15
movq 0x268(%r14), %rdi
testq %rdi, %rdi
je 0x367b7
callq 0x133fc
movq %rbx, %rdi
callq 0x7350
movq %r15, %rdi
callq 0x7430
nop