private void readStackVariables(XmlPullParser parser, Function function,
			boolean overwriteConflicts, List<Variable> stackVariables, List<Variable> stackParams) {

		XmlElement element = parser.peek();
		while (element.getName().equals("STACK_VAR")) {
			element = parser.next();
			String stackPtrStringValue = element.getAttribute("STACK_PTR_OFFSET");
			if (stackPtrStringValue == null) {
				stackPtrStringValue = element.getAttribute("OFFSET");
			}
			int offset =
				stackPtrStringValue == null ? 0 : XmlUtilities.parseInt(stackPtrStringValue);

			String sizeStringValue = element.getAttribute("SIZE");
			int size = 1;
			if (stackPtrStringValue != null) {
				size = XmlUtilities.parseInt(sizeStringValue);
			}

			boolean isParameter = function.getStackFrame().isParameterOffset(offset);

			String originalName = element.getAttribute("NAME");

			DataType dt = findDataType(element);
			if (dt == null) {
				dt = Undefined.getUndefinedDataType(size);
			}

			String name = originalName;
			if (name != null) {
				name = getUniqueVarName(function, name, offset);
			}

			try {
				String regularComment = getElementText(parser, "REGULAR_CMT");

				Variable var = new LocalVariableImpl(name, dt, offset, program);

				VariableUtilities.checkVariableConflict(function, var, var.getVariableStorage(),
					overwriteConflicts);

				if (isParameter) {
					var = new ParameterImpl(name, dt, offset, program);
					stackParams.add(var);
				}
				else {
					var = new LocalVariableImpl(name, dt, offset, program);
					stackVariables.add(var);
				}
				var.setComment(regularComment);
			}
			catch (InvalidInputException e) {
				log.appendException(e);
			}

			element = parser.peek();
			getElementText(parser, "REPEATABLE_CMT");

			element = parser.next();
			element = parser.peek();
		}
	}
Parses a list of {@link Function function} definitions from xml 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 parser the parser
@param overwriteConflicts true to overwrite any conflicts
@param ignoreStackFrames true to ignore stack frames
@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/Base/src/main/java/ghidra/app/util/xml/FunctionsXmlMgr.java