private Address getVariableAddress(Variable var) {
		Symbol sym = var.getSymbol();
		if (sym == null) {
			return Address.NO_ADDRESS; // auto-params have no symbol
		}
		if (sym.getProgram() != program) {
			// Attempt to locate corresponding variable symbol within the current program
			// to allow for use in Diff operations
			Symbol otherSym = SimpleDiffUtility.getVariableSymbol(sym, program);
			if (otherSym != null) {
				return otherSym.getAddress();
			}
			return Address.NO_ADDRESS;
		}
		return sym.getAddress();
	}
Get the variable associated with this variable location
@return associated function variable
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/VariableLocation.java