// File: /workspace/github_cpp_makefile_star2_O3/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 $0xd8, %rsp
movq %r9, -0x38(%rbp)
movl %r8d, -0x30(%rbp)
movl %ecx, -0x2c(%rbp)
movq %rdx, %r13
movl %esi, %r12d
movl %edi, %ebx
leaq -0xf8(%rbp), %r14
movq %r14, %rdi
callq 0x2622c
leaq 0x38fb7(%rip), %r15     # 0x58dc0
addq $0x10, %r15
movq %r15, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%r14)
movups %xmm0, 0x88(%r14)
movups %xmm0, 0x98(%r14)
movups %xmm0, 0xa8(%r14)
movq $0x0, 0xb8(%r14)
cmpl $0x2, %ebx
je 0x1fe97
movb 0x30(%rbp), %al
movb 0x28(%rbp), %r10b
movb 0x20(%rbp), %dil
movl %r12d, %esi
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
movl 0x38(%rbp), %r14d
movq -0x38(%rbp), %r9
movl 0x10(%rbp), %r12d
cmpl $0x1, %ebx
jne 0x1ff41
subq $0x8, %rsp
movzbl %al, %eax
movzbl %r10b, %r10d
movzbl %dil, %r11d
leaq -0xf8(%rbp), %rdi
movq %r13, %rdx
pushq %r14
pushq %rax
pushq %r10
pushq %r11
pushq %r12
callq 0x21c20
addq $0x30, %rsp
jmp 0x1fed7
subq $0x8, %rsp
movzbl 0x30(%rbp), %eax
movzbl 0x28(%rbp), %r10d
movzbl 0x20(%rbp), %r11d
leaq -0xf8(%rbp), %rdi
movl %r12d, %esi
movq %r13, %rdx
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
movq -0x38(%rbp), %r9
movl 0x38(%rbp), %ebx
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
movl 0x10(%rbp), %eax
pushq %rax
callq 0x22a04
addq $0x30, %rsp
movq %r15, -0xf8(%rbp)
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x1feec
callq 0xb280
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x1fefa
callq 0xb280
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x1ff08
callq 0xb280
leaq 0x3bcc1(%rip), %rax     # 0x5bbd0
addq $0x10, %rax
leaq -0xb8(%rbp), %rdi
movq %rax, -0x40(%rdi)
callq 0x262a2
leaq -0xe8(%rbp), %rdi
callq 0x26354
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27d5a(%rip), %rdi     # 0x47ca2
leaq 0x26556(%rip), %rsi     # 0x464a5
leaq 0x269a4(%rip), %rcx     # 0x468fa
movl $0x23d, %edx            # imm = 0x23D
callq 0xb180
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x237ec
movq %rbx, %rdi
callq 0xb4e0