private void readRegisterVars(XmlPullParser parser, Function func,
			List<Variable> registerParams) {
		XmlElement element = parser.peek();
		while (element.getName().equals("REGISTER_VAR")) {
			element = parser.next();
			try {
				String name = element.getAttribute("NAME");
				String registerName = element.getAttribute("REGISTER");

				DataType dt = findDataType(element);
				String comment = getElementText(parser, "REGULAR_CMT");

				ProgramContext context = program.getProgramContext();
				Register register = context.getRegister(registerName);

				if (dt != null && dt.getLength() > register.getMinimumByteSize()) {
					log.appendMsg("Data type [" + element.getAttribute("DATATYPE") +
						"] too large for register [" + registerName + "]");
					dt = null;
				}

				Variable registerParam = new ParameterImpl(name, dt, register, program);
				registerParam.setComment(comment);
				registerParams.add(registerParam);
			}
			catch (InvalidInputException e) {
				log.appendException(e);
			}
			catch (IllegalArgumentException e) {
				log.appendException(e);
			}

			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