// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/shape.cpp
// Function: nda::test_auto_strides_body()
TEST(auto_strides) {
  check_resolved_strides<1>({{3, 5, unresolved}}, {1});
  check_resolved_strides<2>({5, 10}, {1, 5});

  // Stride one dimensions mixed in with extent 1 dimensions.
  check_resolved_strides<3>({1, 1, {0, 2, 1}}, {2, 2, 1});
  check_resolved_strides<3>({1, {0, 2, 1}, 1}, {2, 1, 2});
  check_resolved_strides<3>({1, 10, {0, 2, 1}}, {2, 2, 1});
  check_resolved_strides<3>({5, {0, 2, 1}, 1}, {2, 1, 10});

  // Interleaved with row stride.
  check_resolved_strides<3>({5, {0, 4, 20}, {0, 3, 1}}, {3, 20, 1});

  // Interleaved with row stride dense.
  check_resolved_strides<3>({5, {0, 4, 15}, {0, 3, 1}}, {3, 15, 1});

  // Interleaved with row stride oops.
  check_resolved_strides<3>({5, {0, 4, 14}, {0, 3, 1}}, {56, 14, 1});

  test_auto_strides<1>();
  test_auto_strides<2>();
  test_auto_strides<3>();
  test_auto_strides<4>();
  test_auto_strides<5>();
  test_auto_strides<6>();
  test_auto_strides<7>();
  test_auto_strides<8>();
  test_auto_strides<9>();
  test_auto_strides<10>();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
movq $0x3, 0x40(%rsp)
movq $0x5, 0x48(%rsp)
movq %r15, 0x50(%rsp)
leaq 0x20(%rsp), %rsi
movq $0x1, (%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rbx
leaq 0x7(%rsp), %rcx
movq %rbx, %rdx
callq 0x76d5c
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76bbb
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x58(%rsp)
movq $0xa, 0x60(%rsp)
movq %r15, 0x68(%rsp)
andq $0x0, 0x70(%rsp)
pushq $0x5
popq %rax
movq %rax, 0x78(%rsp)
movq %r15, 0x80(%rsp)
leaq 0x20(%rsp), %rsi
movq $0x1, (%rsi)
movq %rax, 0x8(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %r14
leaq 0x7(%rsp), %rcx
movq %r14, %rdx
callq 0x76d5c
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76d92
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x238(%rsp)
movq $0x2, 0x240(%rsp)
movq %rbx, 0x248(%rsp)
andq $0x0, 0x250(%rsp)
movq %rbx, 0x258(%rsp)
movq %r15, 0x260(%rsp)
andq $0x0, 0x268(%rsp)
movq %rbx, 0x270(%rsp)
movq %r15, 0x278(%rsp)
movups 0x3a4c8(%rip), %xmm0    # 0xab9e8
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0x238(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x1f0(%rsp)
movq %rbx, 0x1f8(%rsp)
movq %r15, 0x200(%rsp)
andq $0x0, 0x208(%rsp)
movq %r14, 0x210(%rsp)
movq %rbx, 0x218(%rsp)
andq $0x0, 0x220(%rsp)
movq %rbx, 0x228(%rsp)
movq %r15, 0x230(%rsp)
movups 0x3a424(%rip), %xmm0    # 0xab9d0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %r14, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0x1f0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x1a8(%rsp)
movq $0x2, 0x1b0(%rsp)
movq %rbx, 0x1b8(%rsp)
andq $0x0, 0x1c0(%rsp)
movq $0xa, 0x1c8(%rsp)
movq %r15, 0x1d0(%rsp)
andq $0x0, 0x1d8(%rsp)
movq %rbx, 0x1e0(%rsp)
movq %r15, 0x1e8(%rsp)
leaq 0x20(%rsp), %rsi
movups 0x3a3a3(%rip), %xmm0    # 0xab9e8
movaps %xmm0, (%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0x1a8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x160(%rsp)
movq %rbx, 0x168(%rsp)
movq %r15, 0x170(%rsp)
andq $0x0, 0x178(%rsp)
movq $0x2, 0x180(%rsp)
movq %rbx, 0x188(%rsp)
andq $0x0, 0x190(%rsp)
movq $0x5, 0x198(%rsp)
movq %r15, 0x1a0(%rsp)
movups 0x3a32c(%rip), %xmm0    # 0xaba00
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0xa, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0x160(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x118(%rsp)
movq $0x3, 0x120(%rsp)
movq %rbx, 0x128(%rsp)
andq $0x0, 0x130(%rsp)
movq $0x4, 0x138(%rsp)
movq $0x14, 0x140(%rsp)
andq $0x0, 0x148(%rsp)
movq $0x5, 0x150(%rsp)
movq %r15, 0x158(%rsp)
movups 0x3a2a4(%rip), %xmm0    # 0xaba18
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0x118(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0xd0(%rsp)
movq $0x3, 0xd8(%rsp)
movq %rbx, 0xe0(%rsp)
andq $0x0, 0xe8(%rsp)
movq $0x4, 0xf0(%rsp)
movq $0xf, 0xf8(%rsp)
andq $0x0, 0x100(%rsp)
movq $0x5, 0x108(%rsp)
movq %r15, 0x110(%rsp)
movups 0x3a220(%rip), %xmm0    # 0xaba30
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0xd0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
andq $0x0, 0x88(%rsp)
movq $0x3, 0x90(%rsp)
movq %rbx, 0x98(%rsp)
andq $0x0, 0xa0(%rsp)
movq $0x4, 0xa8(%rsp)
movq $0xe, 0xb0(%rsp)
andq $0x0, 0xb8(%rsp)
movq $0x5, 0xc0(%rsp)
movq %r15, 0xc8(%rsp)
movups 0x3a19c(%rip), %xmm0    # 0xaba48
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x76d5c
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x76f33
leaq 0x8(%rsp), %rdi
callq 0x78886
callq 0x770d4
callq 0x770e0
callq 0x770ec
callq 0x770f8
callq 0x77104
callq 0x77110
callq 0x7711c
callq 0x77128
callq 0x77134
callq 0x77140
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r14
popq %r15
retq
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
jmp 0x71945
jmp 0x71954
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x78886
jmp 0x71957
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22f0