// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0x2, %r15d
leaq 0xd8(%rsp), %rsi
movq %r15, (%rsi)
movl $0x8, %r12d
movq %r12, 0x8(%rsi)
movl $0x1, %r13d
movq %r13, 0x10(%rsi)
xorl %r14d, %r14d
xorl %edi, %edi
callq 0xd133
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rbx
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movq $0x4, 0x28(%rbx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x30(%rbx)
movq %r13, 0x38(%rbx)
movq $0x9, 0x40(%rbx)
movq %rax, 0x48(%rbx)
movq %r15, 0x50(%rbx)
movq %r12, 0x58(%rbx)
movq %rbx, %rdi
callq 0xc30a
movq %rbx, %rdi
callq 0xc412
movq 0x28(%rbx), %rax
movl $0x0, %ebp
testq %rax, %rax
je 0x9f236
leaq 0x98(%rsp), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x40(%rsp)
cmpq $0xc, %rax
movl $0xc, %ebx
cmovlq %rax, %rbx
movq %rcx, 0x8(%rsp)
addq %rcx, %rax
decq %rax
movq %rax, 0x38(%rsp)
xorl %ebp, %ebp
movq 0xb8(%rsp), %r13
testq %r13, %r13
je 0x9f1fe
movq 0xb0(%rsp), %r15
leaq (%r15,%r13), %rax
movq %rax, 0x50(%rsp)
leaq (%r15,%r13), %rax
decq %rax
movq %rax, 0x48(%rsp)
cmpq $0x5, %r13
movl $0x5, %eax
cmovgeq %rax, %r13
movq %rbp, %r12
movq 0x78(%rsp), %rbp
leaq 0x98(%rsp), %rcx
movq 0x10(%rcx), %rax
leaq 0xf8(%rsp), %rdx
movq %rax, 0x10(%rdx)
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %r15, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq $0x1, 0x20(%rsp)
xorl %edi, %edi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0xd133
movq %r15, %rax
subq 0xb0(%rsp), %rax
movq 0x8(%rsp), %rdx
movq %rdx, %rcx
subq 0x80(%rsp), %rcx
imulq 0x90(%rsp), %rcx
testq %rbp, %rbp
leaq (%rbp,%rax,4), %rax
leaq (%rax,%rcx,4), %rax
cmoveq %rbp, %rax
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rbx, 0xe8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq %r15, 0x110(%rsp)
movq %r13, 0x118(%rsp)
movq 0x100(%rsp), %rbp
movl $0x0, 0xc8(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xd8(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0x611a0
movq %r13, %rax
imulq %rbx, %rax
imulq %rbp, %rax
testq %rax, %rax
movl $0x0, %ecx
cmovleq %rcx, %rax
movq %r12, %rbp
addq %rax, %rbp
addq %r13, %r15
addq %r15, %r13
decq %r13
movq 0x48(%rsp), %rax
cmpq %r13, %rax
cmovlq %rax, %r13
subq %r15, %r13
incq %r13
cmpq 0x50(%rsp), %r15
jne 0x9f0c0
movq 0x8(%rsp), %rax
addq %rbx, %rax
addq %rax, %rbx
decq %rbx
movq 0x38(%rsp), %rcx
cmpq %rbx, %rcx
cmovlq %rcx, %rbx
subq %rax, %rbx
incq %rbx
movq %rax, 0x8(%rsp)
cmpq 0x40(%rsp), %rax
jne 0x9f085
movq 0x88(%rsp), %r14
movq 0xa0(%rsp), %r15
movq 0xb8(%rsp), %r13
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2163e(%rip), %rsi     # 0xc0895
leaq 0x2164d(%rip), %rdx     # 0xc08ab
leaq 0x10(%rsp), %rdi
callq 0xd14c
imulq %r13, %r15
imulq %r14, %r15
xorl %eax, %eax
testq %r15, %r15
cmovgq %r15, %rax
xorl %esi, %esi
cmpq %rax, %rbp
sete %sil
leaq 0xd8(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0xbf80
leaq 0x43e6(%rip), %rsi      # 0xa3684
leaq 0xd8(%rsp), %rdi
callq 0x18fba
leaq 0x21978(%rip), %rsi     # 0xc0c2a
movq %rax, %rdi
callq 0x19062
leaq 0x7f95(%rip), %rsi      # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %r15
cmpb $0x1, 0x188(%rax)
jne 0x9f2e4
movq %r15, %rdi
addq $0x10, %rdi
movq %rbp, %rsi
callq 0x2110
leaq 0x4399(%rip), %rsi      # 0xa3684
movq %r15, %rdi
callq 0x18fba
leaq 0x215a9(%rip), %rsi     # 0xc08a3
movq %rax, %rdi
callq 0x1a146
leaq 0x7f4d(%rip), %rsi      # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x9f34c
movq 0xb8(%rsp), %rax
imulq 0xa0(%rsp), %rax
imulq 0x88(%rsp), %rax
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x1af46(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
callq 0xbfd8
leaq 0x80(%rsp), %r15
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x9f38a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x78(%rsp), %rcx
leaq 0xe0(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xc8(%rsp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq %rax, %rdi
callq 0x1f012
leaq 0x60(%rsp), %rdi
callq 0xd206
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9f43a
jmp 0x9f425
jmp 0x9f425
jmp 0x9f3fa
movq %rax, %rbx
jmp 0x9f40a
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0xbfd8
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x9f428
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x9f428
jmp 0x9f43a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xd206
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc0a9