private long reconcileSectionRangeOverlap(MemorySection section, Address minPhysicalAddr,
			Address maxPhysicalAddr, long fileOffset, List<AddressRange> rangeList) {

		if (section.isInitialized) {

			ObjectRangeMap<AllocatedFileSectionRange> fileLoadRangeMap =
				getFileLoadRangeMap(minPhysicalAddr.getAddressSpace(), false);
			if (fileLoadRangeMap == null) {
				// unexpected unless memory already defined 
				rangeList.add(new OverlayAddressRange(minPhysicalAddr, maxPhysicalAddr));
				return fileOffset + maxPhysicalAddr.subtract(minPhysicalAddr) + 1;
			}

			long conflictRangeSize = maxPhysicalAddr.subtract(minPhysicalAddr) + 1;

			// conflict gap accumulator addresses
			Address conflictGapPhysicalAddrRangeStart = null;
			Address conflictGapPhysicalAddrRangeEnd = null;

			// NOTE: Range iterator does not fill-in the gaps, only those
			// ranges which match-up will be returned, range gaps correspond
			// to memory conflict. 
			IndexRangeIterator fileOffsetRangeIterator = fileLoadRangeMap.getIndexRangeIterator(
				fileOffset, fileOffset + conflictRangeSize - 1);

			long filePos = fileOffset;
			Address expectedPhysicalAddrRangeStart = minPhysicalAddr;

			while (fileOffsetRangeIterator.hasNext()) {

				if (expectedPhysicalAddrRangeStart == null) {
					throw new AssertException("expectedRangeStart is null");
				}

				// get file load range - which may have been loaded to a different memory area
				IndexRange fileOffsetRange = fileOffsetRangeIterator.next();
				long rangeSize = fileOffsetRange.getEnd() - fileOffsetRange.getStart() + 1;
				AllocatedFileSectionRange fileRange =
					fileLoadRangeMap.getObject(fileOffsetRange.getStart());

				if (fileOffsetRange.getStart() > filePos) {
					// File load gap in memory - conflict with uninitialized or pre-existing block.
					if (conflictGapPhysicalAddrRangeStart == null) {
						conflictGapPhysicalAddrRangeStart = expectedPhysicalAddrRangeStart;
					}
					expectedPhysicalAddrRangeStart =
						expectedPhysicalAddrRangeStart.add(fileOffsetRange.getStart() - filePos);
					conflictGapPhysicalAddrRangeEnd = expectedPhysicalAddrRangeStart.previous();
				}

				// Perform address computation in physical space
				Address physicalAddrRangeStart =
					fileRange.rangeStartAddress.getPhysicalAddress()
							.add(filePos - fileRange.rangeStartFileOffset);

				// Ignore use of overlay and compare physical address for match to avoid duplication
				if (!expectedPhysicalAddrRangeStart.equals(physicalAddrRangeStart)) {
					// File load memory range does not correspond to target memory range
					if (conflictGapPhysicalAddrRangeStart == null) {
						conflictGapPhysicalAddrRangeStart = expectedPhysicalAddrRangeStart;
					}
					conflictGapPhysicalAddrRangeEnd =
						expectedPhysicalAddrRangeStart.add(rangeSize - 1);
				}
				else {
					// File load range matches target
					if (conflictGapPhysicalAddrRangeStart != null) {
						// add accumulated conflict gap
						rangeList.add(new OverlayAddressRange(conflictGapPhysicalAddrRangeStart,
							conflictGapPhysicalAddrRangeEnd));
						conflictGapPhysicalAddrRangeStart = null;
						conflictGapPhysicalAddrRangeEnd = null;
					}
					rangeList.add(new ProxyAddressRange(expectedPhysicalAddrRangeStart,
						expectedPhysicalAddrRangeStart.add(rangeSize - 1)));
				}

				filePos = fileOffsetRange.getEnd() + 1;
				try {
					expectedPhysicalAddrRangeStart = minPhysicalAddr.add(filePos - fileOffset);
				}
				catch (AddressOutOfBoundsException e) {
					// catch case where we hit the end of the address space
					expectedPhysicalAddrRangeStart = null; // we should be done
				}
			}

			if ((filePos - fileOffset) != conflictRangeSize) {
				// Trailing file load gap in memory - conflict with uninitialized of pre-existing block
				if (conflictGapPhysicalAddrRangeStart == null) {
					conflictGapPhysicalAddrRangeStart = expectedPhysicalAddrRangeStart;
				}
				conflictGapPhysicalAddrRangeEnd = maxPhysicalAddr;
			}
			if (conflictGapPhysicalAddrRangeStart != null) {
				rangeList.add(new OverlayAddressRange(conflictGapPhysicalAddrRangeStart,
					conflictGapPhysicalAddrRangeEnd));
			}
			return fileOffset + conflictRangeSize;
		}

		// force proxy range condition for lower priority uninitialized section (unlikely condition)
		rangeList.add(new ProxyAddressRange(minPhysicalAddr, maxPhysicalAddr));
		return fileOffset;
	}
Reconcile section load range which has been determined to be in conflict with
previously resolved section chunks.  Either OverlayAddressRange or 
ProxyAddressRange objects will be added to rangeList to provide advice for
subsequent memory block creation.
@param section memory section to be loaded which resulted in conflict
@param minPhysicalAddr start of conflict range physical address
@param maxPhysicalAddr end of conflict range physical address
@param fileOffset file offset at start of conflict range
@param rangeList accumulation list of sequentially allocated memory address ranges
which makeup the specified loaded section.  This list will be added to as the specified
conflict range is reconciled.
@return updated file offset if section is initialized.
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MemorySectionResolver.java