void insert(Node item) {
			Node cur = this;
			while (true) {
				int c = comparator.compare(item.val, cur.val);
				if (c < 0) {
					cur.sizeLeft++;
					if (cur.lChild == null) {
						cur.lChild = item;
						item.parent = cur;
						cur.insertBefore(item);
						break;
					}
					cur = cur.lChild;
				}
				else { // Includes the == case. Ties are first-in first-out. 
					if (cur.rChild == null) {
						cur.rChild = item;
						item.parent = cur;
						cur.insertAfter(item);
						break;
					}
					cur = cur.rChild;
				}
			}
		}
Insert a node into this subtree and the linked list

@param item the node to insert
Ghidra/Framework/Generic/src/main/java/ghidra/generic/util/datastruct/TreeValueSortedMap.java