// File: /workspace/github_c_makefile_star2_O0/BernardTatin[P]s7sh/s7.c
// Function: apply_lambda
static void apply_lambda(s7_scheme *sc)                            /* -------- normal function (lambda), or macro -------- */
                {             /* load up the current args into the ((args) (lambda)) layout [via the current environment] */
                    s7_pointer x, z, e, sym, slot, last_slot;
                    uint64_t id;

                    e = sc->envir;
                    id = let_id(e);
                    last_slot = slot_end(sc);

                    for (x = closure_args(sc->code), z = T_Lst(sc->args); is_pair(x); x = cdr(x), z = cdr(z)) /* closure_args can be a symbol, for example */
                    {
                        if (is_null(z))
                            s7_error(sc, sc->wrong_number_of_args_symbol, set_elist_3(sc, not_enough_arguments_string, sc->code, sc->args));

                        sym = car(x);
                        slot = make_slot(sc, sym, T_Pos(unchecked_car(z)));
#if S7_DEBUGGING
                        slot->debugger_bits = 0;
#endif
                        symbol_set_local(sym, id, slot);
                        if (tis_slot(last_slot))
                            slot_set_next(last_slot, slot);
                        else let_set_slots(e, slot);
                        last_slot = slot;
                        slot_set_next(slot, slot_end(sc));
                    }
                    if (is_null(x))
                    {
                        if (is_not_null(z))
                            s7_error(sc, sc->wrong_number_of_args_symbol, set_elist_3(sc, too_many_arguments_string, sc->code, sc->args));
                    }
                    else
                    {
                        sym = x;
                        slot = make_slot(sc, sym, z);
                        symbol_set_local(sym, id, slot);
                        if (tis_slot(last_slot))
                            slot_set_next(last_slot, slot);
                        else let_set_slots(e, slot);
                        slot_set_next(slot, slot_end(sc));
                    }
                    sc->code = closure_body(sc->code);
                }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x133673
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x110(%rcx), %rax
jne 0x1335c0
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq 0x1900(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rdi
movq 0xf19a0(%rip), %rsi     # 0x224f38
movq 0x60(%rsp), %rax
movq (%rax), %rdx
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rcx
callq 0xf240
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdx
callq 0x164bc0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x40(%rsp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
cmpq $0x0, 0x30(%rsp)
je 0x13362d
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x13363b
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x13354d
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x110(%rcx), %rax
jne 0x1336ed
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x110(%rcx), %rax
je 0x1336e8
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq 0x1900(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
movq 0xef528(%rip), %rsi     # 0x222be8
movq 0x60(%rsp), %rax
movq (%rax), %rdx
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rcx
callq 0xf240
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x2f940
jmp 0x13376d
movq 0x58(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x164bc0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x40(%rsp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
cmpq $0x0, 0x30(%rsp)
je 0x133752
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x133760
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq 0x60(%rsp), %rax
movq %rcx, (%rax)
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)