/* launch-options-list.c generated by valac 0.56.19, the Vala compiler
 * generated from launch-options-list.vala, do not modify */

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

enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_RAW_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_VALUE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_IS_OPAQUE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKENIZER_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKENIZER_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKENIZER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTIONS_LIST_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTIONS_LIST_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_options_list_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTIONS_LIST_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenPrivate {
	gchar* _raw;
	gchar* _value;
	gboolean _is_opaque;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsListPrivate {
	GeeList* _options;
	GeeArrayList* parsed_tokens;
	GeeArrayList* loaded_tokens;
	GeeHashMap* token_owners;
	GeeHashMap* initial_option_serializations;
	gchar* loaded_launch_options;
	gboolean loaded_source_is_pristine;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_parent_class = NULL;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_options_list_parent_class = NULL;

static void proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_property (GObject * object,
                                                                                                   guint property_id,
                                                                                                   GValue * value,
                                                                                                   GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_property (GObject * object,
                                                                                                   guint property_id,
                                                                                                   const GValue * value,
                                                                                                   GParamSpec * pspec);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_whitespace (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* self,
                                                                                                      gchar character);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_operator (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* self,
                                                                                                    gchar character);
static GType proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_get_type_once (void);
static GeeLinkedList* proton_plus_widgets_games_launch_options_editor_launch_options_list_get_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self);
static GeeLinkedList* proton_plus_widgets_games_launch_options_editor_launch_options_list_get_loaded_raw_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self);
static GeeLinkedList* proton_plus_widgets_games_launch_options_editor_launch_options_list_get_source_ordered_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self);
static gchar* proton_plus_widgets_games_launch_options_editor_launch_options_list_serialize_option (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option);
static void proton_plus_widgets_games_launch_options_editor_launch_options_list_append_option_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                                 GeeLinkedList* segments,
                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option);
static GeeList* proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType type);
static void proton_plus_widgets_games_launch_options_editor_launch_options_list_prepare_loaded_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                                const gchar* launch_options);
static gchar** proton_plus_widgets_games_launch_options_editor_launch_options_list_get_loaded_token_values (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                                     gint* result_length1);
static void proton_plus_widgets_games_launch_options_editor_launch_options_list_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_options_list_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_construct (GType object_type,
                                                                                     const gchar* raw,
                                                                                     const gchar* value,
                                                                                     gboolean is_opaque)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken * self = NULL;
	g_return_val_if_fail (raw != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) g_object_new (object_type, "raw", raw, "value", value, "is-opaque", is_opaque, NULL);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_new (const gchar* raw,
                                                                               const gchar* value,
                                                                               gboolean is_opaque)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, raw, value, is_opaque);
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_raw;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_raw (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self,
                                                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_raw);
		self->priv->_raw = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_RAW_PROPERTY]);
	}
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_value;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_value (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self,
                                                                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_value);
		self->priv->_value = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_VALUE_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_opaque;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_is_opaque (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* self,
                                                                                         gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (self);
	if (old_value != value) {
		self->priv->_is_opaque = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_IS_OPAQUE_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenClass * klass,
                                                                                      gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_RAW_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_RAW_PROPERTY] = g_param_spec_string ("raw", "raw", "raw", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_VALUE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_VALUE_PROPERTY] = g_param_spec_string ("value", "value", "value", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_IS_OPAQUE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_IS_OPAQUE_PROPERTY] = g_param_spec_boolean ("is-opaque", "is-opaque", "is-opaque", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken * self,
                                                                                         gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken);
	_g_free0 (self->priv->_raw);
	_g_free0 (self->priv->_value);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_property (GObject * object,
                                                                                              guint property_id,
                                                                                              GValue * value,
                                                                                              GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_RAW_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_VALUE_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_IS_OPAQUE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_property (GObject * object,
                                                                                              guint property_id,
                                                                                              const GValue * value,
                                                                                              GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_RAW_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_raw (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_VALUE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_value (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SHELL_TOKEN_IS_OPAQUE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_set_is_opaque (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = ((gchar*) self)[index];
	result = _tmp0_;
	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;
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_tokenize (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* self,
                                                                                        const gchar* input)
{
	GeeArrayList* tokens = NULL;
	GeeArrayList* _tmp0_;
	gint index = 0;
	GeeArrayList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (input != NULL, NULL);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	tokens = _tmp0_;
	index = 0;
	while (TRUE) {
		gint _tmp1_;
		gint _tmp2_;
		gint _tmp7_;
		gint _tmp8_;
		gint start = 0;
		GString* value = NULL;
		GString* _tmp9_;
		gboolean opaque = FALSE;
		GeeArrayList* _tmp53_;
		gchar* _tmp54_;
		gchar* _tmp55_;
		GString* _tmp56_;
		const gchar* _tmp57_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp58_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp59_;
		_tmp1_ = strlen (input);
		_tmp2_ = _tmp1_;
		if (!(index < _tmp2_)) {
			break;
		}
		while (TRUE) {
			gboolean _tmp3_ = FALSE;
			gint _tmp4_;
			gint _tmp5_;
			gint _tmp6_;
			_tmp4_ = strlen (input);
			_tmp5_ = _tmp4_;
			if (index < _tmp5_) {
				_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_whitespace (self, string_get (input, (glong) index));
			} else {
				_tmp3_ = FALSE;
			}
			if (!_tmp3_) {
				break;
			}
			_tmp6_ = index;
			index = _tmp6_ + 1;
		}
		_tmp7_ = strlen (input);
		_tmp8_ = _tmp7_;
		if (index >= _tmp8_) {
			break;
		}
		start = index;
		_tmp9_ = g_string_new ("");
		value = _tmp9_;
		opaque = FALSE;
		if (string_get (input, (glong) index) == '#') {
			GeeArrayList* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp14_;
			_tmp10_ = tokens;
			_tmp11_ = string_substring (input, (glong) start, (glong) -1);
			_tmp12_ = _tmp11_;
			_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_new (_tmp12_, "", TRUE);
			_tmp14_ = _tmp13_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp10_, _tmp14_);
			_g_object_unref0 (_tmp14_);
			_g_free0 (_tmp12_);
			_g_string_free0 (value);
			break;
		}
		while (TRUE) {
			gboolean _tmp15_ = FALSE;
			gint _tmp16_;
			gint _tmp17_;
			gchar character = '\0';
			gboolean _tmp49_ = FALSE;
			gboolean _tmp50_ = FALSE;
			GString* _tmp51_;
			gint _tmp52_;
			_tmp16_ = strlen (input);
			_tmp17_ = _tmp16_;
			if (index < _tmp17_) {
				_tmp15_ = !proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_whitespace (self, string_get (input, (glong) index));
			} else {
				_tmp15_ = FALSE;
			}
			if (!_tmp15_) {
				break;
			}
			character = string_get (input, (glong) index);
			if (character == '\'') {
				gint _tmp18_;
				gint _tmp24_;
				gint _tmp25_;
				gint _tmp26_;
				_tmp18_ = index;
				index = _tmp18_ + 1;
				while (TRUE) {
					gboolean _tmp19_ = FALSE;
					gint _tmp20_;
					gint _tmp21_;
					GString* _tmp22_;
					gint _tmp23_;
					_tmp20_ = strlen (input);
					_tmp21_ = _tmp20_;
					if (index < _tmp21_) {
						_tmp19_ = string_get (input, (glong) index) != '\'';
					} else {
						_tmp19_ = FALSE;
					}
					if (!_tmp19_) {
						break;
					}
					_tmp22_ = value;
					g_string_append_c (_tmp22_, string_get (input, (glong) index));
					_tmp23_ = index;
					index = _tmp23_ + 1;
				}
				_tmp24_ = strlen (input);
				_tmp25_ = _tmp24_;
				if (index >= _tmp25_) {
					opaque = TRUE;
					break;
				}
				_tmp26_ = index;
				index = _tmp26_ + 1;
				continue;
			}
			if (character == '"') {
				gint _tmp27_;
				gboolean closed = FALSE;
				_tmp27_ = index;
				index = _tmp27_ + 1;
				closed = FALSE;
				while (TRUE) {
					gint _tmp28_;
					gint _tmp29_;
					gboolean _tmp31_ = FALSE;
					GString* _tmp42_;
					gint _tmp43_;
					_tmp28_ = strlen (input);
					_tmp29_ = _tmp28_;
					if (!(index < _tmp29_)) {
						break;
					}
					character = string_get (input, (glong) index);
					if (character == '"') {
						gint _tmp30_;
						_tmp30_ = index;
						index = _tmp30_ + 1;
						closed = TRUE;
						break;
					}
					if (character == '$') {
						_tmp31_ = TRUE;
					} else {
						_tmp31_ = character == '`';
					}
					if (_tmp31_) {
						opaque = TRUE;
					}
					if (character == '\\') {
						gint _tmp32_;
						gint _tmp33_;
						gint _tmp34_;
						gchar escaped = '\0';
						gboolean _tmp35_ = FALSE;
						gboolean _tmp36_ = FALSE;
						gboolean _tmp37_ = FALSE;
						gint _tmp41_;
						_tmp32_ = index;
						index = _tmp32_ + 1;
						_tmp33_ = strlen (input);
						_tmp34_ = _tmp33_;
						if (index >= _tmp34_) {
							opaque = TRUE;
							break;
						}
						escaped = string_get (input, (glong) index);
						if (escaped == '"') {
							_tmp37_ = TRUE;
						} else {
							_tmp37_ = escaped == '\\';
						}
						if (_tmp37_) {
							_tmp36_ = TRUE;
						} else {
							_tmp36_ = escaped == '$';
						}
						if (_tmp36_) {
							_tmp35_ = TRUE;
						} else {
							_tmp35_ = escaped == '`';
						}
						if (_tmp35_) {
							GString* _tmp38_;
							_tmp38_ = value;
							g_string_append_c (_tmp38_, escaped);
						} else {
							GString* _tmp39_;
							GString* _tmp40_;
							_tmp39_ = value;
							g_string_append_c (_tmp39_, '\\');
							_tmp40_ = value;
							g_string_append_c (_tmp40_, escaped);
						}
						_tmp41_ = index;
						index = _tmp41_ + 1;
						continue;
					}
					_tmp42_ = value;
					g_string_append_c (_tmp42_, character);
					_tmp43_ = index;
					index = _tmp43_ + 1;
				}
				if (!closed) {
					opaque = TRUE;
					break;
				}
				continue;
			}
			if (character == '\\') {
				gint _tmp44_;
				gint _tmp45_;
				gint _tmp46_;
				GString* _tmp47_;
				gint _tmp48_;
				_tmp44_ = index;
				index = _tmp44_ + 1;
				_tmp45_ = strlen (input);
				_tmp46_ = _tmp45_;
				if (index >= _tmp46_) {
					opaque = TRUE;
					break;
				}
				_tmp47_ = value;
				g_string_append_c (_tmp47_, string_get (input, (glong) index));
				_tmp48_ = index;
				index = _tmp48_ + 1;
				continue;
			}
			if (character == '$') {
				_tmp50_ = TRUE;
			} else {
				_tmp50_ = character == '`';
			}
			if (_tmp50_) {
				_tmp49_ = TRUE;
			} else {
				_tmp49_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_operator (self, character);
			}
			if (_tmp49_) {
				opaque = TRUE;
			}
			_tmp51_ = value;
			g_string_append_c (_tmp51_, character);
			_tmp52_ = index;
			index = _tmp52_ + 1;
		}
		_tmp53_ = tokens;
		_tmp54_ = string_substring (input, (glong) start, (glong) (index - start));
		_tmp55_ = _tmp54_;
		_tmp56_ = value;
		_tmp57_ = _tmp56_->str;
		_tmp58_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_new (_tmp55_, _tmp57_, opaque);
		_tmp59_ = _tmp58_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp53_, _tmp59_);
		_g_object_unref0 (_tmp59_);
		_g_free0 (_tmp55_);
		_g_string_free0 (value);
	}
	result = tokens;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_whitespace (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* self,
                                                                                             gchar character)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (character == ' ') {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = character == '\t';
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = character == '\n';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = character == '\r';
	}
	result = _tmp0_;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_is_operator (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* self,
                                                                                           gchar character)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (character == '|') {
		_tmp5_ = TRUE;
	} else {
		_tmp5_ = character == '&';
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = character == ';';
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		_tmp3_ = character == '(';
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = character == ')';
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = character == '<';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = character == '>';
	}
	result = _tmp0_;
	return result;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_construct (GType object_type)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer * self = NULL;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer*
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_new (void)
{
	return proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKENIZER);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizerClass * klass,
                                                                                          gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer * self,
                                                                                             gpointer klass)
{
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer", &g_define_type_info, 0);
	return proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_type_id__once;
}

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_construct (GType object_type)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList * self = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeHashMap* _tmp4_;
	gchar* _tmp5_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList*) g_object_new (object_type, NULL);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_options);
	self->priv->_options = (GeeList*) _tmp0_;
	_tmp1_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->parsed_tokens);
	self->priv->parsed_tokens = _tmp1_;
	_tmp2_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->loaded_tokens);
	self->priv->loaded_tokens = _tmp2_;
	_tmp3_ = gee_hash_map_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTION_SHELL_TOKEN, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->token_owners);
	self->priv->token_owners = _tmp3_;
	_tmp4_ = gee_hash_map_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->initial_option_serializations);
	self->priv->initial_option_serializations = _tmp4_;
	_tmp5_ = g_strdup ("");
	_g_free0 (self->priv->loaded_launch_options);
	self->priv->loaded_launch_options = _tmp5_;
	self->priv->loaded_source_is_pristine = FALSE;
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_new (void)
{
	return proton_plus_widgets_games_launch_options_editor_launch_options_list_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTIONS_LIST);
}

void
proton_plus_widgets_games_launch_options_editor_launch_options_list_add (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option)
{
	GeeList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (option != NULL);
	_tmp0_ = self->priv->_options;
	gee_collection_add ((GeeCollection*) _tmp0_, option);
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_options_list_build_preview_markup (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeLinkedList* segments = NULL;
	GeeLinkedList* _tmp0_;
	gint _tmp1_ = 0;
	gpointer* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_segments (self);
	segments = _tmp0_;
	_tmp2_ = gee_collection_to_array ((GeeCollection*) segments, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	_tmp4_ = _vala_g_strjoinv (" ", _tmp3_, (gint) _tmp1_);
	_tmp5_ = _tmp4_;
	_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_build_command_preview_markup (_tmp5_);
	_tmp7_ = _tmp6_;
	_g_free0 (_tmp5_);
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp7_;
	_g_object_unref0 (segments);
	return result;
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_options_list_build_command_preview_markup (const gchar* command)
{
	GeeArrayList* tokens = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	GeeArrayList* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	GString* markup = NULL;
	GString* _tmp8_;
	GString* _tmp9_;
	GString* _tmp25_;
	GString* _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* result;
	g_return_val_if_fail (command != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_new ();
	_tmp1_ = _tmp0_;
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_tokenize (_tmp1_, command);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp1_);
	tokens = _tmp3_;
	_tmp4_ = tokens;
	_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
	_tmp6_ = _tmp5_;
	if (_tmp6_ == 0) {
		gchar* _tmp7_;
		_tmp7_ = g_markup_escape_text (_ ("No launch options configured yet."), (gssize) -1);
		result = _tmp7_;
		_g_object_unref0 (tokens);
		return result;
	}
	_tmp8_ = g_string_new ("");
	markup = _tmp8_;
	_tmp9_ = markup;
	g_string_append (_tmp9_, "<tt>");
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp10_ = FALSE;
			_tmp10_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp12_;
				gint _tmp13_;
				gint _tmp14_;
				gchar* escaped_segment = NULL;
				GeeArrayList* _tmp16_;
				gpointer _tmp17_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp18_;
				const gchar* _tmp19_;
				const gchar* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				GString* _tmp23_;
				const gchar* _tmp24_;
				if (!_tmp10_) {
					gint _tmp11_;
					_tmp11_ = index;
					index = _tmp11_ + 1;
				}
				_tmp10_ = FALSE;
				_tmp12_ = tokens;
				_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
				_tmp14_ = _tmp13_;
				if (!(index < _tmp14_)) {
					break;
				}
				if (index > 0) {
					GString* _tmp15_;
					_tmp15_ = markup;
					g_string_append (_tmp15_, " ");
				}
				_tmp16_ = tokens;
				_tmp17_ = gee_abstract_list_get ((GeeAbstractList*) _tmp16_, index);
				_tmp18_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp17_;
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp18_);
				_tmp20_ = _tmp19_;
				_tmp21_ = g_markup_escape_text (_tmp20_, (gssize) -1);
				_tmp22_ = _tmp21_;
				_g_object_unref0 (_tmp18_);
				escaped_segment = _tmp22_;
				_tmp23_ = markup;
				_tmp24_ = escaped_segment;
				g_string_append (_tmp23_, _tmp24_);
				_g_free0 (escaped_segment);
			}
		}
	}
	_tmp25_ = markup;
	g_string_append (_tmp25_, "</tt>");
	_tmp26_ = markup;
	_tmp27_ = _tmp26_->str;
	_tmp28_ = g_strdup (_tmp27_);
	result = _tmp28_;
	_g_string_free0 (markup);
	_g_object_unref0 (tokens);
	return result;
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_options_list_build_labeled_command_preview_markup (gchar** labels,
                                                                                                          gint labels_length1,
                                                                                                          gchar** commands,
                                                                                                          gint commands_length1)
{
	GString* markup = NULL;
	GString* _tmp0_;
	GString* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* result;
	_vala_assert (labels_length1 == commands_length1, "labels.length == commands.length");
	_tmp0_ = g_string_new ("");
	markup = _tmp0_;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GString* _tmp4_;
				const gchar* _tmp5_;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				GString* _tmp10_;
				const gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = index;
					index = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(index < commands_length1)) {
					break;
				}
				if (index > 0) {
					GString* _tmp3_;
					_tmp3_ = markup;
					g_string_append (_tmp3_, "\n\n");
				}
				_tmp4_ = markup;
				_tmp5_ = labels[index];
				_tmp6_ = g_markup_escape_text (_tmp5_, (gssize) -1);
				_tmp7_ = _tmp6_;
				_tmp8_ = g_strdup_printf ("<b>%s</b>\n", _tmp7_);
				_tmp9_ = _tmp8_;
				g_string_append (_tmp4_, _tmp9_);
				_g_free0 (_tmp9_);
				_g_free0 (_tmp7_);
				_tmp10_ = markup;
				_tmp11_ = commands[index];
				_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_build_command_preview_markup (_tmp11_);
				_tmp13_ = _tmp12_;
				g_string_append (_tmp10_, _tmp13_);
				_g_free0 (_tmp13_);
			}
		}
	}
	_tmp14_ = markup;
	_tmp15_ = _tmp14_->str;
	_tmp16_ = g_strdup (_tmp15_);
	result = _tmp16_;
	_g_string_free0 (markup);
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_options_list_has_preview_content (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeLinkedList* _tmp0_;
	GeeLinkedList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_segments (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_ > 0;
	_g_object_unref0 (_tmp1_);
	result = _tmp4_;
	return result;
}

gchar*
proton_plus_widgets_games_launch_options_editor_launch_options_list_to_launch_line (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeLinkedList* _tmp2_;
	GeeLinkedList* _tmp3_;
	gint _tmp4_ = 0;
	gpointer* _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (self->priv->loaded_source_is_pristine) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = self->priv->loaded_launch_options;
		_tmp1_ = g_strdup (_tmp0_);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_segments (self);
	_tmp3_ = _tmp2_;
	_tmp5_ = gee_collection_to_array ((GeeCollection*) _tmp3_, &_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp6__length1 = _tmp4_;
	_tmp7_ = _vala_g_strjoinv (" ", _tmp6_, (gint) _tmp4_);
	_tmp8_ = _tmp7_;
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_tmp3_);
	result = _tmp8_;
	return result;
}

static GeeLinkedList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	GeeLinkedList* segments = NULL;
	GeeLinkedList* _tmp5_;
	GeeLinkedList* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (self->priv->loaded_source_is_pristine) {
		GeeLinkedList* _tmp0_;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_loaded_raw_segments (self);
		result = _tmp0_;
		return result;
	}
	_tmp1_ = self->priv->loaded_tokens;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 0) {
		GeeLinkedList* _tmp4_;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_source_ordered_segments (self);
		result = _tmp4_;
		return result;
	}
	_tmp5_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	segments = _tmp5_;
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp6_;
		gint _option_size = 0;
		GeeList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _option_index = 0;
		_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_environments (self);
		_option_list = _tmp6_;
		_tmp7_ = _option_list;
		_tmp8_ = gee_collection_get_size ((GeeCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_option_size = _tmp9_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp12_;
			gpointer _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp14_;
			GeeLinkedList* _tmp15_;
			_option_index = _option_index + 1;
			_tmp10_ = _option_index;
			_tmp11_ = _option_size;
			if (!(_tmp10_ < _tmp11_)) {
				break;
			}
			_tmp12_ = _option_list;
			_tmp13_ = gee_list_get (_tmp12_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp13_;
			_tmp14_ = option;
			_tmp15_ = segments;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp14_, _tmp15_);
			_g_object_unref0 (option);
		}
		_g_object_unref0 (_option_list);
	}
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp16_;
		gint _option_size = 0;
		GeeList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gint _option_index = 0;
		_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_wrappers (self);
		_option_list = _tmp16_;
		_tmp17_ = _option_list;
		_tmp18_ = gee_collection_get_size ((GeeCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_option_size = _tmp19_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp20_;
			gint _tmp21_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp22_;
			gpointer _tmp23_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp24_;
			GeeLinkedList* _tmp25_;
			_option_index = _option_index + 1;
			_tmp20_ = _option_index;
			_tmp21_ = _option_size;
			if (!(_tmp20_ < _tmp21_)) {
				break;
			}
			_tmp22_ = _option_list;
			_tmp23_ = gee_list_get (_tmp22_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp23_;
			_tmp24_ = option;
			_tmp25_ = segments;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp24_, _tmp25_);
			_g_object_unref0 (option);
		}
		_g_object_unref0 (_option_list);
	}
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp26_;
		gint _option_size = 0;
		GeeList* _tmp27_;
		gint _tmp28_;
		gint _tmp29_;
		gint _option_index = 0;
		_tmp26_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_commands (self);
		_option_list = _tmp26_;
		_tmp27_ = _option_list;
		_tmp28_ = gee_collection_get_size ((GeeCollection*) _tmp27_);
		_tmp29_ = _tmp28_;
		_option_size = _tmp29_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp30_;
			gint _tmp31_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp32_;
			gpointer _tmp33_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp34_;
			GeeLinkedList* _tmp35_;
			_option_index = _option_index + 1;
			_tmp30_ = _option_index;
			_tmp31_ = _option_size;
			if (!(_tmp30_ < _tmp31_)) {
				break;
			}
			_tmp32_ = _option_list;
			_tmp33_ = gee_list_get (_tmp32_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp33_;
			_tmp34_ = option;
			_tmp35_ = segments;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp34_, _tmp35_);
			_g_object_unref0 (option);
		}
		_g_object_unref0 (_option_list);
	}
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp36_;
		gint _option_size = 0;
		GeeList* _tmp37_;
		gint _tmp38_;
		gint _tmp39_;
		gint _option_index = 0;
		_tmp36_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_arguments (self);
		_option_list = _tmp36_;
		_tmp37_ = _option_list;
		_tmp38_ = gee_collection_get_size ((GeeCollection*) _tmp37_);
		_tmp39_ = _tmp38_;
		_option_size = _tmp39_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp40_;
			gint _tmp41_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp42_;
			gpointer _tmp43_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp44_;
			GeeLinkedList* _tmp45_;
			_option_index = _option_index + 1;
			_tmp40_ = _option_index;
			_tmp41_ = _option_size;
			if (!(_tmp40_ < _tmp41_)) {
				break;
			}
			_tmp42_ = _option_list;
			_tmp43_ = gee_list_get (_tmp42_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp43_;
			_tmp44_ = option;
			_tmp45_ = segments;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp44_, _tmp45_);
			_g_object_unref0 (option);
		}
		_g_object_unref0 (_option_list);
	}
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp46_;
		gint _option_size = 0;
		GeeList* _tmp47_;
		gint _tmp48_;
		gint _tmp49_;
		gint _option_index = 0;
		_tmp46_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_additionals (self);
		_option_list = _tmp46_;
		_tmp47_ = _option_list;
		_tmp48_ = gee_collection_get_size ((GeeCollection*) _tmp47_);
		_tmp49_ = _tmp48_;
		_option_size = _tmp49_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp50_;
			gint _tmp51_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp52_;
			gpointer _tmp53_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp54_;
			GeeLinkedList* _tmp55_;
			_option_index = _option_index + 1;
			_tmp50_ = _option_index;
			_tmp51_ = _option_size;
			if (!(_tmp50_ < _tmp51_)) {
				break;
			}
			_tmp52_ = _option_list;
			_tmp53_ = gee_list_get (_tmp52_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp53_;
			_tmp54_ = option;
			_tmp55_ = segments;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (_tmp54_, _tmp55_);
			_g_object_unref0 (option);
		}
		_g_object_unref0 (_option_list);
	}
	result = segments;
	return result;
}

static GeeLinkedList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_source_ordered_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeLinkedList* segments = NULL;
	GeeLinkedList* _tmp0_;
	GeeHashSet* replaced_options = NULL;
	GeeHashSet* _tmp1_;
	GeeHashSet* source_options = NULL;
	GeeHashSet* _tmp2_;
	GeeLinkedList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	segments = _tmp0_;
	_tmp1_ = gee_hash_set_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	replaced_options = _tmp1_;
	_tmp2_ = gee_hash_set_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	source_options = _tmp2_;
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp3_;
		gint _token_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _token_index = 0;
		_tmp3_ = self->priv->loaded_tokens;
		_token_list = _tmp3_;
		_tmp4_ = _token_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_token_size = _tmp6_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* token = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeHashMap* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp12_;
			gpointer _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp14_;
			GeeHashSet* _tmp19_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp20_;
			gchar* current = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp21_;
			gchar* _tmp22_;
			gchar* initial = NULL;
			GeeHashMap* _tmp23_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp24_;
			gpointer _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			_token_index = _token_index + 1;
			_tmp7_ = _token_index;
			_tmp8_ = _token_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _token_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp10_;
			_tmp11_ = self->priv->token_owners;
			_tmp12_ = token;
			_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp12_);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp13_;
			_tmp14_ = option;
			if (_tmp14_ == NULL) {
				GeeLinkedList* _tmp15_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				_tmp15_ = segments;
				_tmp16_ = token;
				_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp16_);
				_tmp18_ = _tmp17_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp18_);
				_g_object_unref0 (option);
				_g_object_unref0 (token);
				continue;
			}
			_tmp19_ = source_options;
			_tmp20_ = option;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, _tmp20_);
			_tmp21_ = option;
			_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_serialize_option (self, _tmp21_);
			current = _tmp22_;
			_tmp23_ = self->priv->initial_option_serializations;
			_tmp24_ = option;
			_tmp25_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp23_, _tmp24_);
			initial = (gchar*) _tmp25_;
			_tmp26_ = current;
			_tmp27_ = initial;
			if (g_strcmp0 (_tmp26_, _tmp27_) == 0) {
				GeeLinkedList* _tmp28_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp29_;
				const gchar* _tmp30_;
				const gchar* _tmp31_;
				_tmp28_ = segments;
				_tmp29_ = token;
				_tmp30_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp29_);
				_tmp31_ = _tmp30_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp28_, _tmp31_);
			} else {
				GeeHashSet* _tmp32_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp33_;
				_tmp32_ = replaced_options;
				_tmp33_ = option;
				if (!gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp32_, _tmp33_)) {
					GeeLinkedList* _tmp34_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp35_;
					GeeHashSet* _tmp36_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp37_;
					_tmp34_ = segments;
					_tmp35_ = option;
					proton_plus_widgets_games_launch_options_editor_launch_options_list_append_option_segments (self, _tmp34_, _tmp35_);
					_tmp36_ = replaced_options;
					_tmp37_ = option;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp36_, _tmp37_);
				}
			}
			_g_free0 (initial);
			_g_free0 (current);
			_g_object_unref0 (option);
			_g_object_unref0 (token);
		}
	}
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp38_;
		gint _option_size = 0;
		GeeList* _tmp39_;
		gint _tmp40_;
		gint _tmp41_;
		gint _option_index = 0;
		_tmp38_ = self->priv->_options;
		_option_list = _tmp38_;
		_tmp39_ = _option_list;
		_tmp40_ = gee_collection_get_size ((GeeCollection*) _tmp39_);
		_tmp41_ = _tmp40_;
		_option_size = _tmp41_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp42_;
			gint _tmp43_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp44_;
			gpointer _tmp45_;
			GeeHashSet* _tmp46_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp47_;
			gchar* current = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp48_;
			gchar* _tmp49_;
			gchar* initial = NULL;
			GeeHashMap* _tmp50_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp51_;
			gpointer _tmp52_;
			const gchar* _tmp53_;
			const gchar* _tmp54_;
			_option_index = _option_index + 1;
			_tmp42_ = _option_index;
			_tmp43_ = _option_size;
			if (!(_tmp42_ < _tmp43_)) {
				break;
			}
			_tmp44_ = _option_list;
			_tmp45_ = gee_list_get (_tmp44_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp45_;
			_tmp46_ = source_options;
			_tmp47_ = option;
			if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp46_, _tmp47_)) {
				_g_object_unref0 (option);
				continue;
			}
			_tmp48_ = option;
			_tmp49_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_serialize_option (self, _tmp48_);
			current = _tmp49_;
			_tmp50_ = self->priv->initial_option_serializations;
			_tmp51_ = option;
			_tmp52_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp50_, _tmp51_);
			initial = (gchar*) _tmp52_;
			_tmp53_ = current;
			_tmp54_ = initial;
			if (g_strcmp0 (_tmp53_, _tmp54_) != 0) {
				GeeLinkedList* _tmp55_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp56_;
				_tmp55_ = segments;
				_tmp56_ = option;
				proton_plus_widgets_games_launch_options_editor_launch_options_list_append_option_segments (self, _tmp55_, _tmp56_);
			}
			_g_free0 (initial);
			_g_free0 (current);
			_g_object_unref0 (option);
		}
	}
	result = segments;
	_g_object_unref0 (source_options);
	_g_object_unref0 (replaced_options);
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_options_list_append_option_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                            GeeLinkedList* segments,
                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (segments != NULL);
	g_return_if_fail (option != NULL);
	proton_plus_widgets_games_launch_options_editor_ilaunch_option_append_command_segments (option, segments);
}

static gchar*
proton_plus_widgets_games_launch_options_editor_launch_options_list_serialize_option (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option)
{
	GeeLinkedList* segments = NULL;
	GeeLinkedList* _tmp0_;
	gint _tmp1_ = 0;
	gpointer* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (option != NULL, NULL);
	_tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	segments = _tmp0_;
	proton_plus_widgets_games_launch_options_editor_launch_options_list_append_option_segments (self, segments, option);
	_tmp2_ = gee_collection_to_array ((GeeCollection*) segments, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	_tmp4_ = _vala_g_strjoinv ("\x1f", _tmp3_, (gint) _tmp1_);
	_tmp5_ = _tmp4_;
	_tmp3_ = (_vala_array_free (_tmp3_, _tmp3__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp5_;
	_g_object_unref0 (segments);
	return result;
}

static GeeLinkedList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_loaded_raw_segments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeLinkedList* segments = NULL;
	GeeLinkedList* _tmp0_;
	GeeLinkedList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	segments = _tmp0_;
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp1_;
		gint _token_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _token_index = 0;
		_tmp1_ = self->priv->loaded_tokens;
		_token_list = _tmp1_;
		_tmp2_ = _token_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_token_size = _tmp4_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* token = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			GeeLinkedList* _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			_token_index = _token_index + 1;
			_tmp5_ = _token_index;
			_tmp6_ = _token_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _token_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp8_;
			_tmp9_ = segments;
			_tmp10_ = token;
			_tmp11_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp10_);
			_tmp12_ = _tmp11_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, _tmp12_);
			_g_object_unref0 (token);
		}
	}
	result = segments;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_options_list_mark_modified (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	g_return_if_fail (self != NULL);
	self->priv->loaded_source_is_pristine = FALSE;
}

static GeeList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType type)
{
	GeeArrayList* filtered = NULL;
	GeeArrayList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_ILAUNCH_OPTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	filtered = _tmp0_;
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp1_;
		gint _option_size = 0;
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _option_index = 0;
		_tmp1_ = self->priv->_options;
		_option_list = _tmp1_;
		_tmp2_ = _option_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_option_size = _tmp4_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchLineType _tmp11_;
			_option_index = _option_index + 1;
			_tmp5_ = _option_index;
			_tmp6_ = _option_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _option_list;
			_tmp8_ = gee_list_get (_tmp7_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp8_;
			_tmp9_ = option;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_ilaunch_option_get_line_type (_tmp9_);
			_tmp11_ = _tmp10_;
			if (_tmp11_ == type) {
				GeeArrayList* _tmp12_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp13_;
				_tmp12_ = filtered;
				_tmp13_ = option;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp12_, _tmp13_);
			}
			_g_object_unref0 (option);
		}
	}
	result = (GeeList*) filtered;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_additionals (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (self, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ADDITIONAL);
	result = _tmp0_;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_environments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (self, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ENVIRONMENT);
	result = _tmp0_;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_wrappers (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (self, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_WRAPPER);
	result = _tmp0_;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_commands (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (self, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_COMMAND);
	result = _tmp0_;
	return result;
}

GeeList*
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeList* _tmp0_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_options_by_type (self, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_LINE_TYPE_ARGUMENT);
	result = _tmp0_;
	return result;
}

void
proton_plus_widgets_games_launch_options_editor_launch_options_list_clear_all (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp0_;
		gint _option_size = 0;
		GeeList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _option_index = 0;
		_tmp0_ = self->priv->_options;
		_option_list = _tmp0_;
		_tmp1_ = _option_list;
		_tmp2_ = gee_collection_get_size ((GeeCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_option_size = _tmp3_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp6_;
			gpointer _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp8_;
			_option_index = _option_index + 1;
			_tmp4_ = _option_index;
			_tmp5_ = _option_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _option_list;
			_tmp7_ = gee_list_get (_tmp6_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp7_;
			_tmp8_ = option;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_clear (_tmp8_);
			_g_object_unref0 (option);
		}
	}
}

void
proton_plus_widgets_games_launch_options_editor_launch_options_list_parse_all_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                      gchar** tokens_pool,
                                                                                      gint tokens_pool_length1,
                                                                                      gboolean* consumed,
                                                                                      gint consumed_length1)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp30_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->token_owners;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp1_;
		gint _option_size = 0;
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _option_index = 0;
		_tmp1_ = self->priv->_options;
		_option_list = _tmp1_;
		_tmp2_ = _option_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_option_size = _tmp4_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp7_;
			gpointer _tmp8_;
			gboolean* consumed_before = NULL;
			gboolean* _tmp9_;
			gint consumed_before_length1;
			gint _consumed_before_size_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp14_;
			_option_index = _option_index + 1;
			_tmp5_ = _option_index;
			_tmp6_ = _option_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _option_list;
			_tmp8_ = gee_list_get (_tmp7_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp8_;
			_tmp9_ = g_new0 (gboolean, consumed_length1);
			consumed_before = _tmp9_;
			consumed_before_length1 = consumed_length1;
			_consumed_before_size_ = consumed_before_length1;
			{
				gint index = 0;
				index = 0;
				{
					gboolean _tmp10_ = FALSE;
					_tmp10_ = TRUE;
					while (TRUE) {
						gboolean* _tmp12_;
						gint _tmp12__length1;
						gboolean _tmp13_;
						if (!_tmp10_) {
							gint _tmp11_;
							_tmp11_ = index;
							index = _tmp11_ + 1;
						}
						_tmp10_ = FALSE;
						if (!(index < consumed_length1)) {
							break;
						}
						_tmp12_ = consumed_before;
						_tmp12__length1 = consumed_before_length1;
						_tmp13_ = consumed[index];
						_tmp12_[index] = _tmp13_;
					}
				}
			}
			_tmp14_ = option;
			proton_plus_widgets_games_launch_options_editor_ilaunch_option_parse_tokens (_tmp14_, tokens_pool, (gint) tokens_pool_length1, consumed, (gint) consumed_length1);
			{
				gint index = 0;
				index = 0;
				{
					gboolean _tmp15_ = FALSE;
					_tmp15_ = TRUE;
					while (TRUE) {
						gboolean _tmp17_ = FALSE;
						gboolean _tmp18_ = FALSE;
						gboolean* _tmp19_;
						gint _tmp19__length1;
						gboolean _tmp20_;
						if (!_tmp15_) {
							gint _tmp16_;
							_tmp16_ = index;
							index = _tmp16_ + 1;
						}
						_tmp15_ = FALSE;
						if (!(index < tokens_pool_length1)) {
							break;
						}
						_tmp19_ = consumed_before;
						_tmp19__length1 = consumed_before_length1;
						_tmp20_ = _tmp19_[index];
						if (!_tmp20_) {
							gboolean _tmp21_;
							_tmp21_ = consumed[index];
							_tmp18_ = _tmp21_;
						} else {
							_tmp18_ = FALSE;
						}
						if (_tmp18_) {
							GeeArrayList* _tmp22_;
							gint _tmp23_;
							gint _tmp24_;
							_tmp22_ = self->priv->parsed_tokens;
							_tmp23_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp22_);
							_tmp24_ = _tmp23_;
							_tmp17_ = index < _tmp24_;
						} else {
							_tmp17_ = FALSE;
						}
						if (_tmp17_) {
							GeeHashMap* _tmp25_;
							GeeArrayList* _tmp26_;
							gpointer _tmp27_;
							ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp28_;
							ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp29_;
							_tmp25_ = self->priv->token_owners;
							_tmp26_ = self->priv->parsed_tokens;
							_tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _tmp26_, index);
							_tmp28_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp27_;
							_tmp29_ = option;
							gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, _tmp28_, _tmp29_);
							_g_object_unref0 (_tmp28_);
						}
					}
				}
			}
			consumed_before = (g_free (consumed_before), NULL);
			_g_object_unref0 (option);
		}
	}
	_tmp30_ = self->priv->initial_option_serializations;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp30_);
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp31_;
		gint _option_size = 0;
		GeeList* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		gint _option_index = 0;
		_tmp31_ = self->priv->_options;
		_option_list = _tmp31_;
		_tmp32_ = _option_list;
		_tmp33_ = gee_collection_get_size ((GeeCollection*) _tmp32_);
		_tmp34_ = _tmp33_;
		_option_size = _tmp34_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp35_;
			gint _tmp36_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp37_;
			gpointer _tmp38_;
			GeeHashMap* _tmp39_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp40_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp41_;
			gchar* _tmp42_;
			gchar* _tmp43_;
			_option_index = _option_index + 1;
			_tmp35_ = _option_index;
			_tmp36_ = _option_size;
			if (!(_tmp35_ < _tmp36_)) {
				break;
			}
			_tmp37_ = _option_list;
			_tmp38_ = gee_list_get (_tmp37_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp38_;
			_tmp39_ = self->priv->initial_option_serializations;
			_tmp40_ = option;
			_tmp41_ = option;
			_tmp42_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_serialize_option (self, _tmp41_);
			_tmp43_ = _tmp42_;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp39_, _tmp40_, _tmp43_);
			_g_free0 (_tmp43_);
			_g_object_unref0 (option);
		}
	}
}

GeeIterator*
proton_plus_widgets_games_launch_options_editor_launch_options_list_iterator (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	GeeList* _tmp0_;
	GeeIterator* _tmp1_;
	GeeIterator* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_options;
	_tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
	result = _tmp1_;
	return result;
}

gchar**
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_launch_option_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                              const gchar* launch_options,
                                                                                              gint* result_length1)
{
	GeeArrayList* _tmp0_;
	GeeArrayList* values = NULL;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp22_;
	gint _tmp23_ = 0;
	gpointer* _tmp24_;
	gchar** _tmp25_;
	gint _tmp25__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (launch_options != NULL, NULL);
	_tmp0_ = self->priv->parsed_tokens;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	_tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	values = _tmp1_;
	{
		GeeArrayList* _token_list = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp2_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp3_;
		GeeArrayList* _tmp4_;
		GeeArrayList* _tmp5_;
		gint _token_size = 0;
		GeeArrayList* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		gint _token_index = 0;
		_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_new ();
		_tmp3_ = _tmp2_;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_tokenize (_tmp3_, launch_options);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_token_list = _tmp5_;
		_tmp6_ = _token_list;
		_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
		_tmp8_ = _tmp7_;
		_token_size = _tmp8_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp9_;
			gint _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* token = NULL;
			GeeArrayList* _tmp11_;
			gpointer _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp13_;
			gboolean _tmp14_;
			gboolean _tmp15_;
			GeeArrayList* _tmp16_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp17_;
			GeeArrayList* _tmp18_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp19_;
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			_token_index = _token_index + 1;
			_tmp9_ = _token_index;
			_tmp10_ = _token_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _token_list;
			_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp12_;
			_tmp13_ = token;
			_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (_tmp13_);
			_tmp15_ = _tmp14_;
			if (_tmp15_) {
				_g_object_unref0 (token);
				continue;
			}
			_tmp16_ = self->priv->parsed_tokens;
			_tmp17_ = token;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp17_);
			_tmp18_ = values;
			_tmp19_ = token;
			_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (_tmp19_);
			_tmp21_ = _tmp20_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp21_);
			_g_object_unref0 (token);
		}
		_g_object_unref0 (_token_list);
	}
	_tmp22_ = values;
	_tmp24_ = gee_collection_to_array ((GeeCollection*) _tmp22_, &_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp25__length1 = _tmp23_;
	if (result_length1) {
		*result_length1 = _tmp25__length1;
	}
	result = _tmp25_;
	_g_object_unref0 (values);
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_options_list_load_from_string (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                      const gchar* launch_options)
{
	gchar** tokens = NULL;
	gint _tmp0_ = 0;
	gchar** _tmp1_;
	gint tokens_length1;
	gint _tokens_size_;
	gboolean* consumed = NULL;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gboolean* _tmp3_;
	gint consumed_length1;
	gint _consumed_size_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gboolean* _tmp5_;
	gint _tmp5__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (launch_options != NULL, FALSE);
	proton_plus_widgets_games_launch_options_editor_launch_options_list_clear_all (self);
	proton_plus_widgets_games_launch_options_editor_launch_options_list_prepare_loaded_source (self, launch_options);
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_loaded_token_values (self, &_tmp0_);
	tokens = _tmp1_;
	tokens_length1 = _tmp0_;
	_tokens_size_ = tokens_length1;
	_tmp2_ = tokens;
	_tmp2__length1 = tokens_length1;
	_tmp3_ = g_new0 (gboolean, _tmp2__length1);
	consumed = _tmp3_;
	consumed_length1 = _tmp2__length1;
	_consumed_size_ = consumed_length1;
	_tmp4_ = tokens;
	_tmp4__length1 = tokens_length1;
	_tmp5_ = consumed;
	_tmp5__length1 = consumed_length1;
	proton_plus_widgets_games_launch_options_editor_launch_options_list_parse_all_tokens (self, _tmp4_, (gint) _tmp4__length1, _tmp5_, (gint) _tmp5__length1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp6_ = FALSE;
			_tmp6_ = TRUE;
			while (TRUE) {
				gchar** _tmp8_;
				gint _tmp8__length1;
				gchar** _tmp9_;
				gint _tmp9__length1;
				const gchar* _tmp10_;
				if (!_tmp6_) {
					gint _tmp7_;
					_tmp7_ = i;
					i = _tmp7_ + 1;
				}
				_tmp6_ = FALSE;
				_tmp8_ = tokens;
				_tmp8__length1 = tokens_length1;
				if (!(i < _tmp8__length1)) {
					break;
				}
				_tmp9_ = tokens;
				_tmp9__length1 = tokens_length1;
				_tmp10_ = _tmp9_[i];
				if (g_strcmp0 (_tmp10_, "%command%") == 0) {
					gboolean* _tmp11_;
					gint _tmp11__length1;
					_tmp11_ = consumed;
					_tmp11__length1 = consumed_length1;
					_tmp11_[i] = TRUE;
					break;
				}
			}
		}
	}
	{
		GeeList* _option_list = NULL;
		GeeList* _tmp12_;
		gint _option_size = 0;
		GeeList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		gint _option_index = 0;
		_tmp12_ = self->priv->_options;
		_option_list = _tmp12_;
		_tmp13_ = _option_list;
		_tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_);
		_tmp15_ = _tmp14_;
		_option_size = _tmp15_;
		_option_index = -1;
		while (TRUE) {
			gint _tmp16_;
			gint _tmp17_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeList* _tmp18_;
			gpointer _tmp19_;
			gboolean _tmp20_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp21_;
			gboolean _tmp22_;
			gboolean _tmp23_;
			_option_index = _option_index + 1;
			_tmp16_ = _option_index;
			_tmp17_ = _option_size;
			if (!(_tmp16_ < _tmp17_)) {
				break;
			}
			_tmp18_ = _option_list;
			_tmp19_ = gee_list_get (_tmp18_, _option_index);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp19_;
			_tmp21_ = option;
			_tmp22_ = proton_plus_widgets_games_launch_options_editor_ilaunch_option_get_is_advanced (_tmp21_);
			_tmp23_ = _tmp22_;
			if (_tmp23_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp24_;
				_tmp24_ = option;
				_tmp20_ = proton_plus_widgets_games_launch_options_editor_ilaunch_option_is_active (_tmp24_);
			} else {
				_tmp20_ = FALSE;
			}
			if (_tmp20_) {
				self->priv->loaded_source_is_pristine = TRUE;
				result = TRUE;
				_g_object_unref0 (option);
				consumed = (g_free (consumed), NULL);
				tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
				return result;
			}
			_g_object_unref0 (option);
		}
	}
	self->priv->loaded_source_is_pristine = TRUE;
	result = FALSE;
	consumed = (g_free (consumed), NULL);
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_options_list_has_unrecognized_or_opaque_content (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp0_;
		gint _token_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _token_index = 0;
		_tmp0_ = self->priv->loaded_tokens;
		_token_list = _tmp0_;
		_tmp1_ = _token_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_token_size = _tmp3_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* token = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* option = NULL;
			GeeHashMap* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp12_;
			gpointer _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption* _tmp14_;
			_token_index = _token_index + 1;
			_tmp4_ = _token_index;
			_tmp5_ = _token_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _token_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp7_;
			_tmp8_ = token;
			_tmp9_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (_tmp8_);
			_tmp10_ = _tmp9_;
			if (_tmp10_) {
				result = TRUE;
				_g_object_unref0 (token);
				return result;
			}
			_tmp11_ = self->priv->token_owners;
			_tmp12_ = token;
			_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp12_);
			option = (ProtonPlusWidgetsGamesLaunchOptionsEditorILaunchOption*) _tmp13_;
			_tmp14_ = option;
			if (_tmp14_ == NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp15_;
				const gchar* _tmp16_;
				const gchar* _tmp17_;
				_tmp15_ = token;
				_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (_tmp15_);
				_tmp17_ = _tmp16_;
				result = g_strcmp0 (_tmp17_, "%command%") != 0;
				_g_object_unref0 (option);
				_g_object_unref0 (token);
				return result;
			}
			_g_object_unref0 (option);
			_g_object_unref0 (token);
		}
	}
	result = FALSE;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_options_list_prepare_loaded_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                           const gchar* launch_options)
{
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp2_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellTokenizer* _tmp3_;
	GeeArrayList* _tmp4_;
	GeeArrayList* _tmp5_;
	gchar* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (launch_options != NULL);
	_tmp0_ = self->priv->loaded_tokens;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	_tmp1_ = self->priv->loaded_tokens;
	_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_new ();
	_tmp3_ = _tmp2_;
	_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_tokenizer_tokenize (_tmp3_, launch_options);
	_tmp5_ = _tmp4_;
	gee_array_list_add_all (_tmp1_, (GeeCollection*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (_tmp3_);
	_tmp6_ = g_strdup (launch_options);
	_g_free0 (self->priv->loaded_launch_options);
	self->priv->loaded_launch_options = _tmp6_;
	self->priv->loaded_source_is_pristine = FALSE;
}

static gchar**
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_loaded_token_values (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList* self,
                                                                                             gint* result_length1)
{
	GeeArrayList* _tmp0_;
	GeeArrayList* values = NULL;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp19_;
	gint _tmp20_ = 0;
	gpointer* _tmp21_;
	gchar** _tmp22_;
	gint _tmp22__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->parsed_tokens;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _tmp0_);
	_tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	values = _tmp1_;
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp2_;
		gint _token_size = 0;
		GeeArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _token_index = 0;
		_tmp2_ = self->priv->loaded_tokens;
		_token_list = _tmp2_;
		_tmp3_ = _token_list;
		_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_token_size = _tmp5_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* token = NULL;
			GeeArrayList* _tmp8_;
			gpointer _tmp9_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp10_;
			gboolean _tmp11_;
			gboolean _tmp12_;
			GeeArrayList* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp14_;
			GeeArrayList* _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			_token_index = _token_index + 1;
			_tmp6_ = _token_index;
			_tmp7_ = _token_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _token_list;
			_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp9_;
			_tmp10_ = token;
			_tmp11_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_) {
				_g_object_unref0 (token);
				continue;
			}
			_tmp13_ = self->priv->parsed_tokens;
			_tmp14_ = token;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, _tmp14_);
			_tmp15_ = values;
			_tmp16_ = token;
			_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (_tmp16_);
			_tmp18_ = _tmp17_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, _tmp18_);
			_g_object_unref0 (token);
		}
	}
	_tmp19_ = values;
	_tmp21_ = gee_collection_to_array ((GeeCollection*) _tmp19_, &_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp22__length1 = _tmp20_;
	if (result_length1) {
		*result_length1 = _tmp22__length1;
	}
	result = _tmp22_;
	_g_object_unref0 (values);
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_options_list_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsListClass * klass,
                                                                                gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_options_list_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_options_list_finalize;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_options_list_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList * self,
                                                                                   gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_options_list_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_OPTIONS_LIST, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList);
	_g_object_unref0 (self->priv->_options);
	_g_object_unref0 (self->priv->parsed_tokens);
	_g_object_unref0 (self->priv->loaded_tokens);
	_g_object_unref0 (self->priv->token_owners);
	_g_object_unref0 (self->priv->initial_option_serializations);
	_g_free0 (self->priv->loaded_launch_options);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_options_list_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_options_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_options_list_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsList_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionsListPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_options_list_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id = proton_plus_widgets_games_launch_options_editor_launch_options_list_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_options_list_type_id__once;
}

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

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

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

