// File: /workspace/github_cpp_makefile_star2_O2/Myyura[P]MyyuraSat/./source/./solver_search.cpp
// Function: MyyuraSat::Solver::search(int)
LiftedBoolean Solver::search(int n_conflicts) {
    if (_myyura != true) {
        throw;
    }

    Vector<Literal> learnt_clause;
    int backtrack_level;

    for (; ;) {
        // Propagation
        CRARef conflict = propagate();
        std::cout << conflict << std::endl;
        if (conflict != CRAREF_UNDEF) {
            if (decision_level() == 0) { return LIFTED_BOOLEAN_FALSE; }

            learnt_clause.clear();
            analyze(conflict, learnt_clause, backtrack_level);
            cancel_until(backtrack_level);

            if (learnt_clause.size() == 1) {
                unchecked_enqueue(learnt_clause[0]);
            } else {
                CRARef cr = _ca.alloc(learnt_clause, true);
                _learnts.push(cr);
                attach_clause_watcher(cr);
                unchecked_enqueue(learnt_clause[0], cr);
            }
        } else {
            // NO CONFLICT
            Literal next = LITERAL_UNDEF;

            if (next == LITERAL_UNDEF){
                // New variable decision:
                next = pick_branch_literal();

                if (next == LITERAL_UNDEF)
                    // Model found:
                    return LIFTED_BOOLEAN_TRUE;
            }

            // Increase decision level and enqueue 'next'
            new_decision_level();
            unchecked_enqueue(next);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpb $0x0, 0x188(%rdi)
je 0x3dfe
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r14
movaps %xmm0, (%r14)
leaq 0xf8(%rdi), %rax
movq %rax, -0x58(%rbp)
leaq 0x18(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0x92a6(%rip), %r13      # 0xcf98
pushq $-0x1
popq %r15
movq %rbx, %rdi
callq 0x2a72
movl %eax, %r12d
movl %eax, %esi
movq %r13, %rdi
callq 0x20d0
movq %rax, %rdi
callq 0x2090
cmpl $-0x1, %r12d
je 0x3d64
cmpl $0x0, 0x40(%rbx)
je 0x3dd2
cmpq $0x0, -0x40(%rbp)
je 0x3d2e
andl $0x0, -0x38(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
leaq -0x44(%rbp), %rcx
callq 0x38ca
movl -0x44(%rbp), %esi
movq %rbx, %rdi
callq 0x3810
cmpl $0x1, -0x38(%rbp)
jne 0x3d92
movq -0x40(%rbp), %rax
movl (%rax), %esi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x29a6
jmp 0x3cf6
movq %rbx, %rdi
callq 0x3b8e
movl %eax, %r12d
cmpl 0x93e7(%rip), %eax      # 0xd15c
je 0x3ddb
movq %rbx, %rdi
callq 0x5580
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x29a6
jmp 0x3cf6
movq -0x58(%rbp), %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x4b20
movl %eax, -0x2c(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4ba2
movl -0x2c(%rbp), %esi
movq %rbx, %rdi
callq 0x2dc0
movq -0x40(%rbp), %rax
movl (%rax), %esi
movl -0x2c(%rbp), %edx
movq %rbx, %rdi
callq 0x29a6
jmp 0x3cf6
leaq 0x938c(%rip), %rax      # 0xd165
jmp 0x3de2
leaq 0x9382(%rip), %rax      # 0xd164
movb (%rax), %bl
leaq -0x40(%rbp), %rdi
callq 0x4a4c
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x21c0
jmp 0x3e09
jmp 0x3e09
jmp 0x3e09
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x4a4c
movq %rbx, %rdi
callq 0x2250
nop