// File: vsklad[P]cgen/commandline.cpp
// Function: CGenCommandLineReader::parse_variable_pad(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>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void CGenCommandLineReader::parse_variable_pad(CGenVariablesMap& variables_map, const std::string& variable_name) {
    if (variable_name.empty()) {
        parse_error(ERROR_PAD_MUST_FOLLOW_DEFINITION);
    };
    if (is_binary_variable_name(variable_name)) {
        parse_error(ERROR_BINARY_VARIABLE_PAD_INCOMPATIBLE);
    };
    
    CGenVariableInfo& variable_value = variables_map.find(variable_name)->second;
    
    if (variable_value.mode != vmValue) {
        parse_error(ERROR_PAD_MUST_FOLLOW_VALUE);
    };
    
    skip_token();
    read_symbol(':');
    if (is_token("sha1") || is_token("SHA1")) {
        variable_value.data = acl::SHA1<bal::Literal<bal::Cnf>>::pad_message(variable_value.data.data(),
                                                                             variable_value.data.size());
        skip_token();
    } else if (is_token("sha256") || is_token("SHA256")) {
        variable_value.data = acl::SHA256<bal::Literal<bal::Cnf>>::pad_message(variable_value.data.data(),
                                                                               variable_value.data.size());
        skip_token();
    } else {
        parse_error(ERROR_PAD_UNKNOWN_VALUE);
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd540
testb $0x1, %al
jne 0x22d64
jmp 0x22dfc
movq -0x120(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0xd5b0
movq -0x128(%rbp), %rdx
leaq 0x3e99d(%rip), %rsi     # 0x61737
leaq -0x38(%rbp), %rdi
callq 0xd440
jmp 0x22da5
movq -0x130(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x262a0
jmp 0x22db7
leaq -0x38(%rbp), %rdi
callq 0xd1b0
leaq -0x39(%rbp), %rdi
callq 0xd370
jmp 0x22dfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x22dee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd1b0
leaq -0x39(%rbp), %rdi
callq 0xd370
jmp 0x231c0
movq -0x18(%rbp), %rdi
callq 0x26c60
testb $0x1, %al
jne 0x22e0e
jmp 0x22ea6
movq -0x120(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0xd5b0
movq -0x138(%rbp), %rdx
leaq 0x3e92f(%rip), %rsi     # 0x61773
leaq -0x70(%rbp), %rdi
callq 0xd440
jmp 0x22e4f
movq -0x140(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x262a0
jmp 0x22e61
leaq -0x70(%rbp), %rdi
callq 0xd1b0
leaq -0x71(%rbp), %rdi
callq 0xd370
jmp 0x22ea6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x22e98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xd1b0
leaq -0x71(%rbp), %rdi
callq 0xd370
jmp 0x231c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x26cc0
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x26cf0
addq $0x20, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpl $0x0, (%rax)
je 0x22f88
movq -0x120(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0xd5b0
movq -0x148(%rbp), %rdx
leaq 0x3e88f(%rip), %rsi     # 0x617a3
leaq -0xa8(%rbp), %rdi
callq 0xd440
jmp 0x22f22
movq -0x150(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x262a0
jmp 0x22f37
leaq -0xa8(%rbp), %rdi
callq 0xd1b0
leaq -0xa9(%rbp), %rdi
callq 0xd370
jmp 0x22f88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x22f77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xd1b0
leaq -0xa9(%rbp), %rdi
callq 0xd370
jmp 0x231c0
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x26900
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0x3a, %esi
callq 0x26430
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
leaq 0x3e82e(%rip), %rsi     # 0x617f6
callq 0x26810
testb $0x1, %al
jne 0x22ff1
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
leaq 0x3e815(%rip), %rsi     # 0x617fb
callq 0x26810
testb $0x1, %al
jne 0x22ff1
jmp 0x2305f
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
callq 0x10310
movq %rax, -0x158(%rbp)
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
callq 0x102f0
movq -0x158(%rbp), %rsi
movl %eax, %edx
leaq -0xd0(%rbp), %rdi
callq 0x26d10
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
leaq -0xd0(%rbp), %rsi
callq 0x26b30
leaq -0xd0(%rbp), %rdi
callq 0x10850
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x26900
jmp 0x231b7
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
leaq 0x3e78c(%rip), %rsi     # 0x61800
callq 0x26810
testb $0x1, %al
jne 0x2309d
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
leaq 0x3e775(%rip), %rsi     # 0x61807
callq 0x26810
testb $0x1, %al
jne 0x2309d
jmp 0x2310b
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
callq 0x10310
movq %rax, -0x160(%rbp)
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
callq 0x102f0
movq -0x160(%rbp), %rsi
movl %eax, %edx
leaq -0xf0(%rbp), %rdi
callq 0x26d10
movq -0x80(%rbp), %rdi
addq $0x18, %rdi
leaq -0xf0(%rbp), %rsi
callq 0x26b30
leaq -0xf0(%rbp), %rdi
callq 0x10850
movq -0x120(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x26900
jmp 0x231b5
movq -0x120(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x170(%rbp)
leaq -0x111(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0xd5b0
movq -0x168(%rbp), %rdx
leaq 0x3e6ca(%rip), %rsi     # 0x6180e
leaq -0x110(%rbp), %rdi
callq 0xd440
jmp 0x23152
movq -0x170(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x262a0
jmp 0x23167
leaq -0x110(%rbp), %rdi
callq 0xd1b0
leaq -0x111(%rbp), %rdi
callq 0xd370
jmp 0x231b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x231a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xd1b0
leaq -0x111(%rbp), %rdi
callq 0xd370
jmp 0x231c0
jmp 0x231b7
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xd5a0
nopl (%rax)