// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
leaq 0x280(%rsp), %rbx
pushq $0x3
popq %rsi
pushq $0x5
popq %rdx
pushq $0x8
popq %rcx
movq %rbx, %rdi
callq 0x10810
leaq 0xa8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x77f5d
movq 0x38(%r14), %rbx
leaq 0x34f73(%rip), %rsi     # 0xaaa4f
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x5, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x6894
leaq 0x17b39(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34f53(%rip), %rsi     # 0xaaa75
movq %rax, %rdi
callq 0x1b006
leaq 0x1bac1(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xe0(%rsp), %rcx
leaq 0x30(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17aef(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x199b2(%rip), %rsi     # 0x8f519
movq %rax, %rdi
callq 0x106fe
leaq 0x1ba7c(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
movl $0x5, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f70a(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x60(%rsp), %rdi
callq 0x2090
movq 0xc8(%rsp), %rbx
leaq 0x34ed0(%rip), %rsi     # 0xaaa96
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x8, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x6894
leaq 0x17a4f(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34eb0(%rip), %rsi     # 0xaaabc
movq %rax, %rdi
callq 0x1b006
leaq 0x1b9d7(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xc8(%rsp), %rcx
leaq 0x30(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17a05(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x34e69(%rip), %rsi     # 0xaaaba
movq %rax, %rdi
callq 0x106fe
leaq 0x1b992(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
movl $0x8, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f620(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x60(%rsp), %rdi
callq 0x2090
movq 0xb0(%rsp), %rbx
leaq 0x34e2d(%rip), %rsi     # 0xaaadd
leaq 0x60(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x3, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x6894
leaq 0x17965(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34e0d(%rip), %rsi     # 0xaab03
movq %rax, %rdi
callq 0x1b006
leaq 0x1b8ed(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xb0(%rsp), %rcx
leaq 0x30(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x1791b(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x221ae(%rip), %rsi     # 0x97ee9
movq %rax, %rdi
callq 0x106fe
leaq 0x1b8a8(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
movl $0x3, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f536(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x60(%rsp), %rdi
callq 0x2090
leaq 0x60(%rsp), %rbx
leaq 0x280(%rsp), %rsi
movq %rbx, %rdi
callq 0x7802c
movq 0x38(%rbx), %rbx
leaq 0x34d79(%rip), %rsi     # 0xaab24
leaq 0x30(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x5, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x6894
leaq 0x1786a(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34d58(%rip), %rsi     # 0xaab49
movq %rax, %rdi
callq 0x516d4
leaq 0x1b7f2(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x98(%rsp), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17820(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x196e3(%rip), %rsi     # 0x8f519
movq %rax, %rdi
callq 0x106fe
leaq 0x1b7ad(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
movl $0x5, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f43b(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
movq 0x80(%rsp), %rbx
leaq 0x34cd4(%rip), %rsi     # 0xaab69
leaq 0x30(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x3, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x6894
leaq 0x17780(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34cb3(%rip), %rsi     # 0xaab8e
movq %rax, %rdi
callq 0x516d4
leaq 0x1b708(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x80(%rsp), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17736(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x21fc9(%rip), %rsi     # 0x97ee9
movq %rax, %rdi
callq 0x106fe
leaq 0x1b6c3(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
movl $0x3, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f351(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
movq 0x68(%rsp), %rbx
leaq 0x34c32(%rip), %rsi     # 0xaabae
leaq 0x30(%rsp), %rdi
leaq 0x4(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x8, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x6894
leaq 0x17699(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34c11(%rip), %rsi     # 0xaabd3
movq %rax, %rdi
callq 0x516d4
leaq 0x1b621(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x68(%rsp), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17652(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x34ab6(%rip), %rsi     # 0xaaaba
movq %rax, %rdi
callq 0x106fe
leaq 0x1b5df(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
movl $0x8, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f26d(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rbx
leaq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x77276
movq 0x20(%rbx), %rbx
leaq 0x34b7f(%rip), %rsi     # 0xaabf3
leaq 0x10(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x3, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x175a1(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34b5a(%rip), %rsi     # 0xaac14
movq %rax, %rdi
callq 0x31698
leaq 0x1b529(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x50(%rsp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x1755a(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x21ded(%rip), %rsi     # 0x97ee9
movq %rax, %rdi
callq 0x106fe
leaq 0x1b4e7(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x4(%rsp), %rsi
movl $0x3, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f175(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
movq 0x38(%rsp), %rbx
leaq 0x34ad8(%rip), %rsi     # 0xaac30
leaq 0x10(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x5, %rbx
sete %sil
leaq 0xf0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x174bd(%rip), %rsi     # 0x8d647
leaq 0xf0(%rsp), %rdi
callq 0x106fe
leaq 0x34ab3(%rip), %rsi     # 0xaac51
movq %rax, %rdi
callq 0x31698
leaq 0x1b445(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x38(%rsp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17476(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x19339(%rip), %rsi     # 0x8f519
movq %rax, %rdi
callq 0x106fe
leaq 0x1b403(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x4(%rsp), %rsi
movl $0x5, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f091(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r14
retq
jmp 0x76249
jmp 0x76249
jmp 0x76249
jmp 0x76249
jmp 0x76249
jmp 0x76249
jmp 0x76249
movq %rax, %rbx
jmp 0x76341
jmp 0x7629f
jmp 0x76257
jmp 0x762b1
movq %rax, %rbx
jmp 0x762c1
jmp 0x762c8
jmp 0x76269
jmp 0x762da
jmp 0x76269
jmp 0x762ec
movq %rax, %rbx
jmp 0x762fc
jmp 0x76303
jmp 0x76284
jmp 0x76315
jmp 0x76284
jmp 0x76327
movq %rax, %rbx
jmp 0x76337
jmp 0x7629f
jmp 0x762b1
jmp 0x762c8
jmp 0x762da
jmp 0x762ec
jmp 0x76303
jmp 0x76315
jmp 0x76327
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
jmp 0x762c1
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
jmp 0x7633c
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
jmp 0x762fc
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
jmp 0x762fc
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
jmp 0x7633c
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
jmp 0x76337
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
jmp 0x76337
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x68d4
leaq 0x60(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba