// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rbx, -0x38(%rbp)
callq 0x1eae0
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
cmpq $0x0, 0x10(%r13)
je 0x1a0ab
cmpl $0x1, 0x40(%r13)
jne 0x1a0ab
movl $0x1, %r13d
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %r12, %rdi
movl $0x1, %esi
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
callq 0x1d7d8
leal -0x1(%rax), %ecx
testl %eax, %eax
cmovgl %ecx, %r15d
leal 0x1(%r15), %r12d
cmpl $0xa, %r12d
jb 0x1a1f5
movl $0x4, %r13d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x1a1ec
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x1a1f2
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x1a1f5
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r13d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1a069
addl $-0x3, %r13d
jmp 0x1a1f5
movq %r12, %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r12)
je 0x1a198
cmpl $0x5, 0x40(%r12)
jne 0x1a198
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1eae0
cmpl $0x5, 0x40(%r12)
je 0x1a13b
leaq -0xd8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movabsq $0x6c20746365707845, %rax # imm = 0x6C20746365707845
movq %rax, (%rbx)
movabsq $0x6c61726574696c20, %rax # imm = 0x6C61726574696C20
movq %rax, 0x6(%rbx)
movq $0xe, -0x8(%rbx)
movb $0x0, 0xe(%rbx)
leaq -0xe8(%rbp), %rsi
movq %r12, %rdi
callq 0x1de0a
movq -0xe8(%rbp), %rdi
cmpq %rbx, %rdi
movq -0x38(%rbp), %rbx
je 0x1a13b
callq 0xc280
leaq 0x18(%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
leaq -0x78(%rbp), %rdi
callq 0xc2e0
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 0xc360
movq (%r12), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1a190
callq 0xc280
movb $0x1, %r15b
jmp 0x1a251
movq (%r14), %rax
movq -0x18(%rax), %r12
leaq -0x158(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x2d321(%rip), %rsi     # 0x474d2
leaq 0x2d32f(%rip), %rdx     # 0x474e7
leaq -0x168(%rbp), %rdi
callq 0x1f29e
addq %r14, %r12
leaq -0x168(%rbp), %rsi
movq %r12, %rdi
callq 0x1de0a
movq -0x168(%rbp), %rdi
movb $0x1, %r15b
cmpq %r13, %rdi
je 0x1a251
callq 0xc280
jmp 0x1a251
addl $-0x2, %r13d
jmp 0x1a1f5
decl %r13d
movl %r13d, %esi
leaq -0xd8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq -0xe8(%rbp), %rdi
xorl %edx, %edx
callq 0xc340
leaq -0xe8(%rbp), %r13
movq (%r13), %rdi
movl 0x8(%r13), %esi
movl %r12d, %edx
callq 0x1f0e9
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0xc360
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1a242
callq 0xc280
cmpl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
sete %r15b
movq -0x38(%rbp), %rbx
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r12)
je 0x1a294
movq 0x8(%r12), %rax
movq 0x18(%r12), %rcx
cmpb $0x3d, (%rcx,%rax)
jne 0x1a294
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0x3d, %esi
callq 0x1df9e
jmp 0x1a376
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r12
cmpq $0x0, 0x38(%r14,%rax)
jne 0x1a2ec
movq (%r12), %rax
movq %r12, %rdi
callq *(%rax)
leaq 0x18(%r12), %rsi
testb %al, %al
je 0x1a2d4
movq 0x20(%r12), %rdx
leaq 0x33b0f(%rip), %rcx     # 0x4ddd4
movq %rsi, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0xc410
jmp 0x1a2e3
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
incq 0x38(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r12)
movq 0x8(%r12), %rcx
movq 0x20(%r12), %rax
leaq -0x1(%rax), %rdx
cmpq %rdx, %rcx
jne 0x1a312
movq 0x18(%r12), %rdx
cmpb $0xd, (%rdx,%rcx)
jne 0x1a312
incq %rcx
movq %rcx, 0x8(%r12)
movq (%r14), %rcx
movq -0x18(%rcx), %r13
cmpq %rax, 0x8(%r12)
jae 0x1a36b
leaq -0x138(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2d1b5(%rip), %rsi     # 0x474e8
leaq 0x2d1c7(%rip), %rdx     # 0x47501
leaq -0x148(%rbp), %rdi
callq 0x1f29e
addq %r14, %r13
leaq -0x148(%rbp), %rsi
movq %r13, %rdi
callq 0x1de0a
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x1a376
callq 0xc280
jmp 0x1a376
addq %r14, %r13
movq %r13, %rdi
callq 0x1e298
movss 0x2cf42(%rip), %xmm0    # 0x472c0
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 0x1eae0
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x1a436
movq 0x18(%r12), %rdx
addq 0x8(%r12), %rdx
xorl %esi, %esi
leaq 0x2d129(%rip), %rcx     # 0x47502
cmpq $0x6, %rsi
je 0x1a3f6
movb (%rdx,%rsi), %dil
cmpb (%rsi,%rcx), %dil
jne 0x1a436
incq %rsi
cmpq %rsi, %rax
jne 0x1a3d9
movq %rax, %rdx
jmp 0x1a3fb
movl $0x6, %edx
cmpb $0x1, (%rdx,%rcx)
sbbl $-0x1, %edx
cmpq %rdx, %rax
jne 0x1a436
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 0x1a68d
movq (%r14), %rax
movq -0x18(%rax), %r12
addq %r14, %r12
movq %r12, %rdi
callq 0x1eae0
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x1a4c2
movq 0x18(%r12), %rdx
addq 0x8(%r12), %rdx
xorl %esi, %esi
leaq 0x2d0a4(%rip), %rcx     # 0x47509
cmpq $0x7, %rsi
je 0x1a482
movb (%rdx,%rsi), %dil
cmpb (%rsi,%rcx), %dil
jne 0x1a4c2
incq %rsi
cmpq %rsi, %rax
jne 0x1a465
movq %rax, %rdx
jmp 0x1a487
movl $0x7, %edx
cmpb $0x1, (%rdx,%rcx)
sbbl $-0x1, %edx
cmpq %rdx, %rax
jne 0x1a4c2
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 0x1a68d
testb %r15b, %r15b
je 0x1a5d3
movq (%r14), %rax
movq -0x18(%rax), %r13
addq %r14, %r13
movq %r13, %rdi
callq 0x1eae0
movq 0x10(%r13), %rax
testq %rax, %rax
je 0x1a5d3
leaq -0x60(%rbp), %r12
movq 0x18(%r13), %rdx
addq 0x8(%r13), %rdx
xorl %esi, %esi
leaq 0x2d012(%rip), %rcx     # 0x47511
cmpq $0x6, %rsi
je 0x1a520
movb (%rdx,%rsi), %dil
cmpb (%rsi,%rcx), %dil
jne 0x1a5d3
incq %rsi
cmpq %rsi, %rax
jne 0x1a4ff
movq %rax, %rdx
jmp 0x1a525
movl $0x6, %edx
cmpb $0x1, (%rdx,%rcx)
sbbl $-0x1, %edx
cmpq %rdx, %rax
jne 0x1a5d3
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 0x1df9e
movq (%r14), %rax
movq -0x18(%rax), %rbx
movq 0x18(%r14,%rbx), %rsi
addq 0x8(%r14,%rbx), %rsi
leaq -0xe8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0xc0f0
movq 0x20(%r14,%rbx), %rax
movq %rax, 0x8(%r14,%rbx)
movq $0x0, 0x10(%r14,%rbx)
movl $0x0, 0x40(%r14,%rbx)
movq -0xe8(%rbp), %rsi
movq %r12, %rdi
callq 0x1e458
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq -0x38(%rbp), %rbx
jne 0x1a688
jmp 0x1a68d
movl $0x0, -0x78(%rbp)
movq (%r14), %rax
movq -0x28(%rax), %rsi
addq %r14, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x3fb92
cmpl $0x0, -0x48(%rbp)
je 0x1a614
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x1a60c
callq 0xc350
movq $0x0, -0x60(%rbp)
xorl %eax, %eax
movl %eax, -0x58(%rbp)
movl %eax, -0x48(%rbp)
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 0x1a68d
movq (%r14), %rax
movq -0x18(%rax), %r12
leaq -0x118(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2cec1(%rip), %rsi     # 0x47518
leaq 0x2cee8(%rip), %rdx     # 0x47546
leaq -0x128(%rbp), %rdi
callq 0x1f29e
addq %r14, %r12
leaq -0x128(%rbp), %rsi
movq %r12, %rdi
callq 0x1de0a
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0x1a68d
callq 0xc280
leaq -0xe8(%rbp), %rdi
leaq -0x78(%rbp), %rdx
movq %rbx, %rsi
callq 0x1e5c0
leaq -0xe8(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x1f338
movl %edx, %r15d
cmpl $0x0, -0x98(%rbp)
je 0x1a6e9
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x1a6db
callq 0xc350
movq $0x0, -0xb0(%rbp)
xorl %eax, %eax
movl %eax, -0xa8(%rbp)
movl %eax, -0x98(%rbp)
leaq -0xd8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a705
callq 0xc280
testb $0x1, %r15b
jne 0x1a75e
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq -0xf8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2ce23(%rip), %rsi     # 0x47547
leaq 0x2ce4d(%rip), %rdx     # 0x47578
leaq -0x108(%rbp), %rdi
callq 0x1f29e
addq %rbx, %r14
leaq -0x108(%rbp), %rsi
movq %r14, %rdi
callq 0x1de0a
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
movq -0x38(%rbp), %rbx
je 0x1a75e
callq 0xc280
cmpl $0x0, -0x48(%rbp)
je 0x1a782
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x1a77a
callq 0xc350
movq $0x0, -0x60(%rbp)
xorl %eax, %eax
movl %eax, -0x58(%rbp)
movl %eax, -0x48(%rbp)
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x1a816
jmp 0x1a83b
jmp 0x1a838
movq %rax, %r14
movq -0xe8(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x1a7fe
jmp 0x1a864
movq %rax, %r14
movq -0x168(%rbp), %rdi
cmpq %r13, %rdi
jne 0x1a7fe
jmp 0x1a864
jmp 0x1a861
movq %rax, %r14
movq -0x128(%rbp), %rdi
jmp 0x1a811
jmp 0x1a838
movq %rax, %r14
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x1a864
callq 0xc280
jmp 0x1a864
jmp 0x1a861
movq %rax, %r14
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
je 0x1a83b
callq 0xc280
jmp 0x1a83b
jmp 0x1a838
jmp 0x1a861
jmp 0x1a861
jmp 0x1a838
movq %rax, %r14
leaq -0xe8(%rbp), %rdi
callq 0x1e64e
jmp 0x1a83b
jmp 0x1a838
movq %rax, %r14
cmpl $0x0, -0x48(%rbp)
je 0x1a864
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x1a857
callq 0xc350
movq $0x0, -0x60(%rbp)
xorl %eax, %eax
movl %eax, -0x58(%rbp)
movl %eax, -0x48(%rbp)
jmp 0x1a864
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x80(%rbp), %rdi
je 0x1a876
callq 0xc280
movq %r14, %rdi
callq 0xc4e0