// File: dsharlet[P]array/test/algorithm.cpp
// Function: nda::test_algorithm_equal_body()
TEST(algorithm_equal) {
  dense_array<int, 3> a1({10, 20, {0, 30, 205}});
  generate(a1, rand);
  dense_array<int, 3> a2 = make_compact_copy(a1);
  dense_array<int, 3> b(a2);
  fill(b, 0);

  ASSERT(a1 != a2);
  ASSERT(equal(a1, a2));
  ASSERT(!equal(a1, b));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x780, %rsp            # imm = 0x780
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x738(%rbp)
movl $0xa, %esi
callq 0x10bf0
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x730(%rbp)
movl $0x14, %esi
callq 0x10c20
xorl %eax, %eax
movl %eax, %esi
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x728(%rbp)
movl $0x1e, %edx
movl $0xcd, %ecx
callq 0x10c60
movq -0x738(%rbp), %rsi
movq -0x730(%rbp), %rdx
movq -0x728(%rbp), %rcx
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x720(%rbp)
callq 0x10cb0
movq -0x720(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x718(%rbp)
callq 0x10d10
movq -0x718(%rbp), %rdi
movq 0x287837(%rip), %rsi    # 0x291fa0
callq 0x10db0
jmp 0xa770
leaq -0x171(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x10e30
movq -0x740(%rbp), %rdx
leaq -0x170(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x10de0
jmp 0xa79c
leaq -0x171(%rbp), %rdi
callq 0x10e50
leaq -0x1e0(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x10e70
jmp 0xa7bd
movl $0x0, -0x1e4(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x1e4(%rbp), %rsi
callq 0x10f00
jmp 0xa7dc
leaq -0x68(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x10f30
movb %al, -0x741(%rbp)
jmp 0xa7f4
leaq -0x399(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x33b0
movq -0x750(%rbp), %rdx
leaq 0x1d180f(%rip), %rsi    # 0x1dc024
leaq -0x398(%rbp), %rdi
callq 0x10a90
jmp 0xa823
movb -0x741(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x378(%rbp), %rdi
leaq -0x398(%rbp), %rdx
callq 0x10f80
jmp 0xa844
leaq -0x378(%rbp), %rdi
callq 0x10ff0
jmp 0xa852
leaq -0x398(%rbp), %rdi
callq 0x3100
leaq -0x399(%rbp), %rdi
callq 0x3290
leaq -0x68(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x110c0
movb %al, -0x751(%rbp)
jmp 0xa882
leaq -0x551(%rbp), %rdi
movq %rdi, -0x760(%rbp)
callq 0x33b0
movq -0x760(%rbp), %rdx
leaq 0x1d178a(%rip), %rsi    # 0x1dc02d
leaq -0x550(%rbp), %rdi
callq 0x10a90
jmp 0xa8b1
movb -0x751(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x530(%rbp), %rdi
leaq -0x550(%rbp), %rdx
callq 0x10f80
jmp 0xa8d2
leaq -0x530(%rbp), %rdi
callq 0x10ff0
jmp 0xa8e0
leaq -0x550(%rbp), %rdi
callq 0x3100
leaq -0x551(%rbp), %rdi
callq 0x3290
leaq -0x68(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x110c0
movb %al, -0x761(%rbp)
jmp 0xa910
movb -0x761(%rbp), %al
xorb $0x1, %al
movb %al, -0x771(%rbp)
leaq -0x709(%rbp), %rdi
movq %rdi, -0x770(%rbp)
callq 0x33b0
movq -0x770(%rbp), %rdx
leaq 0x1d16fc(%rip), %rsi    # 0x1dc03b
leaq -0x708(%rbp), %rdi
callq 0x10a90
jmp 0xa94d
movb -0x771(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x6e8(%rbp), %rdi
leaq -0x708(%rbp), %rdx
callq 0x10f80
jmp 0xa96e
leaq -0x6e8(%rbp), %rdi
callq 0x10ff0
jmp 0xa97c
leaq -0x708(%rbp), %rdi
callq 0x3100
leaq -0x709(%rbp), %rdi
callq 0x3290
leaq -0x1e0(%rbp), %rdi
callq 0x11110
leaq -0x170(%rbp), %rdi
callq 0x11110
leaq -0x68(%rbp), %rdi
callq 0x11110
addq $0x780, %rsp            # imm = 0x780
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0xaafc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x171(%rbp), %rdi
callq 0x10e50
jmp 0xaafc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0xaaf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0xaae4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0xaa58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x3100
leaq -0x399(%rbp), %rdi
callq 0x3290
jmp 0xaae4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0xaa98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x550(%rbp), %rdi
callq 0x3100
leaq -0x551(%rbp), %rdi
callq 0x3290
jmp 0xaae4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
jmp 0xaad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100(%rbp)
movl %eax, -0x104(%rbp)
leaq -0x708(%rbp), %rdi
callq 0x3100
leaq -0x709(%rbp), %rdi
callq 0x3290
leaq -0x1e0(%rbp), %rdi
callq 0x11110
leaq -0x170(%rbp), %rdi
callq 0x11110
leaq -0x68(%rbp), %rdi
callq 0x11110
movq -0x100(%rbp), %rdi
callq 0x33a0
nopw %cs:(%rax,%rax)