// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
subq $0x878, %rsp            # imm = 0x878
pushq $0x3
popq %rbp
leaq 0x80(%rsp), %rdx
movl %ebp, (%rdx)
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rbx
movq %rbx, %rsi
callq 0x11126
movl %ebp, (%rbx)
leaq 0x80(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x11126
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x6b84
movl %eax, %ebx
leaq 0x803bc(%rip), %rsi     # 0x8d087
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x6e8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x6894
leaq 0x6e8(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0x6b36
leaq 0x4(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x8(%rsp), %rdi
leaq 0x3(%rsp), %rsi
callq 0x11126
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1115c
leaq 0x8(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b84
movl %eax, %ebx
leaq 0x82408(%rip), %rsi     # 0x8f163
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x558(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x558(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x4(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x8(%rsp), %rdi
leaq 0x3(%rsp), %rsi
callq 0x11126
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1115c
leaq 0x8(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x111aa
movl %eax, %ebx
leaq 0x82389(%rip), %rsi     # 0x8f16a
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x3c8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x3c8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rsi
movq 0x18(%rsi), %rax
movl $0x3, (%rax)
leaq 0x58(%rsp), %rdi
callq 0x6b84
movl %eax, %ebx
leaq 0x82325(%rip), %rsi     # 0x8f163
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x238(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x238(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x4(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x8(%rsp), %rdi
leaq 0x3(%rsp), %rsi
callq 0x11126
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x111d0
leaq 0x8(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b84
movl %eax, %ebx
leaq 0x8229f(%rip), %rsi     # 0x8f163
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0xa8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0xa8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0x6baa
leaq 0x80(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
callq 0x6baa
addq $0x878, %rsp            # imm = 0x878
popq %rbx
popq %rbp
retq
jmp 0xcf7d
jmp 0xcf3a
jmp 0xcf7d
jmp 0xcf7d
jmp 0xcf7d
jmp 0xcf3a
jmp 0xcf7d
jmp 0xcf7d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6baa
jmp 0xcf80
jmp 0xcf7d
jmp 0xcf4f
jmp 0xcf4f
movq %rax, %rbx
jmp 0xcf8a
movq %rax, %rbx
jmp 0xcf97
jmp 0xcf5f
jmp 0xcf5f
jmp 0xcf5f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2090
jmp 0xcf80
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2090
jmp 0xcf8a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6baa
leaq 0x80(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
callq 0x6baa
movq %rbx, %rdi
callq 0x22f0