/* cli.c generated by valac 0.56.19, the Vala compiler
 * generated from cli.vala, do not modify */

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <stdarg.h>
#include <gobject/gvaluecollector.h>
#include <gio/gio.h>
#include "config.h"
#include <glib/gi18n-lib.h>
#include <gee.h>
#include <stdio.h>

#define PROTON_PLUS_CLI_CMD_VERSION "version"
#define PROTON_PLUS_CLI_CMD_HELP "help"
#define PROTON_PLUS_CLI_CMD_LIST "list"
#define PROTON_PLUS_CLI_CMD_INSTALL "install"
#define PROTON_PLUS_CLI_CMD_UNINSTALL "uninstall"
#define PROTON_PLUS_CLI_CMD_UPDATE "update"
#define PROTON_PLUS_CLI_OPT_LATEST "latest"
#define PROTON_PLUS_CLI_OPT_ALL "all"
#define PROTON_PLUS_CLI_OUTPUT_RESET "\033[0m"
#define PROTON_PLUS_CLI_OUTPUT_BOLD "\033[1m"
#define PROTON_PLUS_CLI_OUTPUT_RED "\033[31m"
#define PROTON_PLUS_CLI_OUTPUT_GREEN "\033[32m"
#define PROTON_PLUS_CLI_OUTPUT_YELLOW "\033[33m"
#define PROTON_PLUS_CLI_OUTPUT_BLUE "\033[34m"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PROTON_PLUS_CLI_TYPE_OUTPUT (proton_plus_cli_output_get_type ())
#define PROTON_PLUS_CLI_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_CLI_TYPE_OUTPUT, ProtonPlusCLIOutput))
#define PROTON_PLUS_CLI_OUTPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_CLI_TYPE_OUTPUT, ProtonPlusCLIOutputClass))
#define PROTON_PLUS_CLI_IS_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_CLI_TYPE_OUTPUT))
#define PROTON_PLUS_CLI_IS_OUTPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_CLI_TYPE_OUTPUT))
#define PROTON_PLUS_CLI_OUTPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_CLI_TYPE_OUTPUT, ProtonPlusCLIOutputClass))

typedef struct _ProtonPlusCLIOutput ProtonPlusCLIOutput;
typedef struct _ProtonPlusCLIOutputClass ProtonPlusCLIOutputClass;
typedef struct _ProtonPlusCLIOutputPrivate ProtonPlusCLIOutputPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ProtonPlusCLIParamSpecOutput ProtonPlusCLIParamSpecOutput;

#define PROTON_PLUS_CLI_TYPE_HANDLER (proton_plus_cli_handler_get_type ())
#define PROTON_PLUS_CLI_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_CLI_TYPE_HANDLER, ProtonPlusCLIHandler))
#define PROTON_PLUS_CLI_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_CLI_TYPE_HANDLER, ProtonPlusCLIHandlerClass))
#define PROTON_PLUS_CLI_IS_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_CLI_TYPE_HANDLER))
#define PROTON_PLUS_CLI_IS_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_CLI_TYPE_HANDLER))
#define PROTON_PLUS_CLI_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_CLI_TYPE_HANDLER, ProtonPlusCLIHandlerClass))

typedef struct _ProtonPlusCLIHandler ProtonPlusCLIHandler;
typedef struct _ProtonPlusCLIHandlerClass ProtonPlusCLIHandlerClass;
typedef struct _ProtonPlusCLIHandlerPrivate ProtonPlusCLIHandlerPrivate;

#define PROTON_PLUS_MODELS_TYPE_LAUNCHER (proton_plus_models_launcher_get_type ())
#define PROTON_PLUS_MODELS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher))
#define PROTON_PLUS_MODELS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))
#define PROTON_PLUS_MODELS_IS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_IS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))

typedef struct _ProtonPlusModelsLauncher ProtonPlusModelsLauncher;
typedef struct _ProtonPlusModelsLauncherClass ProtonPlusModelsLauncherClass;
#define _proton_plus_cli_handler_unref0(var) ((var == NULL) ? NULL : (var = (proton_plus_cli_handler_unref (var), NULL)))
typedef struct _ProtonPlusCliHandlerRunData ProtonPlusCliHandlerRunData;
typedef struct _ProtonPlusModelsLauncherPrivate ProtonPlusModelsLauncherPrivate;

#define PROTON_PLUS_MODELS_TYPE_GAME (proton_plus_models_game_get_type ())
#define PROTON_PLUS_MODELS_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGame))
#define PROTON_PLUS_MODELS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))
#define PROTON_PLUS_MODELS_IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))

typedef struct _ProtonPlusModelsGame ProtonPlusModelsGame;
typedef struct _ProtonPlusModelsGameClass ProtonPlusModelsGameClass;

#define PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER (proton_plus_models_simple_runner_get_type ())
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunner))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))

typedef struct _ProtonPlusModelsSimpleRunner ProtonPlusModelsSimpleRunner;
typedef struct _ProtonPlusModelsSimpleRunnerClass ProtonPlusModelsSimpleRunnerClass;

#define PROTON_PLUS_MODELS_TYPE_GROUP (proton_plus_models_group_get_type ())
#define PROTON_PLUS_MODELS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup))
#define PROTON_PLUS_MODELS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))
#define PROTON_PLUS_MODELS_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))

typedef struct _ProtonPlusModelsGroup ProtonPlusModelsGroup;
typedef struct _ProtonPlusModelsGroupClass ProtonPlusModelsGroupClass;
typedef enum  {
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP
} ProtonPlusModelsLauncherInstallationTypes;

#define PROTON_PLUS_MODELS_LAUNCHER_TYPE_INSTALLATION_TYPES (proton_plus_models_launcher_installation_types_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PROTON_PLUS_MODELS_TYPE_RUNNER (proton_plus_models_runner_get_type ())
#define PROTON_PLUS_MODELS_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_RUNNER, ProtonPlusModelsRunner))
#define PROTON_PLUS_MODELS_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_RUNNER, ProtonPlusModelsRunnerClass))
#define PROTON_PLUS_MODELS_IS_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_RUNNER))
#define PROTON_PLUS_MODELS_IS_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_RUNNER))
#define PROTON_PLUS_MODELS_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_RUNNER, ProtonPlusModelsRunnerClass))

typedef struct _ProtonPlusModelsRunner ProtonPlusModelsRunner;
typedef struct _ProtonPlusModelsRunnerClass ProtonPlusModelsRunnerClass;
typedef struct _ProtonPlusCliHandlerHandleInstallData ProtonPlusCliHandlerHandleInstallData;
typedef struct _ProtonPlusCliHandlerHandleUninstallData ProtonPlusCliHandlerHandleUninstallData;
typedef struct _ProtonPlusCliHandlerHandleUpdateData ProtonPlusCliHandlerHandleUpdateData;

#define PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC (proton_plus_models_runners_basic_get_type ())
#define PROTON_PLUS_MODELS_RUNNERS_BASIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC, ProtonPlusModelsRunnersBasic))
#define PROTON_PLUS_MODELS_RUNNERS_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC, ProtonPlusModelsRunnersBasicClass))
#define PROTON_PLUS_MODELS_RUNNERS_IS_BASIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC))
#define PROTON_PLUS_MODELS_RUNNERS_IS_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC))
#define PROTON_PLUS_MODELS_RUNNERS_BASIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC, ProtonPlusModelsRunnersBasicClass))

typedef struct _ProtonPlusModelsRunnersBasic ProtonPlusModelsRunnersBasic;
typedef struct _ProtonPlusModelsRunnersBasicClass ProtonPlusModelsRunnersBasicClass;
typedef enum  {
	PROTON_PLUS_RETURN_CODE_UNKNOWN_ERROR,
	PROTON_PLUS_RETURN_CODE_RELEASES_LOADED,
	PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE,
	PROTON_PLUS_RETURN_CODE_RUNNERS_UPDATED,
	PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED,
	PROTON_PLUS_RETURN_CODE_VALID_REQUEST,
	PROTON_PLUS_RETURN_CODE_CONNECTION_ISSUE,
	PROTON_PLUS_RETURN_CODE_CONNECTION_REFUSED,
	PROTON_PLUS_RETURN_CODE_CONNECTION_UNKNOWN,
	PROTON_PLUS_RETURN_CODE_API_LIMIT_REACHED,
	PROTON_PLUS_RETURN_CODE_INVALID_ACCESS_TOKEN
} ProtonPlusReturnCode;

#define PROTON_PLUS_TYPE_RETURN_CODE (proton_plus_return_code_get_type ())
typedef struct _ProtonPlusModelsRunnerPrivate ProtonPlusModelsRunnerPrivate;

#define PROTON_PLUS_MODELS_TYPE_BASE_RELEASE (proton_plus_models_base_release_get_type ())
#define PROTON_PLUS_MODELS_BASE_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE, ProtonPlusModelsBaseRelease))
#define PROTON_PLUS_MODELS_BASE_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE, ProtonPlusModelsBaseReleaseClass))
#define PROTON_PLUS_MODELS_IS_BASE_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE))
#define PROTON_PLUS_MODELS_IS_BASE_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE))
#define PROTON_PLUS_MODELS_BASE_RELEASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE, ProtonPlusModelsBaseReleaseClass))

typedef struct _ProtonPlusModelsBaseRelease ProtonPlusModelsBaseRelease;
typedef struct _ProtonPlusModelsBaseReleaseClass ProtonPlusModelsBaseReleaseClass;

#define PROTON_PLUS_MODELS_TYPE_RELEASE (proton_plus_models_release_get_type ())
#define PROTON_PLUS_MODELS_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsRelease))
#define PROTON_PLUS_MODELS_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsReleaseClass))
#define PROTON_PLUS_MODELS_IS_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_RELEASE))
#define PROTON_PLUS_MODELS_IS_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_RELEASE))
#define PROTON_PLUS_MODELS_RELEASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsReleaseClass))

typedef struct _ProtonPlusModelsRelease ProtonPlusModelsRelease;
typedef struct _ProtonPlusModelsReleaseClass ProtonPlusModelsReleaseClass;

#define PROTON_PLUS_MODELS_RELEASES_TYPE_BASIC (proton_plus_models_releases_basic_get_type ())
#define PROTON_PLUS_MODELS_RELEASES_BASIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_BASIC, ProtonPlusModelsReleasesBasic))
#define PROTON_PLUS_MODELS_RELEASES_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RELEASES_TYPE_BASIC, ProtonPlusModelsReleasesBasicClass))
#define PROTON_PLUS_MODELS_RELEASES_IS_BASIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_BASIC))
#define PROTON_PLUS_MODELS_RELEASES_IS_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RELEASES_TYPE_BASIC))
#define PROTON_PLUS_MODELS_RELEASES_BASIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_BASIC, ProtonPlusModelsReleasesBasicClass))

typedef struct _ProtonPlusModelsReleasesBasic ProtonPlusModelsReleasesBasic;
typedef struct _ProtonPlusModelsReleasesBasicClass ProtonPlusModelsReleasesBasicClass;

#define PROTON_PLUS_MODELS_RELEASES_TYPE_LATEST (proton_plus_models_releases_latest_get_type ())
#define PROTON_PLUS_MODELS_RELEASES_LATEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_LATEST, ProtonPlusModelsReleasesLatest))
#define PROTON_PLUS_MODELS_RELEASES_LATEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RELEASES_TYPE_LATEST, ProtonPlusModelsReleasesLatestClass))
#define PROTON_PLUS_MODELS_RELEASES_IS_LATEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_LATEST))
#define PROTON_PLUS_MODELS_RELEASES_IS_LATEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RELEASES_TYPE_LATEST))
#define PROTON_PLUS_MODELS_RELEASES_LATEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_LATEST, ProtonPlusModelsReleasesLatestClass))

typedef struct _ProtonPlusModelsReleasesLatest ProtonPlusModelsReleasesLatest;
typedef struct _ProtonPlusModelsReleasesLatestClass ProtonPlusModelsReleasesLatestClass;
typedef struct _ProtonPlusCliHandlerInstallLatestData ProtonPlusCliHandlerInstallLatestData;
typedef struct _ProtonPlusCliHandlerInstallInteractiveData ProtonPlusCliHandlerInstallInteractiveData;
typedef struct _ProtonPlusCliHandlerUninstallInteractiveData ProtonPlusCliHandlerUninstallInteractiveData;
typedef struct _ProtonPlusCliHandlerUninstallRunnerAllData ProtonPlusCliHandlerUninstallRunnerAllData;
typedef struct _ProtonPlusModelsGroupPrivate ProtonPlusModelsGroupPrivate;

#define PROTON_PLUS_MODELS_TYPE_PARAMETERS (proton_plus_models_parameters_get_type ())
#define PROTON_PLUS_MODELS_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_PARAMETERS, ProtonPlusModelsParameters))
#define PROTON_PLUS_MODELS_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_PARAMETERS, ProtonPlusModelsParametersClass))
#define PROTON_PLUS_MODELS_IS_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_PARAMETERS))
#define PROTON_PLUS_MODELS_IS_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_PARAMETERS))
#define PROTON_PLUS_MODELS_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_PARAMETERS, ProtonPlusModelsParametersClass))

typedef struct _ProtonPlusModelsParameters ProtonPlusModelsParameters;
typedef struct _ProtonPlusModelsParametersClass ProtonPlusModelsParametersClass;
typedef struct _ProtonPlusCliHandlerUninstallLauncherAllData ProtonPlusCliHandlerUninstallLauncherAllData;
typedef struct _ProtonPlusCliHandlerUninstallSingleReleaseData ProtonPlusCliHandlerUninstallSingleReleaseData;
typedef struct _ProtonPlusCliHandlerUpdateAllData ProtonPlusCliHandlerUpdateAllData;
typedef struct _ProtonPlusCliHandlerUpdateLauncherData ProtonPlusCliHandlerUpdateLauncherData;
typedef struct _ProtonPlusCliHandlerUpdateRunnerData ProtonPlusCliHandlerUpdateRunnerData;
typedef struct _ProtonPlusCliHandlerCollectLatestRunnersData ProtonPlusCliHandlerCollectLatestRunnersData;
typedef struct _ProtonPlusCliHandlerUpdateRunnerBatchData ProtonPlusCliHandlerUpdateRunnerBatchData;
typedef struct _ProtonPlusCliHandlerUpdateRunnerWithProgressData ProtonPlusCliHandlerUpdateRunnerWithProgressData;
typedef struct _ProtonPlusCliHandlerLoadLaunchersData ProtonPlusCliHandlerLoadLaunchersData;
typedef struct _ProtonPlusCliHandlerLoadRunnerReleasesData ProtonPlusCliHandlerLoadRunnerReleasesData;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _ProtonPlusCLIParamSpecHandler ProtonPlusCLIParamSpecHandler;

struct _ProtonPlusCLIOutput {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ProtonPlusCLIOutputPrivate * priv;
};

struct _ProtonPlusCLIOutputClass {
	GTypeClass parent_class;
	void (*finalize) (ProtonPlusCLIOutput *self);
};

struct _ProtonPlusCLIParamSpecOutput {
	GParamSpec parent_instance;
};

struct _ProtonPlusCLIHandler {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ProtonPlusCLIHandlerPrivate * priv;
};

struct _ProtonPlusCLIHandlerClass {
	GTypeClass parent_class;
	void (*finalize) (ProtonPlusCLIHandler *self);
};

struct _ProtonPlusCLIHandlerPrivate {
	GList* launchers;
};

struct _ProtonPlusCliHandlerRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	gchar** args;
	gint args_length1;
	gint result;
	gchar* command;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GQuark _tmp5_;
	const gchar* _tmp6_;
};

struct _ProtonPlusModelsLauncher {
	GObject parent_instance;
	ProtonPlusModelsLauncherPrivate * priv;
	gchar* title;
	gchar* icon_path;
	gchar* directory;
	gboolean installed;
	gboolean has_library_support;
	GList* games;
	GeeArrayList* compatibility_tools;
	ProtonPlusModelsGroup** groups;
	gint groups_length1;
	ProtonPlusModelsLauncherInstallationTypes installation_type;
};

struct _ProtonPlusModelsLauncherClass {
	GObjectClass parent_class;
	void (*load_game_library) (ProtonPlusModelsLauncher* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*load_game_library_finish) (ProtonPlusModelsLauncher* self, GAsyncResult* _res_);
	gint (*get_compatibility_tool_usage_count) (ProtonPlusModelsLauncher* self, const gchar* compatibility_tool_name);
};

struct _ProtonPlusCliHandlerHandleInstallData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	gchar** args;
	gint args_length1;
	gint result;
	ProtonPlusModelsLauncher* launcher;
	const gchar* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	ProtonPlusModelsRunner* runner;
	ProtonPlusModelsLauncher* _tmp3_;
	const gchar* _tmp4_;
	ProtonPlusModelsRunner* _tmp5_;
	ProtonPlusModelsRunner* _tmp6_;
	gboolean _tmp7_;
	const gchar* _tmp8_;
	gboolean use_latest;
	gint _tmp9_;
	ProtonPlusModelsRunner* _tmp10_;
	ProtonPlusModelsRunner* _tmp11_;
};

struct _ProtonPlusCliHandlerHandleUninstallData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	gchar** args;
	gint args_length1;
	gint result;
	ProtonPlusModelsLauncher* launcher;
	const gchar* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	const gchar* _tmp3_;
	ProtonPlusModelsLauncher* _tmp4_;
	ProtonPlusModelsRunner* runner;
	ProtonPlusModelsLauncher* _tmp5_;
	const gchar* _tmp6_;
	ProtonPlusModelsRunner* _tmp7_;
	ProtonPlusModelsRunner* _tmp8_;
	gboolean _tmp9_;
	const gchar* _tmp10_;
	gboolean uninstall_all;
	gint _tmp11_;
	ProtonPlusModelsRunner* _tmp12_;
	ProtonPlusModelsRunner* _tmp13_;
};

struct _ProtonPlusCliHandlerHandleUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	gchar** args;
	gint args_length1;
	gint result;
	const gchar* _tmp0_;
	ProtonPlusModelsLauncher* launcher;
	const gchar* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	ProtonPlusModelsLauncher* _tmp3_;
	ProtonPlusModelsRunner* runner;
	ProtonPlusModelsLauncher* _tmp4_;
	const gchar* _tmp5_;
	ProtonPlusModelsRunner* _tmp6_;
	ProtonPlusModelsRunner* _tmp7_;
	ProtonPlusModelsRunner* _tmp8_;
	ProtonPlusModelsLauncher* _tmp9_;
};

struct _ProtonPlusModelsRunner {
	GObject parent_instance;
	ProtonPlusModelsRunnerPrivate * priv;
	GList* releases;
};

struct _ProtonPlusModelsRunnerClass {
	GObjectClass parent_class;
	void (*load) (ProtonPlusModelsRunner* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	ProtonPlusReturnCode (*load_finish) (ProtonPlusModelsRunner* self, GAsyncResult* _res_, GList** releases);
};

struct _ProtonPlusCliHandlerInstallLatestData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunner* runner;
	gint result;
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ProtonPlusModelsRunnersBasic* basic_runner;
	ProtonPlusModelsRunnersBasic* _tmp4_;
	ProtonPlusReturnCode code;
	ProtonPlusModelsRunnersBasic* _tmp5_;
	gboolean _tmp6_;
	ProtonPlusModelsRunnersBasic* _tmp7_;
	GList* _tmp8_;
	ProtonPlusModelsReleasesBasic* release;
	ProtonPlusModelsRunnersBasic* _tmp9_;
	GList* _tmp10_;
	gconstpointer _tmp11_;
	ProtonPlusModelsRelease* _tmp12_;
	ProtonPlusModelsReleasesBasic* _tmp13_;
	ProtonPlusModelsReleasesLatest* latest_release;
	ProtonPlusModelsRunnersBasic* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	ProtonPlusModelsReleasesBasic* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	ProtonPlusModelsReleasesBasic* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	ProtonPlusModelsReleasesBasic* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	ProtonPlusModelsReleasesBasic* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	ProtonPlusModelsReleasesLatest* _tmp31_;
	ProtonPlusModelsReleasesLatest* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gboolean success;
	ProtonPlusModelsReleasesLatest* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gint _tmp39_;
};

struct _ProtonPlusCliHandlerInstallInteractiveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunner* runner;
	gint result;
	ProtonPlusModelsRunnersBasic* basic_runner;
	ProtonPlusModelsRunnersBasic* _tmp0_;
	ProtonPlusReturnCode code;
	ProtonPlusModelsRunnersBasic* _tmp1_;
	gboolean _tmp2_;
	ProtonPlusModelsRunnersBasic* _tmp3_;
	GList* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint i;
	gboolean _tmp7_;
	gint _tmp8_;
	ProtonPlusModelsRunnersBasic* _tmp9_;
	GList* _tmp10_;
	ProtonPlusModelsReleasesBasic* release;
	ProtonPlusModelsRunnersBasic* _tmp11_;
	GList* _tmp12_;
	gconstpointer _tmp13_;
	ProtonPlusModelsRelease* _tmp14_;
	ProtonPlusModelsReleasesBasic* _tmp15_;
	ProtonPlusModelsReleasesBasic* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	ProtonPlusModelsReleasesBasic* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gint index;
	ProtonPlusModelsRunnersBasic* _tmp22_;
	GList* _tmp23_;
	ProtonPlusModelsReleasesBasic* selected;
	ProtonPlusModelsRunnersBasic* _tmp24_;
	GList* _tmp25_;
	gconstpointer _tmp26_;
	ProtonPlusModelsRelease* _tmp27_;
	ProtonPlusModelsReleasesBasic* _tmp28_;
	ProtonPlusModelsReleasesBasic* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gboolean success;
	ProtonPlusModelsReleasesBasic* _tmp32_;
	const gchar* _tmp33_;
	ProtonPlusModelsReleasesBasic* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	gint _tmp37_;
};

struct _ProtonPlusCliHandlerUninstallInteractiveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunner* runner;
	gint result;
	GList* installed;
	GList* _tmp0_;
	GList* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gint i;
	gboolean _tmp6_;
	gint _tmp7_;
	GList* _tmp8_;
	GList* _tmp9_;
	gconstpointer _tmp10_;
	gint index;
	GList* _tmp11_;
	gchar* release_name;
	GList* _tmp12_;
	gconstpointer _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
};

struct _ProtonPlusCliHandlerUninstallRunnerAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunner* runner;
	gint result;
	GList* installed;
	GList* _tmp0_;
	GList* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	GList* _tmp6_;
	GList* release_name_collection;
	GList* release_name_it;
	gchar* _tmp7_;
	gchar* release_name;
	const gchar* _tmp8_;
};

struct _ProtonPlusModelsGroup {
	GObject parent_instance;
	ProtonPlusModelsGroupPrivate * priv;
	GList* runners;
};

struct _ProtonPlusModelsGroupClass {
	GObjectClass parent_class;
};

struct _ProtonPlusCliHandlerUninstallLauncherAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsLauncher* launcher;
	gint result;
	const gchar* _tmp0_;
	ProtonPlusModelsGroup** _tmp1_;
	gint _tmp1__length1;
	ProtonPlusModelsGroup** group_collection;
	gint group_collection_length1;
	gint _group_collection_size_;
	gint group_it;
	ProtonPlusModelsGroup* _tmp2_;
	ProtonPlusModelsGroup* group;
	ProtonPlusModelsGroup* _tmp3_;
	GList* _tmp4_;
	GList* runner_collection;
	GList* runner_it;
	ProtonPlusModelsRunner* _tmp5_;
	ProtonPlusModelsRunner* runner;
	GList* installed;
	ProtonPlusModelsRunner* _tmp6_;
	GList* _tmp7_;
	GList* _tmp8_;
	GList* release_name_collection;
	GList* release_name_it;
	gchar* _tmp9_;
	gchar* release_name;
	ProtonPlusModelsReleasesBasic* release;
	ProtonPlusModelsRunner* _tmp10_;
	const gchar* _tmp11_;
	ProtonPlusModelsReleasesBasic* _tmp12_;
	ProtonPlusModelsReleasesBasic* _tmp13_;
	ProtonPlusModelsParameters* _tmp14_;
	ProtonPlusModelsParameters* _tmp15_;
	gboolean _tmp16_;
	const gchar* _tmp17_;
};

struct _ProtonPlusCliHandlerUninstallSingleReleaseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunner* runner;
	gchar* release_name;
	gint result;
	ProtonPlusModelsReleasesBasic* release;
	ProtonPlusModelsReleasesBasic* _tmp0_;
	gboolean success;
	ProtonPlusModelsReleasesBasic* _tmp1_;
	ProtonPlusModelsParameters* _tmp2_;
	ProtonPlusModelsParameters* _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_;
};

struct _ProtonPlusCliHandlerUpdateAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	gint result;
	GList* latest_runners;
	GList* _tmp0_;
	GList* _tmp1_;
};

struct _ProtonPlusCliHandlerUpdateLauncherData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsLauncher* launcher;
	gint result;
	const gchar* _tmp0_;
	GList* scoped;
	ProtonPlusModelsLauncher* _tmp1_;
	GList* latest_runners;
	GList* _tmp2_;
};

struct _ProtonPlusCliHandlerUpdateRunnerData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunner* runner;
	gint result;
	gboolean _tmp0_;
	gboolean _tmp1_;
	ProtonPlusReturnCode code;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
};

struct _ProtonPlusCliHandlerCollectLatestRunnersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	GList* scope;
	GList* result;
	GList* latest_runners;
	GList* launcher_collection;
	GList* launcher_it;
	ProtonPlusModelsLauncher* _tmp0_;
	ProtonPlusModelsLauncher* launcher;
	ProtonPlusModelsLauncher* _tmp1_;
	ProtonPlusModelsGroup** _tmp2_;
	gint _tmp2__length1;
	ProtonPlusModelsGroup** group_collection;
	gint group_collection_length1;
	gint _group_collection_size_;
	gint group_it;
	ProtonPlusModelsGroup* _tmp3_;
	ProtonPlusModelsGroup* group;
	GList* directories;
	ProtonPlusModelsGroup* _tmp4_;
	GList* _tmp5_;
	ProtonPlusModelsGroup* _tmp6_;
	GList* _tmp7_;
	GList* runner_collection;
	GList* runner_it;
	ProtonPlusModelsRunner* _tmp8_;
	ProtonPlusModelsRunner* runner;
	gboolean _tmp9_;
	ProtonPlusModelsRunner* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	ProtonPlusModelsRunner* _tmp13_;
	GList* _tmp14_;
	GList* directory_collection;
	GList* directory_it;
	gchar* _tmp15_;
	gchar* directory;
	const gchar* _tmp16_;
	ProtonPlusModelsRunner* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gboolean _tmp22_;
	ProtonPlusModelsRunner* _tmp23_;
	ProtonPlusModelsRunnersBasic* _tmp24_;
	const gchar* _tmp25_;
	ProtonPlusModelsRunner* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gboolean _tmp31_;
	ProtonPlusModelsLauncher* _tmp32_;
	const gchar* _tmp33_;
	ProtonPlusModelsGroup* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	ProtonPlusModelsRunner* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
};

struct _ProtonPlusCliHandlerUpdateRunnerBatchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	GList* runners;
	gint result;
	gint updated_count;
	GList* runner_collection;
	GList* runner_it;
	ProtonPlusModelsRunnersBasic* _tmp0_;
	ProtonPlusModelsRunnersBasic* runner;
	ProtonPlusReturnCode code;
	ProtonPlusModelsRunnersBasic* _tmp1_;
	ProtonPlusModelsRunnersBasic* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_;
	ProtonPlusModelsRunnersBasic* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	ProtonPlusModelsRunnersBasic* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
};

struct _ProtonPlusCliHandlerUpdateRunnerWithProgressData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunnersBasic* runner;
	ProtonPlusReturnCode result;
	gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	FILE* _tmp4_;
	ProtonPlusReturnCode code;
};

struct _ProtonPlusCliHandlerLoadLaunchersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	gboolean result;
	gboolean success;
	GList* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GList* _tmp3_;
};

struct _ProtonPlusCliHandlerLoadRunnerReleasesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusCLIHandler* self;
	ProtonPlusModelsRunnersBasic* basic_runner;
	ProtonPlusReturnCode result;
	ProtonPlusReturnCode code;
	GList* _tmp0_;
	ProtonPlusReturnCode _tmp1_;
	gboolean _tmp2_;
	GList* _tmp3_;
};

struct _ProtonPlusCLIParamSpecHandler {
	GParamSpec parent_instance;
};

static gpointer proton_plus_cli_output_parent_class = NULL;
static gint ProtonPlusCLIHandler_private_offset;
static gpointer proton_plus_cli_handler_parent_class = NULL;

VALA_EXTERN gpointer proton_plus_cli_output_ref (gpointer instance);
VALA_EXTERN void proton_plus_cli_output_unref (gpointer instance);
VALA_EXTERN GParamSpec* proton_plus_cli_param_spec_output (const gchar* name,
                                               const gchar* nick,
                                               const gchar* blurb,
                                               GType object_type,
                                               GParamFlags flags);
VALA_EXTERN void proton_plus_cli_value_set_output (GValue* value,
                                       gpointer v_object);
VALA_EXTERN void proton_plus_cli_value_take_output (GValue* value,
                                        gpointer v_object);
VALA_EXTERN gpointer proton_plus_cli_value_get_output (const GValue* value);
VALA_EXTERN GType proton_plus_cli_output_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusCLIOutput, proton_plus_cli_output_unref)
VALA_EXTERN void proton_plus_cli_output_info (const gchar* format,
                                  ...);
VALA_EXTERN void proton_plus_cli_output_success (const gchar* format,
                                     ...);
VALA_EXTERN void proton_plus_cli_output_error (const gchar* format,
                                   ...);
VALA_EXTERN void proton_plus_cli_output_warning (const gchar* format,
                                     ...);
VALA_EXTERN void proton_plus_cli_output_header (const gchar* format,
                                    ...);
VALA_EXTERN ProtonPlusCLIOutput* proton_plus_cli_output_new (void);
VALA_EXTERN ProtonPlusCLIOutput* proton_plus_cli_output_construct (GType object_type);
static void proton_plus_cli_output_finalize (ProtonPlusCLIOutput * obj);
static GType proton_plus_cli_output_get_type_once (void);
VALA_EXTERN gpointer proton_plus_cli_handler_ref (gpointer instance);
VALA_EXTERN void proton_plus_cli_handler_unref (gpointer instance);
VALA_EXTERN GParamSpec* proton_plus_cli_param_spec_handler (const gchar* name,
                                                const gchar* nick,
                                                const gchar* blurb,
                                                GType object_type,
                                                GParamFlags flags);
VALA_EXTERN void proton_plus_cli_value_set_handler (GValue* value,
                                        gpointer v_object);
VALA_EXTERN void proton_plus_cli_value_take_handler (GValue* value,
                                         gpointer v_object);
VALA_EXTERN gpointer proton_plus_cli_value_get_handler (const GValue* value);
VALA_EXTERN GType proton_plus_cli_handler_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusCLIHandler, proton_plus_cli_handler_unref)
VALA_EXTERN GType proton_plus_models_launcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLauncher, g_object_unref)
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void proton_plus_cli_handler_run_data_free (gpointer _data);
VALA_EXTERN void proton_plus_cli_handler_run (ProtonPlusCLIHandler* self,
                                  gchar** args,
                                  gint args_length1,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN gint proton_plus_cli_handler_run_finish (ProtonPlusCLIHandler* self,
                                         GAsyncResult* _res_);
static gboolean proton_plus_cli_handler_run_co (ProtonPlusCliHandlerRunData* _data_);
static void proton_plus_cli_handler_print_usage (ProtonPlusCLIHandler* self);
VALA_EXTERN void proton_plus_globals_load (GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN void proton_plus_globals_load_finish (GAsyncResult* _res_);
static void proton_plus_cli_handler_run_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_);
static void proton_plus_cli_handler_load_launchers (ProtonPlusCLIHandler* self,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gboolean proton_plus_cli_handler_load_launchers_finish (ProtonPlusCLIHandler* self,
                                                        GAsyncResult* _res_);
static gint proton_plus_cli_handler_handle_list (ProtonPlusCLIHandler* self,
                                          gchar** args,
                                          gint args_length1);
static void proton_plus_cli_handler_handle_install (ProtonPlusCLIHandler* self,
                                             gchar** args,
                                             gint args_length1,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gint proton_plus_cli_handler_handle_install_finish (ProtonPlusCLIHandler* self,
                                                    GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_uninstall (ProtonPlusCLIHandler* self,
                                               gchar** args,
                                               gint args_length1,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
static gint proton_plus_cli_handler_handle_uninstall_finish (ProtonPlusCLIHandler* self,
                                                      GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_update (ProtonPlusCLIHandler* self,
                                            gchar** args,
                                            gint args_length1,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gint proton_plus_cli_handler_handle_update_finish (ProtonPlusCLIHandler* self,
                                                   GAsyncResult* _res_);
static gchar* proton_plus_cli_handler_get_launcher_id (ProtonPlusCLIHandler* self,
                                                ProtonPlusModelsLauncher* launcher);
VALA_EXTERN GType proton_plus_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN GType proton_plus_models_simple_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSimpleRunner, g_object_unref)
VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_installation_types_get_type (void) G_GNUC_CONST ;
static ProtonPlusModelsLauncher* proton_plus_cli_handler_find_launcher (ProtonPlusCLIHandler* self,
                                                                 const gchar* launcher_id);
VALA_EXTERN GList* proton_plus_models_group_get_compatibility_tool_directories (ProtonPlusModelsGroup* self);
VALA_EXTERN const gchar* proton_plus_models_group_get_title (ProtonPlusModelsGroup* self);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
static void proton_plus_cli_handler_handle_install_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_handle_install_co (ProtonPlusCliHandlerHandleInstallData* _data_);
static gboolean proton_plus_cli_handler_validate_args (ProtonPlusCLIHandler* self,
                                                gchar** args,
                                                gint args_length1,
                                                gint min_required,
                                                const gchar* usage);
VALA_EXTERN GType proton_plus_models_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRunner, g_object_unref)
static ProtonPlusModelsRunner* proton_plus_cli_handler_find_runner (ProtonPlusCLIHandler* self,
                                                             ProtonPlusModelsLauncher* launcher,
                                                             const gchar* runner_id);
static void proton_plus_cli_handler_install_latest (ProtonPlusCLIHandler* self,
                                             ProtonPlusModelsRunner* runner,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static gint proton_plus_cli_handler_install_latest_finish (ProtonPlusCLIHandler* self,
                                                    GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_install_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void proton_plus_cli_handler_install_interactive (ProtonPlusCLIHandler* self,
                                                  ProtonPlusModelsRunner* runner,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static gint proton_plus_cli_handler_install_interactive_finish (ProtonPlusCLIHandler* self,
                                                         GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_uninstall_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_handle_uninstall_co (ProtonPlusCliHandlerHandleUninstallData* _data_);
static void proton_plus_cli_handler_uninstall_launcher_all (ProtonPlusCLIHandler* self,
                                                     ProtonPlusModelsLauncher* launcher,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static gint proton_plus_cli_handler_uninstall_launcher_all_finish (ProtonPlusCLIHandler* self,
                                                            GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_uninstall_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_);
static void proton_plus_cli_handler_uninstall_runner_all (ProtonPlusCLIHandler* self,
                                                   ProtonPlusModelsRunner* runner,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static gint proton_plus_cli_handler_uninstall_runner_all_finish (ProtonPlusCLIHandler* self,
                                                          GAsyncResult* _res_);
static void proton_plus_cli_handler_uninstall_interactive (ProtonPlusCLIHandler* self,
                                                    ProtonPlusModelsRunner* runner,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static gint proton_plus_cli_handler_uninstall_interactive_finish (ProtonPlusCLIHandler* self,
                                                           GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_update_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_handle_update_co (ProtonPlusCliHandlerHandleUpdateData* _data_);
static void proton_plus_cli_handler_update_all (ProtonPlusCLIHandler* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static gint proton_plus_cli_handler_update_all_finish (ProtonPlusCLIHandler* self,
                                                GAsyncResult* _res_);
static void proton_plus_cli_handler_handle_update_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static void proton_plus_cli_handler_update_runner (ProtonPlusCLIHandler* self,
                                            ProtonPlusModelsRunner* runner,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static gint proton_plus_cli_handler_update_runner_finish (ProtonPlusCLIHandler* self,
                                                   GAsyncResult* _res_);
static void proton_plus_cli_handler_update_launcher (ProtonPlusCLIHandler* self,
                                              ProtonPlusModelsLauncher* launcher,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
static gint proton_plus_cli_handler_update_launcher_finish (ProtonPlusCLIHandler* self,
                                                     GAsyncResult* _res_);
static void proton_plus_cli_handler_install_latest_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_install_latest_co (ProtonPlusCliHandlerInstallLatestData* _data_);
VALA_EXTERN gboolean proton_plus_models_runner_get_has_latest_support (ProtonPlusModelsRunner* self);
VALA_EXTERN const gchar* proton_plus_models_runner_get_title (ProtonPlusModelsRunner* self);
VALA_EXTERN GType proton_plus_models_runners_basic_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRunnersBasic, g_object_unref)
VALA_EXTERN GType proton_plus_return_code_get_type (void) G_GNUC_CONST ;
static void proton_plus_cli_handler_load_runner_releases (ProtonPlusCLIHandler* self,
                                                   ProtonPlusModelsRunnersBasic* basic_runner,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static ProtonPlusReturnCode proton_plus_cli_handler_load_runner_releases_finish (ProtonPlusCLIHandler* self,
                                                                          GAsyncResult* _res_);
static void proton_plus_cli_handler_install_latest_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
VALA_EXTERN GType proton_plus_models_base_release_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsBaseRelease, g_object_unref)
VALA_EXTERN GType proton_plus_models_release_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRelease, g_object_unref)
VALA_EXTERN GType proton_plus_models_releases_basic_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsReleasesBasic, g_object_unref)
VALA_EXTERN GType proton_plus_models_releases_latest_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsReleasesLatest, g_object_unref)
VALA_EXTERN const gchar* proton_plus_models_base_release_get_description (ProtonPlusModelsBaseRelease* self);
VALA_EXTERN const gchar* proton_plus_models_base_release_get_release_date (ProtonPlusModelsBaseRelease* self);
VALA_EXTERN const gchar* proton_plus_models_base_release_get_download_url (ProtonPlusModelsBaseRelease* self);
VALA_EXTERN const gchar* proton_plus_models_base_release_get_page_url (ProtonPlusModelsBaseRelease* self);
VALA_EXTERN ProtonPlusModelsReleasesLatest* proton_plus_models_releases_latest_new (ProtonPlusModelsRunnersBasic* runner,
                                                                        const gchar* title,
                                                                        const gchar* description,
                                                                        const gchar* release_date,
                                                                        const gchar* download_url,
                                                                        const gchar* page_url);
VALA_EXTERN ProtonPlusModelsReleasesLatest* proton_plus_models_releases_latest_construct (GType object_type,
                                                                              ProtonPlusModelsRunnersBasic* runner,
                                                                              const gchar* title,
                                                                              const gchar* description,
                                                                              const gchar* release_date,
                                                                              const gchar* download_url,
                                                                              const gchar* page_url);
VALA_EXTERN void proton_plus_models_base_release_install (ProtonPlusModelsBaseRelease* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_models_base_release_install_finish (ProtonPlusModelsBaseRelease* self,
                                                         GAsyncResult* _res_);
static void proton_plus_cli_handler_install_interactive_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_install_interactive_co (ProtonPlusCliHandlerInstallInteractiveData* _data_);
static void proton_plus_cli_handler_install_interactive_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
VALA_EXTERN const gchar* proton_plus_models_base_release_get_title (ProtonPlusModelsBaseRelease* self);
static gint proton_plus_cli_handler_read_user_selection (ProtonPlusCLIHandler* self,
                                                  const gchar* prompt,
                                                  gint max);
static void proton_plus_cli_handler_uninstall_interactive_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_uninstall_interactive_co (ProtonPlusCliHandlerUninstallInteractiveData* _data_);
static GList* proton_plus_cli_handler_get_installed_releases (ProtonPlusCLIHandler* self,
                                                       ProtonPlusModelsRunner* runner);
static void proton_plus_cli_handler_uninstall_single_release (ProtonPlusCLIHandler* self,
                                                       ProtonPlusModelsRunner* runner,
                                                       const gchar* release_name,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
static gint proton_plus_cli_handler_uninstall_single_release_finish (ProtonPlusCLIHandler* self,
                                                              GAsyncResult* _res_);
static void proton_plus_cli_handler_uninstall_interactive_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_);
static void proton_plus_cli_handler_uninstall_runner_all_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_uninstall_runner_all_co (ProtonPlusCliHandlerUninstallRunnerAllData* _data_);
static void proton_plus_cli_handler_uninstall_runner_all_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static void proton_plus_cli_handler_uninstall_launcher_all_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_uninstall_launcher_all_co (ProtonPlusCliHandlerUninstallLauncherAllData* _data_);
static ProtonPlusModelsReleasesBasic* proton_plus_cli_handler_create_release (ProtonPlusCLIHandler* self,
                                                                       ProtonPlusModelsRunner* runner,
                                                                       const gchar* release_name);
VALA_EXTERN GType proton_plus_models_parameters_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsParameters, g_object_unref)
VALA_EXTERN void proton_plus_models_base_release_remove (ProtonPlusModelsBaseRelease* self,
                                             ProtonPlusModelsParameters* parameters,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_models_base_release_remove_finish (ProtonPlusModelsBaseRelease* self,
                                                        GAsyncResult* _res_);
VALA_EXTERN ProtonPlusModelsParameters* proton_plus_models_parameters_new (void);
VALA_EXTERN ProtonPlusModelsParameters* proton_plus_models_parameters_construct (GType object_type);
static void proton_plus_cli_handler_uninstall_launcher_all_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static void proton_plus_cli_handler_uninstall_single_release_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_uninstall_single_release_co (ProtonPlusCliHandlerUninstallSingleReleaseData* _data_);
static void proton_plus_cli_handler_uninstall_single_release_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_);
static void proton_plus_cli_handler_update_all_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_update_all_co (ProtonPlusCliHandlerUpdateAllData* _data_);
static void proton_plus_cli_handler_collect_latest_runners (ProtonPlusCLIHandler* self,
                                                     GList* scope,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static GList* proton_plus_cli_handler_collect_latest_runners_finish (ProtonPlusCLIHandler* self,
                                                              GAsyncResult* _res_);
static void proton_plus_cli_handler_update_all_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_);
static void proton_plus_cli_handler_update_runner_batch (ProtonPlusCLIHandler* self,
                                                  GList* runners,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static gint proton_plus_cli_handler_update_runner_batch_finish (ProtonPlusCLIHandler* self,
                                                         GAsyncResult* _res_);
static void proton_plus_cli_handler_update_launcher_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_update_launcher_co (ProtonPlusCliHandlerUpdateLauncherData* _data_);
static void proton_plus_cli_handler_update_launcher_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
static void proton_plus_cli_handler_update_runner_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_update_runner_co (ProtonPlusCliHandlerUpdateRunnerData* _data_);
static void proton_plus_cli_handler_update_runner_with_progress (ProtonPlusCLIHandler* self,
                                                          ProtonPlusModelsRunnersBasic* runner,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static ProtonPlusReturnCode proton_plus_cli_handler_update_runner_with_progress_finish (ProtonPlusCLIHandler* self,
                                                                                 GAsyncResult* _res_);
static void proton_plus_cli_handler_update_runner_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static void proton_plus_cli_handler_collect_latest_runners_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_collect_latest_runners_co (ProtonPlusCliHandlerCollectLatestRunnersData* _data_);
VALA_EXTERN void proton_plus_utils_filesystem_delete_directory (const gchar* path,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_utils_filesystem_delete_directory_finish (GAsyncResult* _res_);
VALA_EXTERN const gchar* proton_plus_models_group_get_directory (ProtonPlusModelsGroup* self);
static void proton_plus_cli_handler_collect_latest_runners_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static void proton_plus_cli_handler_update_runner_batch_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_update_runner_batch_co (ProtonPlusCliHandlerUpdateRunnerBatchData* _data_);
static void proton_plus_cli_handler_update_runner_batch_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
static void proton_plus_cli_handler_update_runner_with_progress_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_update_runner_with_progress_co (ProtonPlusCliHandlerUpdateRunnerWithProgressData* _data_);
VALA_EXTERN void proton_plus_models_runner_update_specific_runner (ProtonPlusModelsRunnersBasic* runner,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
VALA_EXTERN ProtonPlusReturnCode proton_plus_models_runner_update_specific_runner_finish (GAsyncResult* _res_);
static void proton_plus_cli_handler_update_runner_with_progress_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_);
static void proton_plus_cli_handler_load_launchers_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_load_launchers_co (ProtonPlusCliHandlerLoadLaunchersData* _data_);
VALA_EXTERN void proton_plus_models_launcher_get_all (GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_models_launcher_get_all_finish (GAsyncResult* _res_,
                                                     GList** launchers);
static void proton_plus_cli_handler_load_launchers_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void proton_plus_cli_handler_load_runner_releases_data_free (gpointer _data);
static gboolean proton_plus_cli_handler_load_runner_releases_co (ProtonPlusCliHandlerLoadRunnerReleasesData* _data_);
VALA_EXTERN void proton_plus_models_runner_load (ProtonPlusModelsRunner* self,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
VALA_EXTERN ProtonPlusReturnCode proton_plus_models_runner_load_finish (ProtonPlusModelsRunner* self,
                                                            GAsyncResult* _res_,
                                                            GList** releases);
static void proton_plus_cli_handler_load_runner_releases_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
static void proton_plus_cli_handler_print_available_launchers (ProtonPlusCLIHandler* self);
static gchar* proton_plus_cli_handler_get_runner_id (ProtonPlusCLIHandler* self,
                                              ProtonPlusModelsRunner* runner);
static void proton_plus_cli_handler_print_available_runners (ProtonPlusCLIHandler* self,
                                                      ProtonPlusModelsLauncher* launcher);
VALA_EXTERN ProtonPlusModelsGroup* proton_plus_models_runner_get_group (ProtonPlusModelsRunner* self);
VALA_EXTERN gchar* proton_plus_models_launcher_get_installation_type_title (ProtonPlusModelsLauncher* self);
static gchar* proton_plus_cli_handler_get_release_path (ProtonPlusCLIHandler* self,
                                                 ProtonPlusModelsRunner* runner,
                                                 const gchar* release_name);
VALA_EXTERN ProtonPlusModelsLauncher* proton_plus_models_group_get_launcher (ProtonPlusModelsGroup* self);
VALA_EXTERN ProtonPlusModelsReleasesBasic* proton_plus_models_releases_basic_new_simple (ProtonPlusModelsRunnersBasic* runner,
                                                                             const gchar* title,
                                                                             const gchar* install_location);
VALA_EXTERN ProtonPlusModelsReleasesBasic* proton_plus_models_releases_basic_construct_simple (GType object_type,
                                                                                   ProtonPlusModelsRunnersBasic* runner,
                                                                                   const gchar* title,
                                                                                   const gchar* install_location);
VALA_EXTERN ProtonPlusCLIHandler* proton_plus_cli_handler_new (void);
VALA_EXTERN ProtonPlusCLIHandler* proton_plus_cli_handler_construct (GType object_type);
static void proton_plus_cli_handler_finalize (ProtonPlusCLIHandler * obj);
static GType proton_plus_cli_handler_get_type_once (void);

void
proton_plus_cli_output_info (const gchar* format,
                             ...)
{
	va_list args = {0};
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (format != NULL);
	va_start (args, format);
	_tmp0_ = g_strdup_vprintf (format, args);
	_tmp1_ = _tmp0_;
	g_print ("%s", _tmp1_);
	_g_free0 (_tmp1_);
	va_end (args);
}

void
proton_plus_cli_output_success (const gchar* format,
                                ...)
{
	va_list args = {0};
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (format != NULL);
	va_start (args, format);
	_tmp0_ = g_strdup_vprintf (format, args);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (PROTON_PLUS_CLI_OUTPUT_GREEN, _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, PROTON_PLUS_CLI_OUTPUT_RESET, NULL);
	_tmp5_ = _tmp4_;
	g_print ("%s", _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	va_end (args);
}

void
proton_plus_cli_output_error (const gchar* format,
                              ...)
{
	va_list args = {0};
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (format != NULL);
	va_start (args, format);
	_tmp0_ = g_strdup_vprintf (format, args);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (PROTON_PLUS_CLI_OUTPUT_RED, _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, PROTON_PLUS_CLI_OUTPUT_RESET, NULL);
	_tmp5_ = _tmp4_;
	g_printerr ("%s", _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	va_end (args);
}

void
proton_plus_cli_output_warning (const gchar* format,
                                ...)
{
	va_list args = {0};
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (format != NULL);
	va_start (args, format);
	_tmp0_ = g_strdup_vprintf (format, args);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (PROTON_PLUS_CLI_OUTPUT_YELLOW, _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, PROTON_PLUS_CLI_OUTPUT_RESET, NULL);
	_tmp5_ = _tmp4_;
	g_print ("%s", _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	va_end (args);
}

void
proton_plus_cli_output_header (const gchar* format,
                               ...)
{
	va_list args = {0};
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (format != NULL);
	va_start (args, format);
	_tmp0_ = g_strdup_vprintf (format, args);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (PROTON_PLUS_CLI_OUTPUT_BOLD PROTON_PLUS_CLI_OUTPUT_BLUE, _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, PROTON_PLUS_CLI_OUTPUT_RESET, NULL);
	_tmp5_ = _tmp4_;
	g_print ("%s", _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	va_end (args);
}

ProtonPlusCLIOutput*
proton_plus_cli_output_construct (GType object_type)
{
	ProtonPlusCLIOutput* self = NULL;
	self = (ProtonPlusCLIOutput*) g_type_create_instance (object_type);
	return self;
}

ProtonPlusCLIOutput*
proton_plus_cli_output_new (void)
{
	return proton_plus_cli_output_construct (PROTON_PLUS_CLI_TYPE_OUTPUT);
}

static void
proton_plus_cli_value_output_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
proton_plus_cli_value_output_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		proton_plus_cli_output_unref (value->data[0].v_pointer);
	}
}

static void
proton_plus_cli_value_output_copy_value (const GValue* src_value,
                                         GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = proton_plus_cli_output_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
proton_plus_cli_value_output_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
proton_plus_cli_value_output_collect_value (GValue* value,
                                            guint n_collect_values,
                                            GTypeCValue* collect_values,
                                            guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		ProtonPlusCLIOutput * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = proton_plus_cli_output_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
proton_plus_cli_value_output_lcopy_value (const GValue* value,
                                          guint n_collect_values,
                                          GTypeCValue* collect_values,
                                          guint collect_flags)
{
	ProtonPlusCLIOutput ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = proton_plus_cli_output_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
proton_plus_cli_param_spec_output (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags)
{
	ProtonPlusCLIParamSpecOutput* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PROTON_PLUS_CLI_TYPE_OUTPUT), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
proton_plus_cli_value_get_output (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_CLI_TYPE_OUTPUT), NULL);
	return value->data[0].v_pointer;
}

void
proton_plus_cli_value_set_output (GValue* value,
                                  gpointer v_object)
{
	ProtonPlusCLIOutput * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_CLI_TYPE_OUTPUT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PROTON_PLUS_CLI_TYPE_OUTPUT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		proton_plus_cli_output_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		proton_plus_cli_output_unref (old);
	}
}

void
proton_plus_cli_value_take_output (GValue* value,
                                   gpointer v_object)
{
	ProtonPlusCLIOutput * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_CLI_TYPE_OUTPUT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PROTON_PLUS_CLI_TYPE_OUTPUT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		proton_plus_cli_output_unref (old);
	}
}

static void
proton_plus_cli_output_class_init (ProtonPlusCLIOutputClass * klass,
                                   gpointer klass_data)
{
	proton_plus_cli_output_parent_class = g_type_class_peek_parent (klass);
	((ProtonPlusCLIOutputClass *) klass)->finalize = proton_plus_cli_output_finalize;
}

static void
proton_plus_cli_output_instance_init (ProtonPlusCLIOutput * self,
                                      gpointer klass)
{
	self->ref_count = 1;
}

static void
proton_plus_cli_output_finalize (ProtonPlusCLIOutput * obj)
{
	ProtonPlusCLIOutput * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_CLI_TYPE_OUTPUT, ProtonPlusCLIOutput);
	g_signal_handlers_destroy (self);
}

static GType
proton_plus_cli_output_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { proton_plus_cli_value_output_init, proton_plus_cli_value_output_free_value, proton_plus_cli_value_output_copy_value, proton_plus_cli_value_output_peek_pointer, "p", proton_plus_cli_value_output_collect_value, "p", proton_plus_cli_value_output_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusCLIOutputClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_cli_output_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusCLIOutput), 0, (GInstanceInitFunc) proton_plus_cli_output_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType proton_plus_cli_output_type_id;
	proton_plus_cli_output_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ProtonPlusCLIOutput", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return proton_plus_cli_output_type_id;
}

GType
proton_plus_cli_output_get_type (void)
{
	static volatile gsize proton_plus_cli_output_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_cli_output_type_id__once)) {
		GType proton_plus_cli_output_type_id;
		proton_plus_cli_output_type_id = proton_plus_cli_output_get_type_once ();
		g_once_init_leave (&proton_plus_cli_output_type_id__once, proton_plus_cli_output_type_id);
	}
	return proton_plus_cli_output_type_id__once;
}

gpointer
proton_plus_cli_output_ref (gpointer instance)
{
	ProtonPlusCLIOutput * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
proton_plus_cli_output_unref (gpointer instance)
{
	ProtonPlusCLIOutput * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PROTON_PLUS_CLI_OUTPUT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
proton_plus_cli_handler_get_instance_private (ProtonPlusCLIHandler* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusCLIHandler_private_offset);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
proton_plus_cli_handler_run_data_free (gpointer _data)
{
	ProtonPlusCliHandlerRunData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerRunData, _data_);
}

static gpointer
_proton_plus_cli_handler_ref0 (gpointer self)
{
	return self ? proton_plus_cli_handler_ref (self) : NULL;
}

void
proton_plus_cli_handler_run (ProtonPlusCLIHandler* self,
                             gchar** args,
                             gint args_length1,
                             GAsyncReadyCallback _callback_,
                             gpointer _user_data_)
{
	ProtonPlusCliHandlerRunData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerRunData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_run_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_data_->args = args;
	_data_->args_length1 = args_length1;
	proton_plus_cli_handler_run_co (_data_);
}

gint
proton_plus_cli_handler_run_finish (ProtonPlusCLIHandler* self,
                                    GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerRunData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_run_ready (GObject* source_object,
                                   GAsyncResult* _res_,
                                   gpointer _user_data_)
{
	ProtonPlusCliHandlerRunData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_run_co (_data_);
}

static gboolean
proton_plus_cli_handler_run_co (ProtonPlusCliHandlerRunData* _data_)
{
	static GQuark _tmp4_label0 = 0;
	static GQuark _tmp4_label1 = 0;
	static GQuark _tmp4_label2 = 0;
	static GQuark _tmp4_label3 = 0;
	static GQuark _tmp4_label4 = 0;
	static GQuark _tmp4_label5 = 0;
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->args_length1 < 2) {
		proton_plus_cli_handler_print_usage (_data_->self);
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_state_ = 1;
	proton_plus_globals_load (proton_plus_cli_handler_run_ready, _data_);
	return FALSE;
	_state_1:
	proton_plus_globals_load_finish (_data_->_res_);
	_data_->_state_ = 2;
	proton_plus_cli_handler_load_launchers (_data_->self, proton_plus_cli_handler_run_ready, _data_);
	return FALSE;
	_state_2:
	if (!proton_plus_cli_handler_load_launchers_finish (_data_->self, _data_->_res_)) {
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->args[1];
	_data_->_tmp1_ = g_strdup (_data_->_tmp0_);
	_data_->command = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->command;
	_data_->_tmp5_ = 0U;
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp5_ = (NULL == _data_->_tmp3_) ? 0 : g_quark_from_string (_data_->_tmp3_);
	if (_data_->_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string (PROTON_PLUS_CLI_CMD_VERSION)))) {
		switch (0) {
			default:
			{
				proton_plus_cli_output_info ("ProtonPlus %s\n", APP_VERSION, NULL);
				_data_->result = 0;
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string (PROTON_PLUS_CLI_CMD_HELP)))) {
		switch (0) {
			default:
			{
				proton_plus_cli_handler_print_usage (_data_->self);
				_data_->result = 0;
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label2) ? _tmp4_label2 : (_tmp4_label2 = g_quark_from_static_string (PROTON_PLUS_CLI_CMD_LIST)))) {
		switch (0) {
			default:
			{
				_data_->result = proton_plus_cli_handler_handle_list (_data_->self, _data_->args, (gint) _data_->args_length1);
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label3) ? _tmp4_label3 : (_tmp4_label3 = g_quark_from_static_string (PROTON_PLUS_CLI_CMD_INSTALL)))) {
		switch (0) {
			default:
			{
				_data_->_state_ = 3;
				proton_plus_cli_handler_handle_install (_data_->self, _data_->args, (gint) _data_->args_length1, proton_plus_cli_handler_run_ready, _data_);
				return FALSE;
				_state_3:
				_data_->result = proton_plus_cli_handler_handle_install_finish (_data_->self, _data_->_res_);
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label4) ? _tmp4_label4 : (_tmp4_label4 = g_quark_from_static_string (PROTON_PLUS_CLI_CMD_UNINSTALL)))) {
		switch (0) {
			default:
			{
				_data_->_state_ = 4;
				proton_plus_cli_handler_handle_uninstall (_data_->self, _data_->args, (gint) _data_->args_length1, proton_plus_cli_handler_run_ready, _data_);
				return FALSE;
				_state_4:
				_data_->result = proton_plus_cli_handler_handle_uninstall_finish (_data_->self, _data_->_res_);
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	} else if (_data_->_tmp5_ == ((0 != _tmp4_label5) ? _tmp4_label5 : (_tmp4_label5 = g_quark_from_static_string (PROTON_PLUS_CLI_CMD_UPDATE)))) {
		switch (0) {
			default:
			{
				_data_->_state_ = 5;
				proton_plus_cli_handler_handle_update (_data_->self, _data_->args, (gint) _data_->args_length1, proton_plus_cli_handler_run_ready, _data_);
				return FALSE;
				_state_5:
				_data_->result = proton_plus_cli_handler_handle_update_finish (_data_->self, _data_->_res_);
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	} else {
		switch (0) {
			default:
			{
				_data_->_tmp6_ = _data_->command;
				proton_plus_cli_output_error (_ ("Error: Unknown command '%s'\n"), _data_->_tmp6_, NULL);
				proton_plus_cli_handler_print_usage (_data_->self);
				_data_->result = 1;
				_g_free0 (_data_->command);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	}
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static inline void
_g_list_free__g_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
}

static gint
proton_plus_cli_handler_handle_list (ProtonPlusCLIHandler* self,
                                     gchar** args,
                                     gint args_length1)
{
	ProtonPlusModelsLauncher* launcher = NULL;
	const gchar* _tmp7_;
	ProtonPlusModelsLauncher* _tmp8_;
	ProtonPlusModelsLauncher* _tmp9_;
	ProtonPlusModelsLauncher* _tmp10_;
	const gchar* _tmp11_;
	gboolean found = FALSE;
	ProtonPlusModelsLauncher* _tmp12_;
	ProtonPlusModelsGroup** _tmp13_;
	gint _tmp13__length1;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	if (args_length1 < 3) {
		GList* _tmp0_;
		proton_plus_cli_output_header (_ ("Detected launchers:\n"), NULL);
		_tmp0_ = self->priv->launchers;
		{
			GList* launcher_collection = NULL;
			GList* launcher_it = NULL;
			launcher_collection = _tmp0_;
			for (launcher_it = launcher_collection; launcher_it != NULL; launcher_it = launcher_it->next) {
				ProtonPlusModelsLauncher* _tmp1_;
				ProtonPlusModelsLauncher* launcher = NULL;
				_tmp1_ = _g_object_ref0 ((ProtonPlusModelsLauncher*) launcher_it->data);
				launcher = _tmp1_;
				{
					ProtonPlusModelsLauncher* _tmp2_;
					gchar* _tmp3_;
					gchar* _tmp4_;
					ProtonPlusModelsLauncher* _tmp5_;
					const gchar* _tmp6_;
					_tmp2_ = launcher;
					_tmp3_ = proton_plus_cli_handler_get_launcher_id (self, _tmp2_);
					_tmp4_ = _tmp3_;
					_tmp5_ = launcher;
					_tmp6_ = _tmp5_->title;
					proton_plus_cli_output_info ("  %-45s (%s)\n", _tmp4_, _tmp6_, NULL);
					_g_free0 (_tmp4_);
					_g_object_unref0 (launcher);
				}
			}
		}
		result = 0;
		return result;
	}
	_tmp7_ = args[2];
	_tmp8_ = proton_plus_cli_handler_find_launcher (self, _tmp7_);
	launcher = _tmp8_;
	_tmp9_ = launcher;
	if (_tmp9_ == NULL) {
		result = 1;
		_g_object_unref0 (launcher);
		return result;
	}
	_tmp10_ = launcher;
	_tmp11_ = _tmp10_->title;
	proton_plus_cli_output_header (_ ("Installed runners for %s:\n"), _tmp11_, NULL);
	found = FALSE;
	_tmp12_ = launcher;
	_tmp13_ = _tmp12_->groups;
	_tmp13__length1 = _tmp12_->groups_length1;
	{
		ProtonPlusModelsGroup** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
		group_collection = _tmp13_;
		group_collection_length1 = _tmp13__length1;
		for (group_it = 0; group_it < group_collection_length1; group_it = group_it + 1) {
			ProtonPlusModelsGroup* _tmp14_;
			ProtonPlusModelsGroup* group = NULL;
			_tmp14_ = _g_object_ref0 (group_collection[group_it]);
			group = _tmp14_;
			{
				GList* installed = NULL;
				ProtonPlusModelsGroup* _tmp15_;
				GList* _tmp16_;
				GList* _tmp17_;
				_tmp15_ = group;
				_tmp16_ = proton_plus_models_group_get_compatibility_tool_directories (_tmp15_);
				installed = _tmp16_;
				_tmp17_ = installed;
				if (g_list_length (_tmp17_) > ((guint) 0)) {
					ProtonPlusModelsGroup* _tmp18_;
					const gchar* _tmp19_;
					const gchar* _tmp20_;
					GList* _tmp21_;
					_tmp18_ = group;
					_tmp19_ = proton_plus_models_group_get_title (_tmp18_);
					_tmp20_ = _tmp19_;
					proton_plus_cli_output_info ("\n%s:\n", _tmp20_, NULL);
					_tmp21_ = installed;
					{
						GList* dir_collection = NULL;
						GList* dir_it = NULL;
						dir_collection = _tmp21_;
						for (dir_it = dir_collection; dir_it != NULL; dir_it = dir_it->next) {
							gchar* _tmp22_;
							gchar* dir = NULL;
							_tmp22_ = g_strdup ((const gchar*) dir_it->data);
							dir = _tmp22_;
							{
								const gchar* _tmp23_;
								_tmp23_ = dir;
								proton_plus_cli_output_info ("  %s\n", _tmp23_, NULL);
								found = TRUE;
								_g_free0 (dir);
							}
						}
					}
				}
				(installed == NULL) ? NULL : (installed = (_g_list_free__g_free0_ (installed), NULL));
				_g_object_unref0 (group);
			}
		}
	}
	if (!found) {
		proton_plus_cli_output_warning (_ ("No runners installed\n"), NULL);
	}
	result = 0;
	_g_object_unref0 (launcher);
	return result;
}

static void
proton_plus_cli_handler_handle_install_data_free (gpointer _data)
{
	ProtonPlusCliHandlerHandleInstallData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerHandleInstallData, _data_);
}

static void
proton_plus_cli_handler_handle_install (ProtonPlusCLIHandler* self,
                                        gchar** args,
                                        gint args_length1,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	ProtonPlusCliHandlerHandleInstallData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerHandleInstallData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_handle_install_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_data_->args = args;
	_data_->args_length1 = args_length1;
	proton_plus_cli_handler_handle_install_co (_data_);
}

static gint
proton_plus_cli_handler_handle_install_finish (ProtonPlusCLIHandler* self,
                                               GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerHandleInstallData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_handle_install_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	ProtonPlusCliHandlerHandleInstallData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_handle_install_co (_data_);
}

static gboolean
proton_plus_cli_handler_handle_install_co (ProtonPlusCliHandlerHandleInstallData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (!proton_plus_cli_handler_validate_args (_data_->self, _data_->args, (gint) _data_->args_length1, 4, "protonplus install <launcher_id> <runner_id> [latest]")) {
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->args[2];
	_data_->_tmp1_ = proton_plus_cli_handler_find_launcher (_data_->self, _data_->_tmp0_);
	_data_->launcher = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->launcher;
	if (_data_->_tmp2_ == NULL) {
		_data_->result = 1;
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->launcher;
	_data_->_tmp4_ = _data_->args[3];
	_data_->_tmp5_ = proton_plus_cli_handler_find_runner (_data_->self, _data_->_tmp3_, _data_->_tmp4_);
	_data_->runner = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->runner;
	if (_data_->_tmp6_ == NULL) {
		_data_->result = 1;
		_g_object_unref0 (_data_->runner);
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->args_length1 >= 5) {
		_data_->_tmp8_ = _data_->args[4];
		_data_->_tmp7_ = g_strcmp0 (_data_->_tmp8_, PROTON_PLUS_CLI_OPT_LATEST) == 0;
	} else {
		_data_->_tmp7_ = FALSE;
	}
	_data_->use_latest = _data_->_tmp7_;
	if (_data_->use_latest) {
		_data_->_tmp10_ = _data_->runner;
		_data_->_state_ = 1;
		proton_plus_cli_handler_install_latest (_data_->self, _data_->_tmp10_, proton_plus_cli_handler_handle_install_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp9_ = proton_plus_cli_handler_install_latest_finish (_data_->self, _data_->_res_);
	} else {
		_data_->_tmp11_ = _data_->runner;
		_data_->_state_ = 2;
		proton_plus_cli_handler_install_interactive (_data_->self, _data_->_tmp11_, proton_plus_cli_handler_handle_install_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp9_ = proton_plus_cli_handler_install_interactive_finish (_data_->self, _data_->_res_);
	}
	_data_->result = _data_->_tmp9_;
	_g_object_unref0 (_data_->runner);
	_g_object_unref0 (_data_->launcher);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_handle_uninstall_data_free (gpointer _data)
{
	ProtonPlusCliHandlerHandleUninstallData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerHandleUninstallData, _data_);
}

static void
proton_plus_cli_handler_handle_uninstall (ProtonPlusCLIHandler* self,
                                          gchar** args,
                                          gint args_length1,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	ProtonPlusCliHandlerHandleUninstallData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerHandleUninstallData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_handle_uninstall_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_data_->args = args;
	_data_->args_length1 = args_length1;
	proton_plus_cli_handler_handle_uninstall_co (_data_);
}

static gint
proton_plus_cli_handler_handle_uninstall_finish (ProtonPlusCLIHandler* self,
                                                 GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerHandleUninstallData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_handle_uninstall_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_)
{
	ProtonPlusCliHandlerHandleUninstallData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_handle_uninstall_co (_data_);
}

static gboolean
proton_plus_cli_handler_handle_uninstall_co (ProtonPlusCliHandlerHandleUninstallData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (!proton_plus_cli_handler_validate_args (_data_->self, _data_->args, (gint) _data_->args_length1, 4, "protonplus uninstall <launcher_id> <runner_id|all> [all]")) {
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->args[2];
	_data_->_tmp1_ = proton_plus_cli_handler_find_launcher (_data_->self, _data_->_tmp0_);
	_data_->launcher = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->launcher;
	if (_data_->_tmp2_ == NULL) {
		_data_->result = 1;
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->args[3];
	if (g_strcmp0 (_data_->_tmp3_, PROTON_PLUS_CLI_OPT_ALL) == 0) {
		_data_->_tmp4_ = _data_->launcher;
		_data_->_state_ = 1;
		proton_plus_cli_handler_uninstall_launcher_all (_data_->self, _data_->_tmp4_, proton_plus_cli_handler_handle_uninstall_ready, _data_);
		return FALSE;
		_state_1:
		_data_->result = proton_plus_cli_handler_uninstall_launcher_all_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = _data_->launcher;
	_data_->_tmp6_ = _data_->args[3];
	_data_->_tmp7_ = proton_plus_cli_handler_find_runner (_data_->self, _data_->_tmp5_, _data_->_tmp6_);
	_data_->runner = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->runner;
	if (_data_->_tmp8_ == NULL) {
		_data_->result = 1;
		_g_object_unref0 (_data_->runner);
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->args_length1 >= 5) {
		_data_->_tmp10_ = _data_->args[4];
		_data_->_tmp9_ = g_strcmp0 (_data_->_tmp10_, PROTON_PLUS_CLI_OPT_ALL) == 0;
	} else {
		_data_->_tmp9_ = FALSE;
	}
	_data_->uninstall_all = _data_->_tmp9_;
	if (_data_->uninstall_all) {
		_data_->_tmp12_ = _data_->runner;
		_data_->_state_ = 2;
		proton_plus_cli_handler_uninstall_runner_all (_data_->self, _data_->_tmp12_, proton_plus_cli_handler_handle_uninstall_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp11_ = proton_plus_cli_handler_uninstall_runner_all_finish (_data_->self, _data_->_res_);
	} else {
		_data_->_tmp13_ = _data_->runner;
		_data_->_state_ = 3;
		proton_plus_cli_handler_uninstall_interactive (_data_->self, _data_->_tmp13_, proton_plus_cli_handler_handle_uninstall_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp11_ = proton_plus_cli_handler_uninstall_interactive_finish (_data_->self, _data_->_res_);
	}
	_data_->result = _data_->_tmp11_;
	_g_object_unref0 (_data_->runner);
	_g_object_unref0 (_data_->launcher);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_handle_update_data_free (gpointer _data)
{
	ProtonPlusCliHandlerHandleUpdateData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerHandleUpdateData, _data_);
}

static void
proton_plus_cli_handler_handle_update (ProtonPlusCLIHandler* self,
                                       gchar** args,
                                       gint args_length1,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	ProtonPlusCliHandlerHandleUpdateData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerHandleUpdateData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_handle_update_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_data_->args = args;
	_data_->args_length1 = args_length1;
	proton_plus_cli_handler_handle_update_co (_data_);
}

static gint
proton_plus_cli_handler_handle_update_finish (ProtonPlusCLIHandler* self,
                                              GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerHandleUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_handle_update_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	ProtonPlusCliHandlerHandleUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_handle_update_co (_data_);
}

static gboolean
proton_plus_cli_handler_handle_update_co (ProtonPlusCliHandlerHandleUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (!proton_plus_cli_handler_validate_args (_data_->self, _data_->args, (gint) _data_->args_length1, 3, "protonplus update <all|launcher_id> [runner_id]")) {
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp0_ = _data_->args[2];
	if (g_strcmp0 (_data_->_tmp0_, PROTON_PLUS_CLI_OPT_ALL) == 0) {
		_data_->_state_ = 1;
		proton_plus_cli_handler_update_all (_data_->self, proton_plus_cli_handler_handle_update_ready, _data_);
		return FALSE;
		_state_1:
		_data_->result = proton_plus_cli_handler_update_all_finish (_data_->self, _data_->_res_);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp1_ = _data_->args[2];
	_data_->_tmp2_ = proton_plus_cli_handler_find_launcher (_data_->self, _data_->_tmp1_);
	_data_->launcher = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->launcher;
	if (_data_->_tmp3_ == NULL) {
		_data_->result = 1;
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->args_length1 >= 4) {
		_data_->_tmp4_ = _data_->launcher;
		_data_->_tmp5_ = _data_->args[3];
		_data_->_tmp6_ = proton_plus_cli_handler_find_runner (_data_->self, _data_->_tmp4_, _data_->_tmp5_);
		_data_->runner = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->runner;
		if (_data_->_tmp7_ == NULL) {
			_data_->result = 1;
			_g_object_unref0 (_data_->runner);
			_g_object_unref0 (_data_->launcher);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp8_ = _data_->runner;
		_data_->_state_ = 2;
		proton_plus_cli_handler_update_runner (_data_->self, _data_->_tmp8_, proton_plus_cli_handler_handle_update_ready, _data_);
		return FALSE;
		_state_2:
		_data_->result = proton_plus_cli_handler_update_runner_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->runner);
		_g_object_unref0 (_data_->launcher);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp9_ = _data_->launcher;
	_data_->_state_ = 3;
	proton_plus_cli_handler_update_launcher (_data_->self, _data_->_tmp9_, proton_plus_cli_handler_handle_update_ready, _data_);
	return FALSE;
	_state_3:
	_data_->result = proton_plus_cli_handler_update_launcher_finish (_data_->self, _data_->_res_);
	_g_object_unref0 (_data_->launcher);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_install_latest_data_free (gpointer _data)
{
	ProtonPlusCliHandlerInstallLatestData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerInstallLatestData, _data_);
}

static void
proton_plus_cli_handler_install_latest (ProtonPlusCLIHandler* self,
                                        ProtonPlusModelsRunner* runner,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	ProtonPlusCliHandlerInstallLatestData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunner* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerInstallLatestData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_install_latest_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	proton_plus_cli_handler_install_latest_co (_data_);
}

static gint
proton_plus_cli_handler_install_latest_finish (ProtonPlusCLIHandler* self,
                                               GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerInstallLatestData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_install_latest_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	ProtonPlusCliHandlerInstallLatestData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_install_latest_co (_data_);
}

static gboolean
proton_plus_cli_handler_install_latest_co (ProtonPlusCliHandlerInstallLatestData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_models_runner_get_has_latest_support (_data_->runner);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (!_data_->_tmp1_) {
		_data_->_tmp2_ = proton_plus_models_runner_get_title (_data_->runner);
		_data_->_tmp3_ = _data_->_tmp2_;
		proton_plus_cli_output_error (_ ("Error: Runner '%s' does not support 'latest' installation\n"), _data_->_tmp3_, NULL);
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = _g_object_ref0 (PROTON_PLUS_MODELS_RUNNERS_IS_BASIC (_data_->runner) ? ((ProtonPlusModelsRunnersBasic*) _data_->runner) : NULL);
	_data_->basic_runner = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->basic_runner;
	_data_->_state_ = 1;
	proton_plus_cli_handler_load_runner_releases (_data_->self, _data_->_tmp5_, proton_plus_cli_handler_install_latest_ready, _data_);
	return FALSE;
	_state_1:
	_data_->code = proton_plus_cli_handler_load_runner_releases_finish (_data_->self, _data_->_res_);
	if (_data_->code != PROTON_PLUS_RETURN_CODE_RELEASES_LOADED) {
		_data_->_tmp6_ = TRUE;
	} else {
		_data_->_tmp7_ = _data_->basic_runner;
		_data_->_tmp8_ = ((ProtonPlusModelsRunner*) _data_->_tmp7_)->releases;
		_data_->_tmp6_ = g_list_length (_data_->_tmp8_) == ((guint) 0);
	}
	if (_data_->_tmp6_) {
		_data_->result = 1;
		_g_object_unref0 (_data_->basic_runner);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp9_ = _data_->basic_runner;
	_data_->_tmp10_ = ((ProtonPlusModelsRunner*) _data_->_tmp9_)->releases;
	_data_->_tmp11_ = g_list_nth_data (_data_->_tmp10_, (guint) 0);
	_data_->_tmp12_ = (ProtonPlusModelsRelease*) _data_->_tmp11_;
	_data_->_tmp13_ = _g_object_ref0 (PROTON_PLUS_MODELS_RELEASES_IS_BASIC (_data_->_tmp12_) ? ((ProtonPlusModelsReleasesBasic*) _data_->_tmp12_) : NULL);
	_data_->release = _data_->_tmp13_;
	_data_->_tmp14_ = _data_->basic_runner;
	_data_->_tmp15_ = proton_plus_models_runner_get_title (_data_->runner);
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp17_ = g_strdup_printf ("%s Latest", _data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = _data_->release;
	_data_->_tmp20_ = proton_plus_models_base_release_get_description ((ProtonPlusModelsBaseRelease*) _data_->_tmp19_);
	_data_->_tmp21_ = _data_->_tmp20_;
	_data_->_tmp22_ = _data_->release;
	_data_->_tmp23_ = proton_plus_models_base_release_get_release_date ((ProtonPlusModelsBaseRelease*) _data_->_tmp22_);
	_data_->_tmp24_ = _data_->_tmp23_;
	_data_->_tmp25_ = _data_->release;
	_data_->_tmp26_ = proton_plus_models_base_release_get_download_url ((ProtonPlusModelsBaseRelease*) _data_->_tmp25_);
	_data_->_tmp27_ = _data_->_tmp26_;
	_data_->_tmp28_ = _data_->release;
	_data_->_tmp29_ = proton_plus_models_base_release_get_page_url ((ProtonPlusModelsBaseRelease*) _data_->_tmp28_);
	_data_->_tmp30_ = _data_->_tmp29_;
	_data_->_tmp31_ = proton_plus_models_releases_latest_new (_data_->_tmp14_, _data_->_tmp18_, _data_->_tmp21_, _data_->_tmp24_, _data_->_tmp27_, _data_->_tmp30_);
	_data_->_tmp32_ = _data_->_tmp31_;
	_g_free0 (_data_->_tmp18_);
	_data_->latest_release = _data_->_tmp32_;
	_data_->_tmp33_ = proton_plus_models_runner_get_title (_data_->runner);
	_data_->_tmp34_ = _data_->_tmp33_;
	proton_plus_cli_output_info (_ ("Installing %s Latest...\n"), _data_->_tmp34_, NULL);
	_data_->_tmp35_ = _data_->latest_release;
	_data_->_state_ = 2;
	proton_plus_models_base_release_install ((ProtonPlusModelsBaseRelease*) _data_->_tmp35_, proton_plus_cli_handler_install_latest_ready, _data_);
	return FALSE;
	_state_2:
	_data_->success = proton_plus_models_base_release_install_finish ((ProtonPlusModelsBaseRelease*) _data_->_tmp35_, _data_->_res_);
	if (_data_->success) {
		_data_->_tmp36_ = _ ("Successfully installed %s Latest\n");
	} else {
		_data_->_tmp36_ = _ ("Error: Installation failed\n");
	}
	_data_->_tmp37_ = proton_plus_models_runner_get_title (_data_->runner);
	_data_->_tmp38_ = _data_->_tmp37_;
	proton_plus_cli_output_success (_data_->_tmp36_, _data_->_tmp38_, NULL);
	if (_data_->success) {
		_data_->_tmp39_ = 0;
	} else {
		_data_->_tmp39_ = 1;
	}
	_data_->result = _data_->_tmp39_;
	_g_object_unref0 (_data_->latest_release);
	_g_object_unref0 (_data_->release);
	_g_object_unref0 (_data_->basic_runner);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_install_interactive_data_free (gpointer _data)
{
	ProtonPlusCliHandlerInstallInteractiveData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerInstallInteractiveData, _data_);
}

static void
proton_plus_cli_handler_install_interactive (ProtonPlusCLIHandler* self,
                                             ProtonPlusModelsRunner* runner,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	ProtonPlusCliHandlerInstallInteractiveData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunner* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerInstallInteractiveData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_install_interactive_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	proton_plus_cli_handler_install_interactive_co (_data_);
}

static gint
proton_plus_cli_handler_install_interactive_finish (ProtonPlusCLIHandler* self,
                                                    GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerInstallInteractiveData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_install_interactive_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	ProtonPlusCliHandlerInstallInteractiveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_install_interactive_co (_data_);
}

static gboolean
proton_plus_cli_handler_install_interactive_co (ProtonPlusCliHandlerInstallInteractiveData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _g_object_ref0 (PROTON_PLUS_MODELS_RUNNERS_IS_BASIC (_data_->runner) ? ((ProtonPlusModelsRunnersBasic*) _data_->runner) : NULL);
	_data_->basic_runner = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->basic_runner;
	_data_->_state_ = 1;
	proton_plus_cli_handler_load_runner_releases (_data_->self, _data_->_tmp1_, proton_plus_cli_handler_install_interactive_ready, _data_);
	return FALSE;
	_state_1:
	_data_->code = proton_plus_cli_handler_load_runner_releases_finish (_data_->self, _data_->_res_);
	if (_data_->code != PROTON_PLUS_RETURN_CODE_RELEASES_LOADED) {
		_data_->_tmp2_ = TRUE;
	} else {
		_data_->_tmp3_ = _data_->basic_runner;
		_data_->_tmp4_ = ((ProtonPlusModelsRunner*) _data_->_tmp3_)->releases;
		_data_->_tmp2_ = g_list_length (_data_->_tmp4_) == ((guint) 0);
	}
	if (_data_->_tmp2_) {
		_data_->result = 1;
		_g_object_unref0 (_data_->basic_runner);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = proton_plus_models_runner_get_title (_data_->runner);
	_data_->_tmp6_ = _data_->_tmp5_;
	proton_plus_cli_output_header (_ ("Available releases for %s:\n"), _data_->_tmp6_, NULL);
	{
		_data_->i = 0;
		{
			_data_->_tmp7_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp7_) {
					_data_->_tmp8_ = _data_->i;
					_data_->i = _data_->_tmp8_ + 1;
				}
				_data_->_tmp7_ = FALSE;
				_data_->_tmp9_ = _data_->basic_runner;
				_data_->_tmp10_ = ((ProtonPlusModelsRunner*) _data_->_tmp9_)->releases;
				if (!(((guint) _data_->i) < g_list_length (_data_->_tmp10_))) {
					break;
				}
				_data_->_tmp11_ = _data_->basic_runner;
				_data_->_tmp12_ = ((ProtonPlusModelsRunner*) _data_->_tmp11_)->releases;
				_data_->_tmp13_ = g_list_nth_data (_data_->_tmp12_, (guint) _data_->i);
				_data_->_tmp14_ = (ProtonPlusModelsRelease*) _data_->_tmp13_;
				_data_->_tmp15_ = _g_object_ref0 (PROTON_PLUS_MODELS_RELEASES_IS_BASIC (_data_->_tmp14_) ? ((ProtonPlusModelsReleasesBasic*) _data_->_tmp14_) : NULL);
				_data_->release = _data_->_tmp15_;
				_data_->_tmp16_ = _data_->release;
				_data_->_tmp17_ = proton_plus_models_base_release_get_title ((ProtonPlusModelsBaseRelease*) _data_->_tmp16_);
				_data_->_tmp18_ = _data_->_tmp17_;
				_data_->_tmp19_ = _data_->release;
				_data_->_tmp20_ = proton_plus_models_base_release_get_release_date ((ProtonPlusModelsBaseRelease*) _data_->_tmp19_);
				_data_->_tmp21_ = _data_->_tmp20_;
				proton_plus_cli_output_info ("%d. %s (%s)\n", _data_->i + 1, _data_->_tmp18_, _data_->_tmp21_, NULL);
				_g_object_unref0 (_data_->release);
			}
		}
	}
	_data_->_tmp22_ = _data_->basic_runner;
	_data_->_tmp23_ = ((ProtonPlusModelsRunner*) _data_->_tmp22_)->releases;
	_data_->index = proton_plus_cli_handler_read_user_selection (_data_->self, _ ("Select release number"), (gint) g_list_length (_data_->_tmp23_));
	if (_data_->index < 0) {
		_data_->result = 1;
		_g_object_unref0 (_data_->basic_runner);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp24_ = _data_->basic_runner;
	_data_->_tmp25_ = ((ProtonPlusModelsRunner*) _data_->_tmp24_)->releases;
	_data_->_tmp26_ = g_list_nth_data (_data_->_tmp25_, (guint) _data_->index);
	_data_->_tmp27_ = (ProtonPlusModelsRelease*) _data_->_tmp26_;
	_data_->_tmp28_ = _g_object_ref0 (PROTON_PLUS_MODELS_RELEASES_IS_BASIC (_data_->_tmp27_) ? ((ProtonPlusModelsReleasesBasic*) _data_->_tmp27_) : NULL);
	_data_->selected = _data_->_tmp28_;
	_data_->_tmp29_ = _data_->selected;
	_data_->_tmp30_ = proton_plus_models_base_release_get_title ((ProtonPlusModelsBaseRelease*) _data_->_tmp29_);
	_data_->_tmp31_ = _data_->_tmp30_;
	proton_plus_cli_output_info (_ ("Installing %s...\n"), _data_->_tmp31_, NULL);
	_data_->_tmp32_ = _data_->selected;
	_data_->_state_ = 2;
	proton_plus_models_base_release_install ((ProtonPlusModelsBaseRelease*) _data_->_tmp32_, proton_plus_cli_handler_install_interactive_ready, _data_);
	return FALSE;
	_state_2:
	_data_->success = proton_plus_models_base_release_install_finish ((ProtonPlusModelsBaseRelease*) _data_->_tmp32_, _data_->_res_);
	if (_data_->success) {
		_data_->_tmp33_ = _ ("Successfully installed %s\n");
	} else {
		_data_->_tmp33_ = _ ("Error: Installation failed\n");
	}
	_data_->_tmp34_ = _data_->selected;
	_data_->_tmp35_ = proton_plus_models_base_release_get_title ((ProtonPlusModelsBaseRelease*) _data_->_tmp34_);
	_data_->_tmp36_ = _data_->_tmp35_;
	proton_plus_cli_output_success (_data_->_tmp33_, _data_->_tmp36_, NULL);
	if (_data_->success) {
		_data_->_tmp37_ = 0;
	} else {
		_data_->_tmp37_ = 1;
	}
	_data_->result = _data_->_tmp37_;
	_g_object_unref0 (_data_->selected);
	_g_object_unref0 (_data_->basic_runner);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_uninstall_interactive_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUninstallInteractiveData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUninstallInteractiveData, _data_);
}

static void
proton_plus_cli_handler_uninstall_interactive (ProtonPlusCLIHandler* self,
                                               ProtonPlusModelsRunner* runner,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallInteractiveData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunner* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUninstallInteractiveData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_uninstall_interactive_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	proton_plus_cli_handler_uninstall_interactive_co (_data_);
}

static gint
proton_plus_cli_handler_uninstall_interactive_finish (ProtonPlusCLIHandler* self,
                                                      GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUninstallInteractiveData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_uninstall_interactive_ready (GObject* source_object,
                                                     GAsyncResult* _res_,
                                                     gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallInteractiveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_uninstall_interactive_co (_data_);
}

static gboolean
proton_plus_cli_handler_uninstall_interactive_co (ProtonPlusCliHandlerUninstallInteractiveData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_cli_handler_get_installed_releases (_data_->self, _data_->runner);
	_data_->installed = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->installed;
	if (g_list_length (_data_->_tmp1_) == ((guint) 0)) {
		_data_->_tmp2_ = proton_plus_models_runner_get_title (_data_->runner);
		_data_->_tmp3_ = _data_->_tmp2_;
		proton_plus_cli_output_warning (_ ("No installed releases found for %s\n"), _data_->_tmp3_, NULL);
		_data_->result = 0;
		(_data_->installed == NULL) ? NULL : (_data_->installed = (_g_list_free__g_free0_ (_data_->installed), NULL));
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = proton_plus_models_runner_get_title (_data_->runner);
	_data_->_tmp5_ = _data_->_tmp4_;
	proton_plus_cli_output_header (_ ("Installed releases for %s:\n"), _data_->_tmp5_, NULL);
	{
		_data_->i = 0;
		{
			_data_->_tmp6_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp6_) {
					_data_->_tmp7_ = _data_->i;
					_data_->i = _data_->_tmp7_ + 1;
				}
				_data_->_tmp6_ = FALSE;
				_data_->_tmp8_ = _data_->installed;
				if (!(((guint) _data_->i) < g_list_length (_data_->_tmp8_))) {
					break;
				}
				_data_->_tmp9_ = _data_->installed;
				_data_->_tmp10_ = g_list_nth_data (_data_->_tmp9_, (guint) _data_->i);
				proton_plus_cli_output_info ("%d. %s\n", _data_->i + 1, (const gchar*) _data_->_tmp10_, NULL);
			}
		}
	}
	_data_->_tmp11_ = _data_->installed;
	_data_->index = proton_plus_cli_handler_read_user_selection (_data_->self, _ ("Select release number"), (gint) g_list_length (_data_->_tmp11_));
	if (_data_->index < 0) {
		_data_->result = 1;
		(_data_->installed == NULL) ? NULL : (_data_->installed = (_g_list_free__g_free0_ (_data_->installed), NULL));
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp12_ = _data_->installed;
	_data_->_tmp13_ = g_list_nth_data (_data_->_tmp12_, (guint) _data_->index);
	_data_->_tmp14_ = g_strdup ((const gchar*) _data_->_tmp13_);
	_data_->release_name = _data_->_tmp14_;
	_data_->_tmp15_ = _data_->release_name;
	_data_->_state_ = 1;
	proton_plus_cli_handler_uninstall_single_release (_data_->self, _data_->runner, _data_->_tmp15_, proton_plus_cli_handler_uninstall_interactive_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_cli_handler_uninstall_single_release_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->release_name);
	(_data_->installed == NULL) ? NULL : (_data_->installed = (_g_list_free__g_free0_ (_data_->installed), NULL));
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_uninstall_runner_all_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUninstallRunnerAllData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUninstallRunnerAllData, _data_);
}

static void
proton_plus_cli_handler_uninstall_runner_all (ProtonPlusCLIHandler* self,
                                              ProtonPlusModelsRunner* runner,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallRunnerAllData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunner* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUninstallRunnerAllData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_uninstall_runner_all_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	proton_plus_cli_handler_uninstall_runner_all_co (_data_);
}

static gint
proton_plus_cli_handler_uninstall_runner_all_finish (ProtonPlusCLIHandler* self,
                                                     GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUninstallRunnerAllData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_uninstall_runner_all_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallRunnerAllData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_uninstall_runner_all_co (_data_);
}

static gboolean
proton_plus_cli_handler_uninstall_runner_all_co (ProtonPlusCliHandlerUninstallRunnerAllData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_cli_handler_get_installed_releases (_data_->self, _data_->runner);
	_data_->installed = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->installed;
	if (g_list_length (_data_->_tmp1_) == ((guint) 0)) {
		_data_->_tmp2_ = proton_plus_models_runner_get_title (_data_->runner);
		_data_->_tmp3_ = _data_->_tmp2_;
		proton_plus_cli_output_warning (_ ("No installed releases found for %s\n"), _data_->_tmp3_, NULL);
		_data_->result = 0;
		(_data_->installed == NULL) ? NULL : (_data_->installed = (_g_list_free__g_free0_ (_data_->installed), NULL));
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = proton_plus_models_runner_get_title (_data_->runner);
	_data_->_tmp5_ = _data_->_tmp4_;
	proton_plus_cli_output_info (_ ("Uninstalling all releases for %s...\n"), _data_->_tmp5_, NULL);
	_data_->_tmp6_ = _data_->installed;
	{
		_data_->release_name_collection = _data_->_tmp6_;
		for (_data_->release_name_it = _data_->release_name_collection; _data_->release_name_it != NULL; _data_->release_name_it = _data_->release_name_it->next) {
			_data_->_tmp7_ = g_strdup ((const gchar*) _data_->release_name_it->data);
			_data_->release_name = _data_->_tmp7_;
			{
				_data_->_tmp8_ = _data_->release_name;
				_data_->_state_ = 1;
				proton_plus_cli_handler_uninstall_single_release (_data_->self, _data_->runner, _data_->_tmp8_, proton_plus_cli_handler_uninstall_runner_all_ready, _data_);
				return FALSE;
				_state_1:
				proton_plus_cli_handler_uninstall_single_release_finish (_data_->self, _data_->_res_);
				_g_free0 (_data_->release_name);
			}
		}
	}
	_data_->result = 0;
	(_data_->installed == NULL) ? NULL : (_data_->installed = (_g_list_free__g_free0_ (_data_->installed), NULL));
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_uninstall_launcher_all_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUninstallLauncherAllData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->launcher);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUninstallLauncherAllData, _data_);
}

static void
proton_plus_cli_handler_uninstall_launcher_all (ProtonPlusCLIHandler* self,
                                                ProtonPlusModelsLauncher* launcher,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallLauncherAllData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUninstallLauncherAllData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_uninstall_launcher_all_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (launcher);
	_g_object_unref0 (_data_->launcher);
	_data_->launcher = _tmp1_;
	proton_plus_cli_handler_uninstall_launcher_all_co (_data_);
}

static gint
proton_plus_cli_handler_uninstall_launcher_all_finish (ProtonPlusCLIHandler* self,
                                                       GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUninstallLauncherAllData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_uninstall_launcher_all_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallLauncherAllData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_uninstall_launcher_all_co (_data_);
}

static gboolean
proton_plus_cli_handler_uninstall_launcher_all_co (ProtonPlusCliHandlerUninstallLauncherAllData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->launcher->title;
	proton_plus_cli_output_info (_ ("Uninstalling all releases for launcher %s...\n"), _data_->_tmp0_, NULL);
	_data_->_tmp1_ = _data_->launcher->groups;
	_data_->_tmp1__length1 = _data_->launcher->groups_length1;
	{
		_data_->group_collection_length1 = 0;
		_data_->_group_collection_size_ = 0;
		_data_->group_collection = _data_->_tmp1_;
		_data_->group_collection_length1 = _data_->_tmp1__length1;
		for (_data_->group_it = 0; _data_->group_it < _data_->group_collection_length1; _data_->group_it = _data_->group_it + 1) {
			_data_->_tmp2_ = _g_object_ref0 (_data_->group_collection[_data_->group_it]);
			_data_->group = _data_->_tmp2_;
			{
				_data_->_tmp3_ = _data_->group;
				_data_->_tmp4_ = _data_->_tmp3_->runners;
				{
					_data_->runner_collection = _data_->_tmp4_;
					for (_data_->runner_it = _data_->runner_collection; _data_->runner_it != NULL; _data_->runner_it = _data_->runner_it->next) {
						_data_->_tmp5_ = _g_object_ref0 ((ProtonPlusModelsRunner*) _data_->runner_it->data);
						_data_->runner = _data_->_tmp5_;
						{
							_data_->_tmp6_ = _data_->runner;
							_data_->_tmp7_ = proton_plus_cli_handler_get_installed_releases (_data_->self, _data_->_tmp6_);
							_data_->installed = _data_->_tmp7_;
							_data_->_tmp8_ = _data_->installed;
							{
								_data_->release_name_collection = _data_->_tmp8_;
								for (_data_->release_name_it = _data_->release_name_collection; _data_->release_name_it != NULL; _data_->release_name_it = _data_->release_name_it->next) {
									_data_->_tmp9_ = g_strdup ((const gchar*) _data_->release_name_it->data);
									_data_->release_name = _data_->_tmp9_;
									{
										_data_->_tmp10_ = _data_->runner;
										_data_->_tmp11_ = _data_->release_name;
										_data_->_tmp12_ = proton_plus_cli_handler_create_release (_data_->self, _data_->_tmp10_, _data_->_tmp11_);
										_data_->release = _data_->_tmp12_;
										_data_->_tmp13_ = _data_->release;
										_data_->_tmp14_ = proton_plus_models_parameters_new ();
										_data_->_tmp15_ = _data_->_tmp14_;
										_data_->_state_ = 1;
										proton_plus_models_base_release_remove ((ProtonPlusModelsBaseRelease*) _data_->_tmp13_, _data_->_tmp15_, proton_plus_cli_handler_uninstall_launcher_all_ready, _data_);
										return FALSE;
										_state_1:
										_data_->_tmp16_ = proton_plus_models_base_release_remove_finish ((ProtonPlusModelsBaseRelease*) _data_->_tmp13_, _data_->_res_);
										_g_object_unref0 (_data_->_tmp15_);
										if (_data_->_tmp16_) {
											_data_->_tmp17_ = _data_->release_name;
											proton_plus_cli_output_success (_ ("Uninstalled %s\n"), _data_->_tmp17_, NULL);
										}
										_g_object_unref0 (_data_->release);
										_g_free0 (_data_->release_name);
									}
								}
							}
							(_data_->installed == NULL) ? NULL : (_data_->installed = (_g_list_free__g_free0_ (_data_->installed), NULL));
							_g_object_unref0 (_data_->runner);
						}
					}
				}
				_g_object_unref0 (_data_->group);
			}
		}
	}
	_data_->result = 0;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_uninstall_single_release_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUninstallSingleReleaseData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_g_free0 (_data_->release_name);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUninstallSingleReleaseData, _data_);
}

static void
proton_plus_cli_handler_uninstall_single_release (ProtonPlusCLIHandler* self,
                                                  ProtonPlusModelsRunner* runner,
                                                  const gchar* release_name,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallSingleReleaseData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunner* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	g_return_if_fail (release_name != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUninstallSingleReleaseData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_uninstall_single_release_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	_tmp2_ = g_strdup (release_name);
	_g_free0 (_data_->release_name);
	_data_->release_name = _tmp2_;
	proton_plus_cli_handler_uninstall_single_release_co (_data_);
}

static gint
proton_plus_cli_handler_uninstall_single_release_finish (ProtonPlusCLIHandler* self,
                                                         GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUninstallSingleReleaseData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_uninstall_single_release_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_)
{
	ProtonPlusCliHandlerUninstallSingleReleaseData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_uninstall_single_release_co (_data_);
}

static gboolean
proton_plus_cli_handler_uninstall_single_release_co (ProtonPlusCliHandlerUninstallSingleReleaseData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_cli_handler_create_release (_data_->self, _data_->runner, _data_->release_name);
	_data_->release = _data_->_tmp0_;
	proton_plus_cli_output_info (_ ("Uninstalling %s...\n"), _data_->release_name, NULL);
	_data_->_tmp1_ = _data_->release;
	_data_->_tmp2_ = proton_plus_models_parameters_new ();
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_state_ = 1;
	proton_plus_models_base_release_remove ((ProtonPlusModelsBaseRelease*) _data_->_tmp1_, _data_->_tmp3_, proton_plus_cli_handler_uninstall_single_release_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = proton_plus_models_base_release_remove_finish ((ProtonPlusModelsBaseRelease*) _data_->_tmp1_, _data_->_res_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->success = _data_->_tmp4_;
	if (_data_->success) {
		_data_->_tmp5_ = _ ("Successfully uninstalled %s\n");
	} else {
		_data_->_tmp5_ = _ ("Error: Uninstallation failed\n");
	}
	proton_plus_cli_output_success (_data_->_tmp5_, _data_->release_name, NULL);
	if (_data_->success) {
		_data_->_tmp6_ = 0;
	} else {
		_data_->_tmp6_ = 1;
	}
	_data_->result = _data_->_tmp6_;
	_g_object_unref0 (_data_->release);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_update_all_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUpdateAllData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUpdateAllData, _data_);
}

static void
proton_plus_cli_handler_update_all (ProtonPlusCLIHandler* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateAllData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUpdateAllData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_update_all_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_cli_handler_update_all_co (_data_);
}

static gint
proton_plus_cli_handler_update_all_finish (ProtonPlusCLIHandler* self,
                                           GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUpdateAllData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_update_all_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateAllData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_update_all_co (_data_);
}

static gboolean
proton_plus_cli_handler_update_all_co (ProtonPlusCliHandlerUpdateAllData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	proton_plus_cli_output_info (_ ("Updating all runners...\n"), NULL);
	_data_->_tmp0_ = _data_->self->priv->launchers;
	_data_->_state_ = 1;
	proton_plus_cli_handler_collect_latest_runners (_data_->self, _data_->_tmp0_, proton_plus_cli_handler_update_all_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_cli_handler_collect_latest_runners_finish (_data_->self, _data_->_res_);
	_data_->latest_runners = _data_->_tmp1_;
	_data_->_state_ = 2;
	proton_plus_cli_handler_update_runner_batch (_data_->self, _data_->latest_runners, proton_plus_cli_handler_update_all_ready, _data_);
	return FALSE;
	_state_2:
	_data_->result = proton_plus_cli_handler_update_runner_batch_finish (_data_->self, _data_->_res_);
	(_data_->latest_runners == NULL) ? NULL : (_data_->latest_runners = (_g_list_free__g_object_unref0_ (_data_->latest_runners), NULL));
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_update_launcher_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUpdateLauncherData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->launcher);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUpdateLauncherData, _data_);
}

static void
proton_plus_cli_handler_update_launcher (ProtonPlusCLIHandler* self,
                                         ProtonPlusModelsLauncher* launcher,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateLauncherData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUpdateLauncherData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_update_launcher_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (launcher);
	_g_object_unref0 (_data_->launcher);
	_data_->launcher = _tmp1_;
	proton_plus_cli_handler_update_launcher_co (_data_);
}

static gint
proton_plus_cli_handler_update_launcher_finish (ProtonPlusCLIHandler* self,
                                                GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUpdateLauncherData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_update_launcher_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateLauncherData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_update_launcher_co (_data_);
}

static gboolean
proton_plus_cli_handler_update_launcher_co (ProtonPlusCliHandlerUpdateLauncherData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->launcher->title;
	proton_plus_cli_output_info (_ ("Updating runners for %s...\n"), _data_->_tmp0_, NULL);
	_data_->scoped = NULL;
	_data_->_tmp1_ = _g_object_ref0 (_data_->launcher);
	_data_->scoped = g_list_append (_data_->scoped, _data_->_tmp1_);
	_data_->_state_ = 1;
	proton_plus_cli_handler_collect_latest_runners (_data_->self, _data_->scoped, proton_plus_cli_handler_update_launcher_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = proton_plus_cli_handler_collect_latest_runners_finish (_data_->self, _data_->_res_);
	_data_->latest_runners = _data_->_tmp2_;
	_data_->_state_ = 2;
	proton_plus_cli_handler_update_runner_batch (_data_->self, _data_->latest_runners, proton_plus_cli_handler_update_launcher_ready, _data_);
	return FALSE;
	_state_2:
	_data_->result = proton_plus_cli_handler_update_runner_batch_finish (_data_->self, _data_->_res_);
	(_data_->latest_runners == NULL) ? NULL : (_data_->latest_runners = (_g_list_free__g_object_unref0_ (_data_->latest_runners), NULL));
	(_data_->scoped == NULL) ? NULL : (_data_->scoped = (_g_list_free__g_object_unref0_ (_data_->scoped), NULL));
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_update_runner_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUpdateRunnerData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUpdateRunnerData, _data_);
}

static void
proton_plus_cli_handler_update_runner (ProtonPlusCLIHandler* self,
                                       ProtonPlusModelsRunner* runner,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateRunnerData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunner* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUpdateRunnerData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_update_runner_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	proton_plus_cli_handler_update_runner_co (_data_);
}

static gint
proton_plus_cli_handler_update_runner_finish (ProtonPlusCLIHandler* self,
                                              GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUpdateRunnerData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_update_runner_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateRunnerData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_update_runner_co (_data_);
}

static gboolean
proton_plus_cli_handler_update_runner_co (ProtonPlusCliHandlerUpdateRunnerData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_models_runner_get_has_latest_support (_data_->runner);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (!_data_->_tmp1_) {
		_data_->result = 1;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_state_ = 1;
	proton_plus_cli_handler_update_runner_with_progress (_data_->self, PROTON_PLUS_MODELS_RUNNERS_IS_BASIC (_data_->runner) ? ((ProtonPlusModelsRunnersBasic*) _data_->runner) : NULL, proton_plus_cli_handler_update_runner_ready, _data_);
	return FALSE;
	_state_1:
	_data_->code = proton_plus_cli_handler_update_runner_with_progress_finish (_data_->self, _data_->_res_);
	switch (_data_->code) {
		case PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED:
		{
			_data_->_tmp2_ = proton_plus_models_runner_get_title (_data_->runner);
			_data_->_tmp3_ = _data_->_tmp2_;
			proton_plus_cli_output_success (_ ("Successfully updated %s\n"), _data_->_tmp3_, NULL);
			_data_->result = 0;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		case PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE:
		{
			_data_->_tmp4_ = proton_plus_models_runner_get_title (_data_->runner);
			_data_->_tmp5_ = _data_->_tmp4_;
			proton_plus_cli_output_success (_ ("Already up to date: %s\n"), _data_->_tmp5_, NULL);
			_data_->result = 0;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		default:
		{
			_data_->_tmp6_ = proton_plus_models_runner_get_title (_data_->runner);
			_data_->_tmp7_ = _data_->_tmp6_;
			proton_plus_cli_output_error (_ ("Error: Failed to update %s\n"), _data_->_tmp7_, NULL);
			_data_->result = 1;
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
}

static void
proton_plus_cli_handler_collect_latest_runners_data_free (gpointer _data)
{
	ProtonPlusCliHandlerCollectLatestRunnersData* _data_;
	_data_ = _data;
	(_data_->result == NULL) ? NULL : (_data_->result = (_g_list_free__g_object_unref0_ (_data_->result), NULL));
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerCollectLatestRunnersData, _data_);
}

static void
proton_plus_cli_handler_collect_latest_runners (ProtonPlusCLIHandler* self,
                                                GList* scope,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	ProtonPlusCliHandlerCollectLatestRunnersData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerCollectLatestRunnersData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_collect_latest_runners_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_data_->scope = scope;
	proton_plus_cli_handler_collect_latest_runners_co (_data_);
}

static GList*
proton_plus_cli_handler_collect_latest_runners_finish (ProtonPlusCLIHandler* self,
                                                       GAsyncResult* _res_)
{
	GList* result;
	ProtonPlusCliHandlerCollectLatestRunnersData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_cli_handler_collect_latest_runners_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_)
{
	ProtonPlusCliHandlerCollectLatestRunnersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_collect_latest_runners_co (_data_);
}

static gboolean
proton_plus_cli_handler_collect_latest_runners_co (ProtonPlusCliHandlerCollectLatestRunnersData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->latest_runners = NULL;
	{
		_data_->launcher_collection = _data_->scope;
		for (_data_->launcher_it = _data_->launcher_collection; _data_->launcher_it != NULL; _data_->launcher_it = _data_->launcher_it->next) {
			_data_->_tmp0_ = _g_object_ref0 ((ProtonPlusModelsLauncher*) _data_->launcher_it->data);
			_data_->launcher = _data_->_tmp0_;
			{
				_data_->_tmp1_ = _data_->launcher;
				_data_->_tmp2_ = _data_->_tmp1_->groups;
				_data_->_tmp2__length1 = _data_->_tmp1_->groups_length1;
				{
					_data_->group_collection_length1 = 0;
					_data_->_group_collection_size_ = 0;
					_data_->group_collection = _data_->_tmp2_;
					_data_->group_collection_length1 = _data_->_tmp2__length1;
					for (_data_->group_it = 0; _data_->group_it < _data_->group_collection_length1; _data_->group_it = _data_->group_it + 1) {
						_data_->_tmp3_ = _g_object_ref0 (_data_->group_collection[_data_->group_it]);
						_data_->group = _data_->_tmp3_;
						{
							_data_->_tmp4_ = _data_->group;
							_data_->_tmp5_ = proton_plus_models_group_get_compatibility_tool_directories (_data_->_tmp4_);
							_data_->directories = _data_->_tmp5_;
							_data_->_tmp6_ = _data_->group;
							_data_->_tmp7_ = _data_->_tmp6_->runners;
							{
								_data_->runner_collection = _data_->_tmp7_;
								for (_data_->runner_it = _data_->runner_collection; _data_->runner_it != NULL; _data_->runner_it = _data_->runner_it->next) {
									_data_->_tmp8_ = _g_object_ref0 ((ProtonPlusModelsRunner*) _data_->runner_it->data);
									_data_->runner = _data_->_tmp8_;
									{
										_data_->_tmp10_ = _data_->runner;
										_data_->_tmp11_ = proton_plus_models_runner_get_has_latest_support (_data_->_tmp10_);
										_data_->_tmp12_ = _data_->_tmp11_;
										if (!_data_->_tmp12_) {
											_data_->_tmp9_ = TRUE;
										} else {
											_data_->_tmp13_ = _data_->runner;
											_data_->_tmp9_ = !PROTON_PLUS_MODELS_RUNNERS_IS_BASIC (_data_->_tmp13_);
										}
										if (_data_->_tmp9_) {
											_g_object_unref0 (_data_->runner);
											continue;
										}
										_data_->_tmp14_ = _data_->directories;
										{
											_data_->directory_collection = _data_->_tmp14_;
											for (_data_->directory_it = _data_->directory_collection; _data_->directory_it != NULL; _data_->directory_it = _data_->directory_it->next) {
												_data_->_tmp15_ = g_strdup ((const gchar*) _data_->directory_it->data);
												_data_->directory = _data_->_tmp15_;
												{
													_data_->_tmp16_ = _data_->directory;
													_data_->_tmp17_ = _data_->runner;
													_data_->_tmp18_ = proton_plus_models_runner_get_title (_data_->_tmp17_);
													_data_->_tmp19_ = _data_->_tmp18_;
													_data_->_tmp20_ = g_strdup_printf ("%s Latest", _data_->_tmp19_);
													_data_->_tmp21_ = _data_->_tmp20_;
													_data_->_tmp22_ = g_strcmp0 (_data_->_tmp16_, _data_->_tmp21_) == 0;
													_g_free0 (_data_->_tmp21_);
													if (_data_->_tmp22_) {
														_data_->_tmp23_ = _data_->runner;
														_data_->_tmp24_ = _g_object_ref0 (PROTON_PLUS_MODELS_RUNNERS_IS_BASIC (_data_->_tmp23_) ? ((ProtonPlusModelsRunnersBasic*) _data_->_tmp23_) : NULL);
														_data_->latest_runners = g_list_append (_data_->latest_runners, _data_->_tmp24_);
														_g_free0 (_data_->directory);
														continue;
													}
													_data_->_tmp25_ = _data_->directory;
													_data_->_tmp26_ = _data_->runner;
													_data_->_tmp27_ = proton_plus_models_runner_get_title (_data_->_tmp26_);
													_data_->_tmp28_ = _data_->_tmp27_;
													_data_->_tmp29_ = g_strdup_printf ("%s Latest Backup", _data_->_tmp28_);
													_data_->_tmp30_ = _data_->_tmp29_;
													_data_->_tmp31_ = g_strcmp0 (_data_->_tmp25_, _data_->_tmp30_) == 0;
													_g_free0 (_data_->_tmp30_);
													if (_data_->_tmp31_) {
														_data_->_tmp32_ = _data_->launcher;
														_data_->_tmp33_ = _data_->_tmp32_->directory;
														_data_->_tmp34_ = _data_->group;
														_data_->_tmp35_ = proton_plus_models_group_get_directory (_data_->_tmp34_);
														_data_->_tmp36_ = _data_->_tmp35_;
														_data_->_tmp37_ = _data_->runner;
														_data_->_tmp38_ = proton_plus_models_runner_get_title (_data_->_tmp37_);
														_data_->_tmp39_ = _data_->_tmp38_;
														_data_->_tmp40_ = g_strdup_printf ("%s/%s/%s Latest Backup", _data_->_tmp33_, _data_->_tmp36_, _data_->_tmp39_);
														_data_->_tmp41_ = _data_->_tmp40_;
														_data_->_state_ = 1;
														proton_plus_utils_filesystem_delete_directory (_data_->_tmp41_, proton_plus_cli_handler_collect_latest_runners_ready, _data_);
														return FALSE;
														_state_1:
														proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_);
														_g_free0 (_data_->_tmp41_);
														_g_free0 (_data_->directory);
														continue;
													}
													_g_free0 (_data_->directory);
												}
											}
										}
										_g_object_unref0 (_data_->runner);
									}
								}
							}
							(_data_->directories == NULL) ? NULL : (_data_->directories = (_g_list_free__g_free0_ (_data_->directories), NULL));
							_g_object_unref0 (_data_->group);
						}
					}
				}
				_g_object_unref0 (_data_->launcher);
			}
		}
	}
	_data_->result = _data_->latest_runners;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_update_runner_batch_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUpdateRunnerBatchData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUpdateRunnerBatchData, _data_);
}

static void
proton_plus_cli_handler_update_runner_batch (ProtonPlusCLIHandler* self,
                                             GList* runners,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateRunnerBatchData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUpdateRunnerBatchData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_update_runner_batch_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_data_->runners = runners;
	proton_plus_cli_handler_update_runner_batch_co (_data_);
}

static gint
proton_plus_cli_handler_update_runner_batch_finish (ProtonPlusCLIHandler* self,
                                                    GAsyncResult* _res_)
{
	gint result;
	ProtonPlusCliHandlerUpdateRunnerBatchData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_update_runner_batch_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateRunnerBatchData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_update_runner_batch_co (_data_);
}

static gboolean
proton_plus_cli_handler_update_runner_batch_co (ProtonPlusCliHandlerUpdateRunnerBatchData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (g_list_length (_data_->runners) == ((guint) 0)) {
		proton_plus_cli_output_success (_ ("Already up to date\n"), NULL);
		_data_->result = 0;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->updated_count = 0;
	{
		_data_->runner_collection = _data_->runners;
		for (_data_->runner_it = _data_->runner_collection; _data_->runner_it != NULL; _data_->runner_it = _data_->runner_it->next) {
			_data_->_tmp0_ = _g_object_ref0 ((ProtonPlusModelsRunnersBasic*) _data_->runner_it->data);
			_data_->runner = _data_->_tmp0_;
			{
				_data_->_tmp1_ = _data_->runner;
				_data_->_state_ = 1;
				proton_plus_cli_handler_update_runner_with_progress (_data_->self, _data_->_tmp1_, proton_plus_cli_handler_update_runner_batch_ready, _data_);
				return FALSE;
				_state_1:
				_data_->code = proton_plus_cli_handler_update_runner_with_progress_finish (_data_->self, _data_->_res_);
				switch (_data_->code) {
					case PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED:
					{
						_data_->_tmp2_ = _data_->runner;
						_data_->_tmp3_ = proton_plus_models_runner_get_title ((ProtonPlusModelsRunner*) _data_->_tmp2_);
						_data_->_tmp4_ = _data_->_tmp3_;
						proton_plus_cli_output_success (_ ("Successfully updated %s\n"), _data_->_tmp4_, NULL);
						_data_->_tmp5_ = _data_->updated_count;
						_data_->updated_count = _data_->_tmp5_ + 1;
						break;
					}
					case PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE:
					{
						_data_->_tmp6_ = _data_->runner;
						_data_->_tmp7_ = proton_plus_models_runner_get_title ((ProtonPlusModelsRunner*) _data_->_tmp6_);
						_data_->_tmp8_ = _data_->_tmp7_;
						proton_plus_cli_output_success (_ ("Already up to date: %s\n"), _data_->_tmp8_, NULL);
						break;
					}
					default:
					{
						_data_->_tmp9_ = _data_->runner;
						_data_->_tmp10_ = proton_plus_models_runner_get_title ((ProtonPlusModelsRunner*) _data_->_tmp9_);
						_data_->_tmp11_ = _data_->_tmp10_;
						proton_plus_cli_output_error (_ ("Error: Failed to update %s\n"), _data_->_tmp11_, NULL);
						break;
					}
				}
				_g_object_unref0 (_data_->runner);
			}
		}
	}
	_data_->result = 0;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_update_runner_with_progress_data_free (gpointer _data)
{
	ProtonPlusCliHandlerUpdateRunnerWithProgressData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerUpdateRunnerWithProgressData, _data_);
}

static void
proton_plus_cli_handler_update_runner_with_progress (ProtonPlusCLIHandler* self,
                                                     ProtonPlusModelsRunnersBasic* runner,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateRunnerWithProgressData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunnersBasic* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerUpdateRunnerWithProgressData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_update_runner_with_progress_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (runner);
	_g_object_unref0 (_data_->runner);
	_data_->runner = _tmp1_;
	proton_plus_cli_handler_update_runner_with_progress_co (_data_);
}

static ProtonPlusReturnCode
proton_plus_cli_handler_update_runner_with_progress_finish (ProtonPlusCLIHandler* self,
                                                            GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusCliHandlerUpdateRunnerWithProgressData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_update_runner_with_progress_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_)
{
	ProtonPlusCliHandlerUpdateRunnerWithProgressData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_update_runner_with_progress_co (_data_);
}

static gboolean
proton_plus_cli_handler_update_runner_with_progress_co (ProtonPlusCliHandlerUpdateRunnerWithProgressData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_strconcat (_ ("Updating %s..."), "\r", NULL);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = proton_plus_models_runner_get_title ((ProtonPlusModelsRunner*) _data_->runner);
	_data_->_tmp3_ = _data_->_tmp2_;
	proton_plus_cli_output_info (_data_->_tmp1_, _data_->_tmp3_, NULL);
	_g_free0 (_data_->_tmp1_);
	_data_->_tmp4_ = stdout;
	fflush (_data_->_tmp4_);
	_data_->_state_ = 1;
	proton_plus_models_runner_update_specific_runner (_data_->runner, proton_plus_cli_handler_update_runner_with_progress_ready, _data_);
	return FALSE;
	_state_1:
	_data_->code = proton_plus_models_runner_update_specific_runner_finish (_data_->_res_);
	proton_plus_cli_output_info ("\r\033[2K\r", NULL);
	_data_->result = _data_->code;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_load_launchers_data_free (gpointer _data)
{
	ProtonPlusCliHandlerLoadLaunchersData* _data_;
	_data_ = _data;
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerLoadLaunchersData, _data_);
}

static void
proton_plus_cli_handler_load_launchers (ProtonPlusCLIHandler* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	ProtonPlusCliHandlerLoadLaunchersData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerLoadLaunchersData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_load_launchers_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_cli_handler_load_launchers_co (_data_);
}

static gboolean
proton_plus_cli_handler_load_launchers_finish (ProtonPlusCLIHandler* self,
                                               GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusCliHandlerLoadLaunchersData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_load_launchers_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	ProtonPlusCliHandlerLoadLaunchersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_load_launchers_co (_data_);
}

static gboolean
proton_plus_cli_handler_load_launchers_co (ProtonPlusCliHandlerLoadLaunchersData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_state_ = 1;
	proton_plus_models_launcher_get_all (proton_plus_cli_handler_load_launchers_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_models_launcher_get_all_finish (_data_->_res_, &_data_->_tmp0_);
	(_data_->self->priv->launchers == NULL) ? NULL : (_data_->self->priv->launchers = (_g_list_free__g_object_unref0_ (_data_->self->priv->launchers), NULL));
	_data_->self->priv->launchers = _data_->_tmp0_;
	_data_->success = _data_->_tmp1_;
	if (!_data_->success) {
		_data_->_tmp2_ = TRUE;
	} else {
		_data_->_tmp3_ = _data_->self->priv->launchers;
		_data_->_tmp2_ = _data_->_tmp3_ == NULL;
	}
	if (_data_->_tmp2_) {
		proton_plus_cli_output_error (_ ("Error: Failed to load launchers\n"), NULL);
		_data_->result = FALSE;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = TRUE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_cli_handler_load_runner_releases_data_free (gpointer _data)
{
	ProtonPlusCliHandlerLoadRunnerReleasesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->basic_runner);
	_proton_plus_cli_handler_unref0 (_data_->self);
	g_slice_free (ProtonPlusCliHandlerLoadRunnerReleasesData, _data_);
}

static void
proton_plus_cli_handler_load_runner_releases (ProtonPlusCLIHandler* self,
                                              ProtonPlusModelsRunnersBasic* basic_runner,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	ProtonPlusCliHandlerLoadRunnerReleasesData* _data_;
	ProtonPlusCLIHandler* _tmp0_;
	ProtonPlusModelsRunnersBasic* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (basic_runner != NULL);
	_data_ = g_slice_new0 (ProtonPlusCliHandlerLoadRunnerReleasesData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_cli_handler_load_runner_releases_data_free);
	_tmp0_ = _proton_plus_cli_handler_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (basic_runner);
	_g_object_unref0 (_data_->basic_runner);
	_data_->basic_runner = _tmp1_;
	proton_plus_cli_handler_load_runner_releases_co (_data_);
}

static ProtonPlusReturnCode
proton_plus_cli_handler_load_runner_releases_finish (ProtonPlusCLIHandler* self,
                                                     GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusCliHandlerLoadRunnerReleasesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_cli_handler_load_runner_releases_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	ProtonPlusCliHandlerLoadRunnerReleasesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_cli_handler_load_runner_releases_co (_data_);
}

static gboolean
proton_plus_cli_handler_load_runner_releases_co (ProtonPlusCliHandlerLoadRunnerReleasesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_state_ = 1;
	proton_plus_models_runner_load ((ProtonPlusModelsRunner*) _data_->basic_runner, proton_plus_cli_handler_load_runner_releases_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_models_runner_load_finish ((ProtonPlusModelsRunner*) _data_->basic_runner, _data_->_res_, &_data_->_tmp0_);
	(((ProtonPlusModelsRunner*) _data_->basic_runner)->releases == NULL) ? NULL : (((ProtonPlusModelsRunner*) _data_->basic_runner)->releases = (_g_list_free__g_object_unref0_ (((ProtonPlusModelsRunner*) _data_->basic_runner)->releases), NULL));
	((ProtonPlusModelsRunner*) _data_->basic_runner)->releases = _data_->_tmp0_;
	_data_->code = _data_->_tmp1_;
	if (_data_->code != PROTON_PLUS_RETURN_CODE_RELEASES_LOADED) {
		_data_->_tmp2_ = TRUE;
	} else {
		_data_->_tmp3_ = ((ProtonPlusModelsRunner*) _data_->basic_runner)->releases;
		_data_->_tmp2_ = g_list_length (_data_->_tmp3_) == ((guint) 0);
	}
	if (_data_->_tmp2_) {
		proton_plus_cli_output_error (_ ("Error: Failed to load releases\n"), NULL);
	}
	_data_->result = _data_->code;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static ProtonPlusModelsLauncher*
proton_plus_cli_handler_find_launcher (ProtonPlusCLIHandler* self,
                                       const gchar* launcher_id)
{
	GList* _tmp0_;
	ProtonPlusModelsLauncher* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (launcher_id != NULL, NULL);
	_tmp0_ = self->priv->launchers;
	{
		GList* launcher_collection = NULL;
		GList* launcher_it = NULL;
		launcher_collection = _tmp0_;
		for (launcher_it = launcher_collection; launcher_it != NULL; launcher_it = launcher_it->next) {
			ProtonPlusModelsLauncher* _tmp1_;
			ProtonPlusModelsLauncher* launcher = NULL;
			_tmp1_ = _g_object_ref0 ((ProtonPlusModelsLauncher*) launcher_it->data);
			launcher = _tmp1_;
			{
				ProtonPlusModelsLauncher* _tmp2_;
				gchar* _tmp3_;
				gchar* _tmp4_;
				gboolean _tmp5_;
				_tmp2_ = launcher;
				_tmp3_ = proton_plus_cli_handler_get_launcher_id (self, _tmp2_);
				_tmp4_ = _tmp3_;
				_tmp5_ = g_strcmp0 (_tmp4_, launcher_id) == 0;
				_g_free0 (_tmp4_);
				if (_tmp5_) {
					result = launcher;
					return result;
				}
				_g_object_unref0 (launcher);
			}
		}
	}
	proton_plus_cli_output_error (_ ("Error: Launcher '%s' not found\n"), launcher_id, NULL);
	proton_plus_cli_handler_print_available_launchers (self);
	result = NULL;
	return result;
}

static ProtonPlusModelsRunner*
proton_plus_cli_handler_find_runner (ProtonPlusCLIHandler* self,
                                     ProtonPlusModelsLauncher* launcher,
                                     const gchar* runner_id)
{
	ProtonPlusModelsGroup** _tmp0_;
	gint _tmp0__length1;
	ProtonPlusModelsRunner* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (launcher != NULL, NULL);
	g_return_val_if_fail (runner_id != NULL, NULL);
	_tmp0_ = launcher->groups;
	_tmp0__length1 = launcher->groups_length1;
	{
		ProtonPlusModelsGroup** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
		group_collection = _tmp0_;
		group_collection_length1 = _tmp0__length1;
		for (group_it = 0; group_it < group_collection_length1; group_it = group_it + 1) {
			ProtonPlusModelsGroup* _tmp1_;
			ProtonPlusModelsGroup* group = NULL;
			_tmp1_ = _g_object_ref0 (group_collection[group_it]);
			group = _tmp1_;
			{
				ProtonPlusModelsGroup* _tmp2_;
				GList* _tmp3_;
				_tmp2_ = group;
				_tmp3_ = _tmp2_->runners;
				{
					GList* runner_collection = NULL;
					GList* runner_it = NULL;
					runner_collection = _tmp3_;
					for (runner_it = runner_collection; runner_it != NULL; runner_it = runner_it->next) {
						ProtonPlusModelsRunner* _tmp4_;
						ProtonPlusModelsRunner* runner = NULL;
						_tmp4_ = _g_object_ref0 ((ProtonPlusModelsRunner*) runner_it->data);
						runner = _tmp4_;
						{
							ProtonPlusModelsRunner* _tmp5_;
							gchar* _tmp6_;
							gchar* _tmp7_;
							gboolean _tmp8_;
							_tmp5_ = runner;
							_tmp6_ = proton_plus_cli_handler_get_runner_id (self, _tmp5_);
							_tmp7_ = _tmp6_;
							_tmp8_ = g_strcmp0 (_tmp7_, runner_id) == 0;
							_g_free0 (_tmp7_);
							if (_tmp8_) {
								result = runner;
								_g_object_unref0 (group);
								return result;
							}
							_g_object_unref0 (runner);
						}
					}
				}
				_g_object_unref0 (group);
			}
		}
	}
	proton_plus_cli_output_error (_ ("Error: Runner '%s' not found\n"), runner_id, NULL);
	proton_plus_cli_handler_print_available_runners (self, launcher);
	result = NULL;
	return result;
}

static GList*
proton_plus_cli_handler_get_installed_releases (ProtonPlusCLIHandler* self,
                                                ProtonPlusModelsRunner* runner)
{
	GList* directories = NULL;
	ProtonPlusModelsGroup* _tmp0_;
	ProtonPlusModelsGroup* _tmp1_;
	GList* _tmp2_;
	GList* installed = NULL;
	GList* _tmp3_;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (runner != NULL, NULL);
	_tmp0_ = proton_plus_models_runner_get_group (runner);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_models_group_get_compatibility_tool_directories (_tmp1_);
	directories = _tmp2_;
	installed = NULL;
	_tmp3_ = directories;
	{
		GList* dir_collection = NULL;
		GList* dir_it = NULL;
		dir_collection = _tmp3_;
		for (dir_it = dir_collection; dir_it != NULL; dir_it = dir_it->next) {
			gchar* _tmp4_;
			gchar* dir = NULL;
			_tmp4_ = g_strdup ((const gchar*) dir_it->data);
			dir = _tmp4_;
			{
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				const gchar* _tmp7_;
				_tmp5_ = dir;
				_tmp6_ = proton_plus_models_runner_get_title (runner);
				_tmp7_ = _tmp6_;
				if (g_str_has_prefix (_tmp5_, _tmp7_)) {
					const gchar* _tmp8_;
					gchar* _tmp9_;
					_tmp8_ = dir;
					_tmp9_ = g_strdup (_tmp8_);
					installed = g_list_append (installed, _tmp9_);
				}
				_g_free0 (dir);
			}
		}
	}
	result = installed;
	(directories == NULL) ? NULL : (directories = (_g_list_free__g_free0_ (directories), NULL));
	return result;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gchar*
proton_plus_cli_handler_get_launcher_id (ProtonPlusCLIHandler* self,
                                         ProtonPlusModelsLauncher* launcher)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (launcher != NULL, NULL);
	_tmp0_ = launcher->title;
	_tmp1_ = g_utf8_strdown (_tmp0_, (gssize) -1);
	_tmp2_ = _tmp1_;
	_tmp3_ = string_replace (_tmp2_, " ", "-");
	_tmp4_ = _tmp3_;
	_tmp5_ = proton_plus_models_launcher_get_installation_type_title (launcher);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_utf8_strdown (_tmp6_, (gssize) -1);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup_printf ("%s-%s", _tmp4_, _tmp8_);
	_tmp10_ = _tmp9_;
	_g_free0 (_tmp8_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	result = _tmp10_;
	return result;
}

static gchar*
proton_plus_cli_handler_get_runner_id (ProtonPlusCLIHandler* self,
                                       ProtonPlusModelsRunner* runner)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (runner != NULL, NULL);
	_tmp0_ = proton_plus_models_runner_get_title (runner);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_utf8_strdown (_tmp1_, (gssize) -1);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_replace (_tmp3_, " ", "-");
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	result = _tmp5_;
	return result;
}

static gchar*
proton_plus_cli_handler_get_release_path (ProtonPlusCLIHandler* self,
                                          ProtonPlusModelsRunner* runner,
                                          const gchar* release_name)
{
	ProtonPlusModelsGroup* _tmp0_;
	ProtonPlusModelsGroup* _tmp1_;
	ProtonPlusModelsLauncher* _tmp2_;
	ProtonPlusModelsLauncher* _tmp3_;
	const gchar* _tmp4_;
	ProtonPlusModelsGroup* _tmp5_;
	ProtonPlusModelsGroup* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (runner != NULL, NULL);
	g_return_val_if_fail (release_name != NULL, NULL);
	_tmp0_ = proton_plus_models_runner_get_group (runner);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_models_group_get_launcher (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_->directory;
	_tmp5_ = proton_plus_models_runner_get_group (runner);
	_tmp6_ = _tmp5_;
	_tmp7_ = proton_plus_models_group_get_directory (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup_printf ("%s%s/%s", _tmp4_, _tmp8_, release_name);
	result = _tmp9_;
	return result;
}

static ProtonPlusModelsReleasesBasic*
proton_plus_cli_handler_create_release (ProtonPlusCLIHandler* self,
                                        ProtonPlusModelsRunner* runner,
                                        const gchar* release_name)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	ProtonPlusModelsReleasesBasic* _tmp2_;
	ProtonPlusModelsReleasesBasic* _tmp3_;
	ProtonPlusModelsReleasesBasic* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (runner != NULL, NULL);
	g_return_val_if_fail (release_name != NULL, NULL);
	_tmp0_ = proton_plus_cli_handler_get_release_path (self, runner, release_name);
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_models_releases_basic_new_simple (PROTON_PLUS_MODELS_RUNNERS_IS_BASIC (runner) ? ((ProtonPlusModelsRunnersBasic*) runner) : NULL, release_name, _tmp1_);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	result = _tmp3_;
	return result;
}

static gboolean
proton_plus_cli_handler_validate_args (ProtonPlusCLIHandler* self,
                                       gchar** args,
                                       gint args_length1,
                                       gint min_required,
                                       const gchar* usage)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (usage != NULL, FALSE);
	if (args_length1 < min_required) {
		proton_plus_cli_output_error (_ ("Usage: %s\n"), usage, NULL);
		result = FALSE;
		return result;
	}
	result = TRUE;
	return result;
}

static gchar*
g_file_stream_read_line (FILE* self)
{
	gint c = 0;
	GString* ret = NULL;
	GString* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	ret = NULL;
	while (TRUE) {
		GString* _tmp0_;
		GString* _tmp2_;
		c = fgetc (self);
		if (!(c != EOF)) {
			break;
		}
		_tmp0_ = ret;
		if (_tmp0_ == NULL) {
			GString* _tmp1_;
			_tmp1_ = g_string_new ("");
			_g_string_free0 (ret);
			ret = _tmp1_;
		}
		if (c == ((gint) '\n')) {
			break;
		}
		_tmp2_ = ret;
		g_string_append_c ((GString*) _tmp2_, (gchar) c);
	}
	_tmp3_ = ret;
	if (_tmp3_ == NULL) {
		result = NULL;
		_g_string_free0 (ret);
		return result;
	} else {
		GString* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = ret;
		_tmp5_ = ((GString*) _tmp4_)->str;
		((GString*) _tmp4_)->str = NULL;
		result = _tmp5_;
		_g_string_free0 (ret);
		return result;
	}
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static gint
proton_plus_cli_handler_read_user_selection (ProtonPlusCLIHandler* self,
                                             const gchar* prompt,
                                             gint max)
{
	FILE* _tmp0_;
	FILE* _tmp1_;
	gchar* input = NULL;
	FILE* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_;
	gint val = 0;
	const gchar* _tmp9_;
	gboolean _tmp10_ = FALSE;
	gint index = 0;
	gboolean _tmp14_ = FALSE;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (prompt != NULL, -1);
	_tmp0_ = stdout;
	fprintf (_tmp0_, "%s: ", prompt);
	_tmp1_ = stdout;
	fflush (_tmp1_);
	_tmp2_ = stdin;
	_tmp3_ = g_file_stream_read_line (_tmp2_);
	input = _tmp3_;
	_tmp5_ = input;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp6_ = input;
		_tmp7_ = string_strip (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = g_strcmp0 (_tmp8_, "") == 0;
		_g_free0 (_tmp8_);
	}
	if (_tmp4_) {
		result = -1;
		_g_free0 (input);
		return result;
	}
	_tmp9_ = input;
	val = atoi (_tmp9_);
	if (val == 0) {
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp11_ = input;
		_tmp12_ = string_strip (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp10_ = g_strcmp0 (_tmp13_, "0") != 0;
		_g_free0 (_tmp13_);
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		proton_plus_cli_output_error (_ ("Error: Invalid input, please enter a number\n"), NULL);
		result = -1;
		_g_free0 (input);
		return result;
	}
	index = val - 1;
	if (index < 0) {
		_tmp14_ = TRUE;
	} else {
		_tmp14_ = index >= max;
	}
	if (_tmp14_) {
		proton_plus_cli_output_error (_ ("Error: Selection out of range\n"), NULL);
		result = -1;
		_g_free0 (input);
		return result;
	}
	result = index;
	_g_free0 (input);
	return result;
}

static void
proton_plus_cli_handler_print_usage (ProtonPlusCLIHandler* self)
{
	g_return_if_fail (self != NULL);
	proton_plus_cli_output_header (_ ("Usage:\n"), NULL);
	proton_plus_cli_output_info ("  protonplus <command> [options]\n\n", NULL);
	proton_plus_cli_output_header (_ ("Commands:\n"), NULL);
	proton_plus_cli_output_info ("  %-45s %s\n", "version", _ ("Show version"), NULL);
	proton_plus_cli_output_info ("  %-45s %s\n", "help", _ ("Show this help"), NULL);
	proton_plus_cli_output_info ("  %-45s %s\n", "list [launcher_id]", _ ("List launchers or installed runners"), NULL);
	proton_plus_cli_output_info ("  %-45s %s\n", "install <launcher_id> <runner_id> [latest]", _ ("Install runner"), NULL);
	proton_plus_cli_output_info ("  %-45s %s\n", "uninstall <launcher_id> <runner_id|all> [all]", _ ("Uninstall runner"), NULL);
	proton_plus_cli_output_info ("  %-45s %s\n", "update <all|launcher_id> [runner_id]", _ ("Update runner"), NULL);
}

static void
proton_plus_cli_handler_print_available_launchers (ProtonPlusCLIHandler* self)
{
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	proton_plus_cli_output_header (_ ("\nAvailable launchers:\n"), NULL);
	_tmp0_ = self->priv->launchers;
	{
		GList* launcher_collection = NULL;
		GList* launcher_it = NULL;
		launcher_collection = _tmp0_;
		for (launcher_it = launcher_collection; launcher_it != NULL; launcher_it = launcher_it->next) {
			ProtonPlusModelsLauncher* _tmp1_;
			ProtonPlusModelsLauncher* launcher = NULL;
			_tmp1_ = _g_object_ref0 ((ProtonPlusModelsLauncher*) launcher_it->data);
			launcher = _tmp1_;
			{
				ProtonPlusModelsLauncher* _tmp2_;
				gchar* _tmp3_;
				gchar* _tmp4_;
				ProtonPlusModelsLauncher* _tmp5_;
				const gchar* _tmp6_;
				_tmp2_ = launcher;
				_tmp3_ = proton_plus_cli_handler_get_launcher_id (self, _tmp2_);
				_tmp4_ = _tmp3_;
				_tmp5_ = launcher;
				_tmp6_ = _tmp5_->title;
				proton_plus_cli_output_info ("  %-45s (%s)\n", _tmp4_, _tmp6_, NULL);
				_g_free0 (_tmp4_);
				_g_object_unref0 (launcher);
			}
		}
	}
}

static void
proton_plus_cli_handler_print_available_runners (ProtonPlusCLIHandler* self,
                                                 ProtonPlusModelsLauncher* launcher)
{
	const gchar* _tmp0_;
	ProtonPlusModelsGroup** _tmp1_;
	gint _tmp1__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launcher != NULL);
	_tmp0_ = launcher->title;
	proton_plus_cli_output_header (_ ("\nAvailable runners for %s:\n"), _tmp0_, NULL);
	_tmp1_ = launcher->groups;
	_tmp1__length1 = launcher->groups_length1;
	{
		ProtonPlusModelsGroup** group_collection = NULL;
		gint group_collection_length1 = 0;
		gint _group_collection_size_ = 0;
		gint group_it = 0;
		group_collection = _tmp1_;
		group_collection_length1 = _tmp1__length1;
		for (group_it = 0; group_it < group_collection_length1; group_it = group_it + 1) {
			ProtonPlusModelsGroup* _tmp2_;
			ProtonPlusModelsGroup* group = NULL;
			_tmp2_ = _g_object_ref0 (group_collection[group_it]);
			group = _tmp2_;
			{
				ProtonPlusModelsGroup* _tmp3_;
				GList* _tmp4_;
				_tmp3_ = group;
				_tmp4_ = _tmp3_->runners;
				{
					GList* runner_collection = NULL;
					GList* runner_it = NULL;
					runner_collection = _tmp4_;
					for (runner_it = runner_collection; runner_it != NULL; runner_it = runner_it->next) {
						ProtonPlusModelsRunner* _tmp5_;
						ProtonPlusModelsRunner* runner = NULL;
						_tmp5_ = _g_object_ref0 ((ProtonPlusModelsRunner*) runner_it->data);
						runner = _tmp5_;
						{
							ProtonPlusModelsRunner* _tmp6_;
							gchar* _tmp7_;
							gchar* _tmp8_;
							ProtonPlusModelsRunner* _tmp9_;
							const gchar* _tmp10_;
							const gchar* _tmp11_;
							_tmp6_ = runner;
							_tmp7_ = proton_plus_cli_handler_get_runner_id (self, _tmp6_);
							_tmp8_ = _tmp7_;
							_tmp9_ = runner;
							_tmp10_ = proton_plus_models_runner_get_title (_tmp9_);
							_tmp11_ = _tmp10_;
							proton_plus_cli_output_info ("  %-45s (%s)\n", _tmp8_, _tmp11_, NULL);
							_g_free0 (_tmp8_);
							_g_object_unref0 (runner);
						}
					}
				}
				_g_object_unref0 (group);
			}
		}
	}
}

ProtonPlusCLIHandler*
proton_plus_cli_handler_construct (GType object_type)
{
	ProtonPlusCLIHandler* self = NULL;
	self = (ProtonPlusCLIHandler*) g_type_create_instance (object_type);
	return self;
}

ProtonPlusCLIHandler*
proton_plus_cli_handler_new (void)
{
	return proton_plus_cli_handler_construct (PROTON_PLUS_CLI_TYPE_HANDLER);
}

static void
proton_plus_cli_value_handler_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
proton_plus_cli_value_handler_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		proton_plus_cli_handler_unref (value->data[0].v_pointer);
	}
}

static void
proton_plus_cli_value_handler_copy_value (const GValue* src_value,
                                          GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = proton_plus_cli_handler_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
proton_plus_cli_value_handler_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
proton_plus_cli_value_handler_collect_value (GValue* value,
                                             guint n_collect_values,
                                             GTypeCValue* collect_values,
                                             guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		ProtonPlusCLIHandler * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = proton_plus_cli_handler_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
proton_plus_cli_value_handler_lcopy_value (const GValue* value,
                                           guint n_collect_values,
                                           GTypeCValue* collect_values,
                                           guint collect_flags)
{
	ProtonPlusCLIHandler ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = proton_plus_cli_handler_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
proton_plus_cli_param_spec_handler (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags)
{
	ProtonPlusCLIParamSpecHandler* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PROTON_PLUS_CLI_TYPE_HANDLER), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
proton_plus_cli_value_get_handler (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_CLI_TYPE_HANDLER), NULL);
	return value->data[0].v_pointer;
}

void
proton_plus_cli_value_set_handler (GValue* value,
                                   gpointer v_object)
{
	ProtonPlusCLIHandler * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_CLI_TYPE_HANDLER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PROTON_PLUS_CLI_TYPE_HANDLER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		proton_plus_cli_handler_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		proton_plus_cli_handler_unref (old);
	}
}

void
proton_plus_cli_value_take_handler (GValue* value,
                                    gpointer v_object)
{
	ProtonPlusCLIHandler * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_CLI_TYPE_HANDLER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PROTON_PLUS_CLI_TYPE_HANDLER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		proton_plus_cli_handler_unref (old);
	}
}

static void
proton_plus_cli_handler_class_init (ProtonPlusCLIHandlerClass * klass,
                                    gpointer klass_data)
{
	proton_plus_cli_handler_parent_class = g_type_class_peek_parent (klass);
	((ProtonPlusCLIHandlerClass *) klass)->finalize = proton_plus_cli_handler_finalize;
	g_type_class_adjust_private_offset (klass, &ProtonPlusCLIHandler_private_offset);
}

static void
proton_plus_cli_handler_instance_init (ProtonPlusCLIHandler * self,
                                       gpointer klass)
{
	self->priv = proton_plus_cli_handler_get_instance_private (self);
	self->ref_count = 1;
}

static void
proton_plus_cli_handler_finalize (ProtonPlusCLIHandler * obj)
{
	ProtonPlusCLIHandler * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_CLI_TYPE_HANDLER, ProtonPlusCLIHandler);
	g_signal_handlers_destroy (self);
	(self->priv->launchers == NULL) ? NULL : (self->priv->launchers = (_g_list_free__g_object_unref0_ (self->priv->launchers), NULL));
}

static GType
proton_plus_cli_handler_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { proton_plus_cli_value_handler_init, proton_plus_cli_value_handler_free_value, proton_plus_cli_value_handler_copy_value, proton_plus_cli_value_handler_peek_pointer, "p", proton_plus_cli_value_handler_collect_value, "p", proton_plus_cli_value_handler_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusCLIHandlerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_cli_handler_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusCLIHandler), 0, (GInstanceInitFunc) proton_plus_cli_handler_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType proton_plus_cli_handler_type_id;
	proton_plus_cli_handler_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ProtonPlusCLIHandler", &g_define_type_info, &g_define_type_fundamental_info, 0);
	ProtonPlusCLIHandler_private_offset = g_type_add_instance_private (proton_plus_cli_handler_type_id, sizeof (ProtonPlusCLIHandlerPrivate));
	return proton_plus_cli_handler_type_id;
}

GType
proton_plus_cli_handler_get_type (void)
{
	static volatile gsize proton_plus_cli_handler_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_cli_handler_type_id__once)) {
		GType proton_plus_cli_handler_type_id;
		proton_plus_cli_handler_type_id = proton_plus_cli_handler_get_type_once ();
		g_once_init_leave (&proton_plus_cli_handler_type_id__once, proton_plus_cli_handler_type_id);
	}
	return proton_plus_cli_handler_type_id__once;
}

gpointer
proton_plus_cli_handler_ref (gpointer instance)
{
	ProtonPlusCLIHandler * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
proton_plus_cli_handler_unref (gpointer instance)
{
	ProtonPlusCLIHandler * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PROTON_PLUS_CLI_HANDLER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

