private static Address getReference(Program program, Address refToAddress) {
		// If the type is a call then get the function
		// If the function is a thunk - get the thunked to function and make that the implied match
		// source not the thunk

		// if the reference is a thunk function change the refToAddress to the THUNKED function
		// address instead of the thunk function address
		Function referencedFunction = program.getFunctionManager().getFunctionAt(refToAddress);
		if ((referencedFunction != null) && (referencedFunction.isThunk())) {
			refToAddress = referencedFunction.getThunkedFunction(true).getEntryPoint();
		}

		return refToAddress;
	}
This method checks to see if the given reference is a thunk function and if so returns
the address of the thunked function instead of thunk function
@param program the program
@param refToAddress The address of the interesting reference
@return Returns either the same address passed in or the address of the thunked function if
the original address refers to a thunk
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/util/ImpliedMatchUtils.java