// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: make_vector_1
static s7_pointer make_vector_1(s7_scheme *sc, s7_int len, bool filled, uint8_t typ)
                {
                    s7_pointer x;

                    if (len < 0)
                        return(wrong_type_argument_with_type(sc, sc->make_vector_symbol, 1, wrap_integer1(sc, len), a_non_negative_integer_string));
                    if (len > sc->max_vector_length)
                        return(out_of_range(sc, sc->make_vector_symbol, small_int(1), wrap_integer1(sc, len), its_too_large_string));

                    /* this has to follow the error checks! (else garbage in free_heap temps portion confuses GC when "vector" is finalized) */

                    new_cell(sc, x, typ | T_SAFE_PROCEDURE);
                    vector_length(x) = len;
                    if (len == 0)
                    {
                        vector_block(x) = mallocate_vector(sc, 0);
                        vector_elements(x) = NULL;
                        if (typ == T_VECTOR) set_has_simple_elements(x);
                    }
                    else
                    {
                        block_t *b;
                        if (typ == T_VECTOR)
                        {
                            b = mallocate_vector(sc, len * sizeof(s7_pointer));
                            vector_block(x) = b;
                            vector_elements(x) = (s7_pointer *)block_data(b);
                            vector_getter(x) = default_vector_getter;
                            vector_setter(x) = default_vector_setter;
                            if (filled)
                                s7_vector_fill(sc, x, sc->nil);
                        }
                        else
                        {
                            if (typ == T_FLOAT_VECTOR)
                            {
                                b = mallocate_vector(sc, len * sizeof(s7_double));
                                vector_block(x) = b;
                                float_vector_floats(x) = (s7_double *)block_data(b);
                                if (filled)
                                {
                                    if (STEP_8(len))
                                        memclr64((void *)vector_elements(x), len * sizeof(s7_double));
                                    else memclr((void *)vector_elements(x), len * sizeof(s7_double));
                                }
                                vector_getter(x) = float_vector_getter;
                                vector_setter(x) = float_vector_setter;
                            }
                            else
                            {
                                if (typ == T_INT_VECTOR)
                                {
                                    b = mallocate_vector(sc, len * sizeof(s7_int));
                                    vector_block(x) = b;
                                    int_vector_ints(x) = (s7_int *)block_data(b);
                                    if (filled)
                                    {
                                        if (STEP_8(len))
                                            memclr64((void *)vector_elements(x), len * sizeof(s7_int));
                                        else memclr((void *)vector_elements(x), len * sizeof(s7_int));
                                    }
                                    vector_getter(x) = int_vector_getter;
                                    vector_setter(x) = int_vector_setter;
                                }
                                else
                                {
#if S7_DEBUGGING
                                    if (typ != T_BYTE_VECTOR)
                                        fprintf(stderr, "%s: typ=%d\n", __func__, (int)typ);
#endif
                                    b = mallocate(sc, len);
                                    vector_block(x) = b;
                                    byte_vector_bytes(x) = (uint8_t *)block_data(b);
                                    vector_getter(x) = byte_vector_getter;
                                    vector_setter(x) = byte_vector_setter;
                                    if (filled)
                                    {
                                        if (STEP_8(len))
                                            memclr64((void *)(byte_vector_bytes(x)), len);
                                        else memclr((void *)(byte_vector_bytes(x)), len);
                                    }}}}}
                    vector_set_dimension_info(x, NULL);
                    return(x);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
js 0x3a7df
cmpq %r15, 0x2a0(%r14)
jge 0x3a821
movq 0x1318(%r14), %rax
movq 0x8(%rax), %rax
movq 0x10c1d7(%rip), %rcx    # 0x146958
movq 0x1f00(%r14), %rdx
movq %r15, 0x8(%rdx)
movq 0x1ee8(%r14), %rdx
movq 0x1f00(%r14), %rsi
movq 0x11029f(%rip), %rdi    # 0x14aa40
movq 0x10(%rdx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdi, 0x8(%rax)
movq 0x1948(%r14), %rbx
movq 0x1ee8(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x38dfa
jmp 0x3ac4c
movq 0x1318(%r14), %rax
movq 0x8(%rax), %rsi
movq 0x10c167(%rip), %rdx    # 0x146958
movq 0x1f00(%r14), %rax
movq %r15, 0x8(%rax)
movq 0x1f00(%r14), %rcx
movq 0x140(%r14), %r8
movq 0x1183c7(%rip), %r9     # 0x152bd8
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa4e4
movl %ecx, %r12d
movl %edx, %ebp
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0x3a845
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rbx
movzbl %r12b, %eax
leaq 0x200000(%rax), %rcx
movq %rcx, (%rbx)
movq %r15, 0x8(%rbx)
testq %r15, %r15
je 0x3a8a4
cmpb $0x17, %r12b
je 0x3a946
cmpl $0x16, %eax
je 0x3a925
cmpl $0x15, %eax
jne 0x3a967
shlq $0x3, %r15
testq %r15, %r15
jle 0x3ab03
movq %r14, %rdi
movq %r15, %rsi
callq 0x9357
jmp 0x3ab69
movq 0x838(%r14), %rax
testq %rax, %rax
jne 0x3a8ef
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r14)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3a8cd
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r14)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%rbx)
movq %rcx, 0x10(%rbx)
cmpb $0x15, %r12b
jne 0x3ac40
orb $0x1, 0x7(%rbx)
jmp 0x3ac40
leaq (,%r15,8), %r12
testq %r12, %r12
jle 0x3a9d5
movq %r14, %rdi
movq %r12, %rsi
callq 0x9357
jmp 0x3aa3b
leaq (,%r15,8), %r12
testq %r12, %r12
jle 0x3aa6c
movq %r14, %rdi
movq %r12, %rsi
callq 0x9357
jmp 0x3aad2
movq %r14, %rdi
movq %r15, %rsi
callq 0x9357
movq %rax, 0x18(%rbx)
movq (%rax), %r14
movq %r14, 0x10(%rbx)
leaq 0x5ef4e(%rip), %rax     # 0x998d2
movq %rax, 0x20(%rbx)
leaq 0x5ef57(%rip), %rax     # 0x998e6
movq %rax, 0x28(%rbx)
testb %bpl, %bpl
je 0x3ac40
movq %r15, %r12
andq $0x7, %r12
je 0x3ac58
cmpq $0x8, %r15
jb 0x3ac86
movabsq $0x7ffffffffffffff8, %rax # imm = 0x7FFFFFFFFFFFFFF8
andq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8270
addq %r15, %r14
jmp 0x3ac89
movq 0x838(%r14), %rax
testq %rax, %rax
jne 0x3aa20
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r14)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3a9fe
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r14)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%rbx)
movq (%rax), %rdi
movq %rdi, 0x10(%rbx)
testb %bpl, %bpl
je 0x3abe0
testb $0x7, %r15b
je 0x3abaa
testq %r12, %r12
je 0x3abe0
xorl %esi, %esi
movq %r12, %rdx
jmp 0x3abdb
movq 0x838(%r14), %rax
testq %rax, %rax
jne 0x3aab7
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r14)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3aa95
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r14)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%rbx)
movq (%rax), %rdi
movq %rdi, 0x10(%rbx)
testb %bpl, %bpl
je 0x3ac2a
testb $0x7, %r15b
je 0x3abf4
testq %r12, %r12
je 0x3ac2a
xorl %esi, %esi
movq %r12, %rdx
jmp 0x3ac25
movq 0x838(%r14), %rax
testq %rax, %rax
jne 0x3ab4e
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r14)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3ab2c
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r14)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%rbx)
movq (%rax), %rax
movq %rax, 0x10(%rbx)
leaq 0x216ce(%rip), %rax     # 0x5c249
movq %rax, 0x20(%rbx)
leaq 0x216cc(%rip), %rax     # 0x5c252
movq %rax, 0x28(%rbx)
testb %bpl, %bpl
je 0x3ac40
movq 0x110(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3b0e4
jmp 0x3ac40
testq %r12, %r12
je 0x3abe0
movabsq $0x1ffffffffffffff8, %rax # imm = 0x1FFFFFFFFFFFFFF8
andq %rax, %r15
cmpq $0x9, %r15
movl $0x8, %eax
cmovaeq %r15, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
xorl %esi, %esi
callq 0x8270
leaq 0x5ec4e(%rip), %rax     # 0x99835
movq %rax, 0x20(%rbx)
leaq 0x5eca9(%rip), %rax     # 0x9989b
jmp 0x3ac3c
testq %r12, %r12
je 0x3ac2a
movabsq $0x1ffffffffffffff8, %rax # imm = 0x1FFFFFFFFFFFFFF8
andq %rax, %r15
cmpq $0x9, %r15
movl $0x8, %eax
cmovaeq %r15, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
xorl %esi, %esi
callq 0x8270
leaq 0x418(%rip), %rax       # 0x3b049
movq %rax, 0x20(%rbx)
leaq 0x46a(%rip), %rax       # 0x3b0a6
movq %rax, 0x28(%rbx)
movq 0x18(%rbx), %rax
movq $0x0, 0x20(%rax)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x8, %r15
jb 0x3ac40
shrq $0x3, %r15
cmpq $0x9, %r15
movl $0x8, %eax
cmovaeq %r15, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
movq %r14, %rdi
xorl %esi, %esi
jmp 0x3ac91
movq %r15, %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x8270
jmp 0x3ac40