// File: /workspace/github_cpp_makefile_star2_O3/dsharlet[P]array/test/shape.cpp
// Function: nda::test_shape_transpose_body()
TEST(shape_transpose) {
  dense_shape<3> s(3, 5, 8);
  shape<dim<>, dim<>, dense_dim<>> transposed_120 = transpose<1, 2, 0>(s);
  ASSERT_EQ(transposed_120.dim<0>().extent(), 5);
  ASSERT_EQ(transposed_120.dim<1>().extent(), 8);
  ASSERT_EQ(transposed_120.dim<2>().extent(), 3);

  shape<dim<>, dense_dim<>, dim<>> transposed_10 = transpose<1, 0>(s);
  ASSERT_EQ(transposed_10.dim<0>().extent(), 5);
  ASSERT_EQ(transposed_10.dim<1>().extent(), 3);
  ASSERT_EQ(transposed_10.dim<2>().extent(), 8);

  dense_shape<2> reordered = reorder<2, 0>(transposed_120);
  ASSERT_EQ(reordered.dim<0>().extent(), 3);
  ASSERT_EQ(reordered.dim<1>().extent(), 5);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
xorl %r14d, %r14d
leaq 0x20(%rsp), %rbx
movq %r14, (%rbx)
movl $0x3, %r15d
movq %r15, 0x8(%rbx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rbx)
xorl %edi, %edi
movq %rbx, %rsi
callq 0xd133
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
leaq 0x20(%rsp), %rsi
movl $0x2, %edi
callq 0xd133
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x34e2a(%rip), %rsi     # 0xbf324
leaq 0x34e48(%rip), %rdx     # 0xbf349
movq %rsp, %rdi
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x19162(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x34e17(%rip), %rsi     # 0xbf34a
movq %rax, %rdi
callq 0x249ac
leaq 0x1cd14(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a567
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x21b0
leaq 0x19116(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x1accb(%rip), %rsi     # 0xa5248
movq %rax, %rdi
callq 0x18fba
leaq 0x1ccca(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a5b1
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
leaq 0x2fce1(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8a5e0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34d7e(%rip), %rsi     # 0xbf36b
leaq 0x34d9c(%rip), %rdx     # 0xbf390
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x19072(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x34d6e(%rip), %rsi     # 0xbf391
movq %rax, %rdi
callq 0x249ac
leaq 0x1cc24(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a657
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x21b0
leaq 0x19026(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x34d22(%rip), %rsi     # 0xbf38f
movq %rax, %rdi
callq 0x18fba
leaq 0x1cbda(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a6a1
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x22f0
leaq 0x2fbf1(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8a6d0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34cd5(%rip), %rsi     # 0xbf3b2
leaq 0x34cf3(%rip), %rdx     # 0xbf3d7
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x18f82(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x34cc5(%rip), %rsi     # 0xbf3d8
movq %rax, %rdi
callq 0x249ac
leaq 0x1cb34(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a747
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x21b0
leaq 0x18f36(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x231fc(%rip), %rsi     # 0xad959
movq %rax, %rdi
callq 0x18fba
leaq 0x1caea(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a791
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
leaq 0x2fb01(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8a7c0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x20(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x3, 0x8(%rsi)
movq $0x1, 0x10(%rsi)
movl $0x1, %edi
callq 0xd133
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34c06(%rip), %rsi     # 0xbf3f9
leaq 0x34c23(%rip), %rdx     # 0xbf41d
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x18e6c(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x34bf5(%rip), %rsi     # 0xbf41e
movq %rax, %rdi
callq 0x61168
leaq 0x1ca1e(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a85d
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x21b0
leaq 0x18e20(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x1a9d5(%rip), %rsi     # 0xa5248
movq %rax, %rdi
callq 0x18fba
leaq 0x1c9d4(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a8a7
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
leaq 0x2f9eb(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8a8d6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34b5b(%rip), %rsi     # 0xbf43e
leaq 0x34b78(%rip), %rdx     # 0xbf462
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x18d7c(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x34b4a(%rip), %rsi     # 0xbf463
movq %rax, %rdi
callq 0x61168
leaq 0x1c92e(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a94d
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x21b0
leaq 0x18d30(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x22ff6(%rip), %rsi     # 0xad959
movq %rax, %rdi
callq 0x18fba
leaq 0x1c8e4(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a997
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
leaq 0x2f8fb(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8a9c6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34ab0(%rip), %rsi     # 0xbf483
leaq 0x34acd(%rip), %rdx     # 0xbf4a7
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x18c8c(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x34a9f(%rip), %rsi     # 0xbf4a8
movq %rax, %rdi
callq 0x61168
leaq 0x1c83e(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8aa3d
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x21b0
leaq 0x18c40(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x3493c(%rip), %rsi     # 0xbf38f
movq %rax, %rdi
callq 0x18fba
leaq 0x1c7f4(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8aa87
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x22f0
leaq 0x2f80b(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8aab6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x20(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x3, 0x8(%rsi)
movq $0x1, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x349e2(%rip), %rsi     # 0xbf4c8
leaq 0x349fb(%rip), %rdx     # 0xbf4e8
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x18b79(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x349cd(%rip), %rsi     # 0xbf4e9
movq %rax, %rdi
callq 0x3f614
leaq 0x1c72b(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8ab50
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x21b0
leaq 0x18b2d(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x22df3(%rip), %rsi     # 0xad959
movq %rax, %rdi
callq 0x18fba
leaq 0x1c6e1(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8ab9a
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
leaq 0x2f6f8(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8abc9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x3492f(%rip), %rsi     # 0xbf505
leaq 0x34948(%rip), %rdx     # 0xbf525
callq 0xd14c
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x18a89(%rip), %rsi     # 0xa3684
leaq 0x20(%rsp), %rdi
callq 0x18fba
leaq 0x3491a(%rip), %rsi     # 0xbf526
movq %rax, %rdi
callq 0x3f614
leaq 0x1c63b(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8ac40
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x21b0
leaq 0x18a3d(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x1a5f2(%rip), %rsi     # 0xa5248
movq %rax, %rdi
callq 0x18fba
leaq 0x1c5f1(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8ac8a
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
leaq 0x2f608(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8acb9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x8acd4
jmp 0x8acd4
jmp 0x8acd4
jmp 0x8acd4
jmp 0x8acd4
jmp 0x8acd4
jmp 0x8acd4
movq %rax, %rbx
jmp 0x8ada4
jmp 0x8ad18
jmp 0x8ad27
jmp 0x8ad36
jmp 0x8ad45
jmp 0x8ad54
jmp 0x8ad63
jmp 0x8ad72
jmp 0x8ad81
jmp 0x8ad00
jmp 0x8ad00
jmp 0x8ad00
jmp 0x8ad00
jmp 0x8ad00
jmp 0x8ad00
jmp 0x8ad00
movq %rax, %rbx
jmp 0x8ad8e
jmp 0x8ad18
jmp 0x8ad27
jmp 0x8ad36
jmp 0x8ad45
jmp 0x8ad54
jmp 0x8ad63
jmp 0x8ad72
jmp 0x8ad81
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
jmp 0x8ad8e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbfd8
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8ada4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc0a9