// File: /workspace/github_c_makefile_star2_O3/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), %r15
movq 0x10(%rsi), %rax
cmpb $0x1, (%rax)
jne 0x7b36f
movq 0x8(%rax), %r12
cmpb $0xb, (%r12)
jne 0x7b3f2
movb (%r15), %al
cmpb $0xb, %al
jne 0x7b420
movq 0x8(%r15), %rsi
jmp 0x7b43d
movb (%r15), %al
cmpb $0xb, %al
jne 0x7b419
movq 0x8(%r15), %r13
testq %r13, %r13
js 0x7b574
cmpq 0x2a0(%rbx), %r13
jle 0x7b5a8
movq 0x12f0(%rbx), %rax
movq 0x8(%rax), %rax
movq 0xcb5b2(%rip), %rcx     # 0x146958
movq 0xcf693(%rip), %rdx     # 0x14aa40
movq 0x1ee8(%rbx), %rsi
movq 0x10(%rsi), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r15, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rbx), %r14
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38dfa
jmp 0x7b71f
movq 0x12f0(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movl $0xb, %r8d
movl $0x2, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe42d
movq 0xcb530(%rip), %r12     # 0x146950
movq 0x12f0(%rbx), %rdx
cmpb $0x1, %al
jne 0x7b529
movq %rbx, %rdi
movq %r15, %rsi
callq 0x99d1f
movq %rax, %rsi
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %edx, %edx
movl $0x16, %ecx
callq 0x3a74f
movq %rax, %r14
cmpb $0xb, (%r12)
jne 0x7b45e
movq 0x8(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x99a75
movzbl (%r15), %eax
cmpl $0xb, %eax
je 0x7b6e4
xorl %r13d, %r13d
cmpl $0x1, %eax
jne 0x7b48d
movq %r15, %rax
incq %r13
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
je 0x7b481
movq %r13, %r12
shlq $0x4, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9357
movq %r13, 0x10(%rax)
movq (%rax), %rcx
leaq (%rcx,%r13,8), %rdx
movq %rdx, 0x18(%rax)
movb $0x0, 0xc(%rax)
movq 0x110(%rbx), %rdx
cmpq %r15, %rdx
je 0x7b4e2
movq %rcx, %rsi
movq 0x8(%r15), %rdi
cmpb $0xb, (%rdi)
jne 0x7b4d0
movq 0x8(%rdi), %rdi
jmp 0x7b4d2
xorl %edi, %edi
movq %rdi, (%rsi)
movq 0x10(%r15), %r15
addq $0x8, %rsi
cmpq %rdx, %r15
jne 0x7b4c1
testq %r13, %r13
jle 0x7b50a
incq %r13
addq $-0x8, %r12
movl $0x1, %edx
movq %rdx, (%rcx,%r12)
imulq -0x10(%rcx,%r13,8), %rdx
decq %r13
addq $-0x8, %r12
cmpq $0x1, %r13
ja 0x7b4f3
movq 0x120(%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x18(%r14), %rcx
movq %rax, 0x20(%rcx)
movq 0x790(%rbx), %rbx
jmp 0x7b6eb
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 0x9bbea(%rip), %rax     # 0x117138
movq %rax, 0x10(%r8)
movq $0x20, 0x8(%r8)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe659
movq 0x12f0(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0xcb3d2(%rip), %rdx     # 0x146958
movq 0x140(%rbx), %r8
movq 0xd7644(%rip), %r9      # 0x152bd8
movq %rbx, %rdi
movq %r15, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xa4e4
leaq (,%r13,8), %r15
testq %r15, %r15
jle 0x7b5c5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9357
movq %rax, %r12
jmp 0x7b630
movq 0x838(%rbx), %r12
testq %r12, %r12
jne 0x7b610
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, %r12
movq %rax, 0x838(%rbx)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x7b5ee
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x18(%r12), %rax
movq %rax, 0x838(%rbx)
movl $0x0, 0x8(%r12)
xorl %eax, %eax
movq %rax, (%r12)
movq %rax, 0x20(%r12)
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x7b64f
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r14
movq $0x200016, (%r14)       # imm = 0x200016
movq %r13, 0x8(%r14)
movq %r12, 0x18(%r14)
movq (%r12), %rdi
movq %rdi, 0x10(%r14)
testq %r13, %r13
je 0x7b6c2
testb $0x7, %r13b
je 0x7b68c
testq %r15, %r15
je 0x7b6c2
xorl %esi, %esi
movq %r15, %rdx
jmp 0x7b6bd
testq %r15, %r15
je 0x7b6c2
movabsq $0x1ffffffffffffff8, %rax # imm = 0x1FFFFFFFFFFFFFF8
andq %rax, %r13
cmpq $0x9, %r13
movl $0x8, %eax
cmovaeq %r13, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
xorl %esi, %esi
callq 0x8270
movq 0x18(%r14), %rax
movq $0x0, 0x20(%rax)
leaq 0x1e160(%rip), %rax     # 0x99835
movq %rax, 0x20(%r14)
leaq 0x1e1bb(%rip), %rax     # 0x9989b
movq %rax, 0x28(%r14)
movq 0x740(%rbx), %rbx
movq (%rbx), %rax
movq 0x10(%rbx), %rsi
cmpq 0x8(%rbx), %rsi
jne 0x7b713
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%rbx)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%rbx)
movq 0x10(%rbx), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%rbx)
movq %r14, (%rax,%rsi,8)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq