// File: /workspace/github_c_makefile_star2_O2/BernardTatin[P]s7sh/s7.c
// Function: do_let
static goto_t do_let(s7_scheme *sc, s7_pointer step_slot, s7_pointer scc)
                {
                    s7_pointer let_body, p = NULL, let_vars, let_code, ip;
                    bool let_star;
                    s7_pointer old_e, stepper;
                    s7_int body_len, var_len, k, end;

                    /* do_let with non-float vars doesn't get many fixable hits */
                    let_code = caddr(scc);
                    if ((!is_pair(cdr(let_code))) || (!is_list(cadr(let_code)))) /* (do ((j 0 (+ j 1))) ((= j 1)) (let name 123)) */
                        return(fall_through);
                    let_body = cddr(let_code);
                    body_len = s7_list_length(sc, let_body);
                    if (body_len <= 0) return(fall_through);
                    let_star = (symbol_syntax_op_checked(let_code) == OP_LET_STAR);
                    let_vars = cadr(let_code);
                    set_safe_stepper(step_slot);
                    stepper = slot_value(step_slot);

                    old_e = sc->envir;
                    sc->envir = new_frame_in_env(sc, sc->envir);

                    if (setjmp(sc->opt_exit) != 0)
                        return(fall_through);

                    sc->pc = 0;
                    reset_opts(sc);
                    for (var_len = 0, p = let_vars; is_pair(p); var_len++, p = cdr(p))
                    {
                        s7_pointer expr;
                        if ((!is_pair(car(p))) ||
                                (!is_normal_symbol(caar(p))) ||
                                (!is_pair(cdar(p))))
                            return(fall_through);
                        expr = cdar(p);
                        if (!float_optimize(sc, expr))   /* each of these needs to set the associated variable */
                        {
                            sc->envir = old_e;
                            return(fall_through);
                        }
                        if (let_star)
                            make_slot_1(sc, sc->envir, caar(p), s7_make_mutable_real(sc, 1.5));
                    }

                    if (!let_star)
                        for (p = let_vars; is_pair(p); p = cdr(p))
                            make_slot_1(sc, sc->envir, caar(p), s7_make_mutable_real(sc, 1.5));

                    for (p = let_body; is_pair(p); p = cdr(p))
                        if (!float_optimize(sc, p))
                        {
                            sc->envir = old_e;
                            return(fall_through);
                        }

                    if (!is_null(p)) /* no hits in s7test or snd-test */
                    {
                        sc->envir = old_e;
                        return(fall_through);
                    }

                    end = denominator(stepper);
                    let_set_slots(sc->envir, reverse_slots(sc, let_slots(sc->envir)));
                    ip = slot_value(step_slot);

                    if (body_len == 1)
                    {
                        if (var_len == 1)
                        {
                            s7_pointer xp;
                            int32_t pc2;
                            opt_info *first, *o;
                            s7_double (*f1)(opt_info *o);
                            s7_double (*f2)(opt_info *o);
                            xp = slot_value(let_slots(sc->envir));
                            first = sc->opts[0];
                            f1 = first->v[0].fd;
                            integer(ip) = numerator(stepper);
                            sc->pc = 0;
                            set_real(xp, f1(first));
                            pc2 = ++sc->pc;
                            o = sc->opts[pc2];
                            f2 = o->v[0].fd;
                            f2(o);
                            if ((f2 == opt_fmv) &&
                                    (f1 == opt_d_dd_ff_o2) &&
                                    (first->v[3].d_dd_f == add_d_dd) &&
                                    (slot_symbol(step_slot) == slot_symbol(o->v[2].p))) /* and _dv et al throughout (so sc->pc ignored) etc */
                            {
                                /* gcc now refuses to inline opt_fmv -- we are not amused... */
                                opt_info *o1, *o2, *o3;
                                s7_d_v_t vf1, vf2, vf3, vf4;
                                s7_d_vd_t vf5, vf6;
                                s7_d_vid_t vf7;
                                void *obj1, *obj2, *obj3, *obj4, *obj5, *obj6, *obj7;

                                sc->pc = pc2;
                                o1 = o->sc->opts[o->sc->pc + 1];
                                o2 = o->sc->opts[o->sc->pc + 3];
                                o3 = o->sc->opts[o->sc->pc + 5];
                                vf1 = first->v[4].d_v_f;
                                vf2 = first->v[5].d_v_f;
                                vf3 = o1->v[2].d_v_f;
                                vf4 = o3->v[5].d_v_f;
                                vf5 = o2->v[3].d_vd_f;
                                vf6 = o3->v[6].d_vd_f;
                                vf7 = o->v[4].d_vid_f;
                                obj1 = first->v[1].obj;
                                obj2 = first->v[2].obj;
                                obj3 = o1->v[1].obj;
                                obj4 = o3->v[1].obj;
                                obj5 = o->v[5].obj;
                                obj6 = o2->v[5].obj;
                                obj7 = o3->v[2].obj;

                                for (k = numerator(stepper) + 1; k < end; k++)
                                {
                                    s7_double amp_env, vib;
                                    vib = vf1(obj1) + vf2(obj2);
                                    amp_env = vf3(obj3);
                                    vf7(obj5, k, amp_env * vf5(obj6, vib + (vf4(obj4) * vf6(obj7, vib))));
                                }
                            }
                            else
                            {
                                for (k = numerator(stepper) + 1; k < end; k++)
                                {
                                    integer(ip) = k;
                                    sc->pc = 0;
                                    set_real(xp, f1(first));
                                    sc->pc = pc2;
                                    f2(o);
                                }
                            }
                        } /* body_len == 1 and var_len == 1 */
                        else
                        {
                            if (var_len == 2)
                            {
                                s7_pointer s1, s2;
                                s1 = let_slots(sc->envir);
                                s2 = next_slot(s1);
                                for (k = numerator(stepper); k < end; k++)
                                {
                                    integer(ip) = k;
                                    sc->pc = 0;
                                    set_real(slot_value(s1), sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]));
                                    sc->pc++;
                                    set_real(slot_value(s2), sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]));
                                    sc->pc++;
                                    sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]);
                                }
                            } /* body_len == 1 and var_len == 2 */
                            else
                            {
                                for (k = numerator(stepper); k < end; k++)
                                {
                                    integer(ip) = k;
                                    sc->pc = 0;
                                    for (p = let_slots(sc->envir); tis_slot(p); p = next_slot(p))
                                    {
                                        set_real(slot_value(p), sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]));
                                        sc->pc++;
                                    }
                                    sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]);
                                }
                            }
                        }
                    } /* body_len == 1 */
                    else
                    {
                        if ((body_len == 2) && (var_len == 1))
                        {
                            s7_pointer s1;
                            s1 = let_slots(sc->envir);
                            for (k = numerator(stepper); k < end; k++)
                            {
                                integer(ip) = k;
                                sc->pc = 0;
                                set_real(slot_value(s1), sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]));
                                sc->pc++;
                                sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]);
                                sc->pc++;
                                sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]);
                            }
                        }
                        else
                        {
                            for (k = numerator(stepper); k < end; k++)
                            {
                                int32_t i;
                                integer(ip) = k;
                                sc->pc = 0;
                                for (p = let_slots(sc->envir); tis_slot(p); p = next_slot(p))
                                {
                                    set_real(slot_value(p), sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]));
                                    sc->pc++;
                                }
                                for (i = 0; i < body_len; i++)
                                {
                                    sc->opts[sc->pc]->v[0].fd(sc->opts[sc->pc]);
                                    sc->pc++;
                                }
                            }
                        }
                    }
                    sc->envir = old_e;
                    sc->value = sc->T;
                    sc->code = cdadr(scc);
                    return(goto_safe_do_end_clauses);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq 0x10(%rdx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %r14
movq 0x10(%r14), %rax
pushq $0x2
popq %r13
cmpb $0x1, (%rax)
jne 0xaab6f
movq 0x8(%rax), %rbp
movb (%rbp), %cl
decb %cl
cmpb $0x1, %cl
ja 0xaab6f
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x10(%rax), %rsi
movq %rsi, 0x38(%rsp)
callq 0x2dada
testq %rax, %rax
jle 0xaab6f
movq %rax, 0x40(%rsp)
cmpw $0x201, (%r14)          # imm = 0x201
jne 0xaab84
movzwl 0x4(%r14), %eax
jmp 0xaab94
movl %r13d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
orb $0x8, 0x3(%r12)
movq %rax, 0x68(%rsp)
movq %r12, %r13
movq 0x10(%r12), %r12
movq 0x8(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x72a1d
movq %rax, 0x8(%rbx)
leaq 0x2190(%rbx), %rdi
callq 0x8350
testl %eax, %eax
je 0xaabcf
pushq $0x2
popq %rax
jmp 0xaab72
movq %r13, 0x48(%rsp)
movq %r12, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq %r15, 0xe0(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0xd8(%rsp)
andl $0x0, 0x2258(%rbx)
xorl %eax, %eax
movl %eax, %r14d
movq %rbp, %r12
movq 0x68(%rsp), %r13
movq %rbp, 0xd0(%rsp)
cmpb $0x1, (%r12)
jne 0xaacae
movq 0x8(%r12), %rax
cmpb $0x1, (%rax)
jne 0xaabca
movq 0x8(%rax), %rcx
cmpb $0xa, (%rcx)
pushq $0x2
popq %r15
jne 0xaacf2
testb $-0x80, 0x6(%rcx)
jne 0xaacf2
movq 0x10(%rax), %rsi
cmpb $0x1, (%rsi)
jne 0xaacf2
movq %rbx, %rdi
callq 0x36881
testb %al, %al
je 0xaace9
cmpq $0x1af, %r13            # imm = 0x1AF
jne 0xaaca1
movq 0x8(%rbx), %r15
movq 0x8(%r12), %rax
movq %r13, %rbp
movq 0x8(%rax), %r13
movq %rbx, %rdi
movsd 0x27490(%rip), %xmm0    # 0xd2110
callq 0xc0fe
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %r13
movq 0xd0(%rsp), %rbp
movq %rax, %rcx
callq 0x9a09
incq %r14
movq 0x10(%r12), %r12
jmp 0xaac0f
cmpq $0x1af, %r13            # imm = 0x1AF
jne 0xaacfa
movq 0x38(%rsp), %rbp
movq 0x10(%rsp), %r12
pushq $0x2
popq %r15
cmpb $0x1, (%rbp)
jne 0xaace0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x36881
testb %al, %al
je 0xaace9
movq 0x10(%rbp), %rbp
jmp 0xaacc5
cmpq 0x110(%rbx), %rbp
je 0xaad39
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rbx)
movl %r15d, %eax
jmp 0xaab72
movq %rbp, %r12
cmpb $0x1, (%r12)
jne 0xaacb7
movq 0x8(%rbx), %r15
movq 0x8(%r12), %rax
movq 0x8(%rax), %r13
movq %rbx, %rdi
movsd 0x273f4(%rip), %xmm0    # 0xd2110
callq 0xc0fe
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0x9a09
movq 0x10(%r12), %r12
jmp 0xaacfd
movq 0x10(%r12), %r15
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x89849
movq 0x8(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %r13
movq 0x40(%rsp), %rax
cmpq $0x1, %rax
jne 0xaae73
cmpq $0x2, %r14
je 0xaaf78
cmpq $0x1, %r14
jne 0xaaff6
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rbp
movq 0x2260(%rbx), %rdi
movq (%rdi), %r14
movq 0x8(%r12), %rax
movq %rax, 0x8(%r13)
andl $0x0, 0x2258(%rbx)
movq %rdi, 0x28(%rsp)
callq *%r14
movq %rbp, 0xa8(%rsp)
movsd %xmm0, 0x8(%rbp)
movslq 0x2258(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0xc(%rsp)
movl %ecx, 0x2258(%rbx)
movq 0x2268(%rbx,%rax,8), %rdi
movq (%rdi), %r12
movq %rdi, 0x20(%rsp)
callq *%r12
leaq -0x17083(%rip), %rax    # 0x93d66
movq %r14, %rbp
cmpq %rax, %r14
jne 0xaae2b
leaq -0x165a1(%rip), %rax    # 0x94857
cmpq %rax, %r12
jne 0xaae2b
leaq -0x3efbb(%rip), %rax    # 0x6be49
movq 0x28(%rsp), %rcx
cmpq %rax, 0x18(%rcx)
jne 0xaae2b
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x8(%rcx), %rax
je 0xab053
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r14
incq %r14
cmpq %r15, %r14
jge 0xab1bc
movq %r14, 0x8(%r13)
andl $0x0, 0x2258(%rbx)
movq 0x28(%rsp), %rdi
callq *%rbp
movq 0xa8(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movl 0xc(%rsp), %eax
movl %eax, 0x2258(%rbx)
movq 0x20(%rsp), %rdi
callq *%r12
jmp 0xaae34
xorq $0x2, %rax
xorq $0x1, %r14
orq %rax, %r14
jne 0xaaeee
movq 0x8(%rbx), %rax
movq 0x8(%rax), %r14
movq 0x8(%r12), %r12
cmpq %r15, %r12
jge 0xab1bc
movq %r12, 0x8(%r13)
andl $0x0, 0x2258(%rbx)
movq 0x2260(%rbx), %rdi
callq *(%rdi)
movq 0x10(%r14), %rax
movsd %xmm0, 0x8(%rax)
movslq 0x2258(%rbx), %rax
movl %eax, %ecx
incl %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2268(%rbx,%rax,8), %rdi
callq *(%rdi)
movslq 0x2258(%rbx), %rax
movl %eax, %ecx
incl %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2268(%rbx,%rax,8), %rdi
callq *(%rdi)
incq %r12
jmp 0xaae8d
movq 0x8(%r12), %r14
movq 0xd8(%rsp), %rbp
cmpq %r15, %r14
jge 0xab1bc
movq %r14, 0x8(%r13)
andl $0x0, 0x2258(%rbx)
movq 0x8(%rbx), %rcx
addq $0x8, %rcx
xorl %eax, %eax
movq (%rcx), %r12
testq %r12, %r12
je 0xaaf4e
cltq
movq 0x2260(%rbx,%rax,8), %rdi
callq *(%rdi)
movq 0x10(%r12), %rax
movsd %xmm0, 0x8(%rax)
movl 0x2258(%rbx), %eax
incl %eax
movl %eax, 0x2258(%rbx)
addq $0x18, %r12
movq %r12, %rcx
jmp 0xaaf19
movq %rbp, %r12
subq $0x1, %r12
jb 0xaaf73
cltq
movq 0x2260(%rbx,%rax,8), %rdi
callq *(%rdi)
movl 0x2258(%rbx), %eax
incl %eax
movl %eax, 0x2258(%rbx)
jmp 0xaaf51
incq %r14
jmp 0xaaefb
movq 0x8(%rbx), %rax
movq 0x8(%rax), %r14
movq %r12, %rax
movq 0x18(%r14), %r12
movq 0x8(%rax), %rbp
cmpq %r15, %rbp
jge 0xab1bc
movq %rbp, 0x8(%r13)
andl $0x0, 0x2258(%rbx)
movq 0x2260(%rbx), %rdi
callq *(%rdi)
movq 0x10(%r14), %rax
movsd %xmm0, 0x8(%rax)
movslq 0x2258(%rbx), %rax
movl %eax, %ecx
incl %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2268(%rbx,%rax,8), %rdi
callq *(%rdi)
movq 0x10(%r12), %rax
movsd %xmm0, 0x8(%rax)
movslq 0x2258(%rbx), %rax
movl %eax, %ecx
incl %ecx
movl %ecx, 0x2258(%rbx)
movq 0x2268(%rbx,%rax,8), %rdi
callq *(%rdi)
incq %rbp
jmp 0xaaf8b
movq 0x8(%r12), %r14
cmpq %r15, %r14
jge 0xab1bc
movq %r14, 0x8(%r13)
andl $0x0, 0x2258(%rbx)
movq 0x8(%rbx), %rcx
addq $0x8, %rcx
xorl %eax, %eax
movq (%rcx), %r12
cltq
movq 0x2260(%rbx,%rax,8), %rdi
callq *(%rdi)
testq %r12, %r12
je 0xab04e
movq 0x10(%r12), %rax
movsd %xmm0, 0x8(%rax)
movl 0x2258(%rbx), %eax
incl %eax
movl %eax, 0x2258(%rbx)
addq $0x18, %r12
movq %r12, %rcx
jmp 0xab019
incq %r14
jmp 0xaaffb
movl 0xc(%rsp), %eax
movl %eax, 0x2258(%rbx)
movq 0x20(%rsp), %rbp
movq 0x68(%rbp), %rax
movslq 0x2258(%rax), %rcx
movq 0x2268(%rax,%rcx,8), %rdx
movq 0x2278(%rax,%rcx,8), %rsi
movq 0x2288(%rax,%rcx,8), %rax
movq 0x28(%rsp), %rcx
movq 0x20(%rcx), %rdi
movq %rdi, 0xc8(%rsp)
movq 0x28(%rcx), %rdi
movq %rdi, 0xc0(%rsp)
movq 0x8(%rdx), %rdi
movq %rdi, 0xb8(%rsp)
movq 0x10(%rdx), %rdx
movq %rdx, 0xb0(%rsp)
movq 0x28(%rax), %rdx
movq %rdx, 0xa0(%rsp)
movq 0x18(%rsi), %rdx
movq %rdx, 0x98(%rsp)
movq 0x28(%rsi), %rdx
movq %rdx, 0x90(%rsp)
movq 0x30(%rax), %rdx
movq %rdx, 0x88(%rsp)
movq 0x20(%rbp), %r14
movq 0x28(%rbp), %rdx
movq %rdx, 0x80(%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x70(%rsp)
movq 0x8(%rax), %rbp
movq 0x10(%rax), %r12
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r13
incq %r13
cmpq %r15, %r13
jge 0xab1bc
movq 0x78(%rsp), %rdi
callq *0xc8(%rsp)
movsd %xmm0, 0x50(%rsp)
movq 0x70(%rsp), %rdi
callq *0xc0(%rsp)
addsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0xb8(%rsp), %rdi
callq *0xb0(%rsp)
movsd %xmm0, 0x60(%rsp)
movq %rbp, %rdi
callq *0xa0(%rsp)
movsd %xmm0, 0x58(%rsp)
movq %r12, %rdi
movsd 0x30(%rsp), %xmm0
callq *0x88(%rsp)
mulsd 0x58(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movq 0x90(%rsp), %rdi
callq *0x98(%rsp)
mulsd 0x60(%rsp), %xmm0
movq 0x80(%rsp), %rdi
movq %r13, %rsi
callq *%r14
jmp 0xab11d
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rbx)
movq 0x118(%rbx), %rax
movq %rax, 0x20(%rbx)
movq 0xe0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, (%rbx)
pushq $0x4
jmp 0xaabcc