// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: g_unlet
static s7_pointer g_unlet(s7_scheme *sc, s7_pointer args)
    {
        /* add sc->unlet bindings to the current environment */
#define H_unlet "(unlet) returns a let that establishes the original bindings of all the predefined functions"
#define Q_unlet s7_make_signature(sc, 1, sc->is_let_symbol)

        /* slightly confusing:
         *    ((unlet) 'abs) -> #<undefined>
         *    (defined? 'abs (unlet)) -> #t
         * this is because unlet sets up a local environment of unshadowed symbols, and s7_let_ref only looks at the local env chain
         *   (that is, if env is not the global env, then the global env is not searched).
         */
        int32_t i;
        s7_pointer *inits;
        s7_pointer x;

        sc->w = new_frame_in_env(sc, sc->envir);
        inits = vector_elements(sc->unlet);

        for (i = 0; (i < UNLET_ENTRIES) && (is_slot(inits[i])); i++)
        {
            s7_pointer sym;
            x = slot_value(inits[i]);
            sym = slot_symbol(inits[i]);
            if ((x != slot_value(global_slot(sym))) || /* it has been changed globally */
                    ((!is_global(sym)) &&                  /* it might be shadowed locally */
                     (s7_symbol_local_value(sc, sym, sc->envir) != slot_value(global_slot(sym)))))
                make_slot_1(sc, sc->w, sym, x);
        }
        /* if (set! + -) then + needs to be overridden, but the local bit isn't set, so we have to check the actual values in the non-local case.
         *   (define (f x) (with-let (unlet) (+ x 1)))
         */
        x = sc->w;
        sc->w = sc->nil;
        return(x);
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xc53b0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x4d8(%rax)
movq 0x30(%rsp), %rax
movq 0x168(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x24(%rsp)
xorl %eax, %eax
cmpl $0x200, 0x24(%rsp)      # imm = 0x200
movb %al, 0x7(%rsp)
jge 0x67708
movq 0x18(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x67715
jmp 0x677c4
movq 0x18(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jne 0x67792
movq 0x8(%rsp), %rax
movq (%rax), %rax
andq $0x10000, %rax          # imm = 0x10000
cmpq $0x0, %rax
jne 0x677b2
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdx
callq 0xfe00
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x10(%rcx), %rax
je 0x677b2
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rax
movq 0x4d8(%rax), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
callq 0xbec0
jmp 0x677b4
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x676dd
movq 0x30(%rsp), %rax
movq 0x4d8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x110(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x4d8(%rax)
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)