// File: dsharlet[P]array/test/shape.cpp
// Function: void nda::test_one_dense_stride<1ul>()
void test_one_dense_stride() {
  for (size_t known = 0; known < rank; known++) {
    std::array<dim<>, rank> a;
    for (size_t d = 0; d < rank; d++) {
      a[d] = dim<>(d + 1);
      if (d == known) {
        // This is the dimension we know.
        a[d].set_stride(1);
      }
    }
    shape_of_rank<rank> s_one_dense(internal::array_to_tuple(a));
    s_one_dense.resolve();
    ASSERT_EQ(s_one_dense.size(), factorial(rank));
    ASSERT_EQ(s_one_dense.dim(known).stride(), 1);
    ASSERT(s_one_dense.is_compact());
    ASSERT(s_one_dense.is_one_to_one());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8d0, %rsp            # imm = 0x8D0
movq $0x0, -0x38(%rbp)
cmpq $0x1, -0x38(%rbp)
jae 0x1942b9
leaq -0x50(%rbp), %rdi
callq 0x1942e0
movq $0x0, -0x58(%rbp)
cmpq $0x1, -0x58(%rbp)
jae 0x193c2f
movq -0x58(%rbp), %rsi
addq $0x1, %rsi
leaq -0x70(%rbp), %rdi
callq 0x10c20
movq -0x58(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x192d70
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x193c1f
movq -0x58(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x192d70
movq %rax, -0x18(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x10, %rdi
callq 0x12bf0
jmp 0x193c21
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x193baf
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x808(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x194330
movq -0x808(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x800(%rbp)
callq 0x3bd50
movq -0x800(%rbp), %rdi
callq 0x47d10
movq -0x800(%rbp), %rdi
callq 0x48050
movq %rax, -0x7f8(%rbp)
movl $0x1, %edi
callq 0x17cb50
movq %rax, %rcx
movq -0x7f8(%rbp), %rax
subq %rcx, %rax
sete %al
movb %al, -0x7e9(%rbp)
leaq -0x251(%rbp), %rdi
movq %rdi, -0x7e8(%rbp)
callq 0x33b0
movq -0x7e8(%rbp), %rdx
leaq 0x68790(%rip), %rsi     # 0x1fc450
leaq -0x250(%rbp), %rdi
callq 0x10a90
jmp 0x193cce
movb -0x7e9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rdx
callq 0x10f80
jmp 0x193cef
leaq 0x48aef(%rip), %rsi     # 0x1dc7e5
leaq -0x230(%rbp), %rdi
callq 0x34320
movq %rax, -0x810(%rbp)
jmp 0x193d0b
movq -0x810(%rbp), %rdi
leaq 0x6875d(%rip), %rsi     # 0x1fc476
callq 0x34b60
movq %rax, -0x818(%rbp)
jmp 0x193d27
movq -0x818(%rbp), %rdi
leaq 0x4ca77(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x820(%rbp)
jmp 0x193d43
leaq -0x88(%rbp), %rdi
callq 0x48050
movq %rax, -0x828(%rbp)
jmp 0x193d58
movq -0x820(%rbp), %rdi
movq -0x828(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x270(%rbp), %rsi
callq 0x355c0
movq %rax, -0x830(%rbp)
jmp 0x193d82
movq -0x830(%rbp), %rdi
leaq 0x48a55(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0x838(%rbp)
jmp 0x193d9e
movq -0x838(%rbp), %rdi
leaq 0x686ba(%rip), %rsi     # 0x1fc466
callq 0x969a0
movq %rax, -0x840(%rbp)
jmp 0x193dba
movq -0x840(%rbp), %rdi
leaq 0x4c9e4(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x848(%rbp)
jmp 0x193dd6
movl $0x1, %edi
callq 0x17cb50
movq %rax, -0x850(%rbp)
jmp 0x193de9
movq -0x848(%rbp), %rdi
movq -0x850(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x278(%rbp), %rsi
callq 0x355c0
movq %rax, -0x858(%rbp)
jmp 0x193e13
movq -0x858(%rbp), %rdi
leaq 0x6265a(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x193e28
leaq -0x230(%rbp), %rdi
callq 0x10ff0
jmp 0x193e36
leaq -0x250(%rbp), %rdi
callq 0x3100
leaq -0x251(%rbp), %rdi
callq 0x3290
movq -0x38(%rbp), %rdx
leaq -0x420(%rbp), %rdi
movq %rdi, -0x870(%rbp)
leaq -0x88(%rbp), %rsi
callq 0x192c70
movq -0x870(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
sete %al
movb %al, -0x861(%rbp)
leaq -0x441(%rbp), %rdi
movq %rdi, -0x860(%rbp)
callq 0x33b0
movq -0x860(%rbp), %rdx
leaq 0x685d1(%rip), %rsi     # 0x1fc489
leaq -0x440(%rbp), %rdi
callq 0x10a90
jmp 0x193ec6
movb -0x861(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x408(%rbp), %rdi
leaq -0x440(%rbp), %rdx
callq 0x10f80
jmp 0x193ee7
leaq 0x488f7(%rip), %rsi     # 0x1dc7e5
leaq -0x408(%rbp), %rdi
callq 0x34320
movq %rax, -0x878(%rbp)
jmp 0x193f03
movq -0x878(%rbp), %rdi
leaq 0x6859d(%rip), %rsi     # 0x1fc4ae
callq 0x10c350
movq %rax, -0x880(%rbp)
jmp 0x193f1f
movq -0x880(%rbp), %rdi
leaq 0x4c87f(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x888(%rbp)
jmp 0x193f3b
movq -0x38(%rbp), %rdx
leaq -0x468(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x192c70
jmp 0x193f54
movq -0x888(%rbp), %rdi
leaq -0x468(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x450(%rbp)
leaq -0x450(%rbp), %rsi
callq 0x34510
movq %rax, -0x890(%rbp)
jmp 0x193f95
movq -0x890(%rbp), %rdi
leaq 0x48842(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0x898(%rbp)
jmp 0x193fb1
movq -0x898(%rbp), %rdi
leaq 0x500ae(%rip), %rsi     # 0x1e406d
callq 0x34320
movq %rax, -0x8a0(%rbp)
jmp 0x193fcd
movq -0x8a0(%rbp), %rdi
leaq 0x4c7d1(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x8a8(%rbp)
jmp 0x193fe9
movq -0x8a8(%rbp), %rdi
movl $0x1, -0x46c(%rbp)
leaq -0x46c(%rbp), %rsi
callq 0x343a0
movq %rax, -0x8b0(%rbp)
jmp 0x19400f
movq -0x8b0(%rbp), %rdi
leaq 0x6245e(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x194024
leaq -0x408(%rbp), %rdi
callq 0x10ff0
jmp 0x194032
leaq -0x440(%rbp), %rdi
callq 0x3100
leaq -0x441(%rbp), %rdi
callq 0x3290
leaq -0x88(%rbp), %rdi
callq 0x194510
movb %al, -0x8b9(%rbp)
leaq -0x621(%rbp), %rdi
movq %rdi, -0x8b8(%rbp)
callq 0x33b0
movq -0x8b8(%rbp), %rdx
leaq 0x68451(%rip), %rsi     # 0x1fc4ce
leaq -0x620(%rbp), %rdi
callq 0x10a90
jmp 0x19408b
movb -0x8b9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x600(%rbp), %rdi
leaq -0x620(%rbp), %rdx
callq 0x10f80
jmp 0x1940ac
leaq -0x600(%rbp), %rdi
callq 0x10ff0
jmp 0x1940ba
leaq -0x620(%rbp), %rdi
callq 0x3100
leaq -0x621(%rbp), %rdi
callq 0x3290
leaq -0x88(%rbp), %rdi
callq 0x194550
movb %al, -0x8c9(%rbp)
leaq -0x7d9(%rbp), %rdi
movq %rdi, -0x8c8(%rbp)
callq 0x33b0
movq -0x8c8(%rbp), %rdx
leaq 0x683e2(%rip), %rsi     # 0x1fc4e7
leaq -0x7d8(%rbp), %rdi
callq 0x10a90
jmp 0x194113
movb -0x8c9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x7b8(%rbp), %rdi
leaq -0x7d8(%rbp), %rdx
callq 0x10f80
jmp 0x194134
leaq -0x7b8(%rbp), %rdi
callq 0x10ff0
jmp 0x194142
leaq -0x7d8(%rbp), %rdi
callq 0x3100
leaq -0x7d9(%rbp), %rdi
callq 0x3290
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x193b93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0x1941c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0x1941b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x10ff0
jmp 0x1941b3
jmp 0x1941b5
leaq -0x250(%rbp), %rdi
callq 0x3100
leaq -0x251(%rbp), %rdi
callq 0x3290
jmp 0x1942c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0x194228
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0x19421c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x10ff0
jmp 0x19421a
jmp 0x19421c
leaq -0x440(%rbp), %rdi
callq 0x3100
leaq -0x441(%rbp), %rdi
callq 0x3290
jmp 0x1942c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0x19426b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
leaq -0x620(%rbp), %rdi
callq 0x3100
leaq -0x621(%rbp), %rdi
callq 0x3290
jmp 0x1942c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
jmp 0x1942ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x260(%rbp)
movl %eax, -0x264(%rbp)
leaq -0x7d8(%rbp), %rdi
callq 0x3100
leaq -0x7d9(%rbp), %rdi
callq 0x3290
jmp 0x1942c2
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbp
retq
movq -0x260(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopw %cs:(%rax,%rax)