// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::CnfOptimizer::base_execute(bool, bal::FormulaProcessingMode)
inline bool CnfOptimizer::base_execute(const bool b_reindex_variables, const FormulaProcessingMode mode) {
        _assert_level_0(mode == fpmAll || mode == fpmOriginal);
        
        clauses_.transaction_begin();
        __statistics_reset();
        
        TRACE_START;
        bool result = (evaluate_clauses() != erConflict);
        TRACE_FINISH;
        
        if (result) {
            
            __statistics_print();
            
            if (mode == fpmOriginal) {
                // "lazy" suboptimal approach until transitive reduction works efficiently
                // variables are reindexed at this stage
                // keep original clauses after updating variables;
                // except those satisfied while normalizing
                clauses_.transaction_rollback();
                // unit propagate or substitute variable values, rebuild indexes
                rebuild_clauses<CnfOptimizer, &CnfOptimizer::_normalize_clause>(this, false);
                // this may leave excluded clauses; second reinitialization addresses this
                CnfSubsumptionOptimizer::execute();
            } else if (mode == fpmAll) {
                clauses_.transaction_commit();
            };
            
            const variableid_t new_variables_size = update_variables(b_reindex_variables);
            rebuild_clauses<CnfOptimizer, &CnfOptimizer::_update_clause_variables>(this, mode == fpmAll);
            cnf_.named_variables_update(variables_);
            if (b_reindex_variables && new_variables_size != cnf_.variables_size()) {
                set_variables_size(new_variables_size);
            };

        } else {
            clauses_.transaction_rollback();
        };
        
        clauses_index_.reset(0, 0);
        processed_offset_ = 0; // to match state of the indexes
        
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
leal -0x1(%r15), %eax
cmpl $0x2, %eax
jae 0x109cd
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x109ec
callq 0xe774
movq 0x40a6d(%rip), %rdi     # 0x51300
testq %rdi, %rdi
je 0x108dd
movq 0x8(%rbx), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
pushq $0x3
popq %r13
xorl %r12d, %r12d
movq 0xb8(%rbx), %rax
movl 0x8(%rax), %ecx
cmpq %rcx, %r12
jae 0x108dd
movq (%rax), %rax
movl (%rax,%r12,4), %edx
cmpq %rdx, %r13
je 0x108d4
movq 0x40a35(%rip), %rdi     # 0x51300
movq (%rdi), %rax
movl %r12d, %esi
callq *0x30(%rax)
addq $0x2, %r13
incq %r12
jmp 0x108a9
movq %rbx, %rdi
callq 0x10a2a
movl %eax, %r12d
movq 0x40a11(%rip), %rdi     # 0x51300
testq %rdi, %rdi
je 0x108fa
movq (%rdi), %rax
callq *0x18(%rax)
cmpl $0x4, %r12d
je 0x1092b
callq 0xe7a2
cmpl $0x2, %r15d
jne 0x10936
movq 0x10(%rbx), %rdi
callq 0x10b84
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1131e
movq %rbx, %rdi
callq 0x15478
jmp 0x10945
movq 0x10(%rbx), %rdi
callq 0x10b84
jmp 0x1099f
cmpl $0x1, %r15d
jne 0x10945
movq 0x10(%rbx), %rdi
callq 0x112ec
xorl %r13d, %r13d
cmpl $0x1, %r15d
sete %r13b
movzbl %r14b, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x10be4
movl %eax, %r14d
movq %rbx, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x10dda
movq 0x8(%rbx), %rdi
movq 0xb8(%rbx), %rsi
callq 0x2e31e
testb %r15b, %r15b
je 0x1099f
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpl %eax, %r14d
je 0x1099f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x10dcc
cmpl $0x4, %r12d
setne %r14b
leaq 0x30(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x114ee
andl $0x0, 0xb0(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2383c(%rip), %rdi     # 0x34210
leaq 0x2342d(%rip), %rsi     # 0x33e08
leaq 0x23854(%rip), %rcx     # 0x34236
movl $0x4ed, %edx            # imm = 0x4ED
callq 0xc180