// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/auto_allocator.cpp
// Function: nda::test_auto_array_body()
TEST(auto_array) {
  dense3d_int_auto_array auto_array({4, 3, 2});
  ASSERT(is_auto_allocation(auto_array));
  for_all_indices(auto_array.shape(), [&](int x, int y, int c) { auto_array(x, y, c) = x; });

  dense3d_int_auto_array copy_array(auto_array);
  ASSERT(is_auto_allocation(copy_array));
  for_all_indices(
      copy_array.shape(), [&](int x, int y, int c) { ASSERT_EQ(copy_array(x, y, c), x); });

  dense3d_int_auto_array assign_array;
  assign_array = auto_array;
  ASSERT(is_auto_allocation(assign_array));
  for_all_indices(
      assign_array.shape(), [&](int x, int y, int c) { ASSERT_EQ(assign_array(x, y, c), x); });

  dense3d_int_auto_array move_array(std::move(auto_array));
  ASSERT(is_auto_allocation(move_array));
  for_all_indices(
      move_array.shape(), [&](int x, int y, int c) { ASSERT_EQ(move_array(x, y, c), x); });

  dense3d_int_auto_array move_assign;
  move_assign = std::move(assign_array);
  ASSERT(is_auto_allocation(move_assign));
  for_all_indices(
      move_assign.shape(), [&](int x, int y, int c) { ASSERT_EQ(move_assign(x, y, c), x); });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe38, %rsp            # imm = 0xE38
leaq 0x50(%rsp), %rbx
pushq $0x4
popq %rsi
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
movq %rbx, %rdi
callq 0x10810
leaq 0x580(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3fd1c
movq %r14, %rdi
callq 0x3fd57
movl %eax, %ebx
leaq 0x5a4ec(%rip), %rsi     # 0x996a7
leaq 0x50(%rsp), %rdi
leaq 0x498(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0xca8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x6894
leaq 0xca8(%rsp), %rdi
callq 0x68d4
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x580(%rsp), %rbx
movq 0xa0(%rbx), %r14
movq 0xa8(%rbx), %rax
addq %r14, %rax
movq %rax, 0x8(%rsp)
cmpq 0x8(%rsp), %r14
je 0x3f26b
movq 0x638(%rsp), %r15
movq 0x640(%rsp), %r13
addq %r15, %r13
cmpq %r13, %r15
je 0x3f266
movl 0x650(%rsp), %ebp
movq 0x658(%rsp), %r12
subq $0x1, %r12
jb 0x3f261
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x40480
movl %ebp, (%rax)
incl %ebp
jmp 0x3f245
incq %r15
jmp 0x3f231
incq %r14
jmp 0x3f217
leaq 0x498(%rsp), %rdi
leaq 0x580(%rsp), %rsi
callq 0x3fda6
leaq 0x498(%rsp), %rdi
callq 0x3fd57
movl %eax, %ebx
leaq 0x5a430(%rip), %rsi     # 0x996c6
leaq 0x50(%rsp), %rdi
leaq 0x3b0(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0xb18(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x6894
leaq 0xb18(%rsp), %rdi
callq 0x68d4
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x498(%rsp), %rax
movq 0xa0(%rax), %r15
movq 0xa8(%rax), %rax
addq %r15, %rax
movq %rax, 0x18(%rsp)
leaq 0x3b0(%rsp), %rbp
leaq 0x4e346(%rip), %r14     # 0x8d647
leaq 0x522ea(%rip), %r12     # 0x915f2
cmpq 0x18(%rsp), %r15
je 0x3f47d
movq 0x550(%rsp), %rdx
movq 0x558(%rsp), %rax
addq %rdx, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %rdx
je 0x3f475
movl 0x568(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x570(%rsp), %rbx
movq %rdx, 0x10(%rsp)
subq $0x1, %rbx
jb 0x3f46d
movq %r14, %r13
movl 0x8(%rsp), %esi
movl %esi, 0x2c8(%rsp)
leaq 0x498(%rsp), %rdi
movq %r15, %r14
movl %r15d, %ecx
callq 0x40480
movq %rbp, %r15
movl (%rax), %ebp
movq %r15, %rdi
leaq 0x5a949(%rip), %rsi     # 0x99cd1
leaq 0x1e0(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %ebp, 0x8(%rsp)
sete %sil
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rdx
callq 0x6894
movq %r14, %r15
movq %r13, %r14
movq %rbp, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x5a920(%rip), %rsi     # 0x99cea
callq 0x11036
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rbp
leaq 0x498(%rsp), %rdi
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
callq 0x40480
movq %rbp, %rdi
movq %rax, %rsi
callq 0x10736
movq %rax, %rdi
movq %r14, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x59da6(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x65e62(%rip), %rsi     # 0xa52a2
callq 0x106fe
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x3b0(%rsp), %rbp
movq %rbp, %rdi
callq 0x2090
incl 0x8(%rsp)
movq 0x10(%rsp), %rdx
jmp 0x3f34e
incq %rdx
jmp 0x3f32b
incq %r15
jmp 0x3f308
leaq 0x3b0(%rsp), %rdi
callq 0x3fdf2
leaq 0x3b0(%rsp), %rdi
leaq 0x580(%rsp), %rsi
callq 0x3fe24
leaq 0x3b0(%rsp), %rdi
callq 0x3fd57
movl %eax, %ebx
leaq 0x5a230(%rip), %rsi     # 0x996e5
leaq 0x50(%rsp), %rdi
leaq 0x2c8(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x988(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x6894
leaq 0x988(%rsp), %rdi
callq 0x68d4
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x3b0(%rsp), %rax
movq 0xa0(%rax), %r15
movq 0xa8(%rax), %rax
addq %r15, %rax
movq %rax, 0x18(%rsp)
leaq 0x2c8(%rsp), %rbp
leaq 0x4e127(%rip), %r14     # 0x8d647
leaq 0x520cb(%rip), %r12     # 0x915f2
cmpq 0x18(%rsp), %r15
je 0x3f699
movq 0x468(%rsp), %rdx
movq 0x470(%rsp), %rax
addq %rdx, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %rdx
je 0x3f691
movl 0x480(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x488(%rsp), %rbx
movq %rdx, 0x10(%rsp)
subq $0x1, %rbx
jb 0x3f689
movq %r14, %r13
movl 0x8(%rsp), %esi
movl %esi, 0x1e0(%rsp)
leaq 0x3b0(%rsp), %rdi
movq %r15, %r14
movl %r15d, %ecx
callq 0x40480
movq %rbp, %r15
movl (%rax), %ebp
movq %r15, %rdi
leaq 0x5a872(%rip), %rsi     # 0x99e19
leaq 0x30(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %ebp, 0x8(%rsp)
sete %sil
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rdx
callq 0x6894
movq %r14, %r15
movq %r13, %r14
movq %rbp, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x5a84e(%rip), %rsi     # 0x99e34
callq 0x109ea
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rbp
leaq 0x3b0(%rsp), %rdi
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
callq 0x40480
movq %rbp, %rdi
movq %rax, %rsi
callq 0x10736
movq %rax, %rdi
movq %r14, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x59b8a(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x65c46(%rip), %rsi     # 0xa52a2
callq 0x106fe
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x2c8(%rsp), %rbp
movq %rbp, %rdi
callq 0x2090
incl 0x8(%rsp)
movq 0x10(%rsp), %rdx
jmp 0x3f56d
incq %rdx
jmp 0x3f54a
incq %r15
jmp 0x3f527
leaq 0x2c8(%rsp), %rdi
leaq 0x580(%rsp), %rsi
callq 0x3ff14
leaq 0x2c8(%rsp), %rdi
callq 0x3fd57
movl %eax, %ebx
leaq 0x5a042(%rip), %rsi     # 0x99706
leaq 0x50(%rsp), %rdi
leaq 0x1e0(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x7f8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x6894
leaq 0x7f8(%rsp), %rdi
callq 0x68d4
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x2c8(%rsp), %rax
movq 0xa0(%rax), %r15
movq 0xa8(%rax), %rax
addq %r15, %rax
movq %rax, 0x18(%rsp)
leaq 0x1e0(%rsp), %rbp
leaq 0x4df18(%rip), %r14     # 0x8d647
leaq 0x51ebc(%rip), %r12     # 0x915f2
cmpq 0x18(%rsp), %r15
je 0x3f8a2
movq 0x380(%rsp), %rdx
movq 0x388(%rsp), %rax
addq %rdx, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %rdx
je 0x3f89a
movl 0x398(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x3a0(%rsp), %rbx
movq %rdx, 0x10(%rsp)
subq $0x1, %rbx
jb 0x3f892
movq %r14, %r13
movl 0x8(%rsp), %esi
movl %esi, 0x30(%rsp)
leaq 0x2c8(%rsp), %rdi
movq %r15, %r14
movl %r15d, %ecx
callq 0x40480
movq %rbp, %r15
movl (%rax), %ebp
movq %r15, %rdi
leaq 0x5a8fb(%rip), %rsi     # 0x9a0ae
leaq 0x2c(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %ebp, 0x8(%rsp)
sete %sil
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rdx
callq 0x6894
movq %r14, %r15
movq %r13, %r14
movq %rbp, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x5a8d5(%rip), %rsi     # 0x9a0c7
callq 0x11036
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rbp
leaq 0x2c8(%rsp), %rdi
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
callq 0x40480
movq %rbp, %rdi
movq %rax, %rsi
callq 0x10736
movq %rax, %rdi
movq %r14, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x5997e(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x65a3d(%rip), %rsi     # 0xa52a2
callq 0x106fe
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x1e0(%rsp), %rbp
movq %rbp, %rdi
callq 0x2090
incl 0x8(%rsp)
movq 0x10(%rsp), %rdx
jmp 0x3f77c
incq %rdx
jmp 0x3f759
incq %r15
jmp 0x3f736
leaq 0x1e0(%rsp), %rdi
callq 0x3fdf2
leaq 0x1e0(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
callq 0x3fff2
leaq 0x1e0(%rsp), %rdi
callq 0x3fd57
movl %eax, %ebx
leaq 0x59e4b(%rip), %rsi     # 0x99725
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x668(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x6894
leaq 0x668(%rsp), %rdi
callq 0x68d4
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x1e0(%rsp), %rax
movq 0xa0(%rax), %r15
movq 0xa8(%rax), %rax
addq %r15, %rax
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rbp
leaq 0x4dd08(%rip), %r14     # 0x8d647
leaq 0x51cac(%rip), %r12     # 0x915f2
cmpq 0x18(%rsp), %r15
je 0x3faaf
movq 0x298(%rsp), %rdx
movq 0x2a0(%rsp), %rax
addq %rdx, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %rdx
je 0x3faa7
movl 0x2b0(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x2b8(%rsp), %rbx
movq %rdx, 0x10(%rsp)
subq $0x1, %rbx
jb 0x3fa9f
movq %r14, %r13
movl 0x8(%rsp), %esi
movl %esi, 0x2c(%rsp)
leaq 0x1e0(%rsp), %rdi
movq %r15, %r14
movl %r15d, %ecx
callq 0x40480
movq %rbp, %r15
movl (%rax), %ebp
movq %r15, %rdi
leaq 0x5a92e(%rip), %rsi     # 0x9a2f1
leaq 0x2b(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %ebp, 0x8(%rsp)
sete %sil
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rdx
callq 0x6894
movq %r14, %r15
movq %r13, %r14
movq %rbp, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x5a909(%rip), %rsi     # 0x9a30b
callq 0x3bfc6
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rbp
leaq 0x1e0(%rsp), %rdi
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
callq 0x40480
movq %rbp, %rdi
movq %rax, %rsi
callq 0x10736
movq %rax, %rdi
movq %r14, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x5976e(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x2c(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x6582d(%rip), %rsi     # 0xa52a2
callq 0x106fe
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
callq 0x2090
incl 0x8(%rsp)
movq 0x10(%rsp), %rdx
jmp 0x3f98c
incq %rdx
jmp 0x3f969
incq %r15
jmp 0x3f946
leaq 0x1e0(%rsp), %rdi
callq 0x400b6
leaq 0x2c8(%rsp), %rdi
callq 0x400b6
leaq 0x3b0(%rsp), %rdi
callq 0x400b6
leaq 0x498(%rsp), %rdi
callq 0x400b6
leaq 0x580(%rsp), %rdi
callq 0x400b6
addq $0xe38, %rsp            # imm = 0xE38
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fb64
jmp 0x3fb6e
jmp 0x3fb6e
jmp 0x3fb6e
jmp 0x3fb80
jmp 0x3fb80
jmp 0x3fb8d
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x3fbaf
jmp 0x3fb64
jmp 0x3fb8d
jmp 0x3fb8d
jmp 0x3fb78
jmp 0x3fb78
jmp 0x3fb78
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x3fbdd
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x3fc08
jmp 0x3fb80
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x3fc33
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2090
jmp 0x3fc45
movq %rax, %rbx
jmp 0x3fbb4
movq %rax, %rbx
jmp 0x3fbaa
movq %rax, %rbx
jmp 0x3fbe2
movq %rax, %rbx
jmp 0x3fbd5
movq %rax, %rbx
jmp 0x3fc45
movq %rax, %rbx
jmp 0x3fc0d
movq %rax, %rbx
jmp 0x3fc00
movq %rax, %rbx
jmp 0x3fc38
movq %rax, %rbx
jmp 0x3fc2b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
leaq 0x1e0(%rsp), %rdi
callq 0x400b6
jmp 0x3fbe2
jmp 0x3fc5a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x1e0(%rsp), %rdi
callq 0x2090
leaq 0x2c8(%rsp), %rdi
callq 0x400b6
jmp 0x3fc0d
jmp 0x3fc5a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x2c8(%rsp), %rdi
callq 0x2090
leaq 0x3b0(%rsp), %rdi
callq 0x400b6
jmp 0x3fc38
jmp 0x3fc5a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x68d4
leaq 0x3b0(%rsp), %rdi
callq 0x2090
leaq 0x498(%rsp), %rdi
callq 0x400b6
leaq 0x580(%rsp), %rdi
callq 0x400b6
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba