@SuppressWarnings("unchecked")
	private void readVariable(Map<String, Object> result, Function function,
			List<Variable> stackParams, SourceType sourceType) {

		int offset = (int) (double) result.get("offset");
		int size = (int) (double) result.get("size");

		Map<String, Object> type = (Map<String, Object>) result.get("type");
		DataType dt = findDataType(type);
		if (dt == null) {
			log.appendMsg("Missing datatype: " + type.get("name"));
			dt = Undefined.getUndefinedDataType(size);
		}

		String name = (String) result.get("name");
		if (name != null) {
			name = getUniqueVarName(function, name, offset);
		}

		try {
			Variable var = new LocalVariableImpl(name, dt, offset, program);
			VariableUtilities.checkVariableConflict(function, var, var.getVariableStorage(), true);

			StackFrame stackFrame = function.getStackFrame();
			boolean isParameter = stackFrame.isParameterOffset(offset);
			if (!isParameter) {
				isParameter = stackFrame.isParameterOffset(offset + size - 1);
			}
			if (isParameter) {
				var = new ParameterImpl(name, dt, offset, program);
				stackParams.add(var);
			}
			else {
				var = new LocalVariableImpl(name, dt, offset, program);
				addLocalVar(function, var, sourceType, true);
			}
			String regularComment = (String) result.get("comment");
			var.setComment(regularComment);
		}
		catch (InvalidInputException e) {
			log.appendException(e);
		}
	}
Parses a list of {@link Function function} definitions from SARIF and creates
then, adding them to the current {@link Program program}.
<p>
Information from a TYPEINFO_COMMENT is used in preference to information from
RETURN_TYPE and STACK_FRAME/STACK_VARs that are tagged as parameters.
<p>
DTD for the FUNCTION element:

<pre>
<code>
&lt;!ELEMENT FUNCTION (RETURN_TYPE?, ADDRESS_RANGE*, REGULAR_CMT?, REPEATABLE_CMT?, TYPEINFO_CMT?, STACK_FRAME?, REGISTER_VAR*)&gt;
</code>
</pre>

@param result             the parser
@param options
@param monitor            the task monitor
@throws AddressFormatException if any address is not parsable
@throws CancelledException     if the operation is cancelled through the
                               monitor
Ghidra/Features/Sarif/src/main/java/sarif/managers/FunctionsSarifMgr.java