private int createStackPointerVariables(Function func, TaskMonitor monitor)
			throws CancelledException {
		// check if this is a jump thunk through a function pointer
		if (func.isThunk()) {
			return func.getStackPurgeSize();
		}

		// if it already has stack variables
//		if (func.getStackFrame().getStackVariables().length > 0 && !forceProcessing) {
//			return func.getStackPurgeSize();
//		}

		// TODO: Taking this out  could cause problems with importing from XML.
		//    The XML would have the stack defined, and all references.
		//    If we go and re-analyze, it could overwrite or change the references.
//		dontCreateNewVariables = (func.getStackFrame().getStackVariables().length > 0 && !forceProcessing);

		CallDepthChangeInfo info = new CallDepthChangeInfo(func, monitor);

		InstructionIterator iter = program.getListing().getInstructions(func.getBody(), true);
		while (iter.hasNext()) {
			monitor.checkCancelled();
			Instruction instr = iter.next();

			// process any stack pointer references
			int numOps = instr.getNumOperands();
			for (int opIndex = 0; opIndex < numOps; opIndex++) {
				int offset = info.getStackOffset(instr, opIndex);
				if (offset == Function.INVALID_STACK_DEPTH_CHANGE) {
					continue;
				}

				defineFuncVariable(func, instr, opIndex, offset);
			}
		}

		return info.getStackPurge();
	}
Create locals and parameters based on references involving purely the stack pointer.
Pushes, Pops, and arithmetic manipulation of the stack pointer must be tracked.

@param func - function to analyze stack pointer references
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/FunctionStackAnalysisCmd.java