// File: dsharlet[P]array/test/shape.cpp
// Function: void nda::test_all_unknown_strides<1ul>()
void test_all_unknown_strides() {
  std::array<dim<>, rank> a;
  std::array<dim<>, rank> b;
  index_t stride = 1;
  for (size_t d = 0; d < rank; d++) {
    a[d] = dim<>(d);
    b[d] = a[d];
    b[d].set_stride(stride);
    stride *= std::max(static_cast<index_t>(1), a[d].extent());
  }
  shape_of_rank<rank> s_all_unknown(internal::array_to_tuple(a));
  shape_of_rank<rank> s_all_unknown_resolved(internal::array_to_tuple(b));
  s_all_unknown.resolve();
  s_all_unknown_resolved.resolve();
  ASSERT_EQ(s_all_unknown, s_all_unknown_resolved);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
leaq -0x38(%rbp), %rdi
callq 0x1942e0
leaq -0x50(%rbp), %rdi
callq 0x1942e0
movq $0x1, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
cmpq $0x1, -0x60(%rbp)
jae 0x1938f4
movq -0x60(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x10c20
movq -0x60(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x192d70
movq -0x78(%rbp), %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x192d70
movq %rax, -0x2b8(%rbp)
movq -0x60(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x192d70
movq -0x2b8(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x60(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x192d70
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rdi
callq 0x12bf0
movq $0x1, -0x80(%rbp)
movq -0x60(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x192d70
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x18a170
movq (%rax), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x1937ed
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x194330
movq -0x2e8(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x3bd50
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x194330
movq -0x2e0(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x3bd50
movq -0x2d8(%rbp), %rdi
callq 0x47d10
movq -0x2d0(%rbp), %rdi
callq 0x47d10
movq -0x2d8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0x48860
movb %al, -0x2c1(%rbp)
leaq -0x299(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x33b0
movq -0x2c0(%rbp), %rdx
leaq 0x68a72(%rip), %rsi     # 0x1fc41a
leaq -0x298(%rbp), %rdi
callq 0x10a90
jmp 0x1939b6
movb -0x2c1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x278(%rbp), %rdi
leaq -0x298(%rbp), %rdx
callq 0x10f80
jmp 0x1939d7
leaq 0x48e07(%rip), %rsi     # 0x1dc7e5
leaq -0x278(%rbp), %rdi
callq 0x34320
movq %rax, -0x2f0(%rbp)
jmp 0x1939f3
movq -0x2f0(%rbp), %rdi
leaq 0x68a41(%rip), %rsi     # 0x1fc442
callq 0x347a0
movq %rax, -0x2f8(%rbp)
jmp 0x193a0f
movq -0x2f8(%rbp), %rdi
leaq 0x4cd8f(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x300(%rbp)
jmp 0x193a2b
movq -0x300(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x194360
movq %rax, -0x308(%rbp)
jmp 0x193a47
movq -0x308(%rbp), %rdi
leaq 0x48d90(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0x310(%rbp)
jmp 0x193a63
movq -0x310(%rbp), %rdi
leaq 0x689ba(%rip), %rsi     # 0x1fc42b
callq 0x35a60
movq %rax, -0x318(%rbp)
jmp 0x193a7f
movq -0x318(%rbp), %rdi
leaq 0x4cd1f(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x320(%rbp)
jmp 0x193a9b
movq -0x320(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x194360
movq %rax, -0x328(%rbp)
jmp 0x193ab7
movq -0x328(%rbp), %rdi
leaq 0x629b6(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x193acc
leaq -0x278(%rbp), %rdi
callq 0x10ff0
jmp 0x193ada
leaq -0x298(%rbp), %rdi
callq 0x3100
leaq -0x299(%rbp), %rdi
callq 0x3290
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a8(%rbp)
movl %eax, -0x2ac(%rbp)
jmp 0x193b51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a8(%rbp)
movl %eax, -0x2ac(%rbp)
jmp 0x193b45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2a8(%rbp)
movl %eax, -0x2ac(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x10ff0
jmp 0x193b43
jmp 0x193b45
leaq -0x298(%rbp), %rdi
callq 0x3100
leaq -0x299(%rbp), %rdi
callq 0x3290
movq -0x2a8(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)