// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_make_int_vector
static s7_pointer g_make_int_vector(s7_scheme *sc, s7_pointer args)
                {
#define H_make_int_vector "(make-int-vector len (init 0)) returns an int-vector."
#define Q_make_int_vector s7_make_signature(sc, 3, sc->is_int_vector_symbol, s7_make_signature(sc, 2, sc->is_integer_symbol, sc->is_pair_symbol), sc->is_integer_symbol)

                    s7_int len;
                    s7_pointer x, p;
                    block_t *arr;

                    p = car(args);
                    if ((is_pair(cdr(args))) ||
                            (!s7_is_integer(p)))
                    {
                        s7_pointer init;
                        if (is_pair(cdr(args)))
                        {
                            init = cadr(args);
                            if (!s7_is_integer(init))
                                return(method_or_bust(sc, init, sc->make_int_vector_symbol, args, T_INTEGER, 2));
                        }
                        else init = small_int(0);
                        if (s7_is_integer(p))
                            len = s7_integer(p);
                        else
                        {
                            if (!is_pair(p))
                                return(method_or_bust_with_type(sc, p, sc->make_int_vector_symbol, args, wrap_string(sc, "an integer or a list of integers", 32), 1));
                            len = multivector_length(sc, p, sc->make_int_vector_symbol);
                        }
                        x = make_vector_1(sc, len, NOT_FILLED, T_INT_VECTOR);
                        int_vector_fill(sc, x, s7_integer(init));
                        if (s7_is_integer(p))
                        {
                            add_vector(sc, x);
                            return(x);
                        }
                        return(make_multivector(sc, x, p));
                    }

                    len = s7_integer(p);
                    if (len < 0)
                        return(wrong_type_argument_with_type(sc, sc->make_int_vector_symbol, 1, p, a_non_negative_integer_string));
                    if (len > sc->max_vector_length)
                        return(out_of_range(sc, sc->make_int_vector_symbol, small_int(1), p, its_too_large_string));

                    arr = mallocate_vector(sc, len * sizeof(s7_int));
                    new_cell(sc, x, T_INT_VECTOR | T_SAFE_PROCEDURE);
                    vector_length(x) = len;
                    vector_block(x) = arr;
                    int_vector_ints(x) = (s7_int *)block_data(arr);
                    if (len > 0)
                    {
                        if (STEP_8(len))
                            memclr64((void *)int_vector_ints(x), len * sizeof(s7_int));
                        else memclr((void *)int_vector_ints(x), len * sizeof(s7_int));
                    }
                    vector_set_dimension_info(x, NULL);
                    vector_getter(x) = int_vector_getter;
                    vector_setter(x) = int_vector_setter;

                    add_vector(sc, x);
                    return(x);
                }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x9b90e
movq 0x78(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x9bb38
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x9b989
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x9b987
movq 0x98(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x98(%rsp), %rax
movq 0x12f0(%rax), %rdx
movq 0x90(%rsp), %rcx
movl $0xb, %r8d
movl $0x2, %r9d
callq 0x13c50
movq %rax, 0xa0(%rsp)
jmp 0x9be4e
jmp 0x9b995
movq 0x17aaf0(%rip), %rax    # 0x216480
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x9b9a5
jmp 0x9b9bc
movq 0x78(%rsp), %rdi
callq 0x10790
movq %rax, 0x88(%rsp)
jmp 0x9ba76
movq 0x78(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x9ba4d
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x98(%rsp), %rax
movq 0x12f0(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x98(%rsp), %rdi
leaq 0x1531e4(%rip), %rsi    # 0x1eebf8
movl $0x20, %edx
callq 0xb880
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %rax, %r8
movl $0x1, %r9d
callq 0x14130
movq %rax, 0xa0(%rsp)
jmp 0x9be4e
movq 0x98(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x98(%rsp), %rax
movq 0x12f0(%rax), %rdx
callq 0xd8c70
movq %rax, 0x88(%rsp)
movq 0x98(%rsp), %rdi
movq 0x88(%rsp), %rsi
xorl %edx, %edx
movl $0x16, %ecx
callq 0x333c0
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
callq 0x10790
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0xd8330
movq 0x78(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0x9bae0
jmp 0x9bb11
movq 0x98(%rsp), %rax
movq 0x740(%rax), %rdi
movq 0x80(%rsp), %rsi
callq 0x11230
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x9be4e
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0xd91f0
movq %rax, 0xa0(%rsp)
jmp 0x9be4e
movq 0x78(%rsp), %rdi
callq 0x10790
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
jge 0x9bc78
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq 0x12f0(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq $0x1, 0x60(%rsp)
movq 0x60(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x9bbb1
movq 0x60(%rsp), %rcx
leaq 0x17a8dc(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
jmp 0x9bc33
jmp 0x9bbb3
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x9bbe0
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq $0xb, (%rax)
movq 0x60(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq (%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0x98(%rsp), %rax
movq 0x140(%rax), %r8
movq 0x186ac2(%rip), %r9     # 0x222728
callq 0xc560
movq %rax, 0xa0(%rsp)
jmp 0x9be4e
movq 0x88(%rsp), %rax
movq 0x98(%rsp), %rcx
cmpq 0x2a0(%rcx), %rax
jle 0x9bcd1
movq 0x98(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x12f0(%rax), %rax
movq 0x8(%rax), %rsi
movq 0x17a7d5(%rip), %rdx    # 0x216488
movq 0x78(%rsp), %rcx
movq 0x17e8b1(%rip), %r8     # 0x21a570
callq 0x13880
movq %rax, 0xa0(%rsp)
jmp 0x9be4e
movq 0x98(%rsp), %rdi
movq 0x88(%rsp), %rsi
shlq $0x3, %rsi
callq 0x33d80
movq %rax, 0x70(%rsp)
movq 0x98(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x98(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x9bd1c
movq 0x98(%rsp), %rdi
callq 0xc670
movq 0x98(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq $0x200016, (%rax)       # imm = 0x200016
movq 0x88(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x70(%rsp), %rax
movq (%rax), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, 0x88(%rsp)
jle 0x9bde8
movq 0x88(%rsp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
jne 0x9bdc9
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x88(%rsp), %rsi
shlq $0x3, %rsi
callq 0xd7ce0
jmp 0x9bde6
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x88(%rsp), %rsi
shlq $0x3, %rsi
callq 0xd2340
jmp 0x9bde8
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rax
movq $0x0, 0x20(%rax)
movq 0x80(%rsp), %rax
leaq 0x3c015(%rip), %rcx     # 0xd7e20
movq %rcx, 0x20(%rax)
movq 0x80(%rsp), %rax
leaq 0x3c0e2(%rip), %rcx     # 0xd7f00
movq %rcx, 0x28(%rax)
movq 0x98(%rsp), %rax
movq 0x740(%rax), %rdi
movq 0x80(%rsp), %rsi
callq 0x11230
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nop