// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/commands.cpp
// Function: process_cnf(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>>>&, char const*, char const*, CGenOutputFormat, CGenTraceFormat, bool, bool, bal::FormulaProcessingMode)
void process_cnf(CGenVariablesMap& variables_map,
            const char* const input_file_name, const char* const output_file_name,
            const CGenOutputFormat output_format, const CGenTraceFormat trace_format,
            const bool b_reindex_variables, const bool b_normalize_variables,
            const bal::FormulaProcessingMode mode) {
    bal::Cnf cnf;
    load_impl<bal::Cnf, bal::DimacsStreamReader>(cnf, input_file_name);
    variables_define(cnf, variables_map);
    
    bool is_valid = true;
    
    __CNF_TRACE_INITIALIZE(trace_format, output_file_name);
    is_valid = process_impl(cnf, variables_map, b_reindex_variables, mode);
    __CNF_TRACE_FINIALIZE;
    
    if (is_valid && b_normalize_variables) {
        is_valid = normalize_variables(cnf, b_reindex_variables);
    };
    
    if (is_valid) {
        if (std::strlen(output_file_name) != 0) {
            save(cnf, output_file_name, output_format);
        };
    } else {
        throw std::invalid_argument("Processing failed");
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r9d, -0x38(%rbp)
movl %r8d, %r13d
movl %ecx, -0x34(%rbp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq -0x110(%rbp), %r14
movq %r14, %rdi
callq 0x2622c
leaq -0x90(%rbp), %rax
xorl %ecx, %ecx
movq %rcx, (%rax)
movl %ecx, 0x8(%rax)
leaq -0x78(%rbp), %rdx
movq %rdx, -0x8(%rdx)
movl %ecx, (%rdx)
movq %rax, 0x8(%rdx)
movq %rcx, 0x10(%rdx)
movl %ecx, 0x18(%rdx)
leaq -0x50(%rbp), %rdx
movq %rdx, -0x8(%rdx)
movl %ecx, (%rdx)
movaps 0x25893(%rip), %xmm0    # 0x462a0
movups %xmm0, 0x8(%rdx)
leaq 0x39d90(%rip), %rcx     # 0x5a7a8
movq %rcx, -0x80(%rax)
leaq 0x39dfd(%rip), %rax     # 0x5a820
movq %rax, -0x48(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x25af0
leaq -0x110(%rbp), %rdi
movq %r12, %rsi
callq 0x1ecb2
movl %r13d, %edi
movq %r15, %r14
movq %r15, %rsi
callq 0x1ff77
movl 0x18(%rbp), %ecx
movzbl -0x38(%rbp), %r15d
leaq -0x110(%rbp), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x25dd9
movl %eax, %r12d
leaq -0x30(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x10e00
movb 0x10(%rbp), %bl
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x20aa5
movl 0x8(%rdi), %eax
cmpl $0x1, %eax
ja 0x20a98
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x20a9d
decl %eax
movl %eax, 0x8(%rdi)
movq $0x0, -0x30(%rbp)
andb %r12b, %bl
cmpb $0x1, %bl
jne 0x20abf
leaq -0x110(%rbp), %rdi
movl %r15d, %esi
callq 0x2602d
movl %eax, %r12d
testb %r12b, %r12b
je 0x20b81
cmpb $0x0, (%r14)
je 0x20ae0
leaq -0x110(%rbp), %rdi
movq %r14, %rsi
movl -0x34(%rbp), %edx
callq 0x1e6c5
leaq 0x39e21(%rip), %rax     # 0x5a908
movq %rax, -0x98(%rbp)
cmpl $0x0, -0x50(%rbp)
je 0x20b11
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x20b0a
callq 0xb350
movq $0x0, -0x68(%rbp)
movl $0x0, -0x50(%rbp)
movl $0x0, -0x60(%rbp)
cmpl $0x0, -0x78(%rbp)
je 0x20b41
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x20b3a
callq 0xb350
movq $0x0, -0x90(%rbp)
movl $0x0, -0x78(%rbp)
leaq -0xd0(%rbp), %rdi
movl $0x0, 0x48(%rdi)
leaq 0x3b07a(%rip), %rax     # 0x5bbd0
addq $0x10, %rax
movq %rax, -0x40(%rdi)
callq 0x262a2
leaq -0x100(%rbp), %rdi
callq 0x26354
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0xb130
movq %rax, %r14
leaq 0x25fb4(%rip), %rsi     # 0x46b49
movq %rax, %rdi
callq 0xb520
movq 0x3b434(%rip), %rsi     # 0x5bfd8
movq 0x3b415(%rip), %rdx     # 0x5bfc0
movq %r14, %rdi
callq 0xb4b0
movq %rax, %rbx
movq %r14, %rdi
callq 0xb1e0
jmp 0x20bdc
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x20bdc
leaq -0x30(%rbp), %rsi
callq 0xb6ef
jmp 0x20bdc
jmp 0x20bd9
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x254ac
movq %rbx, %rdi
callq 0xb4e0