private boolean isProtectedVariable(Variable var) {
		return !var.isStackVariable() || !Undefined.isUndefined(var.getDataType()) ||
			var.getSource() == SourceType.IMPORTED || var.getSource() == SourceType.USER_DEFINED ||
			var.isCompoundVariable();
	}
Analyze a function to build a stack frame based on stack references.

@param f   function to analyze
@param monitor the task monitor that is checked to see if the command has
been cancelled.
@throws CancelledException if the user canceled this command
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/NewFunctionStackAnalysisCmd.java