// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: g_make_vector_1
static s7_pointer g_make_vector_1(s7_scheme *sc, s7_pointer args, s7_pointer caller)
                {
                    s7_int len;
                    s7_pointer x, fill, vec, typf;
                    int32_t result_type = T_VECTOR;

                    fill = sc->unspecified;
                    typf = sc->T;
                    x = car(args);
                    if (s7_is_integer(x))
                    {
                        len = s7_integer(x);
                        if (len < 0)
                            return(wrong_type_argument_with_type(sc, caller, 1, x, a_non_negative_integer_string));
                    }
                    else
                    {
                        if (!(is_pair(x)))
                            return(method_or_bust_with_type(sc, x, caller, args, wrap_string(sc, "an integer or a list of integers", 32), 1));

                        if (!s7_is_integer(car(x)))
                            return(wrong_type_argument_with_type(sc, caller, 1, car(x), wrap_string(sc, "each dimension should be an integer", 35)));
                        if (is_null(cdr(x)))
                            len = s7_integer(car(x));
                        else len = multivector_length(sc, x, caller);
                    }

                    if (is_pair(cdr(args)))
                    {
                        fill = cadr(args);
                        if (caller == sc->make_int_vector_symbol)
                            result_type = T_INT_VECTOR;
                        else
                        {
                            if (caller == sc->make_float_vector_symbol)
                                result_type = T_FLOAT_VECTOR;
                            else
                            {
                                if (caller == sc->make_byte_vector_symbol)
                                    result_type = T_BYTE_VECTOR;
                            }
                        }
                        if (is_pair(cddr(args)))
                        {
                            typf = caddr(args);
                            if ((!is_c_function(typf)) &&
                                    (!is_any_closure(typf)) &&
                                    (typf != sc->T))
                                return(wrong_type_argument_with_type(sc, caller, 3, typf, wrap_string(sc, "a built-in procedure, a closure or #t", 37)));
                            if (is_any_closure(typf))
                            {
                                if (!is_symbol(find_closure(sc, typf, closure_let(typf))))
                                    return(wrong_type_argument_with_type(sc, caller, 3, typf, wrap_string(sc, "type function must have a name", 30)));
                            }
                            else
                            {
                                if (is_c_function(typf))
                                {
                                    if (typf == slot_value(global_slot(sc->is_float_symbol)))
                                        result_type = T_FLOAT_VECTOR;
                                    else
                                    {
                                        if (typf == slot_value(global_slot(sc->is_integer_symbol)))
                                            result_type = (WITH_GMP) ? T_VECTOR : T_INT_VECTOR;
                                        else
                                        {
                                            if (typf == slot_value(global_slot(sc->is_byte_symbol)))
                                                result_type = T_BYTE_VECTOR;
                                            else
                                            {
                                                s7_pointer sig;
                                                if (!c_function_name(typf))
                                                    return(wrong_type_argument_with_type(sc, caller, 3, typf, wrap_string(sc, "type procedure must have a name", 31)));
                                                if (!c_function_marker(typf))
                                                    c_function_set_marker(typf, mark_vector_1);
                                                if (!c_function_symbol(typf))
                                                    c_function_symbol(typf) = make_symbol(sc, c_function_name(typf));
                                                sig = c_function_signature(typf);
                                                if ((sig != sc->pl_bt) &&
                                                        (is_pair(sig)))
                                                {
                                                    if ((car(sig) != sc->is_boolean_symbol) || (cadr(sig) != sc->T) || (!is_null(cddr(sig))))
                                                        return(wrong_type_argument_with_type(sc, caller, 3, typf, wrap_string(sc, "type is not a boolean procedure", 31)));
                                                }}}}}}}}
                    /* before making the new vector, if fill is specified and the vector is typed, we have to check for a type error.
                     *    otherwise we can end up with a vector whose elements are NULL, causing a segfault in the  gc.
                     */
                    if ((result_type == T_VECTOR) &&  /* don't put this after the make_vector_1! */
                            (!s7_is_boolean(typf)) &&
                            (s7_apply_function(sc, typf, set_plist_1(sc, fill)) == sc->F))
                        s7_wrong_type_arg_error(sc, "make-vector", 3, fill,
                                (is_c_function(typf)) ? c_function_name(typf) : symbol_name(find_closure(sc, typf, closure_let(typf))));

                    vec = make_vector_1(sc, len, NOT_FILLED, result_type);

                    if ((result_type == T_VECTOR) &&
                            (!s7_is_boolean(typf)))
                    {
                        set_typed_vector(vec);
                        typed_vector_set_typer(vec, typf);

                        if ((is_c_function(typf)) &&
                                (c_function_has_simple_elements(typf)))
                            set_has_simple_elements(vec);
                    }

                    s7_vector_fill(sc, vec, fill);

                    if ((is_pair(x)) &&
                            (is_pair(cdr(x))))
                        return(make_multivector(sc, vec, x));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq 0x118(%rdi), %r15
movq 0x130(%rdi), %r12
movq 0x8(%rsi), %r14
movzbl (%r14), %eax
cmpl $0x1, %eax
je 0x3c787
cmpl $0xb, %eax
jne 0x3c7b7
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jns 0x3c86a
movq 0x8(%rbp), %rsi
movq 0x10a1ea(%rip), %rdx    # 0x146958
movq 0x140(%rbx), %r8
movq 0x11645c(%rip), %r9     # 0x152bd8
movq %rbx, %rdi
movq %r14, %rcx
jmp 0x3c853
movq 0x8(%r14), %rcx
cmpb $0xb, (%rcx)
jne 0x3c80d
movq 0x10(%r14), %rax
cmpq 0x110(%rbx), %rax
je 0x3c866
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x99d1f
movq %rax, %rsi
jmp 0x3c86a
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r8
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xda95c(%rip), %rax     # 0x117138
movq %rax, 0x10(%r8)
movq $0x20, 0x8(%r8)
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movl $0x1, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe659
movq 0x8(%rbp), %rsi
movq 0x10a140(%rip), %rdx    # 0x146958
movq 0x140(%rbx), %r8
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rdi
movq (%rax,%rdi,8), %r9
leal 0x1(%rdi), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xda915(%rip), %rax     # 0x117159
movq %rax, 0x10(%r9)
movq $0x23, 0x8(%r9)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa4e4
movq 0x8(%rcx), %rsi
movq 0x10(%r13), %rax
cmpb $0x1, (%rax)
jne 0x3ca76
cmpq %rbp, 0x12f0(%rbx)
je 0x3c89d
cmpq %rbp, 0x12d8(%rbx)
je 0x3c8a4
xorl %ecx, %ecx
cmpq %rbp, 0x12d0(%rbx)
sete %cl
leal (%rcx,%rcx,2), %ecx
addl $0x15, %ecx
jmp 0x3c8a9
movl $0x16, %ecx
jmp 0x3c8a9
movl $0x17, %ecx
movq 0x8(%rax), %r12
movq 0x10(%rax), %rax
cmpb $0x1, (%rax)
jne 0x3ca6d
movq 0x8(%rax), %r15
movzbl (%r15), %edx
leaq 0x116317(%rip), %rax    # 0x152be0
movb (%rdx,%rax), %al
cmpq $0x2f, %rdx
jbe 0x3c9f2
testb %al, %al
jne 0x3c9f6
movq 0x11e0(%rbx), %rax
movq 0x10(%rax), %rax
cmpq 0x10(%rax), %r15
je 0x3cb82
movq 0x10d0(%rbx), %rax
movq 0x10(%rax), %rax
cmpq 0x10(%rax), %r15
je 0x3cb89
movq 0xfe0(%rbx), %rax
movq 0x10(%rax), %rax
cmpq 0x10(%rax), %r15
je 0x3cb90
movq 0x8(%r15), %rax
cmpq $0x0, (%rax)
je 0x3ccc6
cmpq $0x0, 0x60(%rax)
jne 0x3c941
leaq 0x202b4(%rip), %rdx     # 0x5cbed
movq %rdx, 0x60(%rax)
movq 0x8(%r15), %rax
cmpq $0x0, 0x58(%rax)
jne 0x3c96d
movq %rsi, (%rsp)
movq (%rax), %rsi
movq %rbx, %rdi
movl %ecx, %r13d
callq 0x9afc
movl %r13d, %ecx
movq (%rsp), %rsi
movq 0x8(%r15), %rdx
movq %rax, 0x58(%rdx)
movq 0x8(%r15), %rax
movq 0x38(%rax), %rax
cmpq 0x1a20(%rbx), %rax
je 0x3ca6d
cmpb $0x1, (%rax)
jne 0x3ca6d
movq 0x8(%rax), %rdx
cmpq 0xfd8(%rbx), %rdx
jne 0x3c9b6
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdx
cmpq 0x118(%rbx), %rdx
jne 0x3c9b6
movq 0x10(%rax), %rax
cmpq 0x110(%rbx), %rax
je 0x3ca6d
movq 0x8(%rbp), %rsi
movq 0x109fa7(%rip), %rdx    # 0x146968
movq 0x140(%rbx), %r8
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r9
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xda7d5(%rip), %rax     # 0x1171c2
jmp 0x3ccfd
testb %al, %al
je 0x3ca1c
movl %ecx, (%rsp)
movq %rsi, %r13
movq 0x18(%r15), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x99caa
cmpb $0xa, (%rax)
jne 0x3cb34
movq %r13, %rsi
movl (%rsp), %ecx
jmp 0x3ca6d
cmpq 0x118(%rbx), %r15
je 0x3ca6d
movq 0x8(%rbp), %rsi
movq 0x109f38(%rip), %rdx    # 0x146968
movq 0x140(%rbx), %r8
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r9
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xda721(%rip), %rax     # 0x11717d
movq %rax, 0x10(%r9)
movq $0x25, 0x8(%r9)
jmp 0x3cb77
cmpl $0x15, %ecx
jne 0x3cb95
cmpb $0x7, (%r15)
je 0x3cae8
movq 0x700(%rbx), %rax
movq %r12, 0x8(%rax)
movq 0x700(%rbx), %rdx
movq %rbx, %rdi
movq %rsi, %r13
movq %r15, %rsi
callq 0xaee6
movq %r13, %rsi
cmpq 0x120(%rbx), %rax
jne 0x3cae8
cmpb $0x30, (%r15)
jb 0x3cab4
movq 0x8(%r15), %rax
jmp 0x3cacb
movq 0x18(%r15), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x99caa
movq 0x8(%rax), %rax
addq $0x10, %rax
movq (%rax), %r8
leaq 0xd5936(%rip), %rsi     # 0x11240b
movl $0x3, %edx
movq %rbx, %rdi
movq %r12, %rcx
callq 0xd4e5
movq %r13, %rsi
movq %rbx, %rdi
xorl %edx, %edx
movl $0x15, %ecx
callq 0x3a74f
movq %rax, %r13
cmpb $0x7, (%r15)
je 0x3cba2
movzwl 0x6(%r13), %eax
movl %eax, %ecx
orl $0x2, %ecx
movw %cx, 0x6(%r13)
movq %r15, 0x28(%r13)
cmpb $0x30, (%r15)
jb 0x3cba2
testb $0x1, 0x7(%r15)
je 0x3cba2
orl $0x102, %eax            # imm = 0x102
movw %ax, 0x6(%r13)
jmp 0x3cba2
movq 0x8(%rbp), %rsi
movq 0x109e29(%rip), %rdx    # 0x146968
movq 0x140(%rbx), %r8
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r9
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xda638(%rip), %rax     # 0x1171a3
movq %rax, 0x10(%r9)
movq $0x1e, 0x8(%r9)
movq %rbx, %rdi
movq %r15, %rcx
jmp 0x3c853
movl $0x17, %ecx
jmp 0x3cb95
movl $0x16, %ecx
jmp 0x3cb95
movl $0x18, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3a74f
movq %rax, %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x3b0e4
cmpb $0x1, (%r14)
jne 0x3cc79
movq 0x10(%r14), %rax
cmpb $0x1, (%rax)
jne 0x3cc79
movq $-0x1, %r15
movl $0x1, %r12d
xorl %ebp, %ebp
xorl %esi, %esi
movq %r14, %rax
movq 0x10(%rax), %rax
addq $0x2, %r15
incq %r12
addq $0x10, %rsi
addq $0x8, %rbp
cmpb $0x1, (%rax)
je 0x3cbdb
movq %rbx, %rdi
callq 0x9357
leaq -0x1(%r12), %rcx
movq %rcx, 0x10(%rax)
movq (%rax), %rcx
addq %rcx, %rbp
movq %rbp, 0x18(%rax)
movb $0x0, 0xc(%rax)
movq 0x110(%rbx), %rdx
cmpq %r14, %rdx
je 0x3cc42
movq %rcx, %rsi
movq 0x8(%r14), %rdi
cmpb $0xb, (%rdi)
jne 0x3cc30
movq 0x8(%rdi), %rdi
jmp 0x3cc32
xorl %edi, %edi
movq %rdi, (%rsi)
movq 0x10(%r14), %r14
addq $0x8, %rsi
cmpq %rdx, %r14
jne 0x3cc21
movl $0x1, %edx
movq %rdx, (%rcx,%r15,8)
imulq -0x10(%rcx,%r12,8), %rdx
decq %r12
decq %r15
cmpq $0x1, %r12
ja 0x3cc47
movq 0x120(%rbx), %rcx
movq %rcx, 0x20(%rax)
movq 0x18(%r13), %rcx
movq %rax, 0x20(%rcx)
movq 0x790(%rbx), %rbx
jmp 0x3cc80
movq 0x740(%rbx), %rbx
movq (%rbx), %rax
movq 0x10(%rbx), %rsi
cmpq 0x8(%rbx), %rsi
jne 0x3cca8
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 %r13, (%rax,%rsi,8)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbp), %rsi
movq 0x109c97(%rip), %rdx    # 0x146968
movq 0x140(%rbx), %r8
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %r9
leal 0x1(%rcx), %eax
andl $0x7, %eax
movl %eax, 0x7dc(%rbx)
leaq 0xdee9d(%rip), %rax     # 0x11bb9a
movq %rax, 0x10(%r9)
movq $0x1f, 0x8(%r9)
jmp 0x3cb77