// File: /workspace/github_cpp_makefile_star2_O1/dsharlet[P]array/test/split.cpp
// Function: nda::test_split_even_nonconstant_body()
TEST(split_even_nonconstant) {
  dense_array<int, 3> a({4, 8, 9});
  size_t total_size = 0;
  for (auto zo : split(a.z(), 3)) {
    for (auto yo : split(a.y(), 4)) {
      auto a_inner = a(_, yo, zo);
      total_size += a_inner.size();
      fill_pattern(a_inner);
    }
  }
  // The total number of items in the inner splits should be equal to the size
  // of the array (no overlap among inner splits).
  ASSERT_EQ(total_size, a.size());
  check_pattern(a);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
xorl %r13d, %r13d
leaq 0xe8(%rsp), %rsi
movq %r13, (%rsi)
movl $0x4, %r14d
movq %r14, 0x8(%rsi)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %rbx, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r15
movups %xmm0, 0x8(%r15)
movups %xmm0, 0x18(%r15)
movq $0x9, 0x28(%r15)
movq %rbx, 0x30(%r15)
movq %r13, 0x38(%r15)
movq $0x8, 0x40(%r15)
movq %rbx, 0x48(%r15)
movq %r13, 0x50(%r15)
movq %r14, 0x58(%r15)
movq %r15, %rdi
callq 0xc2a2
movq %r15, %rdi
callq 0xc38a
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x9d0c3
movq 0x90(%rsp), %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, 0x28(%rsp)
addq %rax, %rcx
decq %rcx
movq %rcx, 0x30(%rsp)
cmpq $0x3, %rax
movl $0x3, %ebx
cmovlq %rax, %rbx
xorl %r13d, %r13d
movq 0xb0(%rsp), %r15
testq %r15, %r15
je 0x9d093
movq 0xa8(%rsp), %r14
leaq (%r15,%r14), %rax
movq %rax, 0x48(%rsp)
leaq (%r15,%r14), %rax
decq %rax
movq %rax, 0x40(%rsp)
cmpq $0x4, %r15
movl $0x4, %eax
cmovgeq %rax, %r15
movq %r13, 0x50(%rsp)
movq 0xc0(%rsp), %r12
movq 0xc8(%rsp), %rbp
movq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x88(%rsp), %r13
movq 0xa0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %r12, (%rsp)
movq %rbp, 0x8(%rsp)
movq $0x1, 0x10(%rsp)
xorl %edi, %edi
movq %rsp, %rsi
callq 0xd09f
movq %r14, %rax
subq 0xa8(%rsp), %rax
imulq 0xb8(%rsp), %rax
movq 0x28(%rsp), %rdx
movq %rdx, %rcx
subq 0x90(%rsp), %rcx
imulq 0xa0(%rsp), %rcx
testq %r13, %r13
leaq (%r13,%rax,4), %rax
leaq (%rax,%rcx,4), %rax
cmoveq %r13, %rax
movq %rax, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rbx, 0xf8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x100(%rsp)
movq %r14, 0x108(%rsp)
movq %r15, 0x110(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x118(%rsp)
movq %r12, 0x120(%rsp)
movq %rbp, 0x128(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x130(%rsp)
movl $0x0, 0xd8(%rsp)
leaq 0xd8(%rsp), %rax
movq %rax, (%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xf0(%rsp), %rdi
movq %rsp, %rsi
callq 0x5fc7c
movq %r15, %rax
imulq %rbx, %rax
imulq %rbp, %rax
testq %rax, %rax
movl $0x0, %ecx
cmovleq %rcx, %rax
movq 0x50(%rsp), %r13
addq %rax, %r13
addq %r15, %r14
addq %r14, %r15
decq %r15
movq 0x40(%rsp), %rax
cmpq %r15, %rax
cmovlq %rax, %r15
subq %r14, %r15
incq %r15
cmpq 0x48(%rsp), %r14
jne 0x9cf1e
movq 0x28(%rsp), %rax
addq %rbx, %rax
addq %rax, %rbx
decq %rbx
movq 0x30(%rsp), %rcx
cmpq %rbx, %rcx
cmovlq %rcx, %rbx
subq %rax, %rbx
incq %rbx
movq %rax, 0x28(%rsp)
cmpq 0x38(%rsp), %rax
jne 0x9cee3
movq 0xc8(%rsp), %r15
movq 0x98(%rsp), %r14
movq 0xb0(%rsp), %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x21c49(%rip), %rsi     # 0xbed35
leaq 0x21c58(%rip), %rdx     # 0xbed4b
movq %rsp, %rdi
callq 0xd0b8
imulq %r15, %rbx
imulq %r14, %rbx
xorl %eax, %eax
testq %rbx, %rbx
cmovgq %rbx, %rax
xorl %esi, %esi
cmpq %rax, %r13
sete %sil
leaq 0xe8(%rsp), %rdi
movq %rsp, %r14
movq %r14, %rdx
callq 0xbf0a
leaq 0x4525(%rip), %rsi      # 0xa1654
leaq 0xe8(%rsp), %rdi
callq 0x18a16
leaq 0x21f87(%rip), %rsi     # 0xbf0ca
movq %rax, %rdi
callq 0x18abe
leaq 0x81d8(%rip), %rsi      # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %r15
cmpb $0x1, 0x188(%rax)
jne 0x9d175
movq %r15, %rdi
addq $0x10, %rdi
movq %r13, %rsi
callq 0x2110
leaq 0x44d8(%rip), %rsi      # 0xa1654
movq %r15, %rdi
callq 0x18a16
leaq 0x21bb8(%rip), %rsi     # 0xbed43
movq %rax, %rdi
callq 0x19c24
leaq 0x8190(%rip), %rsi      # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x9d1dd
movq 0xc8(%rsp), %rax
imulq 0xb0(%rsp), %rax
imulq 0x98(%rsp), %rax
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x1b185(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0xe8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbf62
leaq 0x90(%rsp), %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x9d21a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x88(%rsp), %rcx
leaq 0xf0(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd8(%rsp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq %rax, %rdi
callq 0x1e56e
leaq 0x70(%rsp), %rdi
callq 0xd16c
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9d2cb
jmp 0x9d2b6
jmp 0x9d2b6
jmp 0x9d28c
movq %rax, %rbx
jmp 0x9d29c
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x9d2b9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x9d2b9
jmp 0x9d2cb
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xd16c
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc036