// File: /workspace/github_cpp_makefile_star2_O1/dsharlet[P]array/test/shape.cpp
// Function: nda::test_shape_conversion_body()
TEST(shape_conversion) {
  dense_shape<2> static_dense({0, 10}, {1, 5});
  shape_of_rank<2> dense = static_dense;
  ASSERT_EQ(dense, static_dense);

  static_dense = dense;
  ASSERT_EQ(dense, static_dense);

  dense_shape<2> static_dense2(dense);
  ASSERT_EQ(dense, static_dense2);

  shape_of_rank<2> dense_unresolved({0, 10}, {1, 5});
  dense_shape<2> static_dense3(dense);
  ASSERT_EQ(dense, static_dense3);

  ASSERT(is_compatible<dense_shape<2>>(dense));

  shape_of_rank<2> sparse({0, 10, 2}, {1, 5, 20});
  ASSERT(!is_compatible<dense_shape<2>>(sparse));

  dense_shape<3> uprank = convert_shape<dense_shape<3>>(dense);
  ASSERT_EQ(uprank.z().min(), 0);
  ASSERT_EQ(uprank.z().extent(), 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5e8, %rsp            # imm = 0x5E8
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
xorl %ebx, %ebx
leaq 0x130(%rsp), %rsi
movq %rbx, (%rsi)
movl $0xa, %r15d
movq %r15, 0x8(%rsi)
movl $0x1, %r12d
movq %r12, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
movq %r12, 0xa0(%rsp)
movq $0x5, 0xa8(%rsp)
movq %r14, 0xb0(%rsp)
movq %rbx, 0xb8(%rsp)
movq %r15, 0xc0(%rsp)
movq %r14, 0x10(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r12, 0x28(%rsp)
cmpq %r12, (%rsp)
jne 0x87aeb
cmpq $0x5, 0x8(%rsp)
jne 0x87aeb
cmpq %r14, 0x10(%rsp)
sete %bl
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x35bd5(%rip), %rsi     # 0xbd6d0
leaq 0x35be3(%rip), %rdx     # 0xbd6e5
leaq 0x58(%rsp), %rdi
callq 0xd0b8
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf0a
leaq 0x19b2c(%rip), %rsi     # 0xa1654
leaq 0x130(%rsp), %rdi
callq 0x18a16
leaq 0x249e9(%rip), %rsi     # 0xac525
movq %rax, %rdi
callq 0x2ce10
leaq 0x1d7df(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x87b6e
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x9662f
leaq 0x19adf(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x35b55(%rip), %rsi     # 0xbd6d9
movq %rax, %rdi
callq 0x18b2e
leaq 0x1d797(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x87bbb
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x966df
leaq 0x307a7(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x130(%rsp), %rdi
callq 0xbf62
leaq 0x18(%rsp), %r15
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x87bf3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x10(%r15), %rax
leaq 0x130(%rsp), %rsi
movq %rax, 0x10(%rsi)
movups (%r15), %xmm0
movaps %xmm0, (%rsi)
xorl %edi, %edi
callq 0xd09f
movups 0x18(%rsp), %xmm0
movups %xmm0, 0xb8(%rsp)
movq 0x28(%rsp), %rax
movq %rax, %rcx
negq %rcx
jo 0x87c35
cmpq $0x1, %rax
jne 0x883df
movq 0x10(%rsp), %rax
movq %rax, 0xb0(%rsp)
movaps (%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x20(%rsp), %rax
xorl %ebx, %ebx
cmpq 0xc0(%rsp), %rax
jne 0x87c98
cmpq $0x1, 0x28(%rsp)
jne 0x87c98
movq (%rsp), %rax
cmpq 0xa0(%rsp), %rax
jne 0x87c96
movq 0x8(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jne 0x87c96
movq 0x10(%rsp), %rax
cmpq 0xb0(%rsp), %rax
sete %bl
jmp 0x87c98
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x35a29(%rip), %rsi     # 0xbd6d0
leaq 0x35a37(%rip), %rdx     # 0xbd6e5
callq 0xd0b8
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf0a
leaq 0x19985(%rip), %rsi     # 0xa1654
leaq 0x130(%rsp), %rdi
callq 0x18a16
leaq 0x24842(%rip), %rsi     # 0xac525
movq %rax, %rdi
callq 0x2ce10
leaq 0x1d638(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x87d15
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x9662f
leaq 0x19938(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x359ae(%rip), %rsi     # 0xbd6d9
movq %rax, %rdi
callq 0x18b2e
leaq 0x1d5f0(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x87d62
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x966df
leaq 0x30600(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x87d95
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x10(%r15), %rax
leaq 0x130(%rsp), %rsi
movq %rax, 0x10(%rsi)
movups (%r15), %xmm0
movaps %xmm0, (%rsi)
xorl %edi, %edi
callq 0xd09f
movaps (%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x110(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, 0x118(%rsp)
movq 0x28(%rsp), %rax
movq %rax, %rcx
negq %rcx
jo 0x87df0
cmpq $0x1, %rax
jne 0x883df
movq 0x20(%rsp), %rax
xorl %ebx, %ebx
cmpq 0x120(%rsp), %rax
jne 0x87e3a
cmpq $0x1, 0x28(%rsp)
jne 0x87e3a
movq (%rsp), %rax
cmpq 0x100(%rsp), %rax
jne 0x87e38
movq 0x8(%rsp), %rax
cmpq 0x108(%rsp), %rax
jne 0x87e38
movq 0x10(%rsp), %rax
cmpq 0x110(%rsp), %rax
sete %bl
jmp 0x87e3a
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x3589d(%rip), %rsi     # 0xbd6e6
leaq 0x358ac(%rip), %rdx     # 0xbd6fc
callq 0xd0b8
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf0a
leaq 0x197e3(%rip), %rsi     # 0xa1654
leaq 0x130(%rsp), %rdi
callq 0x18a16
leaq 0x246a0(%rip), %rsi     # 0xac525
movq %rax, %rdi
callq 0x2ce10
leaq 0x1d496(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x87eb7
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x9662f
leaq 0x19796(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x35822(%rip), %rsi     # 0xbd6ef
movq %rax, %rdi
callq 0x18b66
leaq 0x1d44e(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x87f04
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x100(%rsp), %rsi
callq 0x966df
leaq 0x3045e(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x87f37
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x10(%r15), %rax
leaq 0x130(%rsp), %rsi
movq %rax, 0x10(%rsi)
movups (%r15), %xmm0
movaps %xmm0, (%rsi)
xorl %edi, %edi
callq 0xd09f
movaps (%rsp), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0xe0(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, 0xe8(%rsp)
movq 0x28(%rsp), %rax
movq %rax, %rcx
negq %rcx
jo 0x87f92
cmpq $0x1, %rax
jne 0x883df
movq 0x20(%rsp), %rax
xorl %ebx, %ebx
cmpq 0xf0(%rsp), %rax
jne 0x87fdc
cmpq $0x1, 0x28(%rsp)
jne 0x87fdc
movq (%rsp), %rax
cmpq 0xd0(%rsp), %rax
jne 0x87fda
movq 0x8(%rsp), %rax
cmpq 0xd8(%rsp), %rax
jne 0x87fda
movq 0x10(%rsp), %rax
cmpq 0xe0(%rsp), %rax
sete %bl
jmp 0x87fdc
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x35712(%rip), %rsi     # 0xbd6fd
leaq 0x35721(%rip), %rdx     # 0xbd713
callq 0xd0b8
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf0a
leaq 0x19641(%rip), %rsi     # 0xa1654
leaq 0x130(%rsp), %rdi
callq 0x18a16
leaq 0x244fe(%rip), %rsi     # 0xac525
movq %rax, %rdi
callq 0x2ce10
leaq 0x1d2f4(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88059
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x9662f
leaq 0x195f4(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x35697(%rip), %rsi     # 0xbd706
movq %rax, %rdi
callq 0x18b66
leaq 0x1d2ac(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x880a6
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x966df
leaq 0x302bc(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x880d9
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x28(%rsp), %rbx
leaq 0x140(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x35623(%rip), %rsi     # 0xbd714
leaq 0x35640(%rip), %rdx     # 0xbd738
leaq 0x130(%rsp), %rdi
callq 0xd0b8
xorl %esi, %esi
cmpq $0x1, %rbx
sete %sil
leaq 0x458(%rsp), %rdi
leaq 0x130(%rsp), %rdx
callq 0xbf0a
leaq 0x458(%rsp), %rdi
callq 0xbf62
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x8814e
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x130(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x355d9(%rip), %rsi     # 0xbd739
leaq 0x355f8(%rip), %rdx     # 0xbd75f
callq 0xd0b8
leaq 0x2c8(%rsp), %rdi
leaq 0x130(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x2c8(%rsp), %rdi
callq 0xbf62
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x881b0
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x58(%rsp), %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8a050
movq (%rbx), %rbx
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3558d(%rip), %rsi     # 0xbd760
leaq 0x3559b(%rip), %rdx     # 0xbd775
leaq 0x38(%rsp), %rdi
callq 0xd0b8
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x130(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xbf0a
leaq 0x1944e(%rip), %rsi     # 0xa1654
leaq 0x130(%rsp), %rdi
callq 0x18a16
leaq 0x3555c(%rip), %rsi     # 0xbd776
movq %rax, %rdi
callq 0x18b9e
leaq 0x1d101(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8824e
movq 0x58(%rsp), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x21b0
leaq 0x193ff(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x1ac73(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x1d0b7(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88295
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x300cd(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x882c8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x60(%rsp), %rbx
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x354ab(%rip), %rsi     # 0xbd787
leaq 0x354bc(%rip), %rdx     # 0xbd79f
callq 0xd0b8
xorl %esi, %esi
cmpq $0x1, %rbx
sete %sil
leaq 0x130(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xbf0a
leaq 0x19349(%rip), %rsi     # 0xa1654
leaq 0x130(%rsp), %rdi
callq 0x18a16
leaq 0x35481(%rip), %rsi     # 0xbd7a0
movq %rax, %rdi
callq 0x19340
leaq 0x1cffc(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x88353
movq 0x60(%rsp), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x21b0
leaq 0x192fa(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x205f3(%rip), %rsi     # 0xa895c
movq %rax, %rdi
callq 0x18a16
leaq 0x1cfb2(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8839d
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x22f0
leaq 0x2ffc5(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x883d0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x5e8, %rsp            # imm = 0x5E8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x243f7(%rip), %rdi     # 0xac7dd
leaq 0x18d00(%rip), %rsi     # 0xa10ed
leaq 0x2441e(%rip), %rcx     # 0xac812
movl $0x1da, %edx            # imm = 0x1DA
callq 0x2100
jmp 0x8840c
jmp 0x8840c
jmp 0x8840c
jmp 0x8840c
jmp 0x8840c
jmp 0x8840c
jmp 0x8840c
movq %rax, %rbx
jmp 0x884e1
jmp 0x88451
jmp 0x88463
jmp 0x8841a
movq %rax, %rbx
jmp 0x88473
jmp 0x88421
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x884e1
movq 0x140(%rsp), %rsi
jmp 0x884d9
jmp 0x88448
jmp 0x88448
jmp 0x88448
movq %rax, %rbx
jmp 0x884ca
jmp 0x88451
jmp 0x88463
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbf62
jmp 0x88473
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x884e1
movq 0x48(%rsp), %rsi
jmp 0x884d9
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbf62
jmp 0x884ca
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbf62
jmp 0x884ca
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbf62
jmp 0x884ca
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbf62
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x884e1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc036