// File: /workspace/github_cpp_makefile_star2_O3/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 0xd133
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 0x89ac6
cmpq $0x5, 0x8(%rsp)
jne 0x89ac6
cmpq %r14, 0x10(%rsp)
sete %bl
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3575a(%rip), %rsi     # 0xbf230
leaq 0x35768(%rip), %rdx     # 0xbf245
leaq 0x58(%rsp), %rdi
callq 0xd14c
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf80
leaq 0x19b81(%rip), %rsi     # 0xa3684
leaq 0x130(%rsp), %rdi
callq 0x18fba
leaq 0x24846(%rip), %rsi     # 0xae35d
movq %rax, %rdi
callq 0x2d7d8
leaq 0x1d730(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89b49
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x98203
leaq 0x19b34(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x356da(%rip), %rsi     # 0xbf239
movq %rax, %rdi
callq 0x190d2
leaq 0x1d6e8(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89b96
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x982b3
leaq 0x306fc(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x130(%rsp), %rdi
callq 0xbfd8
leaq 0x18(%rsp), %r15
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x89bce
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 0xd133
movups 0x18(%rsp), %xmm0
movups %xmm0, 0xb8(%rsp)
movq 0x28(%rsp), %rax
movq %rax, %rcx
negq %rcx
jo 0x89c10
cmpq $0x1, %rax
jne 0x8a381
movq 0x10(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movaps (%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
cmpq $0x1, %rax
jne 0x89c5e
movq (%rsp), %rax
cmpq 0xa0(%rsp), %rax
jne 0x89c5e
movq 0x8(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jne 0x89c5e
movq 0x10(%rsp), %rax
cmpq 0xb0(%rsp), %rax
sete %bl
jmp 0x89c60
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x355c1(%rip), %rsi     # 0xbf230
leaq 0x355cf(%rip), %rdx     # 0xbf245
callq 0xd14c
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf80
leaq 0x199ed(%rip), %rsi     # 0xa3684
leaq 0x130(%rsp), %rdi
callq 0x18fba
leaq 0x246b2(%rip), %rsi     # 0xae35d
movq %rax, %rdi
callq 0x2d7d8
leaq 0x1d59c(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89cdd
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x98203
leaq 0x199a0(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x35546(%rip), %rsi     # 0xbf239
movq %rax, %rdi
callq 0x190d2
leaq 0x1d554(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89d2a
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x982b3
leaq 0x30568(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x89d5d
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 0xd133
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 0x89db8
cmpq $0x1, %rax
jne 0x8a381
cmpq $0x1, %rax
jne 0x89ded
movq (%rsp), %rax
cmpq 0x100(%rsp), %rax
jne 0x89ded
movq 0x8(%rsp), %rax
cmpq 0x108(%rsp), %rax
jne 0x89ded
movq 0x10(%rsp), %rax
cmpq 0x110(%rsp), %rax
sete %bl
jmp 0x89def
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x35448(%rip), %rsi     # 0xbf246
leaq 0x35457(%rip), %rdx     # 0xbf25c
callq 0xd14c
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf80
leaq 0x1985e(%rip), %rsi     # 0xa3684
leaq 0x130(%rsp), %rdi
callq 0x18fba
leaq 0x24523(%rip), %rsi     # 0xae35d
movq %rax, %rdi
callq 0x2d7d8
leaq 0x1d40d(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89e6c
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x98203
leaq 0x19811(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x353cd(%rip), %rsi     # 0xbf24f
movq %rax, %rdi
callq 0x1910a
leaq 0x1d3c5(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89eb9
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x100(%rsp), %rsi
callq 0x982b3
leaq 0x303d9(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x89eec
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 0xd133
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 0x89f47
cmpq $0x1, %rax
jne 0x8a381
cmpq $0x1, %rax
jne 0x89f7c
movq (%rsp), %rax
cmpq 0xd0(%rsp), %rax
jne 0x89f7c
movq 0x8(%rsp), %rax
cmpq 0xd8(%rsp), %rax
jne 0x89f7c
movq 0x10(%rsp), %rax
cmpq 0xe0(%rsp), %rax
sete %bl
jmp 0x89f7e
xorl %ebx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x352d0(%rip), %rsi     # 0xbf25d
leaq 0x352df(%rip), %rdx     # 0xbf273
callq 0xd14c
movzbl %bl, %esi
leaq 0x130(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xbf80
leaq 0x196cf(%rip), %rsi     # 0xa3684
leaq 0x130(%rsp), %rdi
callq 0x18fba
leaq 0x24394(%rip), %rsi     # 0xae35d
movq %rax, %rdi
callq 0x2d7d8
leaq 0x1d27e(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x89ffb
movq %rbx, %rdi
addq $0x10, %rdi
movq %rsp, %rsi
callq 0x98203
leaq 0x19682(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x35255(%rip), %rsi     # 0xbf266
movq %rax, %rdi
callq 0x1910a
leaq 0x1d236(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a048
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x982b3
leaq 0x3024a(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a07b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x28(%rsp), %rbx
leaq 0x140(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x351e1(%rip), %rsi     # 0xbf274
leaq 0x351fe(%rip), %rdx     # 0xbf298
leaq 0x130(%rsp), %rdi
callq 0xd14c
xorl %esi, %esi
cmpq $0x1, %rbx
sete %sil
leaq 0x458(%rsp), %rdi
leaq 0x130(%rsp), %rdx
callq 0xbf80
leaq 0x458(%rsp), %rdi
callq 0xbfd8
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a0f0
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x130(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x35197(%rip), %rsi     # 0xbf299
leaq 0x351b6(%rip), %rdx     # 0xbf2bf
callq 0xd14c
leaq 0x2c8(%rsp), %rdi
leaq 0x130(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x2c8(%rsp), %rdi
callq 0xbfd8
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a152
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x58(%rsp), %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8bff2
movq (%rbx), %rbx
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3514b(%rip), %rsi     # 0xbf2c0
leaq 0x35159(%rip), %rdx     # 0xbf2d5
leaq 0x38(%rsp), %rdi
callq 0xd14c
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x130(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xbf80
leaq 0x194dc(%rip), %rsi     # 0xa3684
leaq 0x130(%rsp), %rdi
callq 0x18fba
leaq 0x3511a(%rip), %rsi     # 0xbf2d6
movq %rax, %rdi
callq 0x19142
leaq 0x1d08b(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a1f0
movq 0x58(%rsp), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x21b0
leaq 0x1948d(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x1ad19(%rip), %rsi     # 0xa4f1f
movq %rax, %rdi
callq 0x18fba
leaq 0x1d041(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a237
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x3005b(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a26a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x60(%rsp), %rbx
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x35069(%rip), %rsi     # 0xbf2e7
leaq 0x3507a(%rip), %rdx     # 0xbf2ff
callq 0xd14c
xorl %esi, %esi
cmpq $0x1, %rbx
sete %sil
leaq 0x130(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0xbf80
leaq 0x193d7(%rip), %rsi     # 0xa3684
leaq 0x130(%rsp), %rdi
callq 0x18fba
leaq 0x3503f(%rip), %rsi     # 0xbf300
movq %rax, %rdi
callq 0x1990c
leaq 0x1cf86(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a2f5
movq 0x60(%rsp), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x21b0
leaq 0x19388(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x20461(%rip), %rsi     # 0xaa76c
movq %rax, %rdi
callq 0x18fba
leaq 0x1cf3c(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8a33f
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x22f0
leaq 0x2ff53(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a372
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x5e8, %rsp            # imm = 0x5E8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2428d(%rip), %rdi     # 0xae615
leaq 0x18d8e(%rip), %rsi     # 0xa311d
leaq 0x242b4(%rip), %rcx     # 0xae64a
movl $0x1da, %edx            # imm = 0x1DA
callq 0x2100
jmp 0x8a3ae
jmp 0x8a3ae
jmp 0x8a3ae
jmp 0x8a3ae
jmp 0x8a3ae
jmp 0x8a3ae
jmp 0x8a3ae
movq %rax, %rbx
jmp 0x8a483
jmp 0x8a3f3
jmp 0x8a405
jmp 0x8a3bc
movq %rax, %rbx
jmp 0x8a415
jmp 0x8a3c3
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a483
movq 0x140(%rsp), %rsi
jmp 0x8a47b
jmp 0x8a3ea
jmp 0x8a3ea
jmp 0x8a3ea
movq %rax, %rbx
jmp 0x8a46c
jmp 0x8a3f3
jmp 0x8a405
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbfd8
jmp 0x8a415
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a483
movq 0x48(%rsp), %rsi
jmp 0x8a47b
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbfd8
jmp 0x8a46c
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbfd8
jmp 0x8a46c
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbfd8
jmp 0x8a46c
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0xbfd8
movq 0x58(%rsp), %rdi
cmpq %r14, %rdi
je 0x8a483
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc0a9