private void addKeyRanges(List<KeyRange> keyRangeList, Address start, Address end) {
		int index = Arrays.binarySearch(sortedBaseStartAddrs, start);
		if (index < 0) {
			index = -index - 2;
		}
		if (index < 0) {
			index++;
		}
		while (index < sortedBaseStartAddrs.length &&
			end.compareTo(sortedBaseStartAddrs[index]) >= 0) {
			Address addr1 = max(start, sortedBaseStartAddrs[index]);
			Address addr2 = min(end, sortedBaseEndAddrs[index]);
			if (addr1.compareTo(addr2) <= 0) {
				keyRangeList.add(new KeyRange(getKey(addr1), getKey(addr2)));
			}
			index++;
		}
	}
@see ghidra.program.database.map.AddressMap#getKeyRanges(AddressSetView, boolean)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressMapImpl.java