// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: do_init_ex
static goto_t do_init_ex(s7_scheme *sc)
                {
                    s7_pointer x, y, z;
                    while (true)  /* at start, first value is the loop (for GC protection?), returning sc->value is the next value */
                    {
                        s7_pointer init;
                        sc->args = cons(sc, sc->value, sc->args);    /* code will be last element (first after reverse), these cons's will be used below for the new frame/slots */
                        if (!is_pair(sc->code)) break;
                        /* here sc->code is a list like: ((i 0 (+ i 1)) ...) so cadar gets the init value. */
                        init = cdar(sc->code);
                        if (has_fx(init))
                            sc->value = fx_call(sc, init);
                        else
                        {
                            init = car(init);
                            if (is_pair(init))
                            {
                                push_stack(sc, OP_DO_INIT, sc->args, cdr(sc->code)); /* OP_DO_INIT only used here */
                                sc->code = init;
                                return(goto_eval);
                            }
                            if (is_symbol(init))
                                sc->value = lookup_checked(sc, init);
                            else sc->value = init;
                        }
                        sc->code = cdr(sc->code);
                    }

                    /* all the initial values are now in the args list */
                    sc->args = safe_reverse_in_place(sc, sc->args);
                    sc->code = car(sc->args);                       /* saved at the start */

                    z = sc->args;
                    sc->args = cdr(sc->args);                       /* init values */

                    /* sc->args was cons'd above, so it should be safe to reuse it as the new frame */
                    sc->envir = reuse_as_let(sc, z, sc->envir);     /* sc->envir = new_frame_in_env(sc, sc->envir); */

                    /* run through sc->code and sc->args adding '( caar(car(code)) . car(args) ) to sc->envir, also reuse sc->args as the new frame slots */
                    sc->value = sc->nil;
                    y = sc->args;
                    for (x = car(sc->code); is_not_null(y); x = cdr(x))
                    {
                        s7_pointer sym, args;
                        sym = caar(x);
                        args = cdr(y);
                        reuse_as_slot(y, sym, unchecked_car(y));
                        slot_set_next(y, let_slots(sc->envir));
                        let_set_slots(sc->envir, y);
                        symbol_set_local(sym, let_id(sc->envir), y);

                        if (is_pair(cddar(x)))                   /* else no incr expr, so ignore it henceforth */
                        {
                            slot_set_expression(y, cddar(x));
                            sc->value = cons_unchecked(sc, y, sc->value);
                        }
                        y = args;
                    }
                    sc->args = cons(sc, sc->value = safe_reverse_in_place(sc, sc->value), cadr(sc->code));
                    sc->code = cddr(sc->code);
                    return(fall_through);
                }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x10(%rbx), %r15
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd8f9b
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rdx
movq $0x200001, (%rdx)       # imm = 0x200001
movq %r14, 0x8(%rdx)
movq %r15, 0x10(%rdx)
movq %rdx, 0x10(%rbx)
movq (%rbx), %rax
cmpb $0x1, (%rax)
jne 0xd9078
movq 0x8(%rax), %rcx
movq 0x10(%rcx), %rcx
testb $0x4, 0x6(%rcx)
jne 0xd8ff1
movq 0x8(%rcx), %rsi
movzbl (%rsi), %ecx
cmpl $0xa, %ecx
je 0xd9011
cmpl $0x1, %ecx
je 0xd920a
movq %rsi, %r14
jmp 0xd8ffe
movq 0x8(%rcx), %rsi
movq %rbx, %rdi
callq *0x20(%rcx)
movq %rax, %r14
movq %r14, 0x20(%rbx)
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq %rax, (%rbx)
jmp 0xd8f78
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdx
movq 0x20(%rsi), %rcx
cmpq %rcx, %rdx
je 0xd9036
jle 0xd9031
movq 0x10(%rax), %rax
movq 0x18(%rax), %rdx
cmpq %rdx, %rcx
jl 0xd9024
cmpq %rcx, %rdx
jne 0xd904d
movq 0x18(%rsi), %rcx
movq 0x10(%rcx), %r14
testq %r14, %r14
jne 0xd8ffe
movq %rbx, %rdi
callq 0x9c492
jmp 0xd8ffb
cmpb $0x1c, (%rax)
jne 0xd906d
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xd9067
cmpq %rsi, 0x8(%rcx)
je 0xd903a
movq 0x18(%rcx), %rcx
jmp 0xd9056
movq 0x10(%rax), %rax
jmp 0xd904d
movq 0x10(%rsi), %rcx
cmpb $0x20, (%rcx)
je 0xd903a
jmp 0xd9043
movq 0x110(%rbx), %rsi
movq %rbx, %rdi
callq 0x9975a
movq %rax, 0x10(%rbx)
movq 0x8(%rax), %rcx
movq %rcx, (%rbx)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movq 0x8(%rbx), %rcx
movq $0x20001c, (%rax)       # imm = 0x20001C
movq $0x0, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq 0x250(%rbx), %rcx
incq %rcx
movq %rcx, 0x250(%rbx)
movq %rcx, 0x18(%rax)
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rax
movq 0x110(%rbx), %rdx
movq %rdx, 0x20(%rbx)
movq %rdx, %rsi
cmpq %rdx, %rax
je 0xd9196
movq (%rbx), %rcx
addq $0x8, %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rdx
movq 0x8(%rdx), %rsi
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rdx
movq $0x20, (%rax)
movq %rsi, 0x8(%rax)
movq %rdi, 0x10(%rax)
movq 0x8(%rbx), %rdi
movq 0x8(%rdi), %rdi
movq %rdi, 0x18(%rax)
movq 0x8(%rbx), %rdi
movq %rax, 0x8(%rdi)
movq %rax, 0x18(%rsi)
movq 0x8(%rbx), %rdi
movq 0x18(%rdi), %rdi
movq %rdi, 0x20(%rsi)
incl 0x28(%rsi)
movq 0x8(%rcx), %rsi
movq 0x10(%rsi), %rsi
movq 0x10(%rsi), %rsi
cmpb $0x1, (%rsi)
jne 0xd917b
movq %rsi, 0x28(%rax)
orb $0x2, 0x3(%rax)
movq 0x20(%rbx), %rsi
movq 0x90(%rbx), %rdi
leaq -0x8(%rdi), %r8
movq %r8, 0x90(%rbx)
movq -0x8(%rdi), %rdi
movq $0x200001, (%rdi)       # imm = 0x200001
movq %rax, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %rdi, 0x20(%rbx)
addq $0x10, %rcx
movq 0x110(%rbx), %rsi
movq %rdx, %rax
cmpq %rsi, %rdx
jne 0xd90ec
movq 0x20(%rbx), %rdx
movq %rbx, %rdi
callq 0x9975a
movq %rax, %r14
movq %rax, 0x20(%rbx)
movq (%rbx), %rcx
movq 0x90(%rbx), %rax
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %r15
cmpq 0x98(%rbx), %rax
ja 0xd91cf
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r14, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
movl $0x2, %eax
movq %rsi, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq 0x10(%rax), %rax
movq 0x50(%rbx), %rcx
movq %rax, (%rcx)
movq 0x8(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rbx), %rax
movq 0x50(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x50(%rbx), %rax
movq $0x1e9, 0x18(%rax)      # imm = 0x1E9
addq $0x20, 0x50(%rbx)
movl $0x5, %eax
jmp 0xd9201