// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: let_to_let
static s7_pointer let_to_let(s7_scheme *sc, s7_pointer obj)
                {
                    /* how to handle setters?
                     *   (display (let ((e (let ((i 0)) (set! (setter 'i) integer?) (curlet)))) (object->let e))):
                     *   "(inlet 'value (inlet 'i 0) 'type let? 'length 1 'open #f 'outlet () 'immutable? #f)"
                     */
                    s7_pointer let;
                    if (!sc->open_symbol)
                    {
                        sc->open_symbol = make_symbol(sc, "open");
                        sc->alias_symbol = make_symbol(sc, "alias");
                    }
                    if (!sc->function_symbol)
                        sc->function_symbol = make_symbol(sc, "function");
                    if (!sc->file_symbol)
                    {
                        sc->file_symbol = make_symbol(sc, "file");
                        sc->line_symbol = make_symbol(sc, "line");
                    }
                    let = g_local_inlet(sc, 12, sc->value_symbol, obj,
                            sc->type_symbol, sc->is_let_symbol,
                            sc->length_symbol, s7_length(sc, obj),
                            sc->open_symbol, s7_make_boolean(sc, has_methods(obj)),
                            sc->outlet_symbol, (obj == sc->rootlet) ? sc->nil : outlet(obj),
                            sc->is_immutable_symbol, s7_make_boolean(sc, is_immutable(obj)));
                    if (obj == sc->rootlet)
                        s7_varlet(sc, let, sc->alias_symbol, sc->rootlet_symbol);
                    else
                    {
                        if (obj == sc->owlet) /* this can't happen, I think -- owlet is always copied first */
                            s7_varlet(sc, let, sc->alias_symbol, sc->owlet_symbol);
                        else
                        {
                            if (is_funclet(obj))
                            {
                                s7_varlet(sc, let, sc->function_symbol, funclet_function(obj));
                                if ((has_let_file(obj)) &&
                                        (let_file(obj) <= (s7_int)sc->file_names_top) &&
                                        (let_line(obj) > 0) &&
                                        (let_line(obj) < 100000))
                                {
                                    s7_varlet(sc, let, sc->file_symbol, sc->file_names[let_file(obj)]);
                                    s7_varlet(sc, let, sc->line_symbol, make_integer(sc, let_line(obj)));
                                }
                            }
                        }
                    }
                    if (has_active_methods(sc, obj))
                    {
                        s7_pointer func;
                        func = find_method(sc, obj, sc->object_to_let_symbol);
                        if (func != sc->undefined)
                        {
                            s7_int gc_loc;
                            gc_loc = s7_gc_protect_1(sc, let);
                            s7_apply_function(sc, func, list_2(sc, obj, let));
                            s7_gc_unprotect_at(sc, gc_loc);
                        }
                    }
                    return(let);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdi, 0x148(%rsp)
movq %rsi, 0x140(%rsp)
movq 0x148(%rsp), %rax
cmpq $0x0, 0x1de8(%rax)
jne 0x1c633e
movq 0x148(%rsp), %rdi
leaq 0x2da11(%rip), %rsi     # 0x1f3d12
callq 0xb400
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x1de8(%rax)
movq 0x148(%rsp), %rdi
leaq 0x2d433(%rip), %rsi     # 0x1f375a
callq 0xb400
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x1df0(%rax)
movq 0x148(%rsp), %rax
cmpq $0x0, 0x1de0(%rax)
jne 0x1c6376
movq 0x148(%rsp), %rdi
leaq 0x2d875(%rip), %rsi     # 0x1f3bd4
callq 0xb400
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x1de0(%rax)
movq 0x148(%rsp), %rax
cmpq $0x0, 0x1e00(%rax)
jne 0x1c63d4
movq 0x148(%rsp), %rdi
leaq 0x1fa3e(%rip), %rsi     # 0x1e5dd5
callq 0xb400
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x1e00(%rax)
movq 0x148(%rsp), %rdi
leaq 0x1f26b(%rip), %rsi     # 0x1e5628
callq 0xb400
movq %rax, %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x1e10(%rax)
movq 0x148(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x148(%rsp), %rax
movq 0x18b8(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x148(%rsp), %rax
movq 0x18c0(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x148(%rsp), %rax
movq 0x10e8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x148(%rsp), %rax
movq 0x1218(%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rsi
callq 0x10f040
movq %rax, 0xc8(%rsp)
movq 0x148(%rsp), %rax
movq 0x1de8(%rax), %rax
movq %rax, 0xd0(%rsp)
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x9c10
movq %rax, 0xd8(%rsp)
movq 0x148(%rsp), %rax
movq 0x13b8(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
cmpq 0x150(%rcx), %rax
jne 0x1c6500
movq 0x148(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x1c6514
movq 0x140(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0xe0(%rsp), %rbx
movq 0xd8(%rsp), %r14
movq 0xd0(%rsp), %r15
movq 0xc8(%rsp), %r12
movq 0xc0(%rsp), %r13
movq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x148(%rsp), %rax
movq 0x10a8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rax
movq (%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x9c10
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0xb8(%rsp), %r9
movq 0x80(%rsp), %r11
movq 0x88(%rsp), %r10
movl $0xc, %esi
movq %r13, (%rsp)
movq %r12, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movb $0x0, %al
callq 0x1c4750
movq %rax, 0x138(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
cmpq 0x150(%rcx), %rax
jne 0x1c6652
movq 0x148(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x1df0(%rax), %rdx
movq 0x148(%rsp), %rax
movq 0x1490(%rax), %rcx
callq 0xc040
jmp 0x1c68cb
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rcx
cmpq 0x198(%rcx), %rax
jne 0x1c66a3
movq 0x148(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x1df0(%rax), %rdx
movq 0x148(%rsp), %rax
movq 0x13c0(%rax), %rcx
callq 0xc040
jmp 0x1c68c9
movq 0x140(%rsp), %rax
movq (%rax), %rax
andq $0x20000000, %rax       # imm = 0x20000000
cmpq $0x0, %rax
je 0x1c68c7
movq 0x148(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x1de0(%rax), %rdx
movq 0x140(%rsp), %rax
movq 0x20(%rax), %rcx
callq 0xc040
movq 0x140(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1c68c5
movq 0x140(%rsp), %rax
movl 0x2c(%rax), %eax
movq 0x148(%rsp), %rcx
movslq 0x4a4(%rcx), %rcx
cmpq %rcx, %rax
jg 0x1c68c5
movq 0x140(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jbe 0x1c68c5
movq 0x140(%rsp), %rax
cmpl $0x186a0, 0x28(%rax)    # imm = 0x186A0
jae 0x1c68c5
movq 0x148(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x1e00(%rax), %rdx
movq 0x148(%rsp), %rax
movq 0x498(%rax), %rax
movq 0x140(%rsp), %rcx
movl 0x2c(%rcx), %ecx
movq (%rax,%rcx,8), %rcx
callq 0xc040
movq 0x148(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x148(%rsp), %rax
movq 0x1e10(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x140(%rsp), %rax
movl 0x28(%rax), %eax
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rax
andq $-0x800, %rax           # imm = 0xF800
cmpq $0x0, %rax
jne 0x1c6804
movq 0x130(%rsp), %rcx
leaq 0x4fc8a(%rip), %rax     # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x60(%rsp)
jmp 0x1c689c
jmp 0x1c6806
movq 0x148(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x148(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x1c6833
movq 0x148(%rsp), %rdi
callq 0xc670
movq 0x148(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rax
movq $0xb, (%rax)
movq 0x130(%rsp), %rcx
movq 0x120(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x120(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x128(%rsp), %rcx
callq 0xc040
jmp 0x1c68c7
jmp 0x1c68c9
jmp 0x1c68cb
movq 0x140(%rsp), %rax
movq (%rax), %rax
andq $0x40000000, %rax       # imm = 0x40000000
cmpq $0x0, %rax
je 0x1c6a99
movq 0x148(%rsp), %rax
testb $0x1, 0x24c(%rax)
je 0x1c6a99
movq 0x148(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rax
movq 0x1388(%rax), %rdx
callq 0x98d0
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq 0x148(%rsp), %rcx
cmpq 0x128(%rcx), %rax
je 0x1c6a97
movq 0x148(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x9cb0
movq %rax, 0x108(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x148(%rsp), %rax
movq 0x110(%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0x148(%rsp), %rax
movq 0x90(%rax), %rax
movq 0x148(%rsp), %rcx
cmpq 0x98(%rcx), %rax
ja 0x1c69e9
movq 0x148(%rsp), %rdi
callq 0xc670
movq 0x148(%rsp), %rcx
movq 0x90(%rcx), %rax
movq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x90(%rcx)
movq -0x8(%rax), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdi
movq 0xf8(%rsp), %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xf0(%rsp), %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x100(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rdx
callq 0xd9f0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq %rax, %rdx
callq 0xda50
movq 0x148(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x9f60
jmp 0x1c6a99
movq 0x138(%rsp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopw %cs:(%rax,%rax)