private int getAddressRangeIndex(Address address) {
		int low = 0;
		int high = diffs.length - 1;

		while (low <= high) {
			int mid = (low + high) >> 1;
			AddressRange range = ranges[mid];
			if (range.contains(address)) {
				return mid;
			}
			else if (address.compareTo(range.getMinAddress()) < 0) {
				high = mid - 1;
			}
			else {
				low = mid + 1;
			}
		}
		return -(low + 1);  // not found.
	}
Gets the index of the address range containing the indicated address, 
if it is contained in the list;
	       otherwise, {@code (-(<i>insertion point</i>) - 1)}.
@param address the address whose range we are interested in finding.
@return the index of the address range.
Ghidra/Features/Base/src/main/java/ghidra/program/util/MemoryDiff.java