// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: list_ref_1
static s7_pointer list_ref_1(s7_scheme *sc, s7_pointer lst, s7_pointer ind)
                {
                    s7_int i, index;
                    s7_pointer p;

                    if (!s7_is_integer(ind))
                        return(method_or_bust(sc, ind, sc->list_ref_symbol, list_2(sc, lst, ind), T_INTEGER, 2));
                    index = s7_integer(ind);
                    if ((index < 0) || (index > sc->max_list_length))
                        return(out_of_range(sc, sc->list_ref_symbol, small_int(2), ind, (index < 0) ? its_negative_string : its_too_large_string));

                    for (i = 0, p = lst; (i < index) && is_pair(p); i++, p = cdr(p)) {}

                    if (!is_pair(p))
                    {
                        if (is_null(p))
                            return(out_of_range(sc, sc->list_ref_symbol, small_int(2), ind, its_too_large_string));
                        return(wrong_type_argument_with_type(sc, sc->list_ref_symbol, 1, lst, a_proper_list_string));
                    }
                    return(car(p));
                }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0xb, (%rdx)
jne 0xdee45
movq 0x8(%r14), %rax
testq %rax, %rax
js 0xdedce
cmpq 0x2b0(%rbx), %rax
jle 0xdeed5
testq %rax, %rax
movq 0x1258(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x6fb7d(%rip), %rcx     # 0x14e960
leaq 0x73c5e(%rip), %rdx     # 0x152a48
leaq 0x73c4f(%rip), %rsi     # 0x152a40
cmovsq %rdx, %rsi
movq (%rsi), %rdx
movq 0x1ee8(%rbx), %rsi
movq 0x10(%rsi), %rsi
movq %rax, 0x8(%rsi)
movq 0x10(%rsi), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rax
movq %r14, 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
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x1258(%rbx), %r12
movq 0x90(%rbx), %rax
movq 0x110(%rbx), %r13
cmpq 0x98(%rbx), %rax
ja 0xdee6b
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movl $0x200001, %edx         # imm = 0x200001
movq %rdx, (%rax)
movq %r14, 0x8(%rax)
movq %r13, 0x10(%rax)
movq 0x90(%rbx), %rcx
leaq -0x8(%rcx), %rsi
movq %rsi, 0x90(%rbx)
movq -0x8(%rcx), %rcx
movq %rdx, (%rcx)
movq %r15, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl $0xb, %r8d
movl $0x2, %r9d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xf1ae
movq %r15, %rcx
testq %rax, %rax
je 0xdeeee
movq %r15, %rcx
cmpb $0x1, (%rcx)
jne 0xdeeee
movq 0x10(%rcx), %rcx
decq %rax
jne 0xdeee0
cmpb $0x1, (%rcx)
jne 0xdeefc
movq 0x8(%rcx), %r14
jmp 0xdee38
movq 0x1258(%rbx), %rax
movq 0x8(%rax), %rsi
cmpq 0x110(%rbx), %rcx
je 0xdef39
movq 0x6fa41(%rip), %rdx     # 0x14e958
movq 0x140(%rbx), %r8
movq 0x7bcf3(%rip), %r9      # 0x15ac18
movq %rbx, %rdi
movq %r15, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xb31d
movq 0x6fa20(%rip), %rax     # 0x14e960
movq 0x73af9(%rip), %rcx     # 0x152a40
movq 0x1ee8(%rbx), %rdx
movq 0x10(%rdx), %rdx
movq %rsi, 0x8(%rdx)
movq 0x10(%rdx), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%rdx), %rax
movq %r14, 0x8(%rax)
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xdee1f