// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_vector_append
static s7_pointer g_vector_append(s7_scheme *sc, s7_pointer args)
                {
                    /* returns a one-dimensional vector.  To handle multidimensional vectors, we'd need to
                     *   ensure all the dimensional data matches (rank, size of each dimension except the last etc),
                     *   which is too much trouble.
                     */
#define H_vector_append "(vector-append . vectors) returns a new (1-dimensional) vector containing the elements of its vector arguments."
#define Q_vector_append sc->pcl_v

                    s7_pointer p;
                    int32_t i;

                    if (is_null(args))
                        return(make_simple_vector(sc, 0));

                    for (i = 0, p = args; is_pair(p); p = cdr(p), i++)
                    {
                        s7_pointer x;
                        x = car(p);
                        if (!is_any_vector(x))
                        {
                            if (has_active_methods(sc, x))
                            {
                                s7_pointer func;
                                func = find_method(sc, find_let(sc, x), sc->vector_append_symbol);
                                if (func != sc->undefined)
                                {
                                    int32_t k;
                                    s7_pointer v, y;
                                    if (i == 0)
                                        return(s7_apply_function(sc, func, args));
                                    /* we have to copy the arglist here */
                                    sc->temp9 = make_list(sc, i, sc->F);
                                    for (k = 0, y = args, v = sc->temp9; k < i; k++, y = cdr(y), v = cdr(v))
                                        set_car(v, car(y));
                                    v = g_vector_append(sc, sc->temp9);
                                    y = s7_apply_function(sc, func, cons(sc, v, p));
                                    sc->temp9 = sc->nil;
                                    return(y);
                                }
                            }
                            return(wrong_type_argument(sc, sc->vector_append_symbol, i + 1, x, T_VECTOR));
                        }
                    }
                    return(vector_append(sc, args, type(car(args)), sc->vector_append_symbol));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq %rsi, 0x110(%rdi)
je 0x7f846
movq %rsi, (%rsp)
cmpb $0x1, (%rsi)
jne 0x7f81e
xorl %r15d, %r15d
movq (%rsp), %r14
movq 0x8(%r14), %r12
movzbl (%r12), %eax
leaq 0xd35c5(%rip), %rcx     # 0x152c20
movb (%rax,%rcx), %bpl
testb %bpl, %bpl
jne 0x7f804
testb $0x40, 0x3(%r12)
je 0x7f786
cmpb $0x1, 0x24c(%rbx)
jne 0x7f786
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9a55
movq 0x1648(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x99ef
movq 0x128(%rbx), %rcx
cmpq %rcx, %rax
je 0x7f781
movq %rcx, 0x10(%rsp)
testq %r15, %r15
movq %rax, 0x8(%rsp)
je 0x7f765
movq 0x120(%rbx), %rdx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3c5b5
movq %rax, 0x538(%rbx)
movq %r15, %rcx
movq (%rsp), %rdx
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rax)
movq 0x10(%rdx), %rdx
movq 0x10(%rax), %rax
decq %rcx
jne 0x7f6e1
movq 0x538(%rbx), %rsi
movq %rbx, %rdi
callq 0x7f619
movq %rax, %r13
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x7f720
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rdx
movq $0x200001, (%rdx)       # imm = 0x200001
movq %r13, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xbd41
movq %rax, %r13
movq 0x110(%rbx), %rax
movq %rax, 0x538(%rbx)
jmp 0x7f777
movq %rbx, %rdi
movq %rax, %rsi
movq (%rsp), %rdx
callq 0xbd41
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0x7f804
movq 0x1648(%rbx), %rax
movq 0x8(%rax), %r13
cmpq $0x7fe, %r15            # imm = 0x7FE
ja 0x7f7a8
leaq 0xcf1af(%rip), %rax     # 0x14e950
movq 0x8(%rax,%r15,8), %rdx
jmp 0x7f7e5
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x7f7c0
movq %rbx, %rdi
callq 0xb389
leaq 0x1(%r15), %rax
movq 0x90(%rbx), %rcx
leaq -0x8(%rcx), %rdx
movq %rdx, 0x90(%rbx)
movq -0x8(%rcx), %rdx
movq $0xb, (%rdx)
movq %rax, 0x8(%rdx)
movq 0x140(%rbx), %r8
movq 0xd3315(%rip), %r9      # 0x152b08
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rcx
callq 0xb31d
movq %rax, %r13
testb %bpl, %bpl
je 0x7f94c
movq 0x10(%r14), %r14
incq %r15
cmpb $0x1, (%r14)
je 0x7f64b
movq (%rsp), %rsi
movq 0x8(%rsi), %rax
movzbl (%rax), %edx
movq 0x1648(%rbx), %rcx
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1078b9
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x7f85e
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r13
movq $0x200015, (%r13)       # imm = 0x200015
movq $0x0, 0x8(%r13)
cmpq $0x0, 0x838(%rbx)
jne 0x7f8ca
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%rbx)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0x7f8a8
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%rbx), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%rbx)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%r13)
movq (%rax), %rdx
movq %rdx, 0x10(%r13)
movq %rcx, 0x20(%rax)
leaq -0x1e5dd(%rip), %rax    # 0x61325
movq %rax, 0x20(%r13)
leaq -0x1e5df(%rip), %rax    # 0x6132e
movq %rax, 0x28(%r13)
movq 0x740(%rbx), %rbx
movq 0x8(%rbx), %rsi
cmpq %rsi, 0x10(%rbx)
jne 0x7f939
leaq (%rsi,%rsi), %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
shlq $0x4, %rsi
callq 0x9510
movq %rax, (%rbx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%rbx)
movq %r13, (%rax,%rcx,8)
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq