// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: univect_ref
static s7_pointer univect_ref(s7_scheme *sc, s7_pointer args, s7_pointer caller, int32_t typ)
                {
                    s7_pointer v, index;
                    s7_int ind;

                    v = car(args);
                    if (type(v) != typ)
                        return(method_or_bust(sc, v, caller, args, typ, 1));

                    if (vector_rank(v) == 1)
                    {
                        index = cadr(args);
                        if (!s7_is_integer(index))
                            return(method_or_bust(sc, index, caller, args, T_INTEGER, 2));
                        ind = s7_integer(index);
                        if ((ind < 0) || (ind >= vector_length(v)))
                            return(simple_out_of_range(sc, caller, index, (ind < 0) ? its_negative_string : its_too_large_string));
                        if (!is_null(cddr(args)))
                            return(out_of_range(sc, caller, small_int(2), cdr(args), too_many_indices_string));
                    }
                    else
                    {
                        s7_int i;
                        s7_pointer x;
                        ind = 0;
                        for (x = cdr(args), i = 0; (is_not_null(x)) && (i < vector_ndims(v)); x = cdr(x), i++)
                        {
                            s7_int n;
                            index = car(x);
                            if (!s7_is_integer(index))
                                return(method_or_bust(sc, index, caller, args, T_INTEGER, i + 2));
                            n = s7_integer(index);
                            if ((n < 0) ||
                                    (n >= vector_dimension(v, i)))
                                return(out_of_range(sc, caller, wrap_integer1(sc, i + 2), index, (n < 0) ? its_negative_string : its_too_large_string));
                            ind += n * vector_offset(v, i);
                        }
                        if (is_not_null(x))
                            return(out_of_range(sc, caller, small_int(2), cdr(args), too_many_indices_string));

                        /* if not enough indices, return a subvector covering whatever is left */
                        if (i < vector_ndims(v))
                            return(subvector(sc, v, i, ind));
                    }
                    if (typ == T_FLOAT_VECTOR)
                        return(make_real(sc, float_vector(v, ind)));
                    if (typ == T_INT_VECTOR)
                        return(make_integer(sc, int_vector(v, ind)));
                    return(small_int(byte_vector(v, ind)));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r14
movzbl (%r14), %eax
cmpl %ecx, %eax
jne 0xdea2c
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xde9a6
cmpq $0x1, 0x10(%rax)
jne 0xdea6c
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
cmpb $0xb, (%rsi)
jne 0xdea44
movq 0x8(%rsi), %rbp
testq %rbp, %rbp
js 0xdebb2
cmpq 0x8(%r14), %rbp
jge 0xdebb2
movq 0x10(%rax), %rcx
cmpq 0x110(%rbx), %rcx
je 0xdecc9
movq 0x8(%r12), %rcx
movq 0x6ff75(%rip), %rdx     # 0x14e960
movq 0x7e9fe(%rip), %rsi     # 0x15d3f0
movq 0x1ee8(%rbx), %rdi
movq 0x10(%rdi), %rdi
movq %rcx, 0x8(%rdi)
movq 0x10(%rdi), %rcx
movq %rdx, 0x8(%rcx)
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rsi, 0x8(%rax)
movq 0x1948(%rbx), %r15
movq 0x1ee8(%rbx), %rdx
jmp 0xdebfc
movzbl %r13b, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
movl $0x1, %r9d
jmp 0xdea59
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl $0xb, %r8d
movl $0x2, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf1ae
movq 0x10(%r15), %rbp
cmpq 0x110(%rbx), %rbp
sete %cl
je 0xdec0c
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x10(%rax)
jle 0xdec15
movl %r13d, 0x4(%rsp)
movl $0x2, %r13d
movq $0x0, 0x10(%rsp)
movq 0x8(%rbp), %rsi
cmpb $0xb, (%rsi)
jne 0xdead9
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
js 0xdeaf7
movq (%rax), %rdx
cmpq -0x10(%rdx,%r13,8), %rcx
jge 0xdeaf7
movq 0x18(%rax), %rax
imulq -0x10(%rax,%r13,8), %rcx
addq %rcx, 0x10(%rsp)
movb $0x1, %al
jmp 0xdeb6a
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl $0xb, %r8d
movl %r13d, %r9d
callq 0xf1ae
movq %rax, 0x8(%rsp)
jmp 0xdeb68
testq %rcx, %rcx
movq 0x8(%r12), %rax
movq 0x1f00(%rbx), %rcx
movq %r13, 0x8(%rcx)
movq 0x1ee8(%rbx), %rcx
leaq 0x73f28(%rip), %rdx     # 0x152a40
leaq 0x73f29(%rip), %rdi     # 0x152a48
cmovsq %rdi, %rdx
movq 0x1f00(%rbx), %rdi
movq (%rdx), %rdx
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rdi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rbx), %rsi
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %rsi, 0x8(%rsp)
callq 0x3b366
xorl %eax, %eax
testb %al, %al
je 0xdec76
movq 0x10(%rbp), %rbp
cmpq 0x110(%rbx), %rbp
sete %cl
je 0xdec89
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
leaq 0x1(%r13), %rdx
decq %r13
cmpq 0x10(%rax), %r13
movq %rdx, %r13
jl 0xdeaa7
addq $-0x2, %rdx
movl 0x4(%rsp), %r13d
movq 0x10(%rsp), %rbp
jmp 0xdec19
testq %rbp, %rbp
movq 0x8(%r12), %rax
leaq 0x73e87(%rip), %rcx     # 0x152a48
leaq 0x73e78(%rip), %rdx     # 0x152a40
cmovsq %rcx, %rdx
movq (%rdx), %rcx
movq 0x1ef8(%rbx), %rdx
movq 0x10(%rdx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x1948(%rbx), %r15
movq 0x1ef8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b366
jmp 0xded8b
xorl %edx, %edx
xorl %ebp, %ebp
jmp 0xdec9e
xorl %ebp, %ebp
xorl %edx, %edx
testb %cl, %cl
jne 0xdec99
movq 0x8(%r12), %rax
movq 0x6fd37(%rip), %rcx     # 0x14e960
movq 0x10(%r15), %rdx
movq 0x7e7bc(%rip), %rsi     # 0x15d3f0
movq 0x1ee8(%rbx), %rdi
movq 0x10(%rdi), %rdi
movq %rax, 0x8(%rdi)
movq 0x10(%rdi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x1948(%rbx), %r15
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b366
jmp 0xdecbf
xorl %eax, %eax
movl 0x4(%rsp), %r13d
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r15
jmp 0xdecc1
decq %r13
movq %r13, %rdx
movl 0x4(%rsp), %r13d
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r15
movq 0x18(%r14), %rax
movq 0x20(%rax), %rcx
movb $0x1, %al
cmpq 0x10(%rcx), %rdx
jge 0xdecc1
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rcx
callq 0xde6ea
movq %rax, %r15
xorl %eax, %eax
testb %al, %al
je 0xded8b
movq 0x10(%r14), %rax
cmpl $0x16, %r13d
je 0xded27
cmpl $0x17, %r13d
jne 0xded41
movsd (%rax,%rbp,8), %xmm0
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xded02
movq %rbx, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0xb389
movsd 0x8(%rsp), %xmm0
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r15
movq $0xd, (%r15)
movsd %xmm0, 0x8(%r15)
jmp 0xded8b
movq (%rax,%rbp,8), %r14
cmpq $0x7ff, %r14            # imm = 0x7FF
ja 0xded52
leaq 0x6fc15(%rip), %rax     # 0x14e950
movq (%rax,%r14,8), %r15
jmp 0xded8b
movzbl (%rax,%rbp), %eax
leaq 0x6fc04(%rip), %rcx     # 0x14e950
movq (%rcx,%rax,8), %r15
jmp 0xded8b
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xded6a
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r15
movq $0xb, (%r15)
movq %r14, 0x8(%r15)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq