private void checkForStackOffset(VarnodeContext context, Instruction instr,
					Address address, int opIndex) {
				AddressSpace space = address.getAddressSpace();
				String spaceName = space.getName();
				if (spaceName.startsWith("track_") || context.isStackSpaceName(spaceName)) {
					if (opIndex == -1) {
						opIndex = getStackOpIndex(context, instr, (int) address.getOffset());
						// if didn't get the right opIndex, and has a delayslot, check for good stack ref
						if (opIndex == -1 && instr.getPrototype().hasDelaySlots()) {
							instr = instr.getNext();
							if (instr == null) {
								return;
							}
							opIndex = getStackOpIndex(context, instr, (int) address.getOffset());
						}
					}
					if (opIndex == -1) {
						return;
					}
					// if restoring the same value into the register, don't record the reference
					// TODO: Dirty Dirty nasty Hack for POP EBP problem, only very few cases of this!
					if (isX86 && instr.getMnemonicString().equals("POP")) {
						Register reg = instr.getRegister(opIndex);
						if (reg != null && reg.getName().contains("BP")) {
							return;
						}
					}
					long extendedOffset = extendOffset(address.getOffset(), stackReg.getBitLength());
					
					defineFuncVariable(symEval, func, instr, opIndex, (int) extendedOffset, sortedVariables);
				}
			}
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/NewFunctionStackAnalysisCmd.java