private Entry<TraceAddressSnapRange, T> seekNext() {
				if (address == null || !within.getRange().contains(address)) {
					return null;
				}
				Entry<TraceAddressSnapRange, T> topAtAddress = space.reduce(
					TraceAddressSnapRangeQuery.intersecting(address, address, within.getY1(),
						within.getY2()).starting(getVerticalDirection())).firstEntry();
				if (topAtAddress == null) {
					Entry<TraceAddressSnapRange, T> nextEntry =
						space.reduce(TraceAddressSnapRangeQuery.intersecting(address,
							within.getX2(), within.getY1(), within.getY2())
								.starting(
									Rectangle2DDirection.LEFTMOST))
								.firstEntry();
					if (nextEntry == null) {
						return null;
					}
					address = nextEntry.getKey().getX1();
					// The leftmost is not necessarily the topmost
					topAtAddress = space.reduce(
						TraceAddressSnapRangeQuery.intersecting(address, address, within.getY1(),
							within.getY2()).starting(getVerticalDirection())).firstEntry();
				}
				// Now, I must check if another entry will occlude it
				Entry<TraceAddressSnapRange, T> occludes = null;
				Lifespan occlusionRange = getOcclusionRange(topAtAddress.getKey().getLifespan());
				if (occlusionRange != null) {
					occludes = space.reduce(TraceAddressSnapRangeQuery.intersecting(address,
						within.getX2(), within.getY1(), within.getY2()))
							.reduce(
								TraceAddressSnapRangeQuery.intersecting(
									topAtAddress.getKey().getRange(), occlusionRange)
										.starting(
											Rectangle2DDirection.LEFTMOST))
							.firstEntry();
				}
				if (occludes == null) {
					Entry<TraceAddressSnapRange, T> result =
						new ImmutablePair<>(new ImmutableTraceAddressSnapRange( //
							address, topAtAddress.getKey().getX2(), //
							topAtAddress.getKey().getY1(), topAtAddress.getKey().getY2() //
					).intersection(within), topAtAddress.getValue());
					address = topAtAddress.getKey().getX2().next();
					return result;
				}
				Entry<TraceAddressSnapRange, T> result =
					new ImmutablePair<>(new ImmutableTraceAddressSnapRange( //
						address, occludes.getKey().getX1().previous(), //
						topAtAddress.getKey().getY1(), topAtAddress.getKey().getY2() //
				).intersection(within), topAtAddress.getValue());
				address = occludes.getKey().getX1();
				return result;
			}
Get the vertical range where entries could exist that occlude the given vertical range

@param range the given range
@return the range possibly containing entries which occlude the given range
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/map/AbstractDBTraceAddressSnapRangePropertyMapOcclusionIterable.java