// File: /workspace/github_c_makefile_star2_O1/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 0x95351
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 0x95343
cmpq %r14, %rax
je 0x95156
cmpq %rdx, %rsi
je 0x9518b
movq 0x8(%rdx), %r15
testq %r15, %r15
je 0x95343
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb169
movq 0x18(%r15), %r15
jmp 0x95134
movq 0x8(%rdx), %r15
testq %r15, %r15
je 0x95343
movq 0x8(%r15), %rdx
movq 0x10(%r15), %rcx
movq 0x10(%rdx), %rax
cmpb $0x20, (%rax)
jne 0x9517a
movq %rcx, 0x10(%rax)
jmp 0x95185
movq %rbx, %rdi
movq %r14, %rsi
callq 0xaaca
movq 0x18(%r15), %r15
jmp 0x9515a
movq %rbx, %rdi
callq 0xbec2
movq %rax, %r15
cmpq $0x0, 0x108(%rbx)
jns 0x9525d
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 0xae0f
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 0x9510
movq %rax, 0xe8(%rbx)
cmpq %rbp, %r13
jge 0x9525d
movq %r13, %rax
movq 0xd0(%rbx), %rcx
movq 0x140(%rbx), %rdx
movq 0x10(%rcx), %rcx
movq %rdx, (%rcx,%rax,8)
movq 0xe8(%rbx), %rcx
movq 0x108(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x108(%rbx)
movq %rax, 0x8(%rcx,%rdx,8)
incq %rax
decq %r13
jne 0x95221
movq 0xd0(%rbx), %rax
movq 0xe8(%rbx), %rcx
movq 0x108(%rbx), %rdx
leaq -0x1(%rdx), %rsi
movq %rsi, 0x108(%rbx)
movq (%rcx,%rdx,8), %r12
movq 0x10(%rax), %rax
movq %r15, (%rax,%r12,8)
movq 0x90(%rbx), %rax
movq 0x120(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0x952a8
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 %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 0x952fc
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb169
jmp 0x952d6
cmpq %r12, 0xf0(%rbx)
jle 0x95343
movq 0xd0(%rbx), %rax
movq 0x140(%rbx), %rcx
movq 0x10(%rax), %rdx
cmpq %rcx, (%rdx,%r12,8)
je 0x9533b
movq 0xe8(%rbx), %rdx
movq 0x108(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x108(%rbx)
movq %r12, 0x8(%rdx,%rsi,8)
movq 0x10(%rax), %rax
movq %rcx, (%rax,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq