// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: s7_vector_copy
s7_pointer s7_vector_copy(s7_scheme *sc, s7_pointer old_vect)
#endif
                    {
                        s7_int i, len;
                        s7_pointer new_vect;

                        len = vector_length(old_vect);
                        if (is_normal_vector(old_vect))
                        {
                            s7_pointer *src, *dst;
                            if ((is_typed_vector(old_vect)) && (len > 0)) /* preserve the type info as well */
                            {
                                if (vector_rank(old_vect) > 1)
                                    new_vect = g_make_vector(sc, set_plist_3(sc, g_vector_dimensions(sc, list_1(sc, old_vect)), vector_element(old_vect, 0), typed_vector_typer(old_vect)));
                                else new_vect = g_make_vector(sc, set_plist_3(sc, make_integer(sc, len), vector_element(old_vect, 0), typed_vector_typer(old_vect)));
                            }
                            else
                            {
                                if (vector_rank(old_vect) > 1)
                                    new_vect = g_make_vector(sc, set_plist_1(sc, g_vector_dimensions(sc, list_1(sc, old_vect))));
                                else new_vect = make_simple_vector(sc, len);
                            }
                            /* here and in vector-fill! we have a problem with bignums -- should new bignums be allocated? (copy_list also) */
                            src = (s7_pointer *)vector_elements(old_vect);
                            dst = (s7_pointer *)vector_elements(new_vect);
                            for (i = len; i > 0; i--) *dst++ = *src++;
                            return(new_vect);
                        }

                        if (is_float_vector(old_vect))
                        {
                            s7_double *src, *dst;
                            if (vector_rank(old_vect) > 1)
                                new_vect = g_make_vector_1(sc, set_plist_2(sc, g_vector_dimensions(sc, set_plist_1(sc, old_vect)), real_zero), sc->make_float_vector_symbol);
                            else new_vect = make_simple_float_vector(sc, len);
                            src = (s7_double *)float_vector_floats(old_vect);
                            dst = (s7_double *)float_vector_floats(new_vect);
                            for (i = len; i > 0; i--) *dst++ = *src++;  /* same speed as memcpy(dst, src, len * sizeof(s7_double)); */
                            return(new_vect);
                        }

                        if (is_int_vector(old_vect))
                        {
                            s7_int *src, *dst;
                            if (vector_rank(old_vect) > 1)
                                new_vect = g_make_vector_1(sc, set_plist_2(sc, g_vector_dimensions(sc, set_plist_1(sc, old_vect)), small_int(0)), sc->make_int_vector_symbol);
                            else new_vect = make_simple_int_vector(sc, len);
                            src = (s7_int *)int_vector_ints(old_vect);
                            dst = (s7_int *)int_vector_ints(new_vect);
                            for (i = len; i > 0; i--) *dst++ = *src++;
                            return(new_vect);
                        }

                        if (is_byte_vector(old_vect))
                        {
                            uint8_t *src, *dst;
                            if (vector_rank(old_vect) > 1)
                                new_vect = g_make_vector_1(sc, set_plist_2(sc, g_vector_dimensions(sc, set_plist_1(sc, old_vect)), small_int(0)), sc->make_byte_vector_symbol);
                            else new_vect = make_simple_byte_vector(sc, len);
                            src = (uint8_t *)byte_vector_bytes(old_vect);
                            dst = (uint8_t *)byte_vector_bytes(new_vect);
                            for (i = len; i > 0; i--) *dst++ = *src++;
                            return(new_vect);
                        }
                        return(NULL);
                    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movzbl (%rsi), %eax
addl $-0x15, %eax
cmpl $0x3, %eax
ja 0x3bf99
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rsi), %rbx
leaq 0xcb538(%rip), %rcx     # 0x1072f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x6(%r14), %al
shrb %al
testq %rbx, %rbx
setg %cl
andb %al, %cl
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
cmpb $0x1, %cl
jne 0x3c091
testq %rax, %rax
je 0x3c11a
cmpq $0x2, 0x10(%rax)
jl 0x3c11a
movq 0x90(%r15), %rax
movq 0x110(%r15), %r12
cmpq 0x98(%r15), %rax
ja 0x3be1e
movq %r15, %rdi
callq 0xa550
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %rsi
movq $0x200001, (%rsi)       # imm = 0x200001
movq %r14, 0x8(%rsi)
movq %r12, 0x10(%rsi)
movq %r15, %rdi
callq 0x3c517
jmp 0x3c3c9
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3bfa1
cmpq $0x2, 0x10(%rax)
jl 0x3bfa1
movq 0x700(%r15), %rax
movq %r14, 0x8(%rax)
movq 0x700(%r15), %rsi
movq %r15, %rdi
callq 0x3c517
movq 0x10edd2(%rip), %rcx    # 0x14ac58
movq 0x708(%r15), %rdx
movq %rax, 0x8(%rdx)
movq 0x710(%r15), %rax
movq %rcx, 0x8(%rax)
movq 0x708(%r15), %rsi
movq 0x12d8(%r15), %rdx
movq %r15, %rdi
callq 0x3c722
movq %rax, %r12
jmp 0x3c25e
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3bffa
cmpq $0x2, 0x10(%rax)
jl 0x3bffa
movq 0x700(%r15), %rax
movq %r14, 0x8(%rax)
movq 0x700(%r15), %rsi
movq %r15, %rdi
callq 0x3c517
movq 0x10aa59(%rip), %rcx    # 0x146950
movq 0x708(%r15), %rdx
movq %rax, 0x8(%rdx)
movq 0x710(%r15), %rax
movq %rcx, 0x8(%rax)
movq 0x708(%r15), %rsi
movq 0x12d0(%r15), %rdx
movq %r15, %rdi
callq 0x3c722
jmp 0x3c005
movq 0x18(%r14), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3c038
cmpq $0x2, 0x10(%rax)
jl 0x3c038
movq 0x700(%r15), %rax
movq %r14, 0x8(%rax)
movq 0x700(%r15), %rsi
movq %r15, %rdi
callq 0x3c517
movq 0x10a9eb(%rip), %rcx    # 0x146950
movq 0x708(%r15), %rdx
movq %rax, 0x8(%rdx)
movq 0x710(%r15), %rax
movq %rcx, 0x8(%rax)
movq 0x708(%r15), %rsi
movq 0x12f0(%r15), %rdx
movq %r15, %rdi
callq 0x3c722
movq %rax, %r12
jmp 0x3c35f
xorl %r12d, %r12d
jmp 0x3c4fc
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x3bfc0
movq %r15, %rdi
callq 0xa550
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %r12
movq $0x200017, (%r12)       # imm = 0x200017
movq %rbx, 0x8(%r12)
leaq (,%rbx,8), %rsi
testq %rsi, %rsi
jle 0x3c190
movq %r15, %rdi
callq 0x9357
jmp 0x3c1f6
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3cd0e
movq %rax, %r12
testq %rbx, %rbx
jle 0x3c4fc
movq 0x10(%r12), %rax
movq 0x10(%r14), %rcx
incq %rbx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
movb %sil, (%rax,%rdx)
incq %rdx
decq %rbx
cmpq $0x1, %rbx
ja 0x3c01f
jmp 0x3c4fc
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x3c057
movq %r15, %rdi
callq 0xa550
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %r12
movq $0x200016, (%r12)       # imm = 0x200016
movq %rbx, 0x8(%r12)
leaq (,%rbx,8), %rsi
testq %rsi, %rsi
jle 0x3c291
movq %r15, %rdi
callq 0x9357
jmp 0x3c2f7
testq %rax, %rax
je 0x3c137
cmpq $0x2, 0x10(%rax)
jl 0x3c137
movq 0x90(%r15), %rax
movq 0x110(%r15), %r12
cmpq 0x98(%r15), %rax
ja 0x3c0cb
movq %r15, %rdi
callq 0xa550
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %rsi
movq $0x200001, (%rsi)       # imm = 0x200001
movq %r14, 0x8(%rsi)
movq %r12, 0x10(%rsi)
movq %r15, %rdi
callq 0x3c517
movq 0x700(%r15), %rcx
movq %rax, 0x8(%rcx)
movq 0x700(%r15), %rsi
movq 0x1318(%r15), %rdx
movq %r15, %rdi
callq 0x3c722
movq %rax, %r12
jmp 0x3c4d4
cmpq $0x7ff, %rbx            # imm = 0x7FF
ja 0x3c390
leaq 0x10a822(%rip), %rax    # 0x146950
movq (%rax,%rbx,8), %rax
jmp 0x3c3c9
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x3c156
movq %r15, %rdi
callq 0xa550
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %r12
movq $0x200015, (%r12)       # imm = 0x200015
movq %rbx, 0x8(%r12)
leaq (,%rbx,8), %rsi
testq %rsi, %rsi
jle 0x3c406
movq %r15, %rdi
callq 0x9357
jmp 0x3c46c
movq 0x838(%r15), %rax
testq %rax, %rax
jne 0x3c1db
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r15)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3c1b9
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%r12)
movq (%rax), %rcx
movq %rcx, 0x10(%r12)
movq $0x0, 0x20(%rax)
leaq -0x11c9(%rip), %rax     # 0x3b049
movq %rax, 0x20(%r12)
leaq -0x1178(%rip), %rax     # 0x3b0a6
movq %rax, 0x28(%r12)
movq 0x740(%r15), %r15
movq (%r15), %rax
movq 0x10(%r15), %rsi
cmpq 0x8(%r15), %rsi
jne 0x3c252
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%r15)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%r15)
movq 0x10(%r15), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r15)
movq %r12, (%rax,%rsi,8)
testq %rbx, %rbx
jle 0x3c4fc
movq 0x10(%r12), %rax
movq 0x10(%r14), %rcx
incq %rbx
xorl %edx, %edx
movsd (%rcx,%rdx), %xmm0
movsd %xmm0, (%rax,%rdx)
addq $0x8, %rdx
decq %rbx
cmpq $0x1, %rbx
ja 0x3c275
jmp 0x3c4fc
movq 0x838(%r15), %rax
testq %rax, %rax
jne 0x3c2dc
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r15)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3c2ba
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%r12)
movq (%rax), %rcx
movq %rcx, 0x10(%r12)
movq $0x0, 0x20(%rax)
leaq 0x5d522(%rip), %rax     # 0x99835
movq %rax, 0x20(%r12)
leaq 0x5d57c(%rip), %rax     # 0x9989b
movq %rax, 0x28(%r12)
movq 0x740(%r15), %r15
movq (%r15), %rax
movq 0x10(%r15), %rsi
cmpq 0x8(%r15), %rsi
jne 0x3c353
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%r15)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%r15)
movq 0x10(%r15), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r15)
movq %r12, (%rax,%rsi,8)
testq %rbx, %rbx
jle 0x3c4fc
movq 0x10(%r12), %rax
movq 0x10(%r14), %rcx
incq %rbx
xorl %edx, %edx
movq (%rcx,%rdx), %rsi
movq %rsi, (%rax,%rdx)
addq $0x8, %rdx
decq %rbx
cmpq $0x1, %rbx
ja 0x3c376
jmp 0x3c4fc
movq 0x90(%r15), %rax
cmpq 0x98(%r15), %rax
ja 0x3c3af
movq %r15, %rdi
callq 0xa550
movq 0x90(%r15), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r15)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %rbx, 0x8(%rax)
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rdx
movq (%rcx), %rcx
movq 0x718(%r15), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1318(%r15), %rdx
movq %r15, %rdi
callq 0x3c722
movq %rax, %r12
jmp 0x3c4d9
movq 0x838(%r15), %rax
testq %rax, %rax
jne 0x3c451
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, 0x838(%r15)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xff, %edx
movq %rcx, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
addq $0x28, %rcx
decl %edx
jne 0x3c42f
movq $0x0, -0x10(%rcx)
movl $0x0, -0x20(%rcx)
movq 0x18(%rax), %rcx
movq %rcx, 0x838(%r15)
movl $0x0, 0x8(%rax)
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rcx, 0x20(%rax)
movq %rax, 0x18(%r12)
movq (%rax), %rcx
movq %rcx, 0x10(%r12)
movq $0x0, 0x20(%rax)
leaq 0x1fdc1(%rip), %rax     # 0x5c249
movq %rax, 0x20(%r12)
leaq 0x1fdbe(%rip), %rax     # 0x5c252
movq %rax, 0x28(%r12)
movq 0x740(%r15), %r15
movq (%r15), %rax
movq 0x10(%r15), %rsi
cmpq 0x8(%r15), %rsi
jne 0x3c4c8
leaq (%rsi,%rsi), %rcx
movq %rcx, 0x8(%r15)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x8510
movq %rax, (%r15)
movq 0x10(%r15), %rsi
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r15)
movq %r12, (%rax,%rsi,8)
testq %rbx, %rbx
jle 0x3c4fc
movq 0x10(%r12), %rax
movq 0x10(%r14), %rcx
incq %rbx
xorl %edx, %edx
movq (%rcx,%rdx), %rsi
movq %rsi, (%rax,%rdx)
decq %rbx
addq $0x8, %rdx
cmpq $0x1, %rbx
ja 0x3c4e7
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq