// File: dsharlet[P]array/test/array.cpp
// Function: nda::test_array_assign_body()
TEST(array_assign) {
  array_of_rank<int, 3> a({4, 5, 6});
  fill_pattern(a);

  array_of_rank<int, 3> b = array_of_rank<int, 3>({4, 5, 6});
  fill_pattern(b);
  ASSERT(a == b);

  array_of_rank<int, 3> c;
  c = array_of_rank<int, 3>({4, 5, 6});
  fill_pattern(c);
  ASSERT(a == c);

  c = array_of_rank<int, 3>({4, 5, 6});
  ASSERT(a != c);
  fill_pattern(c);
  ASSERT(a == c);

  c = array_of_rank<int, 3>({7, 5, 6});
  ASSERT(a != c);

  {
    array_of_rank<int, 3> d({4, 5, 6});
    fill_pattern(d);
    c = d;
  }
  ASSERT(a == c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf60, %rsp            # imm = 0xF60
leaq -0xb0(%rbp), %rdi
movq %rdi, -0xef8(%rbp)
movl $0x4, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x34ec0
movq -0xef8(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0xef0(%rbp)
callq 0x34f10
movq -0xef0(%rbp), %rdi
xorl %esi, %esi
callq 0x34fb0
jmp 0x22b34
leaq -0x170(%rbp), %rdi
movl $0x4, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x34ec0
jmp 0x22b51
leaq -0x128(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x34f10
jmp 0x22b66
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
callq 0x34fb0
jmp 0x22b76
leaq -0x68(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x34fe0
movb %al, -0xef9(%rbp)
jmp 0x22b8e
leaq -0x321(%rbp), %rdi
movq %rdi, -0xf08(%rbp)
callq 0x33b0
movq -0xf08(%rbp), %rdx
leaq 0x1b94e8(%rip), %rsi    # 0x1dc097
leaq -0x320(%rbp), %rdi
callq 0x10a90
jmp 0x22bbd
movb -0xef9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x300(%rbp), %rdi
leaq -0x320(%rbp), %rdx
callq 0x10f80
jmp 0x22bde
leaq -0x300(%rbp), %rdi
callq 0x10ff0
jmp 0x22bec
leaq -0x320(%rbp), %rdi
callq 0x3100
leaq -0x321(%rbp), %rdi
callq 0x3290
leaq -0x390(%rbp), %rdi
callq 0x35030
jmp 0x22c12
leaq -0x440(%rbp), %rdi
movl $0x4, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x34ec0
jmp 0x22c2f
leaq -0x3f8(%rbp), %rdi
leaq -0x440(%rbp), %rsi
callq 0x34f10
jmp 0x22c44
leaq -0x390(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x35060
jmp 0x22c59
leaq -0x3f8(%rbp), %rdi
callq 0x35160
leaq -0x390(%rbp), %rdi
xorl %esi, %esi
callq 0x34fb0
jmp 0x22c75
leaq -0x68(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x34fe0
movb %al, -0xf09(%rbp)
jmp 0x22c8d
leaq -0x5f1(%rbp), %rdi
movq %rdi, -0xf18(%rbp)
callq 0x33b0
movq -0xf18(%rbp), %rdx
leaq 0x1bb6f9(%rip), %rsi    # 0x1de3a7
leaq -0x5f0(%rbp), %rdi
callq 0x10a90
jmp 0x22cbc
movb -0xf09(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x5d0(%rbp), %rdi
leaq -0x5f0(%rbp), %rdx
callq 0x10f80
jmp 0x22cdd
leaq -0x5d0(%rbp), %rdi
callq 0x10ff0
jmp 0x22ceb
leaq -0x5f0(%rbp), %rdi
callq 0x3100
leaq -0x5f1(%rbp), %rdi
callq 0x3290
leaq -0x6a8(%rbp), %rdi
movl $0x4, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x34ec0
jmp 0x22d20
leaq -0x660(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
callq 0x34f10
jmp 0x22d35
leaq -0x390(%rbp), %rdi
leaq -0x660(%rbp), %rsi
callq 0x35060
jmp 0x22d4a
leaq -0x660(%rbp), %rdi
callq 0x35160
leaq -0x68(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x351a0
movb %al, -0xf19(%rbp)
jmp 0x22d6e
leaq -0x859(%rbp), %rdi
movq %rdi, -0xf28(%rbp)
callq 0x33b0
movq -0xf28(%rbp), %rdx
leaq 0x1bb61f(%rip), %rsi    # 0x1de3ae
leaq -0x858(%rbp), %rdi
callq 0x10a90
jmp 0x22d9d
movb -0xf19(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x838(%rbp), %rdi
leaq -0x858(%rbp), %rdx
callq 0x10f80
jmp 0x22dbe
leaq -0x838(%rbp), %rdi
callq 0x10ff0
jmp 0x22dcc
leaq -0x858(%rbp), %rdi
callq 0x3100
leaq -0x859(%rbp), %rdi
callq 0x3290
leaq -0x390(%rbp), %rdi
xorl %esi, %esi
callq 0x34fb0
jmp 0x22df4
leaq -0x68(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x34fe0
movb %al, -0xf29(%rbp)
jmp 0x22e0c
leaq -0xa11(%rbp), %rdi
movq %rdi, -0xf38(%rbp)
callq 0x33b0
movq -0xf38(%rbp), %rdx
leaq 0x1bb57a(%rip), %rsi    # 0x1de3a7
leaq -0xa10(%rbp), %rdi
callq 0x10a90
jmp 0x22e3b
movb -0xf29(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x9f0(%rbp), %rdi
leaq -0xa10(%rbp), %rdx
callq 0x10f80
jmp 0x22e5c
leaq -0x9f0(%rbp), %rdi
callq 0x10ff0
jmp 0x22e6a
leaq -0xa10(%rbp), %rdi
callq 0x3100
leaq -0xa11(%rbp), %rdi
callq 0x3290
leaq -0xac8(%rbp), %rdi
movl $0x7, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x34ec0
jmp 0x22e9f
leaq -0xa80(%rbp), %rdi
leaq -0xac8(%rbp), %rsi
callq 0x34f10
jmp 0x22eb4
leaq -0x390(%rbp), %rdi
leaq -0xa80(%rbp), %rsi
callq 0x35060
jmp 0x22ec9
leaq -0xa80(%rbp), %rdi
callq 0x35160
leaq -0x68(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x351a0
movb %al, -0xf39(%rbp)
jmp 0x22eed
leaq -0xc79(%rbp), %rdi
movq %rdi, -0xf48(%rbp)
callq 0x33b0
movq -0xf48(%rbp), %rdx
leaq 0x1bb4a0(%rip), %rsi    # 0x1de3ae
leaq -0xc78(%rbp), %rdi
callq 0x10a90
jmp 0x22f1c
movb -0xf39(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0xc58(%rbp), %rdi
leaq -0xc78(%rbp), %rdx
callq 0x10f80
jmp 0x22f3d
leaq -0xc58(%rbp), %rdi
callq 0x10ff0
jmp 0x22f4b
leaq -0xc78(%rbp), %rdi
callq 0x3100
leaq -0xc79(%rbp), %rdi
callq 0x3290
leaq -0xd30(%rbp), %rdi
movl $0x4, %esi
movl $0x5, %edx
movl $0x6, %ecx
callq 0x34ec0
jmp 0x22f80
leaq -0xce8(%rbp), %rdi
leaq -0xd30(%rbp), %rsi
callq 0x34f10
jmp 0x22f95
leaq -0xce8(%rbp), %rdi
xorl %esi, %esi
callq 0x34fb0
jmp 0x22fa5
leaq -0x390(%rbp), %rdi
leaq -0xce8(%rbp), %rsi
callq 0x351f0
jmp 0x22fba
leaq -0xce8(%rbp), %rdi
callq 0x35160
leaq -0x68(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x34fe0
movb %al, -0xf49(%rbp)
jmp 0x22fde
leaq -0xee1(%rbp), %rdi
movq %rdi, -0xf58(%rbp)
callq 0x33b0
movq -0xf58(%rbp), %rdx
leaq 0x1bb3a8(%rip), %rsi    # 0x1de3a7
leaq -0xee0(%rbp), %rdi
callq 0x10a90
jmp 0x2300d
movb -0xf49(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0xec0(%rbp), %rdi
leaq -0xee0(%rbp), %rdx
callq 0x10f80
jmp 0x2302e
leaq -0xec0(%rbp), %rdi
callq 0x10ff0
jmp 0x2303c
leaq -0xee0(%rbp), %rdi
callq 0x3100
leaq -0xee1(%rbp), %rdi
callq 0x3290
leaq -0x390(%rbp), %rdi
callq 0x35160
leaq -0x128(%rbp), %rdi
callq 0x35160
leaq -0x68(%rbp), %rdi
callq 0x35160
addq $0xf60, %rsp            # imm = 0xF60
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x232ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x232e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x230de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x3100
leaq -0x321(%rbp), %rdi
callq 0x3290
jmp 0x232e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x35160
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x2315b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x5f0(%rbp), %rdi
callq 0x3100
leaq -0x5f1(%rbp), %rdi
callq 0x3290
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x660(%rbp), %rdi
callq 0x35160
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x231c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x858(%rbp), %rdi
callq 0x3100
leaq -0x859(%rbp), %rdi
callq 0x3290
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x23204
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xa10(%rbp), %rdi
callq 0x3100
leaq -0xa11(%rbp), %rdi
callq 0x3290
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xa80(%rbp), %rdi
callq 0x35160
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x2326a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xc78(%rbp), %rdi
callq 0x3100
leaq -0xc79(%rbp), %rdi
callq 0x3290
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xce8(%rbp), %rdi
callq 0x35160
jmp 0x232d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x232ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xee0(%rbp), %rdi
callq 0x3100
leaq -0xee1(%rbp), %rdi
callq 0x3290
leaq -0x390(%rbp), %rdi
callq 0x35160
leaq -0x128(%rbp), %rdi
callq 0x35160
leaq -0x68(%rbp), %rdi
callq 0x35160
movq -0xb8(%rbp), %rdi
callq 0x33a0
nopw %cs:(%rax,%rax)