// File: /workspace/github_cpp_makefile_star2_O1/vsklad[P]cgen/./bal/variables/variablesio.cpp
// Function: bal::VariableTextReader::read_variable_element_item_(bal::Container<unsigned int>&)
inline void VariableTextReader::read_variable_element_item_(Container<literalid_t>& value) {
        container_size_t item_size = 1;
        if (is_token(TextReader::ttHex) || is_token(TextReader::ttBin)) {
            const char* const token = TextReader::get_current_token();
            const size_t token_len = get_current_token_len();
            _assert_level_1(token_len > 2 && token_len <= CONTAINER_SIZE_MAX); // prefix
            
            item_size = (container_size_t)token_len - 2;
            if (is_token(TextReader::ttHex)) {
                item_size <<= 2;
            };
            value.reserve(item_size);
            literalid_t* p_literal = value.data_ + value.size_;
            
            if (is_token(TextReader::ttHex)) {
                for (auto i = 2; i < token_len; i++) {
                    char h = _hex_value(token[i]);
                    p_literal[0] = literal_t__constant(h & 0b1000);
                    p_literal[1] = literal_t__constant(h & 0b0100);
                    p_literal[2] = literal_t__constant(h & 0b0010);
                    p_literal[3] = literal_t__constant(h & 0b0001);
                    p_literal += 4;
                };
            } else { // if (is_token(TextReader::ttBin))
                for (auto i = 2; i < token_len; i++) {
                    *p_literal = literal_t__constant(_bin_value(token[i]));
                    p_literal++;
                };
            };
            skip_token();
        } else if (is_token(TextReader::ttSymbol) && is_symbol('*')) {
            value.reserve(item_size);
            value.data_[value.size_] = LITERALID_UNASSIGNED;
            skip_token();
        } else { // variables
            bool b_negated = false;
            if (is_symbol('-')) {
                b_negated = true;
                skip_symbol();
            };
            
            if (b_negated && (is_token(TextReader::ttHex) || is_token(TextReader::ttBin))) {
                parse_error("Negative constant values not supported");
            };
            
            variableid_t variable_id = read_uint32();
            if (variable_id == 0) {
                parse_error("Variable number may not be equal to 0");
            } else if (variable_id > VARIABLEID_MAX) {
                parse_error("Variable number is out of range");
            };
            literalid_t literal_id = variable_t__literal_id_negated_onlyif(variable_id - 1, b_negated);
            
            value.reserve(1);
            value.data_[value.size_] = literal_id;
        };
        
        value.size_ += item_size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
movq (%rdi), %rax
movq -0x18(%rax), %rbx
addq %rbx, %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x40043
cmpl $0x3, 0x40(%r14,%rbx)
je 0x4006b
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq (%r14,%rbx), %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x40126
cmpl $0x4, 0x40(%r14,%rbx)
jne 0x40126
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x10(%r14,%rax), %r12
leaq -0x3(%r12), %rcx
shrq $0x2, %rcx
cmpq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
jae 0x405c8
leaq (%r14,%rax), %r15
movq 0x18(%r14,%rax), %rbx
movq 0x8(%r14,%rax), %rax
movq %rax, -0x40(%rbp)
leal -0x2(%r12), %r13d
movq %r15, %rdi
callq 0x1eae0
cmpl $0x3, 0x40(%r15)
leal -0x8(,%r12,4), %ecx
cmovnel %r13d, %ecx
cmpq $0x0, 0x10(%r15)
cmovel %r13d, %ecx
movq -0x30(%rbp), %rdx
movl 0x18(%rdx), %eax
movl 0x8(%rdx), %r15d
movl %ecx, -0x34(%rbp)
addl %ecx, %r15d
cmpl %r15d, %eax
jae 0x403e8
movl %eax, %ecx
shrl %ecx
addl %ecx, %r15d
cmpl %r15d, %eax
je 0x403e8
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x403ab
testl %r15d, %r15d
je 0x403cd
movl %r15d, %esi
shlq $0x2, %rsi
callq 0xc470
testq %rax, %rax
je 0x405e7
movq -0x30(%rbp), %rdx
movq %rax, (%rdx)
jmp 0x403e4
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq (%r14,%rbx), %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x401c9
cmpl $0x6, 0x40(%r14,%rbx)
jne 0x401c9
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq (%r14,%rbx), %r15
movq %r15, %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x401c9
movq 0x8(%r15), %rax
movq 0x18(%r15), %rcx
cmpb $0x2a, (%rcx,%rax)
jne 0x401c9
movq -0x30(%rbp), %rsi
movl 0x8(%rsi), %ebx
movl 0x18(%rsi), %eax
incl %ebx
cmpl %ebx, %eax
jae 0x40593
movl %eax, %ecx
shrl %ecx
addl %ecx, %ebx
cmpl %ebx, %eax
je 0x40593
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x40559
testl %ebx, %ebx
je 0x40579
movl %ebx, %esi
shlq $0x2, %rsi
callq 0xc470
testq %rax, %rax
je 0x405e7
movq -0x30(%rbp), %rsi
movq %rax, (%rsi)
jmp 0x40590
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq (%r14,%rbx), %r15
movq %r15, %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x401f6
movq 0x8(%r15), %rax
movq 0x18(%r15), %rcx
cmpb $0x2d, (%rcx,%rax)
sete %r13b
jmp 0x401f9
xorl %r13d, %r13d
testb %r13b, %r13b
je 0x402b3
movq (%r14), %rax
movq -0x18(%rax), %rcx
cmpq $0x0, 0x10(%r14,%rcx)
je 0x40228
incq 0x8(%r14,%rcx)
movq $0x0, 0x10(%r14,%rcx)
movl $0x0, 0x40(%r14,%rcx)
movq -0x18(%rax), %rbx
leaq (%r14,%rbx), %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x40245
cmpl $0x3, 0x40(%r14,%rbx)
je 0x40265
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq (%r14,%rbx), %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%rbx)
je 0x402b3
cmpl $0x4, 0x40(%r14,%rbx)
jne 0x402b3
movq (%r14), %rax
leaq -0x90(%rbp), %rbx
movq -0x18(%rax), %r15
addq %r14, %r15
movq %rbx, -0x10(%rbx)
leaq 0xde7c(%rip), %rsi      # 0x4e0fd
leaq 0xde9b(%rip), %rdx      # 0x4e123
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
callq 0x1f29e
movq %r15, %rdi
movq %r12, %rsi
callq 0x1de0a
movq -0xa0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x402b3
callq 0xc280
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1d7d8
movl %eax, %r15d
testl %eax, %eax
je 0x40313
cmpl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
jb 0x40355
movq (%r14), %rax
leaq -0x50(%rbp), %rbx
addq -0x18(%rax), %r14
movq %rbx, -0x10(%rbx)
leaq 0xde5b(%rip), %rsi      # 0x4e14a
leaq 0xde73(%rip), %rdx      # 0x4e169
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x1f29e
movq %r14, %rdi
movq %r12, %rsi
callq 0x1de0a
movq -0x60(%rbp), %rdi
jmp 0x4034b
movq (%r14), %rax
leaq -0x70(%rbp), %rbx
addq -0x18(%rax), %r14
movq %rbx, -0x10(%rbx)
leaq 0xddfb(%rip), %rsi      # 0x4e124
leaq 0xde19(%rip), %rdx      # 0x4e149
leaq -0x80(%rbp), %r12
movq %r12, %rdi
callq 0x1f29e
movq %r14, %rdi
movq %r12, %rsi
callq 0x1de0a
movq -0x80(%rbp), %rdi
cmpq %rbx, %rdi
je 0x40355
callq 0xc280
movq -0x30(%rbp), %rsi
movl 0x8(%rsi), %ebx
movl 0x18(%rsi), %eax
incl %ebx
cmpl %ebx, %eax
jae 0x4052d
movl %eax, %ecx
shrl %ecx
addl %ecx, %ebx
cmpl %ebx, %eax
je 0x4052d
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x404d9
testl %ebx, %ebx
je 0x40513
movl %ebx, %esi
shlq $0x2, %rsi
callq 0xc470
testq %rax, %rax
je 0x405e7
movq -0x30(%rbp), %rsi
movq %rax, (%rsi)
jmp 0x4052a
testl %r15d, %r15d
je 0x403dd
movl %r15d, %edi
shlq $0x2, %rdi
callq 0xc380
movq -0x30(%rbp), %rdx
movq %rax, (%rdx)
testq %rax, %rax
jne 0x403dd
jmp 0x404f4
callq 0xc350
movq -0x30(%rbp), %rdx
movq $0x0, (%rdx)
movl $0x0, 0x8(%rdx)
movl %r15d, 0x18(%rdx)
movl 0x8(%rdx), %r15d
shlq $0x2, %r15
addq (%rdx), %r15
movq (%r14), %rax
movq -0x18(%rax), %r13
leaq (%r14,%r13), %rdi
callq 0x1eae0
cmpq $0x0, 0x10(%r14,%r13)
je 0x40481
cmpl $0x3, 0x40(%r14,%r13)
jne 0x40481
cmpq $0x3, %r12
movq -0x30(%rbp), %rsi
jb 0x404b1
addq -0x40(%rbp), %rbx
movl $0x2, %eax
movb (%rbx,%rax), %cl
cmpb $0x40, %cl
jg 0x40437
addb $-0x30, %cl
jmp 0x40447
cmpb $0x61, %cl
setl %dl
shlb $0x5, %dl
addb %cl, %dl
addb $-0x57, %dl
movl %edx, %ecx
movzbl %cl, %ecx
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1, %edx
movl %edx, (%r15)
movl %ecx, %edx
shrl $0x2, %edx
andl $0x1, %edx
movl %edx, 0x4(%r15)
movl %ecx, %edx
shrl %edx
andl $0x1, %edx
movl %edx, 0x8(%r15)
andl $0x1, %ecx
movl %ecx, 0xc(%r15)
addq $0x10, %r15
incq %rax
cmpq %rax, %r12
jne 0x4042a
jmp 0x404b1
cmpq $0x3, %r12
movq -0x30(%rbp), %rsi
jb 0x404b1
movq -0x40(%rbp), %rax
addq %rbx, %rax
addq $0x2, %rax
addq $-0x2, %r12
xorl %ecx, %ecx
xorl %edx, %edx
cmpb $0x30, (%rax,%rcx)
setne %dl
movl %edx, (%r15,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x4049c
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 -0x34(%rbp), %eax
jmp 0x40547
testl %ebx, %ebx
je 0x40523
movl %ebx, %edi
shlq $0x2, %rdi
callq 0xc380
movq -0x30(%rbp), %rsi
movq %rax, (%rsi)
testq %rax, %rax
jne 0x40523
leaq 0x132a(%rip), %rdi      # 0x41825
leaq 0x12b5(%rip), %rsi      # 0x417b7
leaq 0x12c6(%rip), %rcx      # 0x417cf
movl $0x38, %edx
callq 0xc180
callq 0xc350
movq -0x30(%rbp), %rsi
movq $0x0, (%rsi)
movl $0x0, 0x8(%rsi)
movl %ebx, 0x18(%rsi)
xorb $0x1, %r13b
movzbl %r13b, %eax
leal (%rax,%r15,2), %eax
movq (%rsi), %rcx
movl 0x8(%rsi), %edx
movl %eax, (%rcx,%rdx,4)
movl $0x1, %eax
addl %eax, 0x8(%rsi)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebx, %ebx
je 0x40589
movl %ebx, %edi
shlq $0x2, %rdi
callq 0xc380
movq -0x30(%rbp), %rsi
movq %rax, (%rsi)
testq %rax, %rax
jne 0x40589
jmp 0x404f4
callq 0xc350
movq -0x30(%rbp), %rsi
movq $0x0, (%rsi)
movl $0x0, 0x8(%rsi)
movl %ebx, 0x18(%rsi)
movq (%rsi), %rax
movl 0x8(%rsi), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
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)
jmp 0x40542
leaq 0xdaa9(%rip), %rdi      # 0x4e078
leaq 0xd9b0(%rip), %rsi      # 0x4df86
leaq 0xdacc(%rip), %rcx      # 0x4e0a9
movl $0x126, %edx            # imm = 0x126
callq 0xc180
leaq 0x11b5(%rip), %rdi      # 0x417a3
leaq 0x11c2(%rip), %rsi      # 0x417b7
leaq 0x11d3(%rip), %rcx      # 0x417cf
movl $0x33, %edx
callq 0xc180
movq %rax, %r14
movq -0x60(%rbp), %rdi
jmp 0x40622
movq %rax, %r14
movq -0x80(%rbp), %rdi
jmp 0x40622
movq %rax, %r14
movq -0xa0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x4062c
callq 0xc280
movq %r14, %rdi
callq 0xc4e0