public VariableStorage getArgLocation(int argIndex, Parameter[] params, DataType dataType,
			Program program) {

		if (dataType != null) {
			dataType = dataType.clone(program.getDataTypeManager());
			// Identify next arg index based upon number of storage varnodes 
			// already assigned to parameters - this may not work well if
			// customized storage has been used
		}

		DataType arr[] = new DataType[argIndex + 2];
		arr[0] = VoidDataType.dataType;				// Assume the return type is void
		for (int i = 0; i < argIndex; ++i) {
			if (params != null && i < params.length) {
				arr[i + 1] = params[i].getDataType();			// Copy in current types if we have them
			}
			else {
				arr[i + 1] = Undefined1DataType.dataType;		// Otherwise assume 1-byte (integer) type
			}
		}
		arr[argIndex + 1] = dataType;

		VariableStorage res[] = getStorageLocations(program, arr, false);
		return res[res.length - 1];
	}
Get the preferred parameter location for a specified index,
which will be added/inserted within the set of existing function params.
If existing parameters use custom storage, this method should not be used.
<br>
Note: storage will not be assigned to the {@link DataType#DEFAULT default undefined} datatype,
zero-length datatype, or any subsequent parameter following such a parameter.
<br>
Warning: The use of this method with a null {@code params} argument, or incorrect
datatypes, is highly discouraged since it will produce inaccurate results.
It is recommended that a complete function signature be used in
conjunction with the {@link #getStorageLocations(Program, DataType[], boolean)}
method.  Parameter storage allocation may be affected by the return datatype
specified (e.g., hidden return storage parameter).
 
@param argIndex is the index (0: return storage, 1..n: parameter storage)
@param params existing set parameters to which the parameter specified by
argIndex will be added/inserted be appended. Element-0 corresponds to the return
datatype. Parameter elements prior to the argIndex are required for an accurate 
storage determination to be made.  Any preceeding parameters not specified will be assumed 
as a 1-byte integer type which could cause an erroneous storage result to be returned.  
A null params list will cause all preceeding params to be assumed in a similar fashion.
@param dataType dataType associated with next parameter location or null
for a default undefined type.
@param program is the Program
@return parameter location or {@link VariableStorage#UNASSIGNED_STORAGE} if
unable to determine suitable location
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/lang/PrototypeModel.java