// File: /workspace/github_cpp_makefile_star2_O1/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 0xd09f
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq $0x1, 0x10(%rbx)
leaq 0x20(%rsp), %rsi
movl $0x2, %edi
callq 0xd09f
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3526c(%rip), %rsi     # 0xbd7c4
leaq 0x3528a(%rip), %rdx     # 0xbd7e9
movq %rsp, %rdi
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x190d4(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x35259(%rip), %rsi     # 0xbd7ea
movq %rax, %rdi
callq 0x23f9c
leaq 0x1cd8a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x885c5
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x21b0
leaq 0x19088(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x1ac25(%rip), %rsi     # 0xa3200
movq %rax, %rdi
callq 0x18a16
leaq 0x1cd40(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8860f
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
leaq 0x2fd53(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8863e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x351c0(%rip), %rsi     # 0xbd80b
leaq 0x351de(%rip), %rdx     # 0xbd830
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x18fe4(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x351b0(%rip), %rsi     # 0xbd831
movq %rax, %rdi
callq 0x23f9c
leaq 0x1cc9a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x886b5
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x21b0
leaq 0x18f98(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x35164(%rip), %rsi     # 0xbd82f
movq %rax, %rdi
callq 0x18a16
leaq 0x1cc50(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x886ff
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x22f0
leaq 0x2fc63(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8872e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x35117(%rip), %rsi     # 0xbd852
leaq 0x35135(%rip), %rdx     # 0xbd877
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x18ef4(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x35107(%rip), %rsi     # 0xbd878
movq %rax, %rdi
callq 0x23f9c
leaq 0x1cbaa(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x887a5
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x21b0
leaq 0x18ea8(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x2338e(%rip), %rsi     # 0xabb49
movq %rax, %rdi
callq 0x18a16
leaq 0x1cb60(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x887ef
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
leaq 0x2fb73(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x8881e
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 0xd09f
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x35048(%rip), %rsi     # 0xbd899
leaq 0x35065(%rip), %rdx     # 0xbd8bd
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x18dde(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x35037(%rip), %rsi     # 0xbd8be
movq %rax, %rdi
callq 0x5fc44
leaq 0x1ca94(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x888bb
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x21b0
leaq 0x18d92(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x1a92f(%rip), %rsi     # 0xa3200
movq %rax, %rdi
callq 0x18a16
leaq 0x1ca4a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88905
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
leaq 0x2fa5d(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x88934
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34f9d(%rip), %rsi     # 0xbd8de
leaq 0x34fba(%rip), %rdx     # 0xbd902
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x18cee(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x34f8c(%rip), %rsi     # 0xbd903
movq %rax, %rdi
callq 0x5fc44
leaq 0x1c9a4(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x889ab
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x21b0
leaq 0x18ca2(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x23188(%rip), %rsi     # 0xabb49
movq %rax, %rdi
callq 0x18a16
leaq 0x1c95a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x889f5
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
leaq 0x2f96d(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x88a24
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34ef2(%rip), %rsi     # 0xbd923
leaq 0x34f0f(%rip), %rdx     # 0xbd947
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x18bfe(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x34ee1(%rip), %rsi     # 0xbd948
movq %rax, %rdi
callq 0x5fc44
leaq 0x1c8b4(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88a9b
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x21b0
leaq 0x18bb2(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x34d7e(%rip), %rsi     # 0xbd82f
movq %rax, %rdi
callq 0x18a16
leaq 0x1c86a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88ae5
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x8, %esi
callq 0x22f0
leaq 0x2f87d(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x88b14
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 0xd09f
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34e24(%rip), %rsi     # 0xbd968
leaq 0x34e3d(%rip), %rdx     # 0xbd988
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x18aeb(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x34e0f(%rip), %rsi     # 0xbd989
movq %rax, %rdi
callq 0x3ec6a
leaq 0x1c7a1(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88bae
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x21b0
leaq 0x18a9f(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x22f85(%rip), %rsi     # 0xabb49
movq %rax, %rdi
callq 0x18a16
leaq 0x1c757(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88bf8
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
leaq 0x2f76a(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x88c27
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x34d71(%rip), %rsi     # 0xbd9a5
leaq 0x34d8a(%rip), %rdx     # 0xbd9c5
callq 0xd0b8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x189fb(%rip), %rsi     # 0xa1654
leaq 0x20(%rsp), %rdi
callq 0x18a16
leaq 0x34d5c(%rip), %rsi     # 0xbd9c6
movq %rax, %rdi
callq 0x3ec6a
leaq 0x1c6b1(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88c9e
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x21b0
leaq 0x189af(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x1a54c(%rip), %rsi     # 0xa3200
movq %rax, %rdi
callq 0x18a16
leaq 0x1c667(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88ce8
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
leaq 0x2f67a(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x88d17
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x88d32
jmp 0x88d32
jmp 0x88d32
jmp 0x88d32
jmp 0x88d32
jmp 0x88d32
jmp 0x88d32
movq %rax, %rbx
jmp 0x88e02
jmp 0x88d76
jmp 0x88d85
jmp 0x88d94
jmp 0x88da3
jmp 0x88db2
jmp 0x88dc1
jmp 0x88dd0
jmp 0x88ddf
jmp 0x88d5e
jmp 0x88d5e
jmp 0x88d5e
jmp 0x88d5e
jmp 0x88d5e
jmp 0x88d5e
jmp 0x88d5e
movq %rax, %rbx
jmp 0x88dec
jmp 0x88d76
jmp 0x88d85
jmp 0x88d94
jmp 0x88da3
jmp 0x88db2
jmp 0x88dc1
jmp 0x88dd0
jmp 0x88ddf
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
jmp 0x88dec
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x88e02
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc036