public static Varnode getVarnodeRef(ClangToken token) {
		if (token == null) {
			return null;
		}

		if (token instanceof ClangVariableToken) {
			Varnode res = token.getVarnode();
			if (res != null) {
				return res;
			}
		}

		ClangNode parent = token.Parent();
		if (parent instanceof ClangVariableDecl) {
			HighVariable high = ((ClangVariableDecl) parent).getHighVariable();
			parent = parent.Parent();
			if (parent instanceof ClangFuncProto && high != null) {
				Varnode[] instances = high.getInstances();
				for (Varnode instance : instances) {
					if (instance.isInput()) {
						return instance;
					}
				}
			}
		}
		return null;
	}
If the token refers to an individual Varnode, return it. Otherwise return null

@param token the token to check
@return the Varnode or null otherwise
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/component/DecompilerUtils.java