// File: vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::CnfOptimizer::execute(bool, bal::FormulaProcessingMode)
bool CnfOptimizer::execute(const bool b_reindex_variables, const FormulaProcessingMode mode) {
        if (mode == fpmUnoptimized) {
            return assign_variable_values_unoptimized();
        } else {
            auto original_clauses_size = cnf_.clauses_size();
            
            bool result = base_execute(b_reindex_variables, mode);
            if (result) {
                std::cout << "Optimized: " << std::dec;
                std::cout << "(" << variables_.size() << ", " << original_clauses_size << ") -> ";
                std::cout << "(" << (signed long)cnf_.variables_size() - variables_.size() << ", ";
                std::cout << (signed long)cnf_.clauses_size() - original_clauses_size << ") -> ";
                std::cout << "(" << cnf_.variables_size() << ", " << cnf_.clauses_size() << ")";
                std::cout << std::endl;
            };
            return result;
        };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x15c68
movq -0x28(%rbp), %rdi
callq 0x16260
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15e45
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x78, %rdi
callq 0x164d0
movq -0x28(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movb -0x11(%rbp), %al
movl -0x18(%rbp), %edx
andb $0x1, %al
movzbl %al, %esi
callq 0x165a0
andb $0x1, %al
movb %al, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
je 0x15e3d
movq 0x6d2fa(%rip), %rdi     # 0x82fa0
leaq 0x482b5(%rip), %rsi     # 0x5df62
callq 0xd320
movq %rax, %rdi
leaq -0x59fc(%rip), %rsi     # 0x102c0
callq 0xd0f0
movq 0x6d2d8(%rip), %rdi     # 0x82fa0
leaq 0x4829f(%rip), %rsi     # 0x5df6e
callq 0xd320
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0xb8(%rax), %rdi
callq 0x102f0
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0xd420
movq %rax, %rdi
leaq 0x4c6c2(%rip), %rsi     # 0x623c2
callq 0xd320
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0xd420
movq %rax, %rdi
leaq 0x48256(%rip), %rsi     # 0x5df70
callq 0xd320
movq 0x6d27a(%rip), %rdi     # 0x82fa0
leaq 0x48241(%rip), %rsi     # 0x5df6e
callq 0xd320
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
movq %rcx, -0x48(%rbp)
movq 0xb8(%rax), %rdi
callq 0x102f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
movl %eax, %eax
subq %rax, %rsi
callq 0xd5c0
movq %rax, %rdi
leaq 0x4c647(%rip), %rsi     # 0x623c2
callq 0xd320
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x78, %rdi
callq 0x164d0
movl %eax, %eax
movl %eax, %esi
movl -0x1c(%rbp), %eax
subq %rax, %rsi
movq 0x6d1fe(%rip), %rdi     # 0x82fa0
callq 0xd5c0
movq %rax, %rdi
leaq 0x481bf(%rip), %rsi     # 0x5df70
callq 0xd320
movq 0x6d1e3(%rip), %rdi     # 0x82fa0
leaq 0x481aa(%rip), %rsi     # 0x5df6e
callq 0xd320
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x38(%rbp)
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq -0x38(%rbp), %rdi
movl %eax, %esi
callq 0xd420
movq %rax, %rdi
leaq 0x4c5cf(%rip), %rsi     # 0x623c2
callq 0xd320
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rdi
addq $0x78, %rdi
callq 0x164d0
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0xd420
movq %rax, %rdi
leaq 0x528be(%rip), %rsi     # 0x686e3
callq 0xd320
movq 0x6d16f(%rip), %rdi     # 0x82fa0
movq 0x6d148(%rip), %rsi     # 0x82f80
callq 0xd360
movb -0x1d(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq