// File: /workspace/github_cpp_makefile_star2_O1/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 0xf76c
movq 0x18(%r15), %rax
leaq 0x8(%r15), %r12
cmpq %r12, %rax
setne %cl
je 0x27090
cmpl $0x2, 0x40(%rax)
je 0x27090
movq %rax, %rdi
callq 0xc330
jmp 0x27078
testb %cl, %cl
je 0x27133
movq 0x37f09(%rip), %r12     # 0x5efa8
leaq 0x24a00(%rip), %rsi     # 0x4baa6
movl $0x13, %edx
movq %r12, %rdi
callq 0xc320
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0xc2a0
movsbl %al, %esi
movq 0x37ed6(%rip), %rdi     # 0x5efa8
callq 0xc030
movq %rax, %rdi
callq 0xc1a0
cmpl $0x0, -0x38(%rbp)
je 0x27101
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 0x270f0
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x210c8
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0xee82
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x2135c
cmpl $0x0, -0x38(%rbp)
je 0x27155
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 0x27144
xorl %r8d, %r8d
testl %r14d, %r14d
setne %r8b
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x210c8
movl %eax, %r15d
testl %eax, %eax
je 0x271f6
movq 0x37e27(%rip), %r12     # 0x5efa8
leaq 0x24954(%rip), %rsi     # 0x4badc
movl $0xa, %edx
movq %r12, %rdi
callq 0xc320
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 0xc190
movq %rax, %r15
leaq 0x24925(%rip), %rsi     # 0x4bae7
movl $0x1b, %edx
movq %rax, %rdi
callq 0xc320
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xc2a0
movsbl %al, %esi
movq %r15, %rdi
callq 0xc030
movq %rax, %rdi
callq 0xc1a0
testl %r14d, %r14d
jne 0x272a4
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x58(%rax)
movl -0x38(%rbp), %ecx
cmpl %ecx, %eax
jne 0x272c3
testl %ecx, %ecx
je 0x27271
movq -0x40(%rbp), %r14
movl $0x3, %r15d
xorl %r12d, %r12d
cmpl (%r14,%r12,4), %r15d
je 0x27262
movq %rbx, %rdi
callq 0xe2c4
movl (%r14,%r12,4), %esi
movq %rbx, %rdi
callq 0xe7f0
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)
incq %r12
movl -0x38(%rbp), %eax
addl $0x2, %r15d
cmpq %rax, %r12
jb 0x27224
cmpl $0x0, -0x28(%rbp)
je 0x27295
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x2728d
callq 0xc350
movq $0x0, -0x40(%rbp)
xorl %eax, %eax
movl %eax, -0x38(%rbp)
movl %eax, -0x28(%rbp)
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24858(%rip), %rdi     # 0x4bb03
leaq 0x223a3(%rip), %rsi     # 0x49655
leaq 0x24861(%rip), %rcx     # 0x4bb1a
movl $0x6c, %edx
callq 0xc180
leaq 0x248aa(%rip), %rdi     # 0x4bb74
leaq 0x22384(%rip), %rsi     # 0x49655
leaq 0x24842(%rip), %rcx     # 0x4bb1a
movl $0x6d, %edx
callq 0xc180
jmp 0x272e6
jmp 0x272e6
movq %rax, %rbx
cmpl $0x0, -0x28(%rbp)
je 0x272fc
leaq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xc895
movq %rbx, %rdi
callq 0xc4e0