// File: /workspace/github_cpp_makefile_star2_O1/schaefed[P]Ndarray/test/test_ndarray.cpp
// Function: testIterator()
void testIterator(){
	array<size_t, 2> shape = {4, 4};
	vector<int64_t> basevec  = range(product<size_t>(shape));
	auto array = ndarray<int64_t, 2>(basevec.data(), shape);
	Ndarray<int64_t,2> test;

	auto tester = [](auto array, vector<int64_t> check){
		int64_t i = 0;
		for (auto e: array){
			assert (e == check[i++]); // Wrong iteration element
		}
	};

	tester(array, range(16));
	tester(array[3], range(12, 16));
	tester(array[Slice<>(0, 2)], range(8));
	tester(array[Slice<>(0, 4, 2)],
		   concat<int64_t>({range(4), range(8, 12)})
		   );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
movl $0x4, %eax
movq %rax, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movl $0x1, %eax
xorl %ecx, %ecx
imull 0xb0(%rsp,%rcx), %eax
addq $0x8, %rcx
cmpq $0x10, %rcx
jne 0x415d
movslq %eax, %rbx
leaq 0x80(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
movq %rbx, %rsi
callq 0x4c96
testl %ebx, %ebx
jle 0x41a4
movq 0x80(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x4198
movq 0x80(%rsp), %rsi
xorps %xmm0, %xmm0
leaq 0x130(%rsp), %r8
movaps %xmm0, (%r8)
movaps %xmm0, 0x10(%r8)
leaq 0xc69(%rip), %rax       # 0x4e30
movq %rax, (%r8)
leaq 0x1d4b(%rip), %rax      # 0x5f1c
movq %rax, 0x18(%r8)
leaq 0x1d48(%rip), %rax      # 0x5f24
movq %rax, 0x10(%r8)
leaq 0xb0(%rsp), %rdi
movl $0x4, %edx
movl $0x4, %ecx
callq 0x4d20
movq 0x140(%rsp), %rax
testq %rax, %rax
je 0x4216
leaq 0x130(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xb0(%rsp), %rax
movq %rax, 0x158(%rsp)
movups 0xb8(%rsp), %xmm0
movups %xmm0, 0x160(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x170(%rsp)
testq %rax, %rax
je 0x4260
movq 0x5d86(%rip), %rcx      # 0x9fd8
cmpb $0x0, (%rcx)
je 0x425c
incl 0x8(%rax)
jmp 0x4260
lock
incl 0x8(%rax)
movups 0xd0(%rsp), %xmm0
movups 0xe0(%rsp), %xmm1
movups %xmm0, 0x178(%rsp)
movups %xmm1, 0x188(%rsp)
movl $0x80, %edi
callq 0x2110
movq %rax, %r14
leaq 0x178(%rsp), %rax
leaq 0x188(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
xorl %edx, %edx
movq %rdx, (%r14,%rdx,8)
incq %rdx
cmpq $0x10, %rdx
jne 0x42c9
leaq 0x158(%rsp), %rsi
movq 0x10(%rsi), %rdx
movq %rdx, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %rcx, 0x40(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x4f6a
movq 0x28(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x4341
leaq 0x20(%rsp), %rbx
movq %r14, %r15
movq (%rax), %rax
cmpq (%r15), %rax
jne 0x479a
movq %rbx, %rdi
callq 0x6428
movq 0x28(%rsp), %rax
addq $0x8, %r15
cmpq 0x60(%rsp), %rax
jne 0x431d
movl $0x80, %esi
movq %r14, %rdi
callq 0x2120
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x4360
callq 0x5924
leaq 0x198(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl $0x3, %edx
callq 0x4e32
movl $0x20, %edi
callq 0x2110
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0xc, %eax
movq %rax, -0x60(%r14,%rax,8)
leaq 0x1(%rax), %rcx
cmpq $0xf, %rax
movq %rcx, %rax
jne 0x4396
leaq 0x1b8(%rsp), %rax
movq -0x10(%rax), %rcx
leaq 0x1c0(%rsp), %rdx
movq %rcx, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x516a
movq 0x28(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x4423
leaq 0x20(%rsp), %rbx
movq %r14, %r15
movq (%rax), %rax
cmpq (%r15), %rax
jne 0x47b1
movq %rbx, %rdi
callq 0x651e
movq 0x28(%rsp), %rax
addq $0x8, %r15
cmpq 0x60(%rsp), %rax
jne 0x43ff
movl $0x20, %esi
movq %r14, %rdi
callq 0x2120
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x4442
callq 0x5924
xorl %eax, %eax
movq %rax, 0x110(%rsp)
movq $0x2, 0x118(%rsp)
movq $0x1, 0x120(%rsp)
movq %rax, 0x128(%rsp)
movups 0x110(%rsp), %xmm0
movups 0x120(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x208(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x5480
movl $0x40, %edi
callq 0x2110
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
xorl %eax, %eax
movq %rax, (%r14,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x44bb
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rcx
leaq 0x238(%rsp), %rdx
movq %rcx, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x4f6a
movq 0x28(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x4543
leaq 0x20(%rsp), %rbx
movq %r14, %r15
movq (%rax), %rax
cmpq (%r15), %rax
jne 0x479a
movq %rbx, %rdi
callq 0x6428
movq 0x28(%rsp), %rax
addq $0x8, %r15
cmpq 0x60(%rsp), %rax
jne 0x451f
movl $0x40, %esi
movq %r14, %rdi
callq 0x2120
movq 0x220(%rsp), %rdi
testq %rdi, %rdi
je 0x4562
callq 0x5924
xorl %eax, %eax
movq %rax, 0xf0(%rsp)
movq $0x4, 0xf8(%rsp)
movq $0x2, 0x100(%rsp)
movq %rax, 0x108(%rsp)
movups 0xf0(%rsp), %xmm0
movups 0x100(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x1c8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x5480
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
movl $0x20, %edi
movq %r15, %r14
callq 0x2110
movq %rax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x28(%rsp)
xorl %ecx, %ecx
movq %rcx, (%rax,%rcx,8)
incq %rcx
cmpq $0x4, %rcx
jne 0x4602
leaq 0x38(%rsp), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movl $0x20, %edi
callq 0x2110
movq %rax, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x48(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x40(%rsp)
movl $0x8, %ecx
movq %rcx, -0x40(%rax,%rcx,8)
leaq 0x1(%rcx), %rdx
cmpq $0xb, %rcx
movq %rdx, %rcx
jne 0x4657
leaq 0x98(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x2, %edx
callq 0x5617
leaq 0x1e8(%rsp), %rax
movq -0x10(%rax), %rcx
leaq 0x1f8(%rsp), %rdx
movq %rcx, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movq $0x0, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
leaq 0x248(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x4f6a
movq 0x60(%rsp), %rax
cmpq 0x250(%rsp), %rax
je 0x470d
xorl %r14d, %r14d
leaq 0x58(%rsp), %rbx
movq (%rax), %rax
movq 0x98(%rsp), %rcx
cmpq (%rcx,%r14), %rax
jne 0x479a
movq %rbx, %rdi
callq 0x6428
movq 0x60(%rsp), %rax
addq $0x8, %r14
cmpq 0x250(%rsp), %rax
jne 0x46dd
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x472a
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movl $0x30, %ebx
movq 0x8(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x4746
movq 0x18(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x2120
addq $-0x18, %rbx
jne 0x472f
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x475e
callq 0x5924
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x4770
callq 0x5924
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x478d
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
addq $0x270, %rsp            # imm = 0x270
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2d0d(%rip), %rdi      # 0x74ae
leaq 0x28a0(%rip), %rsi      # 0x7048
leaq 0x2d0f(%rip), %rcx      # 0x74be
jmp 0x47c6
leaq 0x2cf6(%rip), %rdi      # 0x74ae
leaq 0x2889(%rip), %rsi      # 0x7048
leaq 0x2d68(%rip), %rcx      # 0x752e
movl $0x7c, %edx
callq 0x20b0
jmp 0x4831
jmp 0x4858
movq %rax, %rbx
jmp 0x4878
jmp 0x48a5
movq %rax, %rbx
jmp 0x48b5
jmp 0x48bf
movq %rax, %rbx
jmp 0x48cf
jmp 0x48d9
movq %rax, %rbx
jmp 0x48e9
movq %rax, %rbx
movq 0x140(%rsp), %rax
testq %rax, %rax
je 0x490d
leaq 0x130(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x490d
movq %rax, %rdi
callq 0x52f2
movq %rax, %rbx
cmpq %r14, %r15
je 0x489b
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x21e2
jmp 0x489b
movq %rax, %rbx
jmp 0x48fb
movq %rax, %rbx
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x4878
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movl $0x30, %r14d
movq 0x8(%rsp,%r14), %rdi
testq %rdi, %rdi
je 0x4895
movq 0x18(%rsp,%r14), %rsi
subq %rdi, %rsi
callq 0x2120
addq $-0x18, %r14
jne 0x487e
movq 0x1e0(%rsp), %rdi
jmp 0x48f1
movq %rax, %rbx
movl $0x40, %esi
movq %r14, %rdi
callq 0x2120
movq 0x220(%rsp), %rdi
jmp 0x48f1
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x2120
movq 0x1b0(%rsp), %rdi
jmp 0x48f1
movq %rax, %rbx
movl $0x80, %esi
movq %r14, %rdi
callq 0x2120
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x48fb
callq 0x5924
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x490d
callq 0x5924
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x492a
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x21a0