// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/main.cpp
// Function: generate_output_file_name(CGenCommandInfo&)
void generate_output_file_name(CGenCommandInfo& info) {
    if ((info.command == cmdEncode || info.command == cmdProcess) && info.output_file_name.empty()) {
        std::string output_file_name;
        if (info.command == cmdEncode) {
            switch(info.algorithm) {
                case algSHA1:
                    output_file_name = "sha1";
                    break;
                case algSHA256:
                    output_file_name = "sha256";
                    break;
                default:
                    assert(false);
            };
        
            output_file_name += "r" + std::to_string(info.rounds);
        
            generate_output_file_name_var(info, "M", output_file_name);
            generate_output_file_name_var(info, "H", output_file_name);

            if (info.mode == bal::fpmUnoptimized) {
                output_file_name += "_u";
            };
        } else if (info.command == cmdProcess) {
            // generate only if there is a conversion
            if (info.formula_type == ftCnf && (info.output_format == ofCnfVIGGraphML ||
                                               info.output_format == ofCnfWeightedVIGGraphML ||
                                               info.output_format == ofCnfVIGGEXF)) {
                output_file_name = info.input_file_name;
            };
        };
        if (!output_file_name.empty()) {
            switch(info.output_format) {
                case ofAnfPolybori:
                    output_file_name += ".anf";
                    break;
                case ofCnfDimacs:
                    output_file_name += ".cnf";
                    break;
                case ofCnfVIGGraphML:
                    output_file_name += ".graphml";
                    break;
                case ofCnfWeightedVIGGraphML:
                    output_file_name += "_w.graphml";
                    break;
                case ofCnfVIGGEXF:
                    output_file_name += ".gexf";
                    break;
                default:
                    assert(false);
            };
            info.output_file_name = output_file_name;
        };
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xa8, %rsp
movl (%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x1, %ecx
ja 0x2f45b
movq %rdi, %rbx
cmpq $0x0, 0x80(%rdi)
jne 0x2f45b
leaq -0x18(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
cmpl $0x1, %eax
jne 0x2f31c
movl 0x4(%rbx), %eax
cmpl $0x2, %eax
je 0x2f347
cmpl $0x1, %eax
jne 0x2f47e
leaq 0x8424(%rip), %rsi      # 0x3773e
jmp 0x2f34e
cmpl $0x0, 0x8(%rbx)
jne 0x2f41b
movl 0xc(%rbx), %eax
addl $-0x2, %eax
cmpl $0x2, %eax
ja 0x2f41b
leaq 0x58(%rbx), %rsi
leaq -0x28(%rbp), %rdi
callq 0xc150
jmp 0x2f41b
leaq 0x83fa(%rip), %rsi      # 0x37748
leaq -0x28(%rbp), %rdi
callq 0xc500
movl 0x48(%rbx), %esi
leaq -0xa8(%rbp), %rdi
callq 0x188f9
leaq 0x8f85(%rip), %rsi      # 0x382f2
leaq -0x48(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x1c480
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xc510
leaq -0x48(%rbp), %rdi
callq 0xc110
leaq -0xa8(%rbp), %rdi
callq 0xc110
leaq 0xb7b3(%rip), %rsi      # 0x3ab59
leaq -0x88(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0xc0e0
leaq -0x88(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0x2f16b
leaq -0x88(%rbp), %rdi
callq 0xc110
leaq 0xc168(%rip), %rsi      # 0x3b544
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rdx
callq 0xc0e0
leaq -0x68(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0x2f16b
leaq -0x68(%rbp), %rdi
callq 0xc110
cmpl $0x0, 0xa0(%rbx)
jne 0x2f41b
leaq 0xeb10(%rip), %rsi      # 0x3df22
leaq -0x28(%rbp), %rdi
callq 0xc4f0
cmpq $0x0, -0x20(%rbp)
je 0x2f452
movl 0xc(%rbx), %eax
cmpq $0x4, %rax
ja 0x2f465
leaq 0xe682(%rip), %rcx      # 0x3dab4
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq -0x28(%rbp), %rdi
callq 0xc4f0
addq $0x78, %rbx
leaq -0x28(%rbp), %rsi
movq %rbx, %rdi
callq 0xc150
leaq -0x28(%rbp), %rdi
callq 0xc110
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xa94f(%rip), %rdi      # 0x39dbb
leaq 0xea74(%rip), %rsi      # 0x3dee7
leaq 0xea76(%rip), %rcx      # 0x3def0
pushq $0x5c
jmp 0x2f495
leaq 0xa936(%rip), %rdi      # 0x39dbb
leaq 0xea5b(%rip), %rsi      # 0x3dee7
leaq 0xea5d(%rip), %rcx      # 0x3def0
pushq $0x37
popq %rdx
callq 0xc180
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
jmp 0x2f4cc
jmp 0x2f4d5
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
jmp 0x2f4cc
jmp 0x2f4d5
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0xc110
jmp 0x2f4c5
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0xc110
jmp 0x2f4d8
jmp 0x2f4d5
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0xc110
movq %rbx, %rdi
callq 0xc4c0