// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array.cpp
// Function: nda::test_array_equality_body()
TEST(array_equality) {
  array_of_rank<int, 3> a({4, 5, 6});
  fill_pattern(a);
  array_of_rank<int, 3> b({4, 5, 6});
  fill_pattern(b);
  array_of_rank<int, 3> c({dim<>(0, 4, 2), 5, 6});
  fill_pattern(c);

  ASSERT(a == b);

  // Arrays with different strides are not equal by operator!=,
  // but equal ignores strides.
  ASSERT(a != c);
  ASSERT(equal(a, c));

  a(1, 2, 3) = 5;
  ASSERT(a != b);
  ASSERT(a != c);
  ASSERT(!equal(a, c));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xae8, %rsp            # imm = 0xAE8
leaq 0x120(%rsp), %rbx
pushq $0x4
popq %rsi
pushq $0x5
popq %rdx
pushq $0x6
popq %rcx
movq %rbx, %rdi
callq 0x10b74
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10b92
movq %r14, %rdi
xorl %esi, %esi
callq 0x10bbd
leaq 0x50(%rsp), %rdi
pushq $0x4
popq %rsi
pushq $0x5
popq %rdx
pushq $0x6
popq %rcx
callq 0x10b74
leaq 0x120(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x10b92
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
callq 0x10bbd
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq $0x6, 0x8(%rsi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rsi)
andq $0x0, 0x18(%rsi)
movq $0x5, 0x20(%rsi)
movq %rax, 0x28(%rsi)
andq $0x0, 0x30(%rsi)
movq $0x4, 0x38(%rsi)
movq $0x2, 0x40(%rsi)
leaq 0x50(%rsp), %rdi
callq 0x10b92
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x10bbd
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x10bec
movl %eax, %ebx
leaq 0x7f99e(%rip), %rsi     # 0x8d087
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x958(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x958(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0xb8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x10d12
movl %eax, %ebx
leaq 0x81a2b(%rip), %rsi     # 0x8f16a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x7c8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x7c8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0xb8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x11271
movl %eax, %ebx
leaq 0x81b37(%rip), %rsi     # 0x8f2cc
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x638(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x638(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0xb8(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x3
popq %rcx
callq 0x112c6
movl $0x5, (%rax)
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x10d12
movl %eax, %ebx
leaq 0x81aba(%rip), %rsi     # 0x8f2c4
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x4a8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x4a8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0xb8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x10d12
movl %eax, %ebx
leaq 0x8190a(%rip), %rsi     # 0x8f16a
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x318(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x318(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0xb8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x11271
movl %eax, %ebx
leaq 0x81a15(%rip), %rsi     # 0x8f2cb
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x188(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x188(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x50(%rsp), %rdi
callq 0x10d02
leaq 0x120(%rsp), %rdi
callq 0x10d02
leaq 0xb8(%rsp), %rdi
callq 0x10d02
addq $0xae8, %rsp            # imm = 0xAE8
popq %rbx
popq %r14
retq
jmp 0xd956
jmp 0xd956
jmp 0xd956
jmp 0xd956
jmp 0xd956
jmp 0xd956
jmp 0xd931
movq %rax, %rbx
jmp 0xd963
jmp 0xd951
jmp 0xd942
jmp 0xd942
jmp 0xd942
jmp 0xd942
jmp 0xd942
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2090
jmp 0xd959
movq %rax, %rbx
jmp 0xd970
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x10d02
leaq 0x120(%rsp), %rdi
callq 0x10d02
leaq 0xb8(%rsp), %rdi
callq 0x10d02
movq %rbx, %rdi
callq 0x22f0