// File: /workspace/github_c_makefile_star2_O1/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 0x10bad6
movq 0x18(%rsi), %rax
movq 0x20(%rax), %rdx
testq %rdx, %rdx
je 0x10baf6
cmpq $0x2, 0x10(%rdx)
jne 0x10baf6
movq 0x10(%rcx), %r8
movq 0x8(%r8), %rax
cmpb $0xb, (%rax)
jne 0x10bb12
movq 0x8(%rax), %rdi
testq %rdi, %rdi
js 0x10bb2d
movq (%rdx), %r9
cmpq (%r9), %rdi
jge 0x10bb2d
movq 0x10(%r8), %rax
movq 0x8(%rax), %rax
cmpb $0xb, (%rax)
jne 0x10bb91
movq 0x8(%rax), %rcx
testq %rcx, %rcx
js 0x10bbaf
cmpq 0x8(%r9), %rcx
jge 0x10bbaf
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 0x10bbb7
leaq 0x42e83(%rip), %rax     # 0x14e950
movq (%rax,%r15,8), %r14
jmp 0x10bb88
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movl $0x16, %r8d
movl $0x1, %r9d
popq %rbx
popq %r14
popq %r15
jmp 0xf1ae
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movq %rcx, %rsi
movl $0x16, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xde964
movq 0xfa8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl $0xb, %r8d
movl $0x2, %r9d
jmp 0x10baec
testq %rdi, %rdi
movq 0xfa8(%rbx), %rcx
movq 0x8(%rcx), %rcx
leaq 0x46f06(%rip), %rdx     # 0x152a48
leaq 0x46ef7(%rip), %rsi     # 0x152a40
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 0x3b366
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 0x10baec
testq %rcx, %rcx
jmp 0x10bb30
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0x10bbcf
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r14
movq $0xb, (%r14)
movq %r15, 0x8(%r14)
jmp 0x10bb88