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

#include "protonplus_core.h"
#include <gio/gio.h>
#include <gee.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <json-glib/json-glib.h>
#include <errno.h>
#include <glib/gstdio.h>
#include <stdio.h>
#include <gobject/gvaluecollector.h>

#define PROTON_PLUS_MODELS_GAMES_REMOTE_AWACY_GAME_SOURCE_GAMES_URI "https://raw.githubusercontent.com/AreWeAntiCheatYet/AreWeAntiCheatYet/" \
"refs/heads/master/games.json"
#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_MODELS_GAMES_REMOTE_AWACY_GAME_SOURCE_0_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_REMOTE_AWACY_GAME_SOURCE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_games_remote_awacy_game_source_properties[PROTON_PLUS_MODELS_GAMES_REMOTE_AWACY_GAME_SOURCE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define _proton_plus_models_games_steam_awacy_game_unref0(var) ((var == NULL) ? NULL : (var = (proton_plus_models_games_steam_awacy_game_unref (var), NULL)))
typedef struct _ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData;
enum  {
	PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_0_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_games_awacy_game_catalog_properties[PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_NUM_PROPERTIES];
typedef struct _Block60Data Block60Data;
typedef struct _ProtonPlusModelsGamesAwacyGameCatalogGetGamesData ProtonPlusModelsGamesAwacyGameCatalogGetGamesData;
enum  {
	PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_FETCH_COMPLETED_SIGNAL,
	PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_NUM_SIGNALS
};
static guint proton_plus_models_games_awacy_game_catalog_signals[PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_NUM_SIGNALS] = {0};
enum  {
	PROTON_PLUS_MODELS_GAMES_STEAM_0_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_APPID_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_ID_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_PATH_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_NAME_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_STATUS_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_LOOKUP_COMPLETE_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_LAUNCH_OPTIONS_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_IS_NON_STEAM_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_IS_NATIVE_PROPERTY,
	PROTON_PLUS_MODELS_GAMES_STEAM_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
#define _g_dir_close0(var) ((var == NULL) ? NULL : (var = (g_dir_close (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ProtonPlusModelsGamesSteamParamSpecAwacyGame ProtonPlusModelsGamesSteamParamSpecAwacyGame;

struct _ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsGamesRemoteAwacyGameSource* self;
	GCancellable* cancellable;
	GeeHashMap* result;
	GeeHashMap* games;
	GeeHashMap* _tmp0_;
	ProtonPlusUtilsWebResponse* response;
	ProtonPlusUtilsWebResponse* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	ProtonPlusUtilsWebResponse* _tmp4_;
	ProtonPlusUtilsWebResponse* _tmp5_;
	ProtonPlusReturnCode _tmp6_;
	ProtonPlusReturnCode _tmp7_;
	ProtonPlusUtilsWebResponse* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	JsonNode* root_node;
	ProtonPlusUtilsWebResponse* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	JsonNode* _tmp14_;
	gboolean _tmp15_;
	JsonNode* _tmp16_;
	JsonNode* _tmp17_;
	JsonArray* root_array;
	JsonNode* _tmp18_;
	JsonArray* _tmp19_;
	JsonArray* _tmp20_;
	JsonArray* _tmp21_;
	gint i;
	gboolean _tmp22_;
	gint _tmp23_;
	JsonArray* _tmp24_;
	JsonObject* object;
	JsonArray* _tmp25_;
	JsonObject* _tmp26_;
	JsonObject* _tmp27_;
	JsonObject* storeids_object;
	JsonObject* _tmp28_;
	JsonObject* _tmp29_;
	JsonObject* _tmp30_;
	gboolean _tmp31_;
	JsonObject* _tmp32_;
	JsonObject* _tmp33_;
	guint appid;
	JsonObject* _tmp34_;
	const gchar* _tmp35_;
	guint _tmp36_;
	gboolean _tmp37_;
	gboolean _tmp38_;
	JsonObject* _tmp39_;
	JsonObject* _tmp40_;
	GeeHashMap* _tmp41_;
	JsonObject* _tmp42_;
	const gchar* _tmp43_;
	JsonObject* _tmp44_;
	const gchar* _tmp45_;
	ProtonPlusModelsGamesSteamAwacyGame* _tmp46_;
	ProtonPlusModelsGamesSteamAwacyGame* _tmp47_;
};

struct _ProtonPlusModelsGamesAwacyGameCatalogPrivate {
	ProtonPlusModelsGamesAwacyGameSource* source;
	guint timeout_milliseconds;
	GeeHashMap* cached_games;
	gboolean is_loading;
};

struct _Block60Data {
	int _ref_count_;
	ProtonPlusModelsGamesAwacyGameCatalog* self;
	GCancellable* cancellable;
	guint timeout_source_id;
	gpointer _async_data_;
};

struct _ProtonPlusModelsGamesAwacyGameCatalogGetGamesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsGamesAwacyGameCatalog* self;
	GeeHashMap* result;
	Block60Data* _data60_;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	gulong handler_id;
	gulong _tmp3_;
	GeeHashMap* _tmp4_;
	GeeHashMap* _tmp5_;
	GCancellable* _tmp6_;
	GeeHashMap* loaded_games;
	ProtonPlusModelsGamesAwacyGameSource* _tmp7_;
	GCancellable* _tmp8_;
	GeeHashMap* _tmp9_;
	GeeHashMap* _tmp10_;
	GeeHashMap* _tmp11_;
	GeeHashMap* _tmp12_;
	GeeHashMap* _tmp13_;
	GeeHashMap* _tmp14_;
	GeeHashMap* _tmp15_;
	GeeHashMap* _tmp16_;
};

struct _ProtonPlusModelsGamesSteamPrivate {
	guint _appid;
	gint _library_folder_id;
	gchar* _library_folder_path;
	gchar* _awacy_name;
	gchar* _awacy_status;
	gboolean _awacy_lookup_complete;
	gchar* _launch_options;
	gboolean _is_non_steam;
	gboolean* _is_native;
};

struct _ProtonPlusModelsGamesSteamAwacyGamePrivate {
	guint _appid;
	gchar* _name;
	gchar* _status;
};

struct _ProtonPlusModelsGamesSteamParamSpecAwacyGame {
	GParamSpec parent_instance;
};

static gpointer proton_plus_models_games_remote_awacy_game_source_parent_class = NULL;
static ProtonPlusModelsGamesAwacyGameSourceIface * proton_plus_models_games_remote_awacy_game_source_proton_plus_models_games_awacy_game_source_parent_iface = NULL;
static gint ProtonPlusModelsGamesAwacyGameCatalog_private_offset;
static gpointer proton_plus_models_games_awacy_game_catalog_parent_class = NULL;
static ProtonPlusModelsGamesAwacyGameCatalog* proton_plus_models_games_awacy_game_catalog_shared_catalog;
static ProtonPlusModelsGamesAwacyGameCatalog* proton_plus_models_games_awacy_game_catalog_shared_catalog = NULL;
static gint ProtonPlusModelsGamesSteam_private_offset;
static gpointer proton_plus_models_games_steam_parent_class = NULL;
static gint ProtonPlusModelsGamesSteamAwacyGame_private_offset;
static gpointer proton_plus_models_games_steam_awacy_game_parent_class = NULL;

static GType proton_plus_models_games_awacy_game_source_get_type_once (void);
static void proton_plus_models_games_remote_awacy_game_source_real_load_data_free (gpointer _data);
static void proton_plus_models_games_remote_awacy_game_source_real_load (ProtonPlusModelsGamesAwacyGameSource* base,
                                                                  GCancellable* cancellable,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
static gboolean proton_plus_models_games_remote_awacy_game_source_real_load_co (ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData* _data_);
static void proton_plus_models_games_remote_awacy_game_source_load_ready (GObject* source_object,
                                                                   GAsyncResult* _res_,
                                                                   gpointer _user_data_);
static void _vala_JsonNode_free (JsonNode* self);
static GType proton_plus_models_games_remote_awacy_game_source_get_type_once (void);
static void proton_plus_models_games_awacy_game_catalog_get_games_data_free (gpointer _data);
static gboolean proton_plus_models_games_awacy_game_catalog_get_games_co (ProtonPlusModelsGamesAwacyGameCatalogGetGamesData* _data_);
static Block60Data* block60_data_ref (Block60Data* _data60_);
static void block60_data_unref (void * _userdata_);
static void ___lambda24_ (Block60Data* _data60_);
static void ____lambda24__proton_plus_models_games_awacy_game_catalog_fetch_completed (ProtonPlusModelsGamesAwacyGameCatalog* _sender,
                                                                                gpointer self);
static gboolean ___lambda25_ (Block60Data* _data60_);
static gboolean ____lambda25__gsource_func (gpointer self);
static void proton_plus_models_games_awacy_game_catalog_get_games_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_);
static void proton_plus_models_games_awacy_game_catalog_finalize (GObject * obj);
static GType proton_plus_models_games_awacy_game_catalog_get_type_once (void);
VALA_EXTERN ProtonPlusModelsGame* proton_plus_models_game_construct (GType object_type,
                                                         const gchar* name,
                                                         const gchar* installdir,
                                                         const gchar* prefixdir,
                                                         guint prefix,
                                                         ProtonPlusModelsLauncher* launcher);
static gboolean proton_plus_models_games_steam_detect_native (ProtonPlusModelsGamesSteam* self);
static gboolean proton_plus_models_games_steam_real_change_compatibility_tool (ProtonPlusModelsGame* base,
                                                                        const gchar* compatibility_tool);
static gboolean* _bool_dup (gboolean* self);
static void proton_plus_models_games_steam_awacy_game_finalize (ProtonPlusModelsGamesSteamAwacyGame * obj);
static GType proton_plus_models_games_steam_awacy_game_get_type_once (void);
static void proton_plus_models_games_steam_finalize (GObject * obj);
static GType proton_plus_models_games_steam_get_type_once (void);
static void _vala_proton_plus_models_games_steam_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static void _vala_proton_plus_models_games_steam_set_property (GObject * object,
                                                        guint property_id,
                                                        const GValue * value,
                                                        GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

void
proton_plus_models_games_awacy_game_source_load (ProtonPlusModelsGamesAwacyGameSource* self,
                                                 GCancellable* cancellable,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	ProtonPlusModelsGamesAwacyGameSourceIface* _iface_;
	_iface_ = PROTON_PLUS_MODELS_GAMES_AWACY_GAME_SOURCE_GET_INTERFACE (self);
	if (_iface_->load) {
		_iface_->load (self, cancellable, _callback_, _user_data_);
	}
}

GeeHashMap*
proton_plus_models_games_awacy_game_source_load_finish (ProtonPlusModelsGamesAwacyGameSource* self,
                                                        GAsyncResult* _res_)
{
	ProtonPlusModelsGamesAwacyGameSourceIface* _iface_;
	_iface_ = PROTON_PLUS_MODELS_GAMES_AWACY_GAME_SOURCE_GET_INTERFACE (self);
	if (_iface_->load_finish) {
		return _iface_->load_finish (self, _res_);
	}
	return NULL;
}

static void
proton_plus_models_games_awacy_game_source_default_init (ProtonPlusModelsGamesAwacyGameSourceIface * iface,
                                                         gpointer iface_data)
{
}

static GType
proton_plus_models_games_awacy_game_source_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGamesAwacyGameSourceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_games_awacy_game_source_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType proton_plus_models_games_awacy_game_source_type_id;
	proton_plus_models_games_awacy_game_source_type_id = g_type_register_static (G_TYPE_INTERFACE, "ProtonPlusModelsGamesAwacyGameSource", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (proton_plus_models_games_awacy_game_source_type_id, G_TYPE_OBJECT);
	return proton_plus_models_games_awacy_game_source_type_id;
}

GType
proton_plus_models_games_awacy_game_source_get_type (void)
{
	static volatile gsize proton_plus_models_games_awacy_game_source_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_games_awacy_game_source_type_id__once)) {
		GType proton_plus_models_games_awacy_game_source_type_id;
		proton_plus_models_games_awacy_game_source_type_id = proton_plus_models_games_awacy_game_source_get_type_once ();
		g_once_init_leave (&proton_plus_models_games_awacy_game_source_type_id__once, proton_plus_models_games_awacy_game_source_type_id);
	}
	return proton_plus_models_games_awacy_game_source_type_id__once;
}

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

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

static void
proton_plus_models_games_remote_awacy_game_source_real_load (ProtonPlusModelsGamesAwacyGameSource* base,
                                                             GCancellable* cancellable,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	ProtonPlusModelsGamesRemoteAwacyGameSource * self;
	ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData* _data_;
	ProtonPlusModelsGamesRemoteAwacyGameSource* _tmp0_;
	GCancellable* _tmp1_;
	self = (ProtonPlusModelsGamesRemoteAwacyGameSource*) base;
	_data_ = g_slice_new0 (ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_games_remote_awacy_game_source_real_load_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_models_games_remote_awacy_game_source_real_load_co (_data_);
}

static GeeHashMap*
proton_plus_models_games_remote_awacy_game_source_load_finish (ProtonPlusModelsGamesAwacyGameSource* base,
                                                               GAsyncResult* _res_)
{
	GeeHashMap* result;
	ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData* _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_models_games_remote_awacy_game_source_load_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_)
{
	ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_games_remote_awacy_game_source_real_load_co (_data_);
}

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

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

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

static gboolean
uint_try_parse (const gchar* str,
                guint* _result_,
                const gchar** unparsed,
                guint _base)
{
	guint _vala__result_ = 0U;
	const gchar* _vala_unparsed = NULL;
	gchar* endptr = NULL;
	gulong ulong_result = 0UL;
	gchar* _tmp0_ = NULL;
	gulong _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gulong _tmp6_;
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	errno = 0;
	_tmp1_ = strtoul (str, &_tmp0_, (gint) _base);
	endptr = _tmp0_;
	ulong_result = _tmp1_;
	_tmp2_ = endptr;
	_tmp3_ = strlen (str);
	_tmp4_ = _tmp3_;
	if (_tmp2_ == (((gchar*) str) + _tmp4_)) {
		_vala_unparsed = "";
	} else {
		gchar* _tmp5_;
		_tmp5_ = endptr;
		_vala_unparsed = (const gchar*) _tmp5_;
	}
	_tmp6_ = ulong_result;
	if ((((gulong) 0) <= _tmp6_) && (_tmp6_ <= ((gulong) G_MAXUINT))) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_vala__result_ = (guint) ulong_result;
		if (errno != ERANGE) {
			_tmp8_ = errno != EINVAL;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = _vala_unparsed;
			_tmp10_ = endptr;
			_tmp7_ = _tmp9_ != _tmp10_;
		} else {
			_tmp7_ = FALSE;
		}
		result = _tmp7_;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	} else {
		_vala__result_ = G_MAXUINT;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
}

static gboolean
proton_plus_models_games_remote_awacy_game_source_real_load_co (ProtonPlusModelsGamesRemoteAwacyGameSourceLoadData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, (GBoxedCopyFunc) proton_plus_models_games_steam_awacy_game_ref, (GDestroyNotify) proton_plus_models_games_steam_awacy_game_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->games = _data_->_tmp0_;
	_data_->_state_ = 1;
	proton_plus_utils_web_get_request (PROTON_PLUS_MODELS_GAMES_REMOTE_AWACY_GAME_SOURCE_GAMES_URI, PROTON_PLUS_UTILS_WEB_GET_REQUEST_TYPE_OTHER, _data_->cancellable, proton_plus_models_games_remote_awacy_game_source_load_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_utils_web_get_request_finish (_data_->_res_);
	_data_->response = _data_->_tmp1_;
	_data_->_tmp4_ = _data_->response;
	if (_data_->_tmp4_ == NULL) {
		_data_->_tmp3_ = TRUE;
	} else {
		_data_->_tmp5_ = _data_->response;
		_data_->_tmp6_ = proton_plus_utils_web_response_get_code (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, PROTON_PLUS_UTILS_WEB_TYPE_RESPONSE, ProtonPlusUtilsWebResponse));
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp3_ = _data_->_tmp7_ != PROTON_PLUS_RETURN_CODE_VALID_REQUEST;
	}
	if (_data_->_tmp3_) {
		_data_->_tmp2_ = TRUE;
	} else {
		_data_->_tmp8_ = _data_->response;
		_data_->_tmp9_ = proton_plus_utils_web_response_get_body (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp8_, PROTON_PLUS_UTILS_WEB_TYPE_RESPONSE, ProtonPlusUtilsWebResponse));
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp2_ = _data_->_tmp10_ == NULL;
	}
	if (_data_->_tmp2_) {
		_data_->result = _data_->games;
		_g_object_unref0 (_data_->response);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp11_ = _data_->response;
	_data_->_tmp12_ = proton_plus_utils_web_response_get_body (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, PROTON_PLUS_UTILS_WEB_TYPE_RESPONSE, ProtonPlusUtilsWebResponse));
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = proton_plus_utils_parser_get_node_from_json ((const gchar*) _data_->_tmp13_);
	_data_->root_node = _data_->_tmp14_;
	_data_->_tmp16_ = _data_->root_node;
	if (_data_->_tmp16_ == NULL) {
		_data_->_tmp15_ = TRUE;
	} else {
		_data_->_tmp17_ = _data_->root_node;
		_data_->_tmp15_ = json_node_get_node_type (_data_->_tmp17_) != JSON_NODE_ARRAY;
	}
	if (_data_->_tmp15_) {
		_data_->result = _data_->games;
		__vala_JsonNode_free0 (_data_->root_node);
		_g_object_unref0 (_data_->response);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp18_ = _data_->root_node;
	_data_->_tmp19_ = json_node_get_array (_data_->_tmp18_);
	_data_->_tmp20_ = _json_array_ref0 (_data_->_tmp19_);
	_data_->root_array = _data_->_tmp20_;
	_data_->_tmp21_ = _data_->root_array;
	if (_data_->_tmp21_ == NULL) {
		_data_->result = _data_->games;
		_json_array_unref0 (_data_->root_array);
		__vala_JsonNode_free0 (_data_->root_node);
		_g_object_unref0 (_data_->response);
		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_->i = 0;
		{
			_data_->_tmp22_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp22_) {
					_data_->_tmp23_ = _data_->i;
					_data_->i = _data_->_tmp23_ + 1;
				}
				_data_->_tmp22_ = FALSE;
				_data_->_tmp24_ = _data_->root_array;
				if (!(((guint) _data_->i) < json_array_get_length (_data_->_tmp24_))) {
					break;
				}
				_data_->_tmp25_ = _data_->root_array;
				_data_->_tmp26_ = json_array_get_object_element (_data_->_tmp25_, (guint) _data_->i);
				_data_->_tmp27_ = _json_object_ref0 (_data_->_tmp26_);
				_data_->object = _data_->_tmp27_;
				_data_->_tmp28_ = _data_->object;
				_data_->_tmp29_ = json_object_get_object_member (_data_->_tmp28_, "storeIds");
				_data_->_tmp30_ = _json_object_ref0 (_data_->_tmp29_);
				_data_->storeids_object = _data_->_tmp30_;
				_data_->_tmp32_ = _data_->storeids_object;
				if (_data_->_tmp32_ == NULL) {
					_data_->_tmp31_ = TRUE;
				} else {
					_data_->_tmp33_ = _data_->storeids_object;
					_data_->_tmp31_ = !json_object_has_member (_data_->_tmp33_, "steam");
				}
				if (_data_->_tmp31_) {
					_json_object_unref0 (_data_->storeids_object);
					_json_object_unref0 (_data_->object);
					continue;
				}
				_data_->appid = (guint) 0;
				_data_->_tmp34_ = _data_->storeids_object;
				_data_->_tmp35_ = json_object_get_string_member (_data_->_tmp34_, "steam");
				_data_->_tmp36_ = 0U;
				_data_->_tmp37_ = uint_try_parse (_data_->_tmp35_, &_data_->_tmp36_, NULL, (guint) 0);
				_data_->appid = _data_->_tmp36_;
				if (!_data_->_tmp37_) {
					_json_object_unref0 (_data_->storeids_object);
					_json_object_unref0 (_data_->object);
					continue;
				}
				_data_->_tmp39_ = _data_->object;
				if (!json_object_has_member (_data_->_tmp39_, "slug")) {
					_data_->_tmp38_ = TRUE;
				} else {
					_data_->_tmp40_ = _data_->object;
					_data_->_tmp38_ = !json_object_has_member (_data_->_tmp40_, "status");
				}
				if (_data_->_tmp38_) {
					_json_object_unref0 (_data_->storeids_object);
					_json_object_unref0 (_data_->object);
					continue;
				}
				_data_->_tmp41_ = _data_->games;
				_data_->_tmp42_ = _data_->object;
				_data_->_tmp43_ = json_object_get_string_member (_data_->_tmp42_, "slug");
				_data_->_tmp44_ = _data_->object;
				_data_->_tmp45_ = json_object_get_string_member (_data_->_tmp44_, "status");
				_data_->_tmp46_ = proton_plus_models_games_steam_awacy_game_new (_data_->appid, _data_->_tmp43_, _data_->_tmp45_);
				_data_->_tmp47_ = _data_->_tmp46_;
				gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp41_, (gpointer) ((guintptr) _data_->appid), _data_->_tmp47_);
				_proton_plus_models_games_steam_awacy_game_unref0 (_data_->_tmp47_);
				_json_object_unref0 (_data_->storeids_object);
				_json_object_unref0 (_data_->object);
			}
		}
	}
	_data_->result = _data_->games;
	_json_array_unref0 (_data_->root_array);
	__vala_JsonNode_free0 (_data_->root_node);
	_g_object_unref0 (_data_->response);
	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;
}

ProtonPlusModelsGamesRemoteAwacyGameSource*
proton_plus_models_games_remote_awacy_game_source_construct (GType object_type)
{
	ProtonPlusModelsGamesRemoteAwacyGameSource * self = NULL;
	self = (ProtonPlusModelsGamesRemoteAwacyGameSource*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusModelsGamesRemoteAwacyGameSource*
proton_plus_models_games_remote_awacy_game_source_new (void)
{
	return proton_plus_models_games_remote_awacy_game_source_construct (PROTON_PLUS_MODELS_GAMES_TYPE_REMOTE_AWACY_GAME_SOURCE);
}

static void
proton_plus_models_games_remote_awacy_game_source_class_init (ProtonPlusModelsGamesRemoteAwacyGameSourceClass * klass,
                                                              gpointer klass_data)
{
	proton_plus_models_games_remote_awacy_game_source_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_models_games_remote_awacy_game_source_proton_plus_models_games_awacy_game_source_interface_init (ProtonPlusModelsGamesAwacyGameSourceIface * iface,
                                                                                                             gpointer iface_data)
{
	proton_plus_models_games_remote_awacy_game_source_proton_plus_models_games_awacy_game_source_parent_iface = g_type_interface_peek_parent (iface);
	iface->load = (void (*) (ProtonPlusModelsGamesAwacyGameSource*, GCancellable*, GAsyncReadyCallback, gpointer)) proton_plus_models_games_remote_awacy_game_source_real_load;
	iface->load_finish = (GeeHashMap* (*) (ProtonPlusModelsGamesAwacyGameSource*, GAsyncResult*)) proton_plus_models_games_remote_awacy_game_source_load_finish;
}

static void
proton_plus_models_games_remote_awacy_game_source_instance_init (ProtonPlusModelsGamesRemoteAwacyGameSource * self,
                                                                 gpointer klass)
{
}

static GType
proton_plus_models_games_remote_awacy_game_source_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGamesRemoteAwacyGameSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_games_remote_awacy_game_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsGamesRemoteAwacyGameSource), 0, (GInstanceInitFunc) proton_plus_models_games_remote_awacy_game_source_instance_init, NULL };
	static const GInterfaceInfo proton_plus_models_games_awacy_game_source_info = { (GInterfaceInitFunc) proton_plus_models_games_remote_awacy_game_source_proton_plus_models_games_awacy_game_source_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_models_games_remote_awacy_game_source_type_id;
	proton_plus_models_games_remote_awacy_game_source_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsGamesRemoteAwacyGameSource", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_models_games_remote_awacy_game_source_type_id, PROTON_PLUS_MODELS_GAMES_TYPE_AWACY_GAME_SOURCE, &proton_plus_models_games_awacy_game_source_info);
	return proton_plus_models_games_remote_awacy_game_source_type_id;
}

GType
proton_plus_models_games_remote_awacy_game_source_get_type (void)
{
	static volatile gsize proton_plus_models_games_remote_awacy_game_source_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_games_remote_awacy_game_source_type_id__once)) {
		GType proton_plus_models_games_remote_awacy_game_source_type_id;
		proton_plus_models_games_remote_awacy_game_source_type_id = proton_plus_models_games_remote_awacy_game_source_get_type_once ();
		g_once_init_leave (&proton_plus_models_games_remote_awacy_game_source_type_id__once, proton_plus_models_games_remote_awacy_game_source_type_id);
	}
	return proton_plus_models_games_remote_awacy_game_source_type_id__once;
}

static inline gpointer
proton_plus_models_games_awacy_game_catalog_get_instance_private (ProtonPlusModelsGamesAwacyGameCatalog* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsGamesAwacyGameCatalog_private_offset);
}

ProtonPlusModelsGamesAwacyGameCatalog*
proton_plus_models_games_awacy_game_catalog_construct (GType object_type,
                                                       ProtonPlusModelsGamesAwacyGameSource* source,
                                                       guint timeout_milliseconds)
{
	ProtonPlusModelsGamesAwacyGameCatalog * self = NULL;
	ProtonPlusModelsGamesAwacyGameSource* _tmp0_ = NULL;
	ProtonPlusModelsGamesAwacyGameSource* _tmp1_;
	ProtonPlusModelsGamesAwacyGameSource* _tmp3_;
	self = (ProtonPlusModelsGamesAwacyGameCatalog*) g_object_new (object_type, NULL);
	_tmp1_ = _g_object_ref0 (source);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		ProtonPlusModelsGamesRemoteAwacyGameSource* _tmp2_;
		_tmp2_ = proton_plus_models_games_remote_awacy_game_source_new ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (ProtonPlusModelsGamesAwacyGameSource*) _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->source);
	self->priv->source = _tmp3_;
	self->priv->timeout_milliseconds = timeout_milliseconds;
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusModelsGamesAwacyGameCatalog*
proton_plus_models_games_awacy_game_catalog_new (ProtonPlusModelsGamesAwacyGameSource* source,
                                                 guint timeout_milliseconds)
{
	return proton_plus_models_games_awacy_game_catalog_construct (PROTON_PLUS_MODELS_GAMES_TYPE_AWACY_GAME_CATALOG, source, timeout_milliseconds);
}

ProtonPlusModelsGamesAwacyGameCatalog*
proton_plus_models_games_awacy_game_catalog_get_shared (void)
{
	ProtonPlusModelsGamesAwacyGameCatalog* _tmp0_;
	ProtonPlusModelsGamesAwacyGameCatalog* _tmp2_;
	ProtonPlusModelsGamesAwacyGameCatalog* _tmp3_;
	ProtonPlusModelsGamesAwacyGameCatalog* result;
	_tmp0_ = proton_plus_models_games_awacy_game_catalog_shared_catalog;
	if (_tmp0_ == NULL) {
		ProtonPlusModelsGamesAwacyGameCatalog* _tmp1_;
		_tmp1_ = proton_plus_models_games_awacy_game_catalog_new (NULL, PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_DEFAULT_TIMEOUT_MILLISECONDS);
		_g_object_unref0 (proton_plus_models_games_awacy_game_catalog_shared_catalog);
		proton_plus_models_games_awacy_game_catalog_shared_catalog = _tmp1_;
	}
	_tmp2_ = proton_plus_models_games_awacy_game_catalog_shared_catalog;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, PROTON_PLUS_MODELS_GAMES_TYPE_AWACY_GAME_CATALOG, ProtonPlusModelsGamesAwacyGameCatalog));
	result = _tmp3_;
	return result;
}

static void
proton_plus_models_games_awacy_game_catalog_get_games_data_free (gpointer _data)
{
	ProtonPlusModelsGamesAwacyGameCatalogGetGamesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsGamesAwacyGameCatalogGetGamesData, _data_);
}

void
proton_plus_models_games_awacy_game_catalog_get_games (ProtonPlusModelsGamesAwacyGameCatalog* self,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	ProtonPlusModelsGamesAwacyGameCatalogGetGamesData* _data_;
	ProtonPlusModelsGamesAwacyGameCatalog* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusModelsGamesAwacyGameCatalogGetGamesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_games_awacy_game_catalog_get_games_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_models_games_awacy_game_catalog_get_games_co (_data_);
}

GeeHashMap*
proton_plus_models_games_awacy_game_catalog_get_games_finish (ProtonPlusModelsGamesAwacyGameCatalog* self,
                                                              GAsyncResult* _res_)
{
	GeeHashMap* result;
	ProtonPlusModelsGamesAwacyGameCatalogGetGamesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block60Data*
block60_data_ref (Block60Data* _data60_)
{
	g_atomic_int_inc (&_data60_->_ref_count_);
	return _data60_;
}

static void
block60_data_unref (void * _userdata_)
{
	Block60Data* _data60_;
	_data60_ = (Block60Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data60_->_ref_count_)) {
		ProtonPlusModelsGamesAwacyGameCatalog* self;
		self = _data60_->self;
		_g_object_unref0 (_data60_->cancellable);
		_g_object_unref0 (self);
		g_slice_free (Block60Data, _data60_);
	}
}

static void
___lambda24_ (Block60Data* _data60_)
{
	ProtonPlusModelsGamesAwacyGameCatalog* self;
	self = _data60_->self;
	proton_plus_models_games_awacy_game_catalog_get_games_co (_data60_->_async_data_);
}

static void
____lambda24__proton_plus_models_games_awacy_game_catalog_fetch_completed (ProtonPlusModelsGamesAwacyGameCatalog* _sender,
                                                                           gpointer self)
{
	___lambda24_ (self);
}

static gboolean
___lambda25_ (Block60Data* _data60_)
{
	ProtonPlusModelsGamesAwacyGameCatalog* self;
	GCancellable* _tmp0_;
	gboolean result;
	self = _data60_->self;
	_data60_->timeout_source_id = (guint) 0;
	_tmp0_ = _data60_->cancellable;
	g_cancellable_cancel (_tmp0_);
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
____lambda25__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda25_ (self);
	return result;
}

static void
proton_plus_models_games_awacy_game_catalog_get_games_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_)
{
	ProtonPlusModelsGamesAwacyGameCatalogGetGamesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_games_awacy_game_catalog_get_games_co (_data_);
}

static gboolean
proton_plus_models_games_awacy_game_catalog_get_games_co (ProtonPlusModelsGamesAwacyGameCatalogGetGamesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data60_ = g_slice_new0 (Block60Data);
	_data_->_data60_->_ref_count_ = 1;
	_data_->_data60_->self = g_object_ref (_data_->self);
	_data_->_data60_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->cached_games;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->priv->cached_games;
		_data_->_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, GEE_TYPE_HASH_MAP, GeeHashMap));
		_data_->result = _data_->_tmp2_;
		block60_data_unref (_data_->_data60_);
		_data_->_data60_ = 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_->self->priv->is_loading) {
		_data_->_tmp3_ = g_signal_connect_data (_data_->self, "fetch-completed", (GCallback) ____lambda24__proton_plus_models_games_awacy_game_catalog_fetch_completed, block60_data_ref (_data_->_data60_), (GClosureNotify) block60_data_unref, 0);
		_data_->handler_id = _data_->_tmp3_;
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		g_signal_handler_disconnect ((GObject*) _data_->self, _data_->handler_id);
		_data_->_tmp4_ = _data_->self->priv->cached_games;
		_data_->_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp4_, GEE_TYPE_HASH_MAP, GeeHashMap));
		_data_->result = _data_->_tmp5_;
		block60_data_unref (_data_->_data60_);
		_data_->_data60_ = 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_->self->priv->is_loading = TRUE;
	_data_->_tmp6_ = g_cancellable_new ();
	_data_->_data60_->cancellable = _data_->_tmp6_;
	_data_->_data60_->timeout_source_id = (guint) 0;
	if (_data_->self->priv->timeout_milliseconds > ((guint) 0)) {
		_data_->_data60_->timeout_source_id = g_timeout_add_full (G_PRIORITY_DEFAULT, _data_->self->priv->timeout_milliseconds, ____lambda25__gsource_func, block60_data_ref (_data_->_data60_), block60_data_unref);
	}
	_data_->_tmp7_ = _data_->self->priv->source;
	_data_->_tmp8_ = _data_->_data60_->cancellable;
	_data_->_state_ = 2;
	proton_plus_models_games_awacy_game_source_load (_data_->_tmp7_, _data_->_tmp8_, proton_plus_models_games_awacy_game_catalog_get_games_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp9_ = proton_plus_models_games_awacy_game_source_load_finish (_data_->_tmp7_, _data_->_res_);
	_data_->loaded_games = _data_->_tmp9_;
	_data_->_tmp11_ = _data_->loaded_games;
	_data_->_tmp12_ = _g_object_ref0 (_data_->_tmp11_);
	_data_->_tmp10_ = _data_->_tmp12_;
	if (_data_->_tmp10_ == NULL) {
		_data_->_tmp13_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, (GBoxedCopyFunc) proton_plus_models_games_steam_awacy_game_ref, (GDestroyNotify) proton_plus_models_games_steam_awacy_game_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
		_g_object_unref0 (_data_->_tmp10_);
		_data_->_tmp10_ = _data_->_tmp13_;
	}
	_data_->_tmp14_ = _data_->_tmp10_;
	_data_->_tmp10_ = NULL;
	_g_object_unref0 (_data_->self->priv->cached_games);
	_data_->self->priv->cached_games = _data_->_tmp14_;
	if (_data_->_data60_->timeout_source_id != ((guint) 0)) {
		g_source_remove (_data_->_data60_->timeout_source_id);
	}
	_data_->self->priv->is_loading = FALSE;
	g_signal_emit (_data_->self, proton_plus_models_games_awacy_game_catalog_signals[PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_FETCH_COMPLETED_SIGNAL], 0);
	_data_->_tmp15_ = _data_->self->priv->cached_games;
	_data_->_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp15_, GEE_TYPE_HASH_MAP, GeeHashMap));
	_data_->result = _data_->_tmp16_;
	_g_object_unref0 (_data_->_tmp10_);
	_g_object_unref0 (_data_->loaded_games);
	block60_data_unref (_data_->_data60_);
	_data_->_data60_ = 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_models_games_awacy_game_catalog_class_init (ProtonPlusModelsGamesAwacyGameCatalogClass * klass,
                                                        gpointer klass_data)
{
	proton_plus_models_games_awacy_game_catalog_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsGamesAwacyGameCatalog_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_games_awacy_game_catalog_finalize;
	proton_plus_models_games_awacy_game_catalog_signals[PROTON_PLUS_MODELS_GAMES_AWACY_GAME_CATALOG_FETCH_COMPLETED_SIGNAL] = g_signal_new ("fetch-completed", PROTON_PLUS_MODELS_GAMES_TYPE_AWACY_GAME_CATALOG, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
proton_plus_models_games_awacy_game_catalog_instance_init (ProtonPlusModelsGamesAwacyGameCatalog * self,
                                                           gpointer klass)
{
	self->priv = proton_plus_models_games_awacy_game_catalog_get_instance_private (self);
}

static void
proton_plus_models_games_awacy_game_catalog_finalize (GObject * obj)
{
	ProtonPlusModelsGamesAwacyGameCatalog * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_GAMES_TYPE_AWACY_GAME_CATALOG, ProtonPlusModelsGamesAwacyGameCatalog);
	_g_object_unref0 (self->priv->source);
	_g_object_unref0 (self->priv->cached_games);
	G_OBJECT_CLASS (proton_plus_models_games_awacy_game_catalog_parent_class)->finalize (obj);
}

static GType
proton_plus_models_games_awacy_game_catalog_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGamesAwacyGameCatalogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_games_awacy_game_catalog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsGamesAwacyGameCatalog), 0, (GInstanceInitFunc) proton_plus_models_games_awacy_game_catalog_instance_init, NULL };
	GType proton_plus_models_games_awacy_game_catalog_type_id;
	proton_plus_models_games_awacy_game_catalog_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsGamesAwacyGameCatalog", &g_define_type_info, 0);
	ProtonPlusModelsGamesAwacyGameCatalog_private_offset = g_type_add_instance_private (proton_plus_models_games_awacy_game_catalog_type_id, sizeof (ProtonPlusModelsGamesAwacyGameCatalogPrivate));
	return proton_plus_models_games_awacy_game_catalog_type_id;
}

GType
proton_plus_models_games_awacy_game_catalog_get_type (void)
{
	static volatile gsize proton_plus_models_games_awacy_game_catalog_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_games_awacy_game_catalog_type_id__once)) {
		GType proton_plus_models_games_awacy_game_catalog_type_id;
		proton_plus_models_games_awacy_game_catalog_type_id = proton_plus_models_games_awacy_game_catalog_get_type_once ();
		g_once_init_leave (&proton_plus_models_games_awacy_game_catalog_type_id__once, proton_plus_models_games_awacy_game_catalog_type_id);
	}
	return proton_plus_models_games_awacy_game_catalog_type_id__once;
}

static inline gpointer
proton_plus_models_games_steam_get_instance_private (ProtonPlusModelsGamesSteam* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsGamesSteam_private_offset);
}

ProtonPlusModelsGamesSteam*
proton_plus_models_games_steam_construct (GType object_type,
                                          guint appid,
                                          const gchar* name,
                                          const gchar* game_folder_name,
                                          gint library_folder_id,
                                          const gchar* library_folder_path,
                                          ProtonPlusModelsLaunchersSteam* launcher)
{
	ProtonPlusModelsGamesSteam * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (game_folder_name != NULL, NULL);
	g_return_val_if_fail (library_folder_path != NULL, NULL);
	g_return_val_if_fail (launcher != NULL, NULL);
	_tmp0_ = g_build_filename (library_folder_path, "steamapps", "common", game_folder_name, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("%u", appid);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_build_filename (library_folder_path, "steamapps", "compatdata", _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	self = (ProtonPlusModelsGamesSteam*) proton_plus_models_game_construct (object_type, name, _tmp1_, _tmp5_, appid, (ProtonPlusModelsLauncher*) launcher);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	proton_plus_models_games_steam_set_appid (self, appid);
	proton_plus_models_games_steam_set_library_folder_id (self, library_folder_id);
	proton_plus_models_games_steam_set_library_folder_path (self, library_folder_path);
	proton_plus_models_game_set_launcher ((ProtonPlusModelsGame*) self, (ProtonPlusModelsLauncher*) launcher);
	return self;
}

ProtonPlusModelsGamesSteam*
proton_plus_models_games_steam_new (guint appid,
                                    const gchar* name,
                                    const gchar* game_folder_name,
                                    gint library_folder_id,
                                    const gchar* library_folder_path,
                                    ProtonPlusModelsLaunchersSteam* launcher)
{
	return proton_plus_models_games_steam_construct (PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, appid, name, game_folder_name, library_folder_id, library_folder_path, launcher);
}

ProtonPlusModelsGamesSteam*
proton_plus_models_games_steam_construct_non_steam (GType object_type,
                                                    guint appid,
                                                    const gchar* name,
                                                    const gchar* launch_options,
                                                    const gchar* compatibility_tool,
                                                    ProtonPlusModelsLaunchersSteam* launcher)
{
	ProtonPlusModelsGamesSteam * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (launch_options != NULL, NULL);
	g_return_val_if_fail (compatibility_tool != NULL, NULL);
	g_return_val_if_fail (launcher != NULL, NULL);
	_tmp0_ = ((ProtonPlusModelsLauncher*) launcher)->directory;
	_tmp1_ = g_strdup_printf ("%s/steamapps/compatdata/%u", _tmp0_, appid);
	_tmp2_ = _tmp1_;
	self = (ProtonPlusModelsGamesSteam*) proton_plus_models_game_construct (object_type, name, "", _tmp2_, appid, (ProtonPlusModelsLauncher*) launcher);
	_g_free0 (_tmp2_);
	proton_plus_models_games_steam_set_appid (self, appid);
	proton_plus_models_games_steam_set_launch_options (self, launch_options);
	proton_plus_models_game_set_compatibility_tool ((ProtonPlusModelsGame*) self, compatibility_tool);
	proton_plus_models_games_steam_set_is_non_steam (self, TRUE);
	return self;
}

ProtonPlusModelsGamesSteam*
proton_plus_models_games_steam_new_non_steam (guint appid,
                                              const gchar* name,
                                              const gchar* launch_options,
                                              const gchar* compatibility_tool,
                                              ProtonPlusModelsLaunchersSteam* launcher)
{
	return proton_plus_models_games_steam_construct_non_steam (PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, appid, name, launch_options, compatibility_tool, launcher);
}

static gboolean
proton_plus_models_games_steam_detect_native (ProtonPlusModelsGamesSteam* self)
{
	ProtonPlusModelsLaunchersSteam* steam_launcher = NULL;
	ProtonPlusModelsLauncher* _tmp0_;
	ProtonPlusModelsLauncher* _tmp1_;
	ProtonPlusModelsLaunchersSteam* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ProtonPlusModelsLaunchersSteam* _tmp4_;
	gboolean _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = proton_plus_models_game_get_launcher ((ProtonPlusModelsGame*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp1_) ? ((ProtonPlusModelsLaunchersSteam*) _tmp1_) : NULL);
	steam_launcher = _tmp2_;
	_tmp4_ = steam_launcher;
	if (_tmp4_ != NULL) {
		ProtonPlusModelsLaunchersSteam* _tmp5_;
		guint _tmp6_;
		_tmp5_ = steam_launcher;
		_tmp6_ = self->priv->_appid;
		_tmp3_ = proton_plus_models_launchers_steam_has_explicit_compatibility_tool_mapping (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam), _tmp6_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ProtonPlusModelsCompatibilityTool* selected_tool = NULL;
		ProtonPlusModelsLaunchersSteam* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		ProtonPlusModelsCompatibilityTool* _tmp10_;
		ProtonPlusModelsCompatibilityToolRuntimeKind runtime_kind = 0;
		ProtonPlusModelsCompatibilityTool* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		_tmp7_ = steam_launcher;
		_tmp8_ = proton_plus_models_game_get_compatibility_tool ((ProtonPlusModelsGame*) self);
		_tmp9_ = _tmp8_;
		_tmp10_ = proton_plus_models_launchers_steam_resolve_effective_compatibility_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam), _tmp9_);
		selected_tool = _tmp10_;
		_tmp11_ = selected_tool;
		runtime_kind = proton_plus_models_launchers_steam_get_compatibility_tool_runtime_kind (_tmp11_);
		if (runtime_kind == PROTON_PLUS_MODELS_COMPATIBILITY_TOOL_RUNTIME_KIND_NATIVE) {
			result = TRUE;
			_g_object_unref0 (selected_tool);
			_g_object_unref0 (steam_launcher);
			return result;
		}
		if (runtime_kind == PROTON_PLUS_MODELS_COMPATIBILITY_TOOL_RUNTIME_KIND_PROTON) {
			result = FALSE;
			_g_object_unref0 (selected_tool);
			_g_object_unref0 (steam_launcher);
			return result;
		}
		_tmp12_ = proton_plus_models_game_get_compatibility_tool ((ProtonPlusModelsGame*) self);
		_tmp13_ = _tmp12_;
		if (proton_plus_models_launchers_steam_is_steam_linux_runtime ("", _tmp13_)) {
			result = TRUE;
			_g_object_unref0 (selected_tool);
			_g_object_unref0 (steam_launcher);
			return result;
		}
		result = FALSE;
		_g_object_unref0 (selected_tool);
		_g_object_unref0 (steam_launcher);
		return result;
	}
	_tmp14_ = self->priv->_is_non_steam;
	if (_tmp14_) {
		result = TRUE;
		_g_object_unref0 (steam_launcher);
		return result;
	}
	_tmp15_ = proton_plus_models_game_get_installdir ((ProtonPlusModelsGame*) self);
	_tmp16_ = _tmp15_;
	if (g_file_test (_tmp16_, G_FILE_TEST_IS_DIR)) {
		{
			GDir* dir = NULL;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			GDir* _tmp19_;
			gchar* name = NULL;
			_tmp17_ = proton_plus_models_game_get_installdir ((ProtonPlusModelsGame*) self);
			_tmp18_ = _tmp17_;
			_tmp19_ = g_dir_open (_tmp18_, (guint) 0, &_inner_error0_);
			dir = _tmp19_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			while (TRUE) {
				GDir* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
				const gchar* _tmp23_;
				gchar* path = NULL;
				const gchar* _tmp24_;
				const gchar* _tmp25_;
				const gchar* _tmp26_;
				gchar* _tmp27_;
				gboolean _tmp28_ = FALSE;
				const gchar* _tmp29_;
				_tmp20_ = dir;
				_tmp21_ = g_dir_read_name (_tmp20_);
				_tmp22_ = g_strdup (_tmp21_);
				_g_free0 (name);
				name = _tmp22_;
				_tmp23_ = name;
				if (!(_tmp23_ != NULL)) {
					break;
				}
				_tmp24_ = proton_plus_models_game_get_installdir ((ProtonPlusModelsGame*) self);
				_tmp25_ = _tmp24_;
				_tmp26_ = name;
				_tmp27_ = g_build_filename (_tmp25_, _tmp26_, NULL);
				path = _tmp27_;
				_tmp29_ = path;
				if (g_file_test (_tmp29_, G_FILE_TEST_IS_REGULAR)) {
					const gchar* _tmp30_;
					_tmp30_ = path;
					_tmp28_ = g_file_test (_tmp30_, G_FILE_TEST_IS_EXECUTABLE);
				} else {
					_tmp28_ = FALSE;
				}
				if (_tmp28_) {
					FILE* file = NULL;
					const gchar* _tmp31_;
					FILE* _tmp32_;
					FILE* _tmp33_;
					_tmp31_ = path;
					_tmp32_ = g_fopen (_tmp31_, "r");
					file = _tmp32_;
					_tmp33_ = file;
					if (_tmp33_ != NULL) {
						guint8 magic[4] = {0};
						FILE* _tmp34_;
						_tmp34_ = file;
						if (fread (magic, (gsize) 1, (gint) 4, _tmp34_) == ((gsize) 4)) {
							gboolean _tmp35_ = FALSE;
							gboolean _tmp36_ = FALSE;
							gboolean _tmp37_ = FALSE;
							guint8 _tmp38_;
							_tmp38_ = magic[0];
							if (((gint) _tmp38_) == 0x7f) {
								guint8 _tmp39_;
								_tmp39_ = magic[1];
								_tmp37_ = _tmp39_ == ((guint8) 'E');
							} else {
								_tmp37_ = FALSE;
							}
							if (_tmp37_) {
								guint8 _tmp40_;
								_tmp40_ = magic[2];
								_tmp36_ = _tmp40_ == ((guint8) 'L');
							} else {
								_tmp36_ = FALSE;
							}
							if (_tmp36_) {
								guint8 _tmp41_;
								_tmp41_ = magic[3];
								_tmp35_ = _tmp41_ == ((guint8) 'F');
							} else {
								_tmp35_ = FALSE;
							}
							if (_tmp35_) {
								result = TRUE;
								_fclose0 (file);
								_g_free0 (path);
								_g_free0 (name);
								_g_dir_close0 (dir);
								_g_object_unref0 (steam_launcher);
								return result;
							}
						}
					}
					_fclose0 (file);
				}
				_g_free0 (path);
			}
			_g_free0 (name);
			_g_dir_close0 (dir);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			const gchar* _tmp42_;
			const gchar* _tmp43_;
			GError* _tmp44_;
			const gchar* _tmp45_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp42_ = proton_plus_models_game_get_installdir ((ProtonPlusModelsGame*) self);
			_tmp43_ = _tmp42_;
			_tmp44_ = e;
			_tmp45_ = _tmp44_->message;
			g_debug ("steam.vala:209: Could not inspect %s for native executables: %s", _tmp43_, _tmp45_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp46_ = FALSE;
			_g_object_unref0 (steam_launcher);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp46_;
		}
	}
	result = FALSE;
	_g_object_unref0 (steam_launcher);
	return result;
}

static gboolean
proton_plus_models_games_steam_real_change_compatibility_tool (ProtonPlusModelsGame* base,
                                                               const gchar* compatibility_tool)
{
	ProtonPlusModelsGamesSteam * self;
	ProtonPlusServicesSteamConfigurationService* configuration = NULL;
	ProtonPlusServicesSteamConfigurationService* _tmp0_;
	ProtonPlusServicesSteamConfigurationService* _tmp1_;
	ProtonPlusServicesSteamConfigurationService* _tmp2_;
	ProtonPlusServicesSteamConfigurationService* _tmp3_;
	ProtonPlusServicesSteamConfigurationMutation* outcome = NULL;
	ProtonPlusServicesSteamConfigurationService* _tmp4_;
	ProtonPlusServicesSteamConfigurationMutation* _tmp5_;
	ProtonPlusServicesSteamConfigurationMutation* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ProtonPlusModelsLaunchersSteam* configured_launcher = NULL;
	ProtonPlusModelsLauncher* _tmp9_;
	ProtonPlusModelsLauncher* _tmp10_;
	ProtonPlusModelsLaunchersSteam* _tmp11_;
	ProtonPlusModelsLaunchersSteam* _tmp12_;
	gboolean result;
	self = (ProtonPlusModelsGamesSteam*) base;
	g_return_val_if_fail (compatibility_tool != NULL, FALSE);
	_tmp0_ = proton_plus_services_steam_configuration_service_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	configuration = _tmp2_;
	_tmp3_ = configuration;
	if (_tmp3_ == NULL) {
		g_warning ("steam.vala:219: Steam compatibility change rejected because SteamConfi" \
"gurationService is not configured.");
		result = FALSE;
		_g_object_unref0 (configuration);
		return result;
	}
	_tmp4_ = configuration;
	_tmp5_ = proton_plus_services_steam_configuration_service_change_game_compatibility_tool (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_SERVICES_TYPE_STEAM_CONFIGURATION_SERVICE, ProtonPlusServicesSteamConfigurationService), self, compatibility_tool);
	outcome = _tmp5_;
	_tmp6_ = outcome;
	_tmp7_ = proton_plus_services_steam_configuration_mutation_get_accepted (_tmp6_);
	_tmp8_ = _tmp7_;
	if (!_tmp8_) {
		result = FALSE;
		_g_object_unref0 (outcome);
		_g_object_unref0 (configuration);
		return result;
	}
	_tmp9_ = proton_plus_models_game_get_launcher ((ProtonPlusModelsGame*) self);
	_tmp10_ = _tmp9_;
	_tmp11_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp10_) ? ((ProtonPlusModelsLaunchersSteam*) _tmp10_) : NULL);
	configured_launcher = _tmp11_;
	_tmp12_ = configured_launcher;
	if (_tmp12_ != NULL) {
		ProtonPlusModelsLaunchersSteam* _tmp13_;
		guint _tmp14_;
		_tmp13_ = configured_launcher;
		_tmp14_ = self->priv->_appid;
		proton_plus_models_launchers_steam_update_game_compatibility_tool_mapping (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam), _tmp14_, compatibility_tool);
	}
	proton_plus_models_game_set_compatibility_tool ((ProtonPlusModelsGame*) self, compatibility_tool);
	_g_free0 (self->priv->_is_native);
	self->priv->_is_native = NULL;
	result = TRUE;
	_g_object_unref0 (configured_launcher);
	_g_object_unref0 (outcome);
	_g_object_unref0 (configuration);
	return result;
}

void
proton_plus_models_games_steam_apply_effective_compatibility_tool (ProtonPlusModelsGamesSteam* self,
                                                                   const gchar* compatibility_tool)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (compatibility_tool != NULL);
	proton_plus_models_game_set_compatibility_tool ((ProtonPlusModelsGame*) self, compatibility_tool);
	_g_free0 (self->priv->_is_native);
	self->priv->_is_native = NULL;
}

gboolean
proton_plus_models_games_steam_change_launch_options (ProtonPlusModelsGamesSteam* self,
                                                      const gchar* launch_options,
                                                      const gchar* localconfig_path)
{
	ProtonPlusServicesSteamConfigurationService* configuration = NULL;
	ProtonPlusServicesSteamConfigurationService* _tmp0_;
	ProtonPlusServicesSteamConfigurationService* _tmp1_;
	ProtonPlusServicesSteamConfigurationService* _tmp2_;
	ProtonPlusServicesSteamConfigurationService* _tmp3_;
	ProtonPlusServicesSteamConfigurationMutation* outcome = NULL;
	ProtonPlusServicesSteamConfigurationService* _tmp4_;
	ProtonPlusServicesSteamConfigurationMutation* _tmp5_;
	ProtonPlusServicesSteamConfigurationMutation* _tmp6_;
	gboolean _tmp7_;
	gboolean _tmp8_;
	ProtonPlusModelsLaunchersSteam* configured_launcher = NULL;
	ProtonPlusModelsLauncher* _tmp9_;
	ProtonPlusModelsLauncher* _tmp10_;
	ProtonPlusModelsLaunchersSteam* _tmp11_;
	gboolean _tmp12_ = FALSE;
	ProtonPlusModelsLaunchersSteam* _tmp13_;
	ProtonPlusModelsSteamProfile* _tmp14_;
	ProtonPlusModelsSteamProfile* _tmp15_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (launch_options != NULL, FALSE);
	g_return_val_if_fail (localconfig_path != NULL, FALSE);
	_tmp0_ = proton_plus_services_steam_configuration_service_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	configuration = _tmp2_;
	_tmp3_ = configuration;
	if (_tmp3_ == NULL) {
		g_warning ("steam.vala:242: Steam launch-options change rejected because SteamConf" \
"igurationService is not configured.");
		result = FALSE;
		_g_object_unref0 (configuration);
		return result;
	}
	_tmp4_ = configuration;
	_tmp5_ = proton_plus_services_steam_configuration_service_change_game_launch_options (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, PROTON_PLUS_SERVICES_TYPE_STEAM_CONFIGURATION_SERVICE, ProtonPlusServicesSteamConfigurationService), self, launch_options, localconfig_path);
	outcome = _tmp5_;
	_tmp6_ = outcome;
	_tmp7_ = proton_plus_services_steam_configuration_mutation_get_accepted (_tmp6_);
	_tmp8_ = _tmp7_;
	if (!_tmp8_) {
		result = FALSE;
		_g_object_unref0 (outcome);
		_g_object_unref0 (configuration);
		return result;
	}
	proton_plus_models_games_steam_set_launch_options (self, launch_options);
	_tmp9_ = proton_plus_models_game_get_launcher ((ProtonPlusModelsGame*) self);
	_tmp10_ = _tmp9_;
	_tmp11_ = _g_object_ref0 (PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM (_tmp10_) ? ((ProtonPlusModelsLaunchersSteam*) _tmp10_) : NULL);
	configured_launcher = _tmp11_;
	_tmp13_ = configured_launcher;
	_tmp14_ = proton_plus_models_launchers_steam_get_profile (_tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_ != NULL) {
		ProtonPlusModelsLaunchersSteam* _tmp16_;
		ProtonPlusModelsSteamProfile* _tmp17_;
		ProtonPlusModelsSteamProfile* _tmp18_;
		GHashTable* _tmp19_;
		_tmp16_ = configured_launcher;
		_tmp17_ = proton_plus_models_launchers_steam_get_profile (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_->launch_options_hashtable;
		_tmp12_ = _tmp19_ != NULL;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		ProtonPlusModelsLaunchersSteam* _tmp20_;
		ProtonPlusModelsSteamProfile* _tmp21_;
		ProtonPlusModelsSteamProfile* _tmp22_;
		GHashTable* _tmp23_;
		guint _tmp24_;
		gchar* _tmp25_;
		_tmp20_ = configured_launcher;
		_tmp21_ = proton_plus_models_launchers_steam_get_profile (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = _tmp22_->launch_options_hashtable;
		_tmp24_ = self->priv->_appid;
		_tmp25_ = g_strdup (launch_options);
		g_hash_table_insert (_tmp23_, (gpointer) ((guintptr) _tmp24_), _tmp25_);
	}
	result = TRUE;
	_g_object_unref0 (configured_launcher);
	_g_object_unref0 (outcome);
	_g_object_unref0 (configuration);
	return result;
}

guint
proton_plus_models_games_steam_get_appid (ProtonPlusModelsGamesSteam* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_appid;
	return result;
}

void
proton_plus_models_games_steam_set_appid (ProtonPlusModelsGamesSteam* self,
                                          guint value)
{
	guint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_appid (self);
	if (old_value != value) {
		self->priv->_appid = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_APPID_PROPERTY]);
	}
}

gint
proton_plus_models_games_steam_get_library_folder_id (ProtonPlusModelsGamesSteam* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_library_folder_id;
	return result;
}

void
proton_plus_models_games_steam_set_library_folder_id (ProtonPlusModelsGamesSteam* self,
                                                      gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_library_folder_id (self);
	if (old_value != value) {
		self->priv->_library_folder_id = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_games_steam_get_library_folder_path (ProtonPlusModelsGamesSteam* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_library_folder_path;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_games_steam_set_library_folder_path (ProtonPlusModelsGamesSteam* self,
                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_library_folder_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_library_folder_path);
		self->priv->_library_folder_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_PATH_PROPERTY]);
	}
}

const gchar*
proton_plus_models_games_steam_get_awacy_name (ProtonPlusModelsGamesSteam* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_awacy_name;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_games_steam_set_awacy_name (ProtonPlusModelsGamesSteam* self,
                                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_awacy_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_awacy_name);
		self->priv->_awacy_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_NAME_PROPERTY]);
	}
}

const gchar*
proton_plus_models_games_steam_get_awacy_status (ProtonPlusModelsGamesSteam* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_awacy_status;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_games_steam_set_awacy_status (ProtonPlusModelsGamesSteam* self,
                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_awacy_status (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_awacy_status);
		self->priv->_awacy_status = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_STATUS_PROPERTY]);
	}
}

gboolean
proton_plus_models_games_steam_get_awacy_lookup_complete (ProtonPlusModelsGamesSteam* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_awacy_lookup_complete;
	return result;
}

void
proton_plus_models_games_steam_set_awacy_lookup_complete (ProtonPlusModelsGamesSteam* self,
                                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_awacy_lookup_complete (self);
	if (old_value != value) {
		self->priv->_awacy_lookup_complete = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_LOOKUP_COMPLETE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_games_steam_get_launch_options (ProtonPlusModelsGamesSteam* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launch_options;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_games_steam_set_launch_options (ProtonPlusModelsGamesSteam* self,
                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_launch_options (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_launch_options);
		self->priv->_launch_options = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_LAUNCH_OPTIONS_PROPERTY]);
	}
}

gboolean
proton_plus_models_games_steam_get_is_non_steam (ProtonPlusModelsGamesSteam* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_non_steam;
	return result;
}

void
proton_plus_models_games_steam_set_is_non_steam (ProtonPlusModelsGamesSteam* self,
                                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_games_steam_get_is_non_steam (self);
	if (old_value != value) {
		self->priv->_is_non_steam = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_IS_NON_STEAM_PROPERTY]);
	}
}

static gboolean*
_bool_dup (gboolean* self)
{
	gboolean* dup;
	dup = g_new0 (gboolean, 1);
	memcpy (dup, self, sizeof (gboolean));
	return dup;
}

static gpointer
__bool_dup0 (gpointer self)
{
	return self ? _bool_dup (self) : NULL;
}

static gboolean
proton_plus_models_games_steam_real_get_is_native (ProtonPlusModelsGame* base)
{
	gboolean result;
	ProtonPlusModelsGamesSteam* self;
	gboolean* _tmp0_;
	gboolean* _tmp3_;
	self = (ProtonPlusModelsGamesSteam*) base;
	_tmp0_ = self->priv->_is_native;
	if (_tmp0_ == NULL) {
		gboolean _tmp1_;
		gboolean* _tmp2_;
		_tmp1_ = proton_plus_models_games_steam_detect_native (self);
		_tmp2_ = __bool_dup0 (&_tmp1_);
		_g_free0 (self->priv->_is_native);
		self->priv->_is_native = _tmp2_;
	}
	_tmp3_ = self->priv->_is_native;
	result = *_tmp3_;
	return result;
}

static void
proton_plus_models_games_steam_real_set_is_native (ProtonPlusModelsGame* base,
                                                   gboolean value)
{
	ProtonPlusModelsGamesSteam* self;
	gboolean* _tmp0_;
	self = (ProtonPlusModelsGamesSteam*) base;
	_tmp0_ = __bool_dup0 (&value);
	_g_free0 (self->priv->_is_native);
	self->priv->_is_native = _tmp0_;
	g_object_notify_by_pspec ((GObject *) self, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_IS_NATIVE_PROPERTY]);
}

static inline gpointer
proton_plus_models_games_steam_awacy_game_get_instance_private (ProtonPlusModelsGamesSteamAwacyGame* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsGamesSteamAwacyGame_private_offset);
}

ProtonPlusModelsGamesSteamAwacyGame*
proton_plus_models_games_steam_awacy_game_construct (GType object_type,
                                                     guint appid,
                                                     const gchar* name,
                                                     const gchar* status)
{
	ProtonPlusModelsGamesSteamAwacyGame* self = NULL;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (status != NULL, NULL);
	self = (ProtonPlusModelsGamesSteamAwacyGame*) g_type_create_instance (object_type);
	proton_plus_models_games_steam_awacy_game_set_appid (self, appid);
	proton_plus_models_games_steam_awacy_game_set_name (self, name);
	proton_plus_models_games_steam_awacy_game_set_status (self, status);
	return self;
}

ProtonPlusModelsGamesSteamAwacyGame*
proton_plus_models_games_steam_awacy_game_new (guint appid,
                                               const gchar* name,
                                               const gchar* status)
{
	return proton_plus_models_games_steam_awacy_game_construct (PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, appid, name, status);
}

guint
proton_plus_models_games_steam_awacy_game_get_appid (ProtonPlusModelsGamesSteamAwacyGame* self)
{
	guint result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_appid;
	return result;
}

void
proton_plus_models_games_steam_awacy_game_set_appid (ProtonPlusModelsGamesSteamAwacyGame* self,
                                                     guint value)
{
	g_return_if_fail (self != NULL);
	self->priv->_appid = value;
}

const gchar*
proton_plus_models_games_steam_awacy_game_get_name (ProtonPlusModelsGamesSteamAwacyGame* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_games_steam_awacy_game_set_name (ProtonPlusModelsGamesSteamAwacyGame* self,
                                                    const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp0_;
}

const gchar*
proton_plus_models_games_steam_awacy_game_get_status (ProtonPlusModelsGamesSteamAwacyGame* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_status;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_games_steam_awacy_game_set_status (ProtonPlusModelsGamesSteamAwacyGame* self,
                                                      const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_status);
	self->priv->_status = _tmp0_;
}

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

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

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

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

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

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

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

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

void
proton_plus_models_games_steam_value_set_awacy_game (GValue* value,
                                                     gpointer v_object)
{
	ProtonPlusModelsGamesSteamAwacyGame * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		proton_plus_models_games_steam_awacy_game_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		proton_plus_models_games_steam_awacy_game_unref (old);
	}
}

void
proton_plus_models_games_steam_value_take_awacy_game (GValue* value,
                                                      gpointer v_object)
{
	ProtonPlusModelsGamesSteamAwacyGame * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		proton_plus_models_games_steam_awacy_game_unref (old);
	}
}

static void
proton_plus_models_games_steam_awacy_game_class_init (ProtonPlusModelsGamesSteamAwacyGameClass * klass,
                                                      gpointer klass_data)
{
	proton_plus_models_games_steam_awacy_game_parent_class = g_type_class_peek_parent (klass);
	((ProtonPlusModelsGamesSteamAwacyGameClass *) klass)->finalize = proton_plus_models_games_steam_awacy_game_finalize;
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsGamesSteamAwacyGame_private_offset);
}

static void
proton_plus_models_games_steam_awacy_game_instance_init (ProtonPlusModelsGamesSteamAwacyGame * self,
                                                         gpointer klass)
{
	self->priv = proton_plus_models_games_steam_awacy_game_get_instance_private (self);
	self->ref_count = 1;
}

static void
proton_plus_models_games_steam_awacy_game_finalize (ProtonPlusModelsGamesSteamAwacyGame * obj)
{
	ProtonPlusModelsGamesSteamAwacyGame * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, ProtonPlusModelsGamesSteamAwacyGame);
	g_signal_handlers_destroy (self);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_status);
}

static GType
proton_plus_models_games_steam_awacy_game_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { proton_plus_models_games_steam_value_awacy_game_init, proton_plus_models_games_steam_value_awacy_game_free_value, proton_plus_models_games_steam_value_awacy_game_copy_value, proton_plus_models_games_steam_value_awacy_game_peek_pointer, "p", proton_plus_models_games_steam_value_awacy_game_collect_value, "p", proton_plus_models_games_steam_value_awacy_game_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGamesSteamAwacyGameClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_games_steam_awacy_game_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsGamesSteamAwacyGame), 0, (GInstanceInitFunc) proton_plus_models_games_steam_awacy_game_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType proton_plus_models_games_steam_awacy_game_type_id;
	proton_plus_models_games_steam_awacy_game_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ProtonPlusModelsGamesSteamAwacyGame", &g_define_type_info, &g_define_type_fundamental_info, 0);
	ProtonPlusModelsGamesSteamAwacyGame_private_offset = g_type_add_instance_private (proton_plus_models_games_steam_awacy_game_type_id, sizeof (ProtonPlusModelsGamesSteamAwacyGamePrivate));
	return proton_plus_models_games_steam_awacy_game_type_id;
}

GType
proton_plus_models_games_steam_awacy_game_get_type (void)
{
	static volatile gsize proton_plus_models_games_steam_awacy_game_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_games_steam_awacy_game_type_id__once)) {
		GType proton_plus_models_games_steam_awacy_game_type_id;
		proton_plus_models_games_steam_awacy_game_type_id = proton_plus_models_games_steam_awacy_game_get_type_once ();
		g_once_init_leave (&proton_plus_models_games_steam_awacy_game_type_id__once, proton_plus_models_games_steam_awacy_game_type_id);
	}
	return proton_plus_models_games_steam_awacy_game_type_id__once;
}

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

void
proton_plus_models_games_steam_awacy_game_unref (gpointer instance)
{
	ProtonPlusModelsGamesSteamAwacyGame * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_GAME_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static void
proton_plus_models_games_steam_class_init (ProtonPlusModelsGamesSteamClass * klass,
                                           gpointer klass_data)
{
	proton_plus_models_games_steam_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsGamesSteam_private_offset);
	((ProtonPlusModelsGameClass *) klass)->change_compatibility_tool = (gboolean (*) (ProtonPlusModelsGame*, const gchar*)) proton_plus_models_games_steam_real_change_compatibility_tool;
	PROTON_PLUS_MODELS_GAME_CLASS (klass)->get_is_native = (gboolean (*) (ProtonPlusModelsGame*)) proton_plus_models_games_steam_real_get_is_native;
	PROTON_PLUS_MODELS_GAME_CLASS (klass)->set_is_native = (void (*) (ProtonPlusModelsGame*, gboolean)) proton_plus_models_games_steam_real_set_is_native;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_games_steam_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_games_steam_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_games_steam_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_APPID_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_APPID_PROPERTY] = g_param_spec_uint ("appid", "appid", "appid", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_ID_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_ID_PROPERTY] = g_param_spec_int ("library-folder-id", "library-folder-id", "library-folder-id", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_PATH_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_PATH_PROPERTY] = g_param_spec_string ("library-folder-path", "library-folder-path", "library-folder-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_NAME_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_NAME_PROPERTY] = g_param_spec_string ("awacy-name", "awacy-name", "awacy-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_STATUS_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_STATUS_PROPERTY] = g_param_spec_string ("awacy-status", "awacy-status", "awacy-status", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_LOOKUP_COMPLETE_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_LOOKUP_COMPLETE_PROPERTY] = g_param_spec_boolean ("awacy-lookup-complete", "awacy-lookup-complete", "awacy-lookup-complete", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_LAUNCH_OPTIONS_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_LAUNCH_OPTIONS_PROPERTY] = g_param_spec_string ("launch-options", "launch-options", "launch-options", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_IS_NON_STEAM_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_IS_NON_STEAM_PROPERTY] = g_param_spec_boolean ("is-non-steam", "is-non-steam", "is-non-steam", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GAMES_STEAM_IS_NATIVE_PROPERTY, proton_plus_models_games_steam_properties[PROTON_PLUS_MODELS_GAMES_STEAM_IS_NATIVE_PROPERTY] = g_param_spec_boolean ("is-native", "is-native", "is-native", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
proton_plus_models_games_steam_instance_init (ProtonPlusModelsGamesSteam * self,
                                              gpointer klass)
{
	self->priv = proton_plus_models_games_steam_get_instance_private (self);
	self->priv->_awacy_lookup_complete = FALSE;
	self->priv->_is_native = NULL;
}

static void
proton_plus_models_games_steam_finalize (GObject * obj)
{
	ProtonPlusModelsGamesSteam * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam);
	_g_free0 (self->priv->_library_folder_path);
	_g_free0 (self->priv->_awacy_name);
	_g_free0 (self->priv->_awacy_status);
	_g_free0 (self->priv->_launch_options);
	_g_free0 (self->priv->_is_native);
	G_OBJECT_CLASS (proton_plus_models_games_steam_parent_class)->finalize (obj);
}

static GType
proton_plus_models_games_steam_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGamesSteamClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_games_steam_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsGamesSteam), 0, (GInstanceInitFunc) proton_plus_models_games_steam_instance_init, NULL };
	GType proton_plus_models_games_steam_type_id;
	proton_plus_models_games_steam_type_id = g_type_register_static (PROTON_PLUS_MODELS_TYPE_GAME, "ProtonPlusModelsGamesSteam", &g_define_type_info, 0);
	ProtonPlusModelsGamesSteam_private_offset = g_type_add_instance_private (proton_plus_models_games_steam_type_id, sizeof (ProtonPlusModelsGamesSteamPrivate));
	return proton_plus_models_games_steam_type_id;
}

GType
proton_plus_models_games_steam_get_type (void)
{
	static volatile gsize proton_plus_models_games_steam_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_games_steam_type_id__once)) {
		GType proton_plus_models_games_steam_type_id;
		proton_plus_models_games_steam_type_id = proton_plus_models_games_steam_get_type_once ();
		g_once_init_leave (&proton_plus_models_games_steam_type_id__once, proton_plus_models_games_steam_type_id);
	}
	return proton_plus_models_games_steam_type_id__once;
}

static void
_vala_proton_plus_models_games_steam_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	ProtonPlusModelsGamesSteam * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam);
	switch (property_id) {
		case PROTON_PLUS_MODELS_GAMES_STEAM_APPID_PROPERTY:
		g_value_set_uint (value, proton_plus_models_games_steam_get_appid (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_ID_PROPERTY:
		g_value_set_int (value, proton_plus_models_games_steam_get_library_folder_id (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_PATH_PROPERTY:
		g_value_set_string (value, proton_plus_models_games_steam_get_library_folder_path (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_NAME_PROPERTY:
		g_value_set_string (value, proton_plus_models_games_steam_get_awacy_name (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_STATUS_PROPERTY:
		g_value_set_string (value, proton_plus_models_games_steam_get_awacy_status (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_LOOKUP_COMPLETE_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_games_steam_get_awacy_lookup_complete (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_LAUNCH_OPTIONS_PROPERTY:
		g_value_set_string (value, proton_plus_models_games_steam_get_launch_options (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_IS_NON_STEAM_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_games_steam_get_is_non_steam (self));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_IS_NATIVE_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_game_get_is_native ((ProtonPlusModelsGame*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_games_steam_set_property (GObject * object,
                                                   guint property_id,
                                                   const GValue * value,
                                                   GParamSpec * pspec)
{
	ProtonPlusModelsGamesSteam * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam);
	switch (property_id) {
		case PROTON_PLUS_MODELS_GAMES_STEAM_APPID_PROPERTY:
		proton_plus_models_games_steam_set_appid (self, g_value_get_uint (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_ID_PROPERTY:
		proton_plus_models_games_steam_set_library_folder_id (self, g_value_get_int (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_LIBRARY_FOLDER_PATH_PROPERTY:
		proton_plus_models_games_steam_set_library_folder_path (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_NAME_PROPERTY:
		proton_plus_models_games_steam_set_awacy_name (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_STATUS_PROPERTY:
		proton_plus_models_games_steam_set_awacy_status (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_LOOKUP_COMPLETE_PROPERTY:
		proton_plus_models_games_steam_set_awacy_lookup_complete (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_LAUNCH_OPTIONS_PROPERTY:
		proton_plus_models_games_steam_set_launch_options (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_IS_NON_STEAM_PROPERTY:
		proton_plus_models_games_steam_set_is_non_steam (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_MODELS_GAMES_STEAM_IS_NATIVE_PROPERTY:
		proton_plus_models_game_set_is_native ((ProtonPlusModelsGame*) self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

