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

                    vec = car(args);
                    if (type(vec) != typ)
                        return(method_or_bust(sc, vec, caller, args, typ, 1));
                    if (is_immutable_vector(vec))
                        return(immutable_object_error(sc, set_elist_3(sc, immutable_error_string, caller, vec)));

                    if (vector_rank(vec) > 1)
                    {
                        s7_int i;
                        s7_pointer x;
                        ind = 0;
                        for (x = cdr(args), i = 0; (is_not_null(cdr(x))) && (i < vector_ndims(vec)); 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(vec, 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(vec, i);
                        }
                        if (is_not_null(cdr(x)))
                            return(s7_wrong_number_of_args_error(sc, "too many args: ~S", args));
                        if (i != vector_ndims(vec))
                            return(s7_wrong_number_of_args_error(sc, "not enough args: ~S", args));
                        val = car(x);
                    }
                    else
                    {
                        s7_pointer p;
                        p = cdr(args);
                        index = car(p);
                        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(vec)))
                            return(out_of_range(sc, caller, small_int(2), index, (ind < 0) ? its_negative_string : its_too_large_string));
                        if (is_not_null(cddr(p)))
                            return(s7_wrong_number_of_args_error(sc, "too many args: ~S", args));
                        val = cadr(p);
                    }

                    if (typ == T_FLOAT_VECTOR)
                    {
                        if (!s7_is_real(val))
                            return(method_or_bust(sc, val, caller, args, T_REAL, 3));
                        float_vector(vec, ind) = s7_real(val);
                    }
                    else
                    {
                        if (typ == T_INT_VECTOR)
                        {
                            if (!s7_is_integer(val))
                                return(method_or_bust(sc, val, caller, args, T_INTEGER, 3));
                            int_vector(vec, ind) = s7_integer(val);
                        }
                        else
                        {
                            if (!is_byte(val))
                                return(method_or_bust(sc, val, caller, args, T_INTEGER, 3));
                            byte_vector(vec, ind) = (uint8_t)s7_integer(val);
                        }
                    }
                    return(val);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq 0x8(%rsi), %rbx
movzbl (%rbx), %esi
cmpl %ecx, %esi
jne 0xfed5e
testb $0x1, 0x3(%rbx)
jne 0xfed81
movq 0x18(%rbx), %rsi
movq 0x20(%rsi), %r10
testq %r10, %r10
je 0xfedb6
movq 0x10(%r10), %r8
cmpq $0x2, %r8
jl 0xfedb6
movq 0x110(%rdi), %r11
movq 0x10(%rax), %rsi
movq 0x10(%rsi), %r12
addq $0x8, %rsi
cmpq %r11, %r12
je 0xfee53
movq %r8, %r14
negq %r14
movl $0x2, %r9d
xorl %r15d, %r15d
leaq (%r14,%r9), %r13
cmpq $0x2, %r13
je 0xfede7
movq (%rsi), %rsi
cmpb $0xb, (%rsi)
jne 0xfef2b
movq 0x8(%rsi), %r13
testq %r13, %r13
js 0xfee7f
movq (%r10), %rbp
cmpq -0x10(%rbp,%r9,8), %r13
jge 0xfee7f
movq 0x18(%r10), %rsi
imulq -0x10(%rsi,%r9,8), %r13
addq %r13, %r15
movq %r12, %rsi
movq 0x10(%r12), %r13
addq $0x8, %rsi
incq %r9
movq %r13, %r12
cmpq %r11, %r13
jne 0xfecfc
addq $-0x2, %r9
jmp 0xfee59
movzbl %cl, %r8d
movq %rbx, %rsi
movq %rax, %rcx
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe42d
movq 0x4bbe0(%rip), %rax     # 0x14a968
movq 0x6e8(%rdi), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rdx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rbx, 0x8(%rax)
movq 0x6e8(%rdi), %rdx
movq 0xea8(%rdi), %r14
jmp 0xfeee2
movq 0x10(%rax), %r8
movq 0x8(%r8), %rsi
cmpb $0xb, (%rsi)
jne 0xfedf0
movq 0x8(%rsi), %r15
testq %r15, %r15
js 0xfee04
cmpq 0x8(%rbx), %r15
jge 0xfee04
movq 0x10(%r8), %rsi
movq 0x10(%rsi), %r8
cmpq 0x110(%rdi), %r8
je 0xfeefc
leaq 0x1ccf9(%rip), %rsi     # 0x11bae7
jmp 0xfee69
movq %rax, %rcx
movl $0xb, %r8d
movl $0x2, %r9d
jmp 0xfed6e
testq %r15, %r15
movq 0x8(%rdx), %rax
movq 0x47b4e(%rip), %rcx     # 0x146960
leaq 0x4bc2f(%rip), %rdx     # 0x14aa48
leaq 0x4bc20(%rip), %r8      # 0x14aa40
cmovsq %rdx, %r8
movq (%r8), %rdx
movq 0x1ee8(%rdi), %r8
movq 0x10(%r8), %r8
movq %rax, 0x8(%r8)
movq 0x10(%r8), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
jmp 0xfeed4
xorl %r15d, %r15d
xorl %r9d, %r9d
cmpq %r8, %r9
je 0xfef00
leaq 0x1cc90(%rip), %rsi     # 0x11baf9
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3a657
testq %r13, %r13
movq 0x8(%rdx), %rax
movq 0x1f00(%rdi), %rcx
movq %r9, 0x8(%rcx)
movq 0x1ee8(%rdi), %rcx
leaq 0x4bba9(%rip), %rdx     # 0x14aa48
leaq 0x4bb9a(%rip), %r8      # 0x14aa40
cmovsq %rdx, %r8
movq 0x1f00(%rdi), %rdx
movq (%r8), %r8
movq 0x10(%rcx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rdx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r8, 0x8(%rax)
movq 0x1948(%rdi), %r14
movq 0x1ee8(%rdi), %rdx
movq %r14, %rsi
callq 0x38dfa
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rsi
movq (%rsi), %r14
movzbl (%r14), %esi
cmpl $0x16, %ecx
je 0xfef39
cmpl $0x17, %ecx
jne 0xfef4c
leaq 0x4ba98(%rip), %rcx     # 0x14a9b0
cmpb $0x0, (%rsi,%rcx)
je 0xfef76
cmpl $0xd, %esi
jne 0xfef8d
movsd 0x8(%r14), %xmm0
jmp 0xfefa3
movq %rax, %rcx
movl $0xb, %r8d
jmp 0xfed6e
cmpl $0xb, %esi
jne 0xfef68
movq 0x8(%r14), %rax
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
jmp 0xfeeea
cmpl $0xb, %esi
jne 0xfef68
movq 0x8(%r14), %rcx
cmpq $0x100, %rcx            # imm = 0x100
jae 0xfef68
movq 0x10(%rbx), %rax
movb %cl, (%rax,%r15)
jmp 0xfeeea
movq %r14, %rsi
movq %rax, %rcx
movl $0xb, %r8d
jmp 0xfef82
movq %r14, %rsi
movq %rax, %rcx
movl $0xd, %r8d
movl $0x3, %r9d
jmp 0xfed6e
movq 0x4ba9c(%rip), %rdi     # 0x14aa30
leaq 0xb0dd(%rip), %rdx      # 0x10a078
movq %r14, %rsi
callq 0xd498
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax,%r15,8)
jmp 0xfeeea