// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movl %ecx, 0x94(%rsp)
movq %r8, 0x88(%rsp)
movq %r9, 0x80(%rsp)
movq $0x0, 0x68(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rcx
movl 0x94(%rsp), %eax
subl $0x1, %eax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x57(%rsp)
jge 0xda78b
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
sete %al
movb %al, 0x57(%rsp)
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0xda795
jmp 0xda7b5
jmp 0xda797
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x70(%rsp)
jmp 0xda75c
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0xda80e
movq 0xa8(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
movl 0x94(%rsp), %r9d
movl $0xb, %r8d
callq 0x13c50
movq %rax, 0xb0(%rsp)
jmp 0xdaa42
movq 0x78(%rsp), %rdi
callq 0x10790
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jl 0xda83b
movq 0x60(%rsp), %rax
movq 0x80(%rsp), %rcx
cmpq (%rcx), %rax
jle 0xda8c8
movq 0xa8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movslq 0x94(%rsp), %rcx
leaq 0x13bc18(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x60(%rsp)
jge 0xda891
movq 0x13fcee(%rip), %rax    # 0x21a578
movq %rax, 0x28(%rsp)
jmp 0xda89d
movq 0x13fcd8(%rip), %rax    # 0x21a570
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %r8
callq 0x13880
movq %rax, 0xb0(%rsp)
jmp 0xdaa42
movq 0x60(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, (%rax)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0xdaa2b
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x11340
testb $0x1, %al
jne 0xda94e
movq 0xa8(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
movl 0x94(%rsp), %r9d
addl $0x1, %r9d
movl $0xb, %r8d
callq 0x13c50
movq %rax, 0xb0(%rsp)
jmp 0xdaa42
movq 0x58(%rsp), %rdi
callq 0x10790
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq 0x88(%rsp), %rcx
cmpq (%rcx), %rax
jl 0xda985
movq 0x60(%rsp), %rax
movq 0x80(%rsp), %rcx
cmpq (%rcx), %rax
jle 0xdaa1b
movq 0xa8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movl 0x94(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x13bac9(%rip), %rax    # 0x216480
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rax
movq 0x88(%rsp), %rcx
cmpq (%rcx), %rax
jge 0xda9e9
movq 0x1481d5(%rip), %rax    # 0x222bb8
movq %rax, (%rsp)
jmp 0xda9f4
movq 0x13fb80(%rip), %rax    # 0x21a570
movq %rax, (%rsp)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq (%rsp), %r8
callq 0x13880
movq %rax, 0xb0(%rsp)
jmp 0xdaa42
movq 0x60(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
movq 0xa8(%rsp), %rax
movq 0x140(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)