private Function getFunctionAt(Address addr) {
		if (cachedFunction != null && cachedFunction.getEntryPoint().equals(addr)) {
			return cachedFunction;
		}
		ExternalReference extRef = getExternalReference(addr);
		if (extRef != null) {
			return listing.getFunctionAt(extRef.getToAddress());
		}
		return listing.getFunctionAt(addr);
	}
Return the global object being referred to by addr

@param addr = Address being queried
@return the global object
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileCallback.java