// File: dsharlet[P]array/test/array.cpp
// Function: nda::test_array_assign_scalar_body()
TEST(array_assign_scalar) {
  dense_array<int, 0> a({}, 3);

  dense_array<int, 0> b = array_of_rank<int, 0>({}, 3);
  ASSERT(a == b);

  array_of_rank<int, 0> c;
  c = array_of_rank<int, 0>({}, 3);
  ASSERT(a == c);

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

  {
    array_of_rank<int, 0> d({}, 3);
    c = d;
  }
  ASSERT(a == c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa20, %rsp            # imm = 0xA20
leaq -0x29(%rbp), %rdi
movq %rdi, -0x9c8(%rbp)
callq 0x1d390
movq -0x9c8(%rbp), %rsi
movl $0x3, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x35710
leaq -0x59(%rbp), %rdi
callq 0x1d390
jmp 0x246f1
movl $0x3, -0x70(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x59(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x35710
jmp 0x2470b
leaq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x115d0
movb %al, -0x9c9(%rbp)
jmp 0x24720
leaq -0x221(%rbp), %rdi
movq %rdi, -0x9d8(%rbp)
callq 0x33b0
movq -0x9d8(%rbp), %rdx
leaq 0x1b7956(%rip), %rsi    # 0x1dc097
leaq -0x220(%rbp), %rdi
callq 0x10a90
jmp 0x2474f
movb -0x9c9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rdx
callq 0x10f80
jmp 0x24770
leaq -0x200(%rbp), %rdi
callq 0x10ff0
jmp 0x2477e
leaq -0x220(%rbp), %rdi
callq 0x3100
leaq -0x221(%rbp), %rdi
callq 0x3290
leaq -0x250(%rbp), %rdi
callq 0x11530
jmp 0x247a4
leaq -0x279(%rbp), %rdi
callq 0x1d390
jmp 0x247b2
movl $0x3, -0x280(%rbp)
leaq -0x278(%rbp), %rdi
leaq -0x279(%rbp), %rsi
leaq -0x280(%rbp), %rdx
callq 0x35710
jmp 0x247d8
leaq -0x250(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x35770
jmp 0x247ed
leaq -0x278(%rbp), %rdi
callq 0x11610
leaq -0x28(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x115d0
movb %al, -0x9d9(%rbp)
jmp 0x24811
leaq -0x431(%rbp), %rdi
movq %rdi, -0x9e8(%rbp)
callq 0x33b0
movq -0x9e8(%rbp), %rdx
leaq 0x1b9b75(%rip), %rsi    # 0x1de3a7
leaq -0x430(%rbp), %rdi
callq 0x10a90
jmp 0x24840
movb -0x9d9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x410(%rbp), %rdi
leaq -0x430(%rbp), %rdx
callq 0x10f80
jmp 0x24861
leaq -0x410(%rbp), %rdi
callq 0x10ff0
jmp 0x2486f
leaq -0x430(%rbp), %rdi
callq 0x3100
leaq -0x431(%rbp), %rdi
callq 0x3290
leaq -0x461(%rbp), %rdi
callq 0x1d390
jmp 0x24895
movl $0x4, -0x468(%rbp)
leaq -0x460(%rbp), %rdi
leaq -0x461(%rbp), %rsi
leaq -0x468(%rbp), %rdx
callq 0x35710
jmp 0x248bb
leaq -0x250(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x35770
jmp 0x248d0
leaq -0x460(%rbp), %rdi
callq 0x11610
leaq -0x28(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x35870
movb %al, -0x9e9(%rbp)
jmp 0x248f4
leaq -0x619(%rbp), %rdi
movq %rdi, -0x9f8(%rbp)
callq 0x33b0
movq -0x9f8(%rbp), %rdx
leaq 0x1b9a99(%rip), %rsi    # 0x1de3ae
leaq -0x618(%rbp), %rdi
callq 0x10a90
jmp 0x24923
movb -0x9e9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x5f8(%rbp), %rdi
leaq -0x618(%rbp), %rdx
callq 0x10f80
jmp 0x24944
leaq -0x5f8(%rbp), %rdi
callq 0x10ff0
jmp 0x24952
leaq -0x618(%rbp), %rdi
callq 0x3100
leaq -0x619(%rbp), %rdi
callq 0x3290
leaq -0x250(%rbp), %rdi
callq 0x11650
movq %rax, -0xa00(%rbp)
jmp 0x2497f
movq -0xa00(%rbp), %rax
movl $0x3, (%rax)
leaq -0x28(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x115d0
movb %al, -0xa01(%rbp)
jmp 0x249a4
leaq -0x7d1(%rbp), %rdi
movq %rdi, -0xa10(%rbp)
callq 0x33b0
movq -0xa10(%rbp), %rdx
leaq 0x1b99e2(%rip), %rsi    # 0x1de3a7
leaq -0x7d0(%rbp), %rdi
callq 0x10a90
jmp 0x249d3
movb -0xa01(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x7b0(%rbp), %rdi
leaq -0x7d0(%rbp), %rdx
callq 0x10f80
jmp 0x249f4
leaq -0x7b0(%rbp), %rdi
callq 0x10ff0
jmp 0x24a02
leaq -0x7d0(%rbp), %rdi
callq 0x3100
leaq -0x7d1(%rbp), %rdi
callq 0x3290
leaq -0x801(%rbp), %rdi
callq 0x1d390
jmp 0x24a28
movl $0x3, -0x808(%rbp)
leaq -0x800(%rbp), %rdi
leaq -0x801(%rbp), %rsi
leaq -0x808(%rbp), %rdx
callq 0x35710
jmp 0x24a4e
leaq -0x250(%rbp), %rdi
leaq -0x800(%rbp), %rsi
callq 0x358b0
jmp 0x24a63
leaq -0x800(%rbp), %rdi
callq 0x11610
leaq -0x28(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x115d0
movb %al, -0xa11(%rbp)
jmp 0x24a87
leaq -0x9b9(%rbp), %rdi
movq %rdi, -0xa20(%rbp)
callq 0x33b0
movq -0xa20(%rbp), %rdx
leaq 0x1b98ff(%rip), %rsi    # 0x1de3a7
leaq -0x9b8(%rbp), %rdi
callq 0x10a90
jmp 0x24ab6
movb -0xa11(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x998(%rbp), %rdi
leaq -0x9b8(%rbp), %rdx
callq 0x10f80
jmp 0x24ad7
leaq -0x998(%rbp), %rdi
callq 0x10ff0
jmp 0x24ae5
leaq -0x9b8(%rbp), %rdi
callq 0x3100
leaq -0x9b9(%rbp), %rdi
callq 0x3290
leaq -0x250(%rbp), %rdi
callq 0x11610
leaq -0x58(%rbp), %rdi
callq 0x11610
leaq -0x28(%rbp), %rdi
callq 0x11610
addq $0xa20, %rsp            # imm = 0xA20
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24ccb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24b6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3100
leaq -0x221(%rbp), %rdi
callq 0x3290
jmp 0x24cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x11610
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24bd1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x430(%rbp), %rdi
callq 0x3100
leaq -0x431(%rbp), %rdi
callq 0x3290
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x11610
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24c25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x618(%rbp), %rdi
callq 0x3100
leaq -0x619(%rbp), %rdi
callq 0x3290
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24c5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x7d0(%rbp), %rdi
callq 0x3100
leaq -0x7d1(%rbp), %rdi
callq 0x3290
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x800(%rbp), %rdi
callq 0x11610
jmp 0x24cb6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24caa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x9b8(%rbp), %rdi
callq 0x3100
leaq -0x9b9(%rbp), %rdi
callq 0x3290
leaq -0x250(%rbp), %rdi
callq 0x11610
leaq -0x58(%rbp), %rdi
callq 0x11610
leaq -0x28(%rbp), %rdi
callq 0x11610
movq -0x68(%rbp), %rdi
callq 0x33a0
nopl (%rax)