// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: subvector
static s7_pointer subvector(s7_scheme *sc, s7_pointer vect, s7_int skip_dims, s7_int index)
                {
                    s7_pointer x;
                    s7_int dims;

                    new_cell(sc, x, (typeflag(vect) & (~T_COLLECTED)) | T_SUBVECTOR | T_SAFE_PROCEDURE);
                    vector_length(x) = 0;
                    vector_block(x) = mallocate_vector(sc, 0);
                    vector_elements(x) = NULL;
                    vector_getter(x) = vector_getter(vect);
                    vector_setter(x) = vector_setter(vect);

                    dims = vector_ndims(vect) - skip_dims;
                    if (dims > 1)
                    {
                        vdims_t *v;
                        v = (vdims_t *)mallocate_block(sc);
                        vdims_rank(v) = dims;
                        vdims_dims(v) = (s7_int *)(vector_dimensions(vect) + skip_dims);
                        vdims_offsets(v) = (s7_int *)(vector_offsets(vect) + skip_dims);
                        vdims_original(v) = vect;
                        vector_elements_should_be_freed(v) = false;
                        vector_set_dimension_info(x, v);
                    }
                    else
                    {
                        vector_set_dimension_info(x, NULL);
                        subvector_set_vector(x, vect);
                    }

                    if (is_normal_vector(vect))
                        mark_function[T_VECTOR] = mark_vector_possibly_shared;
                    else mark_function[type(vect)] = mark_int_or_float_vector_possibly_shared;

                    if (skip_dims > 0)
                        vector_length(x) = vector_offset(vect, skip_dims - 1);
                    else vector_length(x) = vector_length(vect);

                    if (is_int_vector(vect))
                        int_vector_ints(x) = (s7_int *)(int_vector_ints(vect) + index);
                    else
                    {
                        if (is_float_vector(vect))
                            float_vector_floats(x) = (s7_double *)(float_vector_floats(vect) + index);
                        else
                        {
                            if (is_normal_vector(vect))
                                vector_elements(x) = (s7_pointer *)(vector_elements(vect) + index);
                            else byte_vector_bytes(x) = (uint8_t *)(byte_vector_bytes(vect) + index);
                        }
                    }
                    add_multivector(sc, x);
                    return(x);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq 0x90(%rdi), %rax
cmpq 0x98(%rdi), %rax
ja 0xa92c8
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r15
movq $-0x20220001, %rax      # imm = 0xDFDDFFFF
andq (%r12), %rax
orq $0x20200000, %rax       # imm = 0x20200000
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2e974
movq %rax, 0x18(%r15)
andq $0x0, 0x10(%r15)
movq 0x20(%r12), %rcx
movq %rcx, 0x20(%r15)
movq 0x28(%r12), %rcx
movq %rcx, 0x28(%r15)
movq 0x18(%r12), %rcx
movq 0x20(%rcx), %rcx
movq 0x10(%rcx), %rbp
subq %r13, %rbp
cmpq $0x2, %rbp
jl 0xa936f
movq %rbx, %rdi
callq 0xb93f
movq %rbp, 0x10(%rax)
movq 0x18(%r12), %rcx
movq 0x20(%rcx), %rcx
leaq (,%r13,8), %rdx
movq (%rcx), %rcx
addq %rdx, %rcx
movq %rcx, (%rax)
movq 0x18(%r12), %rcx
movq 0x20(%rcx), %rcx
addq 0x18(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq %r12, 0x20(%rax)
movb $0x0, 0xc(%rax)
pushq $0x20
popq %rcx
jmp 0xa937a
andq $0x0, 0x20(%rax)
pushq $0x18
popq %rcx
movq %r12, %rax
movq 0x18(%r15), %rdx
movq %rax, (%rdx,%rcx)
movzbl (%r12), %eax
cmpq $0x15, %rax
jne 0xa939d
leaq 0x4b7(%rip), %rax       # 0xa984b
movq %rax, 0x6c47d(%rip)     # 0x115818
jmp 0xa93af
leaq 0x6c3cc(%rip), %rcx     # 0x115770
leaq 0x4e3(%rip), %rdx       # 0xa988e
movq %rdx, (%rcx,%rax,8)
testq %r13, %r13
jle 0xa93cb
movq 0x18(%r12), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
leaq (%rax,%r13,8), %rax
addq $-0x8, %rax
jmp 0xa93d0
leaq 0x8(%r12), %rax
movq (%rax), %rax
movq %rax, 0x8(%r15)
movzbl (%r12), %ecx
movq 0x10(%r12), %rax
cmpl $0x15, %ecx
je 0xa93f0
cmpl $0x17, %ecx
je 0xa93f0
cmpl $0x16, %ecx
jne 0xa93f6
leaq (%rax,%r14,8), %rax
jmp 0xa93f9
addq %r14, %rax
movq %rax, 0x10(%r15)
movq 0x790(%rbx), %rdi
movq %r15, %rsi
callq 0xb999
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq