private List<Variable> getVariablesIntersecting(int offset, int size,
			List<Variable> sortedVariables) {

		List<Variable> list = null;

		int maxOffset = offset + size - 1;

		while (offset <= maxOffset) {
			Variable var = getVariableContaining(offset, sortedVariables);
			if (var != null) {
				if (list == null) {
					list = new ArrayList<>();
				}
				list.add(var);
				offset += var.getLength();
			}
			else {
				++offset;
			}
		}

		return list;
	}
Look at the result register to try and figure out stack access size.
@param symEval 

@param instr instruction being analyzed
@param opIndex operand that has a stack reference.

@return size of value referenced on the stack
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/NewFunctionStackAnalysisCmd.java