// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: vector_equal
static bool vector_equal(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)) return(false);

                    len = vector_length(x);
                    if (len != vector_length(y)) return(false);
                    if (!vector_rank_match(sc, x, y)) return(false);  /* ?? should #2d() equal #3d()? */
                    if (len == 0) return(true);

                    if (type(x) != type(y))
                    {
                        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_equal_1(sc, vector_getter(x)(sc, x, i), vector_getter(y)(sc, y, i), NULL)) /* this could be greatly optimized */
                                return(false);
                        return(true);
                    }

                    /* types are the same, take care of the special cases first */
                    if (is_float_vector(x))
                    {
                        for (i = 0; i < len; i++)
                        {
                            s7_double z;
                            z = float_vector(x, i);
                            if ((is_NaN(z)) ||
                                    (z != float_vector(y, 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_equal_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
subq $0x18, %rsp
movb $0x1, %bpl
cmpq %rdx, %rsi
je 0xf6ad8
movq %rdx, %r14
movzbl (%rdx), %ebx
leaq 0x541d9(%rip), %rax     # 0x14ac20
cmpb $0x1, (%rbx,%rax)
jne 0xf6ad6
movq %rsi, %r15
movq 0x8(%rsi), %rax
cmpq 0x8(%r14), %rax
jne 0xf6ad6
movq %rcx, %r13
movq %rdi, %r12
movq %rax, 0x8(%rsp)
movq 0x18(%r15), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0xf8bb6
testb %al, %al
je 0xf6ad6
movq 0x8(%rsp), %r8
testq %r8, %r8
je 0xf6ad8
movb (%r15), %al
cmpb %bl, %al
jne 0xf6ae9
cmpl $0x16, %ebx
je 0xf6b78
cmpl $0x18, %ebx
je 0xf6b5f
cmpl $0x17, %ebx
jne 0xf6bfe
testq %r8, %r8
jle 0xf6ad8
movq 0x10(%r15), %rax
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0xf6ad6
movq 0x10(%r14), %rdx
ucomisd (%rdx,%rcx,8), %xmm0
jne 0xf6ad6
jp 0xf6ad6
incq %rcx
cmpq %rcx, %r8
jne 0xf6ab4
jmp 0xf6ad8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ecx
xorb $0x16, %cl
movl %ebx, %edx
xorb $0x18, %dl
orb %cl, %dl
jne 0xf6b25
testq %r8, %r8
jle 0xf6ad8
movq 0x10(%r14), %rax
movq 0x10(%r15), %rcx
decq %r8
xorl %edx, %edx
movzbl (%rax,%rdx), %esi
cmpq %rsi, (%rcx,%rdx,8)
sete %bpl
jne 0xf6ad8
leaq 0x1(%rdx), %rsi
cmpq %rdx, %r8
movq %rsi, %rdx
jne 0xf6b09
jmp 0xf6ad8
xorb $0x18, %al
xorb $0x16, %bl
orb %al, %bl
jne 0xf6b96
testq %r8, %r8
jle 0xf6ad8
movq 0x10(%r15), %rax
movq 0x10(%r14), %rcx
decq %r8
xorl %edx, %edx
movzbl (%rax,%rdx), %esi
cmpq %rsi, (%rcx,%rdx,8)
sete %bpl
jne 0xf6ad8
leaq 0x1(%rdx), %rsi
cmpq %rdx, %r8
movq %rsi, %rdx
jne 0xf6b40
jmp 0xf6ad8
movq %r15, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf8cc1
movq 0x10(%r15), %rdi
movq 0x10(%r14), %rsi
movq %r8, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf8c1e
testq %r8, %r8
jle 0xf6ad8
decq %r8
xorl %r13d, %r13d
movq %r8, %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x20(%r15)
movq %rax, %rbp
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq *0x20(%r14)
movzbl (%rbp), %r8d
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
leaq 0x5c144(%rip), %rax     # 0x152d20
callq *(%rax,%r8,8)
movl %eax, %ebp
testb %al, %al
je 0xf6ad8
leaq 0x1(%r13), %rax
movq %rbx, %r8
cmpq %r13, %rbx
movq %rax, %r13
jne 0xf6ba5
jmp 0xf6ad8
testb $0x1, 0x7(%r15)
jne 0xf6c34
testq %r13, %r13
je 0xf6c3e
xorl %edx, %edx
testb $0x2, 0x2(%r14)
je 0xf6c5c
movslq 0xc(%r13), %rax
testq %rax, %rax
jle 0xf6c5c
movq (%r13), %rdx
xorl %ecx, %ecx
cmpq %r14, (%rdx,%rcx,8)
je 0xf6c55
incq %rcx
cmpq %rcx, %rax
jne 0xf6c22
xorl %edx, %edx
jmp 0xf6c5c
movq %r13, 0x10(%rsp)
jmp 0xf6d32
movq 0x6c0(%r12), %rdi
movq %rdi, 0x10(%rsp)
callq 0x95f8c
jmp 0xf6d2d
movq 0x20(%r13), %rax
movl (%rax,%rcx,4), %edx
movq (%r15), %rax
btl $0x11, %eax
jb 0xf6c79
testl %edx, %edx
movq %r13, 0x10(%rsp)
je 0xf6c9a
movq %r13, %rdi
movq %r15, %rsi
jmp 0xf6d28
movslq 0xc(%r13), %rax
testq %rax, %rax
jle 0xf6c96
movq (%r13), %rsi
xorl %ecx, %ecx
cmpq %r15, (%rsi,%rcx,8)
je 0xf6d01
incq %rcx
cmpq %rcx, %rax
jne 0xf6c88
xorl %eax, %eax
jmp 0xf6d08
movl 0xc(%r13), %ecx
cmpl 0x14(%r13), %ecx
jl 0xf6caf
movq %r13, %rdi
callq 0x967fa
movq (%r15), %rax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, (%r15)
orb $0x2, 0x2(%r14)
movq (%r13), %rax
movslq 0xc(%r13), %rcx
movq %r15, (%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 %r14, (%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 0xf6d2d
movq 0x20(%r13), %rax
movl (%rax,%rcx,4), %eax
testl %edx, %edx
je 0xf6d17
cmpl %edx, %eax
sete %bpl
jmp 0xf6ad8
testl %eax, %eax
movq %r13, 0x10(%rsp)
je 0xf6d32
movq %r13, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0xf80b5
movq 0x8(%rsp), %r8
testq %r8, %r8
jle 0xf6ad8
decq %r8
xorl %ebx, %ebx
movq %r8, %r13
movq 0x10(%r15), %rax
movq (%rax,%rbx,8), %rsi
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rdx
movzbl (%rsi), %eax
movq %r12, %rdi
movq 0x10(%rsp), %rcx
leaq 0x5bfbb(%rip), %r8      # 0x152d20
callq *(%r8,%rax,8)
movl %eax, %ebp
testb %al, %al
je 0xf6ad8
leaq 0x1(%rbx), %rax
movq %r13, %r8
cmpq %rbx, %r13
movq %rax, %rbx
jne 0xf6d40
jmp 0xf6ad8