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

#include "protonplus_core.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <locale.h>
#include "config.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

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_settings_schema_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_unref (var), NULL)))
#define _g_settings_schema_source_unref0(var) ((var == NULL) ? NULL : (var = (g_settings_schema_source_unref (var), NULL)))

GSettings* proton_plus_globals_SETTINGS = NULL;
gboolean proton_plus_globals_IS_STEAM_OS = FALSE;
gboolean proton_plus_globals_IS_FLATPAK = FALSE;
ProtonPlusModelsCpuCapabilities* proton_plus_globals_CPU_CAPABILITIES = NULL;
GList* proton_plus_globals_HWCAPS = NULL;
gchar* proton_plus_globals_CACHE_PATH = NULL;
gboolean proton_plus_globals_PROTONTRICKS_INSTALLED = FALSE;
gboolean proton_plus_globals_PROTONTRICKS_FLATPAK_INSTALLED = FALSE;
gboolean proton_plus_globals_FAUGUS_FLATPAK_INSTALLED = FALSE;
gboolean proton_plus_globals_MANGOHUD_INSTALLED = FALSE;
gboolean proton_plus_globals_MANGOHUD_FLATPAK_INSTALLED = FALSE;
gboolean proton_plus_globals_GAMESCOPE_INSTALLED = FALSE;
gboolean proton_plus_globals_SCOPEBUDDY_INSTALLED = FALSE;
gboolean proton_plus_globals_GAMEMODE_INSTALLED = FALSE;
gboolean proton_plus_globals_GAME_PERFORMANCE_INSTALLED = FALSE;
gboolean proton_plus_globals_OBS_VKCAPTURE_INSTALLED = FALSE;
gboolean proton_plus_globals_OBS_VKCAPTURE_FLATPAK_INSTALLED = FALSE;
gboolean proton_plus_globals_OBS_VKCAPTURE_FLATPAK_PLUGIN_INSTALLED = FALSE;
gboolean proton_plus_globals_VKBASALT_INSTALLED = FALSE;
VALA_EXTERN gboolean proton_plus_globals_loaded;
gboolean proton_plus_globals_loaded = FALSE;

static void _vala_ProtonPlusGlobalsLanguageItem_array_free (ProtonPlusGlobalsLanguageItem * array,
                                                     gssize array_length);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);

void
proton_plus_globals_language_item_copy (const ProtonPlusGlobalsLanguageItem* self,
                                        ProtonPlusGlobalsLanguageItem* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = (*self).code;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).code);
	(*dest).code = _tmp1_;
	_tmp2_ = (*self).name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 ((*dest).name);
	(*dest).name = _tmp3_;
	(*dest).index = (*self).index;
}

void
proton_plus_globals_language_item_destroy (ProtonPlusGlobalsLanguageItem* self)
{
	_g_free0 ((*self).code);
	_g_free0 ((*self).name);
}

ProtonPlusGlobalsLanguageItem*
proton_plus_globals_language_item_dup (const ProtonPlusGlobalsLanguageItem* self)
{
	ProtonPlusGlobalsLanguageItem* dup;
	dup = g_new0 (ProtonPlusGlobalsLanguageItem, 1);
	proton_plus_globals_language_item_copy (self, dup);
	return dup;
}

void
proton_plus_globals_language_item_free (ProtonPlusGlobalsLanguageItem* self)
{
	proton_plus_globals_language_item_destroy (self);
	g_free (self);
}

static GType
proton_plus_globals_language_item_get_type_once (void)
{
	GType proton_plus_globals_language_item_type_id;
	proton_plus_globals_language_item_type_id = g_boxed_type_register_static ("ProtonPlusGlobalsLanguageItem", (GBoxedCopyFunc) proton_plus_globals_language_item_dup, (GBoxedFreeFunc) proton_plus_globals_language_item_free);
	return proton_plus_globals_language_item_type_id;
}

GType
proton_plus_globals_language_item_get_type (void)
{
	static volatile gsize proton_plus_globals_language_item_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_globals_language_item_type_id__once)) {
		GType proton_plus_globals_language_item_type_id;
		proton_plus_globals_language_item_type_id = proton_plus_globals_language_item_get_type_once ();
		g_once_init_leave (&proton_plus_globals_language_item_type_id__once, proton_plus_globals_language_item_type_id);
	}
	return proton_plus_globals_language_item_type_id__once;
}

ProtonPlusGlobalsLanguageItem*
proton_plus_globals_LANGUAGES (gint* result_length1)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	ProtonPlusGlobalsLanguageItem _tmp2_ = {0};
	gchar* _tmp3_;
	gchar* _tmp4_;
	ProtonPlusGlobalsLanguageItem _tmp5_ = {0};
	gchar* _tmp6_;
	gchar* _tmp7_;
	ProtonPlusGlobalsLanguageItem _tmp8_ = {0};
	gchar* _tmp9_;
	gchar* _tmp10_;
	ProtonPlusGlobalsLanguageItem _tmp11_ = {0};
	gchar* _tmp12_;
	gchar* _tmp13_;
	ProtonPlusGlobalsLanguageItem _tmp14_ = {0};
	gchar* _tmp15_;
	gchar* _tmp16_;
	ProtonPlusGlobalsLanguageItem _tmp17_ = {0};
	gchar* _tmp18_;
	gchar* _tmp19_;
	ProtonPlusGlobalsLanguageItem _tmp20_ = {0};
	gchar* _tmp21_;
	gchar* _tmp22_;
	ProtonPlusGlobalsLanguageItem _tmp23_ = {0};
	gchar* _tmp24_;
	gchar* _tmp25_;
	ProtonPlusGlobalsLanguageItem _tmp26_ = {0};
	gchar* _tmp27_;
	gchar* _tmp28_;
	ProtonPlusGlobalsLanguageItem _tmp29_ = {0};
	gchar* _tmp30_;
	gchar* _tmp31_;
	ProtonPlusGlobalsLanguageItem _tmp32_ = {0};
	gchar* _tmp33_;
	gchar* _tmp34_;
	ProtonPlusGlobalsLanguageItem _tmp35_ = {0};
	gchar* _tmp36_;
	gchar* _tmp37_;
	ProtonPlusGlobalsLanguageItem _tmp38_ = {0};
	gchar* _tmp39_;
	gchar* _tmp40_;
	ProtonPlusGlobalsLanguageItem _tmp41_ = {0};
	gchar* _tmp42_;
	gchar* _tmp43_;
	ProtonPlusGlobalsLanguageItem _tmp44_ = {0};
	gchar* _tmp45_;
	gchar* _tmp46_;
	ProtonPlusGlobalsLanguageItem _tmp47_ = {0};
	gchar* _tmp48_;
	gchar* _tmp49_;
	ProtonPlusGlobalsLanguageItem _tmp50_ = {0};
	gchar* _tmp51_;
	gchar* _tmp52_;
	ProtonPlusGlobalsLanguageItem _tmp53_ = {0};
	gchar* _tmp54_;
	gchar* _tmp55_;
	ProtonPlusGlobalsLanguageItem _tmp56_ = {0};
	gchar* _tmp57_;
	gchar* _tmp58_;
	ProtonPlusGlobalsLanguageItem _tmp59_ = {0};
	gchar* _tmp60_;
	gchar* _tmp61_;
	ProtonPlusGlobalsLanguageItem _tmp62_ = {0};
	gchar* _tmp63_;
	gchar* _tmp64_;
	ProtonPlusGlobalsLanguageItem _tmp65_ = {0};
	gchar* _tmp66_;
	gchar* _tmp67_;
	ProtonPlusGlobalsLanguageItem _tmp68_ = {0};
	gchar* _tmp69_;
	gchar* _tmp70_;
	ProtonPlusGlobalsLanguageItem _tmp71_ = {0};
	gchar* _tmp72_;
	gchar* _tmp73_;
	ProtonPlusGlobalsLanguageItem _tmp74_ = {0};
	gchar* _tmp75_;
	gchar* _tmp76_;
	ProtonPlusGlobalsLanguageItem _tmp77_ = {0};
	gchar* _tmp78_;
	gchar* _tmp79_;
	ProtonPlusGlobalsLanguageItem _tmp80_ = {0};
	ProtonPlusGlobalsLanguageItem* _tmp81_;
	ProtonPlusGlobalsLanguageItem* _tmp82_;
	gint _tmp82__length1;
	ProtonPlusGlobalsLanguageItem* result;
	_tmp0_ = g_strdup ("system");
	_tmp1_ = g_strdup (_ ("System"));
	memset (&_tmp2_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp2_.code);
	_tmp2_.code = _tmp0_;
	_g_free0 (_tmp2_.name);
	_tmp2_.name = _tmp1_;
	_tmp2_.index = 0;
	_tmp3_ = g_strdup ("ar");
	_tmp4_ = g_strdup (_ ("Arabic"));
	memset (&_tmp5_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp5_.code);
	_tmp5_.code = _tmp3_;
	_g_free0 (_tmp5_.name);
	_tmp5_.name = _tmp4_;
	_tmp5_.index = 1;
	_tmp6_ = g_strdup ("be");
	_tmp7_ = g_strdup (_ ("Belarusian"));
	memset (&_tmp8_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp8_.code);
	_tmp8_.code = _tmp6_;
	_g_free0 (_tmp8_.name);
	_tmp8_.name = _tmp7_;
	_tmp8_.index = 2;
	_tmp9_ = g_strdup ("bs");
	_tmp10_ = g_strdup (_ ("Bosnian"));
	memset (&_tmp11_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp11_.code);
	_tmp11_.code = _tmp9_;
	_g_free0 (_tmp11_.name);
	_tmp11_.name = _tmp10_;
	_tmp11_.index = 3;
	_tmp12_ = g_strdup ("cs");
	_tmp13_ = g_strdup (_ ("Czech"));
	memset (&_tmp14_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp14_.code);
	_tmp14_.code = _tmp12_;
	_g_free0 (_tmp14_.name);
	_tmp14_.name = _tmp13_;
	_tmp14_.index = 4;
	_tmp15_ = g_strdup ("de");
	_tmp16_ = g_strdup (_ ("German"));
	memset (&_tmp17_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp17_.code);
	_tmp17_.code = _tmp15_;
	_g_free0 (_tmp17_.name);
	_tmp17_.name = _tmp16_;
	_tmp17_.index = 5;
	_tmp18_ = g_strdup ("en");
	_tmp19_ = g_strdup (_ ("English"));
	memset (&_tmp20_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp20_.code);
	_tmp20_.code = _tmp18_;
	_g_free0 (_tmp20_.name);
	_tmp20_.name = _tmp19_;
	_tmp20_.index = 6;
	_tmp21_ = g_strdup ("el");
	_tmp22_ = g_strdup (_ ("Greek"));
	memset (&_tmp23_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp23_.code);
	_tmp23_.code = _tmp21_;
	_g_free0 (_tmp23_.name);
	_tmp23_.name = _tmp22_;
	_tmp23_.index = 7;
	_tmp24_ = g_strdup ("es");
	_tmp25_ = g_strdup (_ ("Spanish"));
	memset (&_tmp26_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp26_.code);
	_tmp26_.code = _tmp24_;
	_g_free0 (_tmp26_.name);
	_tmp26_.name = _tmp25_;
	_tmp26_.index = 8;
	_tmp27_ = g_strdup ("fi");
	_tmp28_ = g_strdup (_ ("Finnish"));
	memset (&_tmp29_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp29_.code);
	_tmp29_.code = _tmp27_;
	_g_free0 (_tmp29_.name);
	_tmp29_.name = _tmp28_;
	_tmp29_.index = 9;
	_tmp30_ = g_strdup ("fr");
	_tmp31_ = g_strdup (_ ("French"));
	memset (&_tmp32_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp32_.code);
	_tmp32_.code = _tmp30_;
	_g_free0 (_tmp32_.name);
	_tmp32_.name = _tmp31_;
	_tmp32_.index = 10;
	_tmp33_ = g_strdup ("hr");
	_tmp34_ = g_strdup (_ ("Croatian"));
	memset (&_tmp35_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp35_.code);
	_tmp35_.code = _tmp33_;
	_g_free0 (_tmp35_.name);
	_tmp35_.name = _tmp34_;
	_tmp35_.index = 11;
	_tmp36_ = g_strdup ("id");
	_tmp37_ = g_strdup (_ ("Indonesian"));
	memset (&_tmp38_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp38_.code);
	_tmp38_.code = _tmp36_;
	_g_free0 (_tmp38_.name);
	_tmp38_.name = _tmp37_;
	_tmp38_.index = 12;
	_tmp39_ = g_strdup ("it");
	_tmp40_ = g_strdup (_ ("Italian"));
	memset (&_tmp41_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp41_.code);
	_tmp41_.code = _tmp39_;
	_g_free0 (_tmp41_.name);
	_tmp41_.name = _tmp40_;
	_tmp41_.index = 13;
	_tmp42_ = g_strdup ("ja");
	_tmp43_ = g_strdup (_ ("Japanese"));
	memset (&_tmp44_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp44_.code);
	_tmp44_.code = _tmp42_;
	_g_free0 (_tmp44_.name);
	_tmp44_.name = _tmp43_;
	_tmp44_.index = 14;
	_tmp45_ = g_strdup ("ka");
	_tmp46_ = g_strdup (_ ("Georgian"));
	memset (&_tmp47_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp47_.code);
	_tmp47_.code = _tmp45_;
	_g_free0 (_tmp47_.name);
	_tmp47_.name = _tmp46_;
	_tmp47_.index = 15;
	_tmp48_ = g_strdup ("nl");
	_tmp49_ = g_strdup (_ ("Dutch"));
	memset (&_tmp50_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp50_.code);
	_tmp50_.code = _tmp48_;
	_g_free0 (_tmp50_.name);
	_tmp50_.name = _tmp49_;
	_tmp50_.index = 16;
	_tmp51_ = g_strdup ("pl");
	_tmp52_ = g_strdup (_ ("Polish"));
	memset (&_tmp53_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp53_.code);
	_tmp53_.code = _tmp51_;
	_g_free0 (_tmp53_.name);
	_tmp53_.name = _tmp52_;
	_tmp53_.index = 17;
	_tmp54_ = g_strdup ("pt");
	_tmp55_ = g_strdup (_ ("Portuguese (Portugal)"));
	memset (&_tmp56_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp56_.code);
	_tmp56_.code = _tmp54_;
	_g_free0 (_tmp56_.name);
	_tmp56_.name = _tmp55_;
	_tmp56_.index = 18;
	_tmp57_ = g_strdup ("ru");
	_tmp58_ = g_strdup (_ ("Russian"));
	memset (&_tmp59_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp59_.code);
	_tmp59_.code = _tmp57_;
	_g_free0 (_tmp59_.name);
	_tmp59_.name = _tmp58_;
	_tmp59_.index = 19;
	_tmp60_ = g_strdup ("sr@latin");
	_tmp61_ = g_strdup (_ ("Serbian (Latin)"));
	memset (&_tmp62_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp62_.code);
	_tmp62_.code = _tmp60_;
	_g_free0 (_tmp62_.name);
	_tmp62_.name = _tmp61_;
	_tmp62_.index = 20;
	_tmp63_ = g_strdup ("sk");
	_tmp64_ = g_strdup (_ ("Slovak"));
	memset (&_tmp65_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp65_.code);
	_tmp65_.code = _tmp63_;
	_g_free0 (_tmp65_.name);
	_tmp65_.name = _tmp64_;
	_tmp65_.index = 26;
	_tmp66_ = g_strdup ("sv");
	_tmp67_ = g_strdup (_ ("Swedish"));
	memset (&_tmp68_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp68_.code);
	_tmp68_.code = _tmp66_;
	_g_free0 (_tmp68_.name);
	_tmp68_.name = _tmp67_;
	_tmp68_.index = 21;
	_tmp69_ = g_strdup ("uk");
	_tmp70_ = g_strdup (_ ("Ukrainian"));
	memset (&_tmp71_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp71_.code);
	_tmp71_.code = _tmp69_;
	_g_free0 (_tmp71_.name);
	_tmp71_.name = _tmp70_;
	_tmp71_.index = 22;
	_tmp72_ = g_strdup ("vi");
	_tmp73_ = g_strdup (_ ("Vietnamese"));
	memset (&_tmp74_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp74_.code);
	_tmp74_.code = _tmp72_;
	_g_free0 (_tmp74_.name);
	_tmp74_.name = _tmp73_;
	_tmp74_.index = 23;
	_tmp75_ = g_strdup ("zh-CN");
	_tmp76_ = g_strdup (_ ("Chinese"));
	memset (&_tmp77_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp77_.code);
	_tmp77_.code = _tmp75_;
	_g_free0 (_tmp77_.name);
	_tmp77_.name = _tmp76_;
	_tmp77_.index = 24;
	_tmp78_ = g_strdup ("zh-TW");
	_tmp79_ = g_strdup (_ ("Chinese (Traditional)"));
	memset (&_tmp80_, 0, sizeof (ProtonPlusGlobalsLanguageItem));
	_g_free0 (_tmp80_.code);
	_tmp80_.code = _tmp78_;
	_g_free0 (_tmp80_.name);
	_tmp80_.name = _tmp79_;
	_tmp80_.index = 25;
	_tmp81_ = g_new0 (ProtonPlusGlobalsLanguageItem, 27);
	_tmp81_[0] = _tmp2_;
	_tmp81_[1] = _tmp5_;
	_tmp81_[2] = _tmp8_;
	_tmp81_[3] = _tmp11_;
	_tmp81_[4] = _tmp14_;
	_tmp81_[5] = _tmp17_;
	_tmp81_[6] = _tmp20_;
	_tmp81_[7] = _tmp23_;
	_tmp81_[8] = _tmp26_;
	_tmp81_[9] = _tmp29_;
	_tmp81_[10] = _tmp32_;
	_tmp81_[11] = _tmp35_;
	_tmp81_[12] = _tmp38_;
	_tmp81_[13] = _tmp41_;
	_tmp81_[14] = _tmp44_;
	_tmp81_[15] = _tmp47_;
	_tmp81_[16] = _tmp50_;
	_tmp81_[17] = _tmp53_;
	_tmp81_[18] = _tmp56_;
	_tmp81_[19] = _tmp59_;
	_tmp81_[20] = _tmp62_;
	_tmp81_[21] = _tmp65_;
	_tmp81_[22] = _tmp68_;
	_tmp81_[23] = _tmp71_;
	_tmp81_[24] = _tmp74_;
	_tmp81_[25] = _tmp77_;
	_tmp81_[26] = _tmp80_;
	_tmp82_ = _tmp81_;
	_tmp82__length1 = 27;
	if (result_length1) {
		*result_length1 = _tmp82__length1;
	}
	result = _tmp82_;
	return result;
}

static void
_vala_ProtonPlusGlobalsLanguageItem_array_free (ProtonPlusGlobalsLanguageItem * array,
                                                gssize array_length)
{
	if (array != NULL) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			proton_plus_globals_language_item_destroy (&array[i]);
		}
	}
	g_free (array);
}

void
proton_plus_globals_setupLanguage (void)
{
	gchar* current_locale = NULL;
	gchar* _tmp0_;
	GSettings* _tmp1_;
	gboolean _tmp20_ = FALSE;
	const gchar* _tmp21_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_ = NULL;
	const gchar* _tmp28_;
	_tmp0_ = g_strdup ("");
	current_locale = _tmp0_;
	_tmp1_ = proton_plus_globals_SETTINGS;
	if (_tmp1_ != NULL) {
		gint saved_enum_value = 0;
		GSettings* _tmp2_;
		_tmp2_ = proton_plus_globals_SETTINGS;
		saved_enum_value = g_settings_get_enum (_tmp2_, "language");
		{
			guint i = 0U;
			i = (guint) 0;
			{
				gboolean _tmp3_ = FALSE;
				_tmp3_ = TRUE;
				while (TRUE) {
					gint _tmp5_ = 0;
					ProtonPlusGlobalsLanguageItem* _tmp6_;
					ProtonPlusGlobalsLanguageItem* _tmp7_;
					gint _tmp7__length1;
					gboolean _tmp8_;
					gint _tmp9_ = 0;
					ProtonPlusGlobalsLanguageItem* _tmp10_;
					ProtonPlusGlobalsLanguageItem* _tmp11_;
					gint _tmp11__length1;
					ProtonPlusGlobalsLanguageItem _tmp12_;
					gboolean _tmp13_;
					if (!_tmp3_) {
						guint _tmp4_;
						_tmp4_ = i;
						i = _tmp4_ + 1;
					}
					_tmp3_ = FALSE;
					_tmp6_ = proton_plus_globals_LANGUAGES (&_tmp5_);
					_tmp7_ = _tmp6_;
					_tmp7__length1 = _tmp5_;
					_tmp8_ = !(i < ((guint) _tmp5_));
					_tmp7_ = (_vala_ProtonPlusGlobalsLanguageItem_array_free (_tmp7_, _tmp7__length1), NULL);
					if (_tmp8_) {
						break;
					}
					_tmp10_ = proton_plus_globals_LANGUAGES (&_tmp9_);
					_tmp11_ = _tmp10_;
					_tmp11__length1 = _tmp9_;
					_tmp12_ = _tmp11_[i];
					_tmp13_ = _tmp12_.index == saved_enum_value;
					_tmp11_ = (_vala_ProtonPlusGlobalsLanguageItem_array_free (_tmp11_, _tmp11__length1), NULL);
					if (_tmp13_) {
						gint _tmp14_ = 0;
						ProtonPlusGlobalsLanguageItem* _tmp15_;
						ProtonPlusGlobalsLanguageItem* _tmp16_;
						gint _tmp16__length1;
						ProtonPlusGlobalsLanguageItem _tmp17_;
						const gchar* _tmp18_;
						gchar* _tmp19_;
						_tmp15_ = proton_plus_globals_LANGUAGES (&_tmp14_);
						_tmp16_ = _tmp15_;
						_tmp16__length1 = _tmp14_;
						_tmp17_ = _tmp16_[i];
						_tmp18_ = _tmp17_.code;
						_tmp19_ = g_strdup (_tmp18_);
						_g_free0 (current_locale);
						current_locale = _tmp19_;
						_tmp16_ = (_vala_ProtonPlusGlobalsLanguageItem_array_free (_tmp16_, _tmp16__length1), NULL);
						break;
					}
				}
			}
		}
	}
	_tmp21_ = current_locale;
	if (g_strcmp0 (_tmp21_, "system") == 0) {
		_tmp20_ = TRUE;
	} else {
		const gchar* _tmp22_;
		_tmp22_ = current_locale;
		_tmp20_ = g_strcmp0 (_tmp22_, "") == 0;
	}
	if (_tmp20_) {
		gchar* _tmp23_;
		g_unsetenv ("LANGUAGE");
		_tmp23_ = g_strdup ("");
		_g_free0 (current_locale);
		current_locale = _tmp23_;
	} else {
		const gchar* _tmp24_;
		_tmp24_ = current_locale;
		g_setenv ("LANGUAGE", _tmp24_, TRUE);
	}
	_tmp25_ = current_locale;
	setlocale (LC_ALL, _tmp25_);
	_tmp26_ = current_locale;
	setlocale (LC_MESSAGES, _tmp26_);
	_tmp28_ = g_getenv ("LOCALE_DIR");
	_tmp27_ = _tmp28_;
	if (_tmp27_ == NULL) {
		_tmp27_ = LOCALE_DIR;
	}
	bindtextdomain (APP_ID, _tmp27_);
	bind_textdomain_codeset (APP_ID, "UTF-8");
	textdomain (APP_ID);
	_g_free0 (current_locale);
}

static gpointer
_g_settings_schema_source_ref0 (gpointer self)
{
	return self ? g_settings_schema_source_ref (self) : NULL;
}

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

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

void
proton_plus_globals_load (void)
{
	GSettingsSchemaSource* schema_source = NULL;
	GSettingsSchemaSource* _tmp0_;
	GSettingsSchemaSource* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GSettingsSchemaSource* _tmp3_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	ProtonPlusModelsCpuCapabilities* _tmp16_;
	ProtonPlusModelsCpuCapabilities* _tmp17_;
	GList* _tmp18_;
	gboolean _tmp19_ = FALSE;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	if (proton_plus_globals_loaded) {
		return;
	}
	proton_plus_globals_loaded = TRUE;
	_tmp0_ = g_settings_schema_source_get_default ();
	_tmp1_ = _g_settings_schema_source_ref0 (_tmp0_);
	schema_source = _tmp1_;
	_tmp3_ = schema_source;
	if (_tmp3_ != NULL) {
		GSettings* _tmp4_;
		_tmp4_ = proton_plus_globals_SETTINGS;
		_tmp2_ = _tmp4_ == NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GSettingsSchema* schema = NULL;
		GSettingsSchemaSource* _tmp5_;
		GSettingsSchema* _tmp6_;
		gboolean _tmp7_ = FALSE;
		GSettingsSchema* _tmp8_;
		_tmp5_ = schema_source;
		_tmp6_ = g_settings_schema_source_lookup (_tmp5_, "com.vysp3r.ProtonPlus.State", TRUE);
		schema = _tmp6_;
		_tmp8_ = schema;
		if (_tmp8_ != NULL) {
			GSettingsSchema* _tmp9_;
			_tmp9_ = schema;
			_tmp7_ = proton_plus_utils_filesystem_is_valid_schema (_tmp9_);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			GSettingsSchema* _tmp10_;
			GSettings* _tmp11_;
			_tmp10_ = schema;
			_tmp11_ = g_settings_new_full (_tmp10_, NULL, NULL);
			_g_object_unref0 (proton_plus_globals_SETTINGS);
			proton_plus_globals_SETTINGS = _tmp11_;
		}
		_g_settings_schema_unref0 (schema);
	}
	proton_plus_globals_IS_FLATPAK = g_file_test ("/.flatpak-info", G_FILE_TEST_IS_REGULAR);
	_tmp12_ = proton_plus_utils_system_get_distribution_name ();
	_tmp13_ = _tmp12_;
	_tmp14_ = g_ascii_strdown (_tmp13_, (gssize) -1);
	_tmp15_ = _tmp14_;
	proton_plus_globals_IS_STEAM_OS = g_strcmp0 (_tmp15_, "steamos") == 0;
	_g_free0 (_tmp15_);
	_g_free0 (_tmp13_);
	_tmp16_ = proton_plus_utils_system_get_cpu_capabilities ();
	_g_object_unref0 (proton_plus_globals_CPU_CAPABILITIES);
	proton_plus_globals_CPU_CAPABILITIES = _tmp16_;
	_tmp17_ = proton_plus_globals_CPU_CAPABILITIES;
	_tmp18_ = proton_plus_utils_system_get_hwcaps_for_capabilities (_tmp17_);
	(proton_plus_globals_HWCAPS == NULL) ? NULL : (proton_plus_globals_HWCAPS = (_g_list_free__g_free0_ (proton_plus_globals_HWCAPS), NULL));
	proton_plus_globals_HWCAPS = _tmp18_;
	proton_plus_globals_PROTONTRICKS_INSTALLED = proton_plus_utils_system_check_dependency_sync ("protontricks");
	proton_plus_globals_PROTONTRICKS_FLATPAK_INSTALLED = proton_plus_utils_system_check_flatpak_dependency_sync ("com.github.Matoking.protontricks");
	proton_plus_globals_FAUGUS_FLATPAK_INSTALLED = proton_plus_utils_system_check_flatpak_dependency_sync (PROTON_PLUS_MODELS_LAUNCHERS_FAUGUS_LAUNCHER_FLATPAK_ID);
	proton_plus_globals_MANGOHUD_INSTALLED = proton_plus_utils_system_check_dependency_sync ("mangohud");
	proton_plus_globals_MANGOHUD_FLATPAK_INSTALLED = proton_plus_utils_system_check_flatpak_dependency_sync ("org.freedesktop.Platform.VulkanLayer.MangoHud");
	proton_plus_globals_GAMESCOPE_INSTALLED = proton_plus_utils_system_check_dependency_sync ("gamescope");
	proton_plus_globals_GAMEMODE_INSTALLED = proton_plus_utils_system_check_dependency_sync ("gamemoderun");
	proton_plus_globals_GAME_PERFORMANCE_INSTALLED = proton_plus_utils_system_check_dependency_sync ("game-performance");
	proton_plus_globals_OBS_VKCAPTURE_INSTALLED = proton_plus_utils_system_check_dependency_sync ("obs-gamecapture");
	proton_plus_globals_OBS_VKCAPTURE_FLATPAK_INSTALLED = proton_plus_utils_system_check_flatpak_dependency_sync ("org.freedesktop.Platform.VulkanLayer.OBSVkCapture");
	proton_plus_globals_OBS_VKCAPTURE_FLATPAK_PLUGIN_INSTALLED = proton_plus_utils_system_check_flatpak_dependency_sync ("com.obsproject.Studio.Plugin.OBSVkCapture");
	if (proton_plus_utils_system_check_dependency_sync ("scopebuddy")) {
		_tmp19_ = TRUE;
	} else {
		_tmp19_ = proton_plus_utils_system_check_dependency_sync ("scb");
	}
	proton_plus_globals_SCOPEBUDDY_INSTALLED = _tmp19_;
	proton_plus_globals_VKBASALT_INSTALLED = proton_plus_utils_system_check_dependency_sync ("vkbasalt");
	_tmp20_ = g_get_user_cache_dir ();
	_tmp21_ = g_build_filename (_tmp20_, "ProtonPlus", NULL);
	_g_free0 (proton_plus_globals_CACHE_PATH);
	proton_plus_globals_CACHE_PATH = _tmp21_;
	_tmp22_ = proton_plus_globals_CACHE_PATH;
	if (!g_file_test (_tmp22_, G_FILE_TEST_IS_DIR)) {
		const gchar* _tmp23_;
		_tmp23_ = proton_plus_globals_CACHE_PATH;
		proton_plus_utils_filesystem_create_directory (_tmp23_);
	}
	_g_settings_schema_source_unref0 (schema_source);
}

