// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_vector_set
static s7_pointer g_vector_set(s7_scheme *sc, s7_pointer args)
                {
#define H_vector_set "(vector-set! v i ... value) sets the i-th element of vector v to value."
#define Q_vector_set s7_make_circular_signature(sc, 3, 4, sc->T, sc->is_vector_symbol, sc->is_integer_symbol, sc->is_integer_or_any_at_end_symbol)

                    s7_pointer vec, val;
                    s7_int index;

                    vec = car(args);
                    if (!is_any_vector(vec))
                        return(method_or_bust(sc, vec, sc->vector_set_symbol, args, T_VECTOR, 1));
                    if (is_immutable_vector(vec))
                        return(immutable_object_error(sc, set_elist_3(sc, immutable_error_string, sc->vector_set_symbol, vec)));

                    if (vector_length(vec) == 0)
                        return(out_of_range(sc, sc->vector_set_symbol, small_int(1), vec, its_too_large_string));

                    if (vector_rank(vec) > 1)
                    {
                        s7_int i;
                        s7_pointer x;
                        index = 0;
                        for (x = cdr(args), i = 0; (is_not_null(cdr(x))) && (i < vector_ndims(vec)); x = cdr(x), i++)
                        {
                            s7_int n;
                            s7_pointer p;
                            p = car(x);
                            if (!s7_is_integer(p))
                                return(method_or_bust(sc, p, sc->vector_set_symbol, args, T_INTEGER, i + 2));
                            n = s7_integer(p);
                            if ((n < 0) ||
                                    (n >= vector_dimension(vec, i)))
                                return(out_of_range(sc, sc->vector_set_symbol, wrap_integer1(sc, i + 2), p, (n < 0) ? its_negative_string : its_too_large_string));

                            index += n * vector_offset(vec, i);
                        }

                        if (is_not_null(cdr(x)))
                            return(s7_wrong_number_of_args_error(sc, "too many args for vector-set!: ~S", args));
                        if (i != vector_ndims(vec))
                            return(s7_wrong_number_of_args_error(sc, "not enough args for vector-set!: ~S", args));

                        val = car(x);
                    }
                    else
                    {
                        s7_pointer p;
                        p = cadr(args);
                        if (!s7_is_integer(p))
                            return(method_or_bust(sc, p, sc->vector_set_symbol, args, T_INTEGER, 2));
                        index = s7_integer(p);
                        if ((index < 0) ||
                                (index >= vector_length(vec)))
                            return(out_of_range(sc, sc->vector_set_symbol, small_int(2), p, (index < 0) ? its_negative_string : its_too_large_string));

                        if (is_not_null(cdddr(args)))
                        {
                            set_car(sc->temp_cell_2, vector_getter(vec)(sc, vec, index));
                            if (!is_any_vector(car(sc->temp_cell_2)))
                                return(s7_wrong_number_of_args_error(sc, "too many args for vector-set!: ~S", args));
                            set_cdr(sc->temp_cell_2, cddr(args));
                            return(g_vector_set(sc, sc->temp_cell_2));
                        }
                        val = caddr(args);
                    }

                    if (is_typed_vector(vec))
                    {
                        if ((sc->safety < NO_SAFETY) || /* or == NO_SAFETY?? */
                                (typed_vector_typer_call(sc, vec, set_plist_1(sc, val)) != sc->F))
                        {
                            vector_element(vec, index) = val;
                            return(val);
                        }
                        return(s7_wrong_type_arg_error(sc, "vector-set!", 3, val, make_type_name(sc, typed_vector_typer_name(sc, vec), INDEFINITE_ARTICLE)));
                    }

                    vector_setter(vec)(sc, vec, index, val);
                    return(val);
                }

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0xf8(%rsp)
movq %rsi, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x180dc1(%rip), %rax    # 0x21a750
testb $0x1, (%rax,%rcx)
jne 0x999da
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rdx
movq 0xf0(%rsp), %rcx
movl $0x15, %r8d
movl $0x1, %r9d
callq 0x13c50
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xe8(%rsp), %rax
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0x99a49
movq 0xf8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xf8(%rsp), %rdi
movq 0x180a88(%rip), %rsi    # 0x21a498
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rdx
movq 0xe8(%rsp), %rcx
callq 0xf240
movq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0xb800
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xe8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x99a9b
movq 0xf8(%rsp), %rdi
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rax
movq 0x8(%rax), %rsi
movq 0x17ca0e(%rip), %rdx    # 0x216488
movq 0xe8(%rsp), %rcx
movq 0x180ae7(%rip), %r8     # 0x21a570
callq 0x13880
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xe8(%rsp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x99acc
movq 0xe8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0xa0(%rsp)
jmp 0x99adb
movl $0x1, %eax
movq %rax, 0xa0(%rsp)
jmp 0x99adb
movq 0xa0(%rsp), %rax
cmpq $0x1, %rax
jle 0x99df3
movq $0x0, 0xd8(%rsp)
movq 0xf0(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xc8(%rsp)
movq $0x0, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0xf8(%rsp), %rdx
xorl %eax, %eax
cmpq 0x110(%rdx), %rcx
movb %al, 0x9f(%rsp)
je 0x99b65
movq 0xd0(%rsp), %rax
movq 0xe8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x10(%rcx), %rax
setl %al
movb %al, 0x9f(%rsp)
movb 0x9f(%rsp), %al
testb $0x1, %al
jne 0x99b75
jmp 0x99d4d
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x99be8
movq 0xf8(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rdx
movq 0xf0(%rsp), %rcx
movq 0xd0(%rsp), %rax
addq $0x2, %rax
movl %eax, %r9d
movl $0xb, %r8d
callq 0x13c50
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xb8(%rsp), %rdi
callq 0x10790
movq %rax, 0xc0(%rsp)
cmpq $0x0, 0xc0(%rsp)
jl 0x99c35
movq 0xc0(%rsp), %rax
movq 0xe8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq (%rcx), %rcx
movq 0xd0(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jl 0x99ce7
movq 0xf8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xd0(%rsp), %rsi
addq $0x2, %rsi
callq 0x12430
movq %rax, 0x88(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpq $0x0, 0xc0(%rsp)
jge 0x99ca7
movq 0x1808d8(%rip), %rax    # 0x21a578
movq %rax, 0x70(%rsp)
jmp 0x99cb3
movq 0x1808c2(%rip), %rax    # 0x21a570
movq %rax, 0x70(%rsp)
movq 0x90(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %r8
callq 0x13880
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xc0(%rsp), %rax
movq 0xe8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq 0x18(%rcx), %rcx
movq 0xd0(%rsp), %rdx
imulq (%rcx,%rdx,8), %rax
addq 0xd8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x99b19
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xf8(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x99d93
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rdx
leaq 0x159bf8(%rip), %rsi    # 0x1f3979
callq 0x33290
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xd0(%rsp), %rax
movq 0xe8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
cmpq 0x10(%rcx), %rax
je 0x99dda
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rdx
leaq 0x159bd3(%rip), %rsi    # 0x1f399b
callq 0x33290
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xc8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0x9a044
movq 0xf0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x99e61
movq 0xf8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rdx
movq 0xf0(%rsp), %rcx
movl $0xb, %r8d
movl $0x2, %r9d
callq 0x13c50
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xb0(%rsp), %rdi
callq 0x10790
movq %rax, 0xd8(%rsp)
cmpq $0x0, 0xd8(%rsp)
jl 0x99e9b
movq 0xd8(%rsp), %rax
movq 0xe8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jl 0x99f29
movq 0xf8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xf8(%rsp), %rax
movq 0x1668(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x17c5c9(%rip), %rax    # 0x216490
movq %rax, 0x60(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0xd8(%rsp)
jge 0x99ef2
movq 0x18068d(%rip), %rax    # 0x21a578
movq %rax, 0x48(%rsp)
jmp 0x99efe
movq 0x180677(%rip), %rax    # 0x21a570
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %r8
callq 0x13880
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xf0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0xf8(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x9a028
movq 0xe8(%rsp), %rax
movq 0x20(%rax), %rax
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
callq *%rax
movq %rax, %rcx
movq 0xf8(%rsp), %rax
movq 0x558(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0xf8(%rsp), %rax
movq 0x558(%rax), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1807a3(%rip), %rax    # 0x21a750
testb $0x1, (%rax,%rcx)
jne 0x99fdc
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rdx
leaq 0x1599af(%rip), %rsi    # 0x1f3979
callq 0x33290
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xf0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rcx
movq 0xf8(%rsp), %rax
movq 0x558(%rax), %rax
movq %rcx, 0x10(%rax)
movq 0xf8(%rsp), %rdi
movq 0xf8(%rsp), %rax
movq 0x558(%rax), %rsi
callq 0x99950
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xf0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9a1de
movq 0xf8(%rsp), %rax
cmpq $0x0, 0x6a0(%rax)
jl 0x9a133
movq 0xe8(%rsp), %rax
movq 0x28(%rax), %rax
movzbl (%rax), %eax
cmpl $0x30, %eax
jl 0x9a0d3
movq 0xe8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x35ea0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rax
callq *%rax
movq %rax, 0x40(%rsp)
jmp 0x9a11d
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xe8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x35ea0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0xf8(%rsp), %rcx
cmpq 0x120(%rcx), %rax
je 0x9a168
movq 0xe0(%rsp), %rdx
movq 0xe8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xd8(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0xe0(%rsp), %rax
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xf8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0xd8a20
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0xd8890
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq %rax, %r8
leaq 0x150463(%rip), %rsi    # 0x1ea62d
movl $0x3, %edx
callq 0x12540
movq %rax, 0x100(%rsp)
jmp 0x9a21c
movq 0xe8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0xf8(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rcx
callq *%rax
movq 0xe0(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
addq $0x108, %rsp            # imm = 0x108
retq
nopl (%rax)