// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: simple_do_ex
static bool simple_do_ex(s7_scheme *sc, s7_pointer code)
                {
#if (!WITH_GMP)
                    s7_pointer body, step_expr, step_var, ctr_slot, end_slot;
                    s7_function stepf, endf;
                    s7_function func;

                    code = cdr(code);
                    body = caddr(code);

                    if (no_cell_opt(cddr(code)))
                        return(false);

                    func = s7_optimize_nr(sc, cddr(code));
                    if (!func)
                    {
                        set_no_cell_opt(cddr(code));
                        return(false);
                    }

                    /* func must be set */
                    step_expr = caddr(caar(code));
                    stepf = c_callee(step_expr);
                    endf = c_callee(caadr(code));
                    ctr_slot = let_dox_slot1(sc->envir);
                    end_slot = let_dox_slot2(sc->envir);
                    step_var = caddr(step_expr);
                    /* use g* funcs (not fx) because we're passing the actual values, not the expressions */

                    if ((stepf == g_add_x1) &&
                            (is_t_integer(slot_value(ctr_slot))) &&
                            ((endf == g_num_eq_2) || (endf == g_num_eq_xi) || (endf == g_geq_2)) &&
                            (is_t_integer(slot_value(end_slot))))
                    {
                        s7_int i, start, stop;
                        start = integer(slot_value(ctr_slot));
                        stop = integer(slot_value(end_slot));

                        if (func == opt_cell_any_nr)
                        {
                            opt_info *o;
                            s7_pointer (*fp)(opt_info *o);
                            o = sc->opts[0];
                            fp = o->v[0].fp;
                            if (fp == opt_p_ppp_sss)
                            {
                                s7_p_ppp_t fpt;
                                fpt = o->v[4].p_ppp_f;
                                for (i = start; i < stop; i++)
                                {
                                    slot_set_value(ctr_slot, make_integer(sc, i));
                                    fpt(sc, slot_value(o->v[1].p), slot_value(o->v[2].p), slot_value(o->v[3].p));
                                }
                            }
                            else
                            {
                                if (fp == opt_p_ppp_sfs)
                                {
                                    s7_p_ppp_t fpt;
                                    opt_info *o1;
                                    fpt = o->v[3].p_ppp_f;
                                    o1 = sc->opts[1];
                                    for (i = start; i < stop; i++)
                                    {
                                        slot_set_value(ctr_slot, make_integer(sc, i));
                                        sc->pc = 1;
                                        fpt(sc, slot_value(o->v[1].p), o1->v[0].fp(o1), slot_value(o->v[2].p));
                                    }
                                }
                                else
                                {
                                    for (i = start; i < stop; i++)
                                    {
                                        slot_set_value(ctr_slot, make_integer(sc, i));
                                        sc->pc = 0;
                                        fp(o);
                                    }
                                }
                            }
                        }
                        else
                        {
                            /* splitting out opt_float_any_nr here saves almost nothing */
                            for (i = start; i < stop; i++)
                            {
                                slot_set_value(ctr_slot, make_integer(sc, i));
                                func(sc, body);
                            }
                        }
                        sc->value = sc->T;
                        sc->code = cdadr(code);
                        return(true);
                    }

                    if ((stepf == g_subtract_s1) &&
                            (is_t_integer(slot_value(ctr_slot))) &&
                            ((endf == g_less_x0) || (endf == g_less_2) || (endf == g_less_xi)) &&
                            (is_t_integer(slot_value(end_slot))))
                    {
                        s7_int i, start, stop;
                        start = integer(slot_value(ctr_slot));
                        stop = integer(slot_value(end_slot));

                        if (func == opt_cell_any_nr)
                        {
                            opt_info *o;
                            o = sc->opts[0];
                            if (!opt_do_copy(sc, o, stop, start + 1))
                            {
                                s7_pointer (*fp)(opt_info *o);
                                fp = o->v[0].fp;
                                for (i = start; i >= stop; i--)
                                {
                                    slot_set_value(ctr_slot, make_integer(sc, i));
                                    sc->pc = 0;
                                    fp(o);
                                }
                            }
                        }
                        else
                        {
                            for (i = start; i >= stop; i--)
                            {
                                slot_set_value(ctr_slot, make_integer(sc, i));
                                func(sc, body);
                            }
                        }
                        sc->value = sc->T;
                        sc->code = cdadr(code);
                        return(true);
                    }

                    if ((stepf == g_add_2_xi) &&
                            (is_t_integer(slot_value(ctr_slot))) &&
                            ((endf == g_num_eq_2) || (endf == g_num_eq_xi) || (endf == g_geq_2)) &&
                            (is_t_integer(slot_value(end_slot))))
                    {
                        s7_int i, start, stop, incr;
                        start = integer(slot_value(ctr_slot));
                        stop = integer(slot_value(end_slot));
                        incr = integer(caddr(step_expr));
                        for (i = start; i < stop; i += incr)
                        {
                            slot_set_value(ctr_slot, make_integer(sc, i));
                            func(sc, body);
                        }
                        sc->value = sc->T;
                        sc->code = cdadr(code);
                        return(true);
                    }

                    while (true)
                    {
                        func(sc, body);

                        set_car(sc->t2_1, slot_value(ctr_slot));
                        set_car(sc->t2_2, step_var);
                        slot_set_value(ctr_slot, stepf(sc, sc->t2_1));

                        set_car(sc->t2_1, slot_value(ctr_slot));
                        set_car(sc->t2_2, slot_value(end_slot));
                        if (is_true(sc, sc->value = endf(sc, sc->t2_1)))
                        {
                            sc->code = cdadr(code);
                            return(true);
                        }
                    }
#endif
                    return(false);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x10(%rsi), %r14
movq 0x10(%r14), %rax
movq 0x10(%rax), %rsi
testb $0x4, 0x3(%rsi)
jne 0xd881d
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movl $0x1, %edx
callq 0x4588d
testq %rax, %rax
je 0xd880e
movq %rax, %r13
movq %r15, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %r14, 0x18(%rsp)
movq 0x10(%r14), %rcx
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rdx
movq 0x20(%rax), %r15
movq 0x8(%rcx), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %r12
movq 0x8(%rbx), %rax
movq 0x20(%rax), %rbp
movq 0x28(%rax), %r14
movq 0x10(%rdx), %rax
movq 0x8(%rax), %rdx
leaq 0x64b(%rip), %rax       # 0xd8d32
cmpq %rax, %r15
movq %r13, 0x20(%rsp)
je 0xd8824
leaq 0x753(%rip), %rax       # 0xd8e4f
cmpq %rax, %r15
je 0xd8903
leaq 0x74c(%rip), %rax       # 0xd8e58
cmpq %rax, %r15
jne 0xd89ec
movq 0x10(%rbp), %rax
cmpb $0xb, (%rax)
jne 0xd89ec
leaq -0x26510(%rip), %rcx    # 0xb2219
cmpq %rcx, %r12
je 0xd874a
leaq 0x67f(%rip), %rcx       # 0xd8db4
cmpq %rcx, %r12
je 0xd874a
leaq 0x6aa(%rip), %rcx       # 0xd8deb
cmpq %rcx, %r12
jne 0xd89ec
movq 0x10(%r14), %rcx
cmpb $0xb, (%rcx)
jne 0xd89ec
movq 0x8(%rax), %rax
movq 0x8(%rcx), %rcx
movq %rax, 0x8(%rsp)
movq %rcx, 0x30(%rsp)
cmpq %rcx, %rax
jge 0xd8d22
movq 0x8(%rdx), %r12
movq 0x8(%rsp), %r14
leaq (,%r14,8), %rax
movq %rax, 0x28(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
leaq (%rax,%r13), %r15
cmpq $0x7ff, %r15            # imm = 0x7FF
ja 0xd87b3
movq 0x28(%rsp), %rax
leaq (%rax,%r13,8), %rax
leaq 0x6e1a3(%rip), %rcx     # 0x146950
movq (%rcx,%rax), %rax
jmp 0xd87ec
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd87d2
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x10(%rbp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq *0x20(%rsp)
addq %r12, %r14
addq %r12, %r13
cmpq 0x30(%rsp), %r14
jl 0xd878b
jmp 0xd8d22
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
orq $0x4000000, (%rax)      # imm = 0x4000000
xorl %eax, %eax
jmp 0xd8a70
movq 0x10(%rbp), %rax
cmpb $0xb, (%rax)
jne 0xd89ec
leaq -0x2661f(%rip), %rcx    # 0xb2219
cmpq %rcx, %r12
je 0xd8859
leaq 0x570(%rip), %rcx       # 0xd8db4
cmpq %rcx, %r12
je 0xd8859
leaq 0x59b(%rip), %rcx       # 0xd8deb
cmpq %rcx, %r12
jne 0xd89ec
movq 0x10(%r14), %rcx
cmpb $0xb, (%rcx)
jne 0xd89ec
movq 0x8(%rax), %r12
movq 0x8(%rcx), %rcx
leaq -0x1b74a(%rip), %rax    # 0xbd12b
cmpq %rax, %r13
movq %rcx, 0x8(%rsp)
je 0xd8a7f
cmpq %rcx, %r12
movq 0x10(%rsp), %r15
jge 0xd8d22
leaq 0x6e0b8(%rip), %rax     # 0x146950
leaq (%rax,%r12,8), %r14
cmpq $0x7ff, %r12            # imm = 0x7FF
ja 0xd88aa
movq (%r14), %rax
jmp 0xd88e3
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd88c9
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq *%r13
incq %r12
addq $0x8, %r14
cmpq %r12, 0x8(%rsp)
jne 0xd889c
jmp 0xd8d22
movq 0x10(%rbp), %rax
cmpb $0xb, (%rax)
jne 0xd89ec
leaq -0xa025(%rip), %rcx     # 0xce8f2
cmpq %rcx, %r12
je 0xd8938
leaq -0x9fae(%rip), %rcx     # 0xce975
cmpq %rcx, %r12
je 0xd8938
leaq -0x26265(%rip), %rcx    # 0xb26ca
cmpq %rcx, %r12
jne 0xd89ec
movq 0x10(%r14), %rcx
cmpb $0xb, (%rcx)
jne 0xd89ec
movq %r13, %rsi
movq 0x8(%rax), %r13
movq 0x8(%rcx), %rdx
leaq -0x1b82c(%rip), %rax    # 0xbd12b
cmpq %rax, %rsi
movq %rdx, 0x8(%rsp)
je 0xd8b2c
cmpq %rdx, %r13
movq 0x10(%rsp), %r15
jl 0xd8d22
movq %rsi, %r12
leaq 0x6dfd3(%rip), %rax     # 0x146950
leaq (%rax,%r13,8), %r14
cmpq $0x7ff, %r13            # imm = 0x7FF
ja 0xd898f
movq (%r14), %rax
jmp 0xd89c8
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd89ae
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r13, 0x8(%rax)
movq %rax, 0x10(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq *%r12
leaq -0x1(%r13), %rax
addq $-0x8, %r14
cmpq 0x8(%rsp), %r13
movq %rax, %r13
jg 0xd8981
jmp 0xd8d22
movq %rdx, %r13
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq *0x20(%rsp)
movq 0x10(%rbp), %rax
movq 0x570(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x578(%rbx), %rax
movq %r13, 0x8(%rax)
movq 0x570(%rbx), %rsi
movq %rbx, %rdi
callq *%r15
movq %rax, 0x10(%rbp)
movq 0x570(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%r14), %rax
movq 0x578(%rbx), %rcx
movq %rax, 0x8(%rcx)
movq 0x570(%rbx), %rsi
movq %rbx, %rdi
callq *%r12
movq %rax, 0x20(%rbx)
cmpq 0x120(%rbx), %rax
je 0xd89ef
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, (%rbx)
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2260(%rbx), %r14
movq (%r14), %r15
leaq -0x2fc3d(%rip), %rax    # 0xa8e53
cmpq %rax, %r15
je 0xd8bd8
leaq -0x2f98d(%rip), %rax    # 0xa9113
cmpq %rax, %r15
je 0xd8c6d
cmpq %rcx, %r12
jge 0xd8d22
leaq 0x6de97(%rip), %rax     # 0x146950
leaq (%rax,%r12,8), %r13
cmpq $0x7ff, %r12            # imm = 0x7FF
ja 0xd8acc
movq (%r13), %rax
jmp 0xd8b05
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd8aeb
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%rbp)
movl $0x0, 0x2258(%rbx)
movq %r14, %rdi
callq *%r15
incq %r12
addq $0x8, %r13
cmpq %r12, 0x8(%rsp)
jne 0xd8abd
jmp 0xd8d22
movq 0x2260(%rbx), %r14
leaq 0x1(%r13), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd836b
movq 0x8(%rsp), %rcx
testb %al, %al
jne 0xd8d22
cmpq %rcx, %r13
jl 0xd8d22
movq (%r14), %r12
leaq 0x6ddee(%rip), %rax     # 0x146950
leaq (%rax,%r13,8), %r15
cmpq $0x7ff, %r13            # imm = 0x7FF
ja 0xd8b74
movq (%r15), %rax
jmp 0xd8bad
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd8b93
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r13, 0x8(%rax)
movq %rax, 0x10(%rbp)
movl $0x0, 0x2258(%rbx)
movq %r14, %rdi
callq *%r12
leaq -0x1(%r13), %rax
addq $-0x8, %r15
cmpq 0x8(%rsp), %r13
movq %rax, %r13
jg 0xd8b66
jmp 0xd8d22
cmpq %rcx, %r12
jge 0xd8d22
movq 0x20(%r14), %r15
leaq 0x6dd64(%rip), %rax     # 0x146950
leaq (%rax,%r12,8), %r13
cmpq $0x7ff, %r12            # imm = 0x7FF
ja 0xd8bff
movq (%r13), %rax
jmp 0xd8c38
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd8c1e
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%rbp)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movq 0x10(%rax), %rsi
movq 0x10(%rcx), %rdx
movq 0x18(%r14), %rax
movq 0x10(%rax), %rcx
movq %rbx, %rdi
callq *%r15
incq %r12
addq $0x8, %r13
cmpq %r12, 0x8(%rsp)
jne 0xd8bf0
jmp 0xd8d22
cmpq %rcx, %r12
jge 0xd8d22
movq 0x18(%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x2268(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x6dcbe(%rip), %rax     # 0x146950
leaq (%rax,%r12,8), %r13
cmpq $0x7ff, %r12            # imm = 0x7FF
ja 0xd8ca5
movq (%r13), %rax
jmp 0xd8cde
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xd8cc4
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0xb, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%rbp)
movl $0x1, 0x2258(%rbx)
movq 0x8(%r14), %rax
movq 0x10(%rax), %r15
movq 0x20(%rsp), %rdi
callq *(%rdi)
movq 0x10(%r14), %rcx
movq 0x10(%rcx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq *0x10(%rsp)
incq %r12
addq $0x8, %r13
cmpq %r12, 0x8(%rsp)
jne 0xd8c96
movq 0x118(%rbx), %rax
movq %rax, 0x20(%rbx)
jmp 0xd8a5a