@SuppressWarnings("unchecked")
	private ReturnParameterImpl readReturnType(Map<String, Object> result, Function function) {

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

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

		try {
			List<String> rnames = (List<String>) result.get("registers");
			if (rnames != null) {
				List<Varnode> vnodes =
					convertRegisterListToVarnodeStorage(rnames, dt.getLength(), offset);
				VariableStorage returnStorage = new VariableStorage(program, vnodes);
				return new ReturnParameterImpl(dt, returnStorage, true, program);
			}

			if (offset >= 0) {
				return new ReturnParameterImpl(dt, offset, program);
			}
			return new ReturnParameterImpl(dt, program);
		}
		catch (InvalidInputException e) {
			log.appendException(e);
			return null;
		}
	}
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