/* steam-tinker-launch-workflow.c generated by valac 0.56.19, the Vala compiler
 * generated from steam-tinker-launch-workflow.vala, do not modify */

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "protonplus_core.h"
#include <gio/gio.h>
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
#include <gee.h>
#include <json-glib/json-glib.h>

#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

#define PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP (proton_plus_services_steam_tinker_launch_directory_backup_get_type ())
#define PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, ProtonPlusServicesSteamTinkerLaunchDirectoryBackup))
#define PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass))
#define PROTON_PLUS_SERVICES_IS_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP))
#define PROTON_PLUS_SERVICES_IS_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP))
#define PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass))

typedef struct _ProtonPlusServicesSteamTinkerLaunchDirectoryBackup ProtonPlusServicesSteamTinkerLaunchDirectoryBackup;
typedef struct _ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass;
typedef struct _ProtonPlusServicesSteamTinkerLaunchDirectoryBackupPrivate ProtonPlusServicesSteamTinkerLaunchDirectoryBackupPrivate;
enum  {
	PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_0_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_ORIGINAL_PATH_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_BACKUP_PATH_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_steam_tinker_launch_directory_backup_properties[PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define PROTON_PLUS_SERVICES_TYPE_ARCHIVE_WORKFLOW_SUPPORT (proton_plus_services_archive_workflow_support_get_type ())
#define PROTON_PLUS_SERVICES_ARCHIVE_WORKFLOW_SUPPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_WORKFLOW_SUPPORT, ProtonPlusServicesArchiveWorkflowSupport))
#define PROTON_PLUS_SERVICES_ARCHIVE_WORKFLOW_SUPPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_WORKFLOW_SUPPORT, ProtonPlusServicesArchiveWorkflowSupportClass))
#define PROTON_PLUS_SERVICES_IS_ARCHIVE_WORKFLOW_SUPPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_WORKFLOW_SUPPORT))
#define PROTON_PLUS_SERVICES_IS_ARCHIVE_WORKFLOW_SUPPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_WORKFLOW_SUPPORT))
#define PROTON_PLUS_SERVICES_ARCHIVE_WORKFLOW_SUPPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_WORKFLOW_SUPPORT, ProtonPlusServicesArchiveWorkflowSupportClass))

typedef struct _ProtonPlusServicesArchiveWorkflowSupport ProtonPlusServicesArchiveWorkflowSupport;
typedef struct _ProtonPlusServicesArchiveWorkflowSupportClass ProtonPlusServicesArchiveWorkflowSupportClass;
enum  {
	PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_0_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_steam_tinker_launch_workflow_properties[PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION (proton_plus_services_archive_operation_get_type ())
#define PROTON_PLUS_SERVICES_ARCHIVE_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION, ProtonPlusServicesArchiveOperation))
#define PROTON_PLUS_SERVICES_ARCHIVE_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION, ProtonPlusServicesArchiveOperationClass))
#define PROTON_PLUS_SERVICES_IS_ARCHIVE_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION))
#define PROTON_PLUS_SERVICES_IS_ARCHIVE_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION))
#define PROTON_PLUS_SERVICES_ARCHIVE_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION, ProtonPlusServicesArchiveOperationClass))

typedef struct _ProtonPlusServicesArchiveOperation ProtonPlusServicesArchiveOperation;
typedef struct _ProtonPlusServicesArchiveOperationClass ProtonPlusServicesArchiveOperationClass;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData;
typedef struct _ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData;

struct _ProtonPlusServicesSteamTinkerLaunchDirectoryBackup {
	GObject parent_instance;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackupPrivate * priv;
};

struct _ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass {
	GObjectClass parent_class;
};

struct _ProtonPlusServicesSteamTinkerLaunchDirectoryBackupPrivate {
	gchar* _original_path;
	gchar* _backup_path;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowPrivate {
	ProtonPlusServicesArchiveWorkflowSupport* archive_support;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesInstallJob* job;
	gboolean replace_existing;
	ProtonPlusReturnCode result;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gboolean exists;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gboolean _tmp5_;
	ProtonPlusServicesArchiveOperation* operation;
	ProtonPlusReturnCode prepare_code;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp6_;
	ProtonPlusServicesArchiveOperation* _tmp7_;
	ProtonPlusReturnCode _tmp8_;
	gboolean _tmp9_;
	ProtonPlusServicesArchiveOperation* _tmp10_;
	ProtonPlusServicesArchiveOperation* archive;
	ProtonPlusServicesArchiveOperation* _tmp11_;
	ProtonPlusServicesArchiveOperation* _tmp12_;
	gchar* source;
	ProtonPlusServicesArchiveOperation* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	ProtonPlusServicesArchiveOperation* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GCancellable* _tmp19_;
	GCancellable* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gboolean _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gboolean _tmp26_;
	gboolean _tmp27_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp28_;
	ProtonPlusServicesArchiveOperation* _tmp29_;
	gboolean _tmp30_;
	gboolean _tmp31_;
	gchar* parent;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	const gchar* _tmp36_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp37_;
	ProtonPlusServicesArchiveOperation* _tmp38_;
	ProtonPlusServicesArchiveOperation* _tmp39_;
	const gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	ProtonPlusServicesArchiveOperation* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp46_;
	ProtonPlusServicesArchiveOperation* _tmp47_;
	gchar* staged;
	ProtonPlusServicesArchiveOperation* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	gchar* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp54_;
	ProtonPlusServicesArchiveOperation* _tmp55_;
	gchar* staged_binary;
	const gchar* _tmp56_;
	gchar* _tmp57_;
	gchar* staged_meta;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	gchar* metadata;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp60_;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	gboolean _tmp67_;
	gboolean _tmp68_;
	gboolean _tmp69_;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	const gchar* _tmp73_;
	const gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	const gchar* _tmp77_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp78_;
	ProtonPlusServicesArchiveOperation* _tmp79_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp80_;
	ProtonPlusServicesArchiveOperation* _tmp81_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp82_;
	ProtonPlusServicesArchiveOperation* _tmp83_;
	ProtonPlusUtilsCommandResult* preparation;
	const gchar* _tmp84_;
	ProtonPlusUtilsCommandResult* _tmp85_;
	ProtonPlusUtilsCommandResult* _tmp86_;
	ProtonPlusUtilsCommandResult* _tmp87_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp88_;
	ProtonPlusServicesArchiveOperation* _tmp89_;
	gboolean previous_registration_removed;
	ProtonPlusUtilsCommandResult* unregister_previous;
	ProtonPlusUtilsCommandResult* _tmp90_;
	ProtonPlusUtilsCommandResult* _tmp91_;
	ProtonPlusUtilsCommandResult* _tmp92_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp93_;
	ProtonPlusServicesArchiveOperation* _tmp94_;
	GeeArrayList* external_backups;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp95_;
	ProtonPlusServicesArchiveOperation* _tmp96_;
	GeeArrayList* _tmp97_;
	gboolean _tmp98_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp99_;
	GeeArrayList* _tmp100_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp101_;
	ProtonPlusServicesArchiveOperation* _tmp102_;
	gchar* previous;
	gchar* _tmp103_;
	const gchar* _tmp104_;
	ProtonPlusServicesArchiveOperation* _tmp105_;
	const gchar* _tmp106_;
	const gchar* _tmp107_;
	gchar* _tmp108_;
	gchar* _tmp109_;
	gchar* _tmp110_;
	gchar* _tmp111_;
	gchar* _tmp112_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp113_;
	const gchar* _tmp114_;
	const gchar* _tmp115_;
	const gchar* _tmp116_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp117_;
	const gchar* _tmp118_;
	GeeArrayList* _tmp119_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp120_;
	ProtonPlusServicesArchiveOperation* _tmp121_;
	const gchar* _tmp122_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp123_;
	const gchar* _tmp124_;
	const gchar* _tmp125_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp126_;
	const gchar* _tmp127_;
	GeeArrayList* _tmp128_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp129_;
	ProtonPlusServicesArchiveOperation* _tmp130_;
	gboolean link_created;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp131_;
	const gchar* _tmp132_;
	const gchar* _tmp133_;
	gboolean link_parent_created;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp134_;
	const gchar* _tmp135_;
	const gchar* _tmp136_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp137_;
	const gchar* _tmp138_;
	const gchar* _tmp139_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp140_;
	const gchar* _tmp141_;
	const gchar* _tmp142_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp143_;
	const gchar* _tmp144_;
	GeeArrayList* _tmp145_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp146_;
	ProtonPlusServicesArchiveOperation* _tmp147_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp148_;
	const gchar* _tmp149_;
	const gchar* _tmp150_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp151_;
	const gchar* _tmp152_;
	GeeArrayList* _tmp153_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp154_;
	ProtonPlusServicesArchiveOperation* _tmp155_;
	ProtonPlusUtilsCommandResult* unregister_replacement;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp156_;
	const gchar* _tmp157_;
	const gchar* _tmp158_;
	ProtonPlusUtilsCommandResult* _tmp159_;
	ProtonPlusUtilsCommandResult* _tmp160_;
	ProtonPlusUtilsCommandResult* _tmp161_;
	gboolean _tmp162_;
	gboolean _tmp163_;
	GeeArrayList* _tmp164_;
	gint _tmp165_;
	gint _tmp166_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp167_;
	const gchar* _tmp168_;
	GeeArrayList* _tmp169_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp170_;
	ProtonPlusServicesArchiveOperation* _tmp171_;
	ProtonPlusUtilsCommandResult* initialization;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp172_;
	const gchar* _tmp173_;
	const gchar* _tmp174_;
	ProtonPlusUtilsCommandResult* _tmp175_;
	ProtonPlusUtilsCommandResult* _tmp176_;
	ProtonPlusUtilsCommandResult* _tmp177_;
	gboolean _tmp178_;
	gboolean _tmp179_;
	GeeArrayList* _tmp180_;
	gint _tmp181_;
	gint _tmp182_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp183_;
	const gchar* _tmp184_;
	GeeArrayList* _tmp185_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp186_;
	ProtonPlusServicesArchiveOperation* _tmp187_;
	ProtonPlusUtilsCommandResult* register_replacement;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp188_;
	const gchar* _tmp189_;
	const gchar* _tmp190_;
	ProtonPlusUtilsCommandResult* _tmp191_;
	ProtonPlusUtilsCommandResult* _tmp192_;
	ProtonPlusUtilsCommandResult* _tmp193_;
	ProtonPlusUtilsCommandResult* remove_partial_registration;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp194_;
	const gchar* _tmp195_;
	const gchar* _tmp196_;
	ProtonPlusUtilsCommandResult* _tmp197_;
	ProtonPlusUtilsCommandResult* _tmp198_;
	ProtonPlusUtilsCommandResult* _tmp199_;
	gboolean _tmp200_;
	gboolean _tmp201_;
	GeeArrayList* _tmp202_;
	gint _tmp203_;
	gint _tmp204_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp205_;
	const gchar* _tmp206_;
	GeeArrayList* _tmp207_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp208_;
	ProtonPlusServicesArchiveOperation* _tmp209_;
	gboolean _tmp210_;
	const gchar* _tmp211_;
	const gchar* _tmp212_;
	const gchar* _tmp213_;
	GeeArrayList* _backup_list;
	GeeArrayList* _tmp214_;
	gint _backup_size;
	GeeArrayList* _tmp215_;
	gint _tmp216_;
	gint _tmp217_;
	gint _backup_index;
	gint _tmp218_;
	gint _tmp219_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* backup;
	GeeArrayList* _tmp220_;
	gpointer _tmp221_;
	gboolean _tmp222_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp223_;
	const gchar* _tmp224_;
	const gchar* _tmp225_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp226_;
	const gchar* _tmp227_;
	const gchar* _tmp228_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp229_;
	const gchar* _tmp230_;
	const gchar* _tmp231_;
	ProtonPlusServicesArchiveWorkflowSupport* _tmp232_;
	ProtonPlusServicesArchiveOperation* _tmp233_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesInstallJob* job;
	ProtonPlusServicesInstallationOperationCoordinator* coordinator;
	ProtonPlusReturnCode result;
	ProtonPlusReturnCode code;
	ProtonPlusServicesInstallationLifecycleRecorder* lifecycle;
	ProtonPlusServicesInstallationLifecycleRecorder* _tmp0_;
	ProtonPlusServicesInstallationLifecycleRecorder* _tmp1_;
	ProtonPlusServicesInstallationLifecycleRecorder* _tmp2_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesInstallJob* job;
	ProtonPlusReturnCode result;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ProtonPlusUtilsCommandResult* unregister;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	ProtonPlusUtilsCommandResult* _tmp8_;
	ProtonPlusUtilsCommandResult* _tmp9_;
	ProtonPlusUtilsCommandResult* _tmp10_;
	ProtonPlusUtilsCommandResult* restore_registration;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	ProtonPlusUtilsCommandResult* _tmp14_;
	ProtonPlusUtilsCommandResult* _tmp15_;
	ProtonPlusUtilsCommandResult* _tmp16_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gboolean _tmp20_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp28_;
	gboolean _tmp29_;
	gboolean _tmp30_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	gchar* remove_location;
	gchar* _tmp37_;
	const gchar* _tmp38_;
	gboolean _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	gboolean _tmp42_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp43_;
	gboolean _tmp44_;
	gboolean _tmp45_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp46_;
	const gchar* _tmp47_;
	const gchar* _tmp48_;
	gboolean _tmp49_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp50_;
	const gchar* _tmp51_;
	const gchar* _tmp52_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesInstallJob* job;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp2_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp3_;
	ProtonPlusUtilsWebResponse* response;
	ProtonPlusUtilsWebResponse* _tmp4_;
	ProtonPlusUtilsWebResponse* _tmp5_;
	ProtonPlusReturnCode _tmp6_;
	ProtonPlusReturnCode _tmp7_;
	JsonNode* node;
	ProtonPlusUtilsWebResponse* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	JsonNode* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	JsonNode* _tmp14_;
	JsonNode* _tmp15_;
	JsonNode* _tmp16_;
	JsonArray* _tmp17_;
	JsonNode* commit;
	JsonNode* _tmp18_;
	JsonArray* _tmp19_;
	JsonNode* _tmp20_;
	JsonNode* _tmp21_;
	JsonNode* _tmp22_;
	JsonObject* commit_obj;
	JsonNode* _tmp23_;
	JsonObject* _tmp24_;
	JsonObject* _tmp25_;
	JsonNode* metadata_node;
	JsonObject* _tmp26_;
	JsonNode* _tmp27_;
	JsonNode* _tmp28_;
	gboolean _tmp29_;
	JsonNode* _tmp30_;
	JsonNode* _tmp31_;
	JsonNode* committer_node;
	JsonNode* _tmp32_;
	JsonObject* _tmp33_;
	JsonNode* _tmp34_;
	JsonNode* _tmp35_;
	gboolean _tmp36_;
	JsonNode* _tmp37_;
	JsonNode* _tmp38_;
	gchar** date;
	JsonNode* _tmp39_;
	JsonObject* _tmp40_;
	const gchar* _tmp41_;
	gchar** _tmp42_;
	gchar** _tmp43_;
	gint date_length1;
	gint _date_size_;
	gchar** _tmp44_;
	gint _tmp44__length1;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp45_;
	gchar** _tmp46_;
	gint _tmp46__length1;
	const gchar* _tmp47_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp48_;
	JsonObject* _tmp49_;
	const gchar* _tmp50_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	gchar* url;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp54_;
	const gchar* _tmp55_;
	const gchar* _tmp56_;
	gchar* _tmp57_;
	ProtonPlusModelsRelease* _tmp58_;
	ProtonPlusModelsRelease* _tmp59_;
	const gchar* _tmp60_;
	const gchar* _tmp61_;
	ProtonPlusModelsRelease* _tmp62_;
	ProtonPlusModelsRelease* _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp66_;
	const gchar* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	ProtonPlusModelsAssetsAsset* _tmp70_;
	ProtonPlusModelsAssetsAsset* _tmp71_;
	ProtonPlusModelsRelease* _tmp72_;
	ProtonPlusModelsRelease* _tmp73_;
	const gchar* _tmp74_;
	const gchar* _tmp75_;
	gint64 _tmp76_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp80_;
	const gchar* _tmp81_;
	const gchar* _tmp82_;
	ProtonPlusModelsRelease* _tmp83_;
	ProtonPlusModelsRelease* _tmp84_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	gchar* command;
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusUtilsCommandResult* _tmp0_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	gboolean result;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	gchar* executable;
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusUtilsCommandResult* _tmp0_;
	ProtonPlusUtilsCommandResult* _tmp1_;
	ProtonPlusUtilsCommandResult* _result_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ProtonPlusUtilsCommandResult* _tmp6_;
	ProtonPlusUtilsCommandResult* _tmp7_;
	gboolean _tmp8_;
	ProtonPlusUtilsCommandResult* _tmp9_;
	ProtonPlusUtilsCommandResult* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	ProtonPlusUtilsCommandResult* _tmp13_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	ProtonPlusServicesArchiveOperation* archive;
	GeeArrayList* backups;
	gboolean result;
	GeeArrayList* _tmp0_;
	GeeHashSet* seen;
	GeeHashSet* _tmp1_;
	gchar* transaction_id;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GList* _tmp5_;
	GList* location_collection;
	GList* location_it;
	gchar* _tmp6_;
	gchar* location;
	gchar* canonical;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GeeHashSet* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* backup_path;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* backup;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	GeeArrayList* _tmp35_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp36_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	gchar* previous;
	GeeArrayList* external_backups;
	gboolean link_created;
	gboolean installation_promoted;
	gboolean restore_compatibility_registration;
	gboolean result;
	gboolean restored;
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gint index;
	gint _tmp8_;
	gint _tmp9_;
	gboolean _tmp10_;
	gint _tmp11_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* backup;
	gpointer _tmp12_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gboolean _tmp19_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	gboolean compensate_failed_removal;
	gboolean result;
	ProtonPlusUtilsCommandResult* _result_;
	ProtonPlusUtilsCommandResult* _tmp0_;
	ProtonPlusUtilsCommandResult* _tmp1_;
	const gchar* _tmp2_;
	ProtonPlusUtilsCommandResult* _tmp3_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	gboolean result;
	ProtonPlusUtilsCommandResult* _result_;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	ProtonPlusUtilsCommandResult* _tmp4_;
	ProtonPlusUtilsCommandResult* _tmp5_;
	ProtonPlusUtilsCommandResult* _tmp6_;
	ProtonPlusUtilsCommandResult* _tmp7_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	gchar* original;
	gchar* backup;
	gboolean result;
	gchar* failed;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	ProtonPlusServicesSteamTinkerLaunchContext* context;
	gchar* previous;
	gboolean installation_promoted;
	gboolean result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* failed;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
};

struct _ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* self;
	gchar* executable;
	gchar* args;
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusUtilsCommandResult* preparation;
	ProtonPlusUtilsCommandResult* _tmp0_;
	ProtonPlusUtilsCommandResult* _tmp1_;
	gchar* quoted;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	ProtonPlusUtilsCommandResult* _tmp8_;
};

static gint ProtonPlusServicesSteamTinkerLaunchDirectoryBackup_private_offset;
static gpointer proton_plus_services_steam_tinker_launch_directory_backup_parent_class = NULL;
static gint ProtonPlusServicesSteamTinkerLaunchWorkflow_private_offset;
static gpointer proton_plus_services_steam_tinker_launch_workflow_parent_class = NULL;

VALA_EXTERN GType proton_plus_services_steam_tinker_launch_directory_backup_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* proton_plus_services_steam_tinker_launch_directory_backup_new (const gchar* original_path,
                                                                                                                   const gchar* backup_path);
VALA_EXTERN ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* proton_plus_services_steam_tinker_launch_directory_backup_construct (GType object_type,
                                                                                                                         const gchar* original_path,
                                                                                                                         const gchar* backup_path);
static void proton_plus_services_steam_tinker_launch_directory_backup_set_original_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self,
                                                                                  const gchar* value);
static void proton_plus_services_steam_tinker_launch_directory_backup_set_backup_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self,
                                                                                const gchar* value);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_directory_backup_get_original_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self);
static void proton_plus_services_steam_tinker_launch_directory_backup_finalize (GObject * obj);
static GType proton_plus_services_steam_tinker_launch_directory_backup_get_type_once (void);
static void _vala_proton_plus_services_steam_tinker_launch_directory_backup_get_property (GObject * object,
                                                                                   guint property_id,
                                                                                   GValue * value,
                                                                                   GParamSpec * pspec);
static void _vala_proton_plus_services_steam_tinker_launch_directory_backup_set_property (GObject * object,
                                                                                   guint property_id,
                                                                                   const GValue * value,
                                                                                   GParamSpec * pspec);
VALA_EXTERN GType proton_plus_services_archive_workflow_support_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusServicesArchiveWorkflowSupport* proton_plus_services_archive_workflow_support_new (void);
VALA_EXTERN ProtonPlusServicesArchiveWorkflowSupport* proton_plus_services_archive_workflow_support_construct (GType object_type);
static ProtonPlusReturnCode proton_plus_services_steam_tinker_launch_workflow_real_validate_install (ProtonPlusServicesInstallationWorkflow* base,
                                                                                              ProtonPlusServicesInstallJob* job,
                                                                                              gboolean replace_existing);
static ProtonPlusServicesSteamTinkerLaunchContext* proton_plus_services_steam_tinker_launch_workflow_get_context (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                           ProtonPlusServicesInstallJob* job);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_base_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_steam_tinker_launch_workflow_real_install_data_free (gpointer _data);
static void proton_plus_services_steam_tinker_launch_workflow_real_install (ProtonPlusServicesInstallationWorkflow* base,
                                                                     ProtonPlusServicesInstallJob* job,
                                                                     gboolean replace_existing,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_real_install_co (ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData* _data_);
VALA_EXTERN GType proton_plus_services_archive_operation_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void proton_plus_services_archive_workflow_support_prepare_archive (ProtonPlusServicesArchiveWorkflowSupport* self,
                                                                    ProtonPlusServicesInstallJob* job,
                                                                    const gchar* operation_prefix,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
VALA_EXTERN ProtonPlusReturnCode proton_plus_services_archive_workflow_support_prepare_archive_finish (ProtonPlusServicesArchiveWorkflowSupport* self,
                                                                                           GAsyncResult* _res_,
                                                                                           ProtonPlusServicesArchiveOperation** operation);
static void proton_plus_services_steam_tinker_launch_workflow_install_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_);
VALA_EXTERN void proton_plus_services_install_job_set_step (ProtonPlusServicesInstallJob* self,
                                                ProtonPlusServicesInstallJobStep value);
VALA_EXTERN const gchar* proton_plus_services_archive_operation_get_operation_path (ProtonPlusServicesArchiveOperation* self);
VALA_EXTERN const gchar* proton_plus_services_archive_operation_get_extension (ProtonPlusServicesArchiveOperation* self);
VALA_EXTERN GCancellable* proton_plus_services_install_job_get_cancellable (ProtonPlusServicesInstallJob* self);
VALA_EXTERN void proton_plus_services_install_job_set_error_message (ProtonPlusServicesInstallJob* self,
                                                         const gchar* value);
VALA_EXTERN void proton_plus_services_archive_workflow_support_complete_attempt (ProtonPlusServicesArchiveWorkflowSupport* self,
                                                                     ProtonPlusReturnCode code,
                                                                     ProtonPlusServicesArchiveOperation* operation,
                                                                     gboolean discard_cached_archive,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
VALA_EXTERN ProtonPlusReturnCode proton_plus_services_archive_workflow_support_complete_attempt_finish (ProtonPlusServicesArchiveWorkflowSupport* self,
                                                                                            GAsyncResult* _res_);
VALA_EXTERN void proton_plus_services_archive_operation_set_staging_root (ProtonPlusServicesArchiveOperation* self,
                                                              const gchar* value);
VALA_EXTERN const gchar* proton_plus_services_archive_operation_get_staging_root (ProtonPlusServicesArchiveOperation* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_latest_date (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_latest_hash (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN void proton_plus_services_archive_workflow_support_publish_archive (ProtonPlusServicesArchiveWorkflowSupport* self,
                                                                    ProtonPlusServicesArchiveOperation* operation,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_services_archive_workflow_support_publish_archive_finish (ProtonPlusServicesArchiveWorkflowSupport* self,
                                                                               GAsyncResult* _res_);
static void proton_plus_services_steam_tinker_launch_workflow_prepare_executable (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                           const gchar* executable,
                                                                           GAsyncReadyCallback _callback_,
                                                                           gpointer _user_data_);
static ProtonPlusUtilsCommandResult* proton_plus_services_steam_tinker_launch_workflow_prepare_executable_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                           GAsyncResult* _res_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_command_succeeded (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                              ProtonPlusUtilsCommandResult* _result_);
static void proton_plus_services_steam_tinker_launch_workflow_report_command_failure (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                               const gchar* operation,
                                                                               ProtonPlusUtilsCommandResult* _result_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                      gboolean compensate_failed_removal,
                                                                                      GAsyncReadyCallback _callback_,
                                                                                      gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                 GAsyncResult* _res_);
static void proton_plus_services_steam_tinker_launch_workflow_backup_external_installations (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                      ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                                      ProtonPlusServicesArchiveOperation* archive,
                                                                                      GAsyncReadyCallback _callback_,
                                                                                      gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                 GAsyncResult* _res_,
                                                                                                 GeeArrayList** backups);
static void proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                             ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                             const gchar* previous,
                                                                             GeeArrayList* external_backups,
                                                                             gboolean link_created,
                                                                             gboolean installation_promoted,
                                                                             gboolean restore_compatibility_registration,
                                                                             GAsyncReadyCallback _callback_,
                                                                             gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                        GAsyncResult* _res_);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_link_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_link_parent_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_binary_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                    const gchar* executable,
                                                                                    const gchar* args,
                                                                                    GAsyncReadyCallback _callback_,
                                                                                    gpointer _user_data_);
static ProtonPlusUtilsCommandResult* proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                                    GAsyncResult* _res_);
static void proton_plus_services_steam_tinker_launch_workflow_real_update_data_free (gpointer _data);
static void proton_plus_services_steam_tinker_launch_workflow_real_update (ProtonPlusServicesInstallationWorkflow* base,
                                                                    ProtonPlusServicesInstallJob* job,
                                                                    ProtonPlusServicesInstallationOperationCoordinator* coordinator,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_real_update_co (ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData* _data_);
VALA_EXTERN void proton_plus_services_install_job_set_state (ProtonPlusServicesInstallJob* self,
                                                 ProtonPlusServicesInstallJobState value);
static void proton_plus_services_steam_tinker_launch_workflow_update_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_);
VALA_EXTERN void proton_plus_services_install_job_finish_operation (ProtonPlusServicesInstallJob* self);
static void proton_plus_services_steam_tinker_launch_workflow_real_remove_data_free (gpointer _data);
static void proton_plus_services_steam_tinker_launch_workflow_real_remove (ProtonPlusServicesInstallationWorkflow* base,
                                                                    ProtonPlusServicesInstallJob* job,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_real_remove_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_remove_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_manual_remove_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_config_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_steam_tinker_launch_workflow_real_refresh_state (ProtonPlusServicesInstallationWorkflow* base,
                                                                           ProtonPlusServicesInstallJob* job);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_meta_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN void proton_plus_services_steam_tinker_launch_context_set_local_date (ProtonPlusServicesSteamTinkerLaunchContext* self,
                                                                      const gchar* value);
VALA_EXTERN void proton_plus_services_steam_tinker_launch_context_set_local_hash (ProtonPlusServicesSteamTinkerLaunchContext* self,
                                                                      const gchar* value);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_local_date (ProtonPlusServicesSteamTinkerLaunchContext* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_local_hash (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_steam_tinker_launch_workflow_real_finalize_install_success (ProtonPlusServicesInstallationWorkflow* base,
                                                                                      ProtonPlusServicesInstallJob* job);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_compat_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_steam_tinker_launch_workflow_real_finalize_removal_success (ProtonPlusServicesInstallationWorkflow* base,
                                                                                      ProtonPlusServicesInstallJob* job);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
VALA_EXTERN const gchar* proton_plus_services_steam_tinker_launch_context_get_home_location (ProtonPlusServicesSteamTinkerLaunchContext* self);
static void proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData* _data_);
VALA_EXTERN void proton_plus_services_steam_tinker_launch_context_set_latest_date (ProtonPlusServicesSteamTinkerLaunchContext* self,
                                                                       const gchar* value);
VALA_EXTERN void proton_plus_services_steam_tinker_launch_context_set_latest_hash (ProtonPlusServicesSteamTinkerLaunchContext* self,
                                                                       const gchar* value);
static void proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_ready (GObject* source_object,
                                                                                     GAsyncResult* _res_,
                                                                                     gpointer _user_data_);
static void _vala_JsonNode_free (JsonNode* self);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
static void proton_plus_services_steam_tinker_launch_workflow_real_run_command_data_free (gpointer _data);
static void proton_plus_services_steam_tinker_launch_workflow_real_run_command (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                         const gchar* command,
                                                                         GAsyncReadyCallback _callback_,
                                                                         gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_real_run_command_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_run_command_ready (GObject* source_object,
                                                                          GAsyncResult* _res_,
                                                                          gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_data_free (gpointer _data);
static void proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                           GAsyncReadyCallback _callback_,
                                                                                           gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_co (ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_system_installation_available_ready (GObject* source_object,
                                                                                            GAsyncResult* _res_,
                                                                                            gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_prepare_executable_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_prepare_executable_co (ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_prepare_executable_ready (GObject* source_object,
                                                                                 GAsyncResult* _res_,
                                                                                 gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_co (ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_ready (GObject* source_object,
                                                                                            GAsyncResult* _res_,
                                                                                            gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_rollback_installation (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                              ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                              const gchar* previous,
                                                                              gboolean installation_promoted,
                                                                              GAsyncReadyCallback _callback_,
                                                                              gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_rollback_installation_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                         GAsyncResult* _res_);
static void proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_ready (GObject* source_object,
                                                                                   GAsyncResult* _res_,
                                                                                   gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                 const gchar* original,
                                                                                 const gchar* backup,
                                                                                 GAsyncReadyCallback _callback_,
                                                                                 gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                            GAsyncResult* _res_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                   ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                                                   GAsyncReadyCallback _callback_,
                                                                                                   gpointer _user_data_);
static gboolean proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                              GAsyncResult* _res_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_ready (GObject* source_object,
                                                                                            GAsyncResult* _res_,
                                                                                            gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_ready (GObject* source_object,
                                                                                                         GAsyncResult* _res_,
                                                                                                         gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready (GObject* source_object,
                                                                                       GAsyncResult* _res_,
                                                                                       gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_rollback_installation_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_rollback_installation_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready (GObject* source_object,
                                                                                    GAsyncResult* _res_,
                                                                                    gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_data_free (gpointer _data);
static gboolean proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_co (ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData* _data_);
static void proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_ready (GObject* source_object,
                                                                                          GAsyncResult* _res_,
                                                                                          gpointer _user_data_);
static void proton_plus_services_steam_tinker_launch_workflow_finalize (GObject * obj);
static GType proton_plus_services_steam_tinker_launch_workflow_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_services_steam_tinker_launch_directory_backup_get_instance_private (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesSteamTinkerLaunchDirectoryBackup_private_offset);
}

ProtonPlusServicesSteamTinkerLaunchDirectoryBackup*
proton_plus_services_steam_tinker_launch_directory_backup_construct (GType object_type,
                                                                     const gchar* original_path,
                                                                     const gchar* backup_path)
{
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup * self = NULL;
	g_return_val_if_fail (original_path != NULL, NULL);
	g_return_val_if_fail (backup_path != NULL, NULL);
	self = (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup*) g_object_new (object_type, NULL);
	proton_plus_services_steam_tinker_launch_directory_backup_set_original_path (self, original_path);
	proton_plus_services_steam_tinker_launch_directory_backup_set_backup_path (self, backup_path);
	return self;
}

ProtonPlusServicesSteamTinkerLaunchDirectoryBackup*
proton_plus_services_steam_tinker_launch_directory_backup_new (const gchar* original_path,
                                                               const gchar* backup_path)
{
	return proton_plus_services_steam_tinker_launch_directory_backup_construct (PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, original_path, backup_path);
}

const gchar*
proton_plus_services_steam_tinker_launch_directory_backup_get_original_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_original_path;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_directory_backup_set_original_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self,
                                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_steam_tinker_launch_directory_backup_get_original_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_original_path);
		self->priv->_original_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_steam_tinker_launch_directory_backup_properties[PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_ORIGINAL_PATH_PROPERTY]);
	}
}

const gchar*
proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_backup_path;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_directory_backup_set_backup_path (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup* self,
                                                                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_backup_path);
		self->priv->_backup_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_steam_tinker_launch_directory_backup_properties[PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_BACKUP_PATH_PROPERTY]);
	}
}

static void
proton_plus_services_steam_tinker_launch_directory_backup_class_init (ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass * klass,
                                                                      gpointer klass_data)
{
	proton_plus_services_steam_tinker_launch_directory_backup_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesSteamTinkerLaunchDirectoryBackup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_services_steam_tinker_launch_directory_backup_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_services_steam_tinker_launch_directory_backup_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_steam_tinker_launch_directory_backup_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_ORIGINAL_PATH_PROPERTY, proton_plus_services_steam_tinker_launch_directory_backup_properties[PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_ORIGINAL_PATH_PROPERTY] = g_param_spec_string ("original-path", "original-path", "original-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_BACKUP_PATH_PROPERTY, proton_plus_services_steam_tinker_launch_directory_backup_properties[PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_BACKUP_PATH_PROPERTY] = g_param_spec_string ("backup-path", "backup-path", "backup-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_services_steam_tinker_launch_directory_backup_instance_init (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup * self,
                                                                         gpointer klass)
{
	self->priv = proton_plus_services_steam_tinker_launch_directory_backup_get_instance_private (self);
}

static void
proton_plus_services_steam_tinker_launch_directory_backup_finalize (GObject * obj)
{
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, ProtonPlusServicesSteamTinkerLaunchDirectoryBackup);
	_g_free0 (self->priv->_original_path);
	_g_free0 (self->priv->_backup_path);
	G_OBJECT_CLASS (proton_plus_services_steam_tinker_launch_directory_backup_parent_class)->finalize (obj);
}

static GType
proton_plus_services_steam_tinker_launch_directory_backup_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesSteamTinkerLaunchDirectoryBackupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_steam_tinker_launch_directory_backup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup), 0, (GInstanceInitFunc) proton_plus_services_steam_tinker_launch_directory_backup_instance_init, NULL };
	GType proton_plus_services_steam_tinker_launch_directory_backup_type_id;
	proton_plus_services_steam_tinker_launch_directory_backup_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesSteamTinkerLaunchDirectoryBackup", &g_define_type_info, 0);
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup_private_offset = g_type_add_instance_private (proton_plus_services_steam_tinker_launch_directory_backup_type_id, sizeof (ProtonPlusServicesSteamTinkerLaunchDirectoryBackupPrivate));
	return proton_plus_services_steam_tinker_launch_directory_backup_type_id;
}

GType
proton_plus_services_steam_tinker_launch_directory_backup_get_type (void)
{
	static volatile gsize proton_plus_services_steam_tinker_launch_directory_backup_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_steam_tinker_launch_directory_backup_type_id__once)) {
		GType proton_plus_services_steam_tinker_launch_directory_backup_type_id;
		proton_plus_services_steam_tinker_launch_directory_backup_type_id = proton_plus_services_steam_tinker_launch_directory_backup_get_type_once ();
		g_once_init_leave (&proton_plus_services_steam_tinker_launch_directory_backup_type_id__once, proton_plus_services_steam_tinker_launch_directory_backup_type_id);
	}
	return proton_plus_services_steam_tinker_launch_directory_backup_type_id__once;
}

static void
_vala_proton_plus_services_steam_tinker_launch_directory_backup_get_property (GObject * object,
                                                                              guint property_id,
                                                                              GValue * value,
                                                                              GParamSpec * pspec)
{
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, ProtonPlusServicesSteamTinkerLaunchDirectoryBackup);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_ORIGINAL_PATH_PROPERTY:
		g_value_set_string (value, proton_plus_services_steam_tinker_launch_directory_backup_get_original_path (self));
		break;
		case PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_BACKUP_PATH_PROPERTY:
		g_value_set_string (value, proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_services_steam_tinker_launch_directory_backup_set_property (GObject * object,
                                                                              guint property_id,
                                                                              const GValue * value,
                                                                              GParamSpec * pspec)
{
	ProtonPlusServicesSteamTinkerLaunchDirectoryBackup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, ProtonPlusServicesSteamTinkerLaunchDirectoryBackup);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_ORIGINAL_PATH_PROPERTY:
		proton_plus_services_steam_tinker_launch_directory_backup_set_original_path (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP_BACKUP_PATH_PROPERTY:
		proton_plus_services_steam_tinker_launch_directory_backup_set_backup_path (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_services_steam_tinker_launch_workflow_get_instance_private (ProtonPlusServicesSteamTinkerLaunchWorkflow* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesSteamTinkerLaunchWorkflow_private_offset);
}

static ProtonPlusReturnCode
proton_plus_services_steam_tinker_launch_workflow_real_validate_install (ProtonPlusServicesInstallationWorkflow* base,
                                                                         ProtonPlusServicesInstallJob* job,
                                                                         gboolean replace_existing)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchContext* context = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gboolean _tmp2_ = FALSE;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	ProtonPlusReturnCode result;
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	g_return_val_if_fail (job != NULL, 0);
	_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (self, job);
	context = _tmp0_;
	_tmp1_ = context;
	if (_tmp1_ == NULL) {
		result = PROTON_PLUS_RETURN_CODE_INVALID_CONFIGURATION;
		_g_object_unref0 (context);
		return result;
	}
	_tmp3_ = context;
	_tmp4_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_file_test (_tmp5_, G_FILE_TEST_EXISTS)) {
		_tmp2_ = !replace_existing;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		result = PROTON_PLUS_RETURN_CODE_RUNNER_ALREADY_INSTALLED;
		_g_object_unref0 (context);
		return result;
	}
	result = PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED;
	_g_object_unref0 (context);
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_install_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->job);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData, _data_);
}

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

static void
proton_plus_services_steam_tinker_launch_workflow_real_install (ProtonPlusServicesInstallationWorkflow* base,
                                                                ProtonPlusServicesInstallJob* job,
                                                                gboolean replace_existing,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	g_return_if_fail (job != NULL);
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_real_install_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (job);
	_g_object_unref0 (_data_->job);
	_data_->job = _tmp1_;
	_data_->replace_existing = replace_existing;
	proton_plus_services_steam_tinker_launch_workflow_real_install_co (_data_);
}

static ProtonPlusReturnCode
proton_plus_services_steam_tinker_launch_workflow_install_finish (ProtonPlusServicesInstallationWorkflow* base,
                                                                  GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_install_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_real_install_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_real_install_co (ProtonPlusServicesSteamTinkerLaunchWorkflowInstallData* _data_)
{
	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;
		case 6:
		goto _state_6;
		case 7:
		goto _state_7;
		case 8:
		goto _state_8;
		case 9:
		goto _state_9;
		case 10:
		goto _state_10;
		case 11:
		goto _state_11;
		case 12:
		goto _state_12;
		case 13:
		goto _state_13;
		case 14:
		goto _state_14;
		case 15:
		goto _state_15;
		case 16:
		goto _state_16;
		case 17:
		goto _state_17;
		case 18:
		goto _state_18;
		case 19:
		goto _state_19;
		case 20:
		goto _state_20;
		case 21:
		goto _state_21;
		case 22:
		goto _state_22;
		case 23:
		goto _state_23;
		case 24:
		goto _state_24;
		case 25:
		goto _state_25;
		case 26:
		goto _state_26;
		case 27:
		goto _state_27;
		case 28:
		goto _state_28;
		case 29:
		goto _state_29;
		case 30:
		goto _state_30;
		case 31:
		goto _state_31;
		case 32:
		goto _state_32;
		case 33:
		goto _state_33;
		case 34:
		goto _state_34;
		case 35:
		goto _state_35;
		case 36:
		goto _state_36;
		case 37:
		goto _state_37;
		case 38:
		goto _state_38;
		case 39:
		goto _state_39;
		case 40:
		goto _state_40;
		case 41:
		goto _state_41;
		case 42:
		goto _state_42;
		case 43:
		goto _state_43;
		case 44:
		goto _state_44;
		case 45:
		goto _state_45;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (_data_->self, _data_->job);
	_data_->context = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->context;
	if (_data_->_tmp1_ == NULL) {
		_data_->result = PROTON_PLUS_RETURN_CODE_INVALID_CONFIGURATION;
		_g_object_unref0 (_data_->context);
		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_->_tmp2_ = _data_->context;
	_data_->_tmp3_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->exists = g_file_test (_data_->_tmp4_, G_FILE_TEST_EXISTS);
	if (_data_->exists) {
		_data_->_tmp5_ = !_data_->replace_existing;
	} else {
		_data_->_tmp5_ = FALSE;
	}
	if (_data_->_tmp5_) {
		_data_->result = PROTON_PLUS_RETURN_CODE_RUNNER_ALREADY_INSTALLED;
		_g_object_unref0 (_data_->context);
		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_->_tmp6_ = _data_->self->priv->archive_support;
	_data_->_tmp7_ = NULL;
	_data_->_state_ = 1;
	proton_plus_services_archive_workflow_support_prepare_archive (_data_->_tmp6_, _data_->job, ".protonplus-stl-", proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp8_ = proton_plus_services_archive_workflow_support_prepare_archive_finish (_data_->_tmp6_, _data_->_res_, &_data_->_tmp7_);
	_g_object_unref0 (_data_->operation);
	_data_->operation = _data_->_tmp7_;
	_data_->prepare_code = _data_->_tmp8_;
	if (_data_->prepare_code != PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED) {
		_data_->_tmp9_ = TRUE;
	} else {
		_data_->_tmp10_ = _data_->operation;
		_data_->_tmp9_ = _data_->_tmp10_ == NULL;
	}
	if (_data_->_tmp9_) {
		_data_->result = _data_->prepare_code;
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp11_ = _data_->operation;
	_data_->_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, PROTON_PLUS_SERVICES_TYPE_ARCHIVE_OPERATION, ProtonPlusServicesArchiveOperation));
	_data_->archive = _data_->_tmp12_;
	proton_plus_services_install_job_set_step (_data_->job, PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_EXTRACTING);
	_data_->_tmp13_ = _data_->archive;
	_data_->_tmp14_ = proton_plus_services_archive_operation_get_operation_path (_data_->_tmp13_);
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_tmp16_ = _data_->archive;
	_data_->_tmp17_ = proton_plus_services_archive_operation_get_extension (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = proton_plus_services_install_job_get_cancellable (_data_->job);
	_data_->_tmp20_ = _data_->_tmp19_;
	_data_->_state_ = 2;
	proton_plus_utils_filesystem_extract (_data_->_tmp15_, "archive", _data_->_tmp18_, _data_->_tmp20_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp21_ = proton_plus_utils_filesystem_extract_finish (_data_->_res_);
	_data_->_tmp22_ = _data_->_tmp21_;
	_g_object_unref0 (_data_->_tmp20_);
	_data_->source = _data_->_tmp22_;
	_data_->_tmp24_ = _data_->source;
	if (_data_->_tmp24_ == NULL) {
		_data_->_tmp23_ = TRUE;
	} else {
		_data_->_tmp25_ = _data_->source;
		_data_->_tmp23_ = g_strcmp0 (_data_->_tmp25_, "") == 0;
	}
	if (_data_->_tmp23_) {
		_data_->_tmp26_ = proton_plus_services_install_job_get_canceled (_data_->job);
		_data_->_tmp27_ = _data_->_tmp26_;
		if (!_data_->_tmp27_) {
			proton_plus_services_install_job_set_error_message (_data_->job, _ ("Extraction failed"));
		}
		_data_->_tmp28_ = _data_->self->priv->archive_support;
		_data_->_tmp29_ = _data_->archive;
		_data_->_tmp30_ = proton_plus_services_install_job_get_canceled (_data_->job);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_state_ = 3;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp28_, PROTON_PLUS_RETURN_CODE_EXTRACTION_FAILED, _data_->_tmp29_, !_data_->_tmp31_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_3:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp28_, _data_->_res_);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp32_ = _data_->context;
	_data_->_tmp33_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->_tmp32_);
	_data_->_tmp34_ = _data_->_tmp33_;
	_data_->_tmp35_ = g_path_get_dirname (_data_->_tmp34_);
	_data_->parent = _data_->_tmp35_;
	_data_->_tmp36_ = _data_->parent;
	_data_->_state_ = 4;
	proton_plus_utils_filesystem_create_directory_async (_data_->_tmp36_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_4:
	if (!proton_plus_utils_filesystem_create_directory_finish (_data_->_res_)) {
		_data_->_tmp37_ = _data_->self->priv->archive_support;
		_data_->_tmp38_ = _data_->archive;
		_data_->_state_ = 5;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp37_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp38_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_5:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp37_, _data_->_res_);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp39_ = _data_->archive;
	_data_->_tmp40_ = _data_->parent;
	_data_->_tmp41_ = proton_plus_utils_filesystem_create_temporary_directory (_data_->_tmp40_, ".protonplus-stl-stage-");
	_data_->_tmp42_ = _data_->_tmp41_;
	proton_plus_services_archive_operation_set_staging_root (_data_->_tmp39_, _data_->_tmp42_);
	_g_free0 (_data_->_tmp42_);
	_data_->_tmp43_ = _data_->archive;
	_data_->_tmp44_ = proton_plus_services_archive_operation_get_staging_root (_data_->_tmp43_);
	_data_->_tmp45_ = _data_->_tmp44_;
	if (g_strcmp0 (_data_->_tmp45_, "") == 0) {
		_data_->_tmp46_ = _data_->self->priv->archive_support;
		_data_->_tmp47_ = _data_->archive;
		_data_->_state_ = 6;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp46_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp47_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_6:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp46_, _data_->_res_);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp48_ = _data_->archive;
	_data_->_tmp49_ = proton_plus_services_archive_operation_get_staging_root (_data_->_tmp48_);
	_data_->_tmp50_ = _data_->_tmp49_;
	_data_->_tmp51_ = g_build_filename (_data_->_tmp50_, "installation", NULL);
	_data_->staged = _data_->_tmp51_;
	_data_->_tmp52_ = _data_->source;
	_data_->_tmp53_ = _data_->staged;
	_data_->_state_ = 7;
	proton_plus_utils_filesystem_copy_directory (_data_->_tmp52_, _data_->_tmp53_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_7:
	if (!proton_plus_utils_filesystem_copy_directory_finish (_data_->_res_)) {
		proton_plus_services_install_job_set_error_message (_data_->job, _ ("Moving failed"));
		_data_->_tmp54_ = _data_->self->priv->archive_support;
		_data_->_tmp55_ = _data_->archive;
		_data_->_state_ = 8;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp54_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp55_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_8:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp54_, _data_->_res_);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp56_ = _data_->staged;
	_data_->_tmp57_ = g_build_filename (_data_->_tmp56_, "steamtinkerlaunch", NULL);
	_data_->staged_binary = _data_->_tmp57_;
	_data_->_tmp58_ = _data_->staged;
	_data_->_tmp59_ = g_build_filename (_data_->_tmp58_, "ProtonPlus.meta", NULL);
	_data_->staged_meta = _data_->_tmp59_;
	_data_->_tmp60_ = _data_->context;
	_data_->_tmp61_ = proton_plus_services_steam_tinker_launch_context_get_latest_date (_data_->_tmp60_);
	_data_->_tmp62_ = _data_->_tmp61_;
	_data_->_tmp63_ = _data_->context;
	_data_->_tmp64_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_data_->_tmp63_);
	_data_->_tmp65_ = _data_->_tmp64_;
	_data_->_tmp66_ = g_strdup_printf ("%s:%s", _data_->_tmp62_, _data_->_tmp65_);
	_data_->metadata = _data_->_tmp66_;
	_data_->_tmp70_ = _data_->staged_binary;
	if (!g_file_test (_data_->_tmp70_, G_FILE_TEST_IS_REGULAR)) {
		_data_->_tmp69_ = TRUE;
	} else {
		_data_->_tmp71_ = _data_->staged_meta;
		_data_->_tmp72_ = _data_->metadata;
		_data_->_tmp69_ = !proton_plus_utils_filesystem_modify_file (_data_->_tmp71_, _data_->_tmp72_);
	}
	if (_data_->_tmp69_) {
		_data_->_tmp68_ = TRUE;
	} else {
		_data_->_tmp73_ = _data_->staged_meta;
		_data_->_tmp68_ = !g_file_test (_data_->_tmp73_, G_FILE_TEST_IS_REGULAR);
	}
	if (_data_->_tmp68_) {
		_data_->_tmp67_ = TRUE;
	} else {
		_data_->_tmp74_ = _data_->staged_meta;
		_data_->_tmp75_ = proton_plus_utils_filesystem_get_file_content (_data_->_tmp74_, FALSE);
		_data_->_tmp76_ = _data_->_tmp75_;
		_data_->_tmp77_ = _data_->metadata;
		_data_->_tmp67_ = g_strcmp0 (_data_->_tmp76_, _data_->_tmp77_) != 0;
		_g_free0 (_data_->_tmp76_);
	}
	if (_data_->_tmp67_) {
		proton_plus_services_install_job_set_error_message (_data_->job, _ ("The SteamTinkerLaunch archive is invalid or incomplete"));
		_data_->_tmp78_ = _data_->self->priv->archive_support;
		_data_->_tmp79_ = _data_->archive;
		_data_->_state_ = 9;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp78_, PROTON_PLUS_RETURN_CODE_INVALID_DATA, _data_->_tmp79_, TRUE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_9:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp78_, _data_->_res_);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp80_ = _data_->self->priv->archive_support;
	_data_->_tmp81_ = _data_->archive;
	_data_->_state_ = 10;
	proton_plus_services_archive_workflow_support_publish_archive (_data_->_tmp80_, _data_->_tmp81_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_10:
	if (!proton_plus_services_archive_workflow_support_publish_archive_finish (_data_->_tmp80_, _data_->_res_)) {
		_data_->_tmp82_ = _data_->self->priv->archive_support;
		_data_->_tmp83_ = _data_->archive;
		_data_->_state_ = 11;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp82_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp83_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_11:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp82_, _data_->_res_);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp84_ = _data_->staged_binary;
	_data_->_state_ = 12;
	proton_plus_services_steam_tinker_launch_workflow_prepare_executable (_data_->self, _data_->_tmp84_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_12:
	_data_->_tmp85_ = proton_plus_services_steam_tinker_launch_workflow_prepare_executable_finish (_data_->self, _data_->_res_);
	_data_->preparation = _data_->_tmp85_;
	_data_->_tmp86_ = _data_->preparation;
	if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp86_)) {
		_data_->_tmp87_ = _data_->preparation;
		proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "prepare executable", _data_->_tmp87_);
		proton_plus_services_install_job_set_error_message (_data_->job, _ ("Failed to prepare the SteamTinkerLaunch executable"));
		_data_->_tmp88_ = _data_->self->priv->archive_support;
		_data_->_tmp89_ = _data_->archive;
		_data_->_state_ = 13;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp88_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp89_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_13:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp88_, _data_->_res_);
		_g_object_unref0 (_data_->preparation);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->previous_registration_removed = FALSE;
	_data_->_state_ = 14;
	proton_plus_services_steam_tinker_launch_workflow_system_installation_available (_data_->self, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_14:
	if (proton_plus_services_steam_tinker_launch_workflow_system_installation_available_finish (_data_->self, _data_->_res_)) {
		_data_->_state_ = 15;
		proton_plus_services_steam_tinker_launch_workflow_run_command (_data_->self, "steamtinkerlaunch compat del", proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_15:
		_data_->_tmp90_ = proton_plus_services_steam_tinker_launch_workflow_run_command_finish (_data_->self, _data_->_res_);
		_data_->unregister_previous = _data_->_tmp90_;
		_data_->_tmp91_ = _data_->unregister_previous;
		if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp91_)) {
			_data_->_tmp92_ = _data_->unregister_previous;
			proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "unregister previous compatibility tool", _data_->_tmp92_);
			proton_plus_services_install_job_set_error_message (_data_->job, _ ("Failed to update SteamTinkerLaunch compatibility registration"));
			_data_->_state_ = 16;
			proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration (_data_->self, TRUE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_16:
			proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_finish (_data_->self, _data_->_res_);
			_data_->_tmp93_ = _data_->self->priv->archive_support;
			_data_->_tmp94_ = _data_->archive;
			_data_->_state_ = 17;
			proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp93_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp94_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_17:
			_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp93_, _data_->_res_);
			_g_object_unref0 (_data_->unregister_previous);
			_g_object_unref0 (_data_->preparation);
			_g_free0 (_data_->metadata);
			_g_free0 (_data_->staged_meta);
			_g_free0 (_data_->staged_binary);
			_g_free0 (_data_->staged);
			_g_free0 (_data_->parent);
			_g_free0 (_data_->source);
			_g_object_unref0 (_data_->archive);
			_g_object_unref0 (_data_->operation);
			_g_object_unref0 (_data_->context);
			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_->previous_registration_removed = TRUE;
		_g_object_unref0 (_data_->unregister_previous);
	}
	_data_->_tmp95_ = _data_->context;
	_data_->_tmp96_ = _data_->archive;
	_data_->_tmp97_ = NULL;
	_data_->_state_ = 18;
	proton_plus_services_steam_tinker_launch_workflow_backup_external_installations (_data_->self, _data_->_tmp95_, _data_->_tmp96_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_18:
	_data_->_tmp98_ = proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_finish (_data_->self, _data_->_res_, &_data_->_tmp97_);
	_g_object_unref0 (_data_->external_backups);
	_data_->external_backups = _data_->_tmp97_;
	if (!_data_->_tmp98_) {
		proton_plus_services_install_job_set_error_message (_data_->job, _ ("Moving failed"));
		_data_->_tmp99_ = _data_->context;
		_data_->_tmp100_ = _data_->external_backups;
		_data_->_state_ = 19;
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp99_, "", _data_->_tmp100_, FALSE, FALSE, _data_->previous_registration_removed, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_19:
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
		_data_->_tmp101_ = _data_->self->priv->archive_support;
		_data_->_tmp102_ = _data_->archive;
		_data_->_state_ = 20;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp101_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp102_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_20:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp101_, _data_->_res_);
		_g_object_unref0 (_data_->external_backups);
		_g_object_unref0 (_data_->preparation);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp103_ = g_strdup ("");
	_data_->previous = _data_->_tmp103_;
	if (_data_->exists) {
		_data_->_tmp104_ = _data_->parent;
		_data_->_tmp105_ = _data_->archive;
		_data_->_tmp106_ = proton_plus_services_archive_operation_get_staging_root (_data_->_tmp105_);
		_data_->_tmp107_ = _data_->_tmp106_;
		_data_->_tmp108_ = g_path_get_basename (_data_->_tmp107_);
		_data_->_tmp109_ = _data_->_tmp108_;
		_data_->_tmp110_ = g_strdup_printf (".protonplus-stl-previous-%s", _data_->_tmp109_);
		_data_->_tmp111_ = _data_->_tmp110_;
		_data_->_tmp112_ = g_build_filename (_data_->_tmp104_, _data_->_tmp111_, NULL);
		_g_free0 (_data_->previous);
		_data_->previous = _data_->_tmp112_;
		_g_free0 (_data_->_tmp111_);
		_g_free0 (_data_->_tmp109_);
		_data_->_tmp113_ = _data_->context;
		_data_->_tmp114_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->_tmp113_);
		_data_->_tmp115_ = _data_->_tmp114_;
		_data_->_tmp116_ = _data_->previous;
		_data_->_state_ = 21;
		proton_plus_utils_filesystem_move_directory_atomic (_data_->_tmp115_, _data_->_tmp116_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_21:
		if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
			_data_->_tmp117_ = _data_->context;
			_data_->_tmp118_ = _data_->previous;
			_data_->_tmp119_ = _data_->external_backups;
			_data_->_state_ = 22;
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp117_, _data_->_tmp118_, _data_->_tmp119_, FALSE, FALSE, _data_->previous_registration_removed, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_22:
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
			_data_->_tmp120_ = _data_->self->priv->archive_support;
			_data_->_tmp121_ = _data_->archive;
			_data_->_state_ = 23;
			proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp120_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp121_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_23:
			_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp120_, _data_->_res_);
			_g_free0 (_data_->previous);
			_g_object_unref0 (_data_->external_backups);
			_g_object_unref0 (_data_->preparation);
			_g_free0 (_data_->metadata);
			_g_free0 (_data_->staged_meta);
			_g_free0 (_data_->staged_binary);
			_g_free0 (_data_->staged);
			_g_free0 (_data_->parent);
			_g_free0 (_data_->source);
			_g_object_unref0 (_data_->archive);
			_g_object_unref0 (_data_->operation);
			_g_object_unref0 (_data_->context);
			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;
		}
	}
	proton_plus_services_install_job_set_step (_data_->job, PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_MOVING);
	_data_->_tmp122_ = _data_->staged;
	_data_->_tmp123_ = _data_->context;
	_data_->_tmp124_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->_tmp123_);
	_data_->_tmp125_ = _data_->_tmp124_;
	_data_->_state_ = 24;
	proton_plus_utils_filesystem_move_directory_atomic (_data_->_tmp122_, _data_->_tmp125_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_24:
	if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
		_data_->_tmp126_ = _data_->context;
		_data_->_tmp127_ = _data_->previous;
		_data_->_tmp128_ = _data_->external_backups;
		_data_->_state_ = 25;
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp126_, _data_->_tmp127_, _data_->_tmp128_, FALSE, FALSE, _data_->previous_registration_removed, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_25:
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
		_data_->_tmp129_ = _data_->self->priv->archive_support;
		_data_->_tmp130_ = _data_->archive;
		_data_->_state_ = 26;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp129_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp130_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_26:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp129_, _data_->_res_);
		_g_free0 (_data_->previous);
		_g_object_unref0 (_data_->external_backups);
		_g_object_unref0 (_data_->preparation);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->link_created = FALSE;
	_data_->_tmp131_ = _data_->context;
	_data_->_tmp132_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->_tmp131_);
	_data_->_tmp133_ = _data_->_tmp132_;
	if (!g_file_test (_data_->_tmp133_, G_FILE_TEST_EXISTS)) {
		_data_->_tmp134_ = _data_->context;
		_data_->_tmp135_ = proton_plus_services_steam_tinker_launch_context_get_link_parent_location (_data_->_tmp134_);
		_data_->_tmp136_ = _data_->_tmp135_;
		_data_->_state_ = 27;
		proton_plus_utils_filesystem_create_directory_async (_data_->_tmp136_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_27:
		_data_->link_parent_created = proton_plus_utils_filesystem_create_directory_finish (_data_->_res_);
		if (_data_->link_parent_created) {
			_data_->_tmp137_ = _data_->context;
			_data_->_tmp138_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->_tmp137_);
			_data_->_tmp139_ = _data_->_tmp138_;
			_data_->_tmp140_ = _data_->context;
			_data_->_tmp141_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp140_);
			_data_->_tmp142_ = _data_->_tmp141_;
			_data_->_state_ = 28;
			proton_plus_utils_filesystem_make_symlink (_data_->_tmp139_, _data_->_tmp142_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_28:
			_data_->link_created = proton_plus_utils_filesystem_make_symlink_finish (_data_->_res_);
		}
		if (!_data_->link_created) {
			_data_->_tmp143_ = _data_->context;
			_data_->_tmp144_ = _data_->previous;
			_data_->_tmp145_ = _data_->external_backups;
			_data_->_state_ = 29;
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp143_, _data_->_tmp144_, _data_->_tmp145_, FALSE, TRUE, _data_->previous_registration_removed, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_29:
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
			_data_->_tmp146_ = _data_->self->priv->archive_support;
			_data_->_tmp147_ = _data_->archive;
			_data_->_state_ = 30;
			proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp146_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp147_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_30:
			_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp146_, _data_->_res_);
			_g_free0 (_data_->previous);
			_g_object_unref0 (_data_->external_backups);
			_g_object_unref0 (_data_->preparation);
			_g_free0 (_data_->metadata);
			_g_free0 (_data_->staged_meta);
			_g_free0 (_data_->staged_binary);
			_g_free0 (_data_->staged);
			_g_free0 (_data_->parent);
			_g_free0 (_data_->source);
			_g_object_unref0 (_data_->archive);
			_g_object_unref0 (_data_->operation);
			_g_object_unref0 (_data_->context);
			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 {
		_data_->_tmp148_ = _data_->context;
		_data_->_tmp149_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->_tmp148_);
		_data_->_tmp150_ = _data_->_tmp149_;
		if (!g_file_test (_data_->_tmp150_, G_FILE_TEST_IS_SYMLINK)) {
			_data_->_tmp151_ = _data_->context;
			_data_->_tmp152_ = _data_->previous;
			_data_->_tmp153_ = _data_->external_backups;
			_data_->_state_ = 31;
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp151_, _data_->_tmp152_, _data_->_tmp153_, FALSE, TRUE, _data_->previous_registration_removed, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_31:
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
			_data_->_tmp154_ = _data_->self->priv->archive_support;
			_data_->_tmp155_ = _data_->archive;
			_data_->_state_ = 32;
			proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp154_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp155_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_32:
			_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp154_, _data_->_res_);
			_g_free0 (_data_->previous);
			_g_object_unref0 (_data_->external_backups);
			_g_object_unref0 (_data_->preparation);
			_g_free0 (_data_->metadata);
			_g_free0 (_data_->staged_meta);
			_g_free0 (_data_->staged_binary);
			_g_free0 (_data_->staged);
			_g_free0 (_data_->parent);
			_g_free0 (_data_->source);
			_g_object_unref0 (_data_->archive);
			_g_object_unref0 (_data_->operation);
			_g_object_unref0 (_data_->context);
			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_->_tmp156_ = _data_->context;
	_data_->_tmp157_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp156_);
	_data_->_tmp158_ = _data_->_tmp157_;
	_data_->_state_ = 33;
	proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp158_, "compat del", proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_33:
	_data_->_tmp159_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
	_data_->unregister_replacement = _data_->_tmp159_;
	_data_->_tmp160_ = _data_->unregister_replacement;
	if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp160_)) {
		_data_->_tmp161_ = _data_->unregister_replacement;
		proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "unregister replacement compatibility tool", _data_->_tmp161_);
		proton_plus_services_install_job_set_error_message (_data_->job, _ ("Failed to update SteamTinkerLaunch compatibility registration"));
		if (_data_->previous_registration_removed) {
			_data_->_tmp163_ = TRUE;
		} else {
			_data_->_tmp163_ = _data_->exists;
		}
		if (_data_->_tmp163_) {
			_data_->_tmp162_ = TRUE;
		} else {
			_data_->_tmp164_ = _data_->external_backups;
			_data_->_tmp165_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp164_);
			_data_->_tmp166_ = _data_->_tmp165_;
			_data_->_tmp162_ = _data_->_tmp166_ > 0;
		}
		_data_->_tmp167_ = _data_->context;
		_data_->_tmp168_ = _data_->previous;
		_data_->_tmp169_ = _data_->external_backups;
		_data_->_state_ = 34;
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp167_, _data_->_tmp168_, _data_->_tmp169_, _data_->link_created, TRUE, _data_->_tmp162_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_34:
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
		_data_->_tmp170_ = _data_->self->priv->archive_support;
		_data_->_tmp171_ = _data_->archive;
		_data_->_state_ = 35;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp170_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp171_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_35:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp170_, _data_->_res_);
		_g_object_unref0 (_data_->unregister_replacement);
		_g_free0 (_data_->previous);
		_g_object_unref0 (_data_->external_backups);
		_g_object_unref0 (_data_->preparation);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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 (proton_plus_globals_IS_STEAM_OS) {
		_data_->_tmp172_ = _data_->context;
		_data_->_tmp173_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp172_);
		_data_->_tmp174_ = _data_->_tmp173_;
		_data_->_state_ = 36;
		proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp174_, "", proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_36:
		_data_->_tmp175_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
		_data_->initialization = _data_->_tmp175_;
		_data_->_tmp176_ = _data_->initialization;
		if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp176_)) {
			_data_->_tmp177_ = _data_->initialization;
			proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "initialize SteamTinkerLaunch", _data_->_tmp177_);
			proton_plus_services_install_job_set_error_message (_data_->job, _ ("Failed to initialize SteamTinkerLaunch"));
			if (_data_->previous_registration_removed) {
				_data_->_tmp179_ = TRUE;
			} else {
				_data_->_tmp179_ = _data_->exists;
			}
			if (_data_->_tmp179_) {
				_data_->_tmp178_ = TRUE;
			} else {
				_data_->_tmp180_ = _data_->external_backups;
				_data_->_tmp181_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp180_);
				_data_->_tmp182_ = _data_->_tmp181_;
				_data_->_tmp178_ = _data_->_tmp182_ > 0;
			}
			_data_->_tmp183_ = _data_->context;
			_data_->_tmp184_ = _data_->previous;
			_data_->_tmp185_ = _data_->external_backups;
			_data_->_state_ = 37;
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp183_, _data_->_tmp184_, _data_->_tmp185_, _data_->link_created, TRUE, _data_->_tmp178_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_37:
			proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
			_data_->_tmp186_ = _data_->self->priv->archive_support;
			_data_->_tmp187_ = _data_->archive;
			_data_->_state_ = 38;
			proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp186_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp187_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
			return FALSE;
			_state_38:
			_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp186_, _data_->_res_);
			_g_object_unref0 (_data_->initialization);
			_g_object_unref0 (_data_->unregister_replacement);
			_g_free0 (_data_->previous);
			_g_object_unref0 (_data_->external_backups);
			_g_object_unref0 (_data_->preparation);
			_g_free0 (_data_->metadata);
			_g_free0 (_data_->staged_meta);
			_g_free0 (_data_->staged_binary);
			_g_free0 (_data_->staged);
			_g_free0 (_data_->parent);
			_g_free0 (_data_->source);
			_g_object_unref0 (_data_->archive);
			_g_object_unref0 (_data_->operation);
			_g_object_unref0 (_data_->context);
			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;
		}
		_g_object_unref0 (_data_->initialization);
	}
	_data_->_tmp188_ = _data_->context;
	_data_->_tmp189_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp188_);
	_data_->_tmp190_ = _data_->_tmp189_;
	_data_->_state_ = 39;
	proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp190_, "compat add", proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_39:
	_data_->_tmp191_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
	_data_->register_replacement = _data_->_tmp191_;
	_data_->_tmp192_ = _data_->register_replacement;
	if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp192_)) {
		_data_->_tmp193_ = _data_->register_replacement;
		proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "register replacement compatibility tool", _data_->_tmp193_);
		proton_plus_services_install_job_set_error_message (_data_->job, _ ("Failed to update SteamTinkerLaunch compatibility registration"));
		_data_->_tmp194_ = _data_->context;
		_data_->_tmp195_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp194_);
		_data_->_tmp196_ = _data_->_tmp195_;
		_data_->_state_ = 40;
		proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp196_, "compat del", proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_40:
		_data_->_tmp197_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
		_data_->remove_partial_registration = _data_->_tmp197_;
		_data_->_tmp198_ = _data_->remove_partial_registration;
		if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp198_)) {
			_data_->_tmp199_ = _data_->remove_partial_registration;
			proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "remove a partial replacement registration", _data_->_tmp199_);
		}
		if (_data_->previous_registration_removed) {
			_data_->_tmp201_ = TRUE;
		} else {
			_data_->_tmp201_ = _data_->exists;
		}
		if (_data_->_tmp201_) {
			_data_->_tmp200_ = TRUE;
		} else {
			_data_->_tmp202_ = _data_->external_backups;
			_data_->_tmp203_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp202_);
			_data_->_tmp204_ = _data_->_tmp203_;
			_data_->_tmp200_ = _data_->_tmp204_ > 0;
		}
		_data_->_tmp205_ = _data_->context;
		_data_->_tmp206_ = _data_->previous;
		_data_->_tmp207_ = _data_->external_backups;
		_data_->_state_ = 41;
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (_data_->self, _data_->_tmp205_, _data_->_tmp206_, _data_->_tmp207_, _data_->link_created, TRUE, _data_->_tmp200_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_41:
		proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (_data_->self, _data_->_res_);
		_data_->_tmp208_ = _data_->self->priv->archive_support;
		_data_->_tmp209_ = _data_->archive;
		_data_->_state_ = 42;
		proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp208_, PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR, _data_->_tmp209_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_42:
		_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp208_, _data_->_res_);
		_g_object_unref0 (_data_->remove_partial_registration);
		_g_object_unref0 (_data_->register_replacement);
		_g_object_unref0 (_data_->unregister_replacement);
		_g_free0 (_data_->previous);
		_g_object_unref0 (_data_->external_backups);
		_g_object_unref0 (_data_->preparation);
		_g_free0 (_data_->metadata);
		_g_free0 (_data_->staged_meta);
		_g_free0 (_data_->staged_binary);
		_g_free0 (_data_->staged);
		_g_free0 (_data_->parent);
		_g_free0 (_data_->source);
		_g_object_unref0 (_data_->archive);
		_g_object_unref0 (_data_->operation);
		_g_object_unref0 (_data_->context);
		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_->_tmp211_ = _data_->previous;
	if (g_strcmp0 (_data_->_tmp211_, "") != 0) {
		_data_->_tmp212_ = _data_->previous;
		_data_->_state_ = 43;
		proton_plus_utils_filesystem_delete_directory (_data_->_tmp212_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
		return FALSE;
		_state_43:
		_data_->_tmp210_ = !proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_);
	} else {
		_data_->_tmp210_ = FALSE;
	}
	if (_data_->_tmp210_) {
		_data_->_tmp213_ = _data_->previous;
		g_warning ("steam-tinker-launch-workflow.vala:180: Could not remove the previous S" \
"teamTinkerLaunch installation: %s", _data_->_tmp213_);
	}
	{
		_data_->_tmp214_ = _data_->external_backups;
		_data_->_backup_list = _data_->_tmp214_;
		_data_->_tmp215_ = _data_->_backup_list;
		_data_->_tmp216_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp215_);
		_data_->_tmp217_ = _data_->_tmp216_;
		_data_->_backup_size = _data_->_tmp217_;
		_data_->_backup_index = -1;
		while (TRUE) {
			_data_->_backup_index = _data_->_backup_index + 1;
			_data_->_tmp218_ = _data_->_backup_index;
			_data_->_tmp219_ = _data_->_backup_size;
			if (!(_data_->_tmp218_ < _data_->_tmp219_)) {
				break;
			}
			_data_->_tmp220_ = _data_->_backup_list;
			_data_->_tmp221_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp220_, _data_->_backup_index);
			_data_->backup = (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup*) _data_->_tmp221_;
			_data_->_tmp223_ = _data_->backup;
			_data_->_tmp224_ = proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (_data_->_tmp223_);
			_data_->_tmp225_ = _data_->_tmp224_;
			if (g_file_test (_data_->_tmp225_, G_FILE_TEST_EXISTS)) {
				_data_->_tmp226_ = _data_->backup;
				_data_->_tmp227_ = proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (_data_->_tmp226_);
				_data_->_tmp228_ = _data_->_tmp227_;
				_data_->_state_ = 44;
				proton_plus_utils_filesystem_delete_directory (_data_->_tmp228_, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
				return FALSE;
				_state_44:
				_data_->_tmp222_ = !proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_);
			} else {
				_data_->_tmp222_ = FALSE;
			}
			if (_data_->_tmp222_) {
				_data_->_tmp229_ = _data_->backup;
				_data_->_tmp230_ = proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (_data_->_tmp229_);
				_data_->_tmp231_ = _data_->_tmp230_;
				g_warning ("steam-tinker-launch-workflow.vala:184: Could not remove the previous e" \
"xternal SteamTinkerLaunch installation: %s", _data_->_tmp231_);
			}
			_g_object_unref0 (_data_->backup);
		}
	}
	_data_->_tmp232_ = _data_->self->priv->archive_support;
	_data_->_tmp233_ = _data_->archive;
	_data_->_state_ = 45;
	proton_plus_services_archive_workflow_support_complete_attempt (_data_->_tmp232_, PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED, _data_->_tmp233_, FALSE, proton_plus_services_steam_tinker_launch_workflow_install_ready, _data_);
	return FALSE;
	_state_45:
	_data_->result = proton_plus_services_archive_workflow_support_complete_attempt_finish (_data_->_tmp232_, _data_->_res_);
	_g_object_unref0 (_data_->register_replacement);
	_g_object_unref0 (_data_->unregister_replacement);
	_g_free0 (_data_->previous);
	_g_object_unref0 (_data_->external_backups);
	_g_object_unref0 (_data_->preparation);
	_g_free0 (_data_->metadata);
	_g_free0 (_data_->staged_meta);
	_g_free0 (_data_->staged_binary);
	_g_free0 (_data_->staged);
	_g_free0 (_data_->parent);
	_g_free0 (_data_->source);
	_g_object_unref0 (_data_->archive);
	_g_object_unref0 (_data_->operation);
	_g_object_unref0 (_data_->context);
	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_services_steam_tinker_launch_workflow_real_update_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->job);
	_g_object_unref0 (_data_->coordinator);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_update (ProtonPlusServicesInstallationWorkflow* base,
                                                               ProtonPlusServicesInstallJob* job,
                                                               ProtonPlusServicesInstallationOperationCoordinator* coordinator,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	ProtonPlusServicesInstallationOperationCoordinator* _tmp2_;
	g_return_if_fail (job != NULL);
	g_return_if_fail (coordinator != NULL);
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_real_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (job);
	_g_object_unref0 (_data_->job);
	_data_->job = _tmp1_;
	_tmp2_ = _g_object_ref0 (coordinator);
	_g_object_unref0 (_data_->coordinator);
	_data_->coordinator = _tmp2_;
	proton_plus_services_steam_tinker_launch_workflow_real_update_co (_data_);
}

static ProtonPlusReturnCode
proton_plus_services_steam_tinker_launch_workflow_update_finish (ProtonPlusServicesInstallationWorkflow* base,
                                                                 GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_update_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_real_update_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_real_update_co (ProtonPlusServicesSteamTinkerLaunchWorkflowUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	proton_plus_services_install_job_set_state (_data_->job, PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_BUSY_UPDATING);
	_data_->_state_ = 1;
	proton_plus_services_installation_operation_coordinator_install_for_update (_data_->coordinator, _data_->job, proton_plus_services_steam_tinker_launch_workflow_update_ready, _data_);
	return FALSE;
	_state_1:
	_data_->code = proton_plus_services_installation_operation_coordinator_install_for_update_finish (_data_->coordinator, _data_->_res_);
	proton_plus_services_install_job_finish_operation (_data_->job);
	if (_data_->code != PROTON_PLUS_RETURN_CODE_RUNNER_INSTALLED) {
		_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;
	}
	_data_->_tmp0_ = _g_object_ref0 (PROTON_PLUS_SERVICES_IS_INSTALLATION_LIFECYCLE_RECORDER (_data_->coordinator) ? ((ProtonPlusServicesInstallationLifecycleRecorder*) _data_->coordinator) : NULL);
	_data_->lifecycle = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->lifecycle;
	if (_data_->_tmp1_ != NULL) {
		_data_->_tmp2_ = _data_->lifecycle;
		proton_plus_services_installation_lifecycle_recorder_record_completed_update (_data_->_tmp2_, _data_->job);
	}
	_data_->result = PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED;
	_g_object_unref0 (_data_->lifecycle);
	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_services_steam_tinker_launch_workflow_real_remove_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->job);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_remove (ProtonPlusServicesInstallationWorkflow* base,
                                                               ProtonPlusServicesInstallJob* job,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	g_return_if_fail (job != NULL);
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_real_remove_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (job);
	_g_object_unref0 (_data_->job);
	_data_->job = _tmp1_;
	proton_plus_services_steam_tinker_launch_workflow_real_remove_co (_data_);
}

static ProtonPlusReturnCode
proton_plus_services_steam_tinker_launch_workflow_remove_finish (ProtonPlusServicesInstallationWorkflow* base,
                                                                 GAsyncResult* _res_)
{
	ProtonPlusReturnCode result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_remove_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_real_remove_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_real_remove_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRemoveData* _data_)
{
	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;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (_data_->self, _data_->job);
	_data_->context = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->context;
	if (_data_->_tmp1_ == NULL) {
		_data_->result = PROTON_PLUS_RETURN_CODE_INVALID_CONFIGURATION;
		_g_object_unref0 (_data_->context);
		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_->_tmp2_ = _data_->context;
	_data_->_tmp3_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	if (g_file_test (_data_->_tmp4_, G_FILE_TEST_IS_REGULAR)) {
		_data_->_tmp5_ = _data_->context;
		_data_->_tmp6_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp5_);
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_state_ = 1;
		proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp7_, "compat del", proton_plus_services_steam_tinker_launch_workflow_remove_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp8_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
		_data_->unregister = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->unregister;
		if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp9_)) {
			_data_->_tmp10_ = _data_->unregister;
			proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "unregister compatibility tool before removal", _data_->_tmp10_);
			proton_plus_services_install_job_set_error_message (_data_->job, _ ("Failed to update SteamTinkerLaunch compatibility registration"));
			_data_->_tmp11_ = _data_->context;
			_data_->_tmp12_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->_tmp11_);
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_state_ = 2;
			proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp13_, "compat add", proton_plus_services_steam_tinker_launch_workflow_remove_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp14_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
			_data_->restore_registration = _data_->_tmp14_;
			_data_->_tmp15_ = _data_->restore_registration;
			if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp15_)) {
				_data_->_tmp16_ = _data_->restore_registration;
				proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "compensate a failed compatibility removal", _data_->_tmp16_);
			}
			_data_->result = PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR;
			_g_object_unref0 (_data_->restore_registration);
			_g_object_unref0 (_data_->unregister);
			_g_object_unref0 (_data_->context);
			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;
		}
		_g_object_unref0 (_data_->unregister);
	}
	_data_->_tmp17_ = _data_->context;
	_data_->_tmp18_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->_tmp17_);
	_data_->_tmp19_ = _data_->_tmp18_;
	if (g_file_test (_data_->_tmp19_, G_FILE_TEST_EXISTS)) {
		_data_->_tmp21_ = _data_->context;
		_data_->_tmp22_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->_tmp21_);
		_data_->_tmp23_ = _data_->_tmp22_;
		if (!g_file_test (_data_->_tmp23_, G_FILE_TEST_IS_SYMLINK)) {
			_data_->_tmp20_ = TRUE;
		} else {
			_data_->_tmp24_ = _data_->context;
			_data_->_tmp25_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->_tmp24_);
			_data_->_tmp26_ = _data_->_tmp25_;
			_data_->_tmp20_ = !proton_plus_utils_filesystem_delete_file (_data_->_tmp26_);
		}
		if (_data_->_tmp20_) {
			_data_->result = PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR;
			_g_object_unref0 (_data_->context);
			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_->_tmp28_ = _data_->context;
	_data_->_tmp29_ = proton_plus_services_steam_tinker_launch_context_get_user_requested_removal (_data_->_tmp28_);
	_data_->_tmp30_ = _data_->_tmp29_;
	if (_data_->_tmp30_) {
		_data_->_tmp31_ = _data_->context;
		_data_->_tmp32_ = proton_plus_services_steam_tinker_launch_context_get_manual_remove_location (_data_->_tmp31_);
		_data_->_tmp33_ = _data_->_tmp32_;
		_data_->_tmp27_ = _data_->_tmp33_;
	} else {
		_data_->_tmp34_ = _data_->context;
		_data_->_tmp35_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->_tmp34_);
		_data_->_tmp36_ = _data_->_tmp35_;
		_data_->_tmp27_ = _data_->_tmp36_;
	}
	_data_->_tmp37_ = g_strdup (_data_->_tmp27_);
	_data_->remove_location = _data_->_tmp37_;
	_data_->_tmp38_ = _data_->remove_location;
	if (g_file_test (_data_->_tmp38_, G_FILE_TEST_EXISTS)) {
		_data_->_tmp40_ = _data_->remove_location;
		if (!g_file_test (_data_->_tmp40_, G_FILE_TEST_IS_DIR)) {
			_data_->_tmp39_ = TRUE;
		} else {
			_data_->_tmp41_ = _data_->remove_location;
			_data_->_state_ = 3;
			proton_plus_utils_filesystem_delete_directory (_data_->_tmp41_, proton_plus_services_steam_tinker_launch_workflow_remove_ready, _data_);
			return FALSE;
			_state_3:
			_data_->_tmp39_ = !proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_);
		}
		if (_data_->_tmp39_) {
			_data_->result = PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR;
			_g_free0 (_data_->remove_location);
			_g_object_unref0 (_data_->context);
			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_->_tmp43_ = _data_->context;
	_data_->_tmp44_ = proton_plus_services_steam_tinker_launch_context_get_remove_config (_data_->_tmp43_);
	_data_->_tmp45_ = _data_->_tmp44_;
	if (_data_->_tmp45_) {
		_data_->_tmp46_ = _data_->context;
		_data_->_tmp47_ = proton_plus_services_steam_tinker_launch_context_get_config_location (_data_->_tmp46_);
		_data_->_tmp48_ = _data_->_tmp47_;
		_data_->_tmp42_ = g_file_test (_data_->_tmp48_, G_FILE_TEST_EXISTS);
	} else {
		_data_->_tmp42_ = FALSE;
	}
	if (_data_->_tmp42_) {
		_data_->_tmp50_ = _data_->context;
		_data_->_tmp51_ = proton_plus_services_steam_tinker_launch_context_get_config_location (_data_->_tmp50_);
		_data_->_tmp52_ = _data_->_tmp51_;
		if (!g_file_test (_data_->_tmp52_, G_FILE_TEST_IS_DIR)) {
			_data_->_tmp49_ = TRUE;
		} else {
			_data_->_tmp53_ = _data_->context;
			_data_->_tmp54_ = proton_plus_services_steam_tinker_launch_context_get_config_location (_data_->_tmp53_);
			_data_->_tmp55_ = _data_->_tmp54_;
			_data_->_state_ = 4;
			proton_plus_utils_filesystem_delete_directory (_data_->_tmp55_, proton_plus_services_steam_tinker_launch_workflow_remove_ready, _data_);
			return FALSE;
			_state_4:
			_data_->_tmp49_ = !proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_);
		}
		if (_data_->_tmp49_) {
			_data_->result = PROTON_PLUS_RETURN_CODE_FILESYSTEM_ERROR;
			_g_free0 (_data_->remove_location);
			_g_object_unref0 (_data_->context);
			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 = PROTON_PLUS_RETURN_CODE_RUNNER_REMOVED;
	_g_free0 (_data_->remove_location);
	_g_object_unref0 (_data_->context);
	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 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 void
proton_plus_services_steam_tinker_launch_workflow_real_refresh_state (ProtonPlusServicesInstallationWorkflow* base,
                                                                      ProtonPlusServicesInstallJob* job)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchContext* context = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gboolean installed = FALSE;
	gboolean updated = FALSE;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp13_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp14_;
	ProtonPlusServicesInstallJobState _tmp53_ = 0;
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	g_return_if_fail (job != NULL);
	_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (self, job);
	context = _tmp0_;
	_tmp1_ = context;
	if (_tmp1_ == NULL) {
		proton_plus_services_install_job_set_state (job, PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED);
		_g_object_unref0 (context);
		return;
	}
	_tmp4_ = context;
	_tmp5_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_tmp4_);
	_tmp6_ = _tmp5_;
	if (g_file_test (_tmp6_, G_FILE_TEST_IS_DIR)) {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		_tmp7_ = context;
		_tmp8_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp3_ = g_file_test (_tmp9_, G_FILE_TEST_IS_EXECUTABLE);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		_tmp10_ = context;
		_tmp11_ = proton_plus_services_steam_tinker_launch_context_get_meta_location (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp2_ = g_file_test (_tmp12_, G_FILE_TEST_IS_REGULAR);
	} else {
		_tmp2_ = FALSE;
	}
	installed = _tmp2_;
	updated = FALSE;
	_tmp13_ = context;
	proton_plus_services_steam_tinker_launch_context_set_local_date (_tmp13_, "");
	_tmp14_ = context;
	proton_plus_services_steam_tinker_launch_context_set_local_hash (_tmp14_, "");
	if (installed) {
		gchar** parts = NULL;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar** _tmp22_;
		gchar** _tmp23_;
		gchar** _tmp24_;
		gint _tmp24__length1;
		gint parts_length1;
		gint _parts_size_;
		gchar** _tmp25_;
		gint _tmp25__length1;
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp41_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		_tmp15_ = context;
		_tmp16_ = proton_plus_services_steam_tinker_launch_context_get_meta_location (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = proton_plus_utils_filesystem_get_file_content (_tmp17_, FALSE);
		_tmp19_ = _tmp18_;
		_tmp20_ = string_strip (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp23_ = _tmp22_ = g_strsplit (_tmp21_, ":", 0);
		_tmp24_ = _tmp23_;
		_tmp24__length1 = _vala_array_length (_tmp22_);
		_g_free0 (_tmp21_);
		_g_free0 (_tmp19_);
		parts = _tmp24_;
		parts_length1 = _tmp24__length1;
		_parts_size_ = parts_length1;
		_tmp25_ = parts;
		_tmp25__length1 = parts_length1;
		if (_tmp25__length1 >= 2) {
			ProtonPlusServicesSteamTinkerLaunchContext* _tmp26_;
			gchar** _tmp27_;
			gint _tmp27__length1;
			const gchar* _tmp28_;
			ProtonPlusServicesSteamTinkerLaunchContext* _tmp29_;
			gchar** _tmp30_;
			gint _tmp30__length1;
			const gchar* _tmp31_;
			gboolean _tmp32_ = FALSE;
			ProtonPlusServicesSteamTinkerLaunchContext* _tmp33_;
			const gchar* _tmp34_;
			const gchar* _tmp35_;
			_tmp26_ = context;
			_tmp27_ = parts;
			_tmp27__length1 = parts_length1;
			_tmp28_ = _tmp27_[0];
			proton_plus_services_steam_tinker_launch_context_set_local_date (_tmp26_, _tmp28_);
			_tmp29_ = context;
			_tmp30_ = parts;
			_tmp30__length1 = parts_length1;
			_tmp31_ = _tmp30_[1];
			proton_plus_services_steam_tinker_launch_context_set_local_hash (_tmp29_, _tmp31_);
			_tmp33_ = context;
			_tmp34_ = proton_plus_services_steam_tinker_launch_context_get_local_date (_tmp33_);
			_tmp35_ = _tmp34_;
			if (g_strcmp0 (_tmp35_, "") == 0) {
				_tmp32_ = TRUE;
			} else {
				ProtonPlusServicesSteamTinkerLaunchContext* _tmp36_;
				const gchar* _tmp37_;
				const gchar* _tmp38_;
				_tmp36_ = context;
				_tmp37_ = proton_plus_services_steam_tinker_launch_context_get_local_hash (_tmp36_);
				_tmp38_ = _tmp37_;
				_tmp32_ = g_strcmp0 (_tmp38_, "") == 0;
			}
			if (_tmp32_) {
				ProtonPlusServicesSteamTinkerLaunchContext* _tmp39_;
				ProtonPlusServicesSteamTinkerLaunchContext* _tmp40_;
				_tmp39_ = context;
				_tmp40_ = context;
				proton_plus_services_steam_tinker_launch_context_set_local_hash (_tmp40_, "");
				proton_plus_services_steam_tinker_launch_context_set_local_date (_tmp39_, "");
			}
		}
		_tmp41_ = context;
		_tmp42_ = proton_plus_services_steam_tinker_launch_context_get_local_hash (_tmp41_);
		_tmp43_ = _tmp42_;
		if (g_strcmp0 (_tmp43_, "") == 0) {
			installed = FALSE;
		} else {
			ProtonPlusServicesSteamTinkerLaunchContext* _tmp44_;
			const gchar* _tmp45_;
			const gchar* _tmp46_;
			_tmp44_ = context;
			_tmp45_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_tmp44_);
			_tmp46_ = _tmp45_;
			if (g_strcmp0 (_tmp46_, "") != 0) {
				ProtonPlusServicesSteamTinkerLaunchContext* _tmp47_;
				const gchar* _tmp48_;
				const gchar* _tmp49_;
				ProtonPlusServicesSteamTinkerLaunchContext* _tmp50_;
				const gchar* _tmp51_;
				const gchar* _tmp52_;
				_tmp47_ = context;
				_tmp48_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_tmp47_);
				_tmp49_ = _tmp48_;
				_tmp50_ = context;
				_tmp51_ = proton_plus_services_steam_tinker_launch_context_get_local_hash (_tmp50_);
				_tmp52_ = _tmp51_;
				updated = g_strcmp0 (_tmp49_, _tmp52_) == 0;
			}
		}
		parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
	}
	if (!installed) {
		_tmp53_ = PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_NOT_INSTALLED;
	} else {
		ProtonPlusServicesInstallJobState _tmp54_ = 0;
		if (updated) {
			_tmp54_ = PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UP_TO_DATE;
		} else {
			_tmp54_ = PROTON_PLUS_SERVICES_INSTALL_JOB_STATE_UPDATE_AVAILABLE;
		}
		_tmp53_ = _tmp54_;
	}
	proton_plus_services_install_job_set_state (job, _tmp53_);
	proton_plus_services_install_job_set_step (job, PROTON_PLUS_SERVICES_INSTALL_JOB_STEP_NOTHING);
	_g_object_unref0 (context);
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_finalize_install_success (ProtonPlusServicesInstallationWorkflow* base,
                                                                                 ProtonPlusServicesInstallJob* job)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchContext* context = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusModelsTool* _tmp3_;
	ProtonPlusModelsGroup* _tmp4_;
	ProtonPlusModelsGroup* _tmp5_;
	ProtonPlusModelsLauncher* _tmp6_;
	ProtonPlusModelsLauncher* _tmp7_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	g_return_if_fail (job != NULL);
	_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (self, job);
	context = _tmp0_;
	_tmp1_ = context;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (context);
		return;
	}
	_tmp2_ = proton_plus_services_install_job_get_tool (job);
	_tmp3_ = _tmp2_;
	_tmp4_ = proton_plus_models_tool_get_group (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_models_group_get_launcher (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = context;
	_tmp9_ = proton_plus_services_steam_tinker_launch_context_get_compat_location (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup_printf ("%s/SteamTinkerLaunch", _tmp10_);
	_tmp12_ = _tmp11_;
	proton_plus_models_launcher_register_compatibility_tool_from_path (_tmp7_, _tmp12_);
	_g_free0 (_tmp12_);
	_g_object_unref0 (context);
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_finalize_removal_success (ProtonPlusServicesInstallationWorkflow* base,
                                                                                 ProtonPlusServicesInstallJob* job)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	ProtonPlusServicesSteamTinkerLaunchContext* context = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusModelsTool* _tmp2_;
	ProtonPlusModelsTool* _tmp3_;
	ProtonPlusModelsGroup* _tmp4_;
	ProtonPlusModelsGroup* _tmp5_;
	ProtonPlusModelsLauncher* _tmp6_;
	ProtonPlusModelsLauncher* _tmp7_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) base;
	g_return_if_fail (job != NULL);
	_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (self, job);
	context = _tmp0_;
	_tmp1_ = context;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (context);
		return;
	}
	_tmp2_ = proton_plus_services_install_job_get_tool (job);
	_tmp3_ = _tmp2_;
	_tmp4_ = proton_plus_models_tool_get_group (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_models_group_get_launcher (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = context;
	_tmp9_ = proton_plus_services_steam_tinker_launch_context_get_compat_location (_tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = g_strdup_printf ("%s/SteamTinkerLaunch", _tmp10_);
	_tmp12_ = _tmp11_;
	proton_plus_models_launcher_unregister_compatibility_tool_by_path (_tmp7_, _tmp12_);
	_g_free0 (_tmp12_);
	_g_object_unref0 (context);
}

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_);
}

gboolean
proton_plus_services_steam_tinker_launch_workflow_detect_external_installations (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                 ProtonPlusServicesInstallJob* job)
{
	ProtonPlusServicesSteamTinkerLaunchContext* context = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp2_;
	gchar* location = NULL;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gboolean _tmp15_ = FALSE;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp20_;
	GList* _tmp21_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (job != NULL, FALSE);
	_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_get_context (self, job);
	context = _tmp0_;
	_tmp1_ = context;
	if (_tmp1_ == NULL) {
		result = FALSE;
		_g_object_unref0 (context);
		return result;
	}
	_tmp2_ = context;
	(_tmp2_->external_locations == NULL) ? NULL : (_tmp2_->external_locations = (_g_list_free__g_free0_ (_tmp2_->external_locations), NULL));
	_tmp2_->external_locations = NULL;
	_tmp3_ = context;
	_tmp4_ = proton_plus_services_steam_tinker_launch_context_get_home_location (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf ("%s/SteamTinkerLaunch", _tmp5_);
	location = _tmp6_;
	_tmp7_ = location;
	if (g_file_test (_tmp7_, G_FILE_TEST_IS_DIR)) {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp8_ = context;
		_tmp9_ = location;
		_tmp10_ = g_strdup (_tmp9_);
		_tmp8_->external_locations = g_list_append (_tmp8_->external_locations, _tmp10_);
	}
	_tmp11_ = context;
	_tmp12_ = proton_plus_services_steam_tinker_launch_context_get_home_location (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strconcat (_tmp13_, "/stl", NULL);
	_g_free0 (location);
	location = _tmp14_;
	if (!proton_plus_globals_IS_STEAM_OS) {
		const gchar* _tmp16_;
		_tmp16_ = location;
		_tmp15_ = g_file_test (_tmp16_, G_FILE_TEST_IS_DIR);
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		ProtonPlusServicesSteamTinkerLaunchContext* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp17_ = context;
		_tmp18_ = location;
		_tmp19_ = g_strdup (_tmp18_);
		_tmp17_->external_locations = g_list_append (_tmp17_->external_locations, _tmp19_);
	}
	_tmp20_ = context;
	_tmp21_ = _tmp20_->external_locations;
	result = g_list_length (_tmp21_) > ((guint) 0);
	_g_free0 (location);
	_g_object_unref0 (context);
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->job);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData, _data_);
}

void
proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                          ProtonPlusServicesInstallJob* job,
                                                                          GAsyncReadyCallback _callback_,
                                                                          gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesInstallJob* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (job != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (job);
	_g_object_unref0 (_data_->job);
	_data_->job = _tmp1_;
	proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_co (_data_);
}

void
proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                 GAsyncResult* _res_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_ready (GObject* source_object,
                                                                                GAsyncResult* _res_,
                                                                                gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_co (_data_);
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRefreshLatestReleaseData* _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_services_steam_tinker_launch_workflow_get_context (_data_->self, _data_->job);
	_data_->context = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->context;
	if (_data_->_tmp1_ == NULL) {
		_g_object_unref0 (_data_->context);
		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_->_tmp2_ = _data_->context;
	proton_plus_services_steam_tinker_launch_context_set_latest_date (_data_->_tmp2_, "");
	_data_->_tmp3_ = _data_->context;
	proton_plus_services_steam_tinker_launch_context_set_latest_hash (_data_->_tmp3_, "");
	_data_->_state_ = 1;
	proton_plus_utils_web_get_request ("https://api.github.com/repos/sonic2kk/steamtinkerlaunch/commits?per_pa" \
"ge=1", PROTON_PLUS_UTILS_WEB_GET_REQUEST_TYPE_STEAMTINKERLAUNCH, NULL, proton_plus_services_steam_tinker_launch_workflow_refresh_latest_release_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = proton_plus_utils_web_get_request_finish (_data_->_res_);
	_data_->response = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->response;
	_data_->_tmp6_ = proton_plus_utils_web_response_get_code (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	if (_data_->_tmp7_ != PROTON_PLUS_RETURN_CODE_VALID_REQUEST) {
		_g_object_unref0 (_data_->response);
		_g_object_unref0 (_data_->context);
		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_->response;
	_data_->_tmp9_ = proton_plus_utils_web_response_get_body (_data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = proton_plus_utils_parser_get_node_from_json (_data_->_tmp10_);
	_data_->node = _data_->_tmp11_;
	_data_->_tmp14_ = _data_->node;
	if (_data_->_tmp14_ == NULL) {
		_data_->_tmp13_ = TRUE;
	} else {
		_data_->_tmp15_ = _data_->node;
		_data_->_tmp13_ = json_node_get_node_type (_data_->_tmp15_) != JSON_NODE_ARRAY;
	}
	if (_data_->_tmp13_) {
		_data_->_tmp12_ = TRUE;
	} else {
		_data_->_tmp16_ = _data_->node;
		_data_->_tmp17_ = json_node_get_array (_data_->_tmp16_);
		_data_->_tmp12_ = json_array_get_length (_data_->_tmp17_) < ((guint) 1);
	}
	if (_data_->_tmp12_) {
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->response);
		_g_object_unref0 (_data_->context);
		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_->_tmp18_ = _data_->node;
	_data_->_tmp19_ = json_node_get_array (_data_->_tmp18_);
	_data_->_tmp20_ = json_array_get_element (_data_->_tmp19_, (guint) 0);
	_data_->_tmp21_ = __vala_JsonNode_copy0 (_data_->_tmp20_);
	_data_->commit = _data_->_tmp21_;
	_data_->_tmp22_ = _data_->commit;
	if (json_node_get_node_type (_data_->_tmp22_) != JSON_NODE_OBJECT) {
		__vala_JsonNode_free0 (_data_->commit);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->response);
		_g_object_unref0 (_data_->context);
		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_->_tmp23_ = _data_->commit;
	_data_->_tmp24_ = json_node_get_object (_data_->_tmp23_);
	_data_->_tmp25_ = _json_object_ref0 (_data_->_tmp24_);
	_data_->commit_obj = _data_->_tmp25_;
	_data_->_tmp26_ = _data_->commit_obj;
	_data_->_tmp27_ = json_object_get_member (_data_->_tmp26_, "commit");
	_data_->_tmp28_ = __vala_JsonNode_copy0 (_data_->_tmp27_);
	_data_->metadata_node = _data_->_tmp28_;
	_data_->_tmp30_ = _data_->metadata_node;
	if (_data_->_tmp30_ == NULL) {
		_data_->_tmp29_ = TRUE;
	} else {
		_data_->_tmp31_ = _data_->metadata_node;
		_data_->_tmp29_ = json_node_get_node_type (_data_->_tmp31_) != JSON_NODE_OBJECT;
	}
	if (_data_->_tmp29_) {
		__vala_JsonNode_free0 (_data_->metadata_node);
		_json_object_unref0 (_data_->commit_obj);
		__vala_JsonNode_free0 (_data_->commit);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->response);
		_g_object_unref0 (_data_->context);
		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_->_tmp32_ = _data_->metadata_node;
	_data_->_tmp33_ = json_node_get_object (_data_->_tmp32_);
	_data_->_tmp34_ = json_object_get_member (_data_->_tmp33_, "committer");
	_data_->_tmp35_ = __vala_JsonNode_copy0 (_data_->_tmp34_);
	_data_->committer_node = _data_->_tmp35_;
	_data_->_tmp37_ = _data_->committer_node;
	if (_data_->_tmp37_ == NULL) {
		_data_->_tmp36_ = TRUE;
	} else {
		_data_->_tmp38_ = _data_->committer_node;
		_data_->_tmp36_ = json_node_get_node_type (_data_->_tmp38_) != JSON_NODE_OBJECT;
	}
	if (_data_->_tmp36_) {
		__vala_JsonNode_free0 (_data_->committer_node);
		__vala_JsonNode_free0 (_data_->metadata_node);
		_json_object_unref0 (_data_->commit_obj);
		__vala_JsonNode_free0 (_data_->commit);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->response);
		_g_object_unref0 (_data_->context);
		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_->_tmp39_ = _data_->committer_node;
	_data_->_tmp40_ = json_node_get_object (_data_->_tmp39_);
	_data_->_tmp41_ = json_object_get_string_member_with_default (_data_->_tmp40_, "date", "");
	_data_->_tmp43_ = _data_->_tmp42_ = g_strsplit (_data_->_tmp41_, "T", 0);
	_data_->date = _data_->_tmp43_;
	_data_->date_length1 = _vala_array_length (_data_->_tmp42_);
	_data_->_date_size_ = _data_->date_length1;
	_data_->_tmp44_ = _data_->date;
	_data_->_tmp44__length1 = _data_->date_length1;
	if (_data_->_tmp44__length1 > 0) {
		_data_->_tmp45_ = _data_->context;
		_data_->_tmp46_ = _data_->date;
		_data_->_tmp46__length1 = _data_->date_length1;
		_data_->_tmp47_ = _data_->_tmp46_[0];
		proton_plus_services_steam_tinker_launch_context_set_latest_date (_data_->_tmp45_, _data_->_tmp47_);
	}
	_data_->_tmp48_ = _data_->context;
	_data_->_tmp49_ = _data_->commit_obj;
	_data_->_tmp50_ = json_object_get_string_member_with_default (_data_->_tmp49_, "sha", "");
	proton_plus_services_steam_tinker_launch_context_set_latest_hash (_data_->_tmp48_, _data_->_tmp50_);
	_data_->_tmp51_ = _data_->context;
	_data_->_tmp52_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_data_->_tmp51_);
	_data_->_tmp53_ = _data_->_tmp52_;
	if (g_strcmp0 (_data_->_tmp53_, "") == 0) {
		_data_->date = (_vala_array_free (_data_->date, _data_->date_length1, (GDestroyNotify) g_free), NULL);
		__vala_JsonNode_free0 (_data_->committer_node);
		__vala_JsonNode_free0 (_data_->metadata_node);
		_json_object_unref0 (_data_->commit_obj);
		__vala_JsonNode_free0 (_data_->commit);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->response);
		_g_object_unref0 (_data_->context);
		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_->_tmp54_ = _data_->context;
	_data_->_tmp55_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_data_->_tmp54_);
	_data_->_tmp56_ = _data_->_tmp55_;
	_data_->_tmp57_ = g_strdup_printf ("https://github.com/sonic2kk/steamtinkerlaunch/archive/%s.zip", _data_->_tmp56_);
	_data_->url = _data_->_tmp57_;
	_data_->_tmp58_ = proton_plus_services_install_job_get_release (_data_->job);
	_data_->_tmp59_ = _data_->_tmp58_;
	_data_->_tmp60_ = proton_plus_models_release_get_title (_data_->_tmp59_);
	_data_->_tmp61_ = _data_->_tmp60_;
	_data_->_tmp62_ = proton_plus_services_install_job_get_release (_data_->job);
	_data_->_tmp63_ = _data_->_tmp62_;
	_data_->_tmp64_ = proton_plus_models_release_get_description (_data_->_tmp63_);
	_data_->_tmp65_ = _data_->_tmp64_;
	_data_->_tmp66_ = _data_->context;
	_data_->_tmp67_ = proton_plus_services_steam_tinker_launch_context_get_latest_date (_data_->_tmp66_);
	_data_->_tmp68_ = _data_->_tmp67_;
	_data_->_tmp69_ = _data_->url;
	_data_->_tmp70_ = proton_plus_models_assets_asset_from_download_url (_data_->_tmp69_, (gint64) 0, "");
	_data_->_tmp71_ = _data_->_tmp70_;
	_data_->_tmp72_ = proton_plus_services_install_job_get_release (_data_->job);
	_data_->_tmp73_ = _data_->_tmp72_;
	_data_->_tmp74_ = proton_plus_models_release_get_page_url (_data_->_tmp73_);
	_data_->_tmp75_ = _data_->_tmp74_;
	_data_->_tmp76_ = (gint64) 0;
	_data_->_tmp77_ = _data_->context;
	_data_->_tmp78_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_data_->_tmp77_);
	_data_->_tmp79_ = _data_->_tmp78_;
	_data_->_tmp80_ = _data_->context;
	_data_->_tmp81_ = proton_plus_services_steam_tinker_launch_context_get_latest_hash (_data_->_tmp80_);
	_data_->_tmp82_ = _data_->_tmp81_;
	_data_->_tmp83_ = proton_plus_models_release_new (_data_->_tmp61_, _data_->_tmp65_, _data_->_tmp68_, _data_->_tmp71_, _data_->_tmp75_, &_data_->_tmp76_, _data_->_tmp79_, _data_->_tmp82_, PROTON_PLUS_MODELS_RELEASE_KIND_STEAM_TINKER_LAUNCH, "");
	_data_->_tmp84_ = _data_->_tmp83_;
	proton_plus_services_install_job_set_release_for_update (_data_->job, _data_->_tmp84_);
	_g_object_unref0 (_data_->_tmp84_);
	_g_object_unref0 (_data_->_tmp71_);
	proton_plus_services_installation_workflow_refresh_state ((ProtonPlusServicesInstallationWorkflow*) _data_->self, _data_->job);
	_g_free0 (_data_->url);
	_data_->date = (_vala_array_free (_data_->date, _data_->date_length1, (GDestroyNotify) g_free), NULL);
	__vala_JsonNode_free0 (_data_->committer_node);
	__vala_JsonNode_free0 (_data_->metadata_node);
	_json_object_unref0 (_data_->commit_obj);
	__vala_JsonNode_free0 (_data_->commit);
	__vala_JsonNode_free0 (_data_->node);
	_g_object_unref0 (_data_->response);
	_g_object_unref0 (_data_->context);
	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 ProtonPlusServicesSteamTinkerLaunchContext*
proton_plus_services_steam_tinker_launch_workflow_get_context (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                               ProtonPlusServicesInstallJob* job)
{
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp2_;
	ProtonPlusServicesSteamTinkerLaunchContext* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (job != NULL, NULL);
	_tmp0_ = proton_plus_services_install_job_get_steam_tinker_launch_context (job);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_run_command_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData* _data_;
	_data_ = _data;
	_g_free0 (_data_->command);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_run_command (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                    const gchar* command,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (command != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_real_run_command_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (command);
	_g_free0 (_data_->command);
	_data_->command = _tmp1_;
	proton_plus_services_steam_tinker_launch_workflow_real_run_command_co (_data_);
}

static ProtonPlusUtilsCommandResult*
proton_plus_services_steam_tinker_launch_workflow_real_run_command_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                           GAsyncResult* _res_)
{
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_run_command_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_real_run_command_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_real_run_command_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRunCommandData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	proton_plus_utils_system_run_command (_data_->command, proton_plus_services_steam_tinker_launch_workflow_run_command_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = proton_plus_utils_system_run_command_finish (_data_->_res_);
	_data_->result = _data_->_tmp0_;
	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;
}

void
proton_plus_services_steam_tinker_launch_workflow_run_command (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                               const gchar* command,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_GET_CLASS (self);
	if (_klass_->run_command) {
		_klass_->run_command (self, command, _callback_, _user_data_);
	}
}

ProtonPlusUtilsCommandResult*
proton_plus_services_steam_tinker_launch_workflow_run_command_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                      GAsyncResult* _res_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_GET_CLASS (self);
	if (_klass_->run_command_finish) {
		return _klass_->run_command_finish (self, _res_);
	}
	return NULL;
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                      GAsyncReadyCallback _callback_,
                                                                                      gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                             GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_system_installation_available_ready (GObject* source_object,
                                                                                       GAsyncResult* _res_,
                                                                                       gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_co (ProtonPlusServicesSteamTinkerLaunchWorkflowSystemInstallationAvailableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	proton_plus_utils_system_check_dependency ("steamtinkerlaunch", proton_plus_services_steam_tinker_launch_workflow_system_installation_available_ready, _data_);
	return FALSE;
	_state_1:
	_data_->result = proton_plus_utils_system_check_dependency_finish (_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;
}

void
proton_plus_services_steam_tinker_launch_workflow_system_installation_available (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                 GAsyncReadyCallback _callback_,
                                                                                 gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_GET_CLASS (self);
	if (_klass_->system_installation_available) {
		_klass_->system_installation_available (self, _callback_, _user_data_);
	}
}

gboolean
proton_plus_services_steam_tinker_launch_workflow_system_installation_available_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                        GAsyncResult* _res_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowClass* _klass_;
	_klass_ = PROTON_PLUS_SERVICES_STEAM_TINKER_LAUNCH_WORKFLOW_GET_CLASS (self);
	if (_klass_->system_installation_available_finish) {
		return _klass_->system_installation_available_finish (self, _res_);
	}
	return FALSE;
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_command_succeeded (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                     ProtonPlusUtilsCommandResult* _result_)
{
	gint _tmp0_;
	gint _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (_result_ != NULL, FALSE);
	_tmp0_ = proton_plus_utils_command_result_get_exit_status (_result_);
	_tmp1_ = _tmp0_;
	result = _tmp1_ == 0;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_report_command_failure (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                          const gchar* operation,
                                                                          ProtonPlusUtilsCommandResult* _result_)
{
	gchar* diagnostic = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	const gchar* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (operation != NULL);
	g_return_if_fail (_result_ != NULL);
	_tmp0_ = proton_plus_utils_command_result_get_stderr (_result_);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_strip (_tmp1_);
	diagnostic = _tmp2_;
	_tmp4_ = diagnostic;
	if (g_strcmp0 (_tmp4_, "") == 0) {
		_tmp3_ = "";
	} else {
		_tmp3_ = ": ";
	}
	_tmp5_ = proton_plus_utils_command_result_get_exit_status (_result_);
	_tmp6_ = _tmp5_;
	_tmp7_ = diagnostic;
	g_warning ("steam-tinker-launch-workflow.vala:359: SteamTinkerLaunch command faile" \
"d while attempting to %s (exit status %d)%s%s", operation, _tmp6_, _tmp3_, _tmp7_);
	_g_free0 (diagnostic);
}

static void
proton_plus_services_steam_tinker_launch_workflow_prepare_executable_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData* _data_;
	_data_ = _data;
	_g_free0 (_data_->executable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_prepare_executable (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                      const gchar* executable,
                                                                      GAsyncReadyCallback _callback_,
                                                                      gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (executable != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_prepare_executable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (executable);
	_g_free0 (_data_->executable);
	_data_->executable = _tmp1_;
	proton_plus_services_steam_tinker_launch_workflow_prepare_executable_co (_data_);
}

static ProtonPlusUtilsCommandResult*
proton_plus_services_steam_tinker_launch_workflow_prepare_executable_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                             GAsyncResult* _res_)
{
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_prepare_executable_ready (GObject* source_object,
                                                                            GAsyncResult* _res_,
                                                                            gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_prepare_executable_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_prepare_executable_co (ProtonPlusServicesSteamTinkerLaunchWorkflowPrepareExecutableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (!g_file_test (_data_->executable, G_FILE_TEST_IS_REGULAR)) {
		_data_->_tmp0_ = proton_plus_utils_command_result_new ("", "The executable is missing or is not a regular file.", -1);
		_data_->result = _data_->_tmp0_;
		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 (g_file_test (_data_->executable, G_FILE_TEST_IS_EXECUTABLE)) {
		_data_->_tmp1_ = proton_plus_utils_command_result_new ("", "", 0);
		_data_->result = _data_->_tmp1_;
		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_->_tmp2_ = g_shell_quote (_data_->executable);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_strdup_printf ("chmod +x %s", _data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_state_ = 1;
	proton_plus_services_steam_tinker_launch_workflow_run_command (_data_->self, _data_->_tmp5_, proton_plus_services_steam_tinker_launch_workflow_prepare_executable_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp6_ = proton_plus_services_steam_tinker_launch_workflow_run_command_finish (_data_->self, _data_->_res_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_g_free0 (_data_->_tmp5_);
	_g_free0 (_data_->_tmp3_);
	_data_->_result_ = _data_->_tmp7_;
	_data_->_tmp9_ = _data_->_result_;
	if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp9_)) {
		_data_->_tmp8_ = TRUE;
	} else {
		_data_->_tmp8_ = g_file_test (_data_->executable, G_FILE_TEST_IS_EXECUTABLE);
	}
	if (_data_->_tmp8_) {
		_data_->result = _data_->_result_;
		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_->_tmp10_ = _data_->_result_;
	_data_->_tmp11_ = proton_plus_utils_command_result_get_stdout (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_data_->_tmp13_ = proton_plus_utils_command_result_new (_data_->_tmp12_, "The executable permission was not applied.", -1);
	_data_->result = _data_->_tmp13_;
	_g_object_unref0 (_data_->_result_);
	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_services_steam_tinker_launch_workflow_backup_external_installations_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->context);
	_g_object_unref0 (_data_->archive);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_backup_external_installations (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                 ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                                 ProtonPlusServicesArchiveOperation* archive,
                                                                                 GAsyncReadyCallback _callback_,
                                                                                 gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	ProtonPlusServicesArchiveOperation* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (archive != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (context);
	_g_object_unref0 (_data_->context);
	_data_->context = _tmp1_;
	_tmp2_ = _g_object_ref0 (archive);
	_g_object_unref0 (_data_->archive);
	_data_->archive = _tmp2_;
	proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                        GAsyncResult* _res_,
                                                                                        GeeArrayList** backups)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (backups) {
		*backups = _data_->backups;
	} else {
		_g_object_unref0 (_data_->backups);
	}
	_data_->backups = NULL;
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_ready (GObject* source_object,
                                                                                       GAsyncResult* _res_,
                                                                                       gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_co (ProtonPlusServicesSteamTinkerLaunchWorkflowBackupExternalInstallationsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gee_array_list_new (PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_DIRECTORY_BACKUP, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (_data_->backups);
	_data_->backups = _data_->_tmp0_;
	_data_->_tmp1_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->seen = _data_->_tmp1_;
	_data_->_tmp2_ = proton_plus_services_archive_operation_get_staging_root (_data_->archive);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_path_get_basename (_data_->_tmp3_);
	_data_->transaction_id = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->context->external_locations;
	{
		_data_->location_collection = _data_->_tmp5_;
		for (_data_->location_it = _data_->location_collection; _data_->location_it != NULL; _data_->location_it = _data_->location_it->next) {
			_data_->_tmp6_ = g_strdup ((const gchar*) _data_->location_it->data);
			_data_->location = _data_->_tmp6_;
			{
				_data_->_tmp7_ = _data_->location;
				_data_->_tmp8_ = g_canonicalize_filename (_data_->_tmp7_, NULL);
				_data_->canonical = _data_->_tmp8_;
				_data_->_tmp11_ = _data_->seen;
				_data_->_tmp12_ = _data_->canonical;
				if (!gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp11_, _data_->_tmp12_)) {
					_data_->_tmp10_ = TRUE;
				} else {
					_data_->_tmp13_ = _data_->canonical;
					_data_->_tmp14_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
					_data_->_tmp15_ = _data_->_tmp14_;
					_data_->_tmp16_ = g_canonicalize_filename (_data_->_tmp15_, NULL);
					_data_->_tmp17_ = _data_->_tmp16_;
					_data_->_tmp10_ = g_strcmp0 (_data_->_tmp13_, _data_->_tmp17_) == 0;
					_g_free0 (_data_->_tmp17_);
				}
				if (_data_->_tmp10_) {
					_data_->_tmp9_ = TRUE;
				} else {
					_data_->_tmp18_ = _data_->location;
					_data_->_tmp9_ = !g_file_test (_data_->_tmp18_, G_FILE_TEST_EXISTS);
				}
				if (_data_->_tmp9_) {
					_g_free0 (_data_->canonical);
					_g_free0 (_data_->location);
					continue;
				}
				_data_->_tmp19_ = _data_->location;
				_data_->_tmp20_ = g_path_get_dirname (_data_->_tmp19_);
				_data_->_tmp21_ = _data_->_tmp20_;
				_data_->_tmp22_ = _data_->location;
				_data_->_tmp23_ = g_path_get_basename (_data_->_tmp22_);
				_data_->_tmp24_ = _data_->_tmp23_;
				_data_->_tmp25_ = _data_->transaction_id;
				_data_->_tmp26_ = g_strdup_printf (".protonplus-stl-external-%s-%s", _data_->_tmp24_, _data_->_tmp25_);
				_data_->_tmp27_ = _data_->_tmp26_;
				_data_->_tmp28_ = g_build_filename (_data_->_tmp21_, _data_->_tmp27_, NULL);
				_data_->_tmp29_ = _data_->_tmp28_;
				_g_free0 (_data_->_tmp27_);
				_g_free0 (_data_->_tmp24_);
				_g_free0 (_data_->_tmp21_);
				_data_->backup_path = _data_->_tmp29_;
				_data_->_tmp30_ = _data_->location;
				_data_->_tmp31_ = _data_->backup_path;
				_data_->_tmp32_ = proton_plus_services_steam_tinker_launch_directory_backup_new (_data_->_tmp30_, _data_->_tmp31_);
				_data_->backup = _data_->_tmp32_;
				_data_->_tmp33_ = _data_->location;
				_data_->_tmp34_ = _data_->backup_path;
				_data_->_state_ = 1;
				proton_plus_utils_filesystem_move_directory_atomic (_data_->_tmp33_, _data_->_tmp34_, proton_plus_services_steam_tinker_launch_workflow_backup_external_installations_ready, _data_);
				return FALSE;
				_state_1:
				if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
					_data_->result = FALSE;
					_g_object_unref0 (_data_->backup);
					_g_free0 (_data_->backup_path);
					_g_free0 (_data_->canonical);
					_g_free0 (_data_->location);
					_g_free0 (_data_->transaction_id);
					_g_object_unref0 (_data_->seen);
					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_->_tmp35_ = _data_->backups;
				_data_->_tmp36_ = _data_->backup;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp35_, _data_->_tmp36_);
				_g_object_unref0 (_data_->backup);
				_g_free0 (_data_->backup_path);
				_g_free0 (_data_->canonical);
				_g_free0 (_data_->location);
			}
		}
	}
	_data_->result = TRUE;
	_g_free0 (_data_->transaction_id);
	_g_object_unref0 (_data_->seen);
	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_services_steam_tinker_launch_workflow_rollback_transaction_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->context);
	_g_free0 (_data_->previous);
	_g_object_unref0 (_data_->external_backups);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_rollback_transaction (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                        ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                        const gchar* previous,
                                                                        GeeArrayList* external_backups,
                                                                        gboolean link_created,
                                                                        gboolean installation_promoted,
                                                                        gboolean restore_compatibility_registration,
                                                                        GAsyncReadyCallback _callback_,
                                                                        gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gchar* _tmp2_;
	GeeArrayList* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (previous != NULL);
	g_return_if_fail (external_backups != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (context);
	_g_object_unref0 (_data_->context);
	_data_->context = _tmp1_;
	_tmp2_ = g_strdup (previous);
	_g_free0 (_data_->previous);
	_data_->previous = _tmp2_;
	_tmp3_ = _g_object_ref0 (external_backups);
	_g_object_unref0 (_data_->external_backups);
	_data_->external_backups = _tmp3_;
	_data_->link_created = link_created;
	_data_->installation_promoted = installation_promoted;
	_data_->restore_compatibility_registration = restore_compatibility_registration;
	proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                               GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_ready (GObject* source_object,
                                                                              GAsyncResult* _res_,
                                                                              gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackTransactionData* _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:
	_data_->restored = TRUE;
	if (_data_->link_created) {
		_data_->_tmp2_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->context);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp1_ = g_file_test (_data_->_tmp3_, G_FILE_TEST_IS_SYMLINK);
	} else {
		_data_->_tmp1_ = FALSE;
	}
	if (_data_->_tmp1_) {
		_data_->_tmp4_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->context);
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp0_ = !proton_plus_utils_filesystem_delete_file (_data_->_tmp5_);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_tmp6_ = proton_plus_services_steam_tinker_launch_context_get_link_location (_data_->context);
		_data_->_tmp7_ = _data_->_tmp6_;
		g_warning ("steam-tinker-launch-workflow.vala:413: Could not remove the failed Ste" \
"amTinkerLaunch link: %s", _data_->_tmp7_);
		_data_->restored = FALSE;
	}
	_data_->_state_ = 1;
	proton_plus_services_steam_tinker_launch_workflow_rollback_installation (_data_->self, _data_->context, _data_->previous, _data_->installation_promoted, proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_ready, _data_);
	return FALSE;
	_state_1:
	if (!proton_plus_services_steam_tinker_launch_workflow_rollback_installation_finish (_data_->self, _data_->_res_)) {
		_data_->restored = FALSE;
	}
	{
		_data_->_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->external_backups);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->index = _data_->_tmp9_ - 1;
		{
			_data_->_tmp10_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp10_) {
					_data_->_tmp11_ = _data_->index;
					_data_->index = _data_->_tmp11_ - 1;
				}
				_data_->_tmp10_ = FALSE;
				if (!(_data_->index >= 0)) {
					break;
				}
				_data_->_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _data_->external_backups, _data_->index);
				_data_->backup = (ProtonPlusServicesSteamTinkerLaunchDirectoryBackup*) _data_->_tmp12_;
				_data_->_tmp13_ = _data_->backup;
				_data_->_tmp14_ = proton_plus_services_steam_tinker_launch_directory_backup_get_original_path (_data_->_tmp13_);
				_data_->_tmp15_ = _data_->_tmp14_;
				_data_->_tmp16_ = _data_->backup;
				_data_->_tmp17_ = proton_plus_services_steam_tinker_launch_directory_backup_get_backup_path (_data_->_tmp16_);
				_data_->_tmp18_ = _data_->_tmp17_;
				_data_->_state_ = 2;
				proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup (_data_->self, _data_->_tmp15_, _data_->_tmp18_, proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_ready, _data_);
				return FALSE;
				_state_2:
				if (!proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_finish (_data_->self, _data_->_res_)) {
					_data_->restored = FALSE;
				}
				_g_object_unref0 (_data_->backup);
			}
		}
	}
	if (_data_->restore_compatibility_registration) {
		_data_->_state_ = 3;
		proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context (_data_->self, _data_->context, proton_plus_services_steam_tinker_launch_workflow_rollback_transaction_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp19_ = !proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_finish (_data_->self, _data_->_res_);
	} else {
		_data_->_tmp19_ = FALSE;
	}
	if (_data_->_tmp19_) {
		_data_->restored = FALSE;
	}
	if (!_data_->restored) {
		g_warning ("steam-tinker-launch-workflow.vala:427: SteamTinkerLaunch rollback was " \
"incomplete; transaction backups were retained where possible.");
	}
	_data_->result = _data_->restored;
	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_services_steam_tinker_launch_workflow_restore_previous_registration_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                 gboolean compensate_failed_removal,
                                                                                 GAsyncReadyCallback _callback_,
                                                                                 gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->compensate_failed_removal = compensate_failed_removal;
	proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                        GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_ready (GObject* source_object,
                                                                                       GAsyncResult* _res_,
                                                                                       gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	proton_plus_services_steam_tinker_launch_workflow_run_command (_data_->self, "steamtinkerlaunch compat add", proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_run_command_finish (_data_->self, _data_->_res_);
	_data_->_result_ = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->_result_;
	if (proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp1_)) {
		_data_->result = TRUE;
		_g_object_unref0 (_data_->_result_);
		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_->compensate_failed_removal) {
		_data_->_tmp2_ = "compensate a failed compatibility removal";
	} else {
		_data_->_tmp2_ = "restore previous compatibility registration";
	}
	_data_->_tmp3_ = _data_->_result_;
	proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, _data_->_tmp2_, _data_->_tmp3_);
	_data_->result = FALSE;
	_g_object_unref0 (_data_->_result_);
	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_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->context);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                              ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                                              GAsyncReadyCallback _callback_,
                                                                                              gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (context);
	_g_object_unref0 (_data_->context);
	_data_->context = _tmp1_;
	proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                                     GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_ready (GObject* source_object,
                                                                                                    GAsyncResult* _res_,
                                                                                                    gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRestorePreviousRegistrationFromContextData* _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_services_steam_tinker_launch_context_get_binary_location (_data_->context);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (g_file_test (_data_->_tmp1_, G_FILE_TEST_IS_REGULAR)) {
		_data_->_tmp2_ = proton_plus_services_steam_tinker_launch_context_get_binary_location (_data_->context);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_state_ = 1;
		proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (_data_->self, _data_->_tmp3_, "compat add", proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->_result_);
		_data_->_result_ = _data_->_tmp4_;
	} else {
		_data_->_state_ = 2;
		proton_plus_services_steam_tinker_launch_workflow_run_command (_data_->self, "steamtinkerlaunch compat add", proton_plus_services_steam_tinker_launch_workflow_restore_previous_registration_from_context_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp5_ = proton_plus_services_steam_tinker_launch_workflow_run_command_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->_result_);
		_data_->_result_ = _data_->_tmp5_;
	}
	_data_->_tmp6_ = _data_->_result_;
	if (proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp6_)) {
		_data_->result = TRUE;
		_g_object_unref0 (_data_->_result_);
		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_->_tmp7_ = _data_->_result_;
	proton_plus_services_steam_tinker_launch_workflow_report_command_failure (_data_->self, "restore previous compatibility registration", _data_->_tmp7_);
	_data_->result = FALSE;
	_g_object_unref0 (_data_->_result_);
	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_services_steam_tinker_launch_workflow_restore_directory_backup_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData* _data_;
	_data_ = _data;
	_g_free0 (_data_->original);
	_g_free0 (_data_->backup);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                            const gchar* original,
                                                                            const gchar* backup,
                                                                            GAsyncReadyCallback _callback_,
                                                                            gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (original != NULL);
	g_return_if_fail (backup != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (original);
	_g_free0 (_data_->original);
	_data_->original = _tmp1_;
	_tmp2_ = g_strdup (backup);
	_g_free0 (_data_->backup);
	_data_->backup = _tmp2_;
	proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                   GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready (GObject* source_object,
                                                                                  GAsyncResult* _res_,
                                                                                  gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRestoreDirectoryBackupData* _data_)
{
	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 (!g_file_test (_data_->backup, G_FILE_TEST_EXISTS)) {
		_data_->result = g_file_test (_data_->original, G_FILE_TEST_EXISTS);
		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 (!g_file_test (_data_->original, G_FILE_TEST_EXISTS)) {
		_data_->_state_ = 1;
		proton_plus_utils_filesystem_move_directory_atomic (_data_->backup, _data_->original, proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready, _data_);
		return FALSE;
		_state_1:
		_data_->result = proton_plus_utils_filesystem_move_directory_atomic_finish (_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_->_tmp0_ = g_strdup_printf ("%s.failed", _data_->backup);
	_data_->failed = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->failed;
	_data_->_state_ = 2;
	proton_plus_utils_filesystem_move_directory_atomic (_data_->original, _data_->_tmp1_, proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready, _data_);
	return FALSE;
	_state_2:
	if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
		_data_->result = FALSE;
		_g_free0 (_data_->failed);
		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_ = 3;
	proton_plus_utils_filesystem_move_directory_atomic (_data_->backup, _data_->original, proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready, _data_);
	return FALSE;
	_state_3:
	if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
		_data_->_tmp2_ = _data_->failed;
		_data_->_state_ = 4;
		proton_plus_utils_filesystem_move_directory_atomic (_data_->_tmp2_, _data_->original, proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready, _data_);
		return FALSE;
		_state_4:
		proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_);
		_data_->result = FALSE;
		_g_free0 (_data_->failed);
		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_->failed;
	_data_->_state_ = 5;
	proton_plus_utils_filesystem_delete_directory (_data_->_tmp3_, proton_plus_services_steam_tinker_launch_workflow_restore_directory_backup_ready, _data_);
	return FALSE;
	_state_5:
	if (!proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_)) {
		_data_->_tmp4_ = _data_->failed;
		g_warning ("steam-tinker-launch-workflow.vala:468: Could not remove the failed Ste" \
"amTinkerLaunch directory: %s", _data_->_tmp4_);
	}
	_data_->result = TRUE;
	_g_free0 (_data_->failed);
	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_services_steam_tinker_launch_workflow_rollback_installation_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->context);
	_g_free0 (_data_->previous);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_rollback_installation (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                         ProtonPlusServicesSteamTinkerLaunchContext* context,
                                                                         const gchar* previous,
                                                                         gboolean installation_promoted,
                                                                         GAsyncReadyCallback _callback_,
                                                                         gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	ProtonPlusServicesSteamTinkerLaunchContext* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	g_return_if_fail (previous != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (context);
	_g_object_unref0 (_data_->context);
	_data_->context = _tmp1_;
	_tmp2_ = g_strdup (previous);
	_g_free0 (_data_->previous);
	_data_->previous = _tmp2_;
	_data_->installation_promoted = installation_promoted;
	proton_plus_services_steam_tinker_launch_workflow_rollback_installation_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_rollback_installation_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready (GObject* source_object,
                                                                               GAsyncResult* _res_,
                                                                               gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_rollback_installation_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_rollback_installation_co (ProtonPlusServicesSteamTinkerLaunchWorkflowRollbackInstallationData* _data_)
{
	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;
		case 6:
		goto _state_6;
		case 7:
		goto _state_7;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (!_data_->installation_promoted) {
		if (g_strcmp0 (_data_->previous, "") == 0) {
			_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;
		}
		_data_->_tmp0_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
		_data_->_tmp1_ = _data_->_tmp0_;
		if (g_file_test (_data_->_tmp1_, G_FILE_TEST_EXISTS)) {
			_data_->result = !g_file_test (_data_->previous, G_FILE_TEST_EXISTS);
			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_->_tmp2_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_state_ = 1;
		proton_plus_utils_filesystem_move_directory_atomic (_data_->previous, _data_->_tmp3_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
		return FALSE;
		_state_1:
		_data_->result = proton_plus_utils_filesystem_move_directory_atomic_finish (_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;
	}
	if (g_strcmp0 (_data_->previous, "") == 0) {
		_data_->_tmp4_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
		_data_->_tmp5_ = _data_->_tmp4_;
		if (g_file_test (_data_->_tmp5_, G_FILE_TEST_IS_DIR)) {
			_data_->_tmp6_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
			_data_->_tmp7_ = _data_->_tmp6_;
			_data_->_state_ = 2;
			proton_plus_utils_filesystem_delete_directory (_data_->_tmp7_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
			return FALSE;
			_state_2:
			_data_->result = proton_plus_utils_filesystem_delete_directory_finish (_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_->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;
	}
	_data_->_tmp8_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
	_data_->_tmp9_ = _data_->_tmp8_;
	if (!g_file_test (_data_->_tmp9_, G_FILE_TEST_EXISTS)) {
		_data_->_tmp10_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
		_data_->_tmp11_ = _data_->_tmp10_;
		_data_->_state_ = 3;
		proton_plus_utils_filesystem_move_directory_atomic (_data_->previous, _data_->_tmp11_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
		return FALSE;
		_state_3:
		_data_->result = proton_plus_utils_filesystem_move_directory_atomic_finish (_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_->_tmp12_ = g_strdup_printf ("%s.failed", _data_->previous);
	_data_->failed = _data_->_tmp12_;
	_data_->_tmp13_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = _data_->failed;
	_data_->_state_ = 4;
	proton_plus_utils_filesystem_move_directory_atomic (_data_->_tmp14_, _data_->_tmp15_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
	return FALSE;
	_state_4:
	if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
		_data_->result = FALSE;
		_g_free0 (_data_->failed);
		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_->_tmp16_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
	_data_->_tmp17_ = _data_->_tmp16_;
	_data_->_state_ = 5;
	proton_plus_utils_filesystem_move_directory_atomic (_data_->previous, _data_->_tmp17_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
	return FALSE;
	_state_5:
	if (!proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_)) {
		_data_->_tmp18_ = _data_->failed;
		_data_->_tmp19_ = proton_plus_services_steam_tinker_launch_context_get_base_location (_data_->context);
		_data_->_tmp20_ = _data_->_tmp19_;
		_data_->_state_ = 6;
		proton_plus_utils_filesystem_move_directory_atomic (_data_->_tmp18_, _data_->_tmp20_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
		return FALSE;
		_state_6:
		proton_plus_utils_filesystem_move_directory_atomic_finish (_data_->_res_);
		_data_->result = FALSE;
		_g_free0 (_data_->failed);
		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_->_tmp21_ = _data_->failed;
	_data_->_state_ = 7;
	proton_plus_utils_filesystem_delete_directory (_data_->_tmp21_, proton_plus_services_steam_tinker_launch_workflow_rollback_installation_ready, _data_);
	return FALSE;
	_state_7:
	if (!proton_plus_utils_filesystem_delete_directory_finish (_data_->_res_)) {
		_data_->_tmp22_ = _data_->failed;
		g_warning ("steam-tinker-launch-workflow.vala:499: Could not remove the failed Ste" \
"amTinkerLaunch installation: %s", _data_->_tmp22_);
	}
	_data_->result = TRUE;
	_g_free0 (_data_->failed);
	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_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_data_free (gpointer _data)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData* _data_;
	_data_ = _data;
	_g_free0 (_data_->executable);
	_g_free0 (_data_->args);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData, _data_);
}

static void
proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                               const gchar* executable,
                                                                               const gchar* args,
                                                                               GAsyncReadyCallback _callback_,
                                                                               gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData* _data_;
	ProtonPlusServicesSteamTinkerLaunchWorkflow* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (executable != NULL);
	g_return_if_fail (args != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (executable);
	_g_free0 (_data_->executable);
	_data_->executable = _tmp1_;
	_tmp2_ = g_strdup (args);
	_g_free0 (_data_->args);
	_data_->args = _tmp2_;
	proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_co (_data_);
}

static ProtonPlusUtilsCommandResult*
proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_finish (ProtonPlusServicesSteamTinkerLaunchWorkflow* self,
                                                                                      GAsyncResult* _res_)
{
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_ready (GObject* source_object,
                                                                                     GAsyncResult* _res_,
                                                                                     gpointer _user_data_)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_co (_data_);
}

static gboolean
proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_co (ProtonPlusServicesSteamTinkerLaunchWorkflowExecuteSteamTinkerLaunchData* _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_->_state_ = 1;
	proton_plus_services_steam_tinker_launch_workflow_prepare_executable (_data_->self, _data_->executable, proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = proton_plus_services_steam_tinker_launch_workflow_prepare_executable_finish (_data_->self, _data_->_res_);
	_data_->preparation = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->preparation;
	if (!proton_plus_services_steam_tinker_launch_workflow_command_succeeded (_data_->self, _data_->_tmp1_)) {
		_data_->result = _data_->preparation;
		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_->_tmp2_ = g_shell_quote (_data_->executable);
	_data_->quoted = _data_->_tmp2_;
	if (g_strcmp0 (_data_->args, "") == 0) {
		_data_->_tmp4_ = _data_->quoted;
		_data_->_tmp5_ = g_strdup (_data_->_tmp4_);
		_g_free0 (_data_->_tmp3_);
		_data_->_tmp3_ = _data_->_tmp5_;
	} else {
		_data_->_tmp6_ = _data_->quoted;
		_data_->_tmp7_ = g_strdup_printf ("%s %s", _data_->_tmp6_, _data_->args);
		_g_free0 (_data_->_tmp3_);
		_data_->_tmp3_ = _data_->_tmp7_;
	}
	_data_->_state_ = 2;
	proton_plus_services_steam_tinker_launch_workflow_run_command (_data_->self, _data_->_tmp3_, proton_plus_services_steam_tinker_launch_workflow_execute_steam_tinker_launch_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp8_ = proton_plus_services_steam_tinker_launch_workflow_run_command_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp8_;
	_g_free0 (_data_->_tmp3_);
	_g_free0 (_data_->quoted);
	_g_object_unref0 (_data_->preparation);
	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;
}

ProtonPlusServicesSteamTinkerLaunchWorkflow*
proton_plus_services_steam_tinker_launch_workflow_construct (GType object_type)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self = NULL;
	self = (ProtonPlusServicesSteamTinkerLaunchWorkflow*) proton_plus_services_installation_workflow_construct (object_type);
	return self;
}

ProtonPlusServicesSteamTinkerLaunchWorkflow*
proton_plus_services_steam_tinker_launch_workflow_new (void)
{
	return proton_plus_services_steam_tinker_launch_workflow_construct (PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_WORKFLOW);
}

static void
proton_plus_services_steam_tinker_launch_workflow_class_init (ProtonPlusServicesSteamTinkerLaunchWorkflowClass * klass,
                                                              gpointer klass_data)
{
	proton_plus_services_steam_tinker_launch_workflow_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesSteamTinkerLaunchWorkflow_private_offset);
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->validate_install = (ProtonPlusReturnCode (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*, gboolean)) proton_plus_services_steam_tinker_launch_workflow_real_validate_install;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->install = (void (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*, gboolean, GAsyncReadyCallback, gpointer)) proton_plus_services_steam_tinker_launch_workflow_real_install;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->install_finish = (ProtonPlusReturnCode (*) (ProtonPlusServicesInstallationWorkflow*, GAsyncResult*)) proton_plus_services_steam_tinker_launch_workflow_install_finish;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->update = (void (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*, ProtonPlusServicesInstallationOperationCoordinator*, GAsyncReadyCallback, gpointer)) proton_plus_services_steam_tinker_launch_workflow_real_update;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->update_finish = (ProtonPlusReturnCode (*) (ProtonPlusServicesInstallationWorkflow*, GAsyncResult*)) proton_plus_services_steam_tinker_launch_workflow_update_finish;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->remove = (void (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*, GAsyncReadyCallback, gpointer)) proton_plus_services_steam_tinker_launch_workflow_real_remove;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->remove_finish = (ProtonPlusReturnCode (*) (ProtonPlusServicesInstallationWorkflow*, GAsyncResult*)) proton_plus_services_steam_tinker_launch_workflow_remove_finish;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->refresh_state = (void (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*)) proton_plus_services_steam_tinker_launch_workflow_real_refresh_state;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->finalize_install_success = (void (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*)) proton_plus_services_steam_tinker_launch_workflow_real_finalize_install_success;
	((ProtonPlusServicesInstallationWorkflowClass *) klass)->finalize_removal_success = (void (*) (ProtonPlusServicesInstallationWorkflow*, ProtonPlusServicesInstallJob*)) proton_plus_services_steam_tinker_launch_workflow_real_finalize_removal_success;
	((ProtonPlusServicesSteamTinkerLaunchWorkflowClass *) klass)->run_command = (void (*) (ProtonPlusServicesSteamTinkerLaunchWorkflow*, const gchar*, GAsyncReadyCallback, gpointer)) proton_plus_services_steam_tinker_launch_workflow_real_run_command;
	((ProtonPlusServicesSteamTinkerLaunchWorkflowClass *) klass)->run_command_finish = (ProtonPlusUtilsCommandResult* (*) (ProtonPlusServicesSteamTinkerLaunchWorkflow*, GAsyncResult*)) proton_plus_services_steam_tinker_launch_workflow_real_run_command_finish;
	((ProtonPlusServicesSteamTinkerLaunchWorkflowClass *) klass)->system_installation_available = (void (*) (ProtonPlusServicesSteamTinkerLaunchWorkflow*, GAsyncReadyCallback, gpointer)) proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available;
	((ProtonPlusServicesSteamTinkerLaunchWorkflowClass *) klass)->system_installation_available_finish = (gboolean (*) (ProtonPlusServicesSteamTinkerLaunchWorkflow*, GAsyncResult*)) proton_plus_services_steam_tinker_launch_workflow_real_system_installation_available_finish;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_steam_tinker_launch_workflow_finalize;
}

static void
proton_plus_services_steam_tinker_launch_workflow_instance_init (ProtonPlusServicesSteamTinkerLaunchWorkflow * self,
                                                                 gpointer klass)
{
	ProtonPlusServicesArchiveWorkflowSupport* _tmp0_;
	self->priv = proton_plus_services_steam_tinker_launch_workflow_get_instance_private (self);
	_tmp0_ = proton_plus_services_archive_workflow_support_new ();
	self->priv->archive_support = _tmp0_;
}

static void
proton_plus_services_steam_tinker_launch_workflow_finalize (GObject * obj)
{
	ProtonPlusServicesSteamTinkerLaunchWorkflow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_STEAM_TINKER_LAUNCH_WORKFLOW, ProtonPlusServicesSteamTinkerLaunchWorkflow);
	_g_object_unref0 (self->priv->archive_support);
	G_OBJECT_CLASS (proton_plus_services_steam_tinker_launch_workflow_parent_class)->finalize (obj);
}

static GType
proton_plus_services_steam_tinker_launch_workflow_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesSteamTinkerLaunchWorkflowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_steam_tinker_launch_workflow_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesSteamTinkerLaunchWorkflow), 0, (GInstanceInitFunc) proton_plus_services_steam_tinker_launch_workflow_instance_init, NULL };
	GType proton_plus_services_steam_tinker_launch_workflow_type_id;
	proton_plus_services_steam_tinker_launch_workflow_type_id = g_type_register_static (PROTON_PLUS_SERVICES_TYPE_INSTALLATION_WORKFLOW, "ProtonPlusServicesSteamTinkerLaunchWorkflow", &g_define_type_info, 0);
	ProtonPlusServicesSteamTinkerLaunchWorkflow_private_offset = g_type_add_instance_private (proton_plus_services_steam_tinker_launch_workflow_type_id, sizeof (ProtonPlusServicesSteamTinkerLaunchWorkflowPrivate));
	return proton_plus_services_steam_tinker_launch_workflow_type_id;
}

GType
proton_plus_services_steam_tinker_launch_workflow_get_type (void)
{
	static volatile gsize proton_plus_services_steam_tinker_launch_workflow_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_steam_tinker_launch_workflow_type_id__once)) {
		GType proton_plus_services_steam_tinker_launch_workflow_type_id;
		proton_plus_services_steam_tinker_launch_workflow_type_id = proton_plus_services_steam_tinker_launch_workflow_get_type_once ();
		g_once_init_leave (&proton_plus_services_steam_tinker_launch_workflow_type_id__once, proton_plus_services_steam_tinker_launch_workflow_type_id);
	}
	return proton_plus_services_steam_tinker_launch_workflow_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

