private void processOriginalRefs(Reference[] originalRefs) {
		for (Reference originalRef : originalRefs) {
			Reference myRef = DiffUtility.getReference(originalPgm, originalRef, myPgm);
			Reference latestRef = DiffUtility.getReference(originalPgm, originalRef, latestPgm);
			if (myRef == null) {
				if (!diffOriginalLatest.equalRefs(originalRef, latestRef)) {
					saveRemoveConflict(originalRef);
				}
				else {
					// AutoMerge: Remove ref as in MY.
					Reference resultRef =
						DiffUtility.getReference(originalPgm, originalRef, resultPgm);
					if (resultRef != null) {
						resultRefMgr.delete(resultRef);
					}
				}
			}
			else if (latestRef == null) {
				if (!diffOriginalMy.equalRefs(originalRef, myRef)) {
					saveRemoveConflict(originalRef);
				} // Otherwise should already be gone.
			}
			else {
				if (diffLatestMy.equalRefs(latestRef, myRef)) {
					continue;
				}
				boolean changedLatest = !diffOriginalLatest.equalRefs(originalRef, latestRef);
				boolean changedMy = !diffOriginalMy.equalRefs(originalRef, myRef);
				if (changedMy) {
					if (changedLatest) {
						saveChangeConflict(myRef);
					}
					else {
						// AutoMerge: Change to MY ref
						DiffUtility.createReference(myPgm, myRef, resultPgm);
					}
				}
			}
		}
	}
Merges the references from the same program that had its code units chosen
in the Code Unit merge phase.
@param monitor the task monitor for allowing cancel and showing progress.
@throws CancelledException if the user cancels the merge.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ReferenceMerger.java