// File: vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::CnfVariableEvaluator::execute()
bool CnfVariableEvaluator::execute() {
        clauses_.transaction_begin();
        bool result = (evaluate_clauses() != erConflict);
        clauses_.transaction_rollback();
        
        if (result) {
            // update variables to resolve any sequenced references
            // lighter version of update_variables() with no reindexing
            literalid_t* var_values = variables_.data();
            
            // go through the variables sequentially
            for (variableid_t i = 0; i < variables_.size(); i++) {
                const literalid_t value = var_values[i];
                if (literal_t__is_variable(value) && i != literal_t__variable_id(value)) {
                    _assert_level_1(i > literal_t__variable_id(value));
                    const literalid_t new_value = var_values[literal_t__variable_id(value)];
                    _assert_level_1(!literal_t__is_unassigned(new_value));
                    var_values[i] = literal_t__substitute_literal(value, new_value);
                };
            };
        };
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rax), %rdi
callq 0x16820
movq -0x30(%rbp), %rdi
callq 0x16890
movl %eax, %ecx
movq -0x30(%rbp), %rax
cmpl $0x4, %ecx
setne %cl
andb $0x1, %cl
movb %cl, -0x9(%rbp)
movq 0x10(%rax), %rdi
callq 0x16a20
testb $0x1, -0x9(%rbp)
je 0x15fc5
movq -0x30(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10310
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, -0x34(%rbp)
movq 0xb8(%rax), %rdi
callq 0x102f0
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jae 0x15fc3
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x20(%rbp)
movb %al, -0x35(%rbp)
jbe 0x15efb
cmpl $-0x2, -0x20(%rbp)
setbe %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x15f07
jmp 0x15fb3
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
shrl %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x15fb3
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
shrl %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jbe 0x15f2b
jmp 0x15f4a
leaq 0x48044(%rip), %rdi     # 0x5df76
leaq 0x47fdb(%rip), %rsi     # 0x5df14
movl $0x541, %edx            # imm = 0x541
leaq 0x4805d(%rip), %rcx     # 0x5dfa2
callq 0xd1c0
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
shrl %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x15f6d
jmp 0x15f6f
jmp 0x15f8e
leaq 0x4805e(%rip), %rdi     # 0x5dfd4
leaq 0x47f97(%rip), %rsi     # 0x5df14
movl $0x543, %edx            # imm = 0x543
leaq 0x48019(%rip), %rcx     # 0x5dfa2
callq 0xd1c0
movl -0x24(%rbp), %edx
movl -0x20(%rbp), %esi
xorl $-0x1, %esi
andl $0x1, %esi
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %esi
cmovnel %ecx, %eax
xorl %eax, %edx
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x15fb5
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x15eb6
jmp 0x15fc5
movb -0x9(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq