// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: copy_direct
static s7_pointer copy_direct(s7_scheme *sc, s7_pointer dest, s7_pointer source, s7_int dest_start, s7_int dest_end, s7_int source_start)
                {
                    /* types equal, but not a let (handled in s7_copy_1), returns NULL if not copied here */
                    s7_int i, j, source_len;
                    source_len = dest_end - dest_start;
                    switch (type(source))
                    {
                        case T_PAIR:
                            {
                                s7_pointer pd, ps;
                                for (ps = source, i = 0; i < source_start; i++)
                                    ps = cdr(ps);
                                for (pd = dest, i = 0; i < dest_start; i++)
                                    pd = cdr(pd);
                                for (; (i < dest_end) && is_pair(ps) && is_pair(pd); i++, ps = cdr(ps), pd = cdr(pd))
                                    set_car(pd, car(ps));
                                return(dest);
                            }

                        case T_VECTOR:
                            if (is_typed_vector(dest))
                            {
                                s7_pointer *els;
                                els = vector_elements(source);
                                for (i = source_start, j = dest_start; j < dest_end; i++, j++)
                                    typed_vector_setter(sc, dest, j, els[i]);                     /* types are equal, so source is a normal vector */
                            }
                            else memcpy((void *)((vector_elements(dest)) + dest_start), (void *)((vector_elements(source)) + source_start), source_len * sizeof(s7_pointer));
                            return(dest);

                        case T_INT_VECTOR:
                            memcpy((void *)((int_vector_ints(dest)) + dest_start), (void *)((int_vector_ints(source)) + source_start), source_len * sizeof(s7_int));
                            return(dest);

                        case T_FLOAT_VECTOR:
                            memcpy((void *)((float_vector_floats(dest)) + dest_start), (void *)((float_vector_floats(source)) + source_start), source_len * sizeof(s7_double));
                            return(dest);

                        case T_BYTE_VECTOR:
                            if (is_string(dest))
                                memcpy((void *)(string_value(dest) + dest_start), (void *)((byte_vector_bytes(source)) + source_start), source_len * sizeof(uint8_t));
                            else memcpy((void *)(byte_vector_bytes(dest) + dest_start), (void *)((byte_vector_bytes(source)) + source_start), source_len * sizeof(uint8_t));
                            return(dest);

                        case T_STRING:
                            if (is_string(dest))
                                memcpy((void *)(string_value(dest) + dest_start), (void *)((string_value(source)) + source_start), source_len);
                            else memcpy((void *)(byte_vector_bytes(dest) + dest_start), (void *)((string_value(source)) + source_start), source_len);
                            return(dest);

                        case T_C_OBJECT:
                            {
                                s7_pointer mi, mj;
                                s7_int gc_loc1, gc_loc2;
                                s7_pointer (*cref)(s7_scheme *sc, s7_pointer args);
                                s7_pointer (*cset)(s7_scheme *sc, s7_pointer args);

                                mi = make_mutable_integer(sc, 0);
                                mj = make_mutable_integer(sc, 0);
                                gc_loc1 = s7_gc_protect_1(sc, mi);
                                gc_loc2 = s7_gc_protect_1(sc, mj);
                                cref = c_object_ref(sc, source);
                                cset = c_object_set(sc, dest);

                                for (i = source_start, j = dest_start; i < dest_end; i++, j++)
                                {
                                    integer(mi) = i;
                                    integer(mj) = j;
                                    set_car(sc->t2_1, source);
                                    set_car(sc->t2_2, mi);
                                    set_car(sc->t3_3, cref(sc, sc->t2_1));
                                    set_car(sc->t3_1, dest);
                                    set_car(sc->t3_2, mj);
                                    cset(sc, sc->t3_1);
                                }
                                s7_gc_unprotect_at(sc, gc_loc1);
                                s7_gc_unprotect_at(sc, gc_loc2);
                                free_cell(sc, mi);
                                free_cell(sc, mj);
                                return(dest);
                            }

                        case T_LET:
                            return(NULL);

                        case T_HASH_TABLE:
                            {
                                s7_pointer p;
                                p = hash_table_copy(sc, source, dest, source_start, source_start + source_len);
                                if ((hash_table_checker(source) != hash_table_checker(dest)) &&
                                        (!hash_table_checker_locked(dest)))
                                {
                                    if (hash_table_checker(dest) == hash_empty)
                                        hash_table_checker(dest) = hash_table_checker(source);
                                    else
                                    {
                                        hash_table_checker(dest) = hash_equal;
                                        hash_set_chosen(dest);
                                    }
                                }
                                return(p);
                            }

                        default:
                            return(dest);
                    }
                    return(NULL);
                }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movq %r9, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x68(%rsp)
movq 0x98(%rsp), %rax
movzbl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x1b, %eax
ja 0xdb5ce
movq 0x10(%rsp), %rax
leaq 0x104b64(%rip), %rcx    # 0x1dfa3c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jge 0xdaf24
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0xdaef7
movq 0xa0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x90(%rsp), %rax
jge 0xdaf67
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0xdaf3a
jmp 0xdaf69
movq 0x78(%rsp), %rcx
xorl %eax, %eax
cmpq 0x88(%rsp), %rcx
movb %al, 0xf(%rsp)
jge 0xdafa3
movq 0x58(%rsp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
movb %al, 0xf(%rsp)
jne 0xdafa3
movq 0x60(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xdafad
jmp 0xdafee
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x60(%rsp)
jmp 0xdaf69
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa0(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xdb09d
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x88(%rsp), %rax
jge 0xdb09b
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x50(%rsp), %rax
movq 0x78(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
callq 0x34290
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0xdb046
jmp 0xdb0e1
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x90(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x80(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x68(%rsp), %rdx
shlq $0x3, %rdx
callq 0x93e0
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x90(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x80(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x68(%rsp), %rdx
shlq $0x3, %rdx
callq 0x93e0
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x90(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x80(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x68(%rsp), %rdx
shlq $0x3, %rdx
callq 0x93e0
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x13, %eax
jne 0xdb1f0
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
addq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
addq 0x80(%rsp), %rsi
movq 0x68(%rsp), %rdx
shlq $0x0, %rdx
callq 0x93e0
jmp 0xdb226
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
addq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
addq 0x80(%rsp), %rsi
movq 0x68(%rsp), %rdx
shlq $0x0, %rdx
callq 0x93e0
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x13, %eax
jne 0xdb27f
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
addq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
addq 0x80(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x93e0
jmp 0xdb2b1
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
addq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rsi
addq 0x80(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x93e0
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xdd130
movq %rax, 0x48(%rsp)
movq 0xa8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xdd130
movq %rax, 0x40(%rsp)
movq 0xa8(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x9cb0
movq %rax, 0x38(%rsp)
movq 0xa8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x9cb0
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0x98(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x48(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xa8(%rsp), %rax
movq 0x8d8(%rax), %rax
movq 0xa0(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x88(%rsp), %rax
jge 0xdb492
movq 0x78(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x70(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x98(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x570(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x578(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq 0xa8(%rsp), %rdi
movq 0xa8(%rsp), %rcx
movq 0x570(%rcx), %rsi
callq *%rax
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movq 0x590(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0xa0(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x580(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x588(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq 0xa8(%rsp), %rdi
movq 0xa8(%rsp), %rcx
movq 0x580(%rcx), %rsi
callq *%rax
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0xdb38a
movq 0xa8(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x9f60
movq 0xa8(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x9f60
movq 0xa8(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x2bcd0
movq 0xa8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2bcd0
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq $0x0, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa8(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq 0x80(%rsp), %r8
addq 0x68(%rsp), %r8
callq 0xdb850
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xa0(%rsp), %rcx
cmpq 0x18(%rcx), %rax
je 0xdb5bf
movq 0xa0(%rsp), %rax
leaq 0x13f240(%rip), %rcx    # 0x21a7a0
cmpq %rcx, 0x20(%rax)
jne 0xdb5bf
movq 0xa0(%rsp), %rax
leaq -0xa41e5(%rip), %rcx    # 0x37390
cmpq %rcx, 0x18(%rax)
jne 0xdb595
movq 0x98(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0xdb5bd
movq 0xa0(%rsp), %rax
leaq -0xa3934(%rip), %rcx    # 0x37c70
movq %rcx, 0x18(%rax)
movq 0xa0(%rsp), %rax
movq (%rax), %rcx
orq $0x20000000, %rcx       # imm = 0x20000000
movq %rcx, (%rax)
jmp 0xdb5bf
movq 0x18(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0xdb5de
movq 0xa0(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nop