// File: /workspace/github_cpp_makefile_star2_O3/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 0x11af9
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpl $-0x1, 0x50(%rax)
jne 0x11b18
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 0xee90
movq 0x4a9f2(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x11975
movq 0x8(%rbx), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0xb8(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x11975
movl $0x3, %r13d
xorl %r12d, %r12d
movq (%rax), %rcx
movl (%rcx,%r12,4), %edx
cmpq %rdx, %r13
je 0x11966
movq 0x4a9ba(%rip), %rdi     # 0x5c310
movq (%rdi), %rax
movl %r12d, %esi
callq *0x30(%rax)
movq 0xb8(%rbx), %rax
incq %r12
movl 0x8(%rax), %ecx
addq $0x2, %r13
cmpq %rcx, %r12
jb 0x11943
movq %rbx, %rdi
callq 0x11b94
movl %eax, %r12d
movq 0x4a989(%rip), %rdi     # 0x5c310
testq %rdi, %rdi
je 0x11992
movq (%rdi), %rax
callq *0x18(%rax)
cmpl $0x4, %r12d
je 0x119fa
callq 0xeebc
cmpl $0x2, %r15d
jne 0x11a3a
movq 0x10(%rbx), %r13
movl 0x50(%r13), %esi
cmpl $-0x1, %esi
je 0x11b37
cmpl %esi, 0x10(%r13)
jb 0x11b37
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 0x1285a
movq %rbx, %rdi
callq 0x175b4
jmp 0x11a5d
movq 0x10(%rbx), %r14
movl 0x50(%r14), %esi
cmpl $-0x1, %esi
je 0x11b37
cmpl %esi, 0x10(%r14)
jb 0x11b37
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 0x11ac8
cmpl $0x1, %r15d
jne 0x11a5d
movq 0x10(%rbx), %rax
cmpl $-0x1, 0x50(%rax)
je 0x11b56
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 0x11eca
movl %eax, %r14d
movq %rbx, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x1211a
movq 0x8(%rbx), %rdi
movq 0xb8(%rbx), %rsi
callq 0x3b32e
testb %r15b, %r15b
je 0x11ac8
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
cmpl %eax, %r14d
je 0x11ac8
cmpl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
jae 0x11b75
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 0x12c3c
movl $0x0, 0xb0(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30710(%rip), %rdi     # 0x42210
leaq 0x30301(%rip), %rsi     # 0x41e08
leaq 0x30728(%rip), %rcx     # 0x42236
movl $0x4ed, %edx            # imm = 0x4ED
callq 0xb180
leaq 0x30b3c(%rip), %rdi     # 0x4265b
leaq 0x2febe(%rip), %rsi     # 0x419e4
leaq 0x32bda(%rip), %rcx     # 0x44707
movl $0x63, %edx
callq 0xb180
leaq 0x32d82(%rip), %rdi     # 0x448c0
leaq 0x2fe9f(%rip), %rsi     # 0x419e4
leaq 0x32dac(%rip), %rcx     # 0x448f8
movl $0x71, %edx
callq 0xb180
leaq 0x30aff(%rip), %rdi     # 0x4265c
leaq 0x2fe80(%rip), %rsi     # 0x419e4
leaq 0x304eb(%rip), %rcx     # 0x42056
movl $0x6a, %edx
callq 0xb180
leaq 0x2da8f(%rip), %rdi     # 0x3f60b
leaq 0x2daa5(%rip), %rsi     # 0x3f628
leaq 0x2dab6(%rip), %rcx     # 0x3f640
movl $0x9b, %edx
callq 0xb180