// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/commandline.cpp
// Function: CGenCommandLineReader::parse_variable(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>>>&, CGenCommand)
std::string CGenCommandLineReader::parse_variable(CGenVariablesMap& variables_map, const CGenCommand command) {
    std::string variable_name;
    bal::variableid_t variable_id = bal::VARIABLEID_UNASSIGNED;
    
    if (is_token(TextReader::ttDec)) {
        // binary variable
        variable_id = bal::variable_t__from_uint(read_uint32(bal::VARIABLEID_MIN + 1, bal::VARIABLEID_MAX + 1));
        variable_name = std::to_string(variable_id + 1);
    } else if (is_token(TextReader::ttLiteral)) {
        // named variable
        variable_name = read_literal();
    } else {
        parse_error(ERROR_INVALID_VARIABLE_NAME);
    };
    
    if (is_symbol('=')) { // value immediately after =
        read_symbol('=');
    } else if (is_eol()) { // value as a next argument
        read_eol();
    } else {
        parse_error(ERROR_MISSING_VARIABLE_VALUE);
    };
    
    CGenVariableInfo variable_value;
    
    if (is_token("random")) {
        skip_token();
        variable_value.mode = vmRandom;
    } else if (is_token("compute")) {
        skip_token();
        variable_value.mode = vmCompute;
    } else if (variable_id == bal::VARIABLEID_UNASSIGNED && is_token("string")) {
        skip_token();
        variable_value.mode = vmValue;
        read_symbol(':');
        // take the rest of the argument as a value
        // needed because the shell removes quotes from arguments
        variable_value.data = read_until_eol().c_str();
    } else {
        variable_value.mode = vmValue;
        variable_value.data = read_variable_value();
        
        if (variable_id != bal::VARIABLEID_UNASSIGNED && variable_value.data.size() != 1) {
            // binary variable requires binary value
            parse_error(ERROR_INVALID_BINARY_VALUE);
        };
    };
    
    auto r = variables_map.insert({variable_name, variable_value});
    if (!r.second) {
        parse_error(ERROR_DUPLICATED_VARIABLE_NAME);
    };
    
    return variable_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, -0x88(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x80(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq -0x18(%rax), %r13
addq %rsi, %r13
movq %r13, %rdi
callq 0x1d33a
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
cmpq $0x0, 0x10(%r13)
je 0x18aab
cmpl $0x1, 0x40(%r13)
jne 0x18aab
movl $0x1, %r13d
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %r12, %rdi
movl $0x1, %esi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1c066
movq %rbx, -0x30(%rbp)
leal -0x1(%rax), %ecx
testl %eax, %eax
setle %bl
cmovlel %r15d, %ecx
leal 0x1(%rcx), %r12d
cmpl $0x9, %ecx
jb 0x18bf2
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x18be9
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x18bef
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x18bf2
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x18a69
addl $-0x3, %r13d
jmp 0x18bf2
movq %r12, %rdi
callq 0x1d33a
cmpq $0x0, 0x10(%r12)
je 0x18b95
cmpl $0x5, 0x40(%r12)
jne 0x18b95
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1d33a
cmpl $0x5, 0x40(%r12)
je 0x18b38
leaq -0xd8(%rbp), %r15
movq %r15, -0x10(%r15)
movabsq $0x6c20746365707845, %rax # imm = 0x6C20746365707845
movq %rax, (%r15)
movabsq $0x6c61726574696c20, %rax # imm = 0x6C61726574696C20
movq %rax, 0x6(%r15)
movq $0xe, -0x8(%r15)
movb $0x0, 0xe(%r15)
leaq -0xe8(%rbp), %rsi
movq %r12, %rdi
callq 0x1c690
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x18b38
callq 0xb280
leaq 0x18(%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
leaq -0x78(%rbp), %rdi
callq 0xb2e0
movq 0x10(%r12), %rax
addq %rax, 0x8(%r12)
movq $0x0, 0x10(%r12)
movl $0x0, 0x40(%r12)
leaq -0x78(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb360
movq (%r12), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x18b8d
callq 0xb280
movb $0x1, %r15b
jmp 0x18c46
movq (%r14), %rax
movq -0x18(%rax), %r12
leaq -0x158(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x2c934(%rip), %rsi     # 0x454e2
leaq 0x2c942(%rip), %rdx     # 0x454f7
leaq -0x168(%rbp), %rdi
callq 0x1dab2
addq %r14, %r12
leaq -0x168(%rbp), %rsi
movq %r12, %rdi
callq 0x1c690
movq -0x168(%rbp), %rdi
movb $0x1, %r15b
cmpq %r13, %rdi
je 0x18c46
callq 0xb280
jmp 0x18c46
addl $-0x2, %r13d
jmp 0x18bf2
decl %r13d
movl %r13d, %esi
leaq -0xd8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0xe8(%rbp), %rdi
xorl %edx, %edx
callq 0xb340
leaq -0xe8(%rbp), %r13
movq (%r13), %rdi
movl 0x8(%r13), %esi
movl %r12d, %edx
callq 0x1d8f9
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0xb360
movq (%r13), %rdi
cmpq %r15, %rdi
je 0x18c3f
callq 0xb280
movl %ebx, %r15d
movq -0x30(%rbp), %rbx
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1d33a
cmpq $0x0, 0x10(%r12)
je 0x18c89
movq 0x8(%r12), %rax
movq 0x18(%r12), %rcx
cmpb $0x3d, (%rcx,%rax)
jne 0x18c89
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0x3d, %esi
callq 0x1c824
jmp 0x18d6f
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r12
cmpq $0x0, 0x38(%r14,%rax)
je 0x18ca3
movq 0x8(%r12), %rax
jmp 0x18cea
movq (%r12), %rax
movq %r12, %rdi
callq *(%rax)
leaq 0x18(%r12), %rsi
testb %al, %al
je 0x18cd0
movq 0x20(%r12), %rdx
leaq 0x33013(%rip), %rcx     # 0x4bcd4
movq %rsi, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0xb410
jmp 0x18cdf
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
incq 0x38(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r12)
xorl %eax, %eax
movq 0x20(%r12), %rdx
leaq -0x1(%rdx), %rcx
cmpq %rcx, %rax
jne 0x18d0d
movq 0x18(%r12), %rcx
cmpb $0xd, (%rcx,%rax)
movq (%r14), %rcx
jne 0x18d10
movq %rdx, 0x8(%r12)
jmp 0x18d63
movq (%r14), %rcx
cmpq %rdx, %rax
jae 0x18d63
movq -0x18(%rcx), %r12
leaq -0x138(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x2c7cd(%rip), %rsi     # 0x454f8
leaq 0x2c7df(%rip), %rdx     # 0x45511
leaq -0x148(%rbp), %rdi
callq 0x1dab2
addq %r14, %r12
leaq -0x148(%rbp), %rsi
movq %r12, %rdi
callq 0x1c690
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x18d6f
callq 0xb280
jmp 0x18d6f
movq -0x18(%rcx), %rdi
addq %r14, %rdi
callq 0x1cb0e
movss 0x2c559(%rip), %xmm0    # 0x452d0
leaq -0x48(%rbp), %rax
movups %xmm0, -0x2c(%rax)
movq $0x0, -0x18(%rax)
movl $0x0, -0x10(%rax)
movq %rax, -0x8(%rax)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1d33a
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x18e2e
movq 0x18(%r12), %rcx
addq 0x8(%r12), %rcx
xorl %esi, %esi
leaq 0x2c740(%rip), %rdx     # 0x45512
cmpq $0x6, %rsi
je 0x18df5
movb (%rcx,%rsi), %dil
cmpb (%rsi,%rdx), %dil
jne 0x18e2e
incq %rsi
cmpq %rsi, %rax
jne 0x18dd2
cmpb $0x1, (%rax,%rdx)
movl %eax, %ecx
sbbl $-0x1, %ecx
jmp 0x18dfa
movl $0x6, %ecx
cmpq %rcx, %rax
jne 0x18e2e
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x10(%r14,%rax), %rcx
addq %rcx, 0x8(%r14,%rax)
movq $0x0, 0x10(%r14,%rax)
movl $0x0, 0x40(%r14,%rax)
movl $0x1, -0x78(%rbp)
jmp 0x1906f
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1d33a
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x18eb9
movq 0x18(%r12), %rcx
addq 0x8(%r12), %rcx
xorl %esi, %esi
leaq 0x2c6bc(%rip), %rdx     # 0x45519
cmpq $0x7, %rsi
je 0x18e80
movb (%rcx,%rsi), %dil
cmpb (%rsi,%rdx), %dil
jne 0x18eb9
incq %rsi
cmpq %rsi, %rax
jne 0x18e5d
cmpb $0x1, (%rax,%rdx)
movl %eax, %ecx
sbbl $-0x1, %ecx
jmp 0x18e85
movl $0x7, %ecx
cmpq %rcx, %rax
jne 0x18eb9
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x10(%r14,%rax), %rcx
addq %rcx, 0x8(%r14,%rax)
movq $0x0, 0x10(%r14,%rax)
movl $0x0, 0x40(%r14,%rax)
movl $0x2, -0x78(%rbp)
jmp 0x1906f
testb %r15b, %r15b
je 0x18fc5
movq (%r14), %rax
movq -0x18(%rax), %r13
addq %r14, %r13
movq %r13, %rdi
callq 0x1d33a
movq 0x10(%r13), %rax
testq %rax, %rax
je 0x18fc5
leaq -0x60(%rbp), %r12
movq 0x18(%r13), %rcx
addq 0x8(%r13), %rcx
xorl %esi, %esi
leaq 0x2c62b(%rip), %rdx     # 0x45521
cmpq $0x6, %rsi
je 0x18f1d
movb (%rcx,%rsi), %dil
cmpb (%rsi,%rdx), %dil
jne 0x18fc5
incq %rsi
cmpq %rsi, %rax
jne 0x18ef6
cmpb $0x1, (%rax,%rdx)
movl %eax, %ecx
sbbl $-0x1, %ecx
jmp 0x18f22
movl $0x6, %ecx
cmpq %rcx, %rax
jne 0x18fc5
movq (%r14), %rax
movq -0x18(%rax), %rcx
movq 0x10(%r14,%rcx), %rdx
addq %rdx, 0x8(%r14,%rcx)
movq $0x0, 0x10(%r14,%rcx)
xorl %edx, %edx
movl %edx, 0x40(%r14,%rcx)
movl %edx, -0x78(%rbp)
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0x3a, %esi
callq 0x1c824
movq (%r14), %rax
movq -0x18(%rax), %r15
movq 0x18(%r14,%r15), %rsi
addq 0x8(%r14,%r15), %rsi
leaq -0xe8(%rbp), %rdi
leaq -0x31(%rbp), %rdx
callq 0xb0f0
movq 0x20(%r14,%r15), %rax
movq %rax, 0x8(%r14,%r15)
movq $0x0, 0x10(%r14,%r15)
movl $0x0, 0x40(%r14,%r15)
movq -0xe8(%rbp), %rsi
movq %r12, %rdi
callq 0x1ccd8
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x1906a
jmp 0x1906f
movl $0x0, -0x78(%rbp)
movq (%r14), %rax
movq -0x28(%rax), %rsi
addq %r14, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x3db6c
cmpl $0x0, -0x48(%rbp)
je 0x18ff6
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x18ff6
callq 0xb350
movq -0xe8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, -0x58(%rbp)
cmpl $0x1, %eax
sete %al
orb %al, %r15b
jne 0x1906f
movq (%r14), %rax
movq -0x18(%rax), %r12
leaq -0x118(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c4ef(%rip), %rsi     # 0x45528
leaq 0x2c516(%rip), %rdx     # 0x45556
leaq -0x128(%rbp), %rdi
callq 0x1dab2
addq %r14, %r12
leaq -0x128(%rbp), %rsi
movq %r12, %rdi
callq 0x1c690
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0x1906f
callq 0xb280
leaq -0xe8(%rbp), %rdi
leaq -0x78(%rbp), %rdx
movq %rbx, %rsi
callq 0x1ce2e
leaq -0xe8(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x1db50
movl %edx, %r15d
cmpl $0x0, -0x98(%rbp)
je 0x190c7
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x190bd
callq 0xb350
movq $0x0, -0xb0(%rbp)
movl $0x0, -0x98(%rbp)
leaq -0xd8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x190e3
callq 0xb280
testb $0x1, %r15b
jne 0x19138
movq (%r14), %rax
movq -0x18(%rax), %r12
leaq -0xf8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c455(%rip), %rsi     # 0x45557
leaq 0x2c47f(%rip), %rdx     # 0x45588
leaq -0x108(%rbp), %rdi
callq 0x1dab2
addq %r12, %r14
leaq -0x108(%rbp), %rsi
movq %r14, %rdi
callq 0x1c690
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
je 0x19138
callq 0xb280
cmpl $0x0, -0x48(%rbp)
je 0x1914c
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x1914c
callq 0xb350
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, -0x30(%rbp)
movq %rax, %r14
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x191f4
jmp 0x19221
jmp 0x1921a
movq %rbx, -0x30(%rbp)
movq %rax, %r14
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x191c6
jmp 0x19246
movq %rbx, -0x30(%rbp)
movq %rax, %r14
movq -0x168(%rbp), %rdi
jmp 0x191bd
jmp 0x1923f
movq %rbx, -0x30(%rbp)
movq %rax, %r14
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0x19246
callq 0xb280
jmp 0x19246
jmp 0x1923f
movq %rbx, -0x30(%rbp)
movq %rax, %r14
movq -0x128(%rbp), %rdi
jmp 0x191ef
jmp 0x1921a
movq %rbx, -0x30(%rbp)
movq %rax, %r14
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
je 0x19221
callq 0xb280
jmp 0x19221
jmp 0x1921a
jmp 0x1923f
jmp 0x19243
jmp 0x1921a
movq %rbx, -0x30(%rbp)
movq %rax, %r14
leaq -0xe8(%rbp), %rdi
callq 0x1cea4
jmp 0x19221
jmp 0x1921a
movq %rbx, -0x30(%rbp)
movq %rax, %r14
cmpl $0x0, -0x48(%rbp)
je 0x19246
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x19246
callq 0xb350
movq $0x0, -0x60(%rbp)
jmp 0x19246
movq %rbx, -0x30(%rbp)
movq %rax, %r14
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x80(%rbp), %rdi
je 0x19258
callq 0xb280
movq %r14, %rdi
callq 0xb4e0