static FrameNode getFrameNode(Varnode offsetValue, Language language) {
		long frameOffset = 0;
		Varnode framePointer;
		if (offsetValue instanceof VarnodeOperation) {
			VarnodeOperation op = (VarnodeOperation) offsetValue;
			int opCode = op.getPCodeOp().getOpcode();
			if (opCode != PcodeOp.INT_ADD && opCode != PcodeOp.INT_SUB) {
				return null; // unsupported offsetValue operation
			}
			Varnode[] inputValues = op.getInputValues();
			if (inputValues[0].isConstant()) {
				frameOffset = ResultsState.getSignedOffset(inputValues[0]);
				framePointer = inputValues[1];
			}
			else if (inputValues[1].isConstant()) {
				frameOffset = ResultsState.getSignedOffset(inputValues[1]);
				framePointer = inputValues[0];
			}
			else {
				return null; // only INT_ADD and INT_SUB with constant is supported
			}
			if (opCode == PcodeOp.INT_SUB) {
				frameOffset = -frameOffset;
			}
		}
		else {
			// address, register or unique
			framePointer = offsetValue;
		}
		return new FrameNode(framePointer, frameOffset, language);
	}
Get a new varnode which corresponds to the specified bytePos within the specified varnode.
@param varnode
@param bytePos
@return
Ghidra/Features/Base/src/main/java/ghidra/util/state/ContextState.java