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

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include "config.h"
#include <errno.h>
#include <glib/gstdio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

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

typedef struct _ProtonPlusModelsLauncher ProtonPlusModelsLauncher;
typedef struct _ProtonPlusModelsLauncherClass ProtonPlusModelsLauncherClass;
typedef struct _ProtonPlusModelsLauncherPrivate ProtonPlusModelsLauncherPrivate;

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

typedef struct _ProtonPlusModelsGame ProtonPlusModelsGame;
typedef struct _ProtonPlusModelsGameClass ProtonPlusModelsGameClass;

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

typedef struct _ProtonPlusModelsSimpleRunner ProtonPlusModelsSimpleRunner;
typedef struct _ProtonPlusModelsSimpleRunnerClass ProtonPlusModelsSimpleRunnerClass;

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

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

#define PROTON_PLUS_MODELS_LAUNCHER_TYPE_INSTALLATION_TYPES (proton_plus_models_launcher_installation_types_get_type ())

#define PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM (proton_plus_models_launchers_steam_get_type ())
#define PROTON_PLUS_MODELS_LAUNCHERS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam))
#define PROTON_PLUS_MODELS_LAUNCHERS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteamClass))
#define PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM))
#define PROTON_PLUS_MODELS_LAUNCHERS_IS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM))
#define PROTON_PLUS_MODELS_LAUNCHERS_STEAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteamClass))

typedef struct _ProtonPlusModelsLaunchersSteam ProtonPlusModelsLaunchersSteam;
typedef struct _ProtonPlusModelsLaunchersSteamClass ProtonPlusModelsLaunchersSteamClass;
typedef struct _ProtonPlusModelsLaunchersSteamPrivate ProtonPlusModelsLaunchersSteamPrivate;

#define PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE (proton_plus_models_steam_profile_get_type ())
#define PROTON_PLUS_MODELS_STEAM_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, ProtonPlusModelsSteamProfile))
#define PROTON_PLUS_MODELS_STEAM_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, ProtonPlusModelsSteamProfileClass))
#define PROTON_PLUS_MODELS_IS_STEAM_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE))
#define PROTON_PLUS_MODELS_IS_STEAM_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE))
#define PROTON_PLUS_MODELS_STEAM_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, ProtonPlusModelsSteamProfileClass))

typedef struct _ProtonPlusModelsSteamProfile ProtonPlusModelsSteamProfile;
typedef struct _ProtonPlusModelsSteamProfileClass ProtonPlusModelsSteamProfileClass;
enum  {
	PROTON_PLUS_MODELS_LAUNCHERS_STEAM_0_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHERS_STEAM_PROFILE_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHERS_STEAM_DEFAULT_COMPATIBILITY_TOOL_PROPERTY,
	PROTON_PLUS_MODELS_LAUNCHERS_STEAM_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_launchers_steam_properties[PROTON_PLUS_MODELS_LAUNCHERS_STEAM_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
typedef struct _ProtonPlusModelsSteamProfilePrivate ProtonPlusModelsSteamProfilePrivate;

#define PROTON_PLUS_MODELS_GAMES_TYPE_STEAM (proton_plus_models_games_steam_get_type ())
#define PROTON_PLUS_MODELS_GAMES_STEAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteam))
#define PROTON_PLUS_MODELS_GAMES_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteamClass))
#define PROTON_PLUS_MODELS_GAMES_IS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM))
#define PROTON_PLUS_MODELS_GAMES_IS_STEAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM))
#define PROTON_PLUS_MODELS_GAMES_STEAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_GAMES_TYPE_STEAM, ProtonPlusModelsGamesSteamClass))

typedef struct _ProtonPlusModelsGamesSteam ProtonPlusModelsGamesSteam;
typedef struct _ProtonPlusModelsGamesSteamClass ProtonPlusModelsGamesSteamClass;
typedef struct _ProtonPlusModelsLaunchersSteamSwitchProfileData ProtonPlusModelsLaunchersSteamSwitchProfileData;

#define PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME (proton_plus_models_games_steam_awacy_game_get_type ())
#define PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, ProtonPlusModelsGamesSteamAwacyGame))
#define PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, ProtonPlusModelsGamesSteamAwacyGameClass))
#define PROTON_PLUS_MODELS_GAMES_STEAM_IS_AWACY_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME))
#define PROTON_PLUS_MODELS_GAMES_STEAM_IS_AWACY_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME))
#define PROTON_PLUS_MODELS_GAMES_STEAM_AWACY_GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_GAMES_STEAM_TYPE_AWACY_GAME, ProtonPlusModelsGamesSteamAwacyGameClass))

typedef struct _ProtonPlusModelsGamesSteamAwacyGame ProtonPlusModelsGamesSteamAwacyGame;
typedef struct _ProtonPlusModelsGamesSteamAwacyGameClass ProtonPlusModelsGamesSteamAwacyGameClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_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)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ProtonPlusModelsLaunchersSteamLoadGameLibraryData ProtonPlusModelsLaunchersSteamLoadGameLibraryData;
typedef struct _ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData;

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

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

struct _ProtonPlusModelsLaunchersSteam {
	ProtonPlusModelsLauncher parent_instance;
	ProtonPlusModelsLaunchersSteamPrivate * priv;
	GList* profiles;
	GHashTable* compatibility_tool_hashtable;
};

struct _ProtonPlusModelsLaunchersSteamClass {
	ProtonPlusModelsLauncherClass parent_class;
};

struct _ProtonPlusModelsLaunchersSteamPrivate {
	ProtonPlusModelsSteamProfile* _profile;
	gchar* _default_compatibility_tool;
};

struct _ProtonPlusModelsSteamProfile {
	GObject parent_instance;
	ProtonPlusModelsSteamProfilePrivate * priv;
	GHashTable* launch_options_hashtable;
	GList* non_steam_games;
};

struct _ProtonPlusModelsSteamProfileClass {
	GObjectClass parent_class;
};

struct _ProtonPlusModelsLaunchersSteamSwitchProfileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsLaunchersSteam* self;
	ProtonPlusModelsSteamProfile* profile;
	ProtonPlusModelsSteamProfile* _tmp0_;
	ProtonPlusModelsSteamProfile* _tmp1_;
	GList* _tmp2_;
	GList* non_steam_game_collection;
	GList* non_steam_game_it;
	ProtonPlusModelsGamesSteam* _tmp3_;
	ProtonPlusModelsGamesSteam* non_steam_game;
	ProtonPlusModelsGamesSteam* _tmp4_;
	GList* _tmp5_;
	GList* game_collection;
	GList* game_it;
	ProtonPlusModelsGamesSteam* _tmp6_;
	ProtonPlusModelsGamesSteam* game;
	gchar* launch_options;
	GHashTable* _tmp7_;
	ProtonPlusModelsGamesSteam* _tmp8_;
	guint _tmp9_;
	guint _tmp10_;
	gconstpointer _tmp11_;
	gchar* _tmp12_;
	ProtonPlusModelsGamesSteam* _tmp13_;
	const gchar* _tmp14_;
	GList* _tmp15_;
	GList* _vala1_non_steam_game_collection;
	GList* _vala1_non_steam_game_it;
	ProtonPlusModelsGamesSteam* _tmp16_;
	ProtonPlusModelsGamesSteam* _vala1_non_steam_game;
	ProtonPlusModelsGamesSteam* _tmp17_;
	ProtonPlusModelsGame* _tmp18_;
};

struct _ProtonPlusModelsLaunchersSteamLoadGameLibraryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsLaunchersSteam* self;
	gboolean result;
	GeeArrayList* _tmp0_;
	GList* awacy_games;
	GList* _tmp1_;
	gboolean compatibility_tool_hashtable_loaded;
	gchar* default_compatibility_tool;
	GHashTable* _tmp2_;
	gconstpointer _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* libraryfolder_content;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	gint _tmp13_;
	gint _tmp14_;
	gchar* current_libraryfolder_content;
	gchar* _tmp15_;
	gint current_libraryfolder_id;
	gchar* current_libraryfolder_path;
	gchar* _tmp16_;
	gchar* current_apps;
	gchar* _tmp17_;
	gchar* current_appid;
	gchar* _tmp18_;
	gchar* current_steamapps_path;
	gchar* _tmp19_;
	gchar* current_manifest_path;
	gchar* _tmp20_;
	gchar* current_manifest_content;
	gchar* _tmp21_;
	gchar* current_name;
	gchar* _tmp22_;
	gchar* current_installdir;
	gchar* _tmp23_;
	gchar* start_text;
	gchar* _tmp24_;
	gchar* end_text;
	gchar* _tmp25_;
	gint start_pos;
	gint end_pos;
	gint current_position;
	gint _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gint _tmp32_;
	gint _tmp33_;
	const gchar* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	gint _tmp51_;
	gint _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	const gchar* _tmp59_;
	const gchar* _tmp60_;
	const gchar* _tmp61_;
	gint _tmp62_;
	gint _tmp63_;
	const gchar* _tmp64_;
	const gchar* _tmp65_;
	const gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	gchar* _tmp69_;
	const gchar* _tmp70_;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	gint _tmp73_;
	gint _tmp74_;
	const gchar* _tmp75_;
	gint _tmp76_;
	gint _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
	const gchar* _tmp80_;
	gint _tmp81_;
	gint _tmp82_;
	const gchar* _tmp83_;
	gchar* _tmp84_;
	guint id;
	gboolean id_valid;
	const gchar* _tmp85_;
	guint _tmp86_;
	gboolean _tmp87_;
	gboolean valid_appid;
	gchar** excluded_appids;
	gchar* _tmp88_;
	gchar* _tmp89_;
	gchar* _tmp90_;
	gchar* _tmp91_;
	gchar* _tmp92_;
	gchar* _tmp93_;
	gchar* _tmp94_;
	gchar** _tmp95_;
	gint excluded_appids_length1;
	gint _excluded_appids_size_;
	gchar** _tmp96_;
	gint _tmp96__length1;
	gchar** excluded_appid_collection;
	gint excluded_appid_collection_length1;
	gint _excluded_appid_collection_size_;
	gint excluded_appid_it;
	gchar* _tmp97_;
	gchar* excluded_appid;
	const gchar* _tmp98_;
	const gchar* _tmp99_;
	const gchar* _tmp100_;
	gchar* _tmp101_;
	const gchar* _tmp102_;
	const gchar* _tmp103_;
	const gchar* _tmp104_;
	gchar* _tmp105_;
	const gchar* _tmp106_;
	const gchar* _tmp107_;
	gchar* _tmp108_;
	gchar* _tmp109_;
	gchar* _tmp110_;
	const gchar* _tmp111_;
	const gchar* _tmp112_;
	const gchar* _tmp113_;
	gint _tmp114_;
	gint _tmp115_;
	const gchar* _tmp116_;
	const gchar* _tmp117_;
	const gchar* _tmp118_;
	gchar* _tmp119_;
	gchar* _tmp120_;
	gchar* _tmp121_;
	const gchar* _tmp122_;
	const gchar* _tmp123_;
	const gchar* _tmp124_;
	gint _tmp125_;
	gint _tmp126_;
	const gchar* _tmp127_;
	const gchar* _tmp128_;
	const gchar* _tmp129_;
	gchar* _tmp130_;
	gboolean _tmp131_;
	gboolean _tmp132_;
	const gchar* _tmp133_;
	const gchar* _tmp134_;
	const gchar* _tmp135_;
	ProtonPlusModelsSimpleRunner* simple_runner;
	const gchar* _tmp136_;
	const gchar* _tmp137_;
	gchar* _tmp138_;
	gchar* _tmp139_;
	gchar** _tmp140_;
	gchar** _tmp141_;
	gchar** _tmp142_;
	gint _tmp142__length1;
	const gchar* _tmp143_;
	gchar* _tmp144_;
	gchar* _tmp145_;
	const gchar* _tmp146_;
	const gchar* _tmp147_;
	gchar* _tmp148_;
	gchar* _tmp149_;
	ProtonPlusModelsSimpleRunner* _tmp150_;
	ProtonPlusModelsSimpleRunner* _tmp151_;
	GeeArrayList* _tmp152_;
	ProtonPlusModelsSimpleRunner* _tmp153_;
	const gchar* _tmp154_;
	const gchar* _tmp155_;
	gchar* _tmp156_;
	gchar* _tmp157_;
	gboolean _tmp158_;
	ProtonPlusModelsGamesSteam* game;
	const gchar* _tmp159_;
	const gchar* _tmp160_;
	const gchar* _tmp161_;
	ProtonPlusModelsGamesSteam* _tmp162_;
	GList* _tmp163_;
	GList* awacy_game_collection;
	GList* awacy_game_it;
	ProtonPlusModelsGamesSteamAwacyGame* _tmp164_;
	ProtonPlusModelsGamesSteamAwacyGame* awacy_game;
	ProtonPlusModelsGamesSteamAwacyGame* _tmp165_;
	gint _tmp166_;
	gint _tmp167_;
	ProtonPlusModelsGamesSteam* _tmp168_;
	guint _tmp169_;
	guint _tmp170_;
	ProtonPlusModelsGamesSteam* _tmp171_;
	ProtonPlusModelsGamesSteamAwacyGame* _tmp172_;
	const gchar* _tmp173_;
	const gchar* _tmp174_;
	ProtonPlusModelsGamesSteam* _tmp175_;
	ProtonPlusModelsGamesSteamAwacyGame* _tmp176_;
	const gchar* _tmp177_;
	const gchar* _tmp178_;
	gchar* compatibility_tool;
	GHashTable* _tmp179_;
	ProtonPlusModelsGamesSteam* _tmp180_;
	guint _tmp181_;
	guint _tmp182_;
	gconstpointer _tmp183_;
	gchar* _tmp184_;
	const gchar* _tmp185_;
	gchar* _tmp186_;
	ProtonPlusModelsGamesSteam* _tmp187_;
	const gchar* _tmp188_;
	ProtonPlusModelsGamesSteam* _tmp189_;
	ProtonPlusModelsGame* _tmp190_;
	ProtonPlusModelsGroup** _tmp191_;
	gint _tmp191__length1;
	ProtonPlusModelsGroup** group_collection;
	gint group_collection_length1;
	gint _group_collection_size_;
	gint group_it;
	ProtonPlusModelsGroup* _tmp192_;
	ProtonPlusModelsGroup* group;
	GFile* directory;
	const gchar* _tmp193_;
	ProtonPlusModelsGroup* _tmp194_;
	const gchar* _tmp195_;
	const gchar* _tmp196_;
	gchar* _tmp197_;
	gchar* _tmp198_;
	GFile* _tmp199_;
	GFile* _tmp200_;
	GFileEnumerator* enumerator;
	GFile* _tmp201_;
	GFileEnumerator* _tmp202_;
	GFileEnumerator* _tmp203_;
	GFileInfo* file_info;
	GFileInfo* _tmp204_;
	GFileEnumerator* _tmp205_;
	GFileInfo* _tmp206_;
	GFileInfo* _tmp207_;
	GFileInfo* _tmp208_;
	GFileInfo* _tmp209_;
	GFileInfo* _tmp210_;
	const gchar* _tmp211_;
	GFileInfo* _tmp212_;
	const gchar* _tmp213_;
	gchar* file_path;
	GFile* _tmp214_;
	gchar* _tmp215_;
	gchar* _tmp216_;
	GFileInfo* _tmp217_;
	const gchar* _tmp218_;
	gchar* _tmp219_;
	gchar* _tmp220_;
	ProtonPlusModelsSimpleRunner* _vala1_simple_runner;
	const gchar* _tmp221_;
	ProtonPlusModelsSimpleRunner* _tmp222_;
	GeeArrayList* _tmp223_;
	ProtonPlusModelsSimpleRunner* _tmp224_;
	GError* e;
	GError* _tmp225_;
	const gchar* _tmp226_;
	GError* _vala1_e;
	GError* _tmp227_;
	const gchar* _tmp228_;
	GError* _inner_error0_;
};

struct _ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsLaunchersSteam* self;
	gboolean result;
	GHashTable* _tmp0_;
	gchar* config_content;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* compat_tool_mapping_content;
	gchar* _tmp6_;
	gchar* compat_tool_mapping_item;
	gchar* _tmp7_;
	guint compat_tool_mapping_item_appid;
	gchar* compat_tool_mapping_item_name;
	gchar* _tmp8_;
	gchar* start_text;
	gchar* _tmp9_;
	gchar* end_text;
	gchar* _tmp10_;
	gint start_pos;
	gint end_pos;
	gint current_position;
	gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	GHashTable* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gint _tmp20_;
	gint _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gint _tmp39_;
	gint _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gboolean compat_tool_mapping_item_appid_valid;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	guint _tmp46_;
	gboolean _tmp47_;
	gboolean _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	const gchar* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	gint _tmp54_;
	gint _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	GHashTable* _tmp60_;
	const gchar* _tmp61_;
	gchar* _tmp62_;
};

static gint ProtonPlusModelsLaunchersSteam_private_offset;
static gpointer proton_plus_models_launchers_steam_parent_class = NULL;

VALA_EXTERN GType proton_plus_models_launcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLauncher, g_object_unref)
VALA_EXTERN GType proton_plus_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN GType proton_plus_models_simple_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSimpleRunner, g_object_unref)
VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_installation_types_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType proton_plus_models_launchers_steam_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLaunchersSteam, g_object_unref)
VALA_EXTERN GType proton_plus_models_steam_profile_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSteamProfile, g_object_unref)
VALA_EXTERN gint proton_plus_models_launcher_get_compatibility_tool_usage_count (ProtonPlusModelsLauncher* self,
                                                                     const gchar* compatibility_tool_name);
VALA_EXTERN void proton_plus_models_launcher_load_game_library (ProtonPlusModelsLauncher* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_models_launcher_load_game_library_finish (ProtonPlusModelsLauncher* self,
                                                               GAsyncResult* _res_);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN ProtonPlusModelsLaunchersSteam* proton_plus_models_launchers_steam_new (ProtonPlusModelsLauncherInstallationTypes installation_type);
VALA_EXTERN ProtonPlusModelsLaunchersSteam* proton_plus_models_launchers_steam_construct (GType object_type,
                                                                              ProtonPlusModelsLauncherInstallationTypes installation_type);
VALA_EXTERN ProtonPlusModelsLauncher* proton_plus_models_launcher_new (const gchar* title,
                                                           ProtonPlusModelsLauncherInstallationTypes installation_type,
                                                           const gchar* icon_path,
                                                           gchar** directories,
                                                           gint directories_length1);
VALA_EXTERN ProtonPlusModelsLauncher* proton_plus_models_launcher_construct (GType object_type,
                                                                 const gchar* title,
                                                                 ProtonPlusModelsLauncherInstallationTypes installation_type,
                                                                 const gchar* icon_path,
                                                                 gchar** directories,
                                                                 gint directories_length1);
static void proton_plus_models_launchers_steam_switch_profile_data_free (gpointer _data);
VALA_EXTERN void proton_plus_models_launchers_steam_switch_profile (ProtonPlusModelsLaunchersSteam* self,
                                                        ProtonPlusModelsSteamProfile* profile,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
VALA_EXTERN void proton_plus_models_launchers_steam_switch_profile_finish (ProtonPlusModelsLaunchersSteam* self,
                                                               GAsyncResult* _res_);
static gboolean proton_plus_models_launchers_steam_switch_profile_co (ProtonPlusModelsLaunchersSteamSwitchProfileData* _data_);
VALA_EXTERN ProtonPlusModelsSteamProfile* proton_plus_models_launchers_steam_get_profile (ProtonPlusModelsLaunchersSteam* self);
VALA_EXTERN GType proton_plus_models_games_steam_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGamesSteam, g_object_unref)
VALA_EXTERN void proton_plus_models_launchers_steam_set_profile (ProtonPlusModelsLaunchersSteam* self,
                                                     ProtonPlusModelsSteamProfile* value);
VALA_EXTERN guint proton_plus_models_games_steam_get_appid (ProtonPlusModelsGamesSteam* self);
VALA_EXTERN void proton_plus_models_games_steam_set_launch_options (ProtonPlusModelsGamesSteam* self,
                                                        const gchar* value);
static gint proton_plus_models_launchers_steam_real_get_compatibility_tool_usage_count (ProtonPlusModelsLauncher* base,
                                                                                 const gchar* compatibility_tool_name);
VALA_EXTERN const gchar* proton_plus_models_launchers_steam_get_default_compatibility_tool (ProtonPlusModelsLaunchersSteam* self);
VALA_EXTERN const gchar* proton_plus_models_game_get_compatibility_tool (ProtonPlusModelsGame* self);
static void proton_plus_models_launchers_steam_real_load_game_library_data_free (gpointer _data);
static void proton_plus_models_launchers_steam_real_load_game_library (ProtonPlusModelsLauncher* base,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
static gboolean proton_plus_models_launchers_steam_real_load_game_library_co (ProtonPlusModelsLaunchersSteamLoadGameLibraryData* _data_);
VALA_EXTERN gpointer proton_plus_models_games_steam_awacy_game_ref (gpointer instance);
VALA_EXTERN void proton_plus_models_games_steam_awacy_game_unref (gpointer instance);
VALA_EXTERN GParamSpec* proton_plus_models_games_steam_param_spec_awacy_game (const gchar* name,
                                                                  const gchar* nick,
                                                                  const gchar* blurb,
                                                                  GType object_type,
                                                                  GParamFlags flags);
VALA_EXTERN void proton_plus_models_games_steam_value_set_awacy_game (GValue* value,
                                                          gpointer v_object);
VALA_EXTERN void proton_plus_models_games_steam_value_take_awacy_game (GValue* value,
                                                           gpointer v_object);
VALA_EXTERN gpointer proton_plus_models_games_steam_value_get_awacy_game (const GValue* value);
VALA_EXTERN GType proton_plus_models_games_steam_awacy_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGamesSteamAwacyGame, proton_plus_models_games_steam_awacy_game_unref)
VALA_EXTERN void proton_plus_models_games_steam_awacy_game_get_awacy_games (GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
VALA_EXTERN GList* proton_plus_models_games_steam_awacy_game_get_awacy_games_finish (GAsyncResult* _res_);
static void proton_plus_models_launchers_steam_load_game_library_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_);
static void proton_plus_models_launchers_steam_load_compatibility_tool_hashtable (ProtonPlusModelsLaunchersSteam* self,
                                                                           GAsyncReadyCallback _callback_,
                                                                           gpointer _user_data_);
static gboolean proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_finish (ProtonPlusModelsLaunchersSteam* self,
                                                                                      GAsyncResult* _res_);
static void _proton_plus_models_games_steam_awacy_game_unref0_ (gpointer var);
static inline void _g_list_free__proton_plus_models_games_steam_awacy_game_unref0_ (GList* self);
VALA_EXTERN void proton_plus_models_launchers_steam_set_default_compatibility_tool (ProtonPlusModelsLaunchersSteam* self,
                                                                        const gchar* value);
VALA_EXTERN gchar* proton_plus_utils_filesystem_get_file_content (const gchar* path,
                                                      gboolean use_uri);
VALA_EXTERN ProtonPlusModelsSimpleRunner* proton_plus_models_simple_runner_new_with_path (const gchar* display_title,
                                                                              const gchar* internal_title,
                                                                              const gchar* path);
VALA_EXTERN ProtonPlusModelsSimpleRunner* proton_plus_models_simple_runner_construct_with_path (GType object_type,
                                                                                    const gchar* display_title,
                                                                                    const gchar* internal_title,
                                                                                    const gchar* path);
VALA_EXTERN 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);
VALA_EXTERN 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);
VALA_EXTERN gint proton_plus_models_games_steam_awacy_game_get_appid (ProtonPlusModelsGamesSteamAwacyGame* self);
VALA_EXTERN const gchar* proton_plus_models_games_steam_awacy_game_get_name (ProtonPlusModelsGamesSteamAwacyGame* self);
VALA_EXTERN void proton_plus_models_games_steam_set_awacy_name (ProtonPlusModelsGamesSteam* self,
                                                    const gchar* value);
VALA_EXTERN const gchar* proton_plus_models_games_steam_awacy_game_get_status (ProtonPlusModelsGamesSteamAwacyGame* self);
VALA_EXTERN void proton_plus_models_games_steam_set_awacy_status (ProtonPlusModelsGamesSteam* self,
                                                      const gchar* value);
VALA_EXTERN void proton_plus_models_game_set_compatibility_tool (ProtonPlusModelsGame* self,
                                                     const gchar* value);
VALA_EXTERN const gchar* proton_plus_models_group_get_directory (ProtonPlusModelsGroup* self);
VALA_EXTERN ProtonPlusModelsSimpleRunner* proton_plus_models_simple_runner_new_from_path (const gchar* path,
                                                                              GError** error);
VALA_EXTERN ProtonPlusModelsSimpleRunner* proton_plus_models_simple_runner_construct_from_path (GType object_type,
                                                                                    const gchar* path,
                                                                                    GError** error);
static void proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_data_free (gpointer _data);
static gboolean proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_co (ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData* _data_);
static void _g_free0_ (gpointer var);
VALA_EXTERN gboolean proton_plus_models_launchers_steam_change_default_compatibility_tool (ProtonPlusModelsLaunchersSteam* self,
                                                                               const gchar* compatibility_tool);
VALA_EXTERN gboolean proton_plus_utils_filesystem_modify_file (const gchar* path,
                                                   const gchar* content);
static void proton_plus_models_launchers_steam_finalize (GObject * obj);
static GType proton_plus_models_launchers_steam_get_type_once (void);
static void _vala_proton_plus_models_launchers_steam_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec);
static void _vala_proton_plus_models_launchers_steam_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static GRegex* _tmp_regex_0 = NULL;

static inline gpointer
proton_plus_models_launchers_steam_get_instance_private (ProtonPlusModelsLaunchersSteam* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsLaunchersSteam_private_offset);
}

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

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

ProtonPlusModelsLaunchersSteam*
proton_plus_models_launchers_steam_construct (GType object_type,
                                              ProtonPlusModelsLauncherInstallationTypes installation_type)
{
	ProtonPlusModelsLaunchersSteam * self = NULL;
	gchar** directories = NULL;
	gint directories_length1;
	gint _directories_size_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gint _tmp19__length1;
	directories = NULL;
	directories_length1 = 0;
	_directories_size_ = directories_length1;
	switch (installation_type) {
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM:
		{
			const gchar* _tmp0_;
			gchar* _tmp1_;
			const gchar* _tmp2_;
			gchar* _tmp3_;
			const gchar* _tmp4_;
			gchar* _tmp5_;
			const gchar* _tmp6_;
			gchar* _tmp7_;
			const gchar* _tmp8_;
			gchar* _tmp9_;
			gchar** _tmp10_;
			_tmp0_ = g_get_user_data_dir ();
			_tmp1_ = g_strdup_printf ("%s/Steam", _tmp0_);
			_tmp2_ = g_get_home_dir ();
			_tmp3_ = g_strdup_printf ("%s/.local/share/Steam", _tmp2_);
			_tmp4_ = g_get_home_dir ();
			_tmp5_ = g_strdup_printf ("%s/.steam/steam", _tmp4_);
			_tmp6_ = g_get_home_dir ();
			_tmp7_ = g_strdup_printf ("%s/.steam/root", _tmp6_);
			_tmp8_ = g_get_home_dir ();
			_tmp9_ = g_strdup_printf ("%s/.steam/debian-installation", _tmp8_);
			_tmp10_ = g_new0 (gchar*, 5 + 1);
			_tmp10_[0] = _tmp1_;
			_tmp10_[1] = _tmp3_;
			_tmp10_[2] = _tmp5_;
			_tmp10_[3] = _tmp7_;
			_tmp10_[4] = _tmp9_;
			directories = (_vala_array_free (directories, directories_length1, (GDestroyNotify) g_free), NULL);
			directories = _tmp10_;
			directories_length1 = 5;
			_directories_size_ = directories_length1;
			break;
		}
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK:
		{
			const gchar* _tmp11_;
			gchar* _tmp12_;
			gchar** _tmp13_;
			_tmp11_ = g_get_home_dir ();
			_tmp12_ = g_strdup_printf ("%s/.var/app/com.valvesoftware.Steam/data/Steam", _tmp11_);
			_tmp13_ = g_new0 (gchar*, 1 + 1);
			_tmp13_[0] = _tmp12_;
			directories = (_vala_array_free (directories, directories_length1, (GDestroyNotify) g_free), NULL);
			directories = _tmp13_;
			directories_length1 = 1;
			_directories_size_ = directories_length1;
			break;
		}
		case PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP:
		{
			const gchar* _tmp14_;
			gchar* _tmp15_;
			gchar** _tmp16_;
			_tmp14_ = g_get_home_dir ();
			_tmp15_ = g_strdup_printf ("%s/snap/steam/common/.steam/root", _tmp14_);
			_tmp16_ = g_new0 (gchar*, 1 + 1);
			_tmp16_[0] = _tmp15_;
			directories = (_vala_array_free (directories, directories_length1, (GDestroyNotify) g_free), NULL);
			directories = _tmp16_;
			directories_length1 = 1;
			_directories_size_ = directories_length1;
			break;
		}
		default:
		break;
	}
	_tmp17_ = g_strdup_printf ("%s/steam.svg", RESOURCE_BASE);
	_tmp18_ = _tmp17_;
	_tmp19_ = directories;
	_tmp19__length1 = directories_length1;
	self = (ProtonPlusModelsLaunchersSteam*) proton_plus_models_launcher_construct (object_type, "Steam", installation_type, _tmp18_, _tmp19_, (gint) _tmp19__length1);
	_g_free0 (_tmp18_);
	((ProtonPlusModelsLauncher*) self)->has_library_support = TRUE;
	directories = (_vala_array_free (directories, directories_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

ProtonPlusModelsLaunchersSteam*
proton_plus_models_launchers_steam_new (ProtonPlusModelsLauncherInstallationTypes installation_type)
{
	return proton_plus_models_launchers_steam_construct (PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, installation_type);
}

static void
proton_plus_models_launchers_steam_switch_profile_data_free (gpointer _data)
{
	ProtonPlusModelsLaunchersSteamSwitchProfileData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->profile);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsLaunchersSteamSwitchProfileData, _data_);
}

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

void
proton_plus_models_launchers_steam_switch_profile (ProtonPlusModelsLaunchersSteam* self,
                                                   ProtonPlusModelsSteamProfile* profile,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	ProtonPlusModelsLaunchersSteamSwitchProfileData* _data_;
	ProtonPlusModelsLaunchersSteam* _tmp0_;
	ProtonPlusModelsSteamProfile* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (profile != NULL);
	_data_ = g_slice_new0 (ProtonPlusModelsLaunchersSteamSwitchProfileData);
	_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_launchers_steam_switch_profile_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (profile);
	_g_object_unref0 (_data_->profile);
	_data_->profile = _tmp1_;
	proton_plus_models_launchers_steam_switch_profile_co (_data_);
}

void
proton_plus_models_launchers_steam_switch_profile_finish (ProtonPlusModelsLaunchersSteam* self,
                                                          GAsyncResult* _res_)
{
	ProtonPlusModelsLaunchersSteamSwitchProfileData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static GList*
vala_g_list_remove_full (GList* self,
                         gconstpointer data,
                         GFreeFunc func)
{
	GList* l = NULL;
	GList* result;
	l = self;
	while (TRUE) {
		GList* _tmp0_;
		GList* _tmp1_;
		gconstpointer _tmp2_;
		_tmp0_ = l;
		if (!(_tmp0_ != NULL)) {
			break;
		}
		_tmp1_ = l;
		_tmp2_ = ((GList*) _tmp1_)->data;
		if (_tmp2_ != data) {
			GList* _tmp3_;
			GList* _tmp4_;
			_tmp3_ = l;
			_tmp4_ = ((GList*) _tmp3_)->next;
			l = _tmp4_;
		} else {
			GList* _tmp5_;
			gconstpointer _tmp6_;
			GList* _tmp7_;
			_tmp5_ = l;
			_tmp6_ = ((GList*) _tmp5_)->data;
			func (_tmp6_);
			_tmp7_ = l;
			self = g_list_delete_link (self, (GList*) _tmp7_);
			break;
		}
	}
	result = self;
	return result;
}

static gboolean
proton_plus_models_launchers_steam_switch_profile_co (ProtonPlusModelsLaunchersSteamSwitchProfileData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_profile;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->priv->_profile;
		_data_->_tmp2_ = _data_->_tmp1_->non_steam_games;
		{
			_data_->non_steam_game_collection = _data_->_tmp2_;
			for (_data_->non_steam_game_it = _data_->non_steam_game_collection; _data_->non_steam_game_it != NULL; _data_->non_steam_game_it = _data_->non_steam_game_it->next) {
				_data_->_tmp3_ = _g_object_ref0 ((ProtonPlusModelsGamesSteam*) _data_->non_steam_game_it->data);
				_data_->non_steam_game = _data_->_tmp3_;
				{
					_data_->_tmp4_ = _data_->non_steam_game;
					((ProtonPlusModelsLauncher*) _data_->self)->games = vala_g_list_remove_full (((ProtonPlusModelsLauncher*) _data_->self)->games, (ProtonPlusModelsGame*) _data_->_tmp4_, _g_object_unref0_);
					_g_object_unref0 (_data_->non_steam_game);
				}
			}
		}
	}
	proton_plus_models_launchers_steam_set_profile (_data_->self, _data_->profile);
	_data_->_tmp5_ = ((ProtonPlusModelsLauncher*) _data_->self)->games;
	{
		_data_->game_collection = (GList*) _data_->_tmp5_;
		for (_data_->game_it = _data_->game_collection; _data_->game_it != NULL; _data_->game_it = _data_->game_it->next) {
			_data_->_tmp6_ = _g_object_ref0 ((ProtonPlusModelsGamesSteam*) _data_->game_it->data);
			_data_->game = _data_->_tmp6_;
			{
				_data_->_tmp7_ = _data_->profile->launch_options_hashtable;
				_data_->_tmp8_ = _data_->game;
				_data_->_tmp9_ = proton_plus_models_games_steam_get_appid (_data_->_tmp8_);
				_data_->_tmp10_ = _data_->_tmp9_;
				_data_->_tmp11_ = g_hash_table_lookup (_data_->_tmp7_, (gpointer) ((guintptr) _data_->_tmp10_));
				_data_->_tmp12_ = g_strdup ((const gchar*) _data_->_tmp11_);
				_data_->launch_options = _data_->_tmp12_;
				_data_->_tmp13_ = _data_->game;
				_data_->_tmp14_ = _data_->launch_options;
				proton_plus_models_games_steam_set_launch_options (_data_->_tmp13_, _data_->_tmp14_);
				_g_free0 (_data_->launch_options);
				_g_object_unref0 (_data_->game);
			}
		}
	}
	_data_->_tmp15_ = _data_->profile->non_steam_games;
	{
		_data_->_vala1_non_steam_game_collection = _data_->_tmp15_;
		for (_data_->_vala1_non_steam_game_it = _data_->_vala1_non_steam_game_collection; _data_->_vala1_non_steam_game_it != NULL; _data_->_vala1_non_steam_game_it = _data_->_vala1_non_steam_game_it->next) {
			_data_->_tmp16_ = _g_object_ref0 ((ProtonPlusModelsGamesSteam*) _data_->_vala1_non_steam_game_it->data);
			_data_->_vala1_non_steam_game = _data_->_tmp16_;
			{
				_data_->_tmp17_ = _data_->_vala1_non_steam_game;
				_data_->_tmp18_ = _g_object_ref0 ((ProtonPlusModelsGame*) _data_->_tmp17_);
				((ProtonPlusModelsLauncher*) _data_->self)->games = g_list_append (((ProtonPlusModelsLauncher*) _data_->self)->games, _data_->_tmp18_);
				_g_object_unref0 (_data_->_vala1_non_steam_game);
			}
		}
	}
	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 gint
proton_plus_models_launchers_steam_real_get_compatibility_tool_usage_count (ProtonPlusModelsLauncher* base,
                                                                            const gchar* compatibility_tool_name)
{
	ProtonPlusModelsLaunchersSteam * self;
	gint count = 0;
	gboolean is_default_tool = FALSE;
	const gchar* _tmp0_;
	GList* _tmp1_;
	GList* _tmp12_;
	gint result;
	self = (ProtonPlusModelsLaunchersSteam*) base;
	g_return_val_if_fail (compatibility_tool_name != NULL, -1);
	count = 0;
	_tmp0_ = self->priv->_default_compatibility_tool;
	is_default_tool = g_strcmp0 (compatibility_tool_name, _tmp0_) == 0;
	_tmp1_ = ((ProtonPlusModelsLauncher*) self)->games;
	{
		GList* game_collection = NULL;
		GList* game_it = NULL;
		game_collection = _tmp1_;
		for (game_it = game_collection; game_it != NULL; game_it = game_it->next) {
			ProtonPlusModelsGame* _tmp2_;
			ProtonPlusModelsGame* game = NULL;
			_tmp2_ = _g_object_ref0 ((ProtonPlusModelsGame*) game_it->data);
			game = _tmp2_;
			{
				gboolean _tmp3_ = FALSE;
				ProtonPlusModelsGame* _tmp4_;
				const gchar* _tmp5_;
				const gchar* _tmp6_;
				_tmp4_ = game;
				_tmp5_ = proton_plus_models_game_get_compatibility_tool (_tmp4_);
				_tmp6_ = _tmp5_;
				if (g_strcmp0 (_tmp6_, compatibility_tool_name) == 0) {
					_tmp3_ = TRUE;
				} else {
					gboolean _tmp7_ = FALSE;
					if (is_default_tool) {
						ProtonPlusModelsGame* _tmp8_;
						const gchar* _tmp9_;
						const gchar* _tmp10_;
						_tmp8_ = game;
						_tmp9_ = proton_plus_models_game_get_compatibility_tool (_tmp8_);
						_tmp10_ = _tmp9_;
						_tmp7_ = g_strcmp0 (_tmp10_, "Undefined") == 0;
					} else {
						_tmp7_ = FALSE;
					}
					_tmp3_ = _tmp7_;
				}
				if (_tmp3_) {
					gint _tmp11_;
					_tmp11_ = count;
					count = _tmp11_ + 1;
				}
				_g_object_unref0 (game);
			}
		}
	}
	_tmp12_ = self->profiles;
	{
		GList* profile_collection = NULL;
		GList* profile_it = NULL;
		profile_collection = _tmp12_;
		for (profile_it = profile_collection; profile_it != NULL; profile_it = profile_it->next) {
			ProtonPlusModelsSteamProfile* _tmp13_;
			ProtonPlusModelsSteamProfile* profile = NULL;
			_tmp13_ = _g_object_ref0 ((ProtonPlusModelsSteamProfile*) profile_it->data);
			profile = _tmp13_;
			{
				ProtonPlusModelsSteamProfile* _tmp14_;
				GList* _tmp15_;
				_tmp14_ = profile;
				_tmp15_ = _tmp14_->non_steam_games;
				{
					GList* game_collection = NULL;
					GList* game_it = NULL;
					game_collection = _tmp15_;
					for (game_it = game_collection; game_it != NULL; game_it = game_it->next) {
						ProtonPlusModelsGamesSteam* _tmp16_;
						ProtonPlusModelsGamesSteam* game = NULL;
						_tmp16_ = _g_object_ref0 ((ProtonPlusModelsGamesSteam*) game_it->data);
						game = _tmp16_;
						{
							gboolean _tmp17_ = FALSE;
							ProtonPlusModelsGamesSteam* _tmp18_;
							const gchar* _tmp19_;
							const gchar* _tmp20_;
							_tmp18_ = game;
							_tmp19_ = proton_plus_models_game_get_compatibility_tool ((ProtonPlusModelsGame*) _tmp18_);
							_tmp20_ = _tmp19_;
							if (g_strcmp0 (_tmp20_, compatibility_tool_name) == 0) {
								_tmp17_ = TRUE;
							} else {
								gboolean _tmp21_ = FALSE;
								if (is_default_tool) {
									ProtonPlusModelsGamesSteam* _tmp22_;
									const gchar* _tmp23_;
									const gchar* _tmp24_;
									_tmp22_ = game;
									_tmp23_ = proton_plus_models_game_get_compatibility_tool ((ProtonPlusModelsGame*) _tmp22_);
									_tmp24_ = _tmp23_;
									_tmp21_ = g_strcmp0 (_tmp24_, "Undefined") == 0;
								} else {
									_tmp21_ = FALSE;
								}
								_tmp17_ = _tmp21_;
							}
							if (_tmp17_) {
								gint _tmp25_;
								_tmp25_ = count;
								count = _tmp25_ + 1;
							}
							_g_object_unref0 (game);
						}
					}
				}
				_g_object_unref0 (profile);
			}
		}
	}
	result = count;
	return result;
}

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

static void
proton_plus_models_launchers_steam_real_load_game_library (ProtonPlusModelsLauncher* base,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	ProtonPlusModelsLaunchersSteam * self;
	ProtonPlusModelsLaunchersSteamLoadGameLibraryData* _data_;
	ProtonPlusModelsLaunchersSteam* _tmp0_;
	self = (ProtonPlusModelsLaunchersSteam*) base;
	_data_ = g_slice_new0 (ProtonPlusModelsLaunchersSteamLoadGameLibraryData);
	_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_launchers_steam_real_load_game_library_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_models_launchers_steam_real_load_game_library_co (_data_);
}

static gboolean
proton_plus_models_launchers_steam_load_game_library_finish (ProtonPlusModelsLauncher* base,
                                                             GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsLaunchersSteamLoadGameLibraryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_models_launchers_steam_load_game_library_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_)
{
	ProtonPlusModelsLaunchersSteamLoadGameLibraryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_launchers_steam_real_load_game_library_co (_data_);
}

static void
_proton_plus_models_games_steam_awacy_game_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (proton_plus_models_games_steam_awacy_game_unref (var), NULL));
}

static inline void
_g_list_free__proton_plus_models_games_steam_awacy_game_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _proton_plus_models_games_steam_awacy_game_unref0_);
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (needle != NULL, -1);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

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 inline GRegex*
_thread_safe_regex_init (GRegex** re,
                         const gchar * pattern,
                         GRegexCompileFlags compile_flags)
{
	if (g_once_init_enter ((volatile gsize*) re)) {
		GRegex* val = g_regex_new (pattern, compile_flags, 0, NULL);
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
	}
	return *re;
}

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

static gpointer
_proton_plus_models_games_steam_awacy_game_ref0 (gpointer self)
{
	return self ? proton_plus_models_games_steam_awacy_game_ref (self) : NULL;
}

static gboolean
proton_plus_models_launchers_steam_real_load_game_library_co (ProtonPlusModelsLaunchersSteamLoadGameLibraryData* _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:
	(((ProtonPlusModelsLauncher*) _data_->self)->games == NULL) ? NULL : (((ProtonPlusModelsLauncher*) _data_->self)->games = (_g_list_free__g_object_unref0_ (((ProtonPlusModelsLauncher*) _data_->self)->games), NULL));
	((ProtonPlusModelsLauncher*) _data_->self)->games = NULL;
	_data_->_tmp0_ = ((ProtonPlusModelsLauncher*) _data_->self)->compatibility_tools;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _data_->_tmp0_);
	_data_->_state_ = 1;
	proton_plus_models_games_steam_awacy_game_get_awacy_games (proton_plus_models_launchers_steam_load_game_library_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_models_games_steam_awacy_game_get_awacy_games_finish (_data_->_res_);
	_data_->awacy_games = _data_->_tmp1_;
	_data_->_state_ = 2;
	proton_plus_models_launchers_steam_load_compatibility_tool_hashtable (_data_->self, proton_plus_models_launchers_steam_load_game_library_ready, _data_);
	return FALSE;
	_state_2:
	_data_->compatibility_tool_hashtable_loaded = proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_finish (_data_->self, _data_->_res_);
	if (!_data_->compatibility_tool_hashtable_loaded) {
		_data_->result = FALSE;
		(_data_->awacy_games == NULL) ? NULL : (_data_->awacy_games = (_g_list_free__proton_plus_models_games_steam_awacy_game_unref0_ (_data_->awacy_games), 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_->_tmp2_ = _data_->self->compatibility_tool_hashtable;
	_data_->_tmp3_ = g_hash_table_lookup (_data_->_tmp2_, (gpointer) ((guintptr) 0));
	_data_->_tmp4_ = g_strdup ((const gchar*) _data_->_tmp3_);
	_data_->default_compatibility_tool = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->default_compatibility_tool;
	if (_data_->_tmp5_ != NULL) {
		_data_->_tmp6_ = _data_->default_compatibility_tool;
		proton_plus_models_launchers_steam_set_default_compatibility_tool (_data_->self, _data_->_tmp6_);
	}
	_data_->_tmp7_ = ((ProtonPlusModelsLauncher*) _data_->self)->directory;
	_data_->_tmp8_ = g_strdup_printf ("%s/steamapps/libraryfolders.vdf", _data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = proton_plus_utils_filesystem_get_file_content (_data_->_tmp9_, FALSE);
	_data_->_tmp11_ = _data_->_tmp10_;
	_g_free0 (_data_->_tmp9_);
	_data_->libraryfolder_content = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->libraryfolder_content;
	_data_->_tmp13_ = strlen (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	if (_data_->_tmp14_ > 0) {
		_data_->_tmp15_ = g_strdup ("");
		_data_->current_libraryfolder_content = _data_->_tmp15_;
		_data_->current_libraryfolder_id = 0;
		_data_->_tmp16_ = g_strdup ("");
		_data_->current_libraryfolder_path = _data_->_tmp16_;
		_data_->_tmp17_ = g_strdup ("");
		_data_->current_apps = _data_->_tmp17_;
		_data_->_tmp18_ = g_strdup ("");
		_data_->current_appid = _data_->_tmp18_;
		_data_->_tmp19_ = g_strdup ("");
		_data_->current_steamapps_path = _data_->_tmp19_;
		_data_->_tmp20_ = g_strdup ("");
		_data_->current_manifest_path = _data_->_tmp20_;
		_data_->_tmp21_ = g_strdup ("");
		_data_->current_manifest_content = _data_->_tmp21_;
		_data_->_tmp22_ = g_strdup ("");
		_data_->current_name = _data_->_tmp22_;
		_data_->_tmp23_ = g_strdup ("");
		_data_->current_installdir = _data_->_tmp23_;
		_data_->_tmp24_ = g_strdup ("");
		_data_->start_text = _data_->_tmp24_;
		_data_->_tmp25_ = g_strdup ("");
		_data_->end_text = _data_->_tmp25_;
		_data_->start_pos = 0;
		_data_->end_pos = 0;
		_data_->current_position = 0;
		while (TRUE) {
			_data_->_tmp26_ = _data_->current_libraryfolder_id;
			_data_->current_libraryfolder_id = _data_->_tmp26_ + 1;
			_data_->_tmp27_ = g_strdup_printf ("%i\"\n\t{", _data_->_tmp26_);
			_g_free0 (_data_->start_text);
			_data_->start_text = _data_->_tmp27_;
			_data_->_tmp28_ = g_strdup ("}");
			_g_free0 (_data_->end_text);
			_data_->end_text = _data_->_tmp28_;
			_data_->_tmp29_ = _data_->libraryfolder_content;
			_data_->_tmp30_ = _data_->start_text;
			_data_->_tmp31_ = _data_->start_text;
			_data_->_tmp32_ = strlen (_data_->_tmp31_);
			_data_->_tmp33_ = _data_->_tmp32_;
			_data_->start_pos = string_index_of (_data_->_tmp29_, _data_->_tmp30_, 0) + _data_->_tmp33_;
			_data_->_tmp34_ = _data_->start_text;
			_data_->_tmp35_ = strlen (_data_->_tmp34_);
			_data_->_tmp36_ = _data_->_tmp35_;
			if ((_data_->start_pos - _data_->_tmp36_) == -1) {
				break;
			}
			_data_->_tmp37_ = _data_->libraryfolder_content;
			_data_->_tmp38_ = _data_->end_text;
			_data_->end_pos = string_index_of (_data_->_tmp37_, _data_->_tmp38_, _data_->start_pos);
			_data_->_tmp39_ = _data_->libraryfolder_content;
			_data_->_tmp40_ = string_substring (_data_->_tmp39_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
			_g_free0 (_data_->current_libraryfolder_content);
			_data_->current_libraryfolder_content = _data_->_tmp40_;
			_data_->current_position = _data_->end_pos;
			_data_->_tmp41_ = _data_->current_libraryfolder_content;
			if (string_contains (_data_->_tmp41_, "apps")) {
				_data_->_tmp42_ = _data_->libraryfolder_content;
				_data_->_tmp43_ = _data_->end_text;
				_data_->end_pos = string_index_of (_data_->_tmp42_, _data_->_tmp43_, _data_->current_position + 1);
				_data_->_tmp44_ = _data_->libraryfolder_content;
				_data_->_tmp45_ = string_substring (_data_->_tmp44_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
				_g_free0 (_data_->current_libraryfolder_content);
				_data_->current_libraryfolder_content = _data_->_tmp45_;
				_data_->_tmp46_ = g_strdup ("path\"\t\t\"");
				_g_free0 (_data_->start_text);
				_data_->start_text = _data_->_tmp46_;
				_data_->_tmp47_ = g_strdup ("\"");
				_g_free0 (_data_->end_text);
				_data_->end_text = _data_->_tmp47_;
				_data_->_tmp48_ = _data_->current_libraryfolder_content;
				_data_->_tmp49_ = _data_->start_text;
				_data_->_tmp50_ = _data_->start_text;
				_data_->_tmp51_ = strlen (_data_->_tmp50_);
				_data_->_tmp52_ = _data_->_tmp51_;
				_data_->start_pos = string_index_of (_data_->_tmp48_, _data_->_tmp49_, 0) + _data_->_tmp52_;
				_data_->_tmp53_ = _data_->current_libraryfolder_content;
				_data_->_tmp54_ = _data_->end_text;
				_data_->end_pos = string_index_of (_data_->_tmp53_, _data_->_tmp54_, _data_->start_pos);
				_data_->_tmp55_ = _data_->current_libraryfolder_content;
				_data_->_tmp56_ = string_substring (_data_->_tmp55_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
				_g_free0 (_data_->current_libraryfolder_path);
				_data_->current_libraryfolder_path = _data_->_tmp56_;
				_data_->current_position = _data_->end_pos;
				_data_->_tmp57_ = g_strdup ("apps\"\n\t\t{\n");
				_g_free0 (_data_->start_text);
				_data_->start_text = _data_->_tmp57_;
				_data_->_tmp58_ = g_strdup ("}");
				_g_free0 (_data_->end_text);
				_data_->end_text = _data_->_tmp58_;
				_data_->_tmp59_ = _data_->current_libraryfolder_content;
				_data_->_tmp60_ = _data_->start_text;
				_data_->_tmp61_ = _data_->start_text;
				_data_->_tmp62_ = strlen (_data_->_tmp61_);
				_data_->_tmp63_ = _data_->_tmp62_;
				_data_->start_pos = string_index_of (_data_->_tmp59_, _data_->_tmp60_, _data_->current_position) + _data_->_tmp63_;
				_data_->_tmp64_ = _data_->current_libraryfolder_content;
				_data_->_tmp65_ = _data_->end_text;
				_data_->end_pos = string_index_of (_data_->_tmp64_, _data_->_tmp65_, _data_->start_pos);
				_data_->_tmp66_ = _data_->current_libraryfolder_content;
				_data_->_tmp67_ = string_substring (_data_->_tmp66_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
				_g_free0 (_data_->current_apps);
				_data_->current_apps = _data_->_tmp67_;
				_data_->current_position = 0;
				while (TRUE) {
					_data_->_tmp68_ = g_strdup ("\t\t\t\"");
					_g_free0 (_data_->start_text);
					_data_->start_text = _data_->_tmp68_;
					_data_->_tmp69_ = g_strdup ("\"");
					_g_free0 (_data_->end_text);
					_data_->end_text = _data_->_tmp69_;
					_data_->_tmp70_ = _data_->current_apps;
					_data_->_tmp71_ = _data_->start_text;
					_data_->_tmp72_ = _data_->start_text;
					_data_->_tmp73_ = strlen (_data_->_tmp72_);
					_data_->_tmp74_ = _data_->_tmp73_;
					_data_->start_pos = string_index_of (_data_->_tmp70_, _data_->_tmp71_, _data_->current_position) + _data_->_tmp74_;
					_data_->_tmp75_ = _data_->start_text;
					_data_->_tmp76_ = strlen (_data_->_tmp75_);
					_data_->_tmp77_ = _data_->_tmp76_;
					if ((_data_->start_pos - _data_->_tmp77_) == -1) {
						break;
					}
					_data_->_tmp78_ = _data_->current_apps;
					_data_->_tmp79_ = _data_->end_text;
					_data_->_tmp80_ = _data_->start_text;
					_data_->_tmp81_ = strlen (_data_->_tmp80_);
					_data_->_tmp82_ = _data_->_tmp81_;
					_data_->end_pos = string_index_of (_data_->_tmp78_, _data_->_tmp79_, _data_->start_pos + _data_->_tmp82_);
					_data_->_tmp83_ = _data_->current_apps;
					_data_->_tmp84_ = string_substring (_data_->_tmp83_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
					_g_free0 (_data_->current_appid);
					_data_->current_appid = _data_->_tmp84_;
					_data_->current_position = _data_->end_pos;
					_data_->id = (guint) 0;
					_data_->_tmp85_ = _data_->current_appid;
					_data_->_tmp86_ = 0U;
					_data_->_tmp87_ = uint_try_parse (_data_->_tmp85_, &_data_->_tmp86_, NULL, (guint) 0);
					_data_->id = _data_->_tmp86_;
					_data_->id_valid = _data_->_tmp87_;
					if (!_data_->id_valid) {
						continue;
					}
					_data_->valid_appid = TRUE;
					_data_->_tmp88_ = g_strdup ("2230260");
					_data_->_tmp89_ = g_strdup ("1826330");
					_data_->_tmp90_ = g_strdup ("1161040");
					_data_->_tmp91_ = g_strdup ("1070560");
					_data_->_tmp92_ = g_strdup ("1391110");
					_data_->_tmp93_ = g_strdup ("1628350");
					_data_->_tmp94_ = g_strdup ("228980");
					_data_->_tmp95_ = g_new0 (gchar*, 7 + 1);
					_data_->_tmp95_[0] = _data_->_tmp88_;
					_data_->_tmp95_[1] = _data_->_tmp89_;
					_data_->_tmp95_[2] = _data_->_tmp90_;
					_data_->_tmp95_[3] = _data_->_tmp91_;
					_data_->_tmp95_[4] = _data_->_tmp92_;
					_data_->_tmp95_[5] = _data_->_tmp93_;
					_data_->_tmp95_[6] = _data_->_tmp94_;
					_data_->excluded_appids = _data_->_tmp95_;
					_data_->excluded_appids_length1 = 7;
					_data_->_excluded_appids_size_ = _data_->excluded_appids_length1;
					_data_->_tmp96_ = _data_->excluded_appids;
					_data_->_tmp96__length1 = _data_->excluded_appids_length1;
					{
						_data_->excluded_appid_collection_length1 = 0;
						_data_->_excluded_appid_collection_size_ = 0;
						_data_->excluded_appid_collection = _data_->_tmp96_;
						_data_->excluded_appid_collection_length1 = _data_->_tmp96__length1;
						for (_data_->excluded_appid_it = 0; _data_->excluded_appid_it < _data_->excluded_appid_collection_length1; _data_->excluded_appid_it = _data_->excluded_appid_it + 1) {
							_data_->_tmp97_ = g_strdup (_data_->excluded_appid_collection[_data_->excluded_appid_it]);
							_data_->excluded_appid = _data_->_tmp97_;
							{
								_data_->_tmp98_ = _data_->current_appid;
								_data_->_tmp99_ = _data_->excluded_appid;
								if (g_strcmp0 (_data_->_tmp98_, _data_->_tmp99_) == 0) {
									_data_->valid_appid = FALSE;
									_g_free0 (_data_->excluded_appid);
									break;
								}
								_g_free0 (_data_->excluded_appid);
							}
						}
					}
					if (!_data_->valid_appid) {
						_data_->excluded_appids = (_vala_array_free (_data_->excluded_appids, _data_->excluded_appids_length1, (GDestroyNotify) g_free), NULL);
						continue;
					}
					_data_->_tmp100_ = _data_->current_libraryfolder_path;
					_data_->_tmp101_ = g_strdup_printf ("%s/steamapps", _data_->_tmp100_);
					_g_free0 (_data_->current_steamapps_path);
					_data_->current_steamapps_path = _data_->_tmp101_;
					_data_->_tmp102_ = _data_->current_steamapps_path;
					if (!g_file_test (_data_->_tmp102_, G_FILE_TEST_IS_DIR)) {
						_data_->excluded_appids = (_vala_array_free (_data_->excluded_appids, _data_->excluded_appids_length1, (GDestroyNotify) g_free), NULL);
						continue;
					}
					_data_->_tmp103_ = _data_->current_steamapps_path;
					_data_->_tmp104_ = _data_->current_appid;
					_data_->_tmp105_ = g_strdup_printf ("%s/appmanifest_%s.acf", _data_->_tmp103_, _data_->_tmp104_);
					_g_free0 (_data_->current_manifest_path);
					_data_->current_manifest_path = _data_->_tmp105_;
					_data_->_tmp106_ = _data_->current_manifest_path;
					if (!g_file_test (_data_->_tmp106_, G_FILE_TEST_IS_REGULAR)) {
						_data_->excluded_appids = (_vala_array_free (_data_->excluded_appids, _data_->excluded_appids_length1, (GDestroyNotify) g_free), NULL);
						continue;
					}
					_data_->_tmp107_ = _data_->current_manifest_path;
					_data_->_tmp108_ = proton_plus_utils_filesystem_get_file_content (_data_->_tmp107_, FALSE);
					_g_free0 (_data_->current_manifest_content);
					_data_->current_manifest_content = _data_->_tmp108_;
					_data_->_tmp109_ = g_strdup ("name\"\t\t\"");
					_g_free0 (_data_->start_text);
					_data_->start_text = _data_->_tmp109_;
					_data_->_tmp110_ = g_strdup ("\"");
					_g_free0 (_data_->end_text);
					_data_->end_text = _data_->_tmp110_;
					_data_->_tmp111_ = _data_->current_manifest_content;
					_data_->_tmp112_ = _data_->start_text;
					_data_->_tmp113_ = _data_->start_text;
					_data_->_tmp114_ = strlen (_data_->_tmp113_);
					_data_->_tmp115_ = _data_->_tmp114_;
					_data_->start_pos = string_index_of (_data_->_tmp111_, _data_->_tmp112_, 0) + _data_->_tmp115_;
					_data_->_tmp116_ = _data_->current_manifest_content;
					_data_->_tmp117_ = _data_->end_text;
					_data_->end_pos = string_index_of (_data_->_tmp116_, _data_->_tmp117_, _data_->start_pos);
					_data_->_tmp118_ = _data_->current_manifest_content;
					_data_->_tmp119_ = string_substring (_data_->_tmp118_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
					_g_free0 (_data_->current_name);
					_data_->current_name = _data_->_tmp119_;
					_data_->_tmp120_ = g_strdup ("installdir\"\t\t\"");
					_g_free0 (_data_->start_text);
					_data_->start_text = _data_->_tmp120_;
					_data_->_tmp121_ = g_strdup ("\"");
					_g_free0 (_data_->end_text);
					_data_->end_text = _data_->_tmp121_;
					_data_->_tmp122_ = _data_->current_manifest_content;
					_data_->_tmp123_ = _data_->start_text;
					_data_->_tmp124_ = _data_->start_text;
					_data_->_tmp125_ = strlen (_data_->_tmp124_);
					_data_->_tmp126_ = _data_->_tmp125_;
					_data_->start_pos = string_index_of (_data_->_tmp122_, _data_->_tmp123_, 0) + _data_->_tmp126_;
					_data_->_tmp127_ = _data_->current_manifest_content;
					_data_->_tmp128_ = _data_->end_text;
					_data_->end_pos = string_index_of (_data_->_tmp127_, _data_->_tmp128_, _data_->start_pos);
					_data_->_tmp129_ = _data_->current_manifest_content;
					_data_->_tmp130_ = string_substring (_data_->_tmp129_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
					_g_free0 (_data_->current_installdir);
					_data_->current_installdir = _data_->_tmp130_;
					_data_->_tmp133_ = _data_->current_name;
					if (g_regex_match (_thread_safe_regex_init (&_tmp_regex_0, "Proton \\d+.\\d+", 0), _data_->_tmp133_, 0, NULL)) {
						_data_->_tmp132_ = TRUE;
					} else {
						_data_->_tmp134_ = _data_->current_appid;
						_data_->_tmp132_ = g_strcmp0 (_data_->_tmp134_, "2180100") == 0;
					}
					if (_data_->_tmp132_) {
						_data_->_tmp131_ = TRUE;
					} else {
						_data_->_tmp135_ = _data_->current_appid;
						_data_->_tmp131_ = g_strcmp0 (_data_->_tmp135_, "1493710") == 0;
					}
					if (_data_->_tmp131_) {
						_data_->_tmp136_ = _data_->current_name;
						_data_->_tmp137_ = _data_->current_name;
						_data_->_tmp138_ = g_utf8_strdown (_data_->_tmp137_, (gssize) -1);
						_data_->_tmp139_ = _data_->_tmp138_;
						_data_->_tmp141_ = _data_->_tmp140_ = g_strsplit (_data_->_tmp139_, ".", 2);
						_data_->_tmp142_ = _data_->_tmp141_;
						_data_->_tmp142__length1 = _vala_array_length (_data_->_tmp140_);
						_data_->_tmp143_ = _data_->_tmp142_[0];
						_data_->_tmp144_ = string_replace (_data_->_tmp143_, " ", "_");
						_data_->_tmp145_ = _data_->_tmp144_;
						_data_->_tmp146_ = _data_->current_steamapps_path;
						_data_->_tmp147_ = _data_->current_installdir;
						_data_->_tmp148_ = g_strdup_printf ("%s/common/%s", _data_->_tmp146_, _data_->_tmp147_);
						_data_->_tmp149_ = _data_->_tmp148_;
						_data_->_tmp150_ = proton_plus_models_simple_runner_new_with_path (_data_->_tmp136_, _data_->_tmp145_, _data_->_tmp149_);
						_data_->_tmp151_ = _data_->_tmp150_;
						_g_free0 (_data_->_tmp149_);
						_g_free0 (_data_->_tmp145_);
						_data_->_tmp142_ = (_vala_array_free (_data_->_tmp142_, _data_->_tmp142__length1, (GDestroyNotify) g_free), NULL);
						_g_free0 (_data_->_tmp139_);
						_data_->simple_runner = _data_->_tmp151_;
						_data_->_tmp152_ = ((ProtonPlusModelsLauncher*) _data_->self)->compatibility_tools;
						_data_->_tmp153_ = _data_->simple_runner;
						gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp152_, _data_->_tmp153_);
						_g_object_unref0 (_data_->simple_runner);
						_data_->excluded_appids = (_vala_array_free (_data_->excluded_appids, _data_->excluded_appids_length1, (GDestroyNotify) g_free), NULL);
						continue;
					}
					_data_->_tmp154_ = _data_->current_steamapps_path;
					_data_->_tmp155_ = _data_->current_installdir;
					_data_->_tmp156_ = g_strdup_printf ("%s/common/%s", _data_->_tmp154_, _data_->_tmp155_);
					_data_->_tmp157_ = _data_->_tmp156_;
					_data_->_tmp158_ = !g_file_test (_data_->_tmp157_, G_FILE_TEST_IS_DIR);
					_g_free0 (_data_->_tmp157_);
					if (_data_->_tmp158_) {
						_data_->excluded_appids = (_vala_array_free (_data_->excluded_appids, _data_->excluded_appids_length1, (GDestroyNotify) g_free), NULL);
						continue;
					}
					_data_->_tmp159_ = _data_->current_name;
					_data_->_tmp160_ = _data_->current_installdir;
					_data_->_tmp161_ = _data_->current_libraryfolder_path;
					_data_->_tmp162_ = proton_plus_models_games_steam_new (_data_->id, _data_->_tmp159_, _data_->_tmp160_, _data_->current_libraryfolder_id, _data_->_tmp161_, _data_->self);
					_data_->game = _data_->_tmp162_;
					_data_->_tmp163_ = _data_->awacy_games;
					{
						_data_->awacy_game_collection = _data_->_tmp163_;
						for (_data_->awacy_game_it = _data_->awacy_game_collection; _data_->awacy_game_it != NULL; _data_->awacy_game_it = _data_->awacy_game_it->next) {
							_data_->_tmp164_ = _proton_plus_models_games_steam_awacy_game_ref0 ((ProtonPlusModelsGamesSteamAwacyGame*) _data_->awacy_game_it->data);
							_data_->awacy_game = _data_->_tmp164_;
							{
								_data_->_tmp165_ = _data_->awacy_game;
								_data_->_tmp166_ = proton_plus_models_games_steam_awacy_game_get_appid (_data_->_tmp165_);
								_data_->_tmp167_ = _data_->_tmp166_;
								_data_->_tmp168_ = _data_->game;
								_data_->_tmp169_ = proton_plus_models_games_steam_get_appid (_data_->_tmp168_);
								_data_->_tmp170_ = _data_->_tmp169_;
								if (((guint) _data_->_tmp167_) == _data_->_tmp170_) {
									_data_->_tmp171_ = _data_->game;
									_data_->_tmp172_ = _data_->awacy_game;
									_data_->_tmp173_ = proton_plus_models_games_steam_awacy_game_get_name (_data_->_tmp172_);
									_data_->_tmp174_ = _data_->_tmp173_;
									proton_plus_models_games_steam_set_awacy_name (_data_->_tmp171_, _data_->_tmp174_);
									_data_->_tmp175_ = _data_->game;
									_data_->_tmp176_ = _data_->awacy_game;
									_data_->_tmp177_ = proton_plus_models_games_steam_awacy_game_get_status (_data_->_tmp176_);
									_data_->_tmp178_ = _data_->_tmp177_;
									proton_plus_models_games_steam_set_awacy_status (_data_->_tmp175_, _data_->_tmp178_);
								}
								_proton_plus_models_games_steam_awacy_game_unref0 (_data_->awacy_game);
							}
						}
					}
					_data_->_tmp179_ = _data_->self->compatibility_tool_hashtable;
					_data_->_tmp180_ = _data_->game;
					_data_->_tmp181_ = proton_plus_models_games_steam_get_appid (_data_->_tmp180_);
					_data_->_tmp182_ = _data_->_tmp181_;
					_data_->_tmp183_ = g_hash_table_lookup (_data_->_tmp179_, (gpointer) ((guintptr) _data_->_tmp182_));
					_data_->_tmp184_ = g_strdup ((const gchar*) _data_->_tmp183_);
					_data_->compatibility_tool = _data_->_tmp184_;
					_data_->_tmp185_ = _data_->compatibility_tool;
					if (_data_->_tmp185_ == NULL) {
						_data_->_tmp186_ = g_strdup ("Undefined");
						_g_free0 (_data_->compatibility_tool);
						_data_->compatibility_tool = _data_->_tmp186_;
					}
					_data_->_tmp187_ = _data_->game;
					_data_->_tmp188_ = _data_->compatibility_tool;
					proton_plus_models_game_set_compatibility_tool ((ProtonPlusModelsGame*) _data_->_tmp187_, _data_->_tmp188_);
					_data_->_tmp189_ = _data_->game;
					_data_->_tmp190_ = _g_object_ref0 ((ProtonPlusModelsGame*) _data_->_tmp189_);
					((ProtonPlusModelsLauncher*) _data_->self)->games = g_list_append (((ProtonPlusModelsLauncher*) _data_->self)->games, _data_->_tmp190_);
					_g_free0 (_data_->compatibility_tool);
					_g_object_unref0 (_data_->game);
					_data_->excluded_appids = (_vala_array_free (_data_->excluded_appids, _data_->excluded_appids_length1, (GDestroyNotify) g_free), NULL);
				}
			} else {
				continue;
			}
		}
		_g_free0 (_data_->end_text);
		_g_free0 (_data_->start_text);
		_g_free0 (_data_->current_installdir);
		_g_free0 (_data_->current_name);
		_g_free0 (_data_->current_manifest_content);
		_g_free0 (_data_->current_manifest_path);
		_g_free0 (_data_->current_steamapps_path);
		_g_free0 (_data_->current_appid);
		_g_free0 (_data_->current_apps);
		_g_free0 (_data_->current_libraryfolder_path);
		_g_free0 (_data_->current_libraryfolder_content);
	}
	{
		_data_->_tmp191_ = ((ProtonPlusModelsLauncher*) _data_->self)->groups;
		_data_->_tmp191__length1 = ((ProtonPlusModelsLauncher*) _data_->self)->groups_length1;
		{
			_data_->group_collection_length1 = 0;
			_data_->_group_collection_size_ = 0;
			_data_->group_collection = _data_->_tmp191_;
			_data_->group_collection_length1 = _data_->_tmp191__length1;
			for (_data_->group_it = 0; _data_->group_it < _data_->group_collection_length1; _data_->group_it = _data_->group_it + 1) {
				_data_->_tmp192_ = _g_object_ref0 (_data_->group_collection[_data_->group_it]);
				_data_->group = _data_->_tmp192_;
				{
					_data_->_tmp193_ = ((ProtonPlusModelsLauncher*) _data_->self)->directory;
					_data_->_tmp194_ = _data_->group;
					_data_->_tmp195_ = proton_plus_models_group_get_directory (_data_->_tmp194_);
					_data_->_tmp196_ = _data_->_tmp195_;
					_data_->_tmp197_ = g_strdup_printf ("%s%s", _data_->_tmp193_, _data_->_tmp196_);
					_data_->_tmp198_ = _data_->_tmp197_;
					_data_->_tmp199_ = g_file_new_for_path (_data_->_tmp198_);
					_data_->_tmp200_ = _data_->_tmp199_;
					_g_free0 (_data_->_tmp198_);
					_data_->directory = _data_->_tmp200_;
					_data_->_tmp201_ = _data_->directory;
					_data_->_tmp202_ = g_file_enumerate_children (_data_->_tmp201_, "standard::*", G_FILE_QUERY_INFO_NONE, NULL, &_data_->_inner_error0_);
					_data_->enumerator = _data_->_tmp202_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						_g_object_unref0 (_data_->directory);
						_g_object_unref0 (_data_->group);
						goto __catch0_g_error;
					}
					_data_->_tmp203_ = _data_->enumerator;
					if (_data_->_tmp203_ != NULL) {
						while (TRUE) {
							_data_->_tmp205_ = _data_->enumerator;
							_data_->_tmp206_ = g_file_enumerator_next_file (_data_->_tmp205_, NULL, &_data_->_inner_error0_);
							_data_->_tmp204_ = _data_->_tmp206_;
							if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
								_g_object_unref0 (_data_->file_info);
								_g_object_unref0 (_data_->enumerator);
								_g_object_unref0 (_data_->directory);
								_g_object_unref0 (_data_->group);
								goto __catch0_g_error;
							}
							_data_->_tmp207_ = _data_->_tmp204_;
							_data_->_tmp204_ = NULL;
							_g_object_unref0 (_data_->file_info);
							_data_->file_info = _data_->_tmp207_;
							_data_->_tmp208_ = _data_->file_info;
							if (!(_data_->_tmp208_ != NULL)) {
								_g_object_unref0 (_data_->_tmp204_);
								break;
							}
							_data_->_tmp209_ = _data_->file_info;
							if (g_file_info_get_file_type (_data_->_tmp209_) != G_FILE_TYPE_DIRECTORY) {
								_g_object_unref0 (_data_->_tmp204_);
								continue;
							}
							_data_->_tmp210_ = _data_->file_info;
							_data_->_tmp211_ = g_file_info_get_name (_data_->_tmp210_);
							if (string_contains (_data_->_tmp211_, "wine-proton-exp")) {
							} else {
								_data_->_tmp212_ = _data_->file_info;
								_data_->_tmp213_ = g_file_info_get_name (_data_->_tmp212_);
								if (g_strcmp0 (_data_->_tmp213_, "LegacyRuntime") != 0) {
									_data_->_tmp214_ = _data_->directory;
									_data_->_tmp215_ = g_file_get_path (_data_->_tmp214_);
									_data_->_tmp216_ = _data_->_tmp215_;
									_data_->_tmp217_ = _data_->file_info;
									_data_->_tmp218_ = g_file_info_get_name (_data_->_tmp217_);
									_data_->_tmp219_ = g_strdup_printf ("%s/%s", _data_->_tmp216_, _data_->_tmp218_);
									_data_->_tmp220_ = _data_->_tmp219_;
									_g_free0 (_data_->_tmp216_);
									_data_->file_path = _data_->_tmp220_;
									{
										_data_->_tmp221_ = _data_->file_path;
										_data_->_tmp222_ = proton_plus_models_simple_runner_new_from_path (_data_->_tmp221_, &_data_->_inner_error0_);
										_data_->_vala1_simple_runner = _data_->_tmp222_;
										if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
											goto __catch1_g_error;
										}
										_data_->_tmp223_ = ((ProtonPlusModelsLauncher*) _data_->self)->compatibility_tools;
										_data_->_tmp224_ = _data_->_vala1_simple_runner;
										gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp223_, _data_->_tmp224_);
										_g_object_unref0 (_data_->_vala1_simple_runner);
									}
									goto __finally1;
									__catch1_g_error:
									{
										_data_->e = _data_->_inner_error0_;
										_data_->_inner_error0_ = NULL;
										_data_->_tmp225_ = _data_->e;
										_data_->_tmp226_ = _data_->_tmp225_->message;
										g_warning ("steam.vala:242: %s", _data_->_tmp226_);
										_g_error_free0 (_data_->e);
									}
									__finally1:
									if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
										_g_free0 (_data_->file_path);
										_g_object_unref0 (_data_->_tmp204_);
										_g_object_unref0 (_data_->file_info);
										_g_object_unref0 (_data_->enumerator);
										_g_object_unref0 (_data_->directory);
										_g_object_unref0 (_data_->group);
										goto __catch0_g_error;
									}
									_g_free0 (_data_->file_path);
								}
							}
							_g_object_unref0 (_data_->_tmp204_);
						}
						_g_object_unref0 (_data_->file_info);
					}
					_g_object_unref0 (_data_->enumerator);
					_g_object_unref0 (_data_->directory);
					_g_object_unref0 (_data_->group);
				}
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp227_ = _data_->_vala1_e;
		_data_->_tmp228_ = _data_->_tmp227_->message;
		g_warning ("steam.vala:249: %s", _data_->_tmp228_);
		_g_error_free0 (_data_->_vala1_e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->libraryfolder_content);
		_g_free0 (_data_->default_compatibility_tool);
		(_data_->awacy_games == NULL) ? NULL : (_data_->awacy_games = (_g_list_free__proton_plus_models_games_steam_awacy_game_unref0_ (_data_->awacy_games), NULL));
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = TRUE;
	_g_free0 (_data_->libraryfolder_content);
	_g_free0 (_data_->default_compatibility_tool);
	(_data_->awacy_games == NULL) ? NULL : (_data_->awacy_games = (_g_list_free__proton_plus_models_games_steam_awacy_game_unref0_ (_data_->awacy_games), 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_launchers_steam_load_compatibility_tool_hashtable_data_free (gpointer _data)
{
	ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData, _data_);
}

static void
proton_plus_models_launchers_steam_load_compatibility_tool_hashtable (ProtonPlusModelsLaunchersSteam* self,
                                                                      GAsyncReadyCallback _callback_,
                                                                      gpointer _user_data_)
{
	ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData* _data_;
	ProtonPlusModelsLaunchersSteam* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData);
	_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_launchers_steam_load_compatibility_tool_hashtable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_co (_data_);
}

static gboolean
proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_finish (ProtonPlusModelsLaunchersSteam* self,
                                                                             GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

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

static gboolean
proton_plus_models_launchers_steam_load_compatibility_tool_hashtable_co (ProtonPlusModelsLaunchersSteamLoadCompatibilityToolHashtableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_hash_table_new_full (NULL, NULL, NULL, _g_free0_);
	_g_hash_table_unref0 (_data_->self->compatibility_tool_hashtable);
	_data_->self->compatibility_tool_hashtable = _data_->_tmp0_;
	_data_->_tmp1_ = ((ProtonPlusModelsLauncher*) _data_->self)->directory;
	_data_->_tmp2_ = g_strdup_printf ("%s/config/config.vdf", _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = proton_plus_utils_filesystem_get_file_content (_data_->_tmp3_, FALSE);
	_data_->_tmp5_ = _data_->_tmp4_;
	_g_free0 (_data_->_tmp3_);
	_data_->config_content = _data_->_tmp5_;
	_data_->_tmp6_ = g_strdup ("");
	_data_->compat_tool_mapping_content = _data_->_tmp6_;
	_data_->_tmp7_ = g_strdup ("");
	_data_->compat_tool_mapping_item = _data_->_tmp7_;
	_data_->compat_tool_mapping_item_appid = (guint) 0;
	_data_->_tmp8_ = g_strdup ("");
	_data_->compat_tool_mapping_item_name = _data_->_tmp8_;
	_data_->_tmp9_ = g_strdup ("");
	_data_->start_text = _data_->_tmp9_;
	_data_->_tmp10_ = g_strdup ("");
	_data_->end_text = _data_->_tmp10_;
	_data_->start_pos = 0;
	_data_->end_pos = 0;
	_data_->current_position = 0;
	_data_->_tmp11_ = g_strdup ("CompatToolMapping\"\n\t\t\t\t");
	_g_free0 (_data_->start_text);
	_data_->start_text = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->config_content;
	_data_->_tmp13_ = _data_->start_text;
	if (!string_contains (_data_->_tmp12_, _data_->_tmp13_)) {
		_data_->_tmp14_ = _data_->self->compatibility_tool_hashtable;
		_data_->_tmp15_ = g_strdup ("proton_experimental");
		g_hash_table_insert (_data_->_tmp14_, (gpointer) ((guintptr) 0), _data_->_tmp15_);
		_data_->result = TRUE;
		_g_free0 (_data_->end_text);
		_g_free0 (_data_->start_text);
		_g_free0 (_data_->compat_tool_mapping_item_name);
		_g_free0 (_data_->compat_tool_mapping_item);
		_g_free0 (_data_->compat_tool_mapping_content);
		_g_free0 (_data_->config_content);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp16_ = g_strdup ("\n\t\t\t\t}");
	_g_free0 (_data_->end_text);
	_data_->end_text = _data_->_tmp16_;
	_data_->_tmp17_ = _data_->config_content;
	_data_->_tmp18_ = _data_->start_text;
	_data_->_tmp19_ = _data_->start_text;
	_data_->_tmp20_ = strlen (_data_->_tmp19_);
	_data_->_tmp21_ = _data_->_tmp20_;
	_data_->start_pos = string_index_of (_data_->_tmp17_, _data_->_tmp18_, 0) + _data_->_tmp21_;
	_data_->_tmp22_ = _data_->config_content;
	_data_->_tmp23_ = _data_->end_text;
	_data_->end_pos = string_index_of (_data_->_tmp22_, _data_->_tmp23_, _data_->start_pos);
	_data_->_tmp24_ = _data_->config_content;
	_data_->_tmp25_ = string_substring (_data_->_tmp24_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
	_g_free0 (_data_->compat_tool_mapping_content);
	_data_->compat_tool_mapping_content = _data_->_tmp25_;
	while (TRUE) {
		_data_->_tmp26_ = g_strdup ("\"");
		_g_free0 (_data_->start_text);
		_data_->start_text = _data_->_tmp26_;
		_data_->_tmp27_ = g_strdup ("}");
		_g_free0 (_data_->end_text);
		_data_->end_text = _data_->_tmp27_;
		_data_->_tmp28_ = _data_->compat_tool_mapping_content;
		_data_->_tmp29_ = _data_->start_text;
		_data_->start_pos = string_index_of (_data_->_tmp28_, _data_->_tmp29_, _data_->current_position);
		if (_data_->start_pos == -1) {
			break;
		}
		_data_->_tmp30_ = _data_->compat_tool_mapping_content;
		_data_->_tmp31_ = _data_->end_text;
		_data_->end_pos = string_index_of (_data_->_tmp30_, _data_->_tmp31_, _data_->start_pos) + 1;
		_data_->_tmp32_ = _data_->compat_tool_mapping_content;
		_data_->_tmp33_ = string_substring (_data_->_tmp32_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
		_g_free0 (_data_->compat_tool_mapping_item);
		_data_->compat_tool_mapping_item = _data_->_tmp33_;
		_data_->current_position = _data_->end_pos;
		_data_->_tmp34_ = g_strdup ("\"");
		_g_free0 (_data_->start_text);
		_data_->start_text = _data_->_tmp34_;
		_data_->_tmp35_ = g_strdup ("\"");
		_g_free0 (_data_->end_text);
		_data_->end_text = _data_->_tmp35_;
		_data_->_tmp36_ = _data_->compat_tool_mapping_item;
		_data_->_tmp37_ = _data_->start_text;
		_data_->_tmp38_ = _data_->start_text;
		_data_->_tmp39_ = strlen (_data_->_tmp38_);
		_data_->_tmp40_ = _data_->_tmp39_;
		_data_->start_pos = string_index_of (_data_->_tmp36_, _data_->_tmp37_, 0) + _data_->_tmp40_;
		_data_->_tmp41_ = _data_->compat_tool_mapping_item;
		_data_->_tmp42_ = _data_->end_text;
		_data_->end_pos = string_index_of (_data_->_tmp41_, _data_->_tmp42_, _data_->start_pos);
		_data_->_tmp43_ = _data_->compat_tool_mapping_item;
		_data_->_tmp44_ = string_substring (_data_->_tmp43_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
		_data_->_tmp45_ = _data_->_tmp44_;
		_data_->_tmp46_ = 0U;
		_data_->_tmp47_ = uint_try_parse (_data_->_tmp45_, &_data_->_tmp46_, NULL, (guint) 0);
		_data_->compat_tool_mapping_item_appid = _data_->_tmp46_;
		_data_->_tmp48_ = _data_->_tmp47_;
		_g_free0 (_data_->_tmp45_);
		_data_->compat_tool_mapping_item_appid_valid = _data_->_tmp48_;
		if (!_data_->compat_tool_mapping_item_appid_valid) {
			continue;
		}
		_data_->_tmp49_ = g_strdup ("name\"\t\t\"");
		_g_free0 (_data_->start_text);
		_data_->start_text = _data_->_tmp49_;
		_data_->_tmp50_ = g_strdup ("\"");
		_g_free0 (_data_->end_text);
		_data_->end_text = _data_->_tmp50_;
		_data_->_tmp51_ = _data_->compat_tool_mapping_item;
		_data_->_tmp52_ = _data_->start_text;
		_data_->_tmp53_ = _data_->start_text;
		_data_->_tmp54_ = strlen (_data_->_tmp53_);
		_data_->_tmp55_ = _data_->_tmp54_;
		_data_->start_pos = string_index_of (_data_->_tmp51_, _data_->_tmp52_, 0) + _data_->_tmp55_;
		_data_->_tmp56_ = _data_->compat_tool_mapping_item;
		_data_->_tmp57_ = _data_->end_text;
		_data_->end_pos = string_index_of (_data_->_tmp56_, _data_->_tmp57_, _data_->start_pos);
		_data_->_tmp58_ = _data_->compat_tool_mapping_item;
		_data_->_tmp59_ = string_substring (_data_->_tmp58_, (glong) _data_->start_pos, (glong) (_data_->end_pos - _data_->start_pos));
		_g_free0 (_data_->compat_tool_mapping_item_name);
		_data_->compat_tool_mapping_item_name = _data_->_tmp59_;
		_data_->_tmp60_ = _data_->self->compatibility_tool_hashtable;
		_data_->_tmp61_ = _data_->compat_tool_mapping_item_name;
		_data_->_tmp62_ = g_strdup (_data_->_tmp61_);
		g_hash_table_insert (_data_->_tmp60_, (gpointer) ((guintptr) _data_->compat_tool_mapping_item_appid), _data_->_tmp62_);
	}
	_data_->result = TRUE;
	_g_free0 (_data_->end_text);
	_g_free0 (_data_->start_text);
	_g_free0 (_data_->compat_tool_mapping_item_name);
	_g_free0 (_data_->compat_tool_mapping_item);
	_g_free0 (_data_->compat_tool_mapping_content);
	_g_free0 (_data_->config_content);
	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 gboolean
int_try_parse (const gchar* str,
               gint* _result_,
               const gchar** unparsed,
               guint _base)
{
	gint _vala__result_ = 0;
	const gchar* _vala_unparsed = NULL;
	gchar* endptr = NULL;
	glong long_result = 0L;
	gchar* _tmp0_ = NULL;
	glong _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	glong _tmp6_;
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	errno = 0;
	_tmp1_ = strtol (str, &_tmp0_, (gint) _base);
	endptr = _tmp0_;
	long_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_ = long_result;
	if ((((glong) G_MININT) <= _tmp6_) && (_tmp6_ <= ((glong) G_MAXINT))) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_vala__result_ = (gint) long_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_MAXINT;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
}

gboolean
proton_plus_models_launchers_steam_change_default_compatibility_tool (ProtonPlusModelsLaunchersSteam* self,
                                                                      const gchar* compatibility_tool)
{
	gint default_id = 0;
	gchar* config_path = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* config_content = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* compat_tool_mapping_content = NULL;
	gchar* _tmp4_;
	gchar* compat_tool_mapping_item = NULL;
	gchar* _tmp5_;
	gint compat_tool_mapping_item_appid = 0;
	gchar* compat_tool_mapping_item_name = NULL;
	gchar* _tmp6_;
	gchar* start_text = NULL;
	gchar* _tmp7_;
	gchar* end_text = NULL;
	gchar* _tmp8_;
	gint start_pos = 0;
	gint end_pos = 0;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	gint _tmp31_;
	gint _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	gchar* _tmp36_;
	const gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gboolean _tmp40_;
	gboolean modified = FALSE;
	const gchar* _tmp109_;
	const gchar* _tmp110_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (compatibility_tool != NULL, FALSE);
	default_id = 0;
	_tmp0_ = ((ProtonPlusModelsLauncher*) self)->directory;
	_tmp1_ = g_strdup_printf ("%s/config/config.vdf", _tmp0_);
	config_path = _tmp1_;
	_tmp2_ = config_path;
	_tmp3_ = proton_plus_utils_filesystem_get_file_content (_tmp2_, FALSE);
	config_content = _tmp3_;
	_tmp4_ = g_strdup ("");
	compat_tool_mapping_content = _tmp4_;
	_tmp5_ = g_strdup ("");
	compat_tool_mapping_item = _tmp5_;
	compat_tool_mapping_item_appid = 0;
	_tmp6_ = g_strdup ("");
	compat_tool_mapping_item_name = _tmp6_;
	_tmp7_ = g_strdup ("");
	start_text = _tmp7_;
	_tmp8_ = g_strdup ("");
	end_text = _tmp8_;
	start_pos = 0;
	end_pos = 0;
	_tmp9_ = g_strdup ("\"CompatToolMapping\"\n\t\t\t\t{");
	_g_free0 (start_text);
	start_text = _tmp9_;
	_tmp10_ = g_strdup ("\n\t\t\t\t}");
	_g_free0 (end_text);
	end_text = _tmp10_;
	_tmp11_ = config_content;
	_tmp12_ = start_text;
	if (string_index_of (_tmp11_, _tmp12_, 0) == -1) {
		gchar* start_steam_text = NULL;
		gchar* _tmp13_;
		gint start_steam_pos = 0;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		gint insert_pos = 0;
		const gchar* _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		const gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		_tmp13_ = g_strdup ("\"Steam\"\n\t\t\t{");
		start_steam_text = _tmp13_;
		_tmp14_ = config_content;
		_tmp15_ = start_steam_text;
		start_steam_pos = string_index_of (_tmp14_, _tmp15_, 0);
		_tmp16_ = start_steam_text;
		_tmp17_ = strlen (_tmp16_);
		_tmp18_ = _tmp17_;
		insert_pos = start_steam_pos + _tmp18_;
		_tmp19_ = config_content;
		_tmp20_ = string_substring (_tmp19_, (glong) 0, (glong) insert_pos);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strconcat (_tmp21_, "\n\t\t\t\t\"CompatToolMapping\"\n\t\t\t\t{\n\t\t\t\t}", NULL);
		_tmp23_ = _tmp22_;
		_tmp24_ = config_content;
		_tmp25_ = string_substring (_tmp24_, (glong) insert_pos, (glong) -1);
		_tmp26_ = _tmp25_;
		_tmp27_ = g_strconcat (_tmp23_, _tmp26_, NULL);
		_g_free0 (config_content);
		config_content = _tmp27_;
		_g_free0 (_tmp26_);
		_g_free0 (_tmp23_);
		_g_free0 (_tmp21_);
		_g_free0 (start_steam_text);
	}
	_tmp28_ = config_content;
	_tmp29_ = start_text;
	_tmp30_ = start_text;
	_tmp31_ = strlen (_tmp30_);
	_tmp32_ = _tmp31_;
	start_pos = string_index_of (_tmp28_, _tmp29_, 0) + _tmp32_;
	_tmp33_ = config_content;
	_tmp34_ = end_text;
	end_pos = string_index_of (_tmp33_, _tmp34_, start_pos);
	_tmp35_ = config_content;
	_tmp36_ = string_substring (_tmp35_, (glong) start_pos, (glong) (end_pos - start_pos));
	_g_free0 (compat_tool_mapping_content);
	compat_tool_mapping_content = _tmp36_;
	_tmp37_ = compat_tool_mapping_content;
	_tmp38_ = g_strdup_printf ("\"%i\"", default_id);
	_tmp39_ = _tmp38_;
	_tmp40_ = string_contains (_tmp37_, _tmp39_);
	_g_free0 (_tmp39_);
	if (_tmp40_) {
		gchar* _tmp41_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		gchar* _tmp44_;
		const gchar* _tmp45_;
		const gchar* _tmp46_;
		const gchar* _tmp47_;
		gint _tmp48_;
		gint _tmp49_;
		const gchar* _tmp50_;
		gint _tmp51_;
		gint _tmp52_;
		const gchar* _tmp53_;
		gchar* _tmp54_;
		gchar* _tmp55_;
		const gchar* _tmp56_;
		const gchar* _tmp57_;
		const gchar* _tmp58_;
		gint _tmp59_;
		gint _tmp60_;
		gchar* _tmp61_;
		const gchar* _tmp62_;
		const gchar* _tmp63_;
		gboolean compat_tool_mapping_item_appid_valid = FALSE;
		const gchar* _tmp64_;
		gchar* _tmp65_;
		gchar* _tmp66_;
		gint _tmp67_ = 0;
		gboolean _tmp68_;
		gboolean _tmp69_;
		gchar* _tmp70_;
		const gchar* _tmp71_;
		const gchar* _tmp72_;
		const gchar* _tmp73_;
		gint _tmp74_;
		gint _tmp75_;
		gchar* _tmp76_;
		const gchar* _tmp77_;
		const gchar* _tmp78_;
		const gchar* _tmp79_;
		gchar* _tmp80_;
		gchar* compat_tool_mapping_item_modified = NULL;
		const gchar* _tmp81_;
		const gchar* _tmp82_;
		gchar* _tmp83_;
		const gchar* _tmp84_;
		const gchar* _tmp85_;
		const gchar* _tmp86_;
		gchar* _tmp87_;
		_tmp41_ = g_strdup_printf ("\t\t\t\t\t\"%i\"", default_id);
		_g_free0 (start_text);
		start_text = _tmp41_;
		_tmp42_ = compat_tool_mapping_content;
		_tmp43_ = start_text;
		start_pos = string_index_of (_tmp42_, _tmp43_, 0);
		if (start_pos == -1) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp44_ = g_strdup ("}");
		_g_free0 (end_text);
		end_text = _tmp44_;
		_tmp45_ = compat_tool_mapping_content;
		_tmp46_ = end_text;
		_tmp47_ = start_text;
		_tmp48_ = strlen (_tmp47_);
		_tmp49_ = _tmp48_;
		_tmp50_ = end_text;
		_tmp51_ = strlen (_tmp50_);
		_tmp52_ = _tmp51_;
		end_pos = string_index_of (_tmp45_, _tmp46_, start_pos + _tmp49_) + _tmp52_;
		if (end_pos == -1) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp53_ = compat_tool_mapping_content;
		_tmp54_ = string_substring (_tmp53_, (glong) start_pos, (glong) (end_pos - start_pos));
		_g_free0 (compat_tool_mapping_item);
		compat_tool_mapping_item = _tmp54_;
		_tmp55_ = g_strdup ("\"");
		_g_free0 (start_text);
		start_text = _tmp55_;
		_tmp56_ = compat_tool_mapping_item;
		_tmp57_ = start_text;
		_tmp58_ = start_text;
		_tmp59_ = strlen (_tmp58_);
		_tmp60_ = _tmp59_;
		start_pos = string_index_of (_tmp56_, _tmp57_, 0) + _tmp60_;
		if (start_pos == -1) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp61_ = g_strdup ("\"");
		_g_free0 (end_text);
		end_text = _tmp61_;
		_tmp62_ = compat_tool_mapping_item;
		_tmp63_ = end_text;
		end_pos = string_index_of (_tmp62_, _tmp63_, start_pos);
		if (end_pos == -1) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp64_ = compat_tool_mapping_item;
		_tmp65_ = string_substring (_tmp64_, (glong) start_pos, (glong) (end_pos - start_pos));
		_tmp66_ = _tmp65_;
		_tmp68_ = int_try_parse (_tmp66_, &_tmp67_, NULL, (guint) 0);
		compat_tool_mapping_item_appid = _tmp67_;
		_tmp69_ = _tmp68_;
		_g_free0 (_tmp66_);
		compat_tool_mapping_item_appid_valid = _tmp69_;
		if (!compat_tool_mapping_item_appid_valid) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		if (compat_tool_mapping_item_appid != 0) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp70_ = g_strdup ("name\"\t\t\"");
		_g_free0 (start_text);
		start_text = _tmp70_;
		_tmp71_ = compat_tool_mapping_item;
		_tmp72_ = start_text;
		_tmp73_ = start_text;
		_tmp74_ = strlen (_tmp73_);
		_tmp75_ = _tmp74_;
		start_pos = string_index_of (_tmp71_, _tmp72_, 0) + _tmp75_;
		if (start_pos == -1) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp76_ = g_strdup ("\"");
		_g_free0 (end_text);
		end_text = _tmp76_;
		_tmp77_ = compat_tool_mapping_item;
		_tmp78_ = end_text;
		end_pos = string_index_of (_tmp77_, _tmp78_, start_pos);
		if (end_pos == -1) {
			result = FALSE;
			_g_free0 (end_text);
			_g_free0 (start_text);
			_g_free0 (compat_tool_mapping_item_name);
			_g_free0 (compat_tool_mapping_item);
			_g_free0 (compat_tool_mapping_content);
			_g_free0 (config_content);
			_g_free0 (config_path);
			return result;
		}
		_tmp79_ = compat_tool_mapping_item;
		_tmp80_ = string_substring (_tmp79_, (glong) start_pos, (glong) (end_pos - start_pos));
		_g_free0 (compat_tool_mapping_item_name);
		compat_tool_mapping_item_name = _tmp80_;
		_tmp81_ = compat_tool_mapping_item;
		_tmp82_ = compat_tool_mapping_item_name;
		_tmp83_ = string_replace (_tmp81_, _tmp82_, compatibility_tool);
		compat_tool_mapping_item_modified = _tmp83_;
		_tmp84_ = config_content;
		_tmp85_ = compat_tool_mapping_item;
		_tmp86_ = compat_tool_mapping_item_modified;
		_tmp87_ = string_replace (_tmp84_, _tmp85_, _tmp86_);
		_g_free0 (config_content);
		config_content = _tmp87_;
		_g_free0 (compat_tool_mapping_item_modified);
	} else {
		const gchar* _tmp88_;
		gchar* _tmp89_;
		gchar* _tmp90_;
		gchar* _tmp91_;
		gchar* _tmp92_;
		gchar* _tmp93_;
		gchar* _tmp94_;
		gchar* _tmp95_;
		gchar* _tmp96_;
		gchar* _tmp97_;
		gchar* _tmp98_;
		gchar* _tmp99_;
		gchar* _tmp100_;
		gchar* _tmp101_;
		gchar* _tmp102_;
		gchar* _tmp103_;
		gchar* _tmp104_;
		const gchar* _tmp105_;
		gchar* _tmp106_;
		gchar* _tmp107_;
		gchar* _tmp108_;
		_tmp88_ = config_content;
		_tmp89_ = string_substring (_tmp88_, (glong) 0, (glong) start_pos);
		_tmp90_ = _tmp89_;
		_tmp91_ = g_strdup_printf ("\n\t\t\t\t\t\"%i\"\n\t\t\t\t\t{\n", default_id);
		_tmp92_ = _tmp91_;
		_tmp93_ = g_strconcat (_tmp90_, _tmp92_, NULL);
		_tmp94_ = _tmp93_;
		_tmp95_ = g_strdup_printf ("\t\t\t\t\t\t\"name\"\t\t\"%s\"\n", compatibility_tool);
		_tmp96_ = _tmp95_;
		_tmp97_ = g_strconcat (_tmp94_, _tmp96_, NULL);
		_tmp98_ = _tmp97_;
		_tmp99_ = g_strconcat (_tmp98_, "\t\t\t\t\t\t\"config\"\t\t\"\"\n", NULL);
		_tmp100_ = _tmp99_;
		_tmp101_ = g_strconcat (_tmp100_, "\t\t\t\t\t\t\"priority\"\t\t\"75\"\n", NULL);
		_tmp102_ = _tmp101_;
		_tmp103_ = g_strconcat (_tmp102_, "\t\t\t\t\t}", NULL);
		_tmp104_ = _tmp103_;
		_tmp105_ = config_content;
		_tmp106_ = string_substring (_tmp105_, (glong) start_pos, (glong) -1);
		_tmp107_ = _tmp106_;
		_tmp108_ = g_strconcat (_tmp104_, _tmp107_, NULL);
		_g_free0 (config_content);
		config_content = _tmp108_;
		_g_free0 (_tmp107_);
		_g_free0 (_tmp104_);
		_g_free0 (_tmp102_);
		_g_free0 (_tmp100_);
		_g_free0 (_tmp98_);
		_g_free0 (_tmp96_);
		_g_free0 (_tmp94_);
		_g_free0 (_tmp92_);
		_g_free0 (_tmp90_);
	}
	_tmp109_ = config_path;
	_tmp110_ = config_content;
	modified = proton_plus_utils_filesystem_modify_file (_tmp109_, _tmp110_);
	if (!modified) {
		result = FALSE;
		_g_free0 (end_text);
		_g_free0 (start_text);
		_g_free0 (compat_tool_mapping_item_name);
		_g_free0 (compat_tool_mapping_item);
		_g_free0 (compat_tool_mapping_content);
		_g_free0 (config_content);
		_g_free0 (config_path);
		return result;
	}
	proton_plus_models_launchers_steam_set_default_compatibility_tool (self, compatibility_tool);
	result = TRUE;
	_g_free0 (end_text);
	_g_free0 (start_text);
	_g_free0 (compat_tool_mapping_item_name);
	_g_free0 (compat_tool_mapping_item);
	_g_free0 (compat_tool_mapping_content);
	_g_free0 (config_content);
	_g_free0 (config_path);
	return result;
}

ProtonPlusModelsSteamProfile*
proton_plus_models_launchers_steam_get_profile (ProtonPlusModelsLaunchersSteam* self)
{
	ProtonPlusModelsSteamProfile* result;
	ProtonPlusModelsSteamProfile* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_profile;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_launchers_steam_set_profile (ProtonPlusModelsLaunchersSteam* self,
                                                ProtonPlusModelsSteamProfile* value)
{
	ProtonPlusModelsSteamProfile* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launchers_steam_get_profile (self);
	if (old_value != value) {
		ProtonPlusModelsSteamProfile* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_profile);
		self->priv->_profile = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launchers_steam_properties[PROTON_PLUS_MODELS_LAUNCHERS_STEAM_PROFILE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_launchers_steam_get_default_compatibility_tool (ProtonPlusModelsLaunchersSteam* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_default_compatibility_tool;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_launchers_steam_set_default_compatibility_tool (ProtonPlusModelsLaunchersSteam* self,
                                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_launchers_steam_get_default_compatibility_tool (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_default_compatibility_tool);
		self->priv->_default_compatibility_tool = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_launchers_steam_properties[PROTON_PLUS_MODELS_LAUNCHERS_STEAM_DEFAULT_COMPATIBILITY_TOOL_PROPERTY]);
	}
}

static void
proton_plus_models_launchers_steam_class_init (ProtonPlusModelsLaunchersSteamClass * klass,
                                               gpointer klass_data)
{
	proton_plus_models_launchers_steam_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsLaunchersSteam_private_offset);
	((ProtonPlusModelsLauncherClass *) klass)->get_compatibility_tool_usage_count = (gint (*) (ProtonPlusModelsLauncher*, const gchar*)) proton_plus_models_launchers_steam_real_get_compatibility_tool_usage_count;
	((ProtonPlusModelsLauncherClass *) klass)->load_game_library = (void (*) (ProtonPlusModelsLauncher*, GAsyncReadyCallback, gpointer)) proton_plus_models_launchers_steam_real_load_game_library;
	((ProtonPlusModelsLauncherClass *) klass)->load_game_library_finish = (gboolean (*) (ProtonPlusModelsLauncher*, GAsyncResult*)) proton_plus_models_launchers_steam_load_game_library_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_launchers_steam_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_launchers_steam_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_launchers_steam_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHERS_STEAM_PROFILE_PROPERTY, proton_plus_models_launchers_steam_properties[PROTON_PLUS_MODELS_LAUNCHERS_STEAM_PROFILE_PROPERTY] = g_param_spec_object ("profile", "profile", "profile", PROTON_PLUS_MODELS_TYPE_STEAM_PROFILE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_LAUNCHERS_STEAM_DEFAULT_COMPATIBILITY_TOOL_PROPERTY, proton_plus_models_launchers_steam_properties[PROTON_PLUS_MODELS_LAUNCHERS_STEAM_DEFAULT_COMPATIBILITY_TOOL_PROPERTY] = g_param_spec_string ("default-compatibility-tool", "default-compatibility-tool", "default-compatibility-tool", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
proton_plus_models_launchers_steam_instance_init (ProtonPlusModelsLaunchersSteam * self,
                                                  gpointer klass)
{
	self->priv = proton_plus_models_launchers_steam_get_instance_private (self);
}

static void
proton_plus_models_launchers_steam_finalize (GObject * obj)
{
	ProtonPlusModelsLaunchersSteam * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam);
	(self->profiles == NULL) ? NULL : (self->profiles = (_g_list_free__g_object_unref0_ (self->profiles), NULL));
	_g_object_unref0 (self->priv->_profile);
	_g_free0 (self->priv->_default_compatibility_tool);
	_g_hash_table_unref0 (self->compatibility_tool_hashtable);
	G_OBJECT_CLASS (proton_plus_models_launchers_steam_parent_class)->finalize (obj);
}

static GType
proton_plus_models_launchers_steam_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsLaunchersSteamClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_launchers_steam_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsLaunchersSteam), 0, (GInstanceInitFunc) proton_plus_models_launchers_steam_instance_init, NULL };
	GType proton_plus_models_launchers_steam_type_id;
	proton_plus_models_launchers_steam_type_id = g_type_register_static (PROTON_PLUS_MODELS_TYPE_LAUNCHER, "ProtonPlusModelsLaunchersSteam", &g_define_type_info, 0);
	ProtonPlusModelsLaunchersSteam_private_offset = g_type_add_instance_private (proton_plus_models_launchers_steam_type_id, sizeof (ProtonPlusModelsLaunchersSteamPrivate));
	return proton_plus_models_launchers_steam_type_id;
}

GType
proton_plus_models_launchers_steam_get_type (void)
{
	static volatile gsize proton_plus_models_launchers_steam_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_launchers_steam_type_id__once)) {
		GType proton_plus_models_launchers_steam_type_id;
		proton_plus_models_launchers_steam_type_id = proton_plus_models_launchers_steam_get_type_once ();
		g_once_init_leave (&proton_plus_models_launchers_steam_type_id__once, proton_plus_models_launchers_steam_type_id);
	}
	return proton_plus_models_launchers_steam_type_id__once;
}

static void
_vala_proton_plus_models_launchers_steam_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec)
{
	ProtonPlusModelsLaunchersSteam * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam);
	switch (property_id) {
		case PROTON_PLUS_MODELS_LAUNCHERS_STEAM_PROFILE_PROPERTY:
		g_value_set_object (value, proton_plus_models_launchers_steam_get_profile (self));
		break;
		case PROTON_PLUS_MODELS_LAUNCHERS_STEAM_DEFAULT_COMPATIBILITY_TOOL_PROPERTY:
		g_value_set_string (value, proton_plus_models_launchers_steam_get_default_compatibility_tool (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_launchers_steam_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec)
{
	ProtonPlusModelsLaunchersSteam * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_LAUNCHERS_TYPE_STEAM, ProtonPlusModelsLaunchersSteam);
	switch (property_id) {
		case PROTON_PLUS_MODELS_LAUNCHERS_STEAM_PROFILE_PROPERTY:
		proton_plus_models_launchers_steam_set_profile (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_MODELS_LAUNCHERS_STEAM_DEFAULT_COMPATIBILITY_TOOL_PROPERTY:
		proton_plus_models_launchers_steam_set_default_compatibility_tool (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

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

