// File: /workspace/github_c_makefile_star2_O1/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 %rsi, %r13
movq %rdi, %rbx
movq 0x50(%rdi), %rax
movq %rsi, 0x10(%rax)
movq 0x50(%rdi), %rax
movq $0x1, 0x18(%rax)
addq $0x20, 0x50(%rdi)
movq %rcx, 0x10(%rsp)
cmpb $0x1, (%rsi)
movl %edx, 0xc(%rsp)
jne 0x107aa0
xorl %eax, %eax
cmpb $0x17, %dl
sete %al
xorl %ecx, %ecx
cmpb $0x15, %dl
leaq 0xb(%rax,%rax), %rax
cmoveq %rcx, %rax
movq %rax, 0x40(%rsp)
movl $0x1, %ebp
movq %r13, %r15
movq $0x0, 0x38(%rsp)
movq 0x8(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x107def
movq %rax, %r14
cmpb $0x15, 0xc(%rsp)
je 0x10797b
testq %r14, %r14
jle 0x10797b
movzbl (%r12), %eax
cmpl $0x1b, %eax
je 0x10798c
cmpl $0x1c, %eax
jne 0x10797b
testb $0x40, 0x3(%r12)
je 0x10798c
cmpb $0x1, 0x24c(%rbx)
jne 0x10798c
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x99ef
cmpq 0x128(%rbx), %rax
je 0x10798c
testq %r14, %r14
js 0x1079ab
addq %r14, 0x38(%rsp)
movb $0x1, %al
jmp 0x107a89
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r14
cmpq $0x7ff, %rbp            # imm = 0x7FF
ja 0x1079cd
leaq 0x46fab(%rip), %rax     # 0x14e950
movq (%rax,%rbp,8), %rdx
jmp 0x107a06
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r14
cmpq $0x7ff, %rbp            # imm = 0x7FF
ja 0x107a1f
leaq 0x46f8c(%rip), %rax     # 0x14e950
movq (%rax,%rbp,8), %rdx
jmp 0x107a58
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x1079e5
movq %rbx, %rdi
callq 0xb389
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
movq 0x40(%rsp), %rax
leaq 0x4b047(%rip), %rcx     # 0x152a60
movq (%rcx,%rax,8), %r9
jmp 0x107a79
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x107a37
movq %rbx, %rdi
callq 0xb389
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, (%r12)
leaq 0x4b1a5(%rip), %rax     # 0x152c10
leaq 0x531a6(%rip), %rcx     # 0x15ac18
cmoveq %rcx, %rax
movq (%rax), %r9
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0xb31d
xorl %eax, %eax
testb %al, %al
je 0x107aa0
movq 0x10(%r15), %r15
incq %rbp
cmpb $0x1, (%r15)
je 0x107924
jmp 0x107aa9
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %r15
cmpq 0x2a0(%rbx), %r15
jle 0x107b61
addq $-0x20, 0x50(%rbx)
movq 0x1948(%rbx), %r12
movq 0x820(%rbx), %rax
movslq 0x7dc(%rbx), %rcx
movq (%rax,%rcx,8), %rax
incl %ecx
andl $0x7, %ecx
movl %ecx, 0x7dc(%rbx)
leaq 0x1cddc(%rip), %rcx     # 0x1248c7
movq %rcx, 0x10(%rax)
movq $0x46, 0x8(%rax)
movq 0x1f00(%rbx), %rcx
movq %r15, 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 0x10(%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 %r12, %rsi
callq 0x3b366
jmp 0x107ddd
xorl %edx, %edx
movl 0xc(%rsp), %eax
cmpb $0x15, %al
sete %dl
movzbl %al, %ecx
movq %rbx, %rdi
movq %r15, %rsi
movl %ecx, 0x1c(%rsp)
callq 0x3ccdf
movq %rax, %r12
movq 0x740(%rbx), %r14
movq 0x8(%r14), %rsi
cmpq %rsi, 0x10(%r14)
jne 0x107ba9
leaq (%rsi,%rsi), %rax
movq %rax, 0x8(%r14)
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x9510
movq %rax, (%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
movq %r12, (%rax,%rcx,8)
movq 0x10(%r12), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %eax
cmpb $0x15, %al
jne 0x107bea
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x107c49
cmpb $0x17, %al
je 0x107c09
cmpl $0x16, 0x1c(%rsp)
jne 0x107c26
movq $0x0, 0x20(%rsp)
movq (%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x107c38
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x107c41
movq $0x0, 0x28(%rsp)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, (%rsp)
testq %r15, %r15
jle 0x107dd8
movq 0x120(%rbx), %r14
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r15
cmpq 0x98(%rbx), %rax
ja 0x107c78
movq %rbx, %rdi
callq 0xb389
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 %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq 0x90(%rbx), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%rbx)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq %r14, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq 0x50(%rbx), %rax
movq %rdx, 0x40(%rsp)
movq %rdx, (%rax)
movq 0x50(%rbx), %rax
movq %r12, 0x10(%rsp)
movq %r12, 0x10(%rax)
movq 0x50(%rbx), %rax
movq $0x1, 0x18(%rax)
addq $0x20, 0x50(%rbx)
cmpb $0x1, (%r13)
jne 0x107d8d
xorl %r12d, %r12d
movq 0x10(%rsp), %r15
movq 0x8(%r13), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x107def
testq %rax, %rax
jle 0x107d7e
movq %rax, %r14
movq %rax, 0x8(%r15)
movq 0x40(%rsp), %rdx
movq %rbp, 0x8(%rdx)
movq 0xbb8(%rbx), %rsi
movq %rbx, %rdi
callq 0x42d53
addq %r14, %r12
movq $0x0, 0x8(%r15)
movl 0xc(%rsp), %eax
cmpb $0x15, %al
jne 0x107d50
movq (%rsp), %rax
leaq (%rax,%r12,8), %rax
movq %rax, 0x10(%r15)
jmp 0x107d7e
cmpb $0x16, %al
je 0x107d62
cmpl $0x17, 0x1c(%rsp)
jne 0x107d6d
movq 0x30(%rsp), %rax
jmp 0x107d67
movq 0x28(%rsp), %rax
leaq (%rax,%r12,8), %rax
jmp 0x107d75
movq 0x20(%rsp), %rax
addq %r12, %rax
movq 0x10(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq 0x10(%r13), %r13
cmpb $0x1, (%r13)
je 0x107cfc
addq $-0x20, 0x50(%rbx)
movl 0xc(%rsp), %eax
cmpb $0x15, %al
je 0x107dc0
movq 0x30(%rsp), %rcx
movq %rcx, (%rsp)
cmpb $0x17, %al
je 0x107dc0
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x16, 0x1c(%rsp)
je 0x107dc0
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %r12
movq (%rsp), %rax
movq %rax, 0x10(%r12)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%r12)
addq $-0x20, 0x50(%rbx)
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq