void updateParameterAndReturnStorage() {
		if (allowCustomStorage) {
			autoParamCount = 0;
			return;
		}
		PrototypeModel effectiveCallingConvention = getEffectiveCallingConvention();

		if (effectiveCallingConvention == null) {
			for (ParamInfo info : parameters) {
				info.setStorage(VariableStorage.UNASSIGNED_STORAGE);
			}
			return;
		}

		DataType[] dataTypes = new DataType[parameters.size() - autoParamCount + 1];
		dataTypes[0] = returnInfo.getFormalDataType();

		int index = 1;
		for (int i = autoParamCount; i < parameters.size(); i++) {
			dataTypes[index++] = parameters.get(i).getFormalDataType();
		}

		VariableStorage[] paramStorage =
			effectiveCallingConvention.getStorageLocations(getProgram(), dataTypes, true);

		returnInfo.setStorage(paramStorage[0]);

		List<ParamInfo> oldParams = parameters;
		int oldAutoCount = autoParamCount;

		parameters = new ArrayList<>();
		autoParamCount = 0;

		int ordinal = 0;
		for (int i = 1; i < paramStorage.length; i++) {
			VariableStorage storage = paramStorage[i];
			ParamInfo info;
			if (storage.isAutoStorage()) {
				DataType dt = VariableUtilities.getAutoDataType(function,
					returnInfo.getFormalDataType(), storage);
				try {
					info = new ParamInfo(this,
						new AutoParameterImpl(dt, ++autoParamCount, storage, function));
				}
				catch (InvalidInputException e) {
					throw new AssertException(e); // unexpected
				}
			}
			else {
				info = oldParams.get(oldAutoCount + ordinal);
				info.setStorage(storage);
				++ordinal;
			}
			parameters.add(info);
		}
		fixupOrdinals();
	}
Update dynamic storage and auto-params when custom storage is disasbled.
Returns immediately if custom storage is enabled.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionData.java