// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: remove_let_from_heap
static void remove_let_from_heap(s7_scheme *sc, s7_pointer lt)
    {
        s7_pointer p;
        for (p = let_slots(lt); tis_slot(p); p = next_slot(p))
        {
            s7_pointer val;
            val = slot_value(p);
            if ((has_closure_let(val)) &&
                    (in_heap(closure_args(val))))
                remove_function_from_heap(sc, val);
            else
            {
                /* an experiment... */
                if ((is_hash_table(val)) &&
                        (!hash_table_removed(val)))
                {
                    s7_pointer iterator, ip;
                    s7_int gc_iter;
                    s7_int i, len;

                    len = hash_table_entries(val);
                    iterator = s7_make_iterator(sc, val);
                    gc_iter = s7_gc_protect_1(sc, iterator);
                    ip = cons(sc, sc->F, sc->F);
                    iterator_current(iterator) = ip;
                    set_mark_seq(iterator);
                    for (i = 0; i < len; i++)
                    {
                        s7_pointer key_val;
                        key_val = hash_table_iterate(sc, iterator);
                        if ((has_closure_let(cdr(key_val))) &&
                                (in_heap(closure_args(cdr(key_val)))))
                            remove_function_from_heap(sc, cdr(key_val));
                    }
                    hash_table_set_removed(val);
                    s7_gc_unprotect_at(sc, gc_iter);
                    iterator_current(iterator) = sc->nil;
                    free_cell(sc, ip);
                    free_cell(sc, iterator);
                }
            }
        }
        let_set_removed(lt);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
leaq 0x8(%rsi), %rbp
leaq 0xa4dcf(%rip), %rbx     # 0x115910
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x70ca6
movq 0x10(%rbp), %r15
movzbl (%r15), %eax
cmpb $0x1, (%rax,%rbx)
jne 0x70b76
movq 0x8(%r15), %rcx
testb $0x40, 0x7(%rcx)
jne 0x70b76
movq %r14, %rdi
movq %r15, %rsi
callq 0x973a
jmp 0x70c9d
cmpb $0x1b, %al
jne 0x70c9d
testb $0x2, 0x3(%r15)
jne 0x70c9d
movq 0x28(%r15), %rax
movq 0x18(%rax), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0xa3c7
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x89a9
movq %rax, 0x10(%rsp)
movq 0x90(%r14), %rax
movq 0x120(%r14), %rdx
cmpq 0x98(%r14), %rax
ja 0x70bdd
movq %r14, %rdi
movq %rdx, (%rsp)
callq 0x9c27
movq (%rsp), %rdx
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %rdx, 0x8(%rax)
movq %rdx, 0x10(%rax)
movq %rax, (%rsp)
movq %rax, 0x10(%r12)
orb $0x4, 0x3(%r12)
testq %r13, %r13
movl $0x0, %eax
cmovleq %rax, %r13
subq $0x1, %r13
jb 0x70c48
movq %r14, %rdi
movq %r12, %rsi
callq 0x2b18f
movq 0x10(%rax), %rsi
movzbl (%rsi), %eax
cmpb $0x1, (%rax,%rbx)
jne 0x70c16
movq 0x8(%rsi), %rax
testb $0x40, 0x7(%rax)
jne 0x70c16
movq %r14, %rdi
callq 0x973a
jmp 0x70c16
orb $0x2, 0x3(%r15)
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x8b00
movq 0x110(%r14), %rax
movq %rax, 0x10(%r12)
movq (%rsp), %rdx
andq $0x0, (%rdx)
movq 0x90(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq %rdx, (%rax)
andq $0x0, (%r12)
movq 0x90(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq %r12, (%rax)
addq $0x18, %rbp
jmp 0x70b41
movq 0x8(%rsp), %rax
orb $0x2, 0x3(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq