private void assignOffsets(List<ColSegmentList<E>> nonOverlappingSegments,
			ColumnSegment<E> segment, int stepSize) {

		// Find lowest offset group that the given segment can be added without an overlap.
		// Start looking at the group with highest offsets first and work towards the 0 
		// offset group to ensure that overlapping segments don't lose the ordering that
		// has already been establish. In other words, for a segment to be allowed to be
		// given a 0 offset (because it doesn't overlap any segments in that group), it must
		// also not overlap any existing groups with higher offsets. (Otherwise the ordering
		// we created to minimize edge crossings will be lost)

		int i = nonOverlappingSegments.size() - 1;
		for (; i >= 0; i--) {
			if (nonOverlappingSegments.get(i).hasOverlappingSegment(segment)) {
				break;
			}
		}

		// we either broke at a group we overlap or we are at -1. Either way, we get added
		// to the next offset group.
		i++;
		if (i >= nonOverlappingSegments.size()) {
			nonOverlappingSegments.add(new ColSegmentList<E>(i));
		}
		// if adjusting to the left, offsets are negative
		int offset = i * stepSize;
		segment.setOffset(offset);
		nonOverlappingSegments.get(i).addSegment(segment);
	}
Checks if the range of y values in a given column segment list intersects the
range of y values in this column segment.
@param other the column segment list to compare
@return true if they intersect ranges.
Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/flowchart/ColSegmentList.java