public static Integer getBaseStackParamOffset(Function function) {
		PrototypeModel convention = function.getCallingConvention();
		if (convention == null) {
			convention = function.getProgram().getCompilerSpec().getDefaultCallingConvention();
		}

		// If we have conventions, try to figure out where the parameters do start
		//   if no conventions or stack parameter defs, assume 0
		//
		Integer baseOffset = null;
		if (convention != null) {
			Long val = convention.getStackParameterOffset();
			if (val == null) {
				baseOffset = convention.getStackshift();
			}
			else {
				baseOffset = val.intValue();
			}
		}
		return baseOffset;
	}
Determine the minimum stack offset for parameters
@param function function whose stack use is to be examined
@return stack parameter offset or null if it could not be determined
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/VariableUtilities.java