// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: op_letrec_unchecked
static bool op_letrec_unchecked(s7_scheme *sc)
                {
                    set_current_code(sc, sc->code);
                    sc->code = cdr(sc->code);
                    /*   get all local vars and set to #<undefined>
                     *   get parallel list of values
                     *   eval each member of values list with env still full of #<undefined>'s
                     *   assign each value to its variable
                     *   eval body
                     * which means that (letrec ((x x)) x) is not an error!
                     * but this assumes the environment is not changed by evaluating the exprs?
                     * (letrec ((a (define b 1))) b) -- if let, the define takes place in the calling env, not the current env
                     * (letrec ((f1 (lambda (x) (f2 (* 2 x))))) (define (f2 y) (- y 1)) (f1 3)) -> 5 (Guile says unbound f2)
                     * I think I need to check here that slot_pending_value is set (using the is_checked bit below).
                     */
                    sc->envir = new_frame_in_env(sc, sc->envir);
                    if (is_pair(car(sc->code)))
                    {
                        s7_pointer x;
                        for (x = car(sc->code); is_not_null(x); x = cdr(x))
                        {
                            s7_pointer slot;
                            slot = make_slot_1(sc, sc->envir, caar(x), sc->undefined);
                            slot_set_pending_value(slot, sc->undefined);
                            slot_set_expression(slot, cadar(x));
                            set_checked_slot(slot);
                        }
                        sc->args = let_slots(sc->envir);
                        if (!(sc->args)) sc->args = sc->nil;
                        push_stack(sc, OP_LETREC1, sc->args, sc->code);
                        sc->code = slot_expression(sc->args);
                        return(true);
                    }
                    sc->code = T_Pair(cdr(sc->code));
                    return(false);
                }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0xc53b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x14e740
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x14e688
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
movq 0x18(%rsp), %rax
movq 0x128(%rax), %rcx
callq 0xbec0
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x128(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
orq $0x20000000, %rcx       # imm = 0x20000000
movq %rcx, (%rax)
jmp 0x14e637
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
orq $0x2000000, %rcx        # imm = 0x2000000
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
orq $0x400000, %rcx         # imm = 0x400000
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x14e5c6
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x14e6bf
movq 0x18(%rsp), %rax
movq 0x110(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x14e6c1
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
movl $0x1b3, %ecx            # imm = 0x1B3
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rcx
addq $0x20, %rcx
movq %rcx, 0x50(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x27(%rsp)
jmp 0x14e759
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)