// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/matrix.cpp
// Function: nda::test_small_matrix_body()
TEST(small_matrix) {
  using matrix4x3i = small_matrix<int, 4, 3>;

  matrix4x3i auto_array;
  for_all_indices(auto_array.shape(), [&](int x, int y) { auto_array(x, y) = x; });

  matrix4x3i copy_array(auto_array);
  for_all_indices(copy_array.shape(), [&](int x, int y) { ASSERT_EQ(copy_array(x, y), x); });

  matrix4x3i assign_array;
  assign_array = auto_array;
  for_all_indices(assign_array.shape(), [&](int x, int y) { ASSERT_EQ(assign_array(x, y), x); });

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
leaq 0x230(%rsp), %rbx
movq %rbx, %rdi
callq 0x66df2
movq 0x60(%rbx), %rax
leaq 0x4(%rax), %rcx
movq 0x48(%rbx), %rdx
movq 0x50(%rbx), %rsi
movq 0x70(%rbx), %rdi
movq %rsi, %r8
shlq $0x20, %r8
pushq $0x3
popq %r9
movq %rax, %r10
cmpq %rcx, %r10
je 0x66410
movslq %r10d, %r11
subq %rax, %r11
imulq %rdi, %r11
leaq (%rdx,%r11,4), %r11
movq %r9, %rbx
movq %r8, %r14
subq $0x1, %rbx
jb 0x6640b
movq %r14, %r15
sarq $0x20, %r15
subq %rsi, %r15
movl %r10d, (%r11,%r15,4)
movabsq $0x100000000, %r15      # imm = 0x100000000
addq %r15, %r14
jmp 0x663e8
incq %r10
jmp 0x663cf
leaq 0x1b8(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x66e1a
movq 0x218(%rsp), %r14
leaq 0x4(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x2a8(%rsp), %r13
leaq 0x27202(%rip), %r15     # 0x8d647
cmpq 0x10(%rsp), %r14
je 0x665de
movq 0x208(%rsp), %rbp
movslq %r14d, %rax
movq %rax, 0x8(%rsp)
shlq $0x20, %rbp
pushq $0x3
popq %rbx
subq $0x1, %rbx
jb 0x665d6
movq %rbx, 0x18(%rsp)
movq %r15, %rbx
movq %r13, %r15
movq %r14, %r13
movq 0x8(%rsp), %rcx
movq %rcx, %rax
subq 0x218(%rsp), %rax
movl %ecx, 0xc8(%rsp)
imulq 0x228(%rsp), %rax
movq %rbp, 0x20(%rsp)
sarq $0x20, %rbp
movq %rbp, %rcx
subq 0x208(%rsp), %rcx
shlq $0x2, %rcx
addq 0x200(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
leaq 0x140(%rsp), %r12
movq %r12, %rdi
leaq 0x3f889(%rip), %rsi     # 0xa5d5e
leaq 0x30(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %r13d, %r14d
movq %r13, %r14
sete %sil
movq %r15, %r13
movq %r15, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbx, %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x3f863(%rip), %rsi     # 0xa5d74
callq 0x1087a
movq %rax, %rdi
leaq 0x2b0d2(%rip), %rsi     # 0x915f2
callq 0x106fe
movq 0x8(%rsp), %rcx
subq 0x218(%rsp), %rcx
imulq 0x228(%rsp), %rcx
subq 0x208(%rsp), %rbp
shlq $0x2, %rbp
addq 0x200(%rsp), %rbp
leaq (,%rcx,4), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x10736
movq %rax, %rdi
movq %r15, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x32c45(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
leaq 0x2b06c(%rip), %rsi     # 0x915f2
callq 0x106fe
movq %rax, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x3ecfd(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %r13, %rdi
callq 0x68d4
movq %r12, %rdi
callq 0x2090
movabsq $0x100000000, %rax      # imm = 0x100000000
movq 0x20(%rsp), %rbp
addq %rax, %rbp
movq 0x18(%rsp), %rbx
jmp 0x66467
incq %r14
jmp 0x66445
leaq 0x140(%rsp), %rdi
callq 0x66df2
leaq 0x140(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x66e50
movq 0x1a0(%rsp), %r14
leaq 0x4(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x2a8(%rsp), %r13
leaq 0x27027(%rip), %r15     # 0x8d647
cmpq 0x10(%rsp), %r14
je 0x667b6
movq 0x190(%rsp), %rbp
movslq %r14d, %rax
movq %rax, 0x8(%rsp)
shlq $0x20, %rbp
pushq $0x3
popq %rbx
subq $0x1, %rbx
jb 0x667ae
movq %rbx, 0x18(%rsp)
movq %r15, %rbx
movq %r13, %r15
movq %r14, %r13
movq 0x8(%rsp), %rcx
movq %rcx, %rax
subq 0x1a0(%rsp), %rax
movl %ecx, 0x30(%rsp)
imulq 0x1b0(%rsp), %rax
movq %rbp, 0x20(%rsp)
sarq $0x20, %rbp
movq %rbp, %rcx
subq 0x190(%rsp), %rcx
shlq $0x2, %rcx
addq 0x188(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
leaq 0x3f7e3(%rip), %rsi     # 0xa5e90
leaq 0xa8(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %r13d, %r14d
movq %r13, %r14
sete %sil
movq %r15, %r13
movq %r15, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbx, %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x3f7bc(%rip), %rsi     # 0xa5ea8
callq 0x109ce
movq %rax, %rdi
leaq 0x2aef7(%rip), %rsi     # 0x915f2
callq 0x106fe
movq 0x8(%rsp), %rcx
subq 0x1a0(%rsp), %rcx
imulq 0x1b0(%rsp), %rcx
subq 0x190(%rsp), %rbp
shlq $0x2, %rbp
addq 0x188(%rsp), %rbp
leaq (,%rcx,4), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x10736
movq %rax, %rdi
movq %r15, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x32a6a(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
leaq 0x2ae91(%rip), %rsi     # 0x915f2
callq 0x106fe
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x3eb25(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %r13, %rdi
callq 0x68d4
movq %r12, %rdi
callq 0x2090
movabsq $0x100000000, %rax      # imm = 0x100000000
movq 0x20(%rsp), %rbp
addq %rax, %rbp
movq 0x18(%rsp), %rbx
jmp 0x66642
incq %r14
jmp 0x66620
leaq 0xc8(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x66ee2
movq 0x128(%rsp), %r14
leaq 0x4(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x2a8(%rsp), %r13
leaq 0x26e5c(%rip), %r15     # 0x8d647
cmpq 0x10(%rsp), %r14
je 0x66981
movq 0x118(%rsp), %rbp
movslq %r14d, %rax
movq %rax, 0x8(%rsp)
shlq $0x20, %rbp
pushq $0x3
popq %rbx
subq $0x1, %rbx
jb 0x66979
movq %rbx, 0x18(%rsp)
movq %r15, %rbx
movq %r13, %r15
movq %r14, %r13
movq 0x8(%rsp), %rcx
movq %rcx, %rax
subq 0x128(%rsp), %rax
movl %ecx, 0xa8(%rsp)
imulq 0x138(%rsp), %rax
movq %rbp, 0x20(%rsp)
sarq $0x20, %rbp
movq %rbp, %rcx
subq 0x118(%rsp), %rcx
shlq $0x2, %rcx
addq 0x110(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
leaq 0x30(%rsp), %r12
movq %r12, %rdi
leaq 0x3f873(%rip), %rsi     # 0xa60eb
leaq 0x2c(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %r13d, %r14d
movq %r13, %r14
sete %sil
movq %r15, %r13
movq %r15, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbx, %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x3f84d(%rip), %rsi     # 0xa6101
callq 0x1087a
movq %rax, %rdi
leaq 0x2ad2f(%rip), %rsi     # 0x915f2
callq 0x106fe
movq 0x8(%rsp), %rcx
subq 0x128(%rsp), %rcx
imulq 0x138(%rsp), %rcx
subq 0x118(%rsp), %rbp
shlq $0x2, %rbp
addq 0x110(%rsp), %rbp
leaq (,%rcx,4), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x10736
movq %rax, %rdi
movq %r15, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x328a2(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
leaq 0x2acc9(%rip), %rsi     # 0x915f2
callq 0x106fe
movq %rax, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x3e95a(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %r13, %rdi
callq 0x68d4
movq %r12, %rdi
callq 0x2090
movabsq $0x100000000, %rax      # imm = 0x100000000
movq 0x20(%rsp), %rbp
addq %rax, %rbp
movq 0x18(%rsp), %rbx
jmp 0x6680d
incq %r14
jmp 0x667eb
leaq 0x30(%rsp), %rdi
callq 0x66df2
leaq 0x30(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x66f6c
movq 0x90(%rsp), %r14
leaq 0x4(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x2a8(%rsp), %r13
leaq 0x26c8a(%rip), %r15     # 0x8d647
cmpq 0x10(%rsp), %r14
je 0x66b4a
movq 0x80(%rsp), %rbp
movslq %r14d, %rax
movq %rax, 0x8(%rsp)
shlq $0x20, %rbp
pushq $0x3
popq %rbx
subq $0x1, %rbx
jb 0x66b42
movq %rbx, 0x18(%rsp)
movq %r15, %rbx
movq %r13, %r15
movq %r14, %r13
movq 0x8(%rsp), %rcx
movq %rcx, %rax
subq 0x90(%rsp), %rax
movl %ecx, 0x2c(%rsp)
imulq 0xa0(%rsp), %rax
movq %rbp, 0x20(%rsp)
sarq $0x20, %rbp
movq %rbp, %rcx
subq 0x80(%rsp), %rcx
shlq $0x2, %rcx
addq 0x78(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
leaq 0x3f8c1(%rip), %rsi     # 0xa6308
leaq 0x2b(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl %r13d, %r14d
movq %r13, %r14
sete %sil
movq %r15, %r13
movq %r15, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbx, %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x3f89c(%rip), %rsi     # 0xa631f
callq 0x118c8
movq %rax, %rdi
leaq 0x2ab60(%rip), %rsi     # 0x915f2
callq 0x106fe
movq 0x8(%rsp), %rcx
subq 0x90(%rsp), %rcx
imulq 0xa0(%rsp), %rcx
subq 0x80(%rsp), %rbp
shlq $0x2, %rbp
addq 0x78(%rsp), %rbp
leaq (,%rcx,4), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x10736
movq %rax, %rdi
movq %r15, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x326d6(%rip), %rsi     # 0x991bc
callq 0x106fe
movq %rax, %rdi
leaq 0x2aafd(%rip), %rsi     # 0x915f2
callq 0x106fe
movq %rax, %rdi
leaq 0x2c(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x3e791(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %r13, %rdi
callq 0x68d4
movq %r12, %rdi
callq 0x2090
movabsq $0x100000000, %rax      # imm = 0x100000000
movq 0x20(%rsp), %rbp
addq %rax, %rbp
movq 0x18(%rsp), %rbx
jmp 0x669df
incq %r14
jmp 0x669bd
leaq 0x30(%rsp), %rdi
callq 0x67062
leaq 0xc8(%rsp), %rdi
callq 0x67062
leaq 0x140(%rsp), %rdi
callq 0x67062
leaq 0x1b8(%rsp), %rdi
callq 0x67062
leaq 0x230(%rsp), %rdi
callq 0x67062
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x66bac
jmp 0x66bb1
jmp 0x66bb6
jmp 0x66bb6
jmp 0x66bbe
movq %rax, %rbx
jmp 0x66c8e
movq %rax, %rbx
jmp 0x66bfa
movq %rax, %rbx
jmp 0x66c25
movq %rax, %rbx
jmp 0x66c53
movq %rax, %rbx
jmp 0x66c81
movq %rax, %rbx
jmp 0x66bed
movq %rax, %rbx
jmp 0x66c1b
movq %rax, %rbx
jmp 0x66c46
movq %rax, %rbx
jmp 0x66c74
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
callq 0x68d4
leaq 0xa8(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0x67062
jmp 0x66c25
jmp 0x66ca3
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
leaq 0xc8(%rsp), %rdi
callq 0x67062
jmp 0x66c53
jmp 0x66ca3
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
callq 0x68d4
leaq 0xc8(%rsp), %rdi
callq 0x2090
leaq 0x140(%rsp), %rdi
callq 0x67062
jmp 0x66c81
jmp 0x66ca3
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
callq 0x68d4
leaq 0x140(%rsp), %rdi
callq 0x2090
leaq 0x1b8(%rsp), %rdi
callq 0x67062
leaq 0x230(%rsp), %rdi
callq 0x67062
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba
nop