// File: /workspace/github_c_makefile_star2_O2/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 $0x58, %rsp
movq %rcx, 0x18(%rsp)
movq %rdi, %rbx
movq 0x50(%rdi), %rax
movq %rsi, 0x10(%rax)
movq 0x50(%rdi), %rax
movq $0x1, 0x18(%rax)
addq $0x20, 0x50(%rdi)
xorl %eax, %eax
movl %edx, 0x14(%rsp)
cmpl $0x17, %edx
sete %al
leaq 0xb(%rax,%rax), %rax
movq %rax, 0x40(%rsp)
pushq $0x1
popq %rbp
xorl %r12d, %r12d
movq %rsi, 0x50(%rsp)
movq %rsi, %r15
cmpb $0x1, (%r15)
jne 0xcb4c0
movq 0x8(%r15), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcb7e8
movq %rax, %r13
cmpb $0x15, 0x14(%rsp)
je 0xcb382
testq %r13, %r13
jle 0xcb382
movzbl (%r14), %eax
cmpl $0x1c, %eax
je 0xcb389
cmpl $0x1b, %eax
jne 0xcb3b2
jmp 0xcb3be
testq %r13, %r13
jns 0xcb3b2
jmp 0xcb3e2
testb $0x40, 0x3(%r14)
je 0xcb3be
cmpb $0x1, 0x24c(%rbx)
jne 0xcb3be
movq %rbx, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
callq 0x888f
cmpq 0x128(%rbx), %rax
je 0xcb3be
addq %r13, %r12
movq 0x10(%r15), %r15
incq %rbp
jmp 0xcb34a
movq 0x18(%rsp), %rax
movq 0x8(%rax), %r15
cmpq $0x7ff, %rbp            # imm = 0x7FF
ja 0xcb404
leaq 0x4a579(%rip), %rax     # 0x115950
movq (%rax,%rbp,8), %rdx
movq 0x40(%rsp), %r12
jmp 0xcb442
movq 0x18(%rsp), %rax
movq 0x8(%rax), %r15
cmpq $0x7ff, %rbp            # imm = 0x7FF
ja 0xcb456
leaq 0x4a555(%rip), %rax     # 0x115950
movq (%rax,%rbp,8), %rdx
jmp 0xcb48f
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
movq 0x40(%rsp), %r12
ja 0xcb428
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rdx
movq $0xb, (%rdx)
movq %rbp, 0x8(%rdx)
movq 0x140(%rbx), %r8
leaq 0x4e610(%rip), %rax     # 0x119a60
movq (%rax,%r12,8), %r9
jmp 0xcb4af
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xcb475
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rdx
movq $0xb, (%rdx)
movq %rbp, 0x8(%rdx)
movq 0x140(%rbx), %r8
cmpb $0x1, (%r14)
leaq 0x56777(%rip), %rax     # 0x121c18
leaq 0x4e768(%rip), %rcx     # 0x119c10
cmoveq %rax, %rcx
movq (%rcx), %r9
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x9bbb
xorl %r12d, %r12d
cmpq 0x2a0(%rbx), %r12
jle 0xcb573
addq $-0x20, 0x50(%rbx)
movq 0x1948(%rbx), %r14
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x1c47a(%rip), %rcx     # 0xe7977
movq %rcx, 0x10(%rax)
movq $0x46, 0x8(%rax)
movq 0x1f00(%rbx), %rcx
movq %r12, 0x8(%rcx)
movq 0x1f00(%rbx), %rcx
movq 0x2a0(%rbx), %rdx
movq 0x1f08(%rbx), %rsi
movq %rdx, 0x8(%rsi)
movq 0x1f08(%rbx), %rdx
movq 0x6f0(%rbx), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x6f0(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2cdc0
jmp 0xcb7d6
xorl %edx, %edx
movl 0x14(%rsp), %ebp
cmpb $0x15, %bpl
sete %dl
movzbl %bpl, %ecx
movq %rbx, %rdi
movq %r12, %rsi
movl %ecx, 0x24(%rsp)
callq 0x2e4a2
movq %rax, %r14
movq 0x740(%rbx), %rdi
movq %rax, %rsi
callq 0xb999
movq 0x10(%r14), %rax
movq %rax, 0x8(%rsp)
cmpb $0x15, %bpl
jne 0xcb5d1
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
jmp 0xcb636
cmpb $0x17, %bpl
je 0xcb5f3
cmpl $0x16, 0x24(%rsp)
jne 0xcb611
movq $0x0, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xcb624
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0xcb62d
movq $0x0, 0x30(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq $0x0, 0x8(%rsp)
testq %r12, %r12
jle 0xcb7d1
movq %r12, 0x48(%rsp)
movq 0x120(%rbx), %r15
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r12
cmpq 0x98(%rbx), %rax
ja 0xcb671
movq %rbx, %rdi
callq 0x9c27
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movl $0x200001, %ecx         # imm = 0x200001
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
movq %r12, 0x10(%rax)
movq 0x90(%rbx), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%rbx)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq %r15, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq 0x50(%rbx), %rax
movq %rdx, 0x40(%rsp)
movq %rdx, (%rax)
movq 0x50(%rbx), %rax
movq %r14, 0x18(%rsp)
movq %r14, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1, 0x18(%rax)
addq $0x20, 0x50(%rbx)
xorl %r12d, %r12d
movq 0x50(%rsp), %rcx
movq 0x18(%rsp), %r13
cmpb $0x1, (%rcx)
jne 0xcb784
movq %rcx, %r14
movq 0x8(%rcx), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcb7e8
testq %rax, %rax
jle 0xcb745
movq %rax, %rbp
movq %rax, 0x8(%r13)
movq 0x40(%rsp), %rdx
movq %r15, 0x8(%rdx)
movq 0xbb8(%rbx), %rsi
movq %rbx, %rdi
callq 0x32f28
andq $0x0, 0x8(%r13)
addq %rbp, %r12
movl 0x14(%rsp), %eax
cmpb $0x15, %al
jne 0xcb74a
movq 0x8(%rsp), %rax
leaq (%rax,%r12,8), %rax
movq %r14, %rcx
jmp 0xcb772
movq %r14, %rcx
jmp 0xcb77b
cmpb $0x16, %al
movq %r14, %rcx
je 0xcb75f
cmpl $0x17, 0x24(%rsp)
jne 0xcb76a
movq 0x38(%rsp), %rax
jmp 0xcb764
movq 0x30(%rsp), %rax
leaq (%rax,%r12,8), %rax
jmp 0xcb772
movq 0x28(%rsp), %rax
addq %r12, %rax
movq 0x18(%rsp), %rdx
movq %rax, 0x10(%rdx)
movq 0x10(%rcx), %rcx
jmp 0xcb6e8
addq $-0x20, 0x50(%rbx)
movl 0x14(%rsp), %eax
cmpb $0x15, %al
je 0xcb7ba
movq 0x38(%rsp), %rcx
movq %rcx, 0x8(%rsp)
cmpb $0x17, %al
je 0xcb7ba
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x16, 0x24(%rsp)
je 0xcb7ba
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %r14
movq 0x8(%rsp), %rax
movq %rax, 0x10(%r14)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%r14)
addq $-0x20, 0x50(%rbx)
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq