void mergeProgramContext(AddressSetView originAddressSet, TaskMonitor monitor)
			throws CancelledException, UnsupportedOperationException {

		if (!originToResultTranslator.isOneForOneTranslator()) {
			String message = originToResultTranslator.getClass().getName() +
				" is not a one for one translator and can't merge program context.";
			throw new UnsupportedOperationException(message);
		}
		monitor.setMessage("Applying Program Context...");
		if (originAddressSet.isEmpty()) {
			return;
		}

		ProgramContext resultContext = resultProgram.getProgramContext();
		ProgramContext originContext = originProgram.getProgramContext();
		ArrayList<Register> originRegs = new ArrayList<>(originContext.getRegisters());
		// Sort the registers by size so that largest come first.
		// This prevents the remove call below from incorrectly clearing
		// smaller registers that are part of a larger register.
		Collections.sort(originRegs, (r1, r2) -> r2.getBitLength() - r1.getBitLength());
		AddressRangeIterator originRangeIter = originAddressSet.getAddressRanges();
		while (originRangeIter.hasNext() && !monitor.isCancelled()) {
			AddressRange originRange = originRangeIter.next();
			AddressRange resultRange = originToResultTranslator.getAddressRange(originRange);
			monitor.setMessage(
				"Applying Program Context: " + originRange.getMinAddress().toString(true));
			for (Register originReg : originRegs) {
				if (!originReg.isBaseRegister() || originReg.isProcessorContext()) {
					continue;
				}
				monitor.checkCancelled();
				try {
					mergeProgramContext(resultContext, originContext, originReg, originRange,
						resultRange, monitor);
				}
				catch (ContextChangeException e) {
					Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
				}
			}
		}
	}
<CODE>mergeProgramContext</CODE> merges the program context (register values)
into the result program.

@param originAddressSet the addresses to be merged.
The addresses in this set are derived from the origin program.
@param monitor the task monitor for notifying the user of this merge's
progress.
@throws CancelledException if user cancels via the monitor.
@throws UnsupportedOperationException if the ProgramMerge translator is not a
"one for one translator".
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java