// File: miniplane[P]mintree/./BpTree.h
// Function: BpTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 2ul>::Node::borrow_from_node(BpTree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 2ul>::Node*, unsigned long, bool)
void borrow_from_node(Node* other, size_t pos_in_parent, bool borrow_from_previous) {

			if (borrow_from_previous) {
				push_left(parent->keys[pos_in_parent-1]); // inserts val from parent at the beginning

				for (size_t i = elements; i > 0; i--) // inserts child at beginning
					children[i] = children[i-1];

				children[0] = other->children[other->elements]; // moves child from left to right
				children[0]->parent = this;
				parent->keys[pos_in_parent-1] = other->pop_right(); // puts key from left in parent
			}
			else { // borrow from next
				push_right(parent->keys[pos_in_parent]); // inserts val from parent at the end
				children[elements] = other->children[0]; // adds child from right node
				children[elements]->parent = this;

				for (size_t i = 0; i < other->elements; i++) // rearrange children from other node
					other->children[i] = other->children[i+1];
				
				parent->keys[pos_in_parent] = other->pop_left();
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdx, -0xd8(%rbp)
movq %rsi, -0xe0(%rbp)
movq %rdi, -0xe8(%rbp)
movb %cl, %al
movb %al, -0xc9(%rbp)
callq 0x31d0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movb -0xc9(%rbp), %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
testb $0x1, -0x19(%rbp)
je 0x7008
movq -0xc8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
shlq $0x5, %rax
leaq 0x18(%rax,%rcx), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3100
movq -0xc8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x68c0
jmp 0x6f3a
leaq -0x40(%rbp), %rdi
callq 0x3180
movq -0xc8(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jbe 0x6fa1
movq -0xc8(%rbp), %rax
movq -0x58(%rbp), %rcx
subq $0x1, %rcx
movq 0x8(%rax,%rcx,8), %rdx
movq -0x58(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0x58(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x6f55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3180
jmp 0x7134
movq -0xc8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rdx
movq 0xb8(%rdx), %rdx
movq 0x8(%rax,%rdx,8), %rax
movq %rax, 0x8(%rcx)
movq 0x8(%rcx), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x6930
movq -0xc8(%rbp), %rax
movq (%rax), %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rax
subq $0x1, %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x78(%rbp), %rsi
callq 0x3300
leaq -0x78(%rbp), %rdi
callq 0x3180
jmp 0x712b
movq -0xc8(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
shlq $0x5, %rcx
leaq 0x38(%rax,%rcx), %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3100
movq -0xc8(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x6990
jmp 0x7047
leaq -0x98(%rbp), %rdi
callq 0x3180
movq -0xc8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movq 0xb8(%rcx), %rax
movq %rdx, 0x8(%rcx,%rax,8)
movq 0xb8(%rcx), %rax
movq 0x8(%rcx,%rax,8), %rax
movq %rcx, (%rax)
movq $0x0, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xb8(%rcx), %rax
jae 0x70ea
movq -0x10(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq -0xa0(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq -0xa0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x7088
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3180
jmp 0x7134
movq -0x10(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x69f0
movq -0xc8(%rbp), %rax
movq (%rax), %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
leaq -0xc0(%rbp), %rsi
callq 0x3300
leaq -0xc0(%rbp), %rdi
callq 0x3180
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x33d0
nopl (%rax)