// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/commands.cpp
// Function: bool process_impl<bal::Anf, false>(bal::Anf&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, CGenVariableInfo, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, CGenVariableInfo>>>&, bool, bal::FormulaProcessingMode)
bool process_impl(FORMULA& formula, CGenVariablesMap& variables_map,
                  const bool b_reindex_variables, const bal::FormulaProcessingMode mode) {
    static_assert(std::is_base_of<bal::Formula, FORMULA>::value, "FORMULA must be a descendant of bal::Formula");
    
    // all variable values will be mapped to a single array
    // conflicts of the constant values if any will be found on the way
    bal::VariablesArray variables(formula.variables_size(), 1);
    
    // a flag to determine the need for the compute route
    if (variables_require_computing(variables_map)) {
        std::cout << "Computing variables" << std::endl;
        variables.assign_sequence();
        variables_merge(variables, formula, variables_map, false, true);
        if (!evaluate(formula, variables)) {
            throw std::invalid_argument(ERROR_COMPUTE_INVALID_ENCODING);
        };
        variables_store_computed(formula, variables, variables_map);
    };
    
    // rebuild the variables with computed values if exist
    // all random values generated and all except options applied
    variables.assign_sequence();
    const bal::variables_size_t changes_count = variables_merge(variables, formula, variables_map,
                                                                true, mode != bal::fpmUnoptimized);
    if (!ONLY_IF_CHANGED || changes_count > 0) {
        if (changes_count > 0) {
            std::cout << "Assigning " << std::dec << changes_count << " variable(s) in the formula" << std::endl;
        };
        return process(formula, variables, b_reindex_variables, mode);
    } else {
        return true;
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x58(%rax)
leaq -0x40(%rbp), %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xe5fc
movq 0x18(%r15), %rax
leaq 0x8(%r15), %r12
cmpq %r12, %rax
je 0x2592e
cmpl $0x2, 0x40(%rax)
je 0x25893
movq %rax, %rdi
callq 0xb330
jmp 0x2587a
movq 0x36716(%rip), %r12     # 0x5bfb0
leaq 0x2417b(%rip), %rsi     # 0x49a1c
movl $0x13, %edx
movq %r12, %rdi
callq 0xb320
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0xb2a0
movsbl %al, %esi
movq 0x366e3(%rip), %rdi     # 0x5bfb0
callq 0xb030
movq %rax, %rdi
callq 0xb1a0
cmpl $0x0, -0x38(%rbp)
je 0x258fc
movl $0x3, %eax
movq -0x40(%rbp), %rcx
xorl %edx, %edx
movl %eax, (%rcx,%rdx,4)
incq %rdx
movl -0x38(%rbp), %esi
addl $0x2, %eax
cmpq %rsi, %rdx
jb 0x258eb
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x1f894
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xddb8
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1fc65
cmpl $0x0, -0x38(%rbp)
je 0x25950
movl $0x3, %eax
movq -0x40(%rbp), %rcx
xorl %edx, %edx
movl %eax, (%rcx,%rdx,4)
incq %rdx
movl -0x38(%rbp), %esi
addl $0x2, %eax
cmpq %rsi, %rdx
jb 0x2593f
xorl %r8d, %r8d
testl %r14d, %r14d
setne %r8b
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x1f894
movl %eax, %r15d
testl %eax, %eax
je 0x259f1
movq 0x36634(%rip), %r12     # 0x5bfb0
leaq 0x240cf(%rip), %rsi     # 0x49a52
movl $0xa, %edx
movq %r12, %rdi
callq 0xb320
movq (%r12), %rax
movq -0x18(%rax), %rax
movl 0x18(%r12,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r12,%rax)
movl %r15d, %esi
movq %r12, %rdi
callq 0xb190
movq %rax, %r15
leaq 0x240a0(%rip), %rsi     # 0x49a5d
movl $0x1b, %edx
movq %rax, %rdi
callq 0xb320
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb2a0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb030
movq %rax, %rdi
callq 0xb1a0
testl %r14d, %r14d
jne 0x25a8f
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x58(%rax)
cmpl -0x38(%rbp), %eax
jne 0x25aae
testl %eax, %eax
je 0x25a6c
movq -0x40(%rbp), %r14
movl $0x3, %r15d
xorl %r12d, %r12d
cmpl (%r14,%r12,4), %r15d
je 0x25a5e
movq %rbx, %rdi
callq 0xce64
movl (%r14,%r12,4), %esi
movq %rbx, %rdi
callq 0xd46a
movq 0xb0(%rbx), %rax
movl -0x4(%rax), %eax
movq 0x78(%rbx), %rcx
movq 0x90(%rbx), %rdx
movl (%rdx,%rax,4), %eax
movl (%rcx,%rax,4), %edx
andl $0x1, %edx
xorl %r15d, %edx
movl %edx, (%rcx,%rax,4)
movl -0x38(%rbp), %eax
incq %r12
movl %eax, %ecx
addl $0x2, %r15d
cmpq %rcx, %r12
jb 0x25a1d
cmpl $0x0, -0x28(%rbp)
je 0x25a80
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x25a80
callq 0xb350
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23fe3(%rip), %rdi     # 0x49a79
leaq 0x21bc8(%rip), %rsi     # 0x47665
leaq 0x23fec(%rip), %rcx     # 0x49a90
movl $0x6c, %edx
callq 0xb180
leaq 0x24035(%rip), %rdi     # 0x49aea
leaq 0x21ba9(%rip), %rsi     # 0x47665
leaq 0x23fcd(%rip), %rcx     # 0x49a90
movl $0x6d, %edx
callq 0xb180
jmp 0x25ad1
jmp 0x25ad1
movq %rax, %rbx
cmpl $0x0, -0x28(%rbp)
je 0x25ae8
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x25ae8
callq 0xb350
movq %rbx, %rdi
callq 0xb4e0