// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: vector_equivalent
static bool vector_equivalent(s7_scheme *sc, s7_pointer x, s7_pointer y, shared_info *ci)
                {
                    s7_int i, len;
                    shared_info *nci = ci;

                    if (x == y)
                        return(true);
                    if (!is_any_vector(y))
                    {
                        check_equivalent_method(sc, y, x);
                        return(false);
                    }
                    len = vector_length(x);
                    if (len != vector_length(y)) return(false);
                    if (len == 0) return(true);
                    if (!vector_rank_match(sc, x, y)) return(false);

                    if (type(x) != type(y))
                    {
                        /* (equivalent? (make-int-vector 3 0) (make-vector 3 0)) -> #t
                         * (equivalent? (make-float-vector 3 1.0) (vector 1 1 1)) -> #t
                         */
                        if ((is_int_vector(x)) && (is_byte_vector(y)))
                            return(biv_meq(sc, y, x, NULL));
                        if ((is_byte_vector(x)) && (is_int_vector(y)))
                            return(biv_meq(sc, x, y, NULL));
                        for (i = 0; i < len; i++)
                            if (!s7_is_equivalent_1(sc, vector_getter(x)(sc, x, i), vector_getter(y)(sc, y, i), NULL)) /* this could be greatly optimized */
                                return(false);
                        return(true);
                    }

                    if (is_float_vector(x))
                    {
                        s7_double *arr1, *arr2;
                        s7_double fudge;
                        arr1 = float_vector_floats(x);
                        arr2 = float_vector_floats(y);
                        fudge = sc->equivalent_float_epsilon;
                        if (fudge == 0.0)
                        {
                            for (i = 0; i < len; i++)
                                if ((arr1[i] != arr2[i]) &&
                                        ((!is_NaN(arr1[i])) || (!is_NaN(arr2[i]))))
                                    return(false);
                        }
                        else
                        {
                            for (i = 0; i < len; i++)
                                if (!floats_are_equivalent(sc, arr1[i], arr2[i]))
                                    return(false);
                        }
                        return(true);
                    }
                    if (is_int_vector(x))
                        return(iv_meq(int_vector_ints(x), int_vector_ints(y), len));
                    if (is_byte_vector(x))
                        return(byte_vector_equal(sc, x, y, NULL));

                    if (!has_simple_elements(x))
                    {
                        if (ci)
                            equal_ref(sc, x, y, ci);
                        else nci = new_shared_info(sc);
                    }
                    for (i = 0; i < len; i++)
                        if (!(s7_is_equivalent_1(sc, vector_element(x, i), vector_element(y, i), nci)))
                            return(false);
                    return(true);
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
je 0xf7a43
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movzbl (%rdx), %ebp
leaq 0x532a3(%rip), %rax     # 0x14ac20
cmpb $0x0, (%rbp,%rax)
je 0xf7a4a
movq 0x8(%r12), %rbx
cmpq 0x8(%r15), %rbx
jne 0xf7b0d
testq %rbx, %rbx
je 0xf7a43
movq %rcx, %r13
movq 0x18(%r12), %rax
movq 0x20(%rax), %rdi
movq %r15, %rsi
callq 0xf8bb6
testb %al, %al
je 0xf7b0d
movb (%r12), %al
cmpb %bpl, %al
jne 0xf7b1e
cmpl $0x16, %ebp
je 0xf7bb3
cmpl $0x18, %ebp
je 0xf7b9a
cmpl $0x17, %ebp
jne 0xf7c35
movq 0x10(%r12), %r12
movq 0x10(%r15), %r15
movsd 0x260(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf7c70
jp 0xf7c70
testq %rbx, %rbx
jle 0xf7a43
xorl %ecx, %ecx
xorl %eax, %eax
movsd (%r12,%rcx,8), %xmm1
movsd (%r15,%rcx,8), %xmm0
ucomisd %xmm0, %xmm1
jne 0xf7a27
jnp 0xf7a3b
ucomisd %xmm1, %xmm1
jnp 0xf7b0f
ucomisd %xmm0, %xmm0
jnp 0xf7b0f
incq %rcx
cmpq %rcx, %rbx
jne 0xf7a13
movb $0x1, %al
jmp 0xf7b0f
testb $0x40, 0x3(%r15)
je 0xf7b0d
cmpb $0x1, 0x24c(%r14)
jne 0xf7b0d
movq %r14, %rdi
movq %r15, %rsi
callq 0x8a63
movq 0x1100(%r14), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x89ff
cmpq 0x128(%r14), %rax
je 0xf7b0d
movq %rax, %rbx
movq 0x90(%r14), %rax
movq 0x110(%r14), %r13
cmpq 0x98(%r14), %rax
ja 0xf7ab6
movq %r14, %rdi
callq 0xa550
movq 0x90(%r14), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%r14)
movq -0x8(%rax), %rax
movl $0x200001, %ecx         # imm = 0x200001
movq %rcx, (%rax)
movq %r12, 0x8(%rax)
movq %r13, 0x10(%rax)
movq 0x90(%r14), %rdx
leaq -0x8(%rdx), %rsi
movq %rsi, 0x90(%r14)
movq -0x8(%rdx), %rdx
movq %rcx, (%rdx)
movq %r15, 0x8(%rdx)
movq %rax, 0x10(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xaee6
cmpq %rax, 0x120(%r14)
setne %al
jmp 0xf7b0f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ecx
xorb $0x16, %cl
movl %ebp, %edx
xorb $0x18, %dl
orb %cl, %dl
jne 0xf7b5c
movb $0x1, %al
testq %rbx, %rbx
jle 0xf7b0f
movq 0x10(%r15), %rcx
movq 0x10(%r12), %rdx
decq %rbx
xorl %esi, %esi
movzbl (%rcx,%rsi), %eax
cmpq %rax, (%rdx,%rsi,8)
sete %al
jne 0xf7b0f
leaq 0x1(%rsi), %rdi
cmpq %rsi, %rbx
movq %rdi, %rsi
jne 0xf7b41
jmp 0xf7b0f
xorb $0x18, %al
xorb $0x16, %bpl
orb %al, %bpl
jne 0xf7bd2
movb $0x1, %al
testq %rbx, %rbx
jle 0xf7b0f
movq 0x10(%r12), %rcx
movq 0x10(%r15), %rdx
decq %rbx
xorl %esi, %esi
movzbl (%rcx,%rsi), %eax
cmpq %rax, (%rdx,%rsi,8)
sete %al
jne 0xf7b0f
leaq 0x1(%rsi), %rdi
cmpq %rsi, %rbx
movq %rdi, %rsi
jne 0xf7b7c
jmp 0xf7b0f
movq %r12, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf8cc1
movq 0x10(%r12), %rdi
movq 0x10(%r15), %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf8c1e
movb $0x1, %al
testq %rbx, %rbx
jle 0xf7b0f
decq %rbx
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x20(%r12)
movq %rax, %rbp
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x20(%r15)
movzbl (%rbp), %r8d
movq %r14, %rdi
movq %rbp, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
leaq 0x5b2a8(%rip), %rax     # 0x152ec0
callq *(%rax,%r8,8)
testb %al, %al
je 0xf7b0f
leaq 0x1(%r13), %rcx
cmpq %r13, %rbx
movq %rcx, %r13
jne 0xf7be3
jmp 0xf7b0f
testb $0x1, 0x7(%r12)
jne 0xf7d92
testq %r13, %r13
je 0xf7cae
xorl %edx, %edx
testb $0x2, 0x2(%r15)
je 0xf7cc9
movslq 0xc(%r13), %rax
testq %rax, %rax
jle 0xf7cc9
movq (%r13), %rdx
xorl %ecx, %ecx
cmpq %r15, (%rdx,%rcx,8)
je 0xf7cc2
incq %rcx
cmpq %rcx, %rax
jne 0xf7c5e
xorl %edx, %edx
jmp 0xf7cc9
movb $0x1, %al
testq %rbx, %rbx
jle 0xf7b0f
decq %rbx
xorl %r13d, %r13d
movsd (%r12,%r13,8), %xmm0
movsd (%r15,%r13,8), %xmm1
movq %r14, %rdi
callq 0xf8d05
testb %al, %al
je 0xf7b0f
leaq 0x1(%r13), %rcx
cmpq %r13, %rbx
movq %rcx, %r13
jne 0xf7c81
jmp 0xf7b0f
movq 0x6c0(%r14), %r13
movq %r13, %rdi
callq 0x95f8c
jmp 0xf7d92
movq 0x20(%r13), %rax
movl (%rax,%rcx,4), %edx
movq (%r12), %rax
btl $0x11, %eax
jb 0xf7ce2
testl %edx, %edx
je 0xf7d03
movq %r13, %rdi
movq %r12, %rsi
jmp 0xf7d8d
movslq 0xc(%r13), %rax
testq %rax, %rax
jle 0xf7cff
movq (%r13), %rsi
xorl %ecx, %ecx
cmpq %r12, (%rsi,%rcx,8)
je 0xf7d6c
incq %rcx
cmpq %rcx, %rax
jne 0xf7cf1
xorl %eax, %eax
jmp 0xf7d73
movl 0xc(%r13), %ecx
cmpl 0x14(%r13), %ecx
jl 0xf7d19
movq %r13, %rdi
callq 0x967fa
movq (%r12), %rax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, (%r12)
orb $0x2, 0x2(%r15)
movq (%r13), %rax
movslq 0xc(%r13), %rcx
movq %r12, (%rax,%rcx,8)
movl 0x10(%r13), %eax
incl %eax
movl %eax, 0x10(%r13)
movq 0x20(%r13), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0xc(%r13)
movl %eax, (%rdx,%rcx,4)
movq (%r13), %rax
movslq 0xc(%r13), %rcx
movq %r15, (%rax,%rcx,8)
movl 0x10(%r13), %eax
movq 0x20(%r13), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0xc(%r13)
movl %eax, (%rdx,%rcx,4)
jmp 0xf7d92
movq 0x20(%r13), %rax
movl (%rax,%rcx,4), %eax
testl %edx, %edx
je 0xf7d81
cmpl %edx, %eax
sete %al
jmp 0xf7b0f
testl %eax, %eax
je 0xf7d92
movq %r13, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0xf80b5
movb $0x1, %al
testq %rbx, %rbx
jle 0xf7b0f
decq %rbx
xorl %ebp, %ebp
movq 0x10(%r12), %rax
movq (%rax,%rbp,8), %rsi
movq 0x10(%r15), %rax
movq (%rax,%rbp,8), %rdx
movzbl (%rsi), %eax
movq %r14, %rdi
movq %r13, %rcx
leaq 0x5b0fd(%rip), %r8      # 0x152ec0
callq *(%r8,%rax,8)
testb %al, %al
je 0xf7b0f
leaq 0x1(%rbp), %rcx
cmpq %rbp, %rbx
movq %rcx, %rbp
jne 0xf7da2
jmp 0xf7b0f