// File: /workspace/github_cpp_makefile_star2_O1/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 0x12ee7
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpl $-0x1, 0x50(%rax)
jne 0x12f06
movl %esi, %r14d
movl 0x10(%rax), %ecx
movl %ecx, 0x50(%rax)
movq 0x28(%rax), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x54(%rax)
movl 0x38(%rax), %ecx
movl %ecx, 0x58(%rax)
callq 0x101f8
movq 0x4c604(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x12d63
movq 0x8(%rbx), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0xb8(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x12d63
movl $0x3, %r13d
xorl %r12d, %r12d
movq (%rax), %rax
movl (%rax,%r12,4), %edx
cmpq %rdx, %r13
je 0x12d4d
movq 0x4c5cc(%rip), %rdi     # 0x5f310
movq (%rdi), %rax
movl %r12d, %esi
callq *0x30(%rax)
incq %r12
movq 0xb8(%rbx), %rax
movl 0x8(%rax), %ecx
addq $0x2, %r13
cmpq %rcx, %r12
jb 0x12d31
movq %rbx, %rdi
callq 0x12f82
movl %eax, %r12d
movq 0x4c59b(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x12d80
movq (%rdi), %rax
callq *0x18(%rax)
cmpl $0x4, %r12d
je 0x12de8
callq 0x10224
cmpl $0x2, %r15d
jne 0x12e28
movq 0x10(%rbx), %r13
movl 0x50(%r13), %esi
cmpl $-0x1, %esi
je 0x12f25
cmpl %esi, 0x10(%r13)
jb 0x12f25
movl 0x58(%r13), %edx
movl 0x54(%r13), %ecx
movq (%r13), %rax
movq %r13, %rdi
callq *(%rax)
movq $-0x1, 0x50(%r13)
movl $0xffffffff, 0x58(%r13) # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x13c98
movq %rbx, %rdi
callq 0x18b1c
jmp 0x12e4b
movq 0x10(%rbx), %r14
movl 0x50(%r14), %esi
cmpl $-0x1, %esi
je 0x12f25
cmpl %esi, 0x10(%r14)
jb 0x12f25
movl 0x58(%r14), %edx
movl 0x54(%r14), %ecx
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
movq $-0x1, 0x50(%r14)
movl $0xffffffff, 0x58(%r14) # imm = 0xFFFFFFFF
jmp 0x12eb6
cmpl $0x1, %r15d
jne 0x12e4b
movq 0x10(%rbx), %rax
cmpl $-0x1, 0x50(%rax)
je 0x12f44
movq $-0x1, 0x50(%rax)
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
xorl %r13d, %r13d
cmpl $0x1, %r15d
sete %r13b
movzbl %r14b, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x132bc
movl %eax, %r14d
movq %rbx, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x13520
movq 0x8(%rbx), %rdi
movq 0xb8(%rbx), %rsi
callq 0x3d2a2
testb %r15b, %r15b
je 0x12eb6
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpl %eax, %r14d
je 0x12eb6
cmpl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
jae 0x12f63
movq 0x8(%rbx), %rax
movl %r14d, 0x8(%rax)
movl %r14d, 0xb0(%rax)
cmpl $0x4, %r12d
setne %r14b
leaq 0x30(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1407a
movl $0x0, 0xb0(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31312(%rip), %rdi     # 0x44200
leaq 0x30f03(%rip), %rsi     # 0x43df8
leaq 0x3132a(%rip), %rcx     # 0x44226
movl $0x4ed, %edx            # imm = 0x4ED
callq 0xc180
leaq 0x3173e(%rip), %rdi     # 0x4464b
leaq 0x30ae0(%rip), %rsi     # 0x439f4
leaq 0x337dc(%rip), %rcx     # 0x466f7
movl $0x63, %edx
callq 0xc180
leaq 0x33984(%rip), %rdi     # 0x468b0
leaq 0x30ac1(%rip), %rsi     # 0x439f4
leaq 0x339ae(%rip), %rcx     # 0x468e8
movl $0x71, %edx
callq 0xc180
leaq 0x31701(%rip), %rdi     # 0x4464c
leaq 0x30aa2(%rip), %rsi     # 0x439f4
leaq 0x310ed(%rip), %rcx     # 0x44046
movl $0x6a, %edx
callq 0xc180
leaq 0x2e6a1(%rip), %rdi     # 0x4160b
leaq 0x2e6b7(%rip), %rsi     # 0x41628
leaq 0x2e6c8(%rip), %rcx     # 0x41640
movl $0x9b, %edx
callq 0xc180