// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x5f8, %rsp            # imm = 0x5F8
leaq 0x118(%rsp), %rsi
andq $0x0, (%rsi)
movq $0xa, 0x8(%rsi)
pushq $0x1
popq %r14
leaq 0x10(%rsp), %rdx
movq %r14, (%rdx)
movq $0x5, 0x8(%rdx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rdx)
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1091e
movq 0x10(%rbx), %rax
leaq 0x80(%rsp), %rdi
movq %rax, 0x10(%rdi)
movups (%rbx), %xmm0
movaps %xmm0, (%rdi)
movups 0x18(%rbx), %xmm0
movups %xmm0, 0x18(%rdi)
movq %r14, 0x28(%rdi)
movq %rbx, %rsi
callq 0x828ac
movl %eax, %ebx
leaq 0x355cc(%rip), %rsi     # 0xaa95b
leaq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x1828a(%rip), %rsi     # 0x8d647
leaq 0x118(%rsp), %rdi
callq 0x106fe
leaq 0x234fc(%rip), %rsi     # 0x988cd
movq %rax, %rdi
callq 0x223dc
leaq 0x1c212(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x771be
leaq 0x18248(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x35556(%rip), %rsi     # 0xaa964
movq %rax, %rdi
callq 0x1082e
leaq 0x1c1d5(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xe8(%rsp), %rsi
movq %rax, %rdi
callq 0x771da
leaq 0x2fe66(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0xe8(%rsp), %rbx
leaq 0x80(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x771f6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x828ac
movl %eax, %ebx
leaq 0x354d1(%rip), %rsi     # 0xaa95b
leaq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x1818f(%rip), %rsi     # 0x8d647
leaq 0x118(%rsp), %rdi
callq 0x106fe
leaq 0x23401(%rip), %rsi     # 0x988cd
movq %rax, %rdi
callq 0x223dc
leaq 0x1c117(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x771be
leaq 0x1814d(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x3545b(%rip), %rsi     # 0xaa964
movq %rax, %rdi
callq 0x1082e
leaq 0x1c0da(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xe8(%rsp), %rsi
movq %rax, %rdi
callq 0x771da
leaq 0x2fd6b(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0xb8(%rsp), %rbx
leaq 0x80(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7721e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x828ac
movl %eax, %ebx
leaq 0x353ec(%rip), %rsi     # 0xaa971
leaq 0x10(%rsp), %rdi
leaq 0x2a8(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x18094(%rip), %rsi     # 0x8d647
leaq 0x118(%rsp), %rdi
callq 0x106fe
leaq 0x23306(%rip), %rsi     # 0x988cd
movq %rax, %rdi
callq 0x223dc
leaq 0x1c01c(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x771be
leaq 0x18052(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x35376(%rip), %rsi     # 0xaa97a
movq %rax, %rdi
callq 0x1085e
leaq 0x1bfdf(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xb8(%rsp), %rsi
movq %rax, %rdi
callq 0x771da
leaq 0x2fc70(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0x2a8(%rsp), %rbx
leaq 0x80(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7721e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x828ac
movl %eax, %ebx
leaq 0x35308(%rip), %rsi     # 0xaa988
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x17f9c(%rip), %rsi     # 0x8d647
leaq 0x118(%rsp), %rdi
callq 0x106fe
leaq 0x2320e(%rip), %rsi     # 0x988cd
movq %rax, %rdi
callq 0x223dc
leaq 0x1bf24(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x80(%rsp), %rsi
movq %rax, %rdi
callq 0x771be
leaq 0x17f5a(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x35295(%rip), %rsi     # 0xaa991
movq %rax, %rdi
callq 0x1085e
leaq 0x1bee7(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x2a8(%rsp), %rsi
movq %rax, %rdi
callq 0x771da
leaq 0x2fb78(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
movq 0xa8(%rsp), %rbx
leaq 0x35247(%rip), %rsi     # 0xaa99f
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x1, %rbx
sete %sil
leaq 0x468(%rsp), %rdi
leaq 0x118(%rsp), %rdx
callq 0x6894
leaq 0x468(%rsp), %rdi
callq 0x68d4
leaq 0x118(%rsp), %rdi
callq 0x2090
leaq 0x3521a(%rip), %rsi     # 0xaa9c4
leaq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x66a0
leaq 0x2d8(%rsp), %rdi
pushq $0x1
popq %rsi
leaq 0x118(%rsp), %rdx
callq 0x6894
leaq 0x2d8(%rsp), %rdi
callq 0x68d4
leaq 0x118(%rsp), %rdi
callq 0x2090
leaq 0x10(%rsp), %rbx
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x77242
movq (%rbx), %rbx
leaq 0x351de(%rip), %rsi     # 0xaa9eb
leaq 0x58(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x118(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x6894
leaq 0x17e09(%rip), %rsi     # 0x8d647
leaq 0x118(%rsp), %rdi
callq 0x106fe
leaq 0x351af(%rip), %rsi     # 0xaaa01
movq %rax, %rdi
callq 0x1087a
leaq 0x1bd91(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x10(%rsp), %rcx
leaq 0x78(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17dc2(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x1995c(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x1bd4f(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f9e0(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x58(%rsp), %rdi
callq 0x2090
movq 0x18(%rsp), %rbx
leaq 0x35125(%rip), %rsi     # 0xaaa12
leaq 0x58(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpq $0x1, %rbx
sete %sil
leaq 0x118(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x6894
leaq 0x17d28(%rip), %rsi     # 0x8d647
leaq 0x118(%rsp), %rdi
callq 0x106fe
leaq 0x350f8(%rip), %rsi     # 0xaaa2b
movq %rax, %rdi
callq 0x11036
leaq 0x1bcb0(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x18(%rsp), %rcx
leaq 0x78(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x107ba
leaq 0x17ce1(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x1f387(%rip), %rsi     # 0x94cfc
movq %rax, %rdi
callq 0x106fe
leaq 0x1bc6e(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc(%rsp), %rsi
movl $0x1, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x2f8fc(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x58(%rsp), %rdi
callq 0x2090
addq $0x5f8, %rsp            # imm = 0x5F8
popq %rbx
popq %r14
retq
jmp 0x759de
jmp 0x759de
jmp 0x759de
jmp 0x759de
jmp 0x759de
jmp 0x759de
jmp 0x759de
movq %rax, %rbx
jmp 0x75a8b
jmp 0x75a12
jmp 0x759ec
jmp 0x75a24
movq %rax, %rbx
jmp 0x75a34
jmp 0x759f3
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0x75a86
jmp 0x75a09
jmp 0x75a09
jmp 0x75a09
movq %rax, %rbx
jmp 0x75a81
jmp 0x75a12
jmp 0x75a24
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x68d4
jmp 0x75a34
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x58(%rsp), %rdi
jmp 0x75a86
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x68d4
jmp 0x75a81
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x68d4
jmp 0x75a81
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x68d4
jmp 0x75a81
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba