// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: append_let
static void append_let(s7_scheme *sc, s7_pointer new_e, s7_pointer old_e)
    {
        s7_pointer x;

        if ((old_e == sc->rootlet) || (new_e == sc->s7_let))
            return;

        if (new_e == sc->rootlet)
        {
            for (x = let_slots(old_e); tis_slot(x); x = next_slot(x))
            {
                s7_pointer sym, val;
                sym = slot_symbol(x);
                val = slot_value(x);
                if (is_slot(global_slot(sym)))
                    slot_set_value(global_slot(sym), val);
                else s7_make_slot(sc, new_e, sym, val);
            }
        }
        else
        {
            if (old_e == sc->s7_let)
            {
                s7_pointer iter, carrier;
                s7_int gc_loc;
                iter = s7_make_iterator(sc, sc->s7_let);
                gc_loc = s7_gc_protect(sc, iter);
                carrier = cons(sc, sc->F, sc->F);
                iterator_current(iter) = carrier;
                set_mark_seq(iter); /* so carrier is GC protected by mark_iterator */
                while (true)
                {
                    s7_pointer y;
                    y = s7_iterate(sc, iter);
                    if (iterator_is_at_end(iter)) break;
                    make_slot_1(sc, new_e, car(y), cdr(y));
                }
                s7_gc_unprotect_at(sc, gc_loc);
            }
            else
            {
                for (x = let_slots(old_e); tis_slot(x); x = next_slot(x))
                    make_slot_1(sc, new_e, slot_symbol(x), slot_value(x)); /* not add_slot here because we might run off the free heap end */
            }
        }
    }

// Assembly:
movq 0x150(%rdi), %rax
cmpq %rdx, %rax
je 0x8efde
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2150(%rdi), %rsi
cmpq %r14, %rsi
je 0x8efd0
cmpq %r14, %rax
je 0x8ede2
cmpq %rdx, %rsi
je 0x8ee17
movq 0x8(%rdx), %r15
testq %r15, %r15
je 0x8efd0
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa332
movq 0x18(%r15), %r15
jmp 0x8edc0
movq 0x8(%rdx), %r15
testq %r15, %r15
je 0x8efd0
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq 0x10(%rdx), %rax
cmpb $0x20, (%rax)
jne 0x8ee06
movq %rcx, 0x10(%rax)
jmp 0x8ee11
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9c87
movq 0x18(%r15), %r15
jmp 0x8ede6
movq %rbx, %rdi
callq 0xb067
movq %rax, %r15
cmpq $0x0, 0x108(%rbx)
js 0x8ee38
movq 0xe8(%rbx), %rax
jmp 0x8eef1
movq 0xd0(%rbx), %rax
movq 0xf0(%rbx), %r13
leaq (,%r13,2), %rbp
movq 0x18(%rax), %rsi
movq %r13, %r12
shlq $0x4, %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0x9fd6
movq $0x0, 0x20(%rax)
movq 0xd0(%rbx), %rcx
movq %rax, 0x18(%rcx)
movq (%rax), %rax
movq 0xd0(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0xd0(%rbx), %rax
movq %rbp, 0x8(%rax)
movq %rbp, 0xf0(%rbx)
movq 0xe8(%rbx), %rdi
movq %r12, %rsi
callq 0x8510
movq %rax, 0xe8(%rbx)
cmpq %rbp, %r13
jge 0x8eef1
movq 0x140(%rbx), %rcx
movq %r13, %rdx
movq 0xd0(%rbx), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax,%rdx,8)
movq 0xe8(%rbx), %rax
movq 0x108(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%rbx)
movq %rdx, 0x8(%rax,%rsi,8)
incq %rdx
decq %r13
jne 0x8eebc
movq 0xd0(%rbx), %rcx
movq 0x108(%rbx), %rdx
leaq -0x1(%rdx), %rsi
movq %rsi, 0x108(%rbx)
movq (%rax,%rdx,8), %r12
movq 0x10(%rcx), %rax
movq %r15, (%rax,%r12,8)
movq 0x90(%rbx), %rax
movq 0x120(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0x8ef3c
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r13, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %rax, 0x10(%r15)
orb $0x4, 0x3(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq *0x28(%r15)
testb $-0x80, 0x3(%r15)
je 0x8ef89
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa332
jmp 0x8ef63
cmpq %r12, 0xf0(%rbx)
jle 0x8efd0
movq 0xd0(%rbx), %rcx
movq 0x140(%rbx), %rax
movq 0x10(%rcx), %rdx
cmpq %rax, (%rdx,%r12,8)
je 0x8efcc
movq 0xe8(%rbx), %rdx
movq 0x108(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%rbx)
movq %r12, 0x8(%rdx,%rsi,8)
movq 0x10(%rcx), %rdx
movq %rax, (%rdx,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq