// File: /workspace/github_cpp_makefile_star2_O1/dsharlet[P]array/test/shape.cpp
// Function: nda::test_for_all_indices_1d_body()
TEST(for_all_indices_1d) {
  dense_shape<1> s(20);
  int expected_flat_offset = 0;
  for_all_indices(s, [&](int x) {
    ASSERT_EQ(s(x), expected_flat_offset);
    expected_flat_offset++;
  });
  // Ensure the for_all_indices loop above actually ran.
  ASSERT_EQ(expected_flat_offset, 20);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
leaq 0x28(%rsp), %rbx
movq $0x0, (%rbx)
movq $0x14, 0x8(%rbx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rbx)
xorl %r14d, %r14d
xorl %edi, %edi
movq %rbx, %rsi
callq 0xd09f
movq %rsp, %r15
leaq 0x1d0b6(%rip), %r13     # 0xa1654
leaq 0x20d85(%rip), %r12     # 0xa532a
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x1c, 0x20(%rsp)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x2310
movq %rax, (%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movups 0x39f5e(%rip), %xmm0    # 0xbe539
movups %xmm0, 0xc(%rax)
movups 0x39f47(%rip), %xmm0    # 0xbe52d
movups %xmm0, (%rax)
movq %rcx, 0x8(%rsp)
movq (%rsp), %rax
movb $0x0, (%rax,%rcx)
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0xbf0a
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18a16
movq %rax, %rdi
leaq 0x39f2f(%rip), %rsi     # 0xbe54a
callq 0x18a4e
movq %rax, %rdi
movq %r12, %rsi
callq 0x18a16
movq %rax, %rbp
cmpb $0x1, 0x188(%rax)
jne 0x84646
movq %rbp, %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x21b0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x18a16
movq %rax, %rdi
leaq 0x39fbd(%rip), %rsi     # 0xbe618
callq 0x4a210
movq %rax, %rdi
movq %r12, %rsi
callq 0x18a16
movq %rax, %rbp
cmpb $0x1, 0x188(%rax)
jne 0x84686
movq %rbp, %rdi
addq $0x10, %rdi
movl %r14d, %esi
callq 0x22f0
movq %rbp, %rdi
leaq 0x33cd9(%rip), %rsi     # 0xb8369
callq 0x18a16
movq %rbx, %rdi
callq 0xbf62
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x846b8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
incq %r14
cmpq $0x14, %r14
jne 0x845a5
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x38c74(%rip), %rsi     # 0xbd34b
leaq 0x38c87(%rip), %rdx     # 0xbd365
callq 0xd0b8
leaq 0x28(%rsp), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x1cf58(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x39f0b(%rip), %rsi     # 0xbe618
movq %rax, %rdi
callq 0x4a210
leaq 0x20c0e(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x84741
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x14, %esi
callq 0x22f0
leaq 0x1cf0c(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x1ead4(%rip), %rsi     # 0xa322b
movq %rax, %rdi
callq 0x18bd6
leaq 0x20bc4(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x8478b
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x14, %esi
callq 0x22f0
leaq 0x33bd7(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x847bf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x8481a
jmp 0x847da
jmp 0x847eb
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x847ff
jmp 0x84822
movq %rax, %rbx
jmp 0x847ff
jmp 0x847f2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8481a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc036