/* steam-restart-backend.c generated by valac 0.56.19, the Vala compiler
 * generated from steam-restart-backend.vala, do not modify */

#include "protonplus_core.h"
#include <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <unistd.h>
#include <sys/types.h>
#include <glib/gstdio.h>
#include <gio/gdesktopappinfo.h>

#define PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_NATIVE_STEAM_EXECUTABLE "/usr/bin/steam"
#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

enum  {
	PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_0_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_STATUS_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_ARGV_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_DIAGNOSTIC_PROPERTY,
	PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_PROCESS_FACTORY_0_PROPERTY,
	PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_PROCESS_FACTORY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_host_steam_restart_process_factory_properties[PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_PROCESS_FACTORY_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_0_PROPERTY,
	PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_host_steam_restart_backend_properties[PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_NUM_PROPERTIES];
typedef struct _ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData;
typedef struct _ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData;
typedef struct _ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData;
typedef struct _Block45Data Block45Data;
typedef struct _ProtonPlusServicesHostSteamRestartBackendDelayData ProtonPlusServicesHostSteamRestartBackendDelayData;
typedef struct _ProtonPlusServicesHostSteamRestartBackendSpawnData ProtonPlusServicesHostSteamRestartBackendSpawnData;
typedef struct _ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData;

struct _ProtonPlusServicesSteamRestartCommandResultPrivate {
	ProtonPlusServicesSteamRestartCommandStatus _status;
	GeeList* _argv;
	gchar* _diagnostic;
};

struct _ProtonPlusServicesHostSteamRestartBackendPrivate {
	ProtonPlusServicesSteamRestartProcessFactory* process_factory;
};

struct _ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	gboolean through_flatpak_host;
	GCancellable* cancellable;
	ProtonPlusServicesSteamRestartCommandResult* result;
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp2_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp3_;
};

struct _ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	gboolean through_flatpak_host;
	GCancellable* cancellable;
	ProtonPlusServicesSteamRestartCommandResult* result;
	GeeArrayList* argv;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	GeeArrayList* _tmp4_;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp8_;
};

struct _ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	gchar* desktop_id;
	GCancellable* cancellable;
	ProtonPlusServicesSteamRestartCommandResult* result;
	gboolean _tmp0_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp1_;
	GAppInfo* selected;
	GList* _tmp2_;
	GList* app_collection;
	GList* app_it;
	GAppInfo* _tmp3_;
	GAppInfo* app;
	GAppInfo* _tmp4_;
	const gchar* _tmp5_;
	GAppInfo* _tmp6_;
	GAppInfo* _tmp7_;
	GAppInfo* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp11_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp12_;
	GDesktopAppInfo* desktop;
	GAppInfo* _tmp13_;
	GDesktopAppInfo* _tmp14_;
	GDesktopAppInfo* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp18_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp19_;
	GList* uris;
	GDesktopAppInfo* _tmp20_;
	GList* _tmp21_;
	GeeArrayList* argv;
	GeeArrayList* _tmp22_;
	GeeArrayList* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GeeArrayList* _tmp26_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp27_;
	GError* e;
	GError* _tmp28_;
	const gchar* _tmp29_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp30_;
	GError* _inner_error0_;
};

struct _ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	GCancellable* cancellable;
	ProtonPlusServicesSteamRestartCommandResult* result;
	GeeArrayList* argv;
	GeeArrayList* _tmp0_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp1_;
};

struct _Block45Data {
	int _ref_count_;
	ProtonPlusServicesHostSteamRestartBackend* self;
	guint source_id;
	gulong cancellation_handler_id;
	GCancellable* cancellable;
	gpointer _async_data_;
};

struct _ProtonPlusServicesHostSteamRestartBackendDelayData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	guint milliseconds;
	GCancellable* cancellable;
	gboolean result;
	Block45Data* _data45_;
	gboolean _tmp0_;
	gboolean _tmp1_;
	gulong _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
};

struct _ProtonPlusServicesHostSteamRestartBackendSpawnData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	GeeList* argv;
	GCancellable* cancellable;
	ProtonPlusServicesSteamRestartCommandResult* result;
	gboolean _tmp0_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp1_;
	gchar** values;
	gint _tmp2_;
	gint _tmp3_;
	gchar** _tmp4_;
	gint values_length1;
	gint _values_size_;
	gint i;
	gboolean _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gpointer _tmp10_;
	GSubprocess* subprocess;
	gchar** _tmp11_;
	gint _tmp11__length1;
	GSubprocess* _tmp12_;
	GSubprocess* _tmp13_;
	gboolean _tmp14_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp15_;
	GSubprocess* _tmp16_;
	GSubprocess* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp20_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp21_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp22_;
	GError* e;
	GError* _tmp23_;
	const gchar* _tmp24_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp25_;
	GError* _inner_error0_;
};

struct _ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostSteamRestartBackend* self;
	GeeList* argv;
	GCancellable* cancellable;
	ProtonPlusServicesSteamRestartCommandResult* result;
	gboolean _tmp0_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp1_;
	gchar** values;
	gint _tmp2_;
	gint _tmp3_;
	gchar** _tmp4_;
	gint values_length1;
	gint _values_size_;
	gint i;
	gboolean _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gpointer _tmp10_;
	ProtonPlusServicesSteamRestartProcessFactory* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	GSubprocess* _tmp13_;
	GSubprocess* _tmp14_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp15_;
	GError* e;
	GError* _tmp16_;
	const gchar* _tmp17_;
	ProtonPlusServicesSteamRestartCommandResult* _tmp18_;
	GError* _inner_error0_;
};

static gint ProtonPlusServicesSteamRestartCommandResult_private_offset;
static gpointer proton_plus_services_steam_restart_command_result_parent_class = NULL;
static gpointer proton_plus_services_host_steam_restart_process_factory_parent_class = NULL;
static ProtonPlusServicesSteamRestartProcessFactoryIface * proton_plus_services_host_steam_restart_process_factory_proton_plus_services_steam_restart_process_factory_parent_iface = NULL;
static gint ProtonPlusServicesHostSteamRestartBackend_private_offset;
static gpointer proton_plus_services_host_steam_restart_backend_parent_class = NULL;
static ProtonPlusServicesSteamRestartBackendIface * proton_plus_services_host_steam_restart_backend_proton_plus_services_steam_restart_backend_parent_iface = NULL;

static void proton_plus_services_steam_restart_command_result_set_status (ProtonPlusServicesSteamRestartCommandResult* self,
                                                                   ProtonPlusServicesSteamRestartCommandStatus value);
static void proton_plus_services_steam_restart_command_result_set_argv (ProtonPlusServicesSteamRestartCommandResult* self,
                                                                 GeeList* value);
static void proton_plus_services_steam_restart_command_result_set_diagnostic (ProtonPlusServicesSteamRestartCommandResult* self,
                                                                       const gchar* value);
static void proton_plus_services_steam_restart_command_result_finalize (GObject * obj);
static GType proton_plus_services_steam_restart_command_result_get_type_once (void);
static void _vala_proton_plus_services_steam_restart_command_result_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_proton_plus_services_steam_restart_command_result_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
static GType proton_plus_services_steam_restart_backend_get_type_once (void);
static GType proton_plus_services_steam_restart_process_factory_get_type_once (void);
static GSubprocess* proton_plus_services_host_steam_restart_process_factory_real_spawn_detached (ProtonPlusServicesSteamRestartProcessFactory* base,
                                                                                          gchar** argv,
                                                                                          gint argv_length1,
                                                                                          GError** error);
static void proton_plus_services_host_steam_restart_process_factory_detach_child_session (void);
static void _proton_plus_services_host_steam_restart_process_factory_detach_child_session_gspawn_child_setup_func (gpointer self);
static GType proton_plus_services_host_steam_restart_process_factory_get_type_once (void);
static gboolean proton_plus_services_host_steam_restart_backend_real_has_desktop_application (ProtonPlusServicesSteamRestartBackend* base,
                                                                                       const gchar* desktop_id);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static gboolean proton_plus_services_host_steam_restart_backend_real_has_native_fallback (ProtonPlusServicesSteamRestartBackend* base);
static void proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_data_free (gpointer _data);
static void proton_plus_services_host_steam_restart_backend_real_request_native_shutdown (ProtonPlusServicesSteamRestartBackend* base,
                                                                                   gboolean through_flatpak_host,
                                                                                   GCancellable* cancellable,
                                                                                   GAsyncReadyCallback _callback_,
                                                                                   gpointer _user_data_);
static gboolean proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_co (ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData* _data_);
static void proton_plus_services_host_steam_restart_backend_spawn (ProtonPlusServicesHostSteamRestartBackend* self,
                                                            GeeList* argv,
                                                            GCancellable* cancellable,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
static ProtonPlusServicesSteamRestartCommandResult* proton_plus_services_host_steam_restart_backend_spawn_finish (ProtonPlusServicesHostSteamRestartBackend* self,
                                                                                                           GAsyncResult* _res_);
static void proton_plus_services_host_steam_restart_backend_request_native_shutdown_ready (GObject* source_object,
                                                                                    GAsyncResult* _res_,
                                                                                    gpointer _user_data_);
static void proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_data_free (gpointer _data);
static void proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown (ProtonPlusServicesSteamRestartBackend* base,
                                                                                    gboolean through_flatpak_host,
                                                                                    GCancellable* cancellable,
                                                                                    GAsyncReadyCallback _callback_,
                                                                                    gpointer _user_data_);
static gboolean proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_co (ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData* _data_);
static void proton_plus_services_host_steam_restart_backend_request_flatpak_shutdown_ready (GObject* source_object,
                                                                                     GAsyncResult* _res_,
                                                                                     gpointer _user_data_);
static void proton_plus_services_host_steam_restart_backend_real_launch_desktop_application_data_free (gpointer _data);
static void proton_plus_services_host_steam_restart_backend_real_launch_desktop_application (ProtonPlusServicesSteamRestartBackend* base,
                                                                                      const gchar* desktop_id,
                                                                                      GCancellable* cancellable,
                                                                                      GAsyncReadyCallback _callback_,
                                                                                      gpointer _user_data_);
static gboolean proton_plus_services_host_steam_restart_backend_real_launch_desktop_application_co (ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData* _data_);
static void proton_plus_services_host_steam_restart_backend_detach_child_session (void);
static void _proton_plus_services_host_steam_restart_backend_detach_child_session_gspawn_child_setup_func (gpointer self);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
static void proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_data_free (gpointer _data);
static void proton_plus_services_host_steam_restart_backend_real_launch_native_fallback (ProtonPlusServicesSteamRestartBackend* base,
                                                                                  GCancellable* cancellable,
                                                                                  GAsyncReadyCallback _callback_,
                                                                                  gpointer _user_data_);
static gboolean proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_co (ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData* _data_);
static void proton_plus_services_host_steam_restart_backend_spawn_detached (ProtonPlusServicesHostSteamRestartBackend* self,
                                                                     GeeList* argv,
                                                                     GCancellable* cancellable,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static ProtonPlusServicesSteamRestartCommandResult* proton_plus_services_host_steam_restart_backend_spawn_detached_finish (ProtonPlusServicesHostSteamRestartBackend* self,
                                                                                                                    GAsyncResult* _res_);
static void proton_plus_services_host_steam_restart_backend_launch_native_fallback_ready (GObject* source_object,
                                                                                   GAsyncResult* _res_,
                                                                                   gpointer _user_data_);
static void proton_plus_services_host_steam_restart_backend_real_delay_data_free (gpointer _data);
static void proton_plus_services_host_steam_restart_backend_real_delay (ProtonPlusServicesSteamRestartBackend* base,
                                                                 guint milliseconds,
                                                                 GCancellable* cancellable,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static gboolean proton_plus_services_host_steam_restart_backend_real_delay_co (ProtonPlusServicesHostSteamRestartBackendDelayData* _data_);
static Block45Data* block45_data_ref (Block45Data* _data45_);
static void block45_data_unref (void * _userdata_);
static gboolean __lambda289_ (Block45Data* _data45_);
static gboolean ___lambda289__gsource_func (gpointer self);
static void ___lambda290_ (Block45Data* _data45_);
static void ____lambda290__g_cancellable_cancelled (GCancellable* _sender,
                                             gpointer self);
static void proton_plus_services_host_steam_restart_backend_spawn_data_free (gpointer _data);
static gboolean proton_plus_services_host_steam_restart_backend_spawn_co (ProtonPlusServicesHostSteamRestartBackendSpawnData* _data_);
static void proton_plus_services_host_steam_restart_backend_spawn_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_);
static void proton_plus_services_host_steam_restart_backend_spawn_detached_data_free (gpointer _data);
static gboolean proton_plus_services_host_steam_restart_backend_spawn_detached_co (ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData* _data_);
static void proton_plus_services_host_steam_restart_backend_finalize (GObject * obj);
static GType proton_plus_services_host_steam_restart_backend_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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GType
proton_plus_services_steam_restart_command_status_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_ACCEPTED, "PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_ACCEPTED", "accepted"}, {PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_UNAVAILABLE, "PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_UNAVAILABLE", "unavailable"}, {PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_FAILED, "PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_FAILED", "failed"}, {PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_CANCELLED, "PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_CANCELLED", "cancelled"}, {0, NULL, NULL}};
	GType proton_plus_services_steam_restart_command_status_type_id;
	proton_plus_services_steam_restart_command_status_type_id = g_enum_register_static ("ProtonPlusServicesSteamRestartCommandStatus", values);
	return proton_plus_services_steam_restart_command_status_type_id;
}

GType
proton_plus_services_steam_restart_command_status_get_type (void)
{
	static volatile gsize proton_plus_services_steam_restart_command_status_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_steam_restart_command_status_type_id__once)) {
		GType proton_plus_services_steam_restart_command_status_type_id;
		proton_plus_services_steam_restart_command_status_type_id = proton_plus_services_steam_restart_command_status_get_type_once ();
		g_once_init_leave (&proton_plus_services_steam_restart_command_status_type_id__once, proton_plus_services_steam_restart_command_status_type_id);
	}
	return proton_plus_services_steam_restart_command_status_type_id__once;
}

static inline gpointer
proton_plus_services_steam_restart_command_result_get_instance_private (ProtonPlusServicesSteamRestartCommandResult* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesSteamRestartCommandResult_private_offset);
}

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

ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_steam_restart_command_result_construct (GType object_type,
                                                             ProtonPlusServicesSteamRestartCommandStatus status,
                                                             GeeList* argv,
                                                             const gchar* diagnostic)
{
	ProtonPlusServicesSteamRestartCommandResult * self = NULL;
	GeeList* _tmp0_ = NULL;
	GeeList* _tmp1_;
	g_return_val_if_fail (diagnostic != NULL, NULL);
	self = (ProtonPlusServicesSteamRestartCommandResult*) g_object_new (object_type, NULL);
	proton_plus_services_steam_restart_command_result_set_status (self, status);
	_tmp1_ = _g_object_ref0 (argv);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		GeeArrayList* _tmp2_;
		_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (GeeList*) _tmp2_;
	}
	proton_plus_services_steam_restart_command_result_set_argv (self, _tmp0_);
	proton_plus_services_steam_restart_command_result_set_diagnostic (self, diagnostic);
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_steam_restart_command_result_new (ProtonPlusServicesSteamRestartCommandStatus status,
                                                       GeeList* argv,
                                                       const gchar* diagnostic)
{
	return proton_plus_services_steam_restart_command_result_construct (PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_COMMAND_RESULT, status, argv, diagnostic);
}

ProtonPlusServicesSteamRestartCommandStatus
proton_plus_services_steam_restart_command_result_get_status (ProtonPlusServicesSteamRestartCommandResult* self)
{
	ProtonPlusServicesSteamRestartCommandStatus result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_status;
	return result;
}

static void
proton_plus_services_steam_restart_command_result_set_status (ProtonPlusServicesSteamRestartCommandResult* self,
                                                              ProtonPlusServicesSteamRestartCommandStatus value)
{
	ProtonPlusServicesSteamRestartCommandStatus old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_steam_restart_command_result_get_status (self);
	if (old_value != value) {
		self->priv->_status = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_STATUS_PROPERTY]);
	}
}

GeeList*
proton_plus_services_steam_restart_command_result_get_argv (ProtonPlusServicesSteamRestartCommandResult* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_argv;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_steam_restart_command_result_set_argv (ProtonPlusServicesSteamRestartCommandResult* self,
                                                            GeeList* value)
{
	GeeList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_steam_restart_command_result_get_argv (self);
	if (old_value != value) {
		GeeList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_argv);
		self->priv->_argv = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_ARGV_PROPERTY]);
	}
}

const gchar*
proton_plus_services_steam_restart_command_result_get_diagnostic (ProtonPlusServicesSteamRestartCommandResult* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_diagnostic;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_steam_restart_command_result_set_diagnostic (ProtonPlusServicesSteamRestartCommandResult* self,
                                                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_steam_restart_command_result_get_diagnostic (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_diagnostic);
		self->priv->_diagnostic = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_DIAGNOSTIC_PROPERTY]);
	}
}

static void
proton_plus_services_steam_restart_command_result_class_init (ProtonPlusServicesSteamRestartCommandResultClass * klass,
                                                              gpointer klass_data)
{
	proton_plus_services_steam_restart_command_result_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesSteamRestartCommandResult_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_services_steam_restart_command_result_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_services_steam_restart_command_result_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_steam_restart_command_result_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_STATUS_PROPERTY, proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_STATUS_PROPERTY] = g_param_spec_enum ("status", "status", "status", PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_COMMAND_STATUS, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_ARGV_PROPERTY, proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_ARGV_PROPERTY] = g_param_spec_object ("argv", "argv", "argv", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_DIAGNOSTIC_PROPERTY, proton_plus_services_steam_restart_command_result_properties[PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_DIAGNOSTIC_PROPERTY] = g_param_spec_string ("diagnostic", "diagnostic", "diagnostic", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_services_steam_restart_command_result_instance_init (ProtonPlusServicesSteamRestartCommandResult * self,
                                                                 gpointer klass)
{
	self->priv = proton_plus_services_steam_restart_command_result_get_instance_private (self);
}

static void
proton_plus_services_steam_restart_command_result_finalize (GObject * obj)
{
	ProtonPlusServicesSteamRestartCommandResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_COMMAND_RESULT, ProtonPlusServicesSteamRestartCommandResult);
	_g_object_unref0 (self->priv->_argv);
	_g_free0 (self->priv->_diagnostic);
	G_OBJECT_CLASS (proton_plus_services_steam_restart_command_result_parent_class)->finalize (obj);
}

static GType
proton_plus_services_steam_restart_command_result_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesSteamRestartCommandResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_steam_restart_command_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesSteamRestartCommandResult), 0, (GInstanceInitFunc) proton_plus_services_steam_restart_command_result_instance_init, NULL };
	GType proton_plus_services_steam_restart_command_result_type_id;
	proton_plus_services_steam_restart_command_result_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesSteamRestartCommandResult", &g_define_type_info, 0);
	ProtonPlusServicesSteamRestartCommandResult_private_offset = g_type_add_instance_private (proton_plus_services_steam_restart_command_result_type_id, sizeof (ProtonPlusServicesSteamRestartCommandResultPrivate));
	return proton_plus_services_steam_restart_command_result_type_id;
}

GType
proton_plus_services_steam_restart_command_result_get_type (void)
{
	static volatile gsize proton_plus_services_steam_restart_command_result_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_steam_restart_command_result_type_id__once)) {
		GType proton_plus_services_steam_restart_command_result_type_id;
		proton_plus_services_steam_restart_command_result_type_id = proton_plus_services_steam_restart_command_result_get_type_once ();
		g_once_init_leave (&proton_plus_services_steam_restart_command_result_type_id__once, proton_plus_services_steam_restart_command_result_type_id);
	}
	return proton_plus_services_steam_restart_command_result_type_id__once;
}

static void
_vala_proton_plus_services_steam_restart_command_result_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	ProtonPlusServicesSteamRestartCommandResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_COMMAND_RESULT, ProtonPlusServicesSteamRestartCommandResult);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_STATUS_PROPERTY:
		g_value_set_enum (value, proton_plus_services_steam_restart_command_result_get_status (self));
		break;
		case PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_ARGV_PROPERTY:
		g_value_set_object (value, proton_plus_services_steam_restart_command_result_get_argv (self));
		break;
		case PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_DIAGNOSTIC_PROPERTY:
		g_value_set_string (value, proton_plus_services_steam_restart_command_result_get_diagnostic (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_services_steam_restart_command_result_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	ProtonPlusServicesSteamRestartCommandResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_COMMAND_RESULT, ProtonPlusServicesSteamRestartCommandResult);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_STATUS_PROPERTY:
		proton_plus_services_steam_restart_command_result_set_status (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_ARGV_PROPERTY:
		proton_plus_services_steam_restart_command_result_set_argv (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_RESULT_DIAGNOSTIC_PROPERTY:
		proton_plus_services_steam_restart_command_result_set_diagnostic (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

gboolean
proton_plus_services_steam_restart_backend_has_desktop_application (ProtonPlusServicesSteamRestartBackend* self,
                                                                    const gchar* desktop_id)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->has_desktop_application) {
		return _iface_->has_desktop_application (self, desktop_id);
	}
	return FALSE;
}

gboolean
proton_plus_services_steam_restart_backend_has_native_fallback (ProtonPlusServicesSteamRestartBackend* self)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->has_native_fallback) {
		return _iface_->has_native_fallback (self);
	}
	return FALSE;
}

void
proton_plus_services_steam_restart_backend_request_native_shutdown (ProtonPlusServicesSteamRestartBackend* self,
                                                                    gboolean through_flatpak_host,
                                                                    GCancellable* cancellable,
                                                                    GAsyncReadyCallback _callback_,
                                                                    gpointer _user_data_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->request_native_shutdown) {
		_iface_->request_native_shutdown (self, through_flatpak_host, cancellable, _callback_, _user_data_);
	}
}

ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_steam_restart_backend_request_native_shutdown_finish (ProtonPlusServicesSteamRestartBackend* self,
                                                                           GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->request_native_shutdown_finish) {
		return _iface_->request_native_shutdown_finish (self, _res_);
	}
	return NULL;
}

void
proton_plus_services_steam_restart_backend_request_flatpak_shutdown (ProtonPlusServicesSteamRestartBackend* self,
                                                                     gboolean through_flatpak_host,
                                                                     GCancellable* cancellable,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->request_flatpak_shutdown) {
		_iface_->request_flatpak_shutdown (self, through_flatpak_host, cancellable, _callback_, _user_data_);
	}
}

ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_steam_restart_backend_request_flatpak_shutdown_finish (ProtonPlusServicesSteamRestartBackend* self,
                                                                            GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->request_flatpak_shutdown_finish) {
		return _iface_->request_flatpak_shutdown_finish (self, _res_);
	}
	return NULL;
}

void
proton_plus_services_steam_restart_backend_launch_desktop_application (ProtonPlusServicesSteamRestartBackend* self,
                                                                       const gchar* desktop_id,
                                                                       GCancellable* cancellable,
                                                                       GAsyncReadyCallback _callback_,
                                                                       gpointer _user_data_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->launch_desktop_application) {
		_iface_->launch_desktop_application (self, desktop_id, cancellable, _callback_, _user_data_);
	}
}

ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_steam_restart_backend_launch_desktop_application_finish (ProtonPlusServicesSteamRestartBackend* self,
                                                                              GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->launch_desktop_application_finish) {
		return _iface_->launch_desktop_application_finish (self, _res_);
	}
	return NULL;
}

void
proton_plus_services_steam_restart_backend_launch_native_fallback (ProtonPlusServicesSteamRestartBackend* self,
                                                                   GCancellable* cancellable,
                                                                   GAsyncReadyCallback _callback_,
                                                                   gpointer _user_data_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->launch_native_fallback) {
		_iface_->launch_native_fallback (self, cancellable, _callback_, _user_data_);
	}
}

ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_steam_restart_backend_launch_native_fallback_finish (ProtonPlusServicesSteamRestartBackend* self,
                                                                          GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->launch_native_fallback_finish) {
		return _iface_->launch_native_fallback_finish (self, _res_);
	}
	return NULL;
}

void
proton_plus_services_steam_restart_backend_delay (ProtonPlusServicesSteamRestartBackend* self,
                                                  guint milliseconds,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->delay) {
		_iface_->delay (self, milliseconds, cancellable, _callback_, _user_data_);
	}
}

gboolean
proton_plus_services_steam_restart_backend_delay_finish (ProtonPlusServicesSteamRestartBackend* self,
                                                         GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_BACKEND_GET_INTERFACE (self);
	if (_iface_->delay_finish) {
		return _iface_->delay_finish (self, _res_);
	}
	return FALSE;
}

static void
proton_plus_services_steam_restart_backend_default_init (ProtonPlusServicesSteamRestartBackendIface * iface,
                                                         gpointer iface_data)
{
}

static GType
proton_plus_services_steam_restart_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesSteamRestartBackendIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_steam_restart_backend_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType proton_plus_services_steam_restart_backend_type_id;
	proton_plus_services_steam_restart_backend_type_id = g_type_register_static (G_TYPE_INTERFACE, "ProtonPlusServicesSteamRestartBackend", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (proton_plus_services_steam_restart_backend_type_id, G_TYPE_OBJECT);
	return proton_plus_services_steam_restart_backend_type_id;
}

GType
proton_plus_services_steam_restart_backend_get_type (void)
{
	static volatile gsize proton_plus_services_steam_restart_backend_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_steam_restart_backend_type_id__once)) {
		GType proton_plus_services_steam_restart_backend_type_id;
		proton_plus_services_steam_restart_backend_type_id = proton_plus_services_steam_restart_backend_get_type_once ();
		g_once_init_leave (&proton_plus_services_steam_restart_backend_type_id__once, proton_plus_services_steam_restart_backend_type_id);
	}
	return proton_plus_services_steam_restart_backend_type_id__once;
}

GSubprocess*
proton_plus_services_steam_restart_process_factory_spawn_detached (ProtonPlusServicesSteamRestartProcessFactory* self,
                                                                   gchar** argv,
                                                                   gint argv_length1,
                                                                   GError** error)
{
	ProtonPlusServicesSteamRestartProcessFactoryIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PROTON_PLUS_SERVICES_STEAM_RESTART_PROCESS_FACTORY_GET_INTERFACE (self);
	if (_iface_->spawn_detached) {
		return _iface_->spawn_detached (self, argv, argv_length1, error);
	}
	return NULL;
}

static void
proton_plus_services_steam_restart_process_factory_default_init (ProtonPlusServicesSteamRestartProcessFactoryIface * iface,
                                                                 gpointer iface_data)
{
}

static GType
proton_plus_services_steam_restart_process_factory_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesSteamRestartProcessFactoryIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_steam_restart_process_factory_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType proton_plus_services_steam_restart_process_factory_type_id;
	proton_plus_services_steam_restart_process_factory_type_id = g_type_register_static (G_TYPE_INTERFACE, "ProtonPlusServicesSteamRestartProcessFactory", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (proton_plus_services_steam_restart_process_factory_type_id, G_TYPE_OBJECT);
	return proton_plus_services_steam_restart_process_factory_type_id;
}

GType
proton_plus_services_steam_restart_process_factory_get_type (void)
{
	static volatile gsize proton_plus_services_steam_restart_process_factory_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_steam_restart_process_factory_type_id__once)) {
		GType proton_plus_services_steam_restart_process_factory_type_id;
		proton_plus_services_steam_restart_process_factory_type_id = proton_plus_services_steam_restart_process_factory_get_type_once ();
		g_once_init_leave (&proton_plus_services_steam_restart_process_factory_type_id__once, proton_plus_services_steam_restart_process_factory_type_id);
	}
	return proton_plus_services_steam_restart_process_factory_type_id__once;
}

static void
_proton_plus_services_host_steam_restart_process_factory_detach_child_session_gspawn_child_setup_func (gpointer self)
{
	proton_plus_services_host_steam_restart_process_factory_detach_child_session ();
}

static GSubprocess*
proton_plus_services_host_steam_restart_process_factory_real_spawn_detached (ProtonPlusServicesSteamRestartProcessFactory* base,
                                                                             gchar** argv,
                                                                             gint argv_length1,
                                                                             GError** error)
{
	ProtonPlusServicesHostSteamRestartProcessFactory * self;
	GSubprocessLauncher* launcher = NULL;
	GSubprocessLauncher* _tmp0_;
	GSubprocess* _tmp1_ = NULL;
	GSubprocess* _tmp2_;
	GSubprocess* _tmp3_;
	GError* _inner_error0_ = NULL;
	GSubprocess* result;
	self = (ProtonPlusServicesHostSteamRestartProcessFactory*) base;
	_tmp0_ = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDOUT_SILENCE | G_SUBPROCESS_FLAGS_STDERR_SILENCE);
	launcher = _tmp0_;
	g_subprocess_launcher_set_stdin_file_path (launcher, "/dev/null");
	g_subprocess_launcher_set_child_setup (launcher, _proton_plus_services_host_steam_restart_process_factory_detach_child_session_gspawn_child_setup_func, NULL, NULL);
	_tmp2_ = g_subprocess_launcher_spawnv (launcher, argv, &_inner_error0_);
	_tmp1_ = _tmp2_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (launcher);
		return NULL;
	}
	_tmp3_ = _tmp1_;
	_tmp1_ = NULL;
	result = _tmp3_;
	_g_object_unref0 (_tmp1_);
	_g_object_unref0 (launcher);
	return result;
}

static void
proton_plus_services_host_steam_restart_process_factory_detach_child_session (void)
{
	if (setsid () < ((pid_t) 0)) {
		_exit (127);
	}
}

ProtonPlusServicesHostSteamRestartProcessFactory*
proton_plus_services_host_steam_restart_process_factory_construct (GType object_type)
{
	ProtonPlusServicesHostSteamRestartProcessFactory * self = NULL;
	self = (ProtonPlusServicesHostSteamRestartProcessFactory*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusServicesHostSteamRestartProcessFactory*
proton_plus_services_host_steam_restart_process_factory_new (void)
{
	return proton_plus_services_host_steam_restart_process_factory_construct (PROTON_PLUS_SERVICES_TYPE_HOST_STEAM_RESTART_PROCESS_FACTORY);
}

static void
proton_plus_services_host_steam_restart_process_factory_class_init (ProtonPlusServicesHostSteamRestartProcessFactoryClass * klass,
                                                                    gpointer klass_data)
{
	proton_plus_services_host_steam_restart_process_factory_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_services_host_steam_restart_process_factory_proton_plus_services_steam_restart_process_factory_interface_init (ProtonPlusServicesSteamRestartProcessFactoryIface * iface,
                                                                                                                           gpointer iface_data)
{
	proton_plus_services_host_steam_restart_process_factory_proton_plus_services_steam_restart_process_factory_parent_iface = g_type_interface_peek_parent (iface);
	iface->spawn_detached = (GSubprocess* (*) (ProtonPlusServicesSteamRestartProcessFactory*, gchar**, gint, GError**)) proton_plus_services_host_steam_restart_process_factory_real_spawn_detached;
}

static void
proton_plus_services_host_steam_restart_process_factory_instance_init (ProtonPlusServicesHostSteamRestartProcessFactory * self,
                                                                       gpointer klass)
{
}

static GType
proton_plus_services_host_steam_restart_process_factory_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesHostSteamRestartProcessFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_host_steam_restart_process_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesHostSteamRestartProcessFactory), 0, (GInstanceInitFunc) proton_plus_services_host_steam_restart_process_factory_instance_init, NULL };
	static const GInterfaceInfo proton_plus_services_steam_restart_process_factory_info = { (GInterfaceInitFunc) proton_plus_services_host_steam_restart_process_factory_proton_plus_services_steam_restart_process_factory_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_services_host_steam_restart_process_factory_type_id;
	proton_plus_services_host_steam_restart_process_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesHostSteamRestartProcessFactory", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_services_host_steam_restart_process_factory_type_id, PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_PROCESS_FACTORY, &proton_plus_services_steam_restart_process_factory_info);
	return proton_plus_services_host_steam_restart_process_factory_type_id;
}

GType
proton_plus_services_host_steam_restart_process_factory_get_type (void)
{
	static volatile gsize proton_plus_services_host_steam_restart_process_factory_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_host_steam_restart_process_factory_type_id__once)) {
		GType proton_plus_services_host_steam_restart_process_factory_type_id;
		proton_plus_services_host_steam_restart_process_factory_type_id = proton_plus_services_host_steam_restart_process_factory_get_type_once ();
		g_once_init_leave (&proton_plus_services_host_steam_restart_process_factory_type_id__once, proton_plus_services_host_steam_restart_process_factory_type_id);
	}
	return proton_plus_services_host_steam_restart_process_factory_type_id__once;
}

static inline gpointer
proton_plus_services_host_steam_restart_backend_get_instance_private (ProtonPlusServicesHostSteamRestartBackend* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesHostSteamRestartBackend_private_offset);
}

ProtonPlusServicesHostSteamRestartBackend*
proton_plus_services_host_steam_restart_backend_construct (GType object_type,
                                                           ProtonPlusServicesSteamRestartProcessFactory* process_factory)
{
	ProtonPlusServicesHostSteamRestartBackend * self = NULL;
	ProtonPlusServicesSteamRestartProcessFactory* _tmp0_ = NULL;
	ProtonPlusServicesSteamRestartProcessFactory* _tmp1_;
	ProtonPlusServicesSteamRestartProcessFactory* _tmp3_;
	self = (ProtonPlusServicesHostSteamRestartBackend*) g_object_new (object_type, NULL);
	_tmp1_ = _g_object_ref0 (process_factory);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		ProtonPlusServicesHostSteamRestartProcessFactory* _tmp2_;
		_tmp2_ = proton_plus_services_host_steam_restart_process_factory_new ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (ProtonPlusServicesSteamRestartProcessFactory*) _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->process_factory);
	self->priv->process_factory = _tmp3_;
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusServicesHostSteamRestartBackend*
proton_plus_services_host_steam_restart_backend_new (ProtonPlusServicesSteamRestartProcessFactory* process_factory)
{
	return proton_plus_services_host_steam_restart_backend_construct (PROTON_PLUS_SERVICES_TYPE_HOST_STEAM_RESTART_BACKEND, process_factory);
}

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

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

static gboolean
proton_plus_services_host_steam_restart_backend_real_has_desktop_application (ProtonPlusServicesSteamRestartBackend* base,
                                                                              const gchar* desktop_id)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	GList* _tmp0_;
	gboolean result;
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	g_return_val_if_fail (desktop_id != NULL, FALSE);
	_tmp0_ = g_app_info_get_all ();
	{
		GList* app_collection = NULL;
		GList* app_it = NULL;
		app_collection = _tmp0_;
		for (app_it = app_collection; app_it != NULL; app_it = app_it->next) {
			GAppInfo* _tmp1_;
			GAppInfo* app = NULL;
			_tmp1_ = _g_object_ref0 ((GAppInfo*) app_it->data);
			app = _tmp1_;
			{
				GAppInfo* _tmp2_;
				const gchar* _tmp3_;
				_tmp2_ = app;
				_tmp3_ = g_app_info_get_id (_tmp2_);
				if (g_strcmp0 (_tmp3_, desktop_id) == 0) {
					result = TRUE;
					_g_object_unref0 (app);
					(app_collection == NULL) ? NULL : (app_collection = (_g_list_free__g_object_unref0_ (app_collection), NULL));
					return result;
				}
				_g_object_unref0 (app);
			}
		}
		(app_collection == NULL) ? NULL : (app_collection = (_g_list_free__g_object_unref0_ (app_collection), NULL));
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_services_host_steam_restart_backend_real_has_native_fallback (ProtonPlusServicesSteamRestartBackend* base)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	gboolean result;
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	result = g_file_test (PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_NATIVE_STEAM_EXECUTABLE, G_FILE_TEST_IS_EXECUTABLE);
	return result;
}

static void
proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_real_request_native_shutdown (ProtonPlusServicesSteamRestartBackend* base,
                                                                              gboolean through_flatpak_host,
                                                                              GCancellable* cancellable,
                                                                              GAsyncReadyCallback _callback_,
                                                                              gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	GCancellable* _tmp1_;
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->through_flatpak_host = through_flatpak_host;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_co (_data_);
}

static ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_host_steam_restart_backend_request_native_shutdown_finish (ProtonPlusServicesSteamRestartBackend* base,
                                                                                GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartCommandResult* result;
	ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_host_steam_restart_backend_request_native_shutdown_ready (GObject* source_object,
                                                                               GAsyncResult* _res_,
                                                                               gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_co (_data_);
}

static gboolean
proton_plus_services_host_steam_restart_backend_real_request_native_shutdown_co (ProtonPlusServicesHostSteamRestartBackendRequestNativeShutdownData* _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_host_steam_restart_backend_build_native_shutdown_argv (_data_->through_flatpak_host);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_state_ = 1;
	proton_plus_services_host_steam_restart_backend_spawn (_data_->self, _data_->_tmp1_, _data_->cancellable, proton_plus_services_host_steam_restart_backend_request_native_shutdown_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = proton_plus_services_host_steam_restart_backend_spawn_finish (_data_->self, _data_->_res_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_g_object_unref0 (_data_->_tmp1_);
	_data_->result = _data_->_tmp3_;
	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;
}

GeeList*
proton_plus_services_host_steam_restart_backend_build_native_shutdown_argv (gboolean through_flatpak_host)
{
	GeeArrayList* argv = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp3_;
	GeeArrayList* _tmp4_;
	GeeList* result;
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	argv = _tmp0_;
	if (through_flatpak_host) {
		GeeArrayList* _tmp1_;
		GeeArrayList* _tmp2_;
		_tmp1_ = argv;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, "flatpak-spawn");
		_tmp2_ = argv;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, "--host");
	}
	_tmp3_ = argv;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_NATIVE_STEAM_EXECUTABLE);
	_tmp4_ = argv;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp4_, "-shutdown");
	result = (GeeList*) argv;
	return result;
}

static void
proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown (ProtonPlusServicesSteamRestartBackend* base,
                                                                               gboolean through_flatpak_host,
                                                                               GCancellable* cancellable,
                                                                               GAsyncReadyCallback _callback_,
                                                                               gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	GCancellable* _tmp1_;
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->through_flatpak_host = through_flatpak_host;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_co (_data_);
}

static ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_host_steam_restart_backend_request_flatpak_shutdown_finish (ProtonPlusServicesSteamRestartBackend* base,
                                                                                 GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartCommandResult* result;
	ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_host_steam_restart_backend_request_flatpak_shutdown_ready (GObject* source_object,
                                                                                GAsyncResult* _res_,
                                                                                gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_co (_data_);
}

static gboolean
proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown_co (ProtonPlusServicesHostSteamRestartBackendRequestFlatpakShutdownData* _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 (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_data_->argv = _data_->_tmp0_;
	if (_data_->through_flatpak_host) {
		_data_->_tmp1_ = _data_->argv;
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp1_, "flatpak-spawn");
		_data_->_tmp2_ = _data_->argv;
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp2_, "--host");
	}
	_data_->_tmp3_ = _data_->argv;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp3_, "flatpak");
	_data_->_tmp4_ = _data_->argv;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp4_, "run");
	_data_->_tmp5_ = _data_->argv;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp5_, "com.valvesoftware.Steam");
	_data_->_tmp6_ = _data_->argv;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp6_, "-shutdown");
	_data_->_tmp7_ = _data_->argv;
	_data_->_state_ = 1;
	proton_plus_services_host_steam_restart_backend_spawn (_data_->self, (GeeList*) _data_->_tmp7_, _data_->cancellable, proton_plus_services_host_steam_restart_backend_request_flatpak_shutdown_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp8_ = proton_plus_services_host_steam_restart_backend_spawn_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp8_;
	_g_object_unref0 (_data_->argv);
	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_host_steam_restart_backend_real_launch_desktop_application_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->desktop_id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_real_launch_desktop_application (ProtonPlusServicesSteamRestartBackend* base,
                                                                                 const gchar* desktop_id,
                                                                                 GCancellable* cancellable,
                                                                                 GAsyncReadyCallback _callback_,
                                                                                 gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	gchar* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (desktop_id != NULL);
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_real_launch_desktop_application_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (desktop_id);
	_g_free0 (_data_->desktop_id);
	_data_->desktop_id = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	proton_plus_services_host_steam_restart_backend_real_launch_desktop_application_co (_data_);
}

static ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_host_steam_restart_backend_launch_desktop_application_finish (ProtonPlusServicesSteamRestartBackend* base,
                                                                                   GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartCommandResult* result;
	ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
_proton_plus_services_host_steam_restart_backend_detach_child_session_gspawn_child_setup_func (gpointer self)
{
	proton_plus_services_host_steam_restart_backend_detach_child_session ();
}

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

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

static gboolean
proton_plus_services_host_steam_restart_backend_real_launch_desktop_application_co (ProtonPlusServicesHostSteamRestartBackendLaunchDesktopApplicationData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->cancellable != NULL) {
		_data_->_tmp0_ = g_cancellable_is_cancelled (_data_->cancellable);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_tmp1_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_CANCELLED, NULL, "Launch was cancelled before desktop application resolution.");
		_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_->selected = NULL;
	_data_->_tmp2_ = g_app_info_get_all ();
	{
		_data_->app_collection = _data_->_tmp2_;
		for (_data_->app_it = _data_->app_collection; _data_->app_it != NULL; _data_->app_it = _data_->app_it->next) {
			_data_->_tmp3_ = _g_object_ref0 ((GAppInfo*) _data_->app_it->data);
			_data_->app = _data_->_tmp3_;
			{
				_data_->_tmp4_ = _data_->app;
				_data_->_tmp5_ = g_app_info_get_id (_data_->_tmp4_);
				if (g_strcmp0 (_data_->_tmp5_, _data_->desktop_id) == 0) {
					_data_->_tmp6_ = _data_->app;
					_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
					_g_object_unref0 (_data_->selected);
					_data_->selected = _data_->_tmp7_;
					_g_object_unref0 (_data_->app);
					break;
				}
				_g_object_unref0 (_data_->app);
			}
		}
		(_data_->app_collection == NULL) ? NULL : (_data_->app_collection = (_g_list_free__g_object_unref0_ (_data_->app_collection), NULL));
	}
	_data_->_tmp8_ = _data_->selected;
	if (_data_->_tmp8_ == NULL) {
		_data_->_tmp9_ = g_strdup_printf ("Expected desktop application was not available through GIO: %s", _data_->desktop_id);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp11_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_UNAVAILABLE, NULL, _data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		_g_free0 (_data_->_tmp10_);
		_data_->result = _data_->_tmp12_;
		_g_object_unref0 (_data_->selected);
		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_->_tmp13_ = _data_->selected;
	_data_->_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp13_, G_TYPE_DESKTOP_APP_INFO) ? ((GDesktopAppInfo*) _data_->_tmp13_) : NULL);
	_data_->desktop = _data_->_tmp14_;
	_data_->_tmp15_ = _data_->desktop;
	if (_data_->_tmp15_ == NULL) {
		_data_->_tmp16_ = g_strdup_printf ("Expected application is not backed by a desktop entry: %s", _data_->desktop_id);
		_data_->_tmp17_ = _data_->_tmp16_;
		_data_->_tmp18_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_UNAVAILABLE, NULL, _data_->_tmp17_);
		_data_->_tmp19_ = _data_->_tmp18_;
		_g_free0 (_data_->_tmp17_);
		_data_->result = _data_->_tmp19_;
		_g_object_unref0 (_data_->desktop);
		_g_object_unref0 (_data_->selected);
		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_->uris = NULL;
		_data_->_tmp20_ = _data_->desktop;
		_data_->_tmp21_ = _data_->uris;
		g_desktop_app_info_launch_uris_as_manager (_data_->_tmp20_, _data_->_tmp21_, NULL, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, _proton_plus_services_host_steam_restart_backend_detach_child_session_gspawn_child_setup_func, NULL, NULL, NULL, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			(_data_->uris == NULL) ? NULL : (_data_->uris = (_g_list_free__g_free0_ (_data_->uris), NULL));
			goto __catch0_g_error;
		}
		_data_->_tmp22_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
		_data_->argv = _data_->_tmp22_;
		_data_->_tmp23_ = _data_->argv;
		_data_->_tmp24_ = g_strconcat ("gio-app:", _data_->desktop_id, NULL);
		_data_->_tmp25_ = _data_->_tmp24_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp23_, _data_->_tmp25_);
		_g_free0 (_data_->_tmp25_);
		_data_->_tmp26_ = _data_->argv;
		_data_->_tmp27_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_ACCEPTED, (GeeList*) _data_->_tmp26_, "GIO accepted the detached desktop application launch request; Steam st" \
"artup is not yet confirmed.");
		_data_->result = _data_->_tmp27_;
		_g_object_unref0 (_data_->argv);
		(_data_->uris == NULL) ? NULL : (_data_->uris = (_g_list_free__g_free0_ (_data_->uris), NULL));
		_g_object_unref0 (_data_->desktop);
		_g_object_unref0 (_data_->selected);
		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;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp28_ = _data_->e;
		_data_->_tmp29_ = _data_->_tmp28_->message;
		_data_->_tmp30_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_FAILED, NULL, _data_->_tmp29_);
		_data_->result = _data_->_tmp30_;
		_g_error_free0 (_data_->e);
		_g_object_unref0 (_data_->desktop);
		_g_object_unref0 (_data_->selected);
		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;
	}
	__finally0:
	_g_object_unref0 (_data_->desktop);
	_g_object_unref0 (_data_->selected);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
	g_clear_error (&_data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_real_launch_native_fallback (ProtonPlusServicesSteamRestartBackend* base,
                                                                             GCancellable* cancellable,
                                                                             GAsyncReadyCallback _callback_,
                                                                             gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	GCancellable* _tmp1_;
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_co (_data_);
}

static ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_host_steam_restart_backend_launch_native_fallback_finish (ProtonPlusServicesSteamRestartBackend* base,
                                                                               GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartCommandResult* result;
	ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_host_steam_restart_backend_launch_native_fallback_ready (GObject* source_object,
                                                                              GAsyncResult* _res_,
                                                                              gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_co (_data_);
}

static gboolean
proton_plus_services_host_steam_restart_backend_real_launch_native_fallback_co (ProtonPlusServicesHostSteamRestartBackendLaunchNativeFallbackData* _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 (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_data_->argv = _data_->_tmp0_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->argv, PROTON_PLUS_SERVICES_HOST_STEAM_RESTART_BACKEND_NATIVE_STEAM_EXECUTABLE);
	_data_->_state_ = 1;
	proton_plus_services_host_steam_restart_backend_spawn_detached (_data_->self, (GeeList*) _data_->argv, _data_->cancellable, proton_plus_services_host_steam_restart_backend_launch_native_fallback_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_services_host_steam_restart_backend_spawn_detached_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp1_;
	_g_object_unref0 (_data_->argv);
	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_host_steam_restart_backend_real_delay_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendDelayData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendDelayData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_real_delay (ProtonPlusServicesSteamRestartBackend* base,
                                                            guint milliseconds,
                                                            GCancellable* cancellable,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	ProtonPlusServicesHostSteamRestartBackendDelayData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	GCancellable* _tmp1_;
	self = (ProtonPlusServicesHostSteamRestartBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendDelayData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_real_delay_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->milliseconds = milliseconds;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	proton_plus_services_host_steam_restart_backend_real_delay_co (_data_);
}

static gboolean
proton_plus_services_host_steam_restart_backend_delay_finish (ProtonPlusServicesSteamRestartBackend* base,
                                                              GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusServicesHostSteamRestartBackendDelayData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		gboolean _tmp0_ = FALSE;
		return _tmp0_;
	}
	result = _data_->result;
	return result;
}

static Block45Data*
block45_data_ref (Block45Data* _data45_)
{
	g_atomic_int_inc (&_data45_->_ref_count_);
	return _data45_;
}

static void
block45_data_unref (void * _userdata_)
{
	Block45Data* _data45_;
	_data45_ = (Block45Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data45_->_ref_count_)) {
		ProtonPlusServicesHostSteamRestartBackend* self;
		self = _data45_->self;
		_g_object_unref0 (_data45_->cancellable);
		_g_object_unref0 (self);
		g_slice_free (Block45Data, _data45_);
	}
}

static gboolean
__lambda289_ (Block45Data* _data45_)
{
	ProtonPlusServicesHostSteamRestartBackend* self;
	gboolean _tmp0_ = FALSE;
	gboolean result;
	self = _data45_->self;
	_data45_->source_id = (guint) 0;
	if (_data45_->cancellable != NULL) {
		_tmp0_ = _data45_->cancellation_handler_id != ((gulong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g_cancellable_disconnect (_data45_->cancellable, _data45_->cancellation_handler_id);
		_data45_->cancellation_handler_id = (gulong) 0;
	}
	proton_plus_services_host_steam_restart_backend_real_delay_co (_data45_->_async_data_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda289__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda289_ (self);
	return result;
}

static void
___lambda290_ (Block45Data* _data45_)
{
	ProtonPlusServicesHostSteamRestartBackend* self;
	self = _data45_->self;
	if (_data45_->source_id == ((guint) 0)) {
		return;
	}
	g_source_remove (_data45_->source_id);
	_data45_->source_id = (guint) 0;
	proton_plus_services_host_steam_restart_backend_real_delay_co (_data45_->_async_data_);
}

static void
____lambda290__g_cancellable_cancelled (GCancellable* _sender,
                                        gpointer self)
{
	___lambda290_ (self);
}

static gboolean
proton_plus_services_host_steam_restart_backend_real_delay_co (ProtonPlusServicesHostSteamRestartBackendDelayData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data45_ = g_slice_new0 (Block45Data);
	_data_->_data45_->_ref_count_ = 1;
	_data_->_data45_->self = g_object_ref (_data_->self);
	_g_object_unref0 (_data_->_data45_->cancellable);
	_data_->_data45_->cancellable = _data_->cancellable;
	_data_->_data45_->_async_data_ = _data_;
	if (_data_->_data45_->cancellable != NULL) {
		_data_->_tmp0_ = g_cancellable_is_cancelled (_data_->_data45_->cancellable);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->result = FALSE;
		block45_data_unref (_data_->_data45_);
		_data_->_data45_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->milliseconds == ((guint) 0)) {
		if (_data_->_data45_->cancellable == NULL) {
			_data_->_tmp1_ = TRUE;
		} else {
			_data_->_tmp1_ = !g_cancellable_is_cancelled (_data_->_data45_->cancellable);
		}
		_data_->result = _data_->_tmp1_;
		block45_data_unref (_data_->_data45_);
		_data_->_data45_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_data45_->source_id = (guint) 0;
	_data_->_data45_->cancellation_handler_id = (gulong) 0;
	_data_->_data45_->source_id = g_timeout_add_full (G_PRIORITY_DEFAULT, _data_->milliseconds, ___lambda289__gsource_func, block45_data_ref (_data_->_data45_), block45_data_unref);
	if (_data_->_data45_->cancellable != NULL) {
		_data_->_tmp2_ = g_signal_connect_data (_data_->_data45_->cancellable, "cancelled", (GCallback) ____lambda290__g_cancellable_cancelled, block45_data_ref (_data_->_data45_), (GClosureNotify) block45_data_unref, 0);
		_data_->_data45_->cancellation_handler_id = _data_->_tmp2_;
	}
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	if (_data_->_data45_->cancellable != NULL) {
		_data_->_tmp3_ = _data_->_data45_->cancellation_handler_id != ((gulong) 0);
	} else {
		_data_->_tmp3_ = FALSE;
	}
	if (_data_->_tmp3_) {
		g_cancellable_disconnect (_data_->_data45_->cancellable, _data_->_data45_->cancellation_handler_id);
	}
	if (_data_->_data45_->cancellable == NULL) {
		_data_->_tmp4_ = TRUE;
	} else {
		_data_->_tmp4_ = !g_cancellable_is_cancelled (_data_->_data45_->cancellable);
	}
	_data_->result = _data_->_tmp4_;
	block45_data_unref (_data_->_data45_);
	_data_->_data45_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_host_steam_restart_backend_spawn_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendSpawnData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->argv);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendSpawnData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_spawn (ProtonPlusServicesHostSteamRestartBackend* self,
                                                       GeeList* argv,
                                                       GCancellable* cancellable,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackendSpawnData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	GeeList* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (argv != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendSpawnData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_spawn_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (argv);
	_g_object_unref0 (_data_->argv);
	_data_->argv = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	proton_plus_services_host_steam_restart_backend_spawn_co (_data_);
}

static ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_host_steam_restart_backend_spawn_finish (ProtonPlusServicesHostSteamRestartBackend* self,
                                                              GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartCommandResult* result;
	ProtonPlusServicesHostSteamRestartBackendSpawnData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_host_steam_restart_backend_spawn_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackendSpawnData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_host_steam_restart_backend_spawn_co (_data_);
}

static gboolean
proton_plus_services_host_steam_restart_backend_spawn_co (ProtonPlusServicesHostSteamRestartBackendSpawnData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->cancellable != NULL) {
		_data_->_tmp0_ = g_cancellable_is_cancelled (_data_->cancellable);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_tmp1_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_CANCELLED, _data_->argv, "Command was cancelled before dispatch.");
		_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_ = gee_collection_get_size ((GeeCollection*) _data_->argv);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_new0 (gchar*, _data_->_tmp3_ + 1);
	_data_->values = _data_->_tmp4_;
	_data_->values_length1 = _data_->_tmp3_;
	_data_->_values_size_ = _data_->values_length1;
	{
		_data_->i = 0;
		{
			_data_->_tmp5_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp5_) {
					_data_->_tmp6_ = _data_->i;
					_data_->i = _data_->_tmp6_ + 1;
				}
				_data_->_tmp5_ = FALSE;
				_data_->_tmp7_ = gee_collection_get_size ((GeeCollection*) _data_->argv);
				_data_->_tmp8_ = _data_->_tmp7_;
				if (!(_data_->i < _data_->_tmp8_)) {
					break;
				}
				_data_->_tmp9_ = _data_->values;
				_data_->_tmp9__length1 = _data_->values_length1;
				_data_->_tmp10_ = gee_list_get (_data_->argv, _data_->i);
				_g_free0 (_data_->_tmp9_[_data_->i]);
				_data_->_tmp9_[_data_->i] = (gchar*) _data_->_tmp10_;
			}
		}
	}
	{
		_data_->_tmp11_ = _data_->values;
		_data_->_tmp11__length1 = _data_->values_length1;
		_data_->_tmp12_ = g_subprocess_newv (_data_->_tmp11_, G_SUBPROCESS_FLAGS_NONE, &_data_->_inner_error0_);
		_data_->subprocess = _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp13_ = _data_->subprocess;
		_data_->_state_ = 1;
		g_subprocess_wait_async (_data_->_tmp13_, _data_->cancellable, proton_plus_services_host_steam_restart_backend_spawn_ready, _data_);
		return FALSE;
		_state_1:
		g_subprocess_wait_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->subprocess);
			goto __catch0_g_error;
		}
		if (_data_->cancellable != NULL) {
			_data_->_tmp14_ = g_cancellable_is_cancelled (_data_->cancellable);
		} else {
			_data_->_tmp14_ = FALSE;
		}
		if (_data_->_tmp14_) {
			_data_->_tmp15_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_CANCELLED, _data_->argv, "Command wait was cancelled after dispatch.");
			_data_->result = _data_->_tmp15_;
			_g_object_unref0 (_data_->subprocess);
			_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp16_ = _data_->subprocess;
		if (!g_subprocess_get_successful (_data_->_tmp16_)) {
			_data_->_tmp17_ = _data_->subprocess;
			_data_->_tmp18_ = g_strdup_printf ("Command exited unsuccessfully (%d).", g_subprocess_get_exit_status (_data_->_tmp17_));
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp20_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_FAILED, _data_->argv, _data_->_tmp19_);
			_data_->_tmp21_ = _data_->_tmp20_;
			_g_free0 (_data_->_tmp19_);
			_data_->result = _data_->_tmp21_;
			_g_object_unref0 (_data_->subprocess);
			_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp22_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_ACCEPTED, _data_->argv, "Command completed; lifecycle state still requires observation.");
		_data_->result = _data_->_tmp22_;
		_g_object_unref0 (_data_->subprocess);
		_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp23_ = _data_->e;
		_data_->_tmp24_ = _data_->_tmp23_->message;
		_data_->_tmp25_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_FAILED, _data_->argv, _data_->_tmp24_);
		_data_->result = _data_->_tmp25_;
		_g_error_free0 (_data_->e);
		_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
	g_clear_error (&_data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_host_steam_restart_backend_spawn_detached_data_free (gpointer _data)
{
	ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->argv);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData, _data_);
}

static void
proton_plus_services_host_steam_restart_backend_spawn_detached (ProtonPlusServicesHostSteamRestartBackend* self,
                                                                GeeList* argv,
                                                                GCancellable* cancellable,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData* _data_;
	ProtonPlusServicesHostSteamRestartBackend* _tmp0_;
	GeeList* _tmp1_;
	GCancellable* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (argv != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_steam_restart_backend_spawn_detached_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (argv);
	_g_object_unref0 (_data_->argv);
	_data_->argv = _tmp1_;
	_tmp2_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	proton_plus_services_host_steam_restart_backend_spawn_detached_co (_data_);
}

static ProtonPlusServicesSteamRestartCommandResult*
proton_plus_services_host_steam_restart_backend_spawn_detached_finish (ProtonPlusServicesHostSteamRestartBackend* self,
                                                                       GAsyncResult* _res_)
{
	ProtonPlusServicesSteamRestartCommandResult* result;
	ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static gboolean
proton_plus_services_host_steam_restart_backend_spawn_detached_co (ProtonPlusServicesHostSteamRestartBackendSpawnDetachedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	if (_data_->cancellable != NULL) {
		_data_->_tmp0_ = g_cancellable_is_cancelled (_data_->cancellable);
	} else {
		_data_->_tmp0_ = FALSE;
	}
	if (_data_->_tmp0_) {
		_data_->_tmp1_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_CANCELLED, _data_->argv, "Launch was cancelled before dispatch.");
		_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_ = gee_collection_get_size ((GeeCollection*) _data_->argv);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = g_new0 (gchar*, _data_->_tmp3_ + 1);
	_data_->values = _data_->_tmp4_;
	_data_->values_length1 = _data_->_tmp3_;
	_data_->_values_size_ = _data_->values_length1;
	{
		_data_->i = 0;
		{
			_data_->_tmp5_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp5_) {
					_data_->_tmp6_ = _data_->i;
					_data_->i = _data_->_tmp6_ + 1;
				}
				_data_->_tmp5_ = FALSE;
				_data_->_tmp7_ = gee_collection_get_size ((GeeCollection*) _data_->argv);
				_data_->_tmp8_ = _data_->_tmp7_;
				if (!(_data_->i < _data_->_tmp8_)) {
					break;
				}
				_data_->_tmp9_ = _data_->values;
				_data_->_tmp9__length1 = _data_->values_length1;
				_data_->_tmp10_ = gee_list_get (_data_->argv, _data_->i);
				_g_free0 (_data_->_tmp9_[_data_->i]);
				_data_->_tmp9_[_data_->i] = (gchar*) _data_->_tmp10_;
			}
		}
	}
	{
		_data_->_tmp11_ = _data_->self->priv->process_factory;
		_data_->_tmp12_ = _data_->values;
		_data_->_tmp12__length1 = _data_->values_length1;
		_data_->_tmp13_ = proton_plus_services_steam_restart_process_factory_spawn_detached (_data_->_tmp11_, _data_->_tmp12_, (gint) _data_->_tmp12__length1, &_data_->_inner_error0_);
		_data_->_tmp14_ = _data_->_tmp13_;
		_g_object_unref0 (_data_->_tmp14_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_ACCEPTED, _data_->argv, "Detached launch was dispatched; Steam startup is not yet confirmed.");
		_data_->result = _data_->_tmp15_;
		_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp16_ = _data_->e;
		_data_->_tmp17_ = _data_->_tmp16_->message;
		_data_->_tmp18_ = proton_plus_services_steam_restart_command_result_new (PROTON_PLUS_SERVICES_STEAM_RESTART_COMMAND_STATUS_FAILED, _data_->argv, _data_->_tmp17_);
		_data_->result = _data_->_tmp18_;
		_g_error_free0 (_data_->e);
		_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	_data_->values = (_vala_array_free (_data_->values, _data_->values_length1, (GDestroyNotify) g_free), NULL);
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
	g_clear_error (&_data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
proton_plus_services_host_steam_restart_backend_detach_child_session (void)
{
	if (setsid () < ((pid_t) 0)) {
		_exit (127);
	}
}

static void
proton_plus_services_host_steam_restart_backend_class_init (ProtonPlusServicesHostSteamRestartBackendClass * klass,
                                                            gpointer klass_data)
{
	proton_plus_services_host_steam_restart_backend_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesHostSteamRestartBackend_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_host_steam_restart_backend_finalize;
}

static void
proton_plus_services_host_steam_restart_backend_proton_plus_services_steam_restart_backend_interface_init (ProtonPlusServicesSteamRestartBackendIface * iface,
                                                                                                           gpointer iface_data)
{
	proton_plus_services_host_steam_restart_backend_proton_plus_services_steam_restart_backend_parent_iface = g_type_interface_peek_parent (iface);
	iface->has_desktop_application = (gboolean (*) (ProtonPlusServicesSteamRestartBackend*, const gchar*)) proton_plus_services_host_steam_restart_backend_real_has_desktop_application;
	iface->has_native_fallback = (gboolean (*) (ProtonPlusServicesSteamRestartBackend*)) proton_plus_services_host_steam_restart_backend_real_has_native_fallback;
	iface->request_native_shutdown = (void (*) (ProtonPlusServicesSteamRestartBackend*, gboolean, GCancellable*, GAsyncReadyCallback, gpointer)) proton_plus_services_host_steam_restart_backend_real_request_native_shutdown;
	iface->request_native_shutdown_finish = (ProtonPlusServicesSteamRestartCommandResult* (*) (ProtonPlusServicesSteamRestartBackend*, GAsyncResult*)) proton_plus_services_host_steam_restart_backend_request_native_shutdown_finish;
	iface->request_flatpak_shutdown = (void (*) (ProtonPlusServicesSteamRestartBackend*, gboolean, GCancellable*, GAsyncReadyCallback, gpointer)) proton_plus_services_host_steam_restart_backend_real_request_flatpak_shutdown;
	iface->request_flatpak_shutdown_finish = (ProtonPlusServicesSteamRestartCommandResult* (*) (ProtonPlusServicesSteamRestartBackend*, GAsyncResult*)) proton_plus_services_host_steam_restart_backend_request_flatpak_shutdown_finish;
	iface->launch_desktop_application = (void (*) (ProtonPlusServicesSteamRestartBackend*, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer)) proton_plus_services_host_steam_restart_backend_real_launch_desktop_application;
	iface->launch_desktop_application_finish = (ProtonPlusServicesSteamRestartCommandResult* (*) (ProtonPlusServicesSteamRestartBackend*, GAsyncResult*)) proton_plus_services_host_steam_restart_backend_launch_desktop_application_finish;
	iface->launch_native_fallback = (void (*) (ProtonPlusServicesSteamRestartBackend*, GCancellable*, GAsyncReadyCallback, gpointer)) proton_plus_services_host_steam_restart_backend_real_launch_native_fallback;
	iface->launch_native_fallback_finish = (ProtonPlusServicesSteamRestartCommandResult* (*) (ProtonPlusServicesSteamRestartBackend*, GAsyncResult*)) proton_plus_services_host_steam_restart_backend_launch_native_fallback_finish;
	iface->delay = (void (*) (ProtonPlusServicesSteamRestartBackend*, guint, GCancellable*, GAsyncReadyCallback, gpointer)) proton_plus_services_host_steam_restart_backend_real_delay;
	iface->delay_finish = (gboolean (*) (ProtonPlusServicesSteamRestartBackend*, GAsyncResult*)) proton_plus_services_host_steam_restart_backend_delay_finish;
}

static void
proton_plus_services_host_steam_restart_backend_instance_init (ProtonPlusServicesHostSteamRestartBackend * self,
                                                               gpointer klass)
{
	self->priv = proton_plus_services_host_steam_restart_backend_get_instance_private (self);
}

static void
proton_plus_services_host_steam_restart_backend_finalize (GObject * obj)
{
	ProtonPlusServicesHostSteamRestartBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_HOST_STEAM_RESTART_BACKEND, ProtonPlusServicesHostSteamRestartBackend);
	_g_object_unref0 (self->priv->process_factory);
	G_OBJECT_CLASS (proton_plus_services_host_steam_restart_backend_parent_class)->finalize (obj);
}

static GType
proton_plus_services_host_steam_restart_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesHostSteamRestartBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_host_steam_restart_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesHostSteamRestartBackend), 0, (GInstanceInitFunc) proton_plus_services_host_steam_restart_backend_instance_init, NULL };
	static const GInterfaceInfo proton_plus_services_steam_restart_backend_info = { (GInterfaceInitFunc) proton_plus_services_host_steam_restart_backend_proton_plus_services_steam_restart_backend_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_services_host_steam_restart_backend_type_id;
	proton_plus_services_host_steam_restart_backend_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesHostSteamRestartBackend", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_services_host_steam_restart_backend_type_id, PROTON_PLUS_SERVICES_TYPE_STEAM_RESTART_BACKEND, &proton_plus_services_steam_restart_backend_info);
	ProtonPlusServicesHostSteamRestartBackend_private_offset = g_type_add_instance_private (proton_plus_services_host_steam_restart_backend_type_id, sizeof (ProtonPlusServicesHostSteamRestartBackendPrivate));
	return proton_plus_services_host_steam_restart_backend_type_id;
}

GType
proton_plus_services_host_steam_restart_backend_get_type (void)
{
	static volatile gsize proton_plus_services_host_steam_restart_backend_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_host_steam_restart_backend_type_id__once)) {
		GType proton_plus_services_host_steam_restart_backend_type_id;
		proton_plus_services_host_steam_restart_backend_type_id = proton_plus_services_host_steam_restart_backend_get_type_once ();
		g_once_init_leave (&proton_plus_services_host_steam_restart_backend_type_id__once, proton_plus_services_host_steam_restart_backend_type_id);
	}
	return proton_plus_services_host_steam_restart_backend_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 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;
}

