// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/commands.cpp
// Function: encode_anf(CGenAlgorithm, unsigned int, 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>>>&, unsigned int, unsigned int, char const*, CGenOutputFormat, CGenTraceFormat, bool, bool, bool, bal::FormulaProcessingMode)
void encode_anf(const CGenAlgorithm algorithm, const uint32_t rounds,
                CGenVariablesMap& variables_map,
                const uint32_t add_max_args, const uint32_t xor_max_args,
                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 bool b_assign_after_encoding, const bal::FormulaProcessingMode mode) {    
    bal::Anf anf;
    
    switch(algorithm) {
        case algSHA1:
            encode_impl<acl::SHA1<bal::Literal<bal::Anf>>>(anf, rounds, variables_map, add_max_args, xor_max_args,
                                                       output_file_name, output_format,
                                                       b_reindex_variables, b_normalize_variables,
                                                       b_assign_after_encoding, mode);
            break;
        case algSHA256:
            encode_impl<acl::SHA256<bal::Literal<bal::Anf>>>(anf, rounds, variables_map, add_max_args, xor_max_args,
                                                         output_file_name, output_format,
                                                         b_reindex_variables, b_normalize_variables,
                                                         b_assign_after_encoding, mode);
            break;
        default:
            assert(false);
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, -0x30(%rbp)
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r13
movl %esi, %r14d
movl %edi, %ebx
leaq -0xf0(%rbp), %rdi
callq 0x1c5f0
cmpl $0x2, %ebx
je 0x1b5d8
movb 0x30(%rbp), %al
movb 0x28(%rbp), %r10b
movb 0x20(%rbp), %dil
movq -0x30(%rbp), %r9
cmpl $0x1, %ebx
jne 0x1b635
subq $0x8, %rsp
movzbl %al, %eax
movzbl %r10b, %r10d
movzbl %dil, %r11d
leaq -0xf0(%rbp), %rdi
movl %r14d, %esi
movq %r13, %rdx
movl %r12d, %ecx
movl %r15d, %r8d
movl 0x38(%rbp), %ebx
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
movl 0x10(%rbp), %eax
pushq %rax
callq 0x1c637
addq $0x30, %rsp
jmp 0x1b617
subq $0x8, %rsp
movzbl 0x30(%rbp), %eax
movzbl 0x28(%rbp), %r10d
movzbl 0x20(%rbp), %r11d
leaq -0xf0(%rbp), %rdi
movl %r14d, %esi
movq %r13, %rdx
movl %r12d, %ecx
movl %r15d, %r8d
movq -0x30(%rbp), %r9
movl 0x38(%rbp), %ebx
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
movl 0x10(%rbp), %eax
pushq %rax
callq 0x1cf00
addq $0x30, %rsp
leaq -0xf0(%rbp), %rdi
callq 0x1d7d0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e77f(%rip), %rdi     # 0x39dbb
leaq 0x1cda2(%rip), %rsi     # 0x383e5
leaq 0x1d1f0(%rip), %rcx     # 0x3883a
movl $0x23d, %edx            # imm = 0x23D
callq 0xc180
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x1d7d0
movq %rbx, %rdi
callq 0xc4c0