// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rcx
movq %rdi, %rbx
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %rax
cmpb $0x1, (%rax)
jne 0x634ff
movq 0x8(%rax), %r12
cmpb $0xb, (%r12)
jne 0x6354d
movb (%r14), %al
cmpb $0xb, %al
jne 0x63577
movq 0x8(%r14), %rsi
jmp 0x63590
movb (%r14), %al
cmpb $0xb, %al
jne 0x63570
movq 0x8(%r14), %r13
testq %r13, %r13
js 0x63620
cmpq 0x2a0(%rbx), %r13
jle 0x63654
movq 0x12f0(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xb2426(%rip), %rdx     # 0x115958
movq 0xb6507(%rip), %r8      # 0x119a40
movq %rbx, %rdi
movq %r14, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xcb8f
movq 0x12f0(%rbx), %rdx
pushq $0xb
popq %r8
pushq $0x2
popq %r9
movq %rbx, %rdi
movq %r12, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xcd70
movq 0xb23d9(%rip), %r12     # 0x115950
movq 0x12f0(%rbx), %rdx
cmpb $0x1, %al
jne 0x635d7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7b1c8
movq %rax, %rsi
xorl %r13d, %r13d
pushq $0x16
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2e4a2
movq %rax, %r15
cmpb $0xb, (%r12)
jne 0x635af
movq 0x8(%r12), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x7afdc
cmpb $0xb, (%r14)
je 0x636e8
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x7b3d5
jmp 0x636f7
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rsi
movq (%rax,%rsi,8), %r8
leal 0x1(%rsi), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0x7fadc(%rip), %rax     # 0xe30d8
movq %rax, 0x10(%r8)
movq $0x20, 0x8(%r8)
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xcf9a
movq 0x12f0(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xb2326(%rip), %rdx     # 0x115958
movq 0x140(%rbx), %r8
movq 0xbe598(%rip), %r9      # 0x121bd8
movq %rbx, %rdi
movq %r14, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x9bbb
leaq (,%r13,8), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2e974
movq %rax, %r12
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x63689
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r15
movq $0x200016, (%r15)       # imm = 0x200016
movq %r13, 0x8(%r15)
movq %r12, 0x18(%r15)
movq (%r12), %rdi
movq %rdi, 0x10(%r15)
testq %r13, %r13
je 0x636c9
movq %r14, %rsi
testb $0x7, %r13b
je 0x636c4
callq 0x78377
jmp 0x636c9
callq 0x7ae55
movq 0x18(%r15), %rax
andq $0x0, 0x20(%rax)
leaq 0x177a4(%rip), %rax     # 0x7ae7d
movq %rax, 0x20(%r15)
leaq 0x177ff(%rip), %rax     # 0x7aee3
movq %rax, 0x28(%r15)
movq 0x740(%rbx), %rdi
movq %r15, %rsi
callq 0xb999
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq