public long getThunkedFunctionId(long functionId) {
		lock.acquire();
		try {
			FunctionDB function = cache.get(functionId);
			if (function != null) {
				Function thunkedFunction = function.getThunkedFunction(false);
				return thunkedFunction != null ? thunkedFunction.getID() : -1;
			}
			try {
				DBRecord rec = thunkAdapter.getThunkRecord(functionId);
				return rec != null ? rec.getLongValue(ThunkFunctionAdapter.LINKED_FUNCTION_ID_COL)
						: -1;
			}
			catch (IOException e) {
				dbError(e);
			}
			return -1;
		}
		finally {
			lock.release();
		}
	}
Remove variable references in the given address set.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionManagerDB.java