@Override
	public Variable getReferencedVariable(Reference reference) {
		RefType refType = reference.getReferenceType();
		return program.getFunctionManager()
				.getReferencedVariable(reference.getFromAddress(), reference.getToAddress(), 0,
					!refType.isWrite() && (refType.isRead() || refType.isIndirect()));
	}
Attempts to determine which if any of the local functions variables are referenced by the specified
reference.  In utilizing the firstUseOffset scoping model, negative offsets (relative to the functions
entry) are shifted beyond the maximum positive offset within the function.  While this does not account for the
actual instruction flow, it is hopefully accurate enough for most situations.
@see ghidra.program.model.symbol.ReferenceManager#getReferencedVariable(ghidra.program.model.symbol.Reference)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/ReferenceDBManager.java