// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: g_iv_ref_3
static s7_pointer g_iv_ref_3(s7_scheme *sc, s7_pointer args)
                {
                    s7_pointer iv, index;
                    s7_int ind1, ind2;
                    iv = car(args);
                    if (!is_int_vector(iv))
                        return(method_or_bust(sc, iv, sc->int_vector_ref_symbol, args, T_INT_VECTOR, 1));
                    if (vector_rank(iv) != 2)
                        return(univect_ref(sc, args, sc->int_vector_ref_symbol, T_INT_VECTOR));
                    index = cadr(args);
                    if (!s7_is_integer(index))
                        return(method_or_bust(sc, index, sc->int_vector_ref_symbol, args, T_INTEGER, 2));
                    ind1 = s7_integer(index);
                    if ((ind1 < 0) || (ind1 >= vector_dimension(iv, 0)))
                        return(simple_out_of_range(sc, sc->int_vector_ref_symbol, index, (ind1 < 0) ? its_negative_string : its_too_large_string));
                    index = caddr(args);
                    if (!s7_is_integer(index))
                        return(method_or_bust(sc, index, sc->int_vector_ref_symbol, args, T_INTEGER, 3));
                    ind2 = s7_integer(index);
                    if ((ind2 < 0) || (ind2 >= vector_dimension(iv, 1)))
                        return(simple_out_of_range(sc, sc->int_vector_ref_symbol, index, (ind2 < 0) ? its_negative_string : its_too_large_string));
                    ind1 = ind1 * vector_offset(iv, 0) + ind2;
                    return(make_integer(sc, int_vector(iv, ind1)));
                }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rcx
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
cmpb $0x16, (%rsi)
jne 0x10269e
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rdx
testq %rdx, %rdx
je 0x1026be
cmpq $0x2, 0x10(%rdx)
jne 0x1026be
movq 0x10(%rcx), %r8
movq 0x8(%r8), %rax
cmpb $0xb, (%rax)
jne 0x1026da
movq 0x8(%rax), %rdi
testq %rdi, %rdi
js 0x1026f5
movq (%rdx), %r9
cmpq (%r9), %rdi
jge 0x1026f5
movq 0x10(%r8), %rax
movq 0x8(%rax), %rax
cmpb $0xb, (%rax)
jne 0x102759
movq 0x8(%rax), %rcx
testq %rcx, %rcx
js 0x102777
cmpq 0x8(%r9), %rcx
jge 0x102777
movq 0x18(%rdx), %rax
imulq (%rax), %rdi
shlq $0x3, %rdi
addq 0x10(%rsi), %rdi
movq (%rdi,%rcx,8), %r15
cmpq $0x7ff, %r15            # imm = 0x7FF
ja 0x10277f
leaq 0x442bb(%rip), %rax     # 0x146950
movq (%rax,%r15,8), %r14
jmp 0x102750
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movl $0x16, %r8d
movl $0x1, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0xe42d
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movq %rcx, %rsi
movl $0x16, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xd6155
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl $0xb, %r8d
movl $0x2, %r9d
jmp 0x1026b4
testq %rdi, %rdi
movq 0xfa8(%rbx), %rcx
movq 0x8(%rcx), %rcx
leaq 0x4833e(%rip), %rdx     # 0x14aa48
leaq 0x4832f(%rip), %rsi     # 0x14aa40
cmovsq %rdx, %rsi
movq (%rsi), %rdx
movq 0x1ef8(%rbx), %rsi
movq 0x10(%rsi), %rsi
movq %rcx, 0x8(%rsi)
movq 0x10(%rsi), %rcx
movq %rax, 0x8(%rcx)
movq 0x10(%rcx), %rax
movq %rdx, 0x8(%rax)
movq 0x1948(%rbx), %r14
movq 0x1ef8(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38dfa
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl $0xb, %r8d
movl $0x3, %r9d
jmp 0x1026b4
testq %rcx, %rcx
jmp 0x1026f8
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x10279e
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r14
movq $0xb, (%r14)
movq %r15, 0x8(%r14)
jmp 0x102750