// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/split.cpp
// Function: nda::test_split_uneven_nonconstant_body()
TEST(split_uneven_nonconstant) {
  dense_array<int, 3> a({dense_dim<>(2, 8), dim<>(1, 9), 4});
  size_t total_size = 0;
  for (auto zo : split(a.z(), 12)) {
    for (auto xo : split(a.x(), 5)) {
      auto a_inner = a(xo, _, 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 $0x268, %rsp            # imm = 0x268
leaq 0x30(%rsp), %rbx
movl $0x4, (%rbx)
movq $0x1, 0x8(%rbx)
movq $0x9, 0x10(%rbx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rbx)
movq $0x2, 0x20(%rbx)
movq $0x8, 0x28(%rbx)
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8a4ba
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6750
andq $0x0, 0x8(%rsp)
movq 0x20(%r15), %rax
movq 0x28(%r15), %rsi
cmpq $0xc, %rsi
pushq $0xc
popq %rcx
cmovlq %rsi, %rcx
leaq (%rsi,%rax), %rdx
decq %rdx
addq %rax, %rsi
movq %rsi, 0x28(%rsp)
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movq 0x30(%rsp), %r13
cmpq 0x28(%rsp), %r13
je 0x88e11
movq 0x38(%rsp), %rbp
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %r15
cmpq $0x5, %r15
pushq $0x5
popq %rcx
cmovlq %r15, %rcx
leaq (%r15,%rax), %rdx
decq %rdx
addq %rax, %r15
movq %rax, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x10(%rsp), %rdx
cmpq %r15, %rdx
je 0x88e02
movq 0x18(%rsp), %rcx
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
movq %r13, %r8
movq %rbp, %r9
callq 0x898b0
movq 0xf8(%rsp), %rax
imulq 0x110(%rsp), %rax
imulq 0xe0(%rsp), %rax
testq %rax, %rax
jg 0x88de6
xorl %eax, %eax
addq %rax, %rbx
movq %rbx, 0x8(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x516ef
movq %r12, %rdi
callq 0x6a816
jmp 0x88da3
leaq 0x30(%rsp), %rdi
callq 0x6a816
jmp 0x88d5a
movq 0xc0(%rsp), %r12
movq 0x90(%rsp), %r15
movq 0xa8(%rsp), %r14
leaq 0x2324a(%rip), %rsi     # 0xac07a
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
imulq %r12, %r14
imulq %r15, %r14
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x6894
leaq 0x47d5(%rip), %rsi      # 0x8d647
leaq 0xd0(%rsp), %rdi
callq 0x106fe
leaq 0x23653(%rip), %rsi     # 0xac4d9
movq %rax, %rdi
callq 0x107d8
leaq 0x875d(%rip), %rsi      # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x11052
leaq 0x4796(%rip), %rsi      # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x231c8(%rip), %rsi     # 0xac088
movq %rax, %rdi
callq 0x118ac
leaq 0x8723(%rip), %rsi      # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xa8(%rsp), %rcx
imulq 0xc0(%rsp), %rcx
imulq 0x90(%rsp), %rcx
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x1c391(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xd0(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x68(%rsp), %rdi
callq 0x1132f
leaq 0x68(%rsp), %rdi
callq 0x69c2
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x88f9c
jmp 0x88f9c
jmp 0x88f74
movq %rax, %rbx
jmp 0x88f84
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x68d4
leaq 0x30(%rsp), %rdi
callq 0x2090
jmp 0x88f9f
movq %rax, %rdi
callq 0x6bba
jmp 0x88f9c
jmp 0x88f9c
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x69c2
movq %rbx, %rdi
callq 0x22f0
nop