// File: schaefed[P]Ndarray/src/ndarray.hpp
// Function: Ndarray<long, 1ul>::operator[](Slice<0ul>)
Ndarray<T,1> operator[](Slice<0> slc){

		slc.update(this->shape[0]);
		this->checkIndex(slc);

		auto newshape = this->shape;
		auto newstrides = this->strides;
		auto start = slc.start * newstrides[0];

		newshape[0] = ceil((slc.stop - slc.start) / static_cast<double>(slc.step));
		newstrides[0] = newstrides[0] * slc.step;

		return Ndarray<T,1>(1,
							start + this->offset,
							shared_ptr<T>(this->data, (this->data).get()+start),
							newshape,
							newstrides // is start+data accesibly from the smart pointer?
							);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0xb0(%rbp)
callq 0x63a0
movq -0xc0(%rbp), %rdi
movq (%rax), %rsi
callq 0xadb0
movq -0xc0(%rbp), %rax
movq -0xa0(%rbp), %rdi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movaps %xmm1, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
movaps -0x30(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
movq %rsp, %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xae00
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rsi
movq -0xa0(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, -0x38(%rbp)
movq 0x28(%rcx), %rcx
movq %rcx, -0x40(%rbp)
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x63a0
movq -0xd0(%rbp), %rcx
movq %rax, %rdx
movq -0xc0(%rbp), %rax
movq (%rdx), %rdx
imulq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq (%rax), %rdx
movq 0x8(%rax), %rcx
subq %rdx, %rcx
cvtsi2sd %rcx, %xmm0
movq 0x10(%rax), %xmm1
movaps 0x6e19(%rip), %xmm2     # 0xd010
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x6e1d(%rip), %xmm2     # 0xd020
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x2030
movq -0xb0(%rbp), %rsi
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x6e17(%rip), %xmm1     # 0xd050
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0xc8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x63a0
movq -0xc8(%rbp), %rcx
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq %rcx, (%rax)
callq 0x63a0
movq -0xc0(%rbp), %rcx
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq (%rax), %rax
movq 0x10(%rcx), %rcx
imulq %rcx, %rax
movq %rax, -0xa8(%rbp)
callq 0x63a0
movq -0xa8(%rbp), %rcx
movq -0xa0(%rbp), %rdi
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq 0x8(%rdi), %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
addq $0x10, %rdi
movq %rdi, -0x98(%rbp)
callq 0x6ca0
movq -0x98(%rbp), %rsi
movq -0x48(%rbp), %rcx
leaq (%rax,%rcx,8), %rdx
leaq -0x58(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x8f40
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %r8
movq -0x68(%rbp), %r9
movl $0x1, %esi
callq 0x8f70
jmp 0x6326
leaq -0x58(%rbp), %rdi
callq 0x6d20
movq -0xd8(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6d20
movq -0x70(%rbp), %rdi
callq 0x2270
nopl (%rax)