// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1e8, %rsp            # imm = 0x1E8
leaq 0x40(%rsp), %r14
pushq $0x14
popq %rsi
movq %r14, %rdi
callq 0x106be
leaq 0x4(%rsp), %rax
andl $0x0, (%rax)
movq (%r14), %rbx
movq 0x8(%r14), %rax
shlq $0x20, %rbx
xorl %r14d, %r14d
leaq 0x58(%rsp), %rbp
leaq 0x1ad1f(%rip), %r12     # 0x8d647
subq $0x1, %rax
jb 0x72a37
movq %rax, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
sarq $0x20, %rbx
movq %rbx, %r15
subq 0x40(%rsp), %r15
leaq 0x20(%rsp), %r13
movq %r13, %rdi
leaq 0x38ea9(%rip), %rsi     # 0xab800
leaq 0x3(%rsp), %rdx
callq 0x66a0
movslq %r14d, %rax
xorl %esi, %esi
cmpq %rax, %r15
sete %sil
movq %rbp, %rdi
movq %r13, %rdx
leaq 0x1ec78(%rip), %r14     # 0x915f2
callq 0x6894
movq %rbp, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x38e89(%rip), %rsi     # 0xab81d
callq 0x1071a
movq %rax, %rdi
movq %r14, %rsi
callq 0x106fe
subq 0x40(%rsp), %rbx
movq %rbx, 0x8(%rsp)
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x107ba
movq %rax, %rdi
movq %r12, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x38f1b(%rip), %rsi     # 0xab8eb
callq 0x3bfc6
movq %rax, %rdi
movq %r14, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x4(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x328ab(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %rbp, %rdi
callq 0x68d4
leaq 0x20(%rsp), %rdi
callq 0x2090
movl 0x4(%rsp), %r14d
incl %r14d
movl %r14d, 0x4(%rsp)
movq 0x18(%rsp), %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %rbx
movq 0x10(%rsp), %rax
jmp 0x72928
leaq 0x37b98(%rip), %rsi     # 0xaa5d6
leaq 0x20(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl $0x14, %r14d
sete %sil
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x6894
leaq 0x1abda(%rip), %rsi     # 0x8d647
leaq 0x58(%rsp), %rdi
callq 0x106fe
leaq 0x38e6d(%rip), %rsi     # 0xab8eb
movq %rax, %rdi
callq 0x3bfc6
leaq 0x1eb65(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0x10736
leaq 0x1ab9e(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x1ca8c(%rip), %rsi     # 0x8f544
movq %rax, %rdi
callq 0x10896
leaq 0x1eb2b(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
movl $0x14, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x327b9(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x58(%rsp), %rdi
callq 0x68d4
leaq 0x20(%rsp), %rdi
callq 0x2090
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x72b4f
jmp 0x72b20
jmp 0x72b31
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x68d4
jmp 0x72b45
jmp 0x72b57
movq %rax, %rbx
jmp 0x72b45
jmp 0x72b38
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x68d4
leaq 0x20(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba