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

	array1d[0] = 3;
	assert(array1d[0] == 3); // single value assignment failed!

	array2d[eee] = 21;
	for (auto e: array2d){
		assert(e == 21); // broadcast assignment failed!
	}

	array2d[Slice<1>(0,-1,2)][eee] = 42;
	bool tmp = true;
	for (auto e: array1d){
		assert ( e = (tmp) ? 42 : 21); // broadcast assignment failed
		tmp = not tmp;
	}

	array2d[__] = array1d;
	for (size_t i=0; i < array2d.shape[0] ; i++){
		assert (array2d[i][0] == array1d[0]); // broadcast assignment failed
		assert (array2d[i][8] == array1d[8]); // broadcast assignment failed
		assert (array2d[i][15] == array1d[15]); // broadcast assignment failed
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
movl $0x10, %eax
movq %rax, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movl $0x1, %eax
xorl %ecx, %ecx
imull 0x60(%rsp,%rcx), %eax
addq $0x8, %rcx
cmpq $0x10, %rcx
jne 0x2407
movslq %eax, %rbx
leaq 0xd0(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %rbx, %rsi
callq 0x4c96
testl %ebx, %ebx
jle 0x2448
movq 0xd0(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x243c
movq 0xd0(%rsp), %rsi
xorps %xmm0, %xmm0
leaq 0x150(%rsp), %r8
movaps %xmm0, (%r8)
movaps %xmm0, 0x10(%r8)
leaq 0x29c5(%rip), %rax      # 0x4e30
movq %rax, (%r8)
leaq 0x3aa7(%rip), %rax      # 0x5f1c
movq %rax, 0x18(%r8)
leaq 0x3aa4(%rip), %rax      # 0x5f24
movq %rax, 0x10(%r8)
leaq 0x60(%rsp), %rdi
movl $0x10, %edx
movl $0x10, %ecx
callq 0x4d20
movq 0x160(%rsp), %rax
testq %rax, %rax
je 0x24b7
leaq 0x150(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xa0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %edx, %edx
callq 0x4e32
leaq 0xa0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6142
leaq 0xa0(%rsp), %rdi
movq 0x10(%rdi), %rax
movq $0x3, (%rax)
xorl %esi, %esi
xorl %edx, %edx
callq 0x6142
movq 0xb0(%rsp), %rax
cmpq $0x3, (%rax)
jne 0x29cf
movq $0x15, 0xf0(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x68(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x254e
movq 0x7a98(%rip), %rcx      # 0x9fd8
cmpb $0x0, (%rcx)
je 0x254a
incl 0x8(%rax)
jmp 0x254e
lock
incl 0x8(%rax)
movups 0x80(%rsp), %xmm0
movups 0x90(%rsp), %xmm1
leaq 0x20(%rsp), %rdi
movups %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
leaq 0xf0(%rsp), %rsi
callq 0x4ee4
leaq 0x80(%rsp), %r15
leaq 0x90(%rsp), %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2597
callq 0x5924
leaq 0x60(%rsp), %rsi
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movq %r14, 0x40(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x4f6a
leaq 0xc0(%rsp), %r12
leaq 0xc8(%rsp), %r13
leaq 0x20(%rsp), %rbx
movq 0x28(%rsp), %rax
cmpq 0xf8(%rsp), %rax
je 0x2602
cmpq $0x15, (%rax)
jne 0x2953
movq %rbx, %rdi
callq 0x6428
jmp 0x25df
movq $0x2a, 0xe8(%rsp)
movq $0x0, 0x130(%rsp)
movq $-0x1, 0x138(%rsp)
movq $0x2, 0x140(%rsp)
movq $0x1, 0x148(%rsp)
movups 0x130(%rsp), %xmm0
movups 0x140(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x4fde
movq 0xf0(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0xf8(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x26aa
movq 0x793c(%rip), %rcx      # 0x9fd8
cmpb $0x0, (%rcx)
je 0x26a6
incl 0x8(%rax)
jmp 0x26aa
lock
incl 0x8(%rax)
movups 0x110(%rsp), %xmm0
movups 0x120(%rsp), %xmm1
leaq 0x20(%rsp), %rdi
movups %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
leaq 0xe8(%rsp), %rsi
callq 0x4ee4
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x26e3
callq 0x5924
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x26f5
callq 0x5924
leaq 0xa0(%rsp), %rsi
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %r12, 0x38(%rsp)
movq %r13, 0x40(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x516a
leaq 0x20(%rsp), %rbx
movq 0x28(%rsp), %rax
cmpq 0xf8(%rsp), %rax
je 0x2749
movq %rbx, %rdi
callq 0x651e
jmp 0x2730
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x68(%rsp), %xmm0
movups %xmm0, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x2781
movq 0x7865(%rip), %rcx      # 0x9fd8
cmpb $0x0, (%rcx)
je 0x277d
incl 0x8(%rax)
jmp 0x2781
lock
incl 0x8(%rax)
movups (%r15), %xmm0
leaq 0x20(%rsp), %rdi
movups %xmm0, 0x20(%rdi)
movups (%r14), %xmm0
movups %xmm0, 0x30(%rdi)
leaq 0xa0(%rsp), %rsi
callq 0x51de
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x27b2
callq 0x5924
cmpq $0x0, 0x80(%rsp)
je 0x2904
xorl %ebx, %ebx
leaq 0x20(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0xa0(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x4e32
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6142
movq 0x30(%rsp), %rax
movq (%rax), %r13
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6142
movq 0xb0(%rsp), %rax
cmpq (%rax), %r13
jne 0x29b0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2823
callq 0x5924
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x4e32
movl $0x8, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x6142
movq 0x30(%rsp), %rax
movq 0x48(%rsp), %rcx
shlq $0x6, %rcx
movq (%rax,%rcx), %r13
movl $0x8, %esi
movq %r12, %rdi
xorl %edx, %edx
callq 0x6142
movq 0xb0(%rsp), %rax
movq 0xc8(%rsp), %rcx
shlq $0x6, %rcx
cmpq (%rax,%rcx), %r13
jne 0x2991
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x288e
callq 0x5924
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x4e32
movl $0xf, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x6142
movq 0x30(%rsp), %rax
imulq $0x78, 0x48(%rsp), %rcx
movq (%rax,%rcx), %r13
movl $0xf, %esi
movq %r12, %rdi
xorl %edx, %edx
callq 0x6142
movq 0xb0(%rsp), %rax
imulq $0x78, 0xc8(%rsp), %rcx
cmpq (%rax,%rcx), %r13
jne 0x2972
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x28f3
callq 0x5924
incq %rbx
cmpq 0x80(%rsp), %rbx
jb 0x27d5
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x2916
callq 0x5924
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x2925
callq 0x5924
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2942
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x471a(%rip), %rdi      # 0x7074
leaq 0x46e7(%rip), %rsi      # 0x7048
leaq 0x46f6(%rip), %rcx      # 0x705e
movl $0x16, %edx
callq 0x20b0
leaq 0x473b(%rip), %rdi      # 0x70b4
leaq 0x46c8(%rip), %rsi      # 0x7048
leaq 0x46d7(%rip), %rcx      # 0x705e
movl $0x24, %edx
callq 0x20b0
leaq 0x4700(%rip), %rdi      # 0x7098
leaq 0x46a9(%rip), %rsi      # 0x7048
leaq 0x46b8(%rip), %rcx      # 0x705e
movl $0x23, %edx
callq 0x20b0
leaq 0x46c5(%rip), %rdi      # 0x707c
leaq 0x468a(%rip), %rsi      # 0x7048
leaq 0x4699(%rip), %rcx      # 0x705e
movl $0x22, %edx
callq 0x20b0
leaq 0x4662(%rip), %rdi      # 0x7038
leaq 0x466b(%rip), %rsi      # 0x7048
leaq 0x467a(%rip), %rcx      # 0x705e
movl $0x12, %edx
callq 0x20b0
jmp 0x2a3f
jmp 0x2a5a
jmp 0x2a51
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2a06
callq 0x5924
movq 0x108(%rsp), %rdi
jmp 0x2a62
jmp 0x2a51
jmp 0x2a51
jmp 0x2a5a
movq %rax, %rbx
jmp 0x2a7e
movq %rax, %rbx
movq 0x160(%rsp), %rax
testq %rax, %rax
je 0x2a8d
leaq 0x150(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2a8d
movq %rax, %rdi
callq 0x52f2
jmp 0x2a51
jmp 0x2a51
jmp 0x2a51
jmp 0x2a51
jmp 0x2a51
movq %rax, %rbx
jmp 0x2a6c
jmp 0x2a5a
jmp 0x2a5a
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2a6c
callq 0x5924
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x2a7e
callq 0x5924
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x2a8d
callq 0x5924
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2aaa
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x21a0