// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: opt_dotimes_2
static s7_pointer opt_dotimes_2(opt_info *o)
                {
                    /* 1 var, no return */
                    opt_info *o1; /* o->v[2].p=frame, o->v[1].i=body end index, o->v[3].i=body length, o->v[4].i=return length, o->v[5].i=end index, v6.i=end if int32_t */
                    int32_t loop, len;
                    s7_int end;
                    s7_pointer vp, old_e;
                    s7_scheme *sc;
                    sc = o->sc;

                    oo_rc(sc, o, 10, 0);
                    old_e = sc->envir;
                    push_stack_no_let_no_code(sc, OP_GC_PROTECT, old_e);
                    sc->envir = o->v[2].p;
                    len = o->v[3].i;

                    vp = slot_value(let_dox_slot1(o->v[2].p));
                    if (is_slot(let_dox_slot2_unchecked(o->v[2].p)))
                        end = integer(slot_value(let_dox_slot2(o->v[2].p)));
                    else end = o->v[6].i;

                    o1 = sc->opts[++sc->pc];
                    integer(vp) = integer(o1->v[0].fp(o1));

                    loop = o->v[4].i - 1;
                    if (len == 2)
                    {
                        while (integer(vp) < end)
                        {
                            sc->pc = loop;
                            o1 = sc->opts[++sc->pc];
                            o1->v[0].fp(o1);
                            o1 = sc->opts[++sc->pc];
                            o1->v[0].fp(o1);
                            integer(vp)++;
                        }
                    }
                    else
                    {
                        while (integer(vp) < end)
                        {
                            int32_t i;
                            sc->pc = loop;
                            for (i = 0; i < len; i++)
                            {
                                o1 = sc->opts[++sc->pc];
                                o1->v[0].fp(o1);
                            }
                            integer(vp)++;
                        }
                    }
                    sc->pc = o->v[5].i;
                    unstack(sc);
                    sc->envir = old_e;
                    return(sc->T);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x68(%rdi), %r14
movq 0x8(%r14), %rcx
movq 0x50(%r14), %rax
movq %rcx, 0x10(%rsp)
movq %rcx, 0x10(%rax)
movq 0x50(%r14), %rax
movq $0x1, 0x18(%rax)
addq $0x20, 0x50(%r14)
movq 0x10(%rdi), %rax
movq %rax, 0x8(%r14)
movl 0x18(%rdi), %ebx
movq 0x10(%rdi), %rax
movq 0x20(%rax), %rcx
movq 0x28(%rax), %rax
movq 0x10(%rcx), %r12
cmpb $0x20, (%rax)
jne 0xb515b
movq 0x10(%rax), %rax
addq $0x8, %rax
jmp 0xb515f
leaq 0x30(%r15), %rax
movq (%rax), %r13
movslq 0x2258(%r14), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x2258(%r14)
movq 0x2268(%r14,%rax,8), %rdi
callq *(%rdi)
movq 0x8(%rax), %rax
movq %rax, 0x8(%r12)
movq %r15, 0x8(%rsp)
movq 0x20(%r15), %r15
cmpl $0x2, %ebx
jne 0xb51e1
cmpq %r13, %rax
jge 0xb5227
movslq %r15d, %rbp
movl %r15d, 0x2258(%r14)
movq 0x2260(%r14,%rbp,8), %rdi
callq *(%rdi)
movslq 0x2258(%r14), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%r14)
movq 0x2268(%r14,%rax,8), %rdi
callq *(%rdi)
movq 0x8(%r12), %rax
incq %rax
movq %rax, 0x8(%r12)
cmpq %r13, %rax
jl 0xb51a1
jmp 0xb5227
cmpq %r13, %rax
jge 0xb5227
decl %r15d
movl %r15d, 0x2258(%r14)
testl %ebx, %ebx
jle 0xb5215
movl %ebx, %ebp
movslq 0x2258(%r14), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x2258(%r14)
movq 0x2268(%r14,%rax,8), %rdi
callq *(%rdi)
decl %ebp
jne 0xb51f6
movq 0x8(%r12), %rax
incq %rax
movq %rax, 0x8(%r12)
cmpq %r13, %rax
jl 0xb51e9
movq 0x8(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x2258(%r14)
addq $-0x20, 0x50(%r14)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%r14)
movq 0x118(%r14), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq