private void addToAddressSet(AddressSet set, BigInteger startIndex, BigInteger endIndex) {
		int rangeIndex = Arrays.binarySearch(indexList, startIndex);
		if (rangeIndex < 0) {
			rangeIndex = -rangeIndex - 2;
		}
		if (rangeIndex >= addressList.length) {
			return;
		}
		Address startAddr = getAddress(rangeIndex, startIndex);
		while (endIndex.compareTo(indexList[rangeIndex + 1]) >= 0) {
			Address endAddr =
				getAddress(rangeIndex, indexList[rangeIndex + 1].subtract(BigInteger.ONE));
			set.addRange(startAddr, endAddr);
			if (++rangeIndex >= addressList.length) {
				return;
			}
			startAddr = addressList[rangeIndex];
		}
		set.addRange(startAddr, getAddress(rangeIndex, endIndex));

	}
Resets the mapping to the entire original address set.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/util/AddressIndexMap.java