// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdi, %r15
testq %rsi, %rsi
js 0x3cd6f
cmpq %r14, 0x2a0(%r15)
jge 0x3cdb1
movq 0x1318(%r15), %rax
movq 0x8(%rax), %rax
movq 0x111c47(%rip), %rcx    # 0x14e958
movq 0x1f00(%r15), %rdx
movq %r14, 0x8(%rdx)
movq 0x1ee8(%r15), %rdx
movq 0x1f00(%r15), %rsi
movq 0x115d0f(%rip), %rdi    # 0x152a40
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(%r15), %rbx
movq 0x1ee8(%r15), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3b366
jmp 0x3d1e4
movq 0x1318(%r15), %rax
movq 0x8(%rax), %rsi
movq 0x111bd7(%rip), %rdx    # 0x14e958
movq 0x1f00(%r15), %rax
movq %r14, 0x8(%rax)
movq 0x1f00(%r15), %rcx
movq 0x140(%r15), %r8
movq 0x11de37(%rip), %r9     # 0x15abd8
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb31d
movl %ecx, %r12d
movl %edx, %ebp
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x3cdce
movq %r15, %rdi
callq 0xb389
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %rbx
movzbl %r12b, %eax
leaq 0x200000(%rax), %rcx
movq %rcx, (%rbx)
movq %r14, 0x8(%rbx)
testq %r14, %r14
je 0x3ce34
cmpb $0x17, %r12b
je 0x3ced8
cmpl $0x16, %eax
je 0x3ceb7
cmpl $0x15, %eax
jne 0x3cef9
shlq $0x3, %r14
testq %r14, %r14
jle 0x3d099
movq %r15, %rdi
movq %r14, %rsi
callq 0xa305
jmp 0x3d101
cmpq $0x0, 0x838(%r15)
jne 0x3ce7a
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%r15)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x3ce58
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
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 0x3d1d8
orb $0x1, 0x7(%rbx)
jmp 0x3d1d8
leaq (,%r14,8), %r12
testq %r12, %r12
jle 0x3cf67
movq %r15, %rdi
movq %r12, %rsi
callq 0xa305
jmp 0x3cfcf
leaq (,%r14,8), %r12
testq %r12, %r12
jle 0x3d000
movq %r15, %rdi
movq %r12, %rsi
callq 0xa305
jmp 0x3d068
movq %r15, %rdi
movq %r14, %rsi
callq 0xa305
movq %rax, 0x18(%rbx)
movq (%rax), %r15
movq %r15, 0x10(%rbx)
leaq 0x63288(%rip), %rax     # 0xa019e
movq %rax, 0x20(%rbx)
leaq 0x63291(%rip), %rax     # 0xa01b2
movq %rax, 0x28(%rbx)
testb %bpl, %bpl
je 0x3d1d8
movq %r14, %r12
andq $0x7, %r12
je 0x3d1f0
cmpq $0x8, %r14
jb 0x3d21e
movabsq $0x7ffffffffffffff8, %rax # imm = 0x7FFFFFFFFFFFFFF8
andq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x9270
addq %r14, %r15
jmp 0x3d221
cmpq $0x0, 0x838(%r15)
jne 0x3cfad
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%r15)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x3cf8b
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
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 0x3d178
testb $0x7, %r14b
je 0x3d142
testq %r12, %r12
je 0x3d178
xorl %esi, %esi
movq %r12, %rdx
jmp 0x3d173
cmpq $0x0, 0x838(%r15)
jne 0x3d046
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%r15)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x3d024
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
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 0x3d1c2
testb $0x7, %r14b
je 0x3d18c
testq %r12, %r12
je 0x3d1c2
xorl %esi, %esi
movq %r12, %rdx
jmp 0x3d1bd
cmpq $0x0, 0x838(%r15)
jne 0x3d0df
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%r15)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x3d0bd
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
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 0x24212(%rip), %rax     # 0x61325
movq %rax, 0x20(%rbx)
leaq 0x24210(%rip), %rax     # 0x6132e
movq %rax, 0x28(%rbx)
testb %bpl, %bpl
je 0x3d1d8
movq 0x110(%r15), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3d67b
jmp 0x3d1d8
testq %r12, %r12
je 0x3d178
movabsq $0x1ffffffffffffff8, %rax # imm = 0x1FFFFFFFFFFFFFF8
andq %rax, %r14
cmpq $0x9, %r14
movl $0x8, %eax
cmovaeq %r14, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
xorl %esi, %esi
callq 0x9270
leaq 0x62f82(%rip), %rax     # 0xa0101
movq %rax, 0x20(%rbx)
leaq 0x62fdd(%rip), %rax     # 0xa0167
jmp 0x3d1d4
testq %r12, %r12
je 0x3d1c2
movabsq $0x1ffffffffffffff8, %rax # imm = 0x1FFFFFFFFFFFFFF8
andq %rax, %r14
cmpq $0x9, %r14
movl $0x8, %eax
cmovaeq %r14, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
xorl %esi, %esi
callq 0x9270
leaq 0x417(%rip), %rax       # 0x3d5e0
movq %rax, 0x20(%rbx)
leaq 0x469(%rip), %rax       # 0x3d63d
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, %r14
jb 0x3d1d8
shrq $0x3, %r14
cmpq $0x9, %r14
movl $0x8, %eax
cmovaeq %r14, %rax
leaq -0x8(,%rax,8), %rdx
andq $-0x40, %rdx
addq $0x40, %rdx
movq %r15, %rdi
xorl %esi, %esi
jmp 0x3d229
movq %r14, %r12
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x9270
jmp 0x3d1d8