private void handleExternalFunctionConflict(Function[] functions, Address myEntryPoint,
			int currentConflictOption, ListingMergePanel listingPanel, TaskMonitor monitor)
			throws CancelledException {

		boolean askUser = currentConflictOption == ListingMergeConstants.ASK_USER;
		updateAddressTranslators(functions);
		ExternalLocation[] externalLocations = getExternalLocationsForFunctions(functions);

		currentExternalConflictType = ExternalConflictType.FUNCTION_DETAILS_CONFLICT;
		if (funcConflicts.contains(myEntryPoint)) {

			int conflicts;
			try {
				conflicts = funcConflicts.get(myEntryPoint);
			}
			catch (NoValueException e) {
				String message = "Couldn't process function conflict for external '" +
					functions[MY].getName() + "'.";
				errorBuf.append(message);
				Msg.error(this, message, e);
				return;
			}

			// Merge function signature source conflicts based on priority.
			if ((conflicts & FUNC_SIGNATURE_SOURCE) != 0) {
				mergeHigherPrioritySignatureSource(functions, monitor);
			}

			// Handle merge of non-variable function detail.
			if ((conflicts & FUNC_DETAIL_MASK) != 0) {
				// If we have a function details choice then a "Use For All" has already occurred.
				if (detailsChoice != ASK_USER) {
					mergeFunctionDetails(functions, detailsChoice, monitor);
				}
				else if (askUser && mergeManager != null) {
					VariousChoicesPanel choicesPanel =
						createFunctionConflictPanel(functions, monitor);

					boolean useForAll = (detailsChoice != ASK_USER);
					choicesPanel.setUseForAll(useForAll);
					choicesPanel.setConflictType("Function Detail");

					setupConflictPanel(listingPanel, choicesPanel, externalLocations, monitor);
					monitor.checkCancelled();
				}
				else {
					mergeFunctionDetails(functions, currentConflictOption, monitor);
				}
			}

			// If Calling Convention was addressed
			// we must determine deferred parameter/variable storage/detail checks.
			// Must be done after signature resolution since this could introduce
			// storage conflicts.
			FunctionVariableStorageConflicts variableStorageConflicts = null;
			List<ParamInfoConflict> paramInfoConflicts = null;
			List<LocalVariableConflict> localVarConflicts = null;
			if ((conflicts & FUNC_CALLING_CONVENTION) != 0) {

				variableStorageConflicts = determineStorageConflict(functions, monitor);
				boolean skipParamChecks = variableStorageConflicts != null &&
					variableStorageConflicts.hasParameterConflict();

				if (skipParamChecks) {
					determineReturnConflict(functions, true, monitor);
				}
				else if (determineSignatureConflicts(functions, monitor)) {
					paramInfoConflicts = determineParameterInfoConflicts(functions, true, monitor);
					determineReturnConflict(functions, true, monitor);
				}

				localVarConflicts = determineLocalVariableInfoConflicts(functions, true,
					variableStorageConflicts, monitor);

				// update function conflicts. funcConflicts may have been populated by the "determine" method call above.
				try {
					conflicts = funcConflicts.get(myEntryPoint);
				}
				catch (NoValueException e) {
					String message = "Couldn't process function conflict for external '" +
						functions[MY].getName() + "'.";
					errorBuf.append(message);
					Msg.error(this, message, e);
					return;
				}
			}

			if ((conflicts & FUNC_RETURN) != 0) {
				currentExternalConflictType = ExternalConflictType.FUNCTION_RETURN_CONFLICT;
				// If we have a function return choice then a "Use For All" has already occurred.
				if (functionReturnChoice != ASK_USER) {
					mergeFunctionReturn(functions, functionReturnChoice, monitor);
				}
				else if (askUser && mergeManager != null) {
					VerticalChoicesPanel choicesPanel =
						createFunctionReturnConflictPanel(functions, monitor);

					boolean useForAll = (functionReturnChoice != ASK_USER);
					choicesPanel.setUseForAll(useForAll);
					choicesPanel.setConflictType("Function Return");

					setupConflictPanel(listingPanel, choicesPanel, externalLocations, monitor);
					monitor.checkCancelled();
				}
				else {
					mergeFunctionReturn(functions, currentConflictOption, monitor);
				}
			}

			// Handle merge of overlapping function variables.
			if ((conflicts & FUNC_VAR_STORAGE) != 0) {
				currentExternalConflictType = ExternalConflictType.VARIABLE_STORAGE_CONFLICT;
				if (variableStorageConflicts == null) {
					variableStorageConflicts = determineStorageConflict(functions, monitor);
				}
				// If we have a function variable storage choice then a "Use For All" has already occurred.
				if (variableStorageChoice != ASK_USER) {
					for (Pair<List<Variable>, List<Variable>> pair : variableStorageConflicts
							.getOverlappingVariables()) {
						monitor.checkCancelled();
						mergeVariableStorage(functions, pair, variableStorageChoice, monitor);
					}
				}
				else if (askUser && mergeManager != null) {
					for (Pair<List<Variable>, List<Variable>> pair : variableStorageConflicts
							.getOverlappingVariables()) {
						monitor.checkCancelled();
						boolean useForAll = (variableStorageChoice != ASK_USER);
						if (useForAll) {
							mergeVariableStorage(functions, pair, variableStorageChoice, monitor);
							continue;
						}
						ScrollingListChoicesPanel choicesPanel =
							createStorageConflictPanel(functions, pair, monitor);

						choicesPanel.setUseForAll(useForAll);
						choicesPanel.setConflictType("Function Variable Storage");

						setupConflictPanel(listingPanel, choicesPanel, externalLocations, monitor);
					}
				}
				else {
					for (Pair<List<Variable>, List<Variable>> pair : variableStorageConflicts
							.getOverlappingVariables()) {
						monitor.checkCancelled();
						mergeVariableStorage(functions, pair, currentConflictOption, monitor);
					}
				}
			}

			// Handle merge of function parameter signature.
			if ((conflicts & FUNC_SIGNATURE) != 0) {
				currentExternalConflictType = ExternalConflictType.PARAMETER_SIGNATURE_CONFLICT;
				// If we have a function parameter signature choice then a "Use For All" has already occurred.
				if (parameterSignatureChoice != ASK_USER) {
					mergeParameters(functions, parameterSignatureChoice, monitor);
				}
				else if (askUser && mergeManager != null) {
					VerticalChoicesPanel choicesPanel =
						createParameterSigConflictPanel(functions, monitor);

					boolean useForAll = (parameterSignatureChoice != ASK_USER);
					choicesPanel.setUseForAll(useForAll);
					choicesPanel.setConflictType("Function Parameter Signature");

					setupConflictPanel(listingPanel, choicesPanel, externalLocations, monitor);
					monitor.checkCancelled();
				}
				else {
					mergeParameters(functions, currentConflictOption, monitor);
				}
			}

			// Handle merge of function parameter Info details.
			if ((conflicts & FUNC_PARAM_DETAILS) != 0) {
				currentExternalConflictType = ExternalConflictType.PARAMETER_INFO_CONFLICT;
				if (paramInfoConflicts == null) {
					paramInfoConflicts = determineParameterInfoConflicts(functions, false, monitor);
				}
				// If we have a function parameter information choice then a "Use For All" has already occurred.
				if (parameterInfoChoice != ASK_USER) {
					mergeParamInfo(functions, paramInfoConflicts, parameterInfoChoice, monitor);
				}
				else if (askUser && mergeManager != null) {
					for (ParamInfoConflict pc : paramInfoConflicts) {
						monitor.checkCancelled();
						boolean useForAll = (parameterInfoChoice != ASK_USER);
						if (useForAll) {
							mergeParamInfo(functions, pc, parameterInfoChoice, monitor);
							continue;
						}
						VariousChoicesPanel choicesPanel =
							createParamInfoConflictPanel(functions, pc, monitor);

						choicesPanel.setUseForAll(useForAll);
						choicesPanel.setConflictType("Function Parameter Info");

						setupConflictPanel(listingPanel, choicesPanel, externalLocations, monitor);
						monitor.checkCancelled();
					}

				}
				else {
					mergeParamInfo(functions, paramInfoConflicts, currentConflictOption, monitor);
				}
			}

			// Handle merge of function local variable details.
			if ((conflicts & FUNC_LOCAL_DETAILS) != 0) {
				currentExternalConflictType = ExternalConflictType.LOCAL_VARIABLE_DETAIL_CONFLICT;
				if (localVarConflicts == null) {
					localVarConflicts = determineLocalVariableInfoConflicts(functions, false,
						variableStorageConflicts, monitor);
				}
				if (askUser && mergeManager != null) {
					for (LocalVariableConflict localVariableConflict : localVarConflicts) {
						monitor.checkCancelled();
						ConflictPanel choicesPanel;
						if ((localVariableConflict.varConflicts & VAR_REMOVED) != 0) {
							currentExternalConflictType =
								ExternalConflictType.REMOVED_LOCAL_VARIABLE_CONFLICT;
							// If we have a remove local variable choice then a "Use For All" has already occurred.
							if (removedLocalVariableChoice != ASK_USER) {
								mergeLocalVariable(VAR_REMOVED, myEntryPoint,
									localVariableConflict.vars, removedLocalVariableChoice,
									monitor);
								continue;
							}
							choicesPanel =
								createRemovedVarConflictPanel(localVariableConflict, monitor);

							boolean useForAll = (removedLocalVariableChoice != ASK_USER);
							choicesPanel.setUseForAll(useForAll);
							choicesPanel.setConflictType("Local Variable Removal");
						}
						else {
							currentExternalConflictType =
								ExternalConflictType.LOCAL_VARIABLE_DETAIL_CONFLICT;
							// If we have a local variable detail choice then a "Use For All" has already occurred.
							if (localVariableDetailChoice != ASK_USER) {
								mergeLocal(myEntryPoint, localVariableConflict,
									localVariableDetailChoice, monitor);
								continue;
							}
							choicesPanel =
								createLocalVariableConflictPanel(localVariableConflict, monitor);

							boolean useForAll = (localVariableDetailChoice != ASK_USER);
							choicesPanel.setUseForAll(useForAll);
							choicesPanel.setConflictType("Local Variable Detail");
						}
						setupConflictPanel(listingPanel, choicesPanel, externalLocations, monitor);
					}
				}
				else {
					mergeLocals(myEntryPoint, localVarConflicts, currentConflictOption, monitor);
				}
			}

		}
	}
Puts the LongLongHashtables, that map the symbol IDs from LATEST, MY, and
ORIGINAL programs to the RESULT program symbol IDs, into the Merge Manager.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ExternalFunctionMerger.java