// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: start_and_end
static s7_pointer start_and_end(s7_scheme *sc, s7_pointer caller, s7_pointer args, int32_t position, s7_int *start, s7_int *end)
    {
        /* we assume that *start=0 and *end=length, that end is "exclusive", return true if the start/end points are not changed */
        s7_pointer pstart, index_args;
        s7_int i, index;

        for (i = 0, index_args = args; (i < (position - 1)) && (is_pair(index_args)); i++, index_args = cdr(index_args)) {}

        pstart = car(index_args);
        if (!s7_is_integer(pstart))
            return(method_or_bust(sc, pstart, caller, args, T_INTEGER, position));
        index = s7_integer(pstart);
        if ((index < 0) ||
                (index > *end)) /* *end == length here */
            return(out_of_range(sc, caller, small_int(position), pstart, (index < 0) ? its_negative_string : its_too_large_string));
        *start = index;

        if (is_pair(cdr(index_args)))
        {
            s7_pointer pend;
            pend = cadr(index_args);
            if (!s7_is_integer(pend))
                return(method_or_bust(sc, pend, caller, args, T_INTEGER, position + 1));
            index = s7_integer(pend);
            if ((index < *start) ||
                    (index > *end))
                return(out_of_range(sc, caller, small_int(position + 1), pend, (index < *start) ? its_too_small_string : its_too_large_string));
            *end = index;
        }
        return(sc->unused);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %eax
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
movl %eax, %esi
movq %rcx, %rdi
decl %esi
je 0xa0ea5
movq %rcx, %rdi
cmpb $0x1, (%rdi)
jne 0xa0ea5
movq 0x10(%rdi), %rdi
decq %rsi
jne 0xa0e97
movq 0x8(%rdi), %rsi
cmpb $0xb, (%rsi)
jne 0xa0f32
movq 0x8(%rsi), %r10
testq %r10, %r10
js 0xa0ec4
cmpq (%r9), %r10
jle 0xa0f4a
testq %r10, %r10
movq 0x8(%rdx), %rcx
movl %eax, %eax
leaq 0xada7c(%rip), %rdx     # 0x14e950
movq (%rdx,%rax,8), %rax
leaq 0xb1b69(%rip), %rdx     # 0x152a48
leaq 0xb1b5a(%rip), %rdi     # 0x152a40
cmovsq %rdx, %rdi
movq (%rdi), %rdx
movq 0x1ee8(%rbx), %rdi
movq 0x10(%rdi), %rdi
movq %rcx, 0x8(%rdi)
movq 0x10(%rdi), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rbx), %r14
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b366
jmp 0xa1004
movq %rbx, %rdi
movl $0xb, %r8d
movl %eax, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf1ae
movq %r10, (%r8)
movq 0x10(%rdi), %rsi
cmpb $0x1, (%rsi)
jne 0xa0ffd
movq 0x8(%rsi), %rsi
cmpb $0xb, (%rsi)
jne 0xa0fe1
movq 0x8(%rsi), %rcx
cmpq %r10, %rcx
jl 0xa0f75
cmpq (%r9), %rcx
jle 0xa100f
cmpq %r10, %rcx
movq 0x8(%rdx), %rcx
movl %eax, %eax
leaq 0xad9cb(%rip), %rdx     # 0x14e950
movq 0x8(%rdx,%rax,8), %rax
leaq 0xba0d7(%rip), %rdx     # 0x15b068
leaq 0xb1aa8(%rip), %rdi     # 0x152a40
cmovlq %rdx, %rdi
movq (%rdi), %rdx
movq 0x1ee8(%rbx), %rdi
movq 0x10(%rdi), %rdi
movq %rcx, 0x8(%rdi)
movq 0x10(%rdi), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rsi, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rbx), %r14
movq 0x1ee8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b366
jmp 0xa0ff7
incl %eax
movq %rbx, %rdi
movl $0xb, %r8d
movl %eax, %r9d
callq 0xf1ae
movq %rax, %r14
xorl %eax, %eax
testb %al, %al
je 0xa1004
movq 0x140(%rbx), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rcx, (%r9)
movb $0x1, %al
jmp 0xa0ff9