private List<Point2D> routeUpwardLoop(LayoutLocationMap<FGVertex, FGEdge> layoutToGridMap,
			Vertex2dFactory vertex2dFactory, Vertex2d start, Vertex2d end, DecompilerBlock loop) {
		Set<FGVertex> loopVertices = loop.getVertices();
		FGVertex rightmostLoopVertex =
			getRightmostVertex(layoutToGridMap, vertex2dFactory, loopVertices);

		int startRow = start.rowIndex;
		int endRow = end.rowIndex;
		int startColumn = Math.min(start.columnIndex, end.columnIndex);
		int endColumn = Math.max(start.columnIndex, end.columnIndex);

		Column<FGVertex> rightmostLoopColumn = layoutToGridMap.col(rightmostLoopVertex);
		endColumn = Math.max(endColumn, rightmostLoopColumn.index);

		// Look for any vertices that are no part of the loop, but are placed inside
		// of the loop bounds.  This can happen in a graph when the decompiler uses
		// goto statements.   Use the loop's rightmost vertex to establish the loops
		// right edge and then use that to check for any stray non-loop vertices.
		List<Vertex2d> interlopers =
			getVerticesInBounds(vertex2dFactory, startRow, endRow, startColumn, endColumn);

		// place the right x position to the right of the rightmost vertex, not
		// extending past the next column
		FGVertex rightmostVertex = getRightmostVertex(interlopers);
		Column<FGVertex> rightmostColumn = layoutToGridMap.col(rightmostVertex);
		Column<FGVertex> nextColumn = layoutToGridMap.nextColumn(rightmostColumn);
		Vertex2d rightmostV2d = vertex2dFactory.get(rightmostVertex);

		// the padding used for these two lines is somewhat arbitrary and may be changed
		double rightSide = rightmostV2d.getRight() + GraphViewerUtils.EXTRA_LAYOUT_COLUMN_SPACING;
		double x = Math.min(rightSide,
			nextColumn.x - GraphViewerUtils.EXTRA_LAYOUT_COLUMN_SPACING_CONDENSED);

		List<Point2D> articulations = routeLoopEdge(start, end, x);
		return articulations;
	}
An amount by which edges entering a vertex from the left are offset to avoid overlapping
Ghidra/Features/FunctionGraphDecompilerExtension/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/DecompilerNestedLayout.java