// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/./bal/variables/variablesio.cpp
// Function: bal::VariableTextReader::read_variable_elements_sequence_(bal::Container<unsigned int>&, unsigned int)
inline void VariableTextReader::read_variable_elements_sequence_(Container<literalid_t>& value,
                                                                     const variables_size_t element_size) {
        _assert_level_0(element_size > 0);
        _assert_level_0(value.size_ >= element_size);
        
        unsigned int sequence_size = 1;
        signed int step_size = 0;
        read_variable_element_sequence_(sequence_size, step_size);
        
        if (step_size != 0) {
            // require at least one variable within value
            bool b_no_variables = true;
            for (auto i = 0; (i < element_size) && b_no_variables; i++) {
                b_no_variables &= !literal_t__is_variable(value.data_[value.size_ - i - 1]);
            };
            if (b_no_variables) {
                parse_error("Sequence step can be non-zero for variable numbers sequence only");
            };
        };
        
        if (sequence_size > 1) {
            value.reserve((sequence_size - 1) * element_size);
            
            for (auto i = 0; i < sequence_size - 1; i++) {
                literalid_t* p_element = value.data_ + value.size_ + (i * element_size);
                for (auto j = 0; j < element_size; j++) {
                    // adjust variables, preserve constants/unassigned
                    const literalid_t literal = *(p_element + j - element_size);
                    if (literal_t__is_variable(literal)) {
                        if (literal_t__sequence_next_is_valid(literal, step_size)) {
                            *(p_element + j) = literal_t__sequence_next(literal, step_size);
                        } else {
                            parse_error("Sequence produces an invalid variable number");
                        };
                    } else {
                        *(p_element + j) = literal;
                    };
                };
                p_element ++;
            };
            
            value.size_ += (sequence_size - 1) * element_size;
        };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
testl %edx, %edx
je 0x30c00
movl %edx, %r14d
movq %rsi, %r15
cmpl %edx, 0x8(%rsi)
jb 0x30c1f
movq %rdi, %r12
leaq -0x34(%rbp), %rsi
movl $0x1, (%rsi)
leaq -0x4c(%rbp), %rbx
andl $0x0, (%rbx)
movq %rbx, %rdx
callq 0x30c68
cmpl $0x0, (%rbx)
movl %r14d, %eax
movq %rax, -0x40(%rbp)
movl %r14d, -0x30(%rbp)
je 0x30adb
movq (%r15), %rax
movl 0x8(%r15), %ecx
decl %ecx
movb $0x1, %sil
xorl %edx, %edx
cmpq -0x40(%rbp), %rdx
jae 0x30a94
testb $0x1, %sil
je 0x30a94
movl %ecx, %esi
movl (%rax,%rsi,4), %esi
incl %esi
cmpl $0x3, %esi
setb %sil
incq %rdx
decl %ecx
jmp 0x30a73
testb $0x1, %sil
je 0x30adb
movq (%r12), %rax
movq -0x18(%rax), %r14
leaq 0xd86f(%rip), %rsi      # 0x3e318
leaq -0x90(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0xc0e0
addq %r12, %r14
leaq -0x90(%rbp), %rsi
movq %r14, %rdi
callq 0x189ce
leaq -0x90(%rbp), %rdi
callq 0xc110
movl -0x30(%rbp), %r14d
movl -0x34(%rbp), %esi
cmpl $0x2, %esi
jb 0x30bee
movq %r12, -0x68(%rbp)
decl %esi
imull %r14d, %esi
movq %r15, %rdi
callq 0xf470
movq -0x40(%rbp), %rax
leaq (,%rax,4), %rdi
negq %rdi
movq $0x0, -0x48(%rbp)
leaq -0xb0(%rbp), %r12
xorl %r8d, %r8d
movq %r15, -0x58(%rbp)
movq %rdi, -0x60(%rbp)
movq -0x68(%rbp), %r13
movl -0x34(%rbp), %eax
decl %eax
movl 0x8(%r15), %ecx
cmpq %rax, %r8
jae 0x30be4
movl -0x48(%rbp), %eax
shlq $0x2, %rax
leaq (%rax,%rcx,4), %r14
addq (%r15), %r14
movq -0x40(%rbp), %r15
movq %r8, -0x70(%rbp)
subq $0x1, %r15
jb 0x30bc9
movl (%r14,%rdi), %eax
leal -0x2(%rax), %ecx
cmpl $-0x4, %ecx
ja 0x30bac
movl -0x4c(%rbp), %ecx
movl %eax, %edx
testl %ecx, %ecx
jle 0x30bb1
notl %edx
shrl %edx
cmpl %ecx, %edx
jae 0x30bbd
movq (%r13), %rax
movq -0x18(%rax), %rbx
movq %r12, %rdi
leaq 0xd7d6(%rip), %rsi      # 0x3e359
leaq -0x29(%rbp), %rdx
callq 0xc0e0
addq %r13, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x189ce
movq %r12, %rdi
callq 0xc110
movq -0x60(%rbp), %rdi
movq -0x70(%rbp), %r8
jmp 0x30bc3
movl %eax, (%r14)
jmp 0x30bc3
shrl %edx
decl %edx
movl %ecx, %esi
negl %esi
cmpl %esi, %edx
jb 0x30b71
leal (%rax,%rcx,2), %eax
movl %eax, (%r14)
addq $0x4, %r14
jmp 0x30b4e
incq %r8
movl -0x30(%rbp), %r14d
movq -0x48(%rbp), %rax
addl %r14d, %eax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %r15
jmp 0x30b26
imull %r14d, %eax
addl %ecx, %eax
movl %eax, 0x8(%r15)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd673(%rip), %rdi      # 0x3e27a
leaq 0xd488(%rip), %rsi      # 0x3e096
leaq 0xd676(%rip), %rcx      # 0x3e28b
movl $0x15f, %edx            # imm = 0x15F
callq 0xc180
leaq 0xd6d6(%rip), %rdi      # 0x3e2fc
leaq 0xd469(%rip), %rsi      # 0x3e096
leaq 0xd657(%rip), %rcx      # 0x3e28b
movl $0x160, %edx            # imm = 0x160
callq 0xc180
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
jmp 0x30c56
jmp 0x30c5d
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0xc110
jmp 0x30c60
movq %rax, %rbx
movq %rbx, %rdi
callq 0xc4c0