// File: 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
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movb 0x188(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x529f
callq 0x21b0
leaq -0x28(%rbp), %rdi
callq 0x7480
movq -0x60(%rbp), %rdi
callq 0x30b0
movl %eax, -0x64(%rbp)
jmp 0x52b6
movl -0x64(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %esi
movq 0x10cd2(%rip), %rdi     # 0x15f98
callq 0x2180
movq %rax, -0x70(%rbp)
jmp 0x52d1
movq -0x70(%rbp), %rdi
movq 0x10c84(%rip), %rsi     # 0x15f60
callq 0x2120
jmp 0x52e3
cmpl $-0x1, -0x30(%rbp)
je 0x542b
movq -0x60(%rbp), %rdi
callq 0x7670
movl %eax, -0x74(%rbp)
jmp 0x52fb
movl -0x74(%rbp), %eax
cmpl $0x0, %eax
jne 0x5332
movb 0x10e4c(%rip), %al      # 0x16155
movb %al, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x54db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x7640
jmp 0x54f0
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x74b0
jmp 0x533f
movq -0x60(%rbp), %rdi
movl -0x30(%rbp), %esi
leaq -0x28(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
callq 0x4b90
jmp 0x5355
movq -0x60(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x4a60
jmp 0x5363
leaq -0x28(%rbp), %rdi
callq 0x7720
movl %eax, -0x78(%rbp)
jmp 0x5371
movl -0x78(%rbp), %eax
cmpl $0x1, %eax
jne 0x53a8
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x77a0
movq %rax, -0x80(%rbp)
jmp 0x538a
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2f70
jmp 0x53a6
jmp 0x5426
movq -0x60(%rbp), %rdi
addq $0xf8, %rdi
leaq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x7940
movl %eax, -0x84(%rbp)
jmp 0x53c9
movq -0x60(%rbp), %rdi
movl -0x84(%rbp), %eax
movl %eax, -0x48(%rbp)
addq $0x18, %rdi
leaq -0x48(%rbp), %rsi
callq 0x7a40
jmp 0x53e5
movq -0x60(%rbp), %rdi
movl -0x48(%rbp), %esi
callq 0x36d0
jmp 0x53f3
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x77a0
movq %rax, -0x90(%rbp)
jmp 0x5407
movq -0x60(%rbp), %rdi
movq -0x90(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x48(%rbp), %edx
movl -0x4c(%rbp), %esi
callq 0x2f70
jmp 0x5424
jmp 0x5426
jmp 0x54d6
movl 0x10d1b(%rip), %eax     # 0x1614c
movl %eax, -0x50(%rbp)
leaq 0x10d11(%rip), %rsi     # 0x1614c
leaq -0x50(%rbp), %rdi
callq 0x7820
movb %al, -0x91(%rbp)
jmp 0x544c
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x5458
jmp 0x54b0
movq -0x60(%rbp), %rdi
callq 0x5080
movl %eax, -0x98(%rbp)
jmp 0x5469
movl -0x98(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq 0x10ccd(%rip), %rsi     # 0x1614c
leaq -0x50(%rbp), %rdi
callq 0x7820
movb %al, -0x99(%rbp)
jmp 0x5490
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x549c
jmp 0x54ae
movb 0x10cb2(%rip), %al      # 0x16154
movb %al, -0x1(%rbp)
movl $0x1, -0x40(%rbp)
jmp 0x54db
jmp 0x54b0
movq -0x60(%rbp), %rdi
callq 0x9130
jmp 0x54bb
movq -0x60(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2f70
jmp 0x54d4
jmp 0x54d6
jmp 0x52a8
leaq -0x28(%rbp), %rdi
callq 0x7640
movb -0x1(%rbp), %al
addq $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2230
nopl (%rax)