protected static Symbol getVariableSymbol(Symbol varSym, Function otherFunction) {
		Program program = varSym.getProgram();
		Program otherProgram = otherFunction.getProgram();
		SymbolTable otherSymTable = otherProgram.getSymbolTable();
		Variable var = (Variable) varSym.getObject();
		Symbol otherFuncSym = otherFunction.getSymbol();
		if (otherFuncSym == null || otherFuncSym.getSymbolType() != SymbolType.FUNCTION) {
			return null;
		}
		VariableStorage storage =
			getCompatibleVariableStorage(program, var.getVariableStorage(), otherProgram);
		if (storage == null || storage.isBadStorage()) {
			return null;
		}
		Variable minVar = getOverlappingVariable(otherSymTable, var, storage, otherFuncSym);
		if (minVar != null) {
			return minVar.getSymbol();
		}
		return null;
	}
Find the variable symbol in otherFunction which corresponds to the specified varSym.
@param varSym variable symbol
@param otherFunction other function
@return the variable symbol or null
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/SimpleDiffUtility.java