// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%rsi), %rbx
movzbl (%rbx), %eax
cmpl %ecx, %eax
jne 0x10802f
testb $0x1, 0x3(%rbx)
jne 0x108058
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x10809e
cmpq $0x2, 0x10(%rax)
jl 0x10809e
movq 0x10(%r15), %r13
leaq 0x8(%r13), %rdi
movq 0x10(%r13), %rcx
cmpq 0x110(%r12), %rcx
sete %sil
je 0x10817b
movq 0x18(%rbx), %rcx
movq 0x20(%rcx), %rdx
cmpq $0x0, 0x10(%rdx)
jle 0x108182
movq %r14, 0x8(%rsp)
addq $0x10, %r13
movl $0x2, %r14d
movq $0x0, (%rsp)
movq %r15, 0x10(%rsp)
movq (%rdi), %rsi
cmpb $0xb, (%rsi)
jne 0x107f31
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
js 0x107f4f
movq (%rdx), %rcx
cmpq -0x10(%rcx,%r14,8), %rdi
jge 0x107f4f
movq 0x18(%rdx), %rcx
imulq -0x10(%rcx,%r14,8), %rdi
addq %rdi, (%rsp)
movb $0x1, %cl
jmp 0x107fd7
movq %r12, %rdi
movq 0x8(%rsp), %rdx
movq %r15, %rcx
movl $0xb, %r8d
movl %r14d, %r9d
callq 0xf1ae
jmp 0x107fd5
testq %rdi, %rdi
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x1f00(%r12), %rcx
movq %r14, 0x8(%rcx)
movq 0x1ee8(%r12), %rcx
leaq 0x4aaca(%rip), %rdx     # 0x152a40
leaq 0x4aacb(%rip), %rdi     # 0x152a48
cmovsq %rdi, %rdx
movq 0x1f00(%r12), %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)
movl %ebp, %r15d
movq 0x1948(%r12), %rbp
movq 0x1ee8(%r12), %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x3b366
movq %rbp, %rax
movl %r15d, %ebp
movq 0x10(%rsp), %r15
xorl %ecx, %ecx
testb %cl, %cl
je 0x108195
movq (%r13), %r13
leaq 0x8(%r13), %rdi
movq 0x10(%r13), %rcx
cmpq 0x110(%r12), %rcx
sete %sil
je 0x1081a2
addq $0x10, %r13
movq 0x18(%rbx), %rcx
movq 0x20(%rcx), %rdx
leaq 0x1(%r14), %rcx
decq %r14
cmpq 0x10(%rdx), %r14
movq %rcx, %r14
jl 0x107f01
addq $-0x2, %rcx
movq 0x8(%rsp), %r14
movq (%rsp), %r13
jmp 0x108187
movzbl %bpl, %r8d
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movl $0x1, %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf1ae
movq 0x4a909(%rip), %rax     # 0x152968
movq 0x6e8(%r12), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %r14, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rbx, 0x8(%rax)
movq 0x6e8(%r12), %rdx
movq 0xea8(%r12), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3b366
movq %rbx, %rax
jmp 0x108291
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
cmpb $0xb, (%rsi)
jne 0x1080db
movq 0x8(%rsi), %r13
testq %r13, %r13
js 0x1080fc
cmpq 0x8(%rbx), %r13
jge 0x1080fc
movq 0x10(%rax), %rax
movq 0x10(%rax), %rcx
cmpq 0x110(%r12), %rcx
jne 0x10818c
movq 0x8(%rax), %rsi
movb $0x1, %cl
jmp 0x1081da
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %rcx
movl $0xb, %r8d
movl $0x2, %r9d
callq 0xf1ae
xorl %ecx, %ecx
jmp 0x1081da
testq %r13, %r13
movq 0x8(%r14), %rax
movq 0x46856(%rip), %rcx     # 0x14e960
leaq 0x4a937(%rip), %rdx     # 0x152a48
leaq 0x4a928(%rip), %rdi     # 0x152a40
cmovsq %rdx, %rdi
movq (%rdi), %rdx
movq 0x1ee8(%r12), %rdi
movq 0x10(%rdi), %rdi
movq %rax, 0x8(%rdi)
movq 0x10(%rdi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq %r13, (%rsp)
movq %r15, %r13
movl %ebp, %r15d
movq 0x1948(%r12), %rbp
movq 0x1ee8(%r12), %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x3b366
movq %rbp, %rax
movl %r15d, %ebp
movq %r13, %r15
movq (%rsp), %r13
jmp 0x1081d8
xorl %r13d, %r13d
xorl %ecx, %ecx
jmp 0x1081b1
xorl %ecx, %ecx
xorl %r13d, %r13d
testb %sil, %sil
jne 0x1081b1
leaq 0x1c844(%rip), %rsi     # 0x1249d7
jmp 0x1081cd
xorl %ecx, %ecx
movq 0x8(%rsp), %r14
movq (%rsp), %r13
jmp 0x1081da
decq %r14
movq %r14, %rcx
movq 0x8(%rsp), %r14
movq (%rsp), %r13
movq 0x18(%rbx), %rdx
movq 0x20(%rdx), %rdx
cmpq 0x10(%rdx), %rcx
jne 0x1081c6
movq (%rdi), %rsi
movb $0x1, %cl
jmp 0x1081da
leaq 0x1c81c(%rip), %rsi     # 0x1249e9
movq %r12, %rdi
movq %r15, %rdx
callq 0x3cbe3
xorl %ecx, %ecx
testb %cl, %cl
je 0x108291
movzbl (%rsi), %eax
cmpl $0x16, %ebp
je 0x108208
cmpl $0x17, %ebp
jne 0x10821b
leaq 0x4a7ba(%rip), %rcx     # 0x1529b0
cmpb $0x0, (%rax,%rcx)
je 0x108245
cmpl $0xd, %eax
jne 0x10825f
movsd 0x8(%rsi), %xmm0
jmp 0x108278
cmpl $0xb, %eax
jne 0x108234
movq 0x8(%rsi), %rax
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
jmp 0x10828e
cmpl $0xb, %eax
jne 0x108234
cmpq $0x100, 0x8(%rsi)       # imm = 0x100
jae 0x108234
cmpl $0xb, %eax
jne 0x108284
movb 0x8(%rsi), %al
jmp 0x108286
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %rcx
movl $0xb, %r8d
jmp 0x108254
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %rcx
movl $0xd, %r8d
movl $0x3, %r9d
jmp 0x108045
movq 0x4a7ca(%rip), %rdi     # 0x152a30
leaq 0xacfb(%rip), %rdx      # 0x112f68
movq %rsi, %r14
callq 0xe212
movq %r14, %rsi
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax,%r13,8)
jmp 0x10828e
xorl %eax, %eax
movq 0x10(%rbx), %rcx
movb %al, (%rcx,%r13)
movq %rsi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq