private GoFunctionMultiReturn fixupFormalFuncDef(DWARFFunction dfunc,
			GoParamStorageAllocator storageAllocator, DataTypeManager dtm) {
		// Go funcs can have multiple return values, which are marked up in dwarf as parameters with
		// a special boolean flag.  Unnamed return values typically have a "~r0", "~r1", etc name
		// auto-assigned.
		// Pull them out of the param list and create a structure to hold them as the return value
		// They also need to be sorted so that stack storage items appear last, after register items.
		// Note: sometimes Go will duplicate the dwarf information about return values, which
		// will lead to have multiple "~r0", "~r1" elements.  These need to be de-duped.
		List<DWARFVariable> realParams = new ArrayList<>();
		List<DWARFVariable> returnParams = new ArrayList<>();
		Set<String> returnParamNames = new HashSet<>();
		for (DWARFVariable dvar : dfunc.params) {
			if (dvar.isOutputParameter) {
				if (returnParamNames.contains(dvar.name.getName())) {
					// skip this, its probably a duplicate.  Golang github issue #61357
					continue;
				}
				returnParamNames.add(dvar.name.getName());

				returnParams.add(dvar);
			}
			else {
				realParams.add(dvar);
			}
		}

		DataType returnType = VoidDataType.dataType;
		GoFunctionMultiReturn multiReturn = null;
		if (returnParams.size() == 1) {
			returnType = returnParams.get(0).type;
		}
		else if (returnParams.size() > 1) {
			multiReturn = new GoFunctionMultiReturn(GoConstants.GOLANG_CATEGORYPATH, returnParams,
				dfunc, dtm, storageAllocator);
			returnType = multiReturn.getStruct();
		}
		dfunc.retval = DWARFVariable.fromDataType(dfunc, returnType);
		dfunc.params = realParams;
		dfunc.varArg = false;	// golang varargs are implemented via slice parameter, so this is always false

		return multiReturn;
	}
Returns true if the specified {@link DWARFFunction} wrapper refers to a function in a golang
compile unit.

@param dfunc {@link DWARFFunction}
@return boolean true or false
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/GolangDWARFFunctionFixup.java