// File: miniplane[P]mintree/./BpTree.h
// Function: BpTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 2ul>::Node::apply_(Functor<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, Order, unsigned long&)
bool apply_(const Functor<E>& f, Order ord, size_t& n) { // I'm not sure yet why we need that, but ok

			size_t i;
			if (ord == descending) {
				i = elements-1;
				if (!leaf)
					if (!children[i+1]->apply_(f, ord, n))
						return false;
				do {
					if (i > elements) break;
					if (leaf) {
						n++; // counts values in leafs
						if (!f(keys[i]))
							return false;
						}
					else 
						if (!children[i]->apply_(f, ord, n)) // goes to next child until leaf
							return false;
				} while (i--);
			}

			else {
				i = 0;
				for (; i < elements; i++) {
					if (leaf) {
						n++; // counts values in leafs
						if (!f(keys[i]))
							return false;
						}
					else 
						if (!children[i]->apply_(f, ord, n)) // goes to next child until leaf
							return false;
				}
				if (!leaf)
					if (!children[i]->apply_(f, ord, n))
						return false;
			}
			return true;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rsi, -0x50(%rbp)
movl %edx, -0x44(%rbp)
movq %rcx, -0x40(%rbp)
callq 0x31d0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x44(%rbp), %edx
movq -0x40(%rbp), %rcx
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0x768e
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rcx
subq $0x1, %rcx
movq %rcx, -0x30(%rbp)
testb $0x1, 0xc0(%rax)
jne 0x75e4
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x7550
testb $0x1, %al
jne 0x75e2
movb $0x0, -0x1(%rbp)
jmp 0x7762
jmp 0x75e4
jmp 0x75e6
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
cmpq 0xb8(%rcx), %rax
jbe 0x75fc
jmp 0x7689
movq -0x38(%rbp), %rax
testb $0x1, 0xc0(%rax)
je 0x7642
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
addq $0x38, %rsi
movq -0x30(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
movq (%rdi), %rax
callq *(%rax)
testb $0x1, %al
jne 0x7640
movb $0x0, -0x1(%rbp)
jmp 0x7762
jmp 0x766e
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x7550
testb $0x1, %al
jne 0x766c
movb $0x0, -0x1(%rbp)
jmp 0x7762
jmp 0x766e
jmp 0x7670
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x75e6
jmp 0x775e
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
cmpq 0xb8(%rcx), %rax
jae 0x7726
movq -0x38(%rbp), %rax
testb $0x1, 0xc0(%rax)
je 0x76ea
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
addq $0x38, %rsi
movq -0x30(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
movq (%rdi), %rax
callq *(%rax)
testb $0x1, %al
jne 0x76e8
movb $0x0, -0x1(%rbp)
jmp 0x7762
jmp 0x7713
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x7550
testb $0x1, %al
jne 0x7711
movb $0x0, -0x1(%rbp)
jmp 0x7762
jmp 0x7713
jmp 0x7715
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7696
movq -0x38(%rbp), %rax
testb $0x1, 0xc0(%rax)
jne 0x775c
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x7550
testb $0x1, %al
jne 0x775a
movb $0x0, -0x1(%rbp)
jmp 0x7762
jmp 0x775c
jmp 0x775e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)