// File: /workspace/github_c_makefile_star2_O1/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 0xff883
movq %rdx, %r14
movzbl (%rdx), %r13d
leaq 0x53431(%rip), %rax     # 0x152c20
cmpb $0x1, (%r13,%rax)
jne 0xff881
movq %rsi, %r15
movq 0x8(%rsi), %rax
movq 0x8(%r14), %rbx
cmpq %rbx, %rax
jne 0xff881
movq %rdi, %r12
movq %rcx, (%rsp)
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x101b15
testb %al, %al
je 0xff881
movq 0x8(%rsp), %r8
testq %r8, %r8
je 0xff883
movzbl (%r15), %eax
cmpb %r13b, %al
jne 0xff898
cmpl $0x16, %eax
je 0xff92a
cmpl $0x18, %eax
je 0xff911
cmpl $0x17, %eax
jne 0xff9b0
testq %r8, %r8
jle 0xff883
movq 0x10(%r15), %rax
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm0, %xmm0
jp 0xff881
movq 0x10(%r14), %rdx
ucomisd (%rdx,%rcx,8), %xmm0
jne 0xff881
jp 0xff881
incq %rcx
cmpq %rcx, %r8
jne 0xff85f
jmp 0xff883
xorl %ebp, %ebp
andb $0x1, %bpl
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 %r13d, %edx
xorb $0x18, %dl
orb %cl, %dl
jne 0xff8d5
testq %rbx, %rbx
jle 0xff883
movq 0x10(%r14), %rax
movq 0x10(%r15), %rcx
decq %rbx
xorl %edx, %edx
movzbl (%rax,%rdx), %esi
cmpq %rsi, (%rcx,%rdx,8)
sete %bpl
jne 0xff883
leaq 0x1(%rdx), %rsi
cmpq %rdx, %rbx
movq %rsi, %rdx
jne 0xff8b9
jmp 0xff883
xorb $0x18, %al
xorb $0x16, %r13b
orb %al, %r13b
jne 0xff948
testq %r8, %r8
jle 0xff883
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 0xff883
leaq 0x1(%rdx), %rsi
cmpq %rdx, %r8
movq %rsi, %rdx
jne 0xff8f2
jmp 0xff883
movq %r15, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x101c28
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 0x101b85
testq %r8, %r8
jle 0xff883
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 0x5b392(%rip), %rax     # 0x15ad20
callq *(%rax,%r8,8)
movl %eax, %ebp
testb %al, %al
je 0xff883
leaq 0x1(%r13), %rax
movq %rbx, %r8
cmpq %r13, %rbx
movq %rax, %r13
jne 0xff957
jmp 0xff883
testb $0x1, 0x7(%r15)
jne 0xff9e9
movq (%rsp), %rcx
testq %rcx, %rcx
je 0xff9f2
xorl %edx, %edx
testb $0x2, 0x2(%r14)
je 0xffa0e
movslq 0xc(%rcx), %rax
testq %rax, %rax
jle 0xffa0e
movq (%rcx), %rdx
xorl %esi, %esi
cmpq %r14, (%rdx,%rsi,8)
je 0xffa07
incq %rsi
cmpq %rsi, %rax
jne 0xff9d7
xorl %edx, %edx
jmp 0xffa0e
movq (%rsp), %rcx
jmp 0xffae4
movq %r12, %rdi
callq 0x9c66c
movq 0x8(%rsp), %r8
movq %rax, %rcx
jmp 0xffae4
movq 0x20(%rcx), %rax
movl (%rax,%rsi,4), %edx
testb $0x2, 0x2(%r15)
jne 0xffa2a
testl %edx, %edx
je 0xffa4a
movq %rcx, %rdi
movq %r15, %rsi
callq 0x100fa2
movq (%rsp), %rcx
jmp 0xffaa3
movslq 0xc(%rcx), %rax
testq %rax, %rax
jle 0xffa46
movq (%rcx), %rsi
xorl %edi, %edi
cmpq %r15, (%rsi,%rdi,8)
je 0xffaac
incq %rdi
cmpq %rdi, %rax
jne 0xffa38
xorl %eax, %eax
jmp 0xffab3
movl 0xc(%rcx), %eax
cmpl 0x14(%rcx), %eax
jl 0xffa5e
movq %rcx, %rdi
callq 0x9cf49
movq (%rsp), %rcx
orb $0x2, 0x2(%r15)
orb $0x2, 0x2(%r14)
movq (%rcx), %rax
movslq 0xc(%rcx), %rdi
movq %r15, (%rax,%rdi,8)
movl 0x10(%rcx), %eax
incl %eax
movl %eax, 0x10(%rcx)
movq 0x20(%rcx), %rdx
leal 0x1(%rdi), %esi
movl %esi, 0xc(%rcx)
movl %eax, (%rdx,%rdi,4)
movq (%rcx), %rax
movslq 0xc(%rcx), %rdi
movq %r14, (%rax,%rdi,8)
movl 0x10(%rcx), %eax
movq 0x20(%rcx), %rdx
leal 0x1(%rdi), %esi
movl %esi, 0xc(%rcx)
movl %eax, (%rdx,%rdi,4)
movb $0x1, %bl
movq 0x8(%rsp), %r8
jmp 0xffadc
movq 0x20(%rcx), %rax
movl (%rax,%rdi,4), %eax
testl %edx, %edx
sete %bl
je 0xffac2
cmpl %edx, %eax
sete %bpl
jmp 0xffadc
testl %eax, %eax
je 0xffadc
movq %rcx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x100fa2
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
testb %bl, %bl
je 0xff883
movb $0x1, %bpl
testq %r8, %r8
jle 0xff883
decq %r8
xorl %ebx, %ebx
movq %r15, 0x10(%rsp)
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, %r15
movq %r12, %rdi
movq %rcx, %r12
leaq 0x5b200(%rip), %r8      # 0x15ad20
callq *(%r8,%rax,8)
movl %eax, %ebp
testb %al, %al
je 0xff883
leaq 0x1(%rbx), %rax
movq %r13, %r8
cmpq %rbx, %r13
movq %rax, %rbx
movq %r12, %rcx
movq %r15, %r12
movq 0x10(%rsp), %r15
jne 0xffafa
jmp 0xff883