// File: /workspace/github_cpp_makefile_star2_O2/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, -0x38(%rbp)
movq %rdi, %r14
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x3
popq %rsi
callq 0x18644
testb %al, %al
jne 0x30698
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x4
popq %rsi
callq 0x18644
testb %al, %al
je 0x307ab
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x10(%r14,%rax), %r13
leaq -0x3(%r13), %rcx
shrq $0x2, %rcx
cmpq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
jae 0x3096d
leaq (%r14,%rax), %rdi
movq 0x18(%r14,%rax), %rbx
movq 0x8(%r14,%rax), %rax
movq %rax, -0x40(%rbp)
leal -0x2(%r13), %r12d
pushq $0x3
popq %rsi
callq 0x18644
leal -0x8(,%r13,4), %esi
testb %al, %al
cmovel %r12d, %esi
movq -0x38(%rbp), %r15
movq %r15, %rdi
movl %esi, -0x30(%rbp)
callq 0xf470
movl 0x8(%r15), %r12d
shlq $0x2, %r12
addq (%r15), %r12
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x3
popq %rsi
callq 0x18644
testb %al, %al
je 0x3077f
addq -0x40(%rbp), %rbx
pushq $0x2
popq %rax
movl -0x30(%rbp), %r15d
cmpq %rax, %r13
je 0x307f4
movb (%rbx,%rax), %cl
cmpb $0x40, %cl
jg 0x30736
addb $-0x30, %cl
jmp 0x30746
cmpb $0x61, %cl
setb %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, (%r12)
movl %ecx, %edx
shrl $0x2, %edx
andl $0x1, %edx
movl %edx, 0x4(%r12)
movl %ecx, %edx
shrl %edx
andl $0x1, %edx
movl %edx, 0x8(%r12)
andl $0x1, %ecx
movl %ecx, 0xc(%r12)
addq $0x10, %r12
incq %rax
jmp 0x30720
addq $-0x2, %r13
movq -0x40(%rbp), %rax
addq %rbx, %rax
addq $0x2, %rax
xorl %ecx, %ecx
movl -0x30(%rbp), %r15d
cmpq %rcx, %r13
je 0x307f4
xorl %edx, %edx
cmpb $0x30, (%rax,%rcx)
setne %dl
movl %edx, (%r12,%rcx,4)
incq %rcx
jmp 0x30794
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x6
popq %rsi
callq 0x18644
testb %al, %al
je 0x30828
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x2a
popq %rsi
callq 0x18a92
testb %al, %al
je 0x30828
pushq $0x1
popq %r15
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movl %r15d, %esi
callq 0xf470
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
orl $-0x1, (%rax,%rcx,4)
movq (%r14), %rax
movq -0x18(%rax), %rax
movq 0x10(%r14,%rax), %rcx
addq %rcx, 0x8(%r14,%rax)
andq $0x0, 0x10(%r14,%rax)
andl $0x0, 0x40(%r14,%rax)
movq -0x38(%rbp), %rax
addl %r15d, 0x8(%rax)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x2d
popq %rsi
callq 0x18a92
movl %eax, %r15d
testb %al, %al
je 0x308b8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
callq 0x197ba
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x3
popq %rsi
callq 0x18644
testb %al, %al
jne 0x3087c
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $0x4
popq %rsi
callq 0x18644
testb %al, %al
je 0x308b8
movq (%r14), %rax
movq -0x18(%rax), %r12
leaq 0xd983(%rip), %rsi      # 0x3e20d
leaq -0xa0(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0xc0e0
addq %r14, %r12
leaq -0xa0(%rbp), %rsi
movq %r12, %rdi
callq 0x189ce
leaq -0xa0(%rbp), %rdi
callq 0xc110
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
pushq $-0x1
popq %rdx
xorl %esi, %esi
callq 0x1866c
movl %eax, %r12d
testl %eax, %eax
je 0x3090c
cmpl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
jb 0x3093f
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq 0xd970(%rip), %rsi      # 0x3e25a
leaq -0x60(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0xc0e0
addq %rbx, %r14
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
callq 0x189ce
leaq -0x60(%rbp), %rdi
jmp 0x3093a
movq (%r14), %rax
movq -0x18(%rax), %rbx
leaq 0xd91a(%rip), %rsi      # 0x3e234
leaq -0x80(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0xc0e0
addq %rbx, %r14
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0x189ce
leaq -0x80(%rbp), %rdi
callq 0xc110
xorb $0x1, %r15b
movzbl %r15b, %eax
leal (%rax,%r12,2), %ebx
pushq $0x1
popq %r15
movq -0x38(%rbp), %r14
movq %r14, %rdi
movl %r15d, %esi
callq 0xf470
movq (%r14), %rax
movl 0x8(%r14), %ecx
movl %ebx, (%rax,%rcx,4)
jmp 0x30811
leaq 0xd814(%rip), %rdi      # 0x3e188
leaq 0xd71b(%rip), %rsi      # 0x3e096
leaq 0xd837(%rip), %rcx      # 0x3e1b9
movl $0x126, %edx            # imm = 0x126
callq 0xc180
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
jmp 0x309aa
jmp 0x309b3
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x309aa
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0xc110
jmp 0x309b6
jmp 0x309b3
movq %rax, %rbx
movq %rbx, %rdi
callq 0xc4c0