private void determineOverlapConflicts(AddressSet changeSet, TaskMonitor monitor)
			throws CancelledException {
		monitor.checkCancelled();
		AddressSet alreadyChecked = new AddressSet();
		AddressIterator iter = changeSet.getAddresses(true);
		// Look at every address where the Latest or My made a function change.
		while (iter.hasNext()) {
			monitor.checkCancelled();
			Address changeEntry = iter.next(); // Entry Point of function being checked.
			if (overlapAddressSet.contains(changeEntry)) {
				continue;
			}
			if (alreadyChecked.contains(changeEntry)) {
				continue;
			}
			AddressSet entryConflictSet = new AddressSet();
			AddressSet checkEntries = new AddressSet(changeEntry, changeEntry);

			while (!checkEntries.isEmpty()) {
				AddressSet newEntries = new AddressSet();
				AddressIterator entryIter = checkEntries.getAddresses(true);
				while (entryIter.hasNext()) {
					Address entry = entryIter.next();
					Function latestFunc = functionManagers[LATEST].getFunctionAt(entry);
					Function myFunc = functionManagers[MY].getFunctionAt(entry);
					AddressSet latestBody = new AddressSet();
					if (latestFunc != null) {
						latestBody.add(latestFunc.getBody());
					}
					AddressSet myBody = new AddressSet();
					if (myFunc != null) {
						myBody.add(myFunc.getBody());
					}
					AddressSet latestOnly = latestBody.subtract(myBody);
					AddressSet myOnly = myBody.subtract(latestBody);
					// Did Latest program add or change this function?
					if (addEntireLatest.contains(entry) || changeEntireLatest.contains(entry)) {
						AddressSet conflictingMyEntries = new AddressSet();
						// Do body addresses only in Latest function body overlap with My add or change addresses.
						conflictingMyEntries.add(latestOnly.intersect(addMy));
						conflictingMyEntries.add(latestOnly.intersect(changeMy));
						if (!conflictingMyEntries.isEmpty()) {
							entryConflictSet.add(latestBody); // Add Latest function's body.
							entryConflictSet
									.add(getBodies(functionManagers[MY], conflictingMyEntries)); // Add My conflicting function bodies.
						}
						newEntries.add(conflictingMyEntries);
					}
					// Did My program add or change this function?
					if (addMy.contains(entry) || changeMy.contains(entry)) {
						AddressSet conflictingLatestEntries = new AddressSet();
						// Do body addresses only in My function body overlap with Latest add or change addresses.
						conflictingLatestEntries.add(myOnly.intersect(addEntireLatest));
						conflictingLatestEntries.add(myOnly.intersect(changeEntireLatest));
						if (!conflictingLatestEntries.isEmpty()) {
							entryConflictSet.add(myBody); // Add My function's body.
							entryConflictSet.add(
								getBodies(functionManagers[LATEST], conflictingLatestEntries)); // Add Latest conflicting function bodies.
						}
						newEntries.add(conflictingLatestEntries);
					}
					alreadyChecked.addRange(entry, entry);
				}
				// Set up to look at any discovered conflicting function addresses not already examined.
				checkEntries = newEntries.subtract(alreadyChecked);
			}
			// entryConflictSet now has the addresses where the function bodies have an overlap conflict.
			if (!entryConflictSet.isEmpty()) {
				overlapConflicts.put(changeEntry, entryConflictSet);
				overlapConflictSet.addRange(changeEntry, changeEntry);
				overlapAddressSet.add(entryConflictSet);
			}
		}
	}
@param changeSet address set indicating where either Latest or My changed a function.
@param monitor
@throws CancelledException
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/FunctionMerger.java