// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movb $0x1, %bpl
cmpq %rdx, %rsi
je 0xc453c
movq %rdx, %rbx
movzbl (%rdx), %r15d
leaq 0x5577a(%rip), %rax     # 0x119c20
cmpb $0x1, (%r15,%rax)
jne 0xc453a
movq %rsi, %r14
movq 0x8(%rsi), %rax
cmpq 0x8(%rbx), %rax
jne 0xc453a
movq %rcx, %r13
movq %rdi, %r12
movq %rax, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc6181
testb %al, %al
je 0xc453a
movq (%rsp), %r8
testq %r8, %r8
je 0xc453c
movb (%r14), %al
cmpb %r15b, %al
jne 0xc454d
cmpl $0x16, %r15d
je 0xc45a1
cmpl $0x18, %r15d
je 0xc4588
cmpl $0x17, %r15d
jne 0xc4620
xorl %eax, %eax
testq %r8, %r8
cmovleq %rax, %r8
cmpq %rax, %r8
sete %bpl
je 0xc453c
movq 0x10(%r14), %rcx
movsd (%rcx,%rax,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0xc453c
movq 0x10(%rbx), %rcx
ucomisd (%rcx,%rax,8), %xmm0
leaq 0x1(%rax), %rax
jne 0xc453c
jnp 0xc450f
jmp 0xc453c
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ecx
xorb $0x16, %cl
movl %r15d, %edx
xorb $0x18, %dl
orb %cl, %dl
jne 0xc4564
movq %rbx, %rdi
movq %r14, %rsi
jmp 0xc4575
xorb $0x18, %al
xorb $0x16, %r15b
orb %al, %r15b
jne 0xc45bf
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc61f0
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc62b5
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
movq %r8, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc6229
xorl %r13d, %r13d
testq %r8, %r8
cmovleq %r13, %r8
movq %r8, (%rsp)
cmpq %r13, %r8
sete %bpl
je 0xc453c
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq *0x20(%r14)
movq %rax, %r15
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq *0x20(%rbx)
movzbl (%r15), %r8d
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
leaq 0x5d714(%rip), %rax     # 0x121d20
callq *(%rax,%r8,8)
movq (%rsp), %r8
incq %r13
testb %al, %al
jne 0xc45cd
jmp 0xc453c
testb $0x1, 0x7(%r14)
jne 0xc4708
testq %r13, %r13
je 0xc465f
xorl %ebp, %ebp
testb $0x2, 0x2(%rbx)
je 0xc4645
movq %r13, %rdi
movq %rbx, %rsi
callq 0x785fb
movl %eax, %ebp
movq (%r14), %rax
btl $0x11, %eax
jb 0xc4673
testl %ebp, %ebp
je 0xc468d
movq %r13, %rdi
movq %r14, %rsi
movl %ebp, %edx
jmp 0xc46ff
movq %r12, %rdi
callq 0x77cff
movq (%rsp), %r8
movq %rax, %r13
jmp 0xc4708
movq %r13, %rdi
movq %r14, %rsi
callq 0x785fb
testl %ebp, %ebp
je 0xc46f3
cmpl %ebp, %eax
sete %bpl
jmp 0xc453c
movl 0xc(%r13), %ecx
cmpl 0x14(%r13), %ecx
jl 0xc46a2
movq %r13, %rdi
callq 0x78405
movq (%r14), %rax
orq $0x20000, %rax          # imm = 0x20000
movq %rax, (%r14)
orb $0x2, 0x2(%rbx)
movq (%r13), %rax
movslq 0xc(%r13), %rcx
movq %r14, (%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 %rbx, (%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 0xc4704
testl %eax, %eax
je 0xc4704
movq %r13, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0xc57c1
movq (%rsp), %r8
xorl %r15d, %r15d
testq %r8, %r8
cmovleq %r15, %r8
movq %r13, (%rsp)
cmpq %r15, %r8
sete %bpl
je 0xc453c
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rsi
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdx
movzbl (%rsi), %eax
movq %r12, %rdi
movq %r13, %rcx
movq %r12, %r13
movq %r8, %r12
leaq 0x5d5d7(%rip), %r8      # 0x121d20
callq *(%r8,%rax,8)
movq %r12, %r8
movq %r13, %r12
movq (%rsp), %r13
incq %r15
testb %al, %al
jne 0xc4716
jmp 0xc453c