// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: vector_append
static s7_pointer vector_append(s7_scheme *sc, s7_pointer args, uint8_t typ, s7_pointer caller)
                {
                    s7_pointer new_vec;
                    s7_pointer *v_elements = NULL;
                    s7_double *fv_elements = NULL;
                    s7_int *iv_elements = NULL;
                    uint8_t *byte_elements = NULL;
                    s7_int len;

                    push_stack_no_let_no_code(sc, OP_GC_PROTECT, args);
                    len = total_sequence_length(sc, args, caller, (typ == T_VECTOR) ? T_FREE : ((typ == T_FLOAT_VECTOR) ? T_REAL : T_INTEGER));
                    if (len > sc->max_vector_length)
                    {
                        unstack(sc);
                        return(s7_error(sc, sc->out_of_range_symbol,
                                    set_elist_4(sc, wrap_string(sc, "~S new vector length, ~D, is larger than (*s7* 'max-vector-length): ~D", 70),
                                        caller,
                                        wrap_integer1(sc, len),
                                        wrap_integer2(sc, sc->max_vector_length))));
                    }
                    new_vec = make_vector_1(sc, len, (typ == T_VECTOR) ? FILLED : NOT_FILLED, typ);  /* might hit GC in loop below so we can't use NOT_FILLED here */
                    add_vector(sc, new_vec);

                    if (typ == T_VECTOR)
                        v_elements = vector_elements(new_vec);
                    else
                    {
                        if (typ == T_FLOAT_VECTOR)
                            fv_elements = float_vector_floats(new_vec);
                        else
                        {
                            if (typ == T_INT_VECTOR)
                                iv_elements = int_vector_ints(new_vec);
                            else byte_elements = byte_vector_bytes(new_vec);
                        }
                    }

                    if (len > 0)
                    {
                        s7_pointer p, pargs;
                        s7_int i;

                        pargs = list_2(sc, sc->F, new_vec); /* car set below */
                        push_stack_no_let(sc, OP_GC_PROTECT, new_vec, pargs);

                        for (i = 0, p = args; is_pair(p); p = cdr(p))
                        {
                            s7_int n;
                            s7_pointer x;
                            x = car(p);
                            n = sequence_length(sc, x);
                            if (n > 0)
                            {
                                vector_length(new_vec) = n;
                                set_car(pargs, x);
                                s7_copy_1(sc, sc->append_symbol, pargs);  /* not set_plist_2 here! */
                                vector_length(new_vec) = 0;               /* so GC doesn't march off the end */
                                i += n;
                                if (typ == T_VECTOR)
                                    vector_elements(new_vec) = (s7_pointer *)(v_elements + i);
                                else
                                {
                                    if (typ == T_FLOAT_VECTOR)
                                        float_vector_floats(new_vec) = (s7_double *)(fv_elements + i);
                                    else
                                    {
                                        if (typ == T_INT_VECTOR)
                                            int_vector_ints(new_vec) = (s7_int *)(iv_elements + i);
                                        else byte_vector_bytes(new_vec) = (uint8_t *)(byte_elements + i);
                                    }
                                }
                            }
                        }

                        unstack(sc);
                        /* free_cell(sc, pargs); */ /* this is trouble if any arg is openlet with append method -- e.g. block */

                        if (typ == T_VECTOR)
                            vector_elements(new_vec) = v_elements;
                        else
                        {
                            if (typ == T_FLOAT_VECTOR)
                                float_vector_floats(new_vec) = fv_elements;
                            else
                            {
                                if (typ == T_INT_VECTOR)
                                    int_vector_ints(new_vec) = iv_elements;
                                else byte_vector_bytes(new_vec) = byte_elements;
                            }
                        }
                        vector_length(new_vec) = len;
                    }
                    unstack(sc);
                    return(new_vec);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x20(%rsp)
movq 0x50(%rdi), %rax
movq %rsi, 0x10(%rax)
movq 0x50(%rdi), %rax
movq $0x1, 0x18(%rax)
movq %rdi, 0x8(%rsp)
addq $0x20, 0x50(%rdi)
xorl %eax, %eax
movl %edx, 0x4(%rsp)
cmpl $0x17, %edx
sete %cl
cmpb $0x1, (%rsi)
movq %rsi, 0x40(%rsp)
jne 0xfe889
movb %cl, %al
leaq 0xb(,%rax,2), %rax
movq %rax, 0x10(%rsp)
movl $0x1, %ebp
xorl %r15d, %r15d
movq %rsi, %r14
movq 0x8(%rsp), %rbx
movq 0x8(%r14), %r12
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xfec1c
movq %rax, %r13
cmpb $0x15, 0x4(%rsp)
je 0xfe72f
testq %r13, %r13
jle 0xfe72f
movzbl (%r12), %eax
cmpl $0x1c, %eax
je 0xfe736
cmpl $0x1b, %eax
jne 0xfe765
jmp 0xfe77a
testq %r13, %r13
jns 0xfe765
jmp 0xfe79e
testb $0x40, 0x3(%r12)
je 0xfe77a
movq 0x8(%rsp), %rax
cmpb $0x1, 0x24c(%rax)
jne 0xfe77a
movq %rbx, %rdi
movq %r12, %rsi
movq 0x20(%rsp), %rdx
callq 0x89ff
cmpq 0x128(%rbx), %rax
je 0xfe77a
addq %r13, %r15
movq 0x10(%r14), %r14
incq %rbp
cmpb $0x1, (%r14)
je 0xfe6fe
jmp 0xfe88c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %r15
cmpq $0x7ff, %rbp            # imm = 0x7FF
ja 0xfe7c5
leaq 0x481bd(%rip), %rax     # 0x146950
movq (%rax,%rbp,8), %rdx
movq 0x8(%rsp), %r14
jmp 0xfe803
movq 0x20(%rsp), %rax
movq 0x8(%rax), %r15
cmpq $0x7ff, %rbp            # imm = 0x7FF
ja 0xfe81c
leaq 0x48199(%rip), %rax     # 0x146950
movq (%rax,%rbp,8), %rdx
movq 0x8(%rsp), %r14
jmp 0xfe85a
movq 0x8(%rsp), %r14
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0xfe7e9
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rdx
movq $0xb, (%rdx)
movq %rbp, 0x8(%rdx)
movq 0x140(%r14), %r8
leaq 0x4c24f(%rip), %rax     # 0x14aa60
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %r9
jmp 0xfe87b
movq 0x8(%rsp), %r14
movq 0x90(%r14), %rax
cmpq 0x98(%r14), %rax
ja 0xfe840
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rdx
movq $0xb, (%rdx)
movq %rbp, 0x8(%rdx)
movq 0x140(%r14), %r8
cmpb $0x1, (%r12)
leaq 0x543ab(%rip), %rax     # 0x152c18
leaq 0x4c39c(%rip), %rcx     # 0x14ac10
cmoveq %rax, %rcx
movq (%rcx), %r9
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0xa4e4
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
cmpq 0x2a0(%r14), %r15
jle 0xfe945
addq $-0x20, 0x50(%r14)
movq 0x1948(%r14), %rbp
movq 0x820(%r14), %rax
movslq 0x7dc(%r14), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%r14)
leaq 0x1d108(%rip), %rcx     # 0x11b9d7
movq %rcx, 0x10(%rax)
movq $0x46, 0x8(%rax)
movq 0x1f00(%r14), %rcx
movq %r15, 0x8(%rcx)
movq 0x1f00(%r14), %rcx
movq 0x2a0(%r14), %rdx
movq 0x1f08(%r14), %rsi
movq %rdx, 0x8(%rsi)
movq 0x1f08(%r14), %rdx
movq 0x6f0(%r14), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq 0x20(%rsp), %rsi
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x6f0(%r14), %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x38dfa
jmp 0xfec0a
xorl %edx, %edx
movl 0x4(%rsp), %eax
cmpb $0x15, %al
sete %dl
movzbl %al, %ecx
movq %r14, %rdi
movq %r15, %rsi
movl %ecx, 0x1c(%rsp)
callq 0x3a74f
movq %rax, %rbp
movq 0x740(%r14), %r14
movq (%r14), %rax
movq 0x10(%r14), %rsi
cmpq 0x8(%r14), %rsi
jne 0xfe994
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%r14)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%r14)
movq 0x10(%r14), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r14)
movq %rbp, (%rax,%rsi,8)
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
cmpb $0x15, 0x4(%rsp)
jne 0xfe9d2
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x8(%rsp), %r13
jmp 0xfea3d
cmpb $0x17, 0x4(%rsp)
movq 0x8(%rsp), %r13
je 0xfe9fa
cmpl $0x16, 0x1c(%rsp)
jne 0xfea18
movq $0x0, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xfea2b
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0xfea34
movq $0x0, 0x30(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x10(%rsp)
testq %r15, %r15
jle 0xfec05
movq 0x120(%r13), %r14
movq 0x90(%r13), %rax
movq 0x110(%r13), %r12
cmpq 0x98(%r13), %rax
ja 0xfea73
movq %r13, %rdi
callq 0xa550
movq 0x90(%r13), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r13)
movq -0x8(%rax), %rax
movl $0x200001, %ecx         # imm = 0x200001
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
movq %r12, 0x10(%rax)
movq 0x90(%r13), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%r13)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq %r14, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq 0x50(%r13), %rax
movq %rdx, 0x20(%rsp)
movq %rdx, (%rax)
movq 0x50(%r13), %rax
movq %rbp, 0x10(%rax)
movq 0x50(%r13), %rax
movq $0x1, 0x18(%rax)
movq 0x50(%r13), %rax
addq $0x20, %rax
movq %rax, 0x50(%r13)
movq 0x40(%rsp), %rcx
cmpb $0x1, (%rcx)
jne 0xfebbd
movq $0x0, 0x8(%rsp)
movq %rbp, %r14
movq %rcx, %rbx
movq 0x8(%rcx), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0xfec1c
testq %rax, %rax
jle 0xfeb5f
movq %rax, %rbp
movq %rax, 0x8(%r14)
movq 0x20(%rsp), %rdx
movq %r12, 0x8(%rdx)
movq 0xbb8(%r13), %rsi
movq %r13, %r12
movq %r13, %rdi
callq 0x404ff
movq 0x8(%rsp), %rdx
addq %rbp, %rdx
movq %r14, %rbp
movq $0x0, 0x8(%r14)
cmpb $0x15, 0x4(%rsp)
movq %rdx, 0x8(%rsp)
jne 0xfeb67
movq 0x10(%rsp), %rax
leaq (%rax,%rdx,8), %rax
movq %rbx, %rcx
jmp 0xfeb94
movq %rbx, %rcx
movq %r14, %rbp
jmp 0xfeb9b
cmpb $0x16, 0x4(%rsp)
movq %rbx, %rcx
je 0xfeb8b
cmpl $0x17, 0x1c(%rsp)
movq %r12, %r13
jne 0xfebaa
movq 0x38(%rsp), %rax
movq 0x8(%rsp), %rdx
leaq (%rax,%rdx,8), %rax
jmp 0xfeb97
movq 0x30(%rsp), %rax
leaq (%rax,%rdx,8), %rax
movq %r12, %r13
movq %rax, 0x10(%rbp)
movq 0x10(%rcx), %rcx
cmpb $0x1, (%rcx)
je 0xfeaf6
jmp 0xfebb9
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rdx
addq %rdx, %rax
jmp 0xfeb97
movq 0x50(%r13), %rax
addq $-0x20, %rax
movq %rax, 0x50(%r13)
cmpb $0x15, 0x4(%rsp)
je 0xfebf8
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpb $0x17, 0x4(%rsp)
je 0xfebf8
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x16, 0x1c(%rsp)
je 0xfebf8
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbp)
movq %r15, 0x8(%rbp)
addq $-0x20, 0x50(%r13)
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq