public int compareBottoms(ColumnSegment<E> other) {
		// first, just check the columns of this segment and the other, if the columns are
		// not the same, then one column clearly is to the left of the other.
		int result = getCol() - other.getCol();
		if (result != 0) {
			return result;
		}

		// We are in the same grid column, the order is determined by the segment at the
		// bottom of the column (we already tried the top and they were equal). There are 
		// 3 possible orientations for the botom row. 1) it can
		// extend to the left of our column, it can be a terminal point, or it can extend to the
		// right. If our orientation is not the same as the other column segment, the order is
		// simply LEFT < TERMINAL < RIGHT in order to reduce edge crossings. Edges on the left
		// go left and edges on the right go right, so they won't cross each other.

		RowOrientation myBottomRowOrientation = getOrientationForBottomRow();
		RowOrientation otherTopRowOrientation = other.getOrientationForBottomRow();
		// if they are not the same, then LEFT < TERMINAL < RIGHT
		if (myBottomRowOrientation != otherTopRowOrientation) {
			return myBottomRowOrientation.compareTo(otherTopRowOrientation);
		}

		// Both this segment and the other segment have the same orientation. Compare the bottom
		// row segments and use those results to determine our ordering left to right. If the
		// bottom rows extend to the left, then which ever row is above (lower value), should have
		// its associated column be to the left (lower value). Keeping lower rows (higher value)
		// on the right allows their shape to avoid being crossed by the taller shape, which will be
		// on the left.
		// 
		// And if the top rows extends the right, the inverse applies.

		switch (myBottomRowOrientation) {
			case LEFT:
				RowSegment<E> myBottomRowSegment = getBottomRowSegment();
				RowSegment<E> otherBottomRowSegment = other.getBottomRowSegment();
				return myBottomRowSegment.compareLefts(otherBottomRowSegment);

			case RIGHT:
				myBottomRowSegment = getBottomRowSegment();
				otherBottomRowSegment = other.getBottomRowSegment();
				return -myBottomRowSegment.compareRights(otherBottomRowSegment);
			case TERMINAL:
			default:
				return 0;
		}

	}
Compares column segments strictly based  on the relationship of the connected rows at the 
bottom of the segments. 
@param other the other column segment to compare
@return  a negative integer, zero, or a positive integer as this object
         is less than, equal to, or greater than the specified object.
Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/flowchart/ColumnSegment.java