private Varnode getStackOffset(PcodeOp loadStoreOp, Varnode offsetValue, TaskMonitor monitor) {
		Varnode stackPtr = getStackPointerVarnode();
		if (offsetValue instanceof VarnodeOperation) {
			VarnodeOperation op = (VarnodeOperation) offsetValue;
			int opcode = op.getPCodeOp().getOpcode();
			Varnode[] inputs = op.getInputValues();
			if (opcode == PcodeOp.INT_ADD) {
				if (inputs[0].isConstant() && inputs[1].equals(stackPtr)) {
					return inputs[0];
				}
				if (inputs[1].isConstant() && inputs[0].equals(stackPtr)) {
					return inputs[1];
				}
			}
			else if (opcode == PcodeOp.INT_SUB) {
				if (inputs[1].isConstant() && inputs[0].equals(stackPtr)) {
					return new Varnode(addrFactory.getConstantAddress(-getSignedOffset(inputs[1])),
						inputs[1].getSize());
				}
			}
		}
		else if (offsetValue.equals(stackPtr)) {
			return new Varnode(addrFactory.getConstantAddress(0), stackPtr.getSize());
		}
		return null;
	}
Check varnode for possible stack read/write and provide
stack address varnode replacement.
@param pcodeOp operation which references stack location as input
@param offsetValue offset value
@return a stack offset if appropriate or null.
Ghidra/Features/Base/src/main/java/ghidra/util/state/ResultsState.java