private void addNormalizedRange(List<KeyRange> keyRangeList, Address normalizedStart,
			Address normalizedEnd, boolean absolute) {

		// Try optimized single range approach first
		long maxKey;
		long minKey = absolute ? encodeAbsolute(normalizedStart, INDEX_MATCH)
				: encodeRelative(normalizedStart, true, INDEX_MATCH);
		if (minKey != INVALID_ADDRESS_KEY) {
			maxKey = absolute ? encodeAbsolute(normalizedEnd, INDEX_MATCH)
					: encodeRelative(normalizedEnd, true, INDEX_MATCH);
			if (maxKey != INVALID_ADDRESS_KEY && (minKey & BASE_MASK) == (maxKey & BASE_MASK)) {
				keyRangeList.add(new KeyRange(minKey, maxKey));
				return;
			}
		}

		// Try multi-range approach
		int index = Arrays.binarySearch(sortedBaseStartAddrs, normalizedStart);
		if (index < 0) {
			index = -index - 2;
		}
		if (index < 0) {
			index++;
		}
		while (index < sortedBaseStartAddrs.length &&
			normalizedEnd.compareTo(sortedBaseStartAddrs[index]) >= 0) {
			Address addr1 = max(normalizedStart, sortedBaseStartAddrs[index]);
			Address addr2 = min(normalizedEnd, sortedBaseEndAddrs[index]);
			if (addr1.compareTo(addr2) <= 0) {
				// Collapse range where minKey and maxKey fall within existing base segments
				minKey = absolute ? encodeAbsolute(addr1, INDEX_MATCH_OR_NEXT)
						: encodeRelative(addr1, true, INDEX_MATCH_OR_NEXT);
				maxKey = absolute ? encodeAbsolute(addr2, INDEX_MATCH_OR_PREVIOUS)
						: encodeRelative(addr2, true, INDEX_MATCH_OR_PREVIOUS);
				if (minKey != INVALID_ADDRESS_KEY && maxKey != INVALID_ADDRESS_KEY) {
					keyRangeList.add(new KeyRange(minKey, maxKey));
				}
			}
			index++;
		}
	}
Add simple key ranges where the address range lies within a single base segment for a single space.
NOTE: start and end addresses must have the same address space!
@param keyRangeList the list to store key ranges into
@param start the start address
@param end the end address
@param absolute true if the address are to be encoded as absolute (not relative to the
 image base
@param create if true, this method will add new address bases that are required to
store addresses in that database that have that address base
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/map/AddressMapDB.java