// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: g_vector_to_list
static s7_pointer g_vector_to_list(s7_scheme *sc, s7_pointer args)
                {
                    s7_int i, start = 0, end;
                    s7_pointer p, vec;
#define H_vector_to_list "(vector->list v (start 0) end) returns the elements of the vector v as a list; (map values v)"
#define Q_vector_to_list s7_make_signature(sc, 4, sc->is_proper_list_symbol, sc->is_vector_symbol, sc->is_integer_symbol, sc->is_integer_symbol)

                    vec = car(args);
                    if (!is_any_vector(vec))
                        return(method_or_bust_one_arg(sc, vec, sc->vector_to_list_symbol, args, T_VECTOR));

                    end = vector_length(vec);
                    if (!is_null(cdr(args)))
                    {
                        p = start_and_end(sc, sc->vector_to_list_symbol, args, 2, &start, &end);
                        if (p != sc->unused) return(p);
                        if (start == end) return(sc->nil);
                    }
                    if ((end - start) > sc->max_list_length)
                        return(out_of_range(sc, sc->vector_to_list_symbol, small_int(1), car(args), its_too_large_string));

                    if ((start == 0) && (end == vector_length(vec)))
                        return(s7_vector_to_list(sc, vec));

                    sc->w = sc->nil;
                    for (i = end - 1; i >= start; i--)
                        sc->w = cons(sc, vector_getter(vec)(sc, vec, i), sc->w);
                    p = sc->w;
                    sc->w = sc->nil;
                    return(p);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq $0x0, 0x10(%rsp)
movq 0x8(%rsi), %r14
movzbl (%r14), %eax
leaq 0xd3123(%rip), %rcx     # 0x152c20
cmpb $0x0, (%rax,%rcx)
je 0x7fb62
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%r15), %rax
cmpq 0x110(%rbx), %rax
je 0x7fb8b
movq 0x1750(%rbx), %rsi
leaq 0x10(%rsp), %r8
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movq %r15, %rdx
movl $0x2, %ecx
callq 0xa0e7c
movq %rax, %r12
cmpq 0x140(%rbx), %rax
jne 0x7fcab
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x7fb8b
movq 0x110(%rbx), %r12
jmp 0x7fcab
movq 0x1750(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl $0x15, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9b739
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %r13
movq %r12, %rax
subq %r13, %rax
cmpq 0x2b0(%rbx), %rax
jle 0x7fc06
movq 0x1750(%rbx), %rax
movq 0x8(%rax), %rax
movq 0xceda2(%rip), %rcx     # 0x14e958
movq 0x8(%r15), %rdx
movq 0xd2e7f(%rip), %rsi     # 0x152a40
movq 0x1ee8(%rbx), %rdi
movq 0x10(%rdi), %rdi
movq %rax, 0x8(%rdi)
movq 0x10(%rdi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rsi, 0x8(%rax)
movq 0x1948(%rbx), %r12
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b366
jmp 0x7fcab
testq %r13, %r13
jne 0x7fc2a
cmpq 0x8(%r14), %r12
jne 0x7fc2a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3e13a
movq 0x110(%rbx), %rax
movq %rax, 0x4d8(%rbx)
cmpq %r13, %r12
jle 0x7fc96
decq %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *0x20(%r14)
movq %rax, %r15
movq 0x4d8(%rbx), %rbp
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x7fc6f
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r15, 0x8(%rax)
movq %rbp, 0x10(%rax)
jmp 0x7fc31
movq 0x4d8(%rbx), %r12
movq 0x110(%rbx), %rax
movq %rax, 0x4d8(%rbx)
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq