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

#include "protonplus_core.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib-object.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_COMMAND_WRITE_RESULT_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_STATUS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITING_ALLOWED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REQUIRES_PERSISTENCE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_LAUNCH_LINE_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PARSED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_COMPOSITION_DIAGNOSTICS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITER_DIAGNOSTICS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_MODIFIED_OPTION_IDS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PRESERVED_TOKEN_SPANS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REPLACED_TOKEN_SPANS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_REQUEST_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_REQUEST_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_command_write_request_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_REQUEST_NUM_PROPERTIES];

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS (proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_type ())
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_CUSTOM_ARGUMENT_REPLACEMENTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_IS_CUSTOM_ARGUMENT_REPLACEMENTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS))
#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass))

typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass;
typedef struct _ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsPrivate ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsPrivate;
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ANCHORED_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ADDITIONS_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_0_PROPERTY,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_games_launch_options_editor_launch_command_writer_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_NUM_PROPERTIES];
typedef enum  {
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_WRAPPER,
	PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_GAME_ARGUMENT
} ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion;

#define PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_TYPE_REGION (proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_get_type ())

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResultPrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus _status;
	gboolean _writing_allowed;
	gboolean _requires_persistence;
	gchar* _launch_line;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _parsed;
	GeeArrayList* _composition_diagnostics;
	GeeArrayList* _writer_diagnostics;
	GeeArrayList* _modified_option_ids;
	GeeArrayList* _preserved_token_spans;
	GeeArrayList* _replaced_token_spans;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements {
	GObject parent_instance;
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsPrivate * priv;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass {
	GObjectClass parent_class;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsPrivate {
	GeeHashMap* _anchored;
	GeeArrayList* _additions;
};

struct _ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterPrivate {
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* catalog;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* composer;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* parser;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapabilityResolver* capability_resolver;
};

static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_command_write_result_parent_class = NULL;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_command_write_request_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_parent_class = NULL;
static gint ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter_private_offset;
static gpointer proton_plus_widgets_games_launch_options_editor_launch_command_writer_parent_class = NULL;

static void proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_composition_diagnostics (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                              GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_writer_diagnostics (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                         GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_modified_option_ids (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                          GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_preserved_token_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                            GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_replaced_token_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                           GeeArrayList* value);
static void proton_plus_widgets_games_launch_options_editor_launch_command_write_result_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_property (GObject * object,
                                                                                                     guint property_id,
                                                                                                     GValue * value,
                                                                                                     GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_property (GObject * object,
                                                                                                     guint property_id,
                                                                                                     const GValue * value,
                                                                                                     GParamSpec * pspec);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _vala_array_dup19 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** self,
                                                                                     gssize length);
static gchar** _vala_array_dup20 (gchar** self,
                           gssize length);
static gchar** _vala_array_dup21 (gchar** self,
                           gssize length);
static void proton_plus_widgets_games_launch_options_editor_launch_command_write_request_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_command_write_request_get_type_once (void);
VALA_EXTERN GType proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_new (void);
VALA_EXTERN ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_construct (GType object_type);
static void proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_anchored (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self,
                                                                                                GeeHashMap* value);
static void proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_additions (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self,
                                                                                                 GeeArrayList* value);
VALA_EXTERN GeeHashMap* proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self);
VALA_EXTERN GeeArrayList* proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self);
static void proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_type_once (void);
static void _vala_proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_property (GObject * object,
                                                                                                      guint property_id,
                                                                                                      GValue * value,
                                                                                                      GParamSpec * pspec);
static void _vala_proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_property (GObject * object,
                                                                                                      guint property_id,
                                                                                                      const GValue * value,
                                                                                                      GParamSpec * pspec);
static GType proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_requires_context (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                                 gint selections_length1);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_safe_to_merge (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                              GeeHashSet* changed);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** proton_plus_widgets_games_launch_options_editor_launch_command_writer_without_dynamic_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                                                                                                        gint selections_length1,
                                                                                                                                                                        gint* result_length1);
static ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* proton_plus_widgets_games_launch_options_editor_launch_command_writer_collect_custom_argument_replacements (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                                                                                                                 gint selections_length1,
                                                                                                                                                                                 GeeHashSet* changed);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_only_dynamic_game_arguments_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                    GeeHashSet* changed);
static gchar* proton_plus_widgets_games_launch_options_editor_launch_command_writer_merge_custom_arguments_in_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* replacements);
static gchar* proton_plus_widgets_games_launch_options_editor_launch_command_writer_merge (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated,
                                                                                    GeeHashSet* changed,
                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments);
static void proton_plus_widgets_games_launch_options_editor_launch_command_writer_record_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _result_,
                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                         GeeHashSet* changed);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_custom_argument_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_environment_occurrence (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_environment (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence);
static gchar* proton_plus_widgets_games_launch_options_editor_launch_command_writer_environment_key (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                              const gchar* value);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_dynamic_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                   GeeHashSet* changed);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                                                                             gint index);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion proton_plus_widgets_games_launch_options_editor_launch_command_writer_output_role_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                                                         ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                                                                         gint index);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_unrecognized_environment_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                            gint index);
static void proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                          GeeArrayList* output,
                                                                                                          ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                                          gint index,
                                                                                                          ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* replacements,
                                                                                                          gboolean replace);
static void proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_generated_region (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                    GeeArrayList* output,
                                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated,
                                                                                                    gint start,
                                                                                                    gint end,
                                                                                                    GeeHashSet* changed,
                                                                                                    GeeHashSet* emitted,
                                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion region,
                                                                                                    gboolean include_all);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_wrapper_token_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                    gint index);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_wrapper (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                    GeeHashSet* changed);
static void proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_merged_wrappers (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                   GeeArrayList* output,
                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated,
                                                                                                   GeeHashSet* changed,
                                                                                                   GeeHashSet* emitted,
                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments,
                                                                                                   gboolean replace_custom_arguments);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                           GeeHashSet* changed);
static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_invocation (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                                                                                   const gchar* id);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                const gchar* wrapper_id,
                                                                                                GeeHashSet* changed);
static void proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_wrapper_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                  GeeArrayList* output,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* invocation,
                                                                                                  GeeHashSet* emitted,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments,
                                                                                                  gboolean replace_custom_arguments);
static gint __lambda160_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                   gint first,
                   gint second);
static gint ___lambda160__gcompare_data_func (gconstpointer a,
                                       gconstpointer b,
                                       gpointer self);
static gboolean proton_plus_widgets_games_launch_options_editor_launch_command_writer_contains (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                         gchar** values,
                                                                                         gint values_length1,
                                                                                         const gchar* candidate);
static void proton_plus_widgets_games_launch_options_editor_launch_command_writer_finalize (GObject * obj);
static GType proton_plus_widgets_games_launch_options_editor_launch_command_writer_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_write_status_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_UNCHANGED_PRISTINE_SOURCE, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_UNCHANGED_PRISTINE_SOURCE", "unchanged-pristine-source"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_FRESH_MANAGED_OUTPUT, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_FRESH_MANAGED_OUTPUT", "fresh-managed-output"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_SOURCE_PRESERVING_MANAGED_MERGE, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_SOURCE_PRESERVING_MANAGED_MERGE", "source-preserving-managed-merge"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_UNCHANGED_UNMANAGED_SOURCE, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_UNCHANGED_UNMANAGED_SOURCE", "unchanged-unmanaged-source"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_UNSAFE_SOURCE, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_UNSAFE_SOURCE", "blocked-unsafe-source"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_INVALID_SELECTIONS, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_INVALID_SELECTIONS", "blocked-invalid-selections"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_INCOMPLETE_ADAPTER_COVERAGE, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_INCOMPLETE_ADAPTER_COVERAGE", "incomplete-adapter-coverage"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_CAPABILITY_CONTEXT_REQUIRED, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_CAPABILITY_CONTEXT_REQUIRED", "capability-context-required"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus", values);
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_command_write_status_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id = proton_plus_widgets_games_launch_options_editor_launch_command_write_status_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_status_type_id__once;
}

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_construct (GType object_type,
                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus status,
                                                                                       ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                       gboolean writing_allowed,
                                                                                       gboolean requires_persistence,
                                                                                       const gchar* launch_line)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult * self = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	GeeArrayList* _tmp4_;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	GeeArrayList* _tmp8_;
	GeeArrayList* _tmp9_;
	g_return_val_if_fail (parsed != NULL, NULL);
	g_return_val_if_fail (launch_line != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult*) g_object_new (object_type, "status", status, "parsed", parsed, "writing-allowed", writing_allowed, "requires-persistence", requires_persistence, "launch-line", launch_line, NULL);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_COMPOSITION_DIAGNOSTIC, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_composition_diagnostics (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_writer_diagnostics (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_tmp5_ = _tmp4_;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_modified_option_ids (self, _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	_tmp7_ = _tmp6_;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_preserved_token_spans (self, _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	_tmp9_ = _tmp8_;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_replaced_token_spans (self, _tmp9_);
	_g_object_unref0 (_tmp9_);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus status,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                 gboolean writing_allowed,
                                                                                 gboolean requires_persistence,
                                                                                 const gchar* launch_line)
{
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_result_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_RESULT, status, parsed, writing_allowed, requires_persistence, launch_line);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_status (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_status;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_status (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_status (self);
	if (old_value != value) {
		self->priv->_status = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_STATUS_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writing_allowed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_writing_allowed;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_writing_allowed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writing_allowed (self);
	if (old_value != value) {
		self->priv->_writing_allowed = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITING_ALLOWED_PROPERTY]);
	}
}

gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_requires_persistence (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_requires_persistence;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_requires_persistence (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_requires_persistence (self);
	if (old_value != value) {
		self->priv->_requires_persistence = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REQUIRES_PERSISTENCE_PROPERTY]);
	}
}

const gchar*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_launch_line (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launch_line;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_launch_line (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_launch_line (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_launch_line);
		self->priv->_launch_line = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_LAUNCH_LINE_PROPERTY]);
	}
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_parsed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* result;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_parsed;
	result = _tmp0_;
	return result;
}

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

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_parsed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* value)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_parsed (self);
	if (old_value != value) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_parsed);
		self->priv->_parsed = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PARSED_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_composition_diagnostics (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_composition_diagnostics;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_composition_diagnostics (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                         GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_composition_diagnostics (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_composition_diagnostics);
		self->priv->_composition_diagnostics = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_COMPOSITION_DIAGNOSTICS_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_writer_diagnostics;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_writer_diagnostics (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                    GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_writer_diagnostics);
		self->priv->_writer_diagnostics = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITER_DIAGNOSTICS_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_modified_option_ids (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_modified_option_ids;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_modified_option_ids (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                     GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_modified_option_ids (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_modified_option_ids);
		self->priv->_modified_option_ids = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_MODIFIED_OPTION_IDS_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_preserved_token_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_preserved_token_spans;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_preserved_token_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                       GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_preserved_token_spans (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_preserved_token_spans);
		self->priv->_preserved_token_spans = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PRESERVED_TOKEN_SPANS_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_replaced_token_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_replaced_token_spans;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_replaced_token_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* self,
                                                                                                      GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_replaced_token_spans (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_replaced_token_spans);
		self->priv->_replaced_token_spans = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REPLACED_TOKEN_SPANS_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResultClass * klass,
                                                                                        gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_STATUS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_STATUS_PROPERTY] = g_param_spec_enum ("status", "status", "status", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_STATUS, 0, 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_COMMAND_WRITE_RESULT_WRITING_ALLOWED_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITING_ALLOWED_PROPERTY] = g_param_spec_boolean ("writing-allowed", "writing-allowed", "writing-allowed", FALSE, 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_COMMAND_WRITE_RESULT_REQUIRES_PERSISTENCE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REQUIRES_PERSISTENCE_PROPERTY] = g_param_spec_boolean ("requires-persistence", "requires-persistence", "requires-persistence", FALSE, 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_COMMAND_WRITE_RESULT_LAUNCH_LINE_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_LAUNCH_LINE_PROPERTY] = g_param_spec_string ("launch-line", "launch-line", "launch-line", 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_COMMAND_WRITE_RESULT_PARSED_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PARSED_PROPERTY] = g_param_spec_object ("parsed", "parsed", "parsed", PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_PARSE_RESULT, 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_COMMAND_WRITE_RESULT_COMPOSITION_DIAGNOSTICS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_COMPOSITION_DIAGNOSTICS_PROPERTY] = g_param_spec_object ("composition-diagnostics", "composition-diagnostics", "composition-diagnostics", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITER_DIAGNOSTICS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITER_DIAGNOSTICS_PROPERTY] = g_param_spec_object ("writer-diagnostics", "writer-diagnostics", "writer-diagnostics", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_MODIFIED_OPTION_IDS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_MODIFIED_OPTION_IDS_PROPERTY] = g_param_spec_object ("modified-option-ids", "modified-option-ids", "modified-option-ids", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PRESERVED_TOKEN_SPANS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PRESERVED_TOKEN_SPANS_PROPERTY] = g_param_spec_object ("preserved-token-spans", "preserved-token-spans", "preserved-token-spans", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REPLACED_TOKEN_SPANS_PROPERTY, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REPLACED_TOKEN_SPANS_PROPERTY] = g_param_spec_object ("replaced-token-spans", "replaced-token-spans", "replaced-token-spans", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult * self,
                                                                                           gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_RESULT, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult);
	_g_free0 (self->priv->_launch_line);
	_g_object_unref0 (self->priv->_parsed);
	_g_object_unref0 (self->priv->_composition_diagnostics);
	_g_object_unref0 (self->priv->_writer_diagnostics);
	_g_object_unref0 (self->priv->_modified_option_ids);
	_g_object_unref0 (self->priv->_preserved_token_spans);
	_g_object_unref0 (self->priv->_replaced_token_spans);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_command_write_result_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_write_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_write_result_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResultPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_result_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_property (GObject * object,
                                                                                                guint property_id,
                                                                                                GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_RESULT, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_STATUS_PROPERTY:
		g_value_set_enum (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_status (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITING_ALLOWED_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writing_allowed (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REQUIRES_PERSISTENCE_PROPERTY:
		g_value_set_boolean (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_requires_persistence (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_LAUNCH_LINE_PROPERTY:
		g_value_set_string (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_launch_line (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PARSED_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_parsed (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_COMPOSITION_DIAGNOSTICS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_composition_diagnostics (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITER_DIAGNOSTICS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_MODIFIED_OPTION_IDS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_modified_option_ids (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PRESERVED_TOKEN_SPANS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_preserved_token_spans (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REPLACED_TOKEN_SPANS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_replaced_token_spans (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_command_write_result_set_property (GObject * object,
                                                                                                guint property_id,
                                                                                                const GValue * value,
                                                                                                GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_RESULT, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_STATUS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_status (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITING_ALLOWED_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_writing_allowed (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REQUIRES_PERSISTENCE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_requires_persistence (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_LAUNCH_LINE_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_launch_line (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PARSED_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_parsed (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_COMPOSITION_DIAGNOSTICS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_composition_diagnostics (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_WRITER_DIAGNOSTICS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_writer_diagnostics (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_MODIFIED_OPTION_IDS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_modified_option_ids (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_PRESERVED_TOKEN_SPANS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_preserved_token_spans (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_RESULT_REPLACED_TOKEN_SPANS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_launch_command_write_result_set_replaced_token_spans (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection**
_vala_array_dup19 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** self,
                   gssize length)
{
	if (length >= 0) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** result;
		gssize i;
		result = g_new0 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection*, length + 1);
		for (i = 0; i < length; i++) {
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp0_;
			_tmp0_ = _g_object_ref0 (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gchar**
_vala_array_dup20 (gchar** self,
                   gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gchar**
_vala_array_dup21 (gchar** self,
                   gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest*
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_construct (GType object_type,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                        gint selections_length1,
                                                                                        gchar** modified_option_ids,
                                                                                        gint modified_option_ids_length1,
                                                                                        gchar** adapter_diagnostics,
                                                                                        gint adapter_diagnostics_length1,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* capabilities,
                                                                                        gboolean explicit_clear,
                                                                                        gboolean retain_placeholder_for_arguments_only)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest * self = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp1_;
	gint _tmp1__length1;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gchar** _tmp3_;
	gint _tmp3__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp4_;
	g_return_val_if_fail (parsed != NULL, NULL);
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (parsed);
	_g_object_unref0 (self->parsed);
	self->parsed = _tmp0_;
	_tmp1_ = (selections != NULL) ? _vala_array_dup19 (selections, selections_length1) : selections;
	_tmp1__length1 = selections_length1;
	self->selections = (_vala_array_free (self->selections, self->selections_length1, (GDestroyNotify) g_object_unref), NULL);
	self->selections = _tmp1_;
	self->selections_length1 = _tmp1__length1;
	_tmp2_ = (modified_option_ids != NULL) ? _vala_array_dup20 (modified_option_ids, modified_option_ids_length1) : modified_option_ids;
	_tmp2__length1 = modified_option_ids_length1;
	self->modified_option_ids = (_vala_array_free (self->modified_option_ids, self->modified_option_ids_length1, (GDestroyNotify) g_free), NULL);
	self->modified_option_ids = _tmp2_;
	self->modified_option_ids_length1 = _tmp2__length1;
	_tmp3_ = (adapter_diagnostics != NULL) ? _vala_array_dup21 (adapter_diagnostics, adapter_diagnostics_length1) : adapter_diagnostics;
	_tmp3__length1 = adapter_diagnostics_length1;
	self->adapter_diagnostics = (_vala_array_free (self->adapter_diagnostics, self->adapter_diagnostics_length1, (GDestroyNotify) g_free), NULL);
	self->adapter_diagnostics = _tmp3_;
	self->adapter_diagnostics_length1 = _tmp3__length1;
	_tmp4_ = _g_object_ref0 (capabilities);
	_g_object_unref0 (self->capabilities);
	self->capabilities = _tmp4_;
	self->explicit_clear = explicit_clear;
	self->retain_placeholder_for_arguments_only = retain_placeholder_for_arguments_only;
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest*
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                  gint selections_length1,
                                                                                  gchar** modified_option_ids,
                                                                                  gint modified_option_ids_length1,
                                                                                  gchar** adapter_diagnostics,
                                                                                  gint adapter_diagnostics_length1,
                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* capabilities,
                                                                                  gboolean explicit_clear,
                                                                                  gboolean retain_placeholder_for_arguments_only)
{
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_request_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_REQUEST, parsed, selections, selections_length1, modified_option_ids, modified_option_ids_length1, adapter_diagnostics, adapter_diagnostics_length1, capabilities, explicit_clear, retain_placeholder_for_arguments_only);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequestClass * klass,
                                                                                         gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_command_write_request_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_command_write_request_finalize;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest * self,
                                                                                            gpointer klass)
{
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITE_REQUEST, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest);
	_g_object_unref0 (self->parsed);
	self->selections = (_vala_array_free (self->selections, self->selections_length1, (GDestroyNotify) g_object_unref), NULL);
	self->modified_option_ids = (_vala_array_free (self->modified_option_ids, self->modified_option_ids_length1, (GDestroyNotify) g_free), NULL);
	self->adapter_diagnostics = (_vala_array_free (self->adapter_diagnostics, self->adapter_diagnostics_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (self->capabilities);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_command_write_request_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_write_request_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_write_request_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest", &g_define_type_info, 0);
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_command_write_request_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id = proton_plus_widgets_games_launch_options_editor_launch_command_write_request_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_command_write_request_type_id__once;
}

static inline gpointer
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements_private_offset);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements*
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_construct (GType object_type)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements * self = NULL;
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements*) g_object_new (object_type, NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_INT, NULL, NULL, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_anchored (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_tmp3_ = _tmp2_;
	proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_additions (self, _tmp3_);
	_g_object_unref0 (_tmp3_);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements*
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_new (void)
{
	return proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS);
}

GeeHashMap*
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self)
{
	GeeHashMap* result;
	GeeHashMap* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_anchored;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_anchored (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self,
                                                                                           GeeHashMap* value)
{
	GeeHashMap* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (self);
	if (old_value != value) {
		GeeHashMap* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_anchored);
		self->priv->_anchored = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ANCHORED_PROPERTY]);
	}
}

GeeArrayList*
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_additions;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_additions (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* self,
                                                                                            GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_additions);
		self->priv->_additions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ADDITIONS_PROPERTY]);
	}
}

static void
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass * klass,
                                                                                         gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ANCHORED_PROPERTY, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ANCHORED_PROPERTY] = g_param_spec_object ("anchored", "anchored", "anchored", GEE_TYPE_HASH_MAP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ADDITIONS_PROPERTY, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_properties[PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ADDITIONS_PROPERTY] = g_param_spec_object ("additions", "additions", "additions", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements * self,
                                                                                            gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements);
	_g_object_unref0 (self->priv->_anchored);
	_g_object_unref0 (self->priv->_additions);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id;
	proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacementsPrivate));
	return proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id;
		proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id__once, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_type_id__once;
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_property (GObject * object,
                                                                                                 guint property_id,
                                                                                                 GValue * value,
                                                                                                 GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ANCHORED_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (self));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ADDITIONS_PROPERTY:
		g_value_set_object (value, proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_property (GObject * object,
                                                                                                 guint property_id,
                                                                                                 const GValue * value,
                                                                                                 GParamSpec * pspec)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_CUSTOM_ARGUMENT_REPLACEMENTS, ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements);
	switch (property_id) {
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ANCHORED_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_anchored (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_CUSTOM_ARGUMENT_REPLACEMENTS_ADDITIONS_PROPERTY:
		proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_set_additions (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_widgets_games_launch_options_editor_launch_command_writer_get_instance_private (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter_private_offset);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT", "environment"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_WRAPPER, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_WRAPPER", "wrapper"}, {PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_GAME_ARGUMENT, "PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_GAME_ARGUMENT", "game-argument"}, {0, NULL, NULL}};
	GType proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id = g_enum_register_static ("ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion", values);
	return proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id;
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id = proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_command_writer_region_type_id__once;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_construct (GType object_type,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* catalog,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* composer,
                                                                                 ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* parser)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter * self = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp0_ = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp1_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp3_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* _tmp4_ = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* _tmp5_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* _tmp8_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* _tmp9_ = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* _tmp10_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* _tmp13_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp14_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapabilityResolver* _tmp15_;
	self = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter*) g_object_new (object_type, NULL);
	_tmp1_ = _g_object_ref0 (catalog);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp2_;
		_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_new ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->catalog);
	self->priv->catalog = _tmp3_;
	_tmp5_ = _g_object_ref0 (composer);
	_tmp4_ = _tmp5_;
	if (_tmp4_ == NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp6_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* _tmp7_;
		_tmp6_ = self->priv->catalog;
		_tmp7_ = proton_plus_widgets_games_launch_options_editor_launch_command_composer_new (_tmp6_, NULL);
		_g_object_unref0 (_tmp4_);
		_tmp4_ = _tmp7_;
	}
	_tmp8_ = _tmp4_;
	_tmp4_ = NULL;
	_g_object_unref0 (self->priv->composer);
	self->priv->composer = _tmp8_;
	_tmp10_ = _g_object_ref0 (parser);
	_tmp9_ = _tmp10_;
	if (_tmp9_ == NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp11_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* _tmp12_;
		_tmp11_ = self->priv->catalog;
		_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_command_parser_new (_tmp11_);
		_g_object_unref0 (_tmp9_);
		_tmp9_ = _tmp12_;
	}
	_tmp13_ = _tmp9_;
	_tmp9_ = NULL;
	_g_object_unref0 (self->priv->parser);
	self->priv->parser = _tmp13_;
	_tmp14_ = self->priv->catalog;
	_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_capability_resolver_new (_tmp14_);
	_g_object_unref0 (self->priv->capability_resolver);
	self->priv->capability_resolver = _tmp15_;
	_g_object_unref0 (_tmp9_);
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_new (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* catalog,
                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* composer,
                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* parser)
{
	return proton_plus_widgets_games_launch_options_editor_launch_command_writer_construct (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITER, catalog, composer, parser);
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_prepare (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest* request)
{
	GeeHashSet* changed = NULL;
	GeeHashSet* _tmp0_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gboolean _tmp5_ = FALSE;
	GeeHashSet* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	gboolean _tmp27_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp28_;
	gint _tmp28__length1;
	gboolean _tmp35_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp43_;
	gint _tmp43__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp67_ = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp68_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp69_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* composed = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* _tmp73_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp74_;
	gint _tmp74__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionRequest* _tmp75_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionRequest* _tmp76_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp77_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp78_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp79_;
	gboolean _tmp80_;
	gboolean _tmp81_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp129_ = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp130_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp131_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* generated_composition = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandComposer* _tmp135_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp136_;
	gint _tmp136__length1;
	gint _tmp137_ = 0;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp138_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp139_;
	gint _tmp139__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionRequest* _tmp140_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionRequest* _tmp141_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp142_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp143_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* _tmp144_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp145_;
	const gchar* _tmp146_;
	const gchar* _tmp147_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp148_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp149_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp150_;
	gint _tmp150__length1;
	GeeHashSet* _tmp151_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* _tmp152_;
	gchar* _tmp153_ = NULL;
	GeeHashSet* _tmp154_;
	gchar* launch_line = NULL;
	gchar* _tmp163_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus _tmp164_ = 0;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp165_;
	const gchar* _tmp166_;
	const gchar* _tmp167_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _result_ = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp168_;
	const gchar* _tmp169_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp170_;
	const gchar* _tmp171_;
	const gchar* _tmp172_;
	const gchar* _tmp173_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp174_;
	gchar** _tmp175_;
	gint _tmp175__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp195_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp196_;
	GeeHashSet* _tmp197_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (request != NULL, NULL);
	_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	changed = _tmp0_;
	_tmp1_ = request->modified_option_ids;
	_tmp1__length1 = request->modified_option_ids_length1;
	{
		gchar** id_collection = NULL;
		gint id_collection_length1 = 0;
		gint _id_collection_size_ = 0;
		gint id_it = 0;
		id_collection = _tmp1_;
		id_collection_length1 = _tmp1__length1;
		for (id_it = 0; id_it < id_collection_length1; id_it = id_it + 1) {
			gchar* _tmp2_;
			gchar* id = NULL;
			_tmp2_ = g_strdup (id_collection[id_it]);
			id = _tmp2_;
			{
				GeeHashSet* _tmp3_;
				const gchar* _tmp4_;
				_tmp3_ = changed;
				_tmp4_ = id;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, _tmp4_);
				_g_free0 (id);
			}
		}
	}
	_tmp6_ = changed;
	_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ == 0) {
		_tmp5_ = !request->explicit_clear;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteStatus _tmp9_ = 0;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp10_;
		gboolean _tmp11_;
		gboolean _tmp12_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp13_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp17_;
		_tmp10_ = request->parsed;
		_tmp11_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_is_structurally_safe (_tmp10_);
		_tmp12_ = _tmp11_;
		if (_tmp12_) {
			_tmp9_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_UNCHANGED_PRISTINE_SOURCE;
		} else {
			_tmp9_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_UNCHANGED_UNMANAGED_SOURCE;
		}
		_tmp13_ = request->parsed;
		_tmp14_ = request->parsed;
		_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (_tmp9_, _tmp13_, TRUE, FALSE, _tmp16_);
		result = _tmp17_;
		_g_object_unref0 (changed);
		return result;
	}
	_tmp18_ = request->adapter_diagnostics;
	_tmp18__length1 = request->adapter_diagnostics_length1;
	if (_tmp18__length1 > 0) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* blocked = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp19_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp20_;
		gchar** _tmp21_;
		gint _tmp21__length1;
		_tmp19_ = request->parsed;
		_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_INCOMPLETE_ADAPTER_COVERAGE, _tmp19_, FALSE, FALSE, "");
		blocked = _tmp20_;
		_tmp21_ = request->adapter_diagnostics;
		_tmp21__length1 = request->adapter_diagnostics_length1;
		{
			gchar** diagnostic_collection = NULL;
			gint diagnostic_collection_length1 = 0;
			gint _diagnostic_collection_size_ = 0;
			gint diagnostic_it = 0;
			diagnostic_collection = _tmp21_;
			diagnostic_collection_length1 = _tmp21__length1;
			for (diagnostic_it = 0; diagnostic_it < diagnostic_collection_length1; diagnostic_it = diagnostic_it + 1) {
				gchar* _tmp22_;
				gchar* diagnostic = NULL;
				_tmp22_ = g_strdup (diagnostic_collection[diagnostic_it]);
				diagnostic = _tmp22_;
				{
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp23_;
					GeeArrayList* _tmp24_;
					GeeArrayList* _tmp25_;
					const gchar* _tmp26_;
					_tmp23_ = blocked;
					_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (_tmp23_);
					_tmp25_ = _tmp24_;
					_tmp26_ = diagnostic;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp26_);
					_g_free0 (diagnostic);
				}
			}
		}
		result = blocked;
		_g_object_unref0 (changed);
		return result;
	}
	_tmp28_ = request->selections;
	_tmp28__length1 = request->selections_length1;
	if (proton_plus_widgets_games_launch_options_editor_launch_command_writer_requires_context (self, _tmp28_, (gint) _tmp28__length1)) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp29_;
		_tmp29_ = request->capabilities;
		_tmp27_ = _tmp29_ == NULL;
	} else {
		_tmp27_ = FALSE;
	}
	if (_tmp27_) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* blocked = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp30_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp31_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp32_;
		GeeArrayList* _tmp33_;
		GeeArrayList* _tmp34_;
		_tmp30_ = request->parsed;
		_tmp31_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_CAPABILITY_CONTEXT_REQUIRED, _tmp30_, FALSE, FALSE, "");
		blocked = _tmp31_;
		_tmp32_ = blocked;
		_tmp33_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (_tmp32_);
		_tmp34_ = _tmp33_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp34_, "A runtime capability context is required before launch options can be " \
"saved.");
		result = blocked;
		_g_object_unref0 (changed);
		return result;
	}
	if (!request->explicit_clear) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp36_;
		GeeHashSet* _tmp37_;
		_tmp36_ = request->parsed;
		_tmp37_ = changed;
		_tmp35_ = !proton_plus_widgets_games_launch_options_editor_launch_command_writer_safe_to_merge (self, _tmp36_, _tmp37_);
	} else {
		_tmp35_ = FALSE;
	}
	if (_tmp35_) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* blocked = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp38_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp39_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp40_;
		GeeArrayList* _tmp41_;
		GeeArrayList* _tmp42_;
		_tmp38_ = request->parsed;
		_tmp39_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_UNSAFE_SOURCE, _tmp38_, FALSE, FALSE, "");
		blocked = _tmp39_;
		_tmp40_ = blocked;
		_tmp41_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (_tmp40_);
		_tmp42_ = _tmp41_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp42_, "Custom shell content cannot be merged safely.");
		result = blocked;
		_g_object_unref0 (changed);
		return result;
	}
	_tmp43_ = request->selections;
	_tmp43__length1 = request->selections_length1;
	{
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selection_collection = NULL;
		gint selection_collection_length1 = 0;
		gint _selection_collection_size_ = 0;
		gint selection_it = 0;
		selection_collection = _tmp43_;
		selection_collection_length1 = _tmp43__length1;
		for (selection_it = 0; selection_it < selection_collection_length1; selection_it = selection_it + 1) {
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp44_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* selection = NULL;
			_tmp44_ = _g_object_ref0 (selection_collection[selection_it]);
			selection = _tmp44_;
			{
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp45_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp46_;
				const gchar* _tmp47_;
				const gchar* _tmp48_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp49_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp50_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* eligibility = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapabilityResolver* _tmp51_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp52_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp53_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp54_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp55_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp56_;
				gboolean _tmp57_;
				gboolean _tmp58_;
				_tmp45_ = self->priv->catalog;
				_tmp46_ = selection;
				_tmp47_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_option_id (_tmp46_);
				_tmp48_ = _tmp47_;
				_tmp49_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp45_, _tmp48_);
				metadata = _tmp49_;
				_tmp50_ = metadata;
				if (_tmp50_ == NULL) {
					_g_object_unref0 (metadata);
					_g_object_unref0 (selection);
					continue;
				}
				_tmp51_ = self->priv->capability_resolver;
				_tmp52_ = metadata;
				_tmp53_ = selection;
				_tmp54_ = request->capabilities;
				_tmp55_ = proton_plus_widgets_games_launch_options_editor_launch_option_capability_resolver_evaluate_selection (_tmp51_, _tmp52_, _tmp53_, _tmp54_, FALSE);
				eligibility = _tmp55_;
				_tmp56_ = eligibility;
				_tmp57_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_may_activate (_tmp56_);
				_tmp58_ = _tmp57_;
				if (!_tmp58_) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* blocked = NULL;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp59_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp60_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp61_;
					GeeArrayList* _tmp62_;
					GeeArrayList* _tmp63_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEligibility* _tmp64_;
					const gchar* _tmp65_;
					const gchar* _tmp66_;
					_tmp59_ = request->parsed;
					_tmp60_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_INVALID_SELECTIONS, _tmp59_, FALSE, FALSE, "");
					blocked = _tmp60_;
					_tmp61_ = blocked;
					_tmp62_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_writer_diagnostics (_tmp61_);
					_tmp63_ = _tmp62_;
					_tmp64_ = eligibility;
					_tmp65_ = proton_plus_widgets_games_launch_options_editor_launch_option_eligibility_get_reason (_tmp64_);
					_tmp66_ = _tmp65_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp63_, _tmp66_);
					result = blocked;
					_g_object_unref0 (eligibility);
					_g_object_unref0 (metadata);
					_g_object_unref0 (selection);
					_g_object_unref0 (changed);
					return result;
				}
				_g_object_unref0 (eligibility);
				_g_object_unref0 (metadata);
				_g_object_unref0 (selection);
			}
		}
	}
	_tmp68_ = request->capabilities;
	_tmp69_ = _g_object_ref0 (_tmp68_);
	_tmp67_ = _tmp69_;
	if (_tmp67_ == NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability* _tmp70_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability* _tmp71_;
		gint _tmp71__length1;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp72_;
		_tmp70_ = g_new0 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability, 0);
		_tmp71_ = _tmp70_;
		_tmp71__length1 = 0;
		_tmp72_ = proton_plus_widgets_games_launch_options_editor_launch_command_capability_context_new (_tmp71_, 0);
		_g_object_unref0 (_tmp67_);
		_tmp67_ = _tmp72_;
		_tmp71_ = (g_free (_tmp71_), NULL);
	}
	_tmp73_ = self->priv->composer;
	_tmp74_ = request->selections;
	_tmp74__length1 = request->selections_length1;
	_tmp75_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_request_new (_tmp74_, _tmp74__length1, _tmp67_, request->retain_placeholder_for_arguments_only);
	_tmp76_ = _tmp75_;
	_tmp77_ = proton_plus_widgets_games_launch_options_editor_launch_command_composer_compose (_tmp73_, _tmp76_);
	_tmp78_ = _tmp77_;
	_g_object_unref0 (_tmp76_);
	composed = _tmp78_;
	_tmp79_ = composed;
	_tmp80_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_is_valid (_tmp79_);
	_tmp81_ = _tmp80_;
	if (!_tmp81_) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* blocked = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp82_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp83_;
		_tmp82_ = request->parsed;
		_tmp83_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_BLOCKED_INVALID_SELECTIONS, _tmp82_, FALSE, FALSE, "");
		blocked = _tmp83_;
		{
			GeeList* _diagnostic_list = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp84_;
			GeeList* _tmp85_;
			GeeList* _tmp86_;
			gint _diagnostic_size = 0;
			GeeList* _tmp87_;
			gint _tmp88_;
			gint _tmp89_;
			gint _diagnostic_index = 0;
			_tmp84_ = composed;
			_tmp85_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_diagnostics (_tmp84_);
			_tmp86_ = _tmp85_;
			_diagnostic_list = _tmp86_;
			_tmp87_ = _diagnostic_list;
			_tmp88_ = gee_collection_get_size ((GeeCollection*) _tmp87_);
			_tmp89_ = _tmp88_;
			_diagnostic_size = _tmp89_;
			_diagnostic_index = -1;
			while (TRUE) {
				gint _tmp90_;
				gint _tmp91_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic* diagnostic = NULL;
				GeeList* _tmp92_;
				gpointer _tmp93_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp94_;
				GeeArrayList* _tmp95_;
				GeeArrayList* _tmp96_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic* _tmp97_;
				_diagnostic_index = _diagnostic_index + 1;
				_tmp90_ = _diagnostic_index;
				_tmp91_ = _diagnostic_size;
				if (!(_tmp90_ < _tmp91_)) {
					break;
				}
				_tmp92_ = _diagnostic_list;
				_tmp93_ = gee_list_get (_tmp92_, _diagnostic_index);
				diagnostic = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic*) _tmp93_;
				_tmp94_ = blocked;
				_tmp95_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_composition_diagnostics (_tmp94_);
				_tmp96_ = _tmp95_;
				_tmp97_ = diagnostic;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp96_, _tmp97_);
				_g_object_unref0 (diagnostic);
			}
		}
		result = blocked;
		_g_object_unref0 (composed);
		_g_object_unref0 (_tmp67_);
		_g_object_unref0 (changed);
		return result;
	}
	if (request->explicit_clear) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* replacement = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp98_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp99_;
		const gchar* _tmp100_;
		const gchar* _tmp101_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp102_;
		const gchar* _tmp103_;
		const gchar* _tmp104_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp105_;
		const gchar* _tmp106_;
		const gchar* _tmp107_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp108_;
		gchar** _tmp109_;
		gint _tmp109__length1;
		_tmp98_ = request->parsed;
		_tmp99_ = composed;
		_tmp100_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_launch_line (_tmp99_);
		_tmp101_ = _tmp100_;
		_tmp102_ = request->parsed;
		_tmp103_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (_tmp102_);
		_tmp104_ = _tmp103_;
		_tmp105_ = composed;
		_tmp106_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_launch_line (_tmp105_);
		_tmp107_ = _tmp106_;
		_tmp108_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_SOURCE_PRESERVING_MANAGED_MERGE, _tmp98_, TRUE, g_strcmp0 (_tmp101_, _tmp104_) != 0, _tmp107_);
		replacement = _tmp108_;
		_tmp109_ = request->modified_option_ids;
		_tmp109__length1 = request->modified_option_ids_length1;
		{
			gchar** id_collection = NULL;
			gint id_collection_length1 = 0;
			gint _id_collection_size_ = 0;
			gint id_it = 0;
			id_collection = _tmp109_;
			id_collection_length1 = _tmp109__length1;
			for (id_it = 0; id_it < id_collection_length1; id_it = id_it + 1) {
				gchar* _tmp110_;
				gchar* id = NULL;
				_tmp110_ = g_strdup (id_collection[id_it]);
				id = _tmp110_;
				{
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp111_;
					GeeArrayList* _tmp112_;
					GeeArrayList* _tmp113_;
					const gchar* _tmp114_;
					_tmp111_ = replacement;
					_tmp112_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_modified_option_ids (_tmp111_);
					_tmp113_ = _tmp112_;
					_tmp114_ = id;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp113_, _tmp114_);
					_g_free0 (id);
				}
			}
		}
		{
			GeeList* _diagnostic_list = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp115_;
			GeeList* _tmp116_;
			GeeList* _tmp117_;
			gint _diagnostic_size = 0;
			GeeList* _tmp118_;
			gint _tmp119_;
			gint _tmp120_;
			gint _diagnostic_index = 0;
			_tmp115_ = composed;
			_tmp116_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_diagnostics (_tmp115_);
			_tmp117_ = _tmp116_;
			_diagnostic_list = _tmp117_;
			_tmp118_ = _diagnostic_list;
			_tmp119_ = gee_collection_get_size ((GeeCollection*) _tmp118_);
			_tmp120_ = _tmp119_;
			_diagnostic_size = _tmp120_;
			_diagnostic_index = -1;
			while (TRUE) {
				gint _tmp121_;
				gint _tmp122_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic* diagnostic = NULL;
				GeeList* _tmp123_;
				gpointer _tmp124_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp125_;
				GeeArrayList* _tmp126_;
				GeeArrayList* _tmp127_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic* _tmp128_;
				_diagnostic_index = _diagnostic_index + 1;
				_tmp121_ = _diagnostic_index;
				_tmp122_ = _diagnostic_size;
				if (!(_tmp121_ < _tmp122_)) {
					break;
				}
				_tmp123_ = _diagnostic_list;
				_tmp124_ = gee_list_get (_tmp123_, _diagnostic_index);
				diagnostic = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic*) _tmp124_;
				_tmp125_ = replacement;
				_tmp126_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_composition_diagnostics (_tmp125_);
				_tmp127_ = _tmp126_;
				_tmp128_ = diagnostic;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp127_, _tmp128_);
				_g_object_unref0 (diagnostic);
			}
		}
		result = replacement;
		_g_object_unref0 (composed);
		_g_object_unref0 (_tmp67_);
		_g_object_unref0 (changed);
		return result;
	}
	_tmp130_ = request->capabilities;
	_tmp131_ = _g_object_ref0 (_tmp130_);
	_tmp129_ = _tmp131_;
	if (_tmp129_ == NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability* _tmp132_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability* _tmp133_;
		gint _tmp133__length1;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* _tmp134_;
		_tmp132_ = g_new0 (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability, 0);
		_tmp133_ = _tmp132_;
		_tmp133__length1 = 0;
		_tmp134_ = proton_plus_widgets_games_launch_options_editor_launch_command_capability_context_new (_tmp133_, 0);
		_g_object_unref0 (_tmp129_);
		_tmp129_ = _tmp134_;
		_tmp133_ = (g_free (_tmp133_), NULL);
	}
	_tmp135_ = self->priv->composer;
	_tmp136_ = request->selections;
	_tmp136__length1 = request->selections_length1;
	_tmp138_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_without_dynamic_game_arguments (self, _tmp136_, (gint) _tmp136__length1, &_tmp137_);
	_tmp139_ = _tmp138_;
	_tmp139__length1 = _tmp137_;
	_tmp140_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_request_new (_tmp139_, _tmp137_, _tmp129_, request->retain_placeholder_for_arguments_only);
	_tmp141_ = _tmp140_;
	_tmp142_ = proton_plus_widgets_games_launch_options_editor_launch_command_composer_compose (_tmp135_, _tmp141_);
	_tmp143_ = _tmp142_;
	_g_object_unref0 (_tmp141_);
	_tmp139_ = (_vala_array_free (_tmp139_, _tmp139__length1, (GDestroyNotify) g_object_unref), NULL);
	generated_composition = _tmp143_;
	_tmp144_ = self->priv->parser;
	_tmp145_ = generated_composition;
	_tmp146_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_launch_line (_tmp145_);
	_tmp147_ = _tmp146_;
	_tmp148_ = proton_plus_widgets_games_launch_options_editor_launch_command_parser_parse (_tmp144_, _tmp147_);
	generated = _tmp148_;
	_tmp149_ = request->parsed;
	_tmp150_ = request->selections;
	_tmp150__length1 = request->selections_length1;
	_tmp151_ = changed;
	_tmp152_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_collect_custom_argument_replacements (self, _tmp149_, _tmp150_, (gint) _tmp150__length1, _tmp151_);
	custom_arguments = _tmp152_;
	_tmp154_ = changed;
	if (proton_plus_widgets_games_launch_options_editor_launch_command_writer_only_dynamic_game_arguments_changed (self, _tmp154_)) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp155_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* _tmp156_;
		gchar* _tmp157_;
		_tmp155_ = request->parsed;
		_tmp156_ = custom_arguments;
		_tmp157_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_merge_custom_arguments_in_source (self, _tmp155_, _tmp156_);
		_g_free0 (_tmp153_);
		_tmp153_ = _tmp157_;
	} else {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp158_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp159_;
		GeeHashSet* _tmp160_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* _tmp161_;
		gchar* _tmp162_;
		_tmp158_ = request->parsed;
		_tmp159_ = generated;
		_tmp160_ = changed;
		_tmp161_ = custom_arguments;
		_tmp162_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_merge (self, _tmp158_, _tmp159_, _tmp160_, _tmp161_);
		_g_free0 (_tmp153_);
		_tmp153_ = _tmp162_;
	}
	_tmp163_ = _tmp153_;
	_tmp153_ = NULL;
	launch_line = _tmp163_;
	_tmp165_ = request->parsed;
	_tmp166_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (_tmp165_);
	_tmp167_ = _tmp166_;
	if (g_strcmp0 (_tmp167_, "") == 0) {
		_tmp164_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_FRESH_MANAGED_OUTPUT;
	} else {
		_tmp164_ = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITE_STATUS_SOURCE_PRESERVING_MANAGED_MERGE;
	}
	_tmp168_ = request->parsed;
	_tmp169_ = launch_line;
	_tmp170_ = request->parsed;
	_tmp171_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (_tmp170_);
	_tmp172_ = _tmp171_;
	_tmp173_ = launch_line;
	_tmp174_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_new (_tmp164_, _tmp168_, TRUE, g_strcmp0 (_tmp169_, _tmp172_) != 0, _tmp173_);
	_result_ = _tmp174_;
	_tmp175_ = request->modified_option_ids;
	_tmp175__length1 = request->modified_option_ids_length1;
	{
		gchar** id_collection = NULL;
		gint id_collection_length1 = 0;
		gint _id_collection_size_ = 0;
		gint id_it = 0;
		id_collection = _tmp175_;
		id_collection_length1 = _tmp175__length1;
		for (id_it = 0; id_it < id_collection_length1; id_it = id_it + 1) {
			gchar* _tmp176_;
			gchar* id = NULL;
			_tmp176_ = g_strdup (id_collection[id_it]);
			id = _tmp176_;
			{
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp177_;
				GeeArrayList* _tmp178_;
				GeeArrayList* _tmp179_;
				const gchar* _tmp180_;
				_tmp177_ = _result_;
				_tmp178_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_modified_option_ids (_tmp177_);
				_tmp179_ = _tmp178_;
				_tmp180_ = id;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp179_, _tmp180_);
				_g_free0 (id);
			}
		}
	}
	{
		GeeList* _diagnostic_list = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionResult* _tmp181_;
		GeeList* _tmp182_;
		GeeList* _tmp183_;
		gint _diagnostic_size = 0;
		GeeList* _tmp184_;
		gint _tmp185_;
		gint _tmp186_;
		gint _diagnostic_index = 0;
		_tmp181_ = composed;
		_tmp182_ = proton_plus_widgets_games_launch_options_editor_launch_command_composition_result_get_diagnostics (_tmp181_);
		_tmp183_ = _tmp182_;
		_diagnostic_list = _tmp183_;
		_tmp184_ = _diagnostic_list;
		_tmp185_ = gee_collection_get_size ((GeeCollection*) _tmp184_);
		_tmp186_ = _tmp185_;
		_diagnostic_size = _tmp186_;
		_diagnostic_index = -1;
		while (TRUE) {
			gint _tmp187_;
			gint _tmp188_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic* diagnostic = NULL;
			GeeList* _tmp189_;
			gpointer _tmp190_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp191_;
			GeeArrayList* _tmp192_;
			GeeArrayList* _tmp193_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic* _tmp194_;
			_diagnostic_index = _diagnostic_index + 1;
			_tmp187_ = _diagnostic_index;
			_tmp188_ = _diagnostic_size;
			if (!(_tmp187_ < _tmp188_)) {
				break;
			}
			_tmp189_ = _diagnostic_list;
			_tmp190_ = gee_list_get (_tmp189_, _diagnostic_index);
			diagnostic = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCompositionDiagnostic*) _tmp190_;
			_tmp191_ = _result_;
			_tmp192_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_composition_diagnostics (_tmp191_);
			_tmp193_ = _tmp192_;
			_tmp194_ = diagnostic;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp193_, _tmp194_);
			_g_object_unref0 (diagnostic);
		}
	}
	_tmp195_ = _result_;
	_tmp196_ = request->parsed;
	_tmp197_ = changed;
	proton_plus_widgets_games_launch_options_editor_launch_command_writer_record_spans (self, _tmp195_, _tmp196_, _tmp197_);
	result = _result_;
	_g_free0 (launch_line);
	_g_free0 (_tmp153_);
	_g_object_unref0 (custom_arguments);
	_g_object_unref0 (generated);
	_g_object_unref0 (generated_composition);
	_g_object_unref0 (_tmp129_);
	_g_object_unref0 (composed);
	_g_object_unref0 (_tmp67_);
	_g_object_unref0 (changed);
	return result;
}

ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_prepare_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                      const gchar* source,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                      gint selections_length1,
                                                                                      gchar** modified_option_ids,
                                                                                      gint modified_option_ids_length1,
                                                                                      gchar** adapter_diagnostics,
                                                                                      gint adapter_diagnostics_length1,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandCapabilityContext* capabilities,
                                                                                      gboolean explicit_clear,
                                                                                      gboolean retain_placeholder_for_arguments_only)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParser* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp13_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest* _tmp14_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteRequest* _tmp15_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp16_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _tmp17_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	_tmp0_ = self->priv->parser;
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_command_parser_parse (_tmp0_, source);
	parsed = _tmp1_;
	if (!explicit_clear) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp4_;
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp4_ = parsed;
		_tmp5_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp3_ = _tmp8_ == 1;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* _tmp9_;
		GeeArrayList* _tmp10_;
		GeeArrayList* _tmp11_;
		gpointer _tmp12_;
		_tmp9_ = parsed;
		_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, 0);
		_tmp2_ = ((gint) ((gintptr) _tmp12_)) == 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		retain_placeholder_for_arguments_only = TRUE;
	}
	_tmp13_ = parsed;
	_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_request_new (_tmp13_, selections, selections_length1, modified_option_ids, modified_option_ids_length1, adapter_diagnostics, adapter_diagnostics_length1, capabilities, explicit_clear, retain_placeholder_for_arguments_only);
	_tmp15_ = _tmp14_;
	_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_prepare (self, _tmp15_);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (_tmp15_);
	result = _tmp17_;
	_g_object_unref0 (parsed);
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_requires_context (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                        gint selections_length1)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selection_collection = NULL;
		gint selection_collection_length1 = 0;
		gint _selection_collection_size_ = 0;
		gint selection_it = 0;
		selection_collection = selections;
		selection_collection_length1 = selections_length1;
		for (selection_it = 0; selection_it < selection_collection_length1; selection_it = selection_it + 1) {
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp0_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* selection = NULL;
			_tmp0_ = _g_object_ref0 (selection_collection[selection_it]);
			selection = _tmp0_;
			{
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp1_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp2_;
				const gchar* _tmp3_;
				const gchar* _tmp4_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp5_;
				gboolean _tmp6_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp7_;
				gboolean _tmp11_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp13_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp14_;
				gint _tmp15_ = 0;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability* _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCapability* _tmp17_;
				gint _tmp17__length1;
				gboolean _tmp18_;
				_tmp1_ = self->priv->catalog;
				_tmp2_ = selection;
				_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_option_id (_tmp2_);
				_tmp4_ = _tmp3_;
				_tmp5_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp1_, _tmp4_);
				metadata = _tmp5_;
				_tmp7_ = metadata;
				if (_tmp7_ == NULL) {
					_tmp6_ = TRUE;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp8_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp9_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp10_;
					_tmp8_ = metadata;
					_tmp9_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp6_ = _tmp10_ == NULL;
				}
				if (_tmp6_) {
					_g_object_unref0 (metadata);
					_g_object_unref0 (selection);
					continue;
				}
				_tmp12_ = metadata;
				_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_required_capabilities (_tmp14_, &_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp17__length1 = _tmp15_;
				_tmp18_ = _tmp15_ > 0;
				_tmp17_ = (g_free (_tmp17_), NULL);
				if (_tmp18_) {
					_tmp11_ = TRUE;
				} else {
					gboolean _tmp19_ = FALSE;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp20_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp21_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp22_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp23_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp24_;
					_tmp20_ = metadata;
					_tmp21_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp22_);
					_tmp24_ = _tmp23_;
					if (_tmp24_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_WRAPPER_SELECTOR) {
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp25_;
						const gchar* _tmp26_;
						const gchar* _tmp27_;
						_tmp25_ = selection;
						_tmp26_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_wrapper_id (_tmp25_);
						_tmp27_ = _tmp26_;
						_tmp19_ = g_strcmp0 (_tmp27_, "") != 0;
					} else {
						_tmp19_ = FALSE;
					}
					_tmp11_ = _tmp19_;
				}
				if (_tmp11_) {
					result = TRUE;
					_g_object_unref0 (metadata);
					_g_object_unref0 (selection);
					return result;
				}
				_g_object_unref0 (metadata);
				_g_object_unref0 (selection);
			}
		}
	}
	result = FALSE;
	return result;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection**
proton_plus_widgets_games_launch_options_editor_launch_command_writer_without_dynamic_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                                      gint selections_length1,
                                                                                                      gint* result_length1)
{
	GeeArrayList* filtered = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp26_;
	gint _tmp27_ = 0;
	gpointer* _tmp28_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** _tmp29_;
	gint _tmp29__length1;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_SELECTION, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	filtered = _tmp0_;
	{
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selection_collection = NULL;
		gint selection_collection_length1 = 0;
		gint _selection_collection_size_ = 0;
		gint selection_it = 0;
		selection_collection = selections;
		selection_collection_length1 = selections_length1;
		for (selection_it = 0; selection_it < selection_collection_length1; selection_it = selection_it + 1) {
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp1_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* selection = NULL;
			_tmp1_ = _g_object_ref0 (selection_collection[selection_it]);
			selection = _tmp1_;
			{
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp2_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp3_;
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
				gboolean _tmp9_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp10_;
				GeeArrayList* _tmp24_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp25_;
				_tmp2_ = self->priv->catalog;
				_tmp3_ = selection;
				_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_option_id (_tmp3_);
				_tmp5_ = _tmp4_;
				_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp2_, _tmp5_);
				metadata = _tmp6_;
				_tmp10_ = metadata;
				if (_tmp10_ != NULL) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp12_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp13_;
					_tmp11_ = metadata;
					_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp11_);
					_tmp13_ = _tmp12_;
					_tmp9_ = _tmp13_ != NULL;
				} else {
					_tmp9_ = FALSE;
				}
				if (_tmp9_) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp14_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp15_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp16_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp17_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp18_;
					_tmp14_ = metadata;
					_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp14_);
					_tmp16_ = _tmp15_;
					_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp16_);
					_tmp18_ = _tmp17_;
					_tmp8_ = _tmp18_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT;
				} else {
					_tmp8_ = FALSE;
				}
				if (_tmp8_) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp19_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp20_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp21_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp22_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp23_;
					_tmp19_ = metadata;
					_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp19_);
					_tmp21_ = _tmp20_;
					_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_emission_mode (_tmp21_);
					_tmp23_ = _tmp22_;
					_tmp7_ = _tmp23_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_EMISSION_MODE_DYNAMIC_GAME_ARGUMENTS;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_g_object_unref0 (metadata);
					_g_object_unref0 (selection);
					continue;
				}
				_tmp24_ = filtered;
				_tmp25_ = selection;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp24_, _tmp25_);
				_g_object_unref0 (metadata);
				_g_object_unref0 (selection);
			}
		}
	}
	_tmp26_ = filtered;
	_tmp28_ = gee_collection_to_array ((GeeCollection*) _tmp26_, &_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp29__length1 = _tmp27_;
	if (result_length1) {
		*result_length1 = _tmp29__length1;
	}
	result = _tmp29_;
	_g_object_unref0 (filtered);
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_safe_to_merge (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                     ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                     GeeHashSet* changed)
{
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean only_custom_arguments_changed = FALSE;
	gboolean _tmp4_ = FALSE;
	GeeHashSet* environment_keys = NULL;
	GeeHashSet* _tmp43_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parsed != NULL, FALSE);
	g_return_val_if_fail (changed != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (parsed);
	_tmp1_ = _tmp0_;
	_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ > 1) {
		result = FALSE;
		return result;
	}
	only_custom_arguments_changed = proton_plus_widgets_games_launch_options_editor_launch_command_writer_only_dynamic_game_arguments_changed (self, changed);
	if (only_custom_arguments_changed) {
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_custom_argument_source (self, parsed);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		result = TRUE;
		return result;
	}
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp7_;
				GeeArrayList* _tmp8_;
				gint _tmp9_;
				gint _tmp10_;
				gboolean _tmp11_ = FALSE;
				GeeArrayList* _tmp12_;
				GeeArrayList* _tmp13_;
				gpointer _tmp14_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp15_;
				gboolean _tmp16_;
				gboolean _tmp17_;
				gboolean _tmp18_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = index;
					index = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
				_tmp8_ = _tmp7_;
				_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
				_tmp10_ = _tmp9_;
				if (!(index < _tmp10_)) {
					break;
				}
				_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
				_tmp13_ = _tmp12_;
				_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, index);
				_tmp15_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp14_;
				_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_is_opaque (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = _tmp17_;
				_g_object_unref0 (_tmp15_);
				if (_tmp18_) {
					_tmp11_ = !proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_preserved_game_argument_index (parsed, index);
				} else {
					_tmp11_ = FALSE;
				}
				if (_tmp11_) {
					result = FALSE;
					return result;
				}
			}
		}
	}
	{
		GeeArrayList* _diagnostic_list = NULL;
		GeeArrayList* _tmp19_;
		GeeArrayList* _tmp20_;
		gint _diagnostic_size = 0;
		GeeArrayList* _tmp21_;
		gint _tmp22_;
		gint _tmp23_;
		gint _diagnostic_index = 0;
		_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_diagnostics (parsed);
		_tmp20_ = _tmp19_;
		_diagnostic_list = _tmp20_;
		_tmp21_ = _diagnostic_list;
		_tmp22_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp21_);
		_tmp23_ = _tmp22_;
		_diagnostic_size = _tmp23_;
		_diagnostic_index = -1;
		while (TRUE) {
			gint _tmp24_;
			gint _tmp25_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnostic* diagnostic = NULL;
			GeeArrayList* _tmp26_;
			gpointer _tmp27_;
			gboolean _tmp28_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnostic* _tmp29_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnosticCode _tmp30_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnosticCode _tmp31_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnostic* _tmp35_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnosticCode _tmp36_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnosticCode _tmp37_;
			gboolean _tmp38_ = FALSE;
			GeeArrayList* _tmp39_;
			GeeArrayList* _tmp40_;
			gint _tmp41_;
			gint _tmp42_;
			_diagnostic_index = _diagnostic_index + 1;
			_tmp24_ = _diagnostic_index;
			_tmp25_ = _diagnostic_size;
			if (!(_tmp24_ < _tmp25_)) {
				break;
			}
			_tmp26_ = _diagnostic_list;
			_tmp27_ = gee_abstract_list_get ((GeeAbstractList*) _tmp26_, _diagnostic_index);
			diagnostic = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnostic*) _tmp27_;
			_tmp29_ = diagnostic;
			_tmp30_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_diagnostic_get_code (_tmp29_);
			_tmp31_ = _tmp30_;
			if (_tmp31_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PARSE_DIAGNOSTIC_CODE_UNSAFE_SHELL_TOKEN) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseDiagnostic* _tmp32_;
				gint _tmp33_;
				gint _tmp34_;
				_tmp32_ = diagnostic;
				_tmp33_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_diagnostic_get_token_index (_tmp32_);
				_tmp34_ = _tmp33_;
				_tmp28_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_preserved_game_argument_index (parsed, _tmp34_);
			} else {
				_tmp28_ = FALSE;
			}
			if (_tmp28_) {
				_g_object_unref0 (diagnostic);
				continue;
			}
			_tmp35_ = diagnostic;
			_tmp36_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_diagnostic_get_code (_tmp35_);
			_tmp37_ = _tmp36_;
			if (_tmp37_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_PARSE_DIAGNOSTIC_CODE_MISSING_COMMAND_BOUNDARY) {
				result = FALSE;
				_g_object_unref0 (diagnostic);
				return result;
			}
			_tmp39_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_wrappers (parsed);
			_tmp40_ = _tmp39_;
			_tmp41_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp40_);
			_tmp42_ = _tmp41_;
			if (_tmp42_ > 0) {
				_tmp38_ = TRUE;
			} else {
				_tmp38_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_environment_occurrence (self, parsed);
			}
			if (_tmp38_) {
				result = FALSE;
				_g_object_unref0 (diagnostic);
				return result;
			}
			_g_object_unref0 (diagnostic);
		}
	}
	_tmp43_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	environment_keys = _tmp43_;
	{
		GeeArrayList* _occurrence_list = NULL;
		GeeArrayList* _tmp44_;
		GeeArrayList* _tmp45_;
		gint _occurrence_size = 0;
		GeeArrayList* _tmp46_;
		gint _tmp47_;
		gint _tmp48_;
		gint _occurrence_index = 0;
		_tmp44_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_occurrences (parsed);
		_tmp45_ = _tmp44_;
		_occurrence_list = _tmp45_;
		_tmp46_ = _occurrence_list;
		_tmp47_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp46_);
		_tmp48_ = _tmp47_;
		_occurrence_size = _tmp48_;
		_occurrence_index = -1;
		while (TRUE) {
			gint _tmp49_;
			gint _tmp50_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
			GeeArrayList* _tmp51_;
			gpointer _tmp52_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp53_;
			GeeHashSet* _tmp54_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp55_;
			const gchar* _tmp56_;
			const gchar* _tmp57_;
			GeeHashSet* _tmp58_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp59_;
			const gchar* _tmp60_;
			const gchar* _tmp61_;
			_occurrence_index = _occurrence_index + 1;
			_tmp49_ = _occurrence_index;
			_tmp50_ = _occurrence_size;
			if (!(_tmp49_ < _tmp50_)) {
				break;
			}
			_tmp51_ = _occurrence_list;
			_tmp52_ = gee_abstract_list_get ((GeeAbstractList*) _tmp51_, _occurrence_index);
			occurrence = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence*) _tmp52_;
			_tmp53_ = occurrence;
			if (!proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_environment (self, _tmp53_)) {
				_g_object_unref0 (occurrence);
				continue;
			}
			_tmp54_ = environment_keys;
			_tmp55_ = occurrence;
			_tmp56_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_environment_key (_tmp55_);
			_tmp57_ = _tmp56_;
			if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp54_, _tmp57_)) {
				result = FALSE;
				_g_object_unref0 (occurrence);
				_g_object_unref0 (environment_keys);
				return result;
			}
			_tmp58_ = environment_keys;
			_tmp59_ = occurrence;
			_tmp60_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_environment_key (_tmp59_);
			_tmp61_ = _tmp60_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp58_, _tmp61_);
			_g_object_unref0 (occurrence);
		}
	}
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp62_;
		GeeArrayList* _tmp63_;
		gint _token_size = 0;
		GeeArrayList* _tmp64_;
		gint _tmp65_;
		gint _tmp66_;
		gint _token_index = 0;
		_tmp62_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_unrecognized_tokens (parsed);
		_tmp63_ = _tmp62_;
		_token_list = _tmp63_;
		_tmp64_ = _token_list;
		_tmp65_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp64_);
		_tmp66_ = _tmp65_;
		_token_size = _tmp66_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp67_;
			gint _tmp68_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* token = NULL;
			GeeArrayList* _tmp69_;
			gpointer _tmp70_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp71_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp72_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp73_;
			gchar* key = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp74_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp75_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp76_;
			const gchar* _tmp77_;
			const gchar* _tmp78_;
			gchar* _tmp79_;
			gboolean _tmp80_ = FALSE;
			const gchar* _tmp81_;
			GeeHashSet* _tmp84_;
			const gchar* _tmp85_;
			_token_index = _token_index + 1;
			_tmp67_ = _token_index;
			_tmp68_ = _token_size;
			if (!(_tmp67_ < _tmp68_)) {
				break;
			}
			_tmp69_ = _token_list;
			_tmp70_ = gee_abstract_list_get ((GeeAbstractList*) _tmp69_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken*) _tmp70_;
			_tmp71_ = token;
			_tmp72_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_kind (_tmp71_);
			_tmp73_ = _tmp72_;
			if (_tmp73_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_UNRECOGNIZED_KIND_UNKNOWN_ENVIRONMENT_ASSIGNMENT) {
				_g_object_unref0 (token);
				continue;
			}
			_tmp74_ = token;
			_tmp75_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_token (_tmp74_);
			_tmp76_ = _tmp75_;
			_tmp77_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_value (_tmp76_);
			_tmp78_ = _tmp77_;
			_tmp79_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_environment_key (self, _tmp78_);
			key = _tmp79_;
			_tmp81_ = key;
			if (g_strcmp0 (_tmp81_, "") == 0) {
				_tmp80_ = TRUE;
			} else {
				GeeHashSet* _tmp82_;
				const gchar* _tmp83_;
				_tmp82_ = environment_keys;
				_tmp83_ = key;
				_tmp80_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp82_, _tmp83_);
			}
			if (_tmp80_) {
				result = FALSE;
				_g_free0 (key);
				_g_object_unref0 (token);
				_g_object_unref0 (environment_keys);
				return result;
			}
			_tmp84_ = environment_keys;
			_tmp85_ = key;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp84_, _tmp85_);
			_g_free0 (key);
			_g_object_unref0 (token);
		}
	}
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp86_;
		GeeArrayList* _tmp87_;
		gint _token_size = 0;
		GeeArrayList* _tmp88_;
		gint _tmp89_;
		gint _tmp90_;
		gint _token_index = 0;
		_tmp86_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_unrecognized_tokens (parsed);
		_tmp87_ = _tmp86_;
		_token_list = _tmp87_;
		_tmp88_ = _token_list;
		_tmp89_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp88_);
		_tmp90_ = _tmp89_;
		_token_size = _tmp90_;
		_token_index = -1;
		while (TRUE) {
			gint _tmp91_;
			gint _tmp92_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* token = NULL;
			GeeArrayList* _tmp93_;
			gpointer _tmp94_;
			gboolean _tmp95_ = FALSE;
			gboolean _tmp96_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp97_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp98_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp99_;
			_token_index = _token_index + 1;
			_tmp91_ = _token_index;
			_tmp92_ = _token_size;
			if (!(_tmp91_ < _tmp92_)) {
				break;
			}
			_tmp93_ = _token_list;
			_tmp94_ = gee_abstract_list_get ((GeeAbstractList*) _tmp93_, _token_index);
			token = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken*) _tmp94_;
			_tmp97_ = token;
			_tmp98_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_kind (_tmp97_);
			_tmp99_ = _tmp98_;
			if (_tmp99_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_UNRECOGNIZED_KIND_PRESERVED_GAME_COMMAND_CONTENT) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp100_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp101_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp102_;
				_tmp100_ = token;
				_tmp101_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_kind (_tmp100_);
				_tmp102_ = _tmp101_;
				_tmp96_ = _tmp102_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_UNRECOGNIZED_KIND_UNKNOWN_ENVIRONMENT_ASSIGNMENT;
			} else {
				_tmp96_ = FALSE;
			}
			if (_tmp96_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp103_;
				gint _tmp104_;
				gint _tmp105_;
				_tmp103_ = token;
				_tmp104_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_token_index (_tmp103_);
				_tmp105_ = _tmp104_;
				_tmp95_ = !proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (parsed, _tmp105_);
			} else {
				_tmp95_ = FALSE;
			}
			if (_tmp95_) {
				result = FALSE;
				_g_object_unref0 (token);
				_g_object_unref0 (environment_keys);
				return result;
			}
			_g_object_unref0 (token);
		}
	}
	{
		GeeArrayList* _occurrence_list = NULL;
		GeeArrayList* _tmp106_;
		GeeArrayList* _tmp107_;
		gint _occurrence_size = 0;
		GeeArrayList* _tmp108_;
		gint _tmp109_;
		gint _tmp110_;
		gint _occurrence_index = 0;
		_tmp106_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_occurrences (parsed);
		_tmp107_ = _tmp106_;
		_occurrence_list = _tmp107_;
		_tmp108_ = _occurrence_list;
		_tmp109_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp108_);
		_tmp110_ = _tmp109_;
		_occurrence_size = _tmp110_;
		_occurrence_index = -1;
		while (TRUE) {
			gint _tmp111_;
			gint _tmp112_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
			GeeArrayList* _tmp113_;
			gpointer _tmp114_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp115_;
			gint* _tmp116_;
			gint _tmp116__length1;
			_occurrence_index = _occurrence_index + 1;
			_tmp111_ = _occurrence_index;
			_tmp112_ = _occurrence_size;
			if (!(_tmp111_ < _tmp112_)) {
				break;
			}
			_tmp113_ = _occurrence_list;
			_tmp114_ = gee_abstract_list_get ((GeeAbstractList*) _tmp113_, _occurrence_index);
			occurrence = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence*) _tmp114_;
			_tmp115_ = occurrence;
			_tmp116_ = _tmp115_->token_indexes;
			_tmp116__length1 = _tmp115_->token_indexes_length1;
			{
				gint* index_collection = NULL;
				gint index_collection_length1 = 0;
				gint _index_collection_size_ = 0;
				gint index_it = 0;
				index_collection = _tmp116_;
				index_collection_length1 = _tmp116__length1;
				for (index_it = 0; index_it < index_collection_length1; index_it = index_it + 1) {
					gint index = 0;
					index = index_collection[index_it];
					{
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp117_;
						const gchar* _tmp118_;
						const gchar* _tmp119_;
						gboolean _tmp120_ = FALSE;
						_tmp117_ = occurrence;
						_tmp118_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_option_id (_tmp117_);
						_tmp119_ = _tmp118_;
						if (gee_abstract_collection_contains ((GeeAbstractCollection*) changed, _tmp119_)) {
							continue;
						}
						if (index < 0) {
							_tmp120_ = TRUE;
						} else {
							GeeArrayList* _tmp121_;
							GeeArrayList* _tmp122_;
							gint _tmp123_;
							gint _tmp124_;
							_tmp121_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
							_tmp122_ = _tmp121_;
							_tmp123_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp122_);
							_tmp124_ = _tmp123_;
							_tmp120_ = index >= _tmp124_;
						}
						if (_tmp120_) {
							result = FALSE;
							_g_object_unref0 (occurrence);
							_g_object_unref0 (environment_keys);
							return result;
						}
					}
				}
			}
			_g_object_unref0 (occurrence);
		}
	}
	result = TRUE;
	_g_object_unref0 (environment_keys);
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_only_dynamic_game_arguments_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                           GeeHashSet* changed)
{
	gint _tmp0_;
	gint _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (changed != NULL, FALSE);
	_tmp0_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) changed);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == 0) {
		result = FALSE;
		return result;
	}
	{
		GeeIterator* _id_it = NULL;
		GeeIterator* _tmp2_;
		_tmp2_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) changed);
		_id_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_;
			gchar* id = NULL;
			GeeIterator* _tmp4_;
			gpointer _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp6_;
			const gchar* _tmp7_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp8_;
			gboolean _tmp9_ = FALSE;
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
			_tmp3_ = _id_it;
			if (!gee_iterator_next (_tmp3_)) {
				break;
			}
			_tmp4_ = _id_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			id = (gchar*) _tmp5_;
			_tmp6_ = self->priv->catalog;
			_tmp7_ = id;
			_tmp8_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp6_, _tmp7_);
			metadata = _tmp8_;
			_tmp12_ = metadata;
			if (_tmp12_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp13_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp14_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp15_;
				_tmp13_ = metadata;
				_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp11_ = _tmp15_ == NULL;
			}
			if (_tmp11_) {
				_tmp10_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp17_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp18_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp19_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp20_;
				_tmp16_ = metadata;
				_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp18_);
				_tmp20_ = _tmp19_;
				_tmp10_ = _tmp20_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT;
			}
			if (_tmp10_) {
				_tmp9_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp21_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp22_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp23_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp24_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp25_;
				_tmp21_ = metadata;
				_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_emission_mode (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp9_ = _tmp25_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_EMISSION_MODE_DYNAMIC_GAME_ARGUMENTS;
			}
			if (_tmp9_) {
				result = FALSE;
				_g_object_unref0 (metadata);
				_g_free0 (id);
				_g_object_unref0 (_id_it);
				return result;
			}
			_g_object_unref0 (metadata);
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	result = TRUE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_custom_argument_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parsed != NULL, FALSE);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp2_;
				GeeArrayList* _tmp3_;
				gint _tmp4_;
				gint _tmp5_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
				_tmp3_ = _tmp2_;
				_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
				_tmp5_ = _tmp4_;
				if (!(index < _tmp5_)) {
					break;
				}
				if (proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (parsed, index)) {
					result = TRUE;
					return result;
				}
			}
		}
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_environment_occurrence (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                  ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parsed != NULL, FALSE);
	{
		GeeArrayList* _occurrence_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _occurrence_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _occurrence_index = 0;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_occurrences (parsed);
		_tmp1_ = _tmp0_;
		_occurrence_list = _tmp1_;
		_tmp2_ = _occurrence_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_occurrence_size = _tmp4_;
		_occurrence_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp9_;
			_occurrence_index = _occurrence_index + 1;
			_tmp5_ = _occurrence_index;
			_tmp6_ = _occurrence_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _occurrence_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _occurrence_index);
			occurrence = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence*) _tmp8_;
			_tmp9_ = occurrence;
			if (proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_environment (self, _tmp9_)) {
				result = TRUE;
				_g_object_unref0 (occurrence);
				return result;
			}
			_g_object_unref0 (occurrence);
		}
	}
	result = FALSE;
	return result;
}

static gint
string_index_of_char (const gchar* self,
                      gunichar c,
                      gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

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

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

static gchar*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_environment_key (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                       const gchar* value)
{
	gint separator = 0;
	gchar* _tmp0_ = NULL;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (value != NULL, NULL);
	separator = string_index_of_char (value, (gunichar) '=', 0);
	if (separator > 0) {
		gchar* _tmp1_;
		_tmp1_ = string_substring (value, (glong) 0, (glong) separator);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp3_;
	_g_free0 (_tmp0_);
	return result;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_collect_custom_argument_replacements (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                            ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selections,
                                                                                                            gint selections_length1,
                                                                                                            GeeHashSet* changed)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* replacements = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parsed != NULL, NULL);
	g_return_val_if_fail (changed != NULL, NULL);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_new ();
	replacements = _tmp0_;
	{
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection** selection_collection = NULL;
		gint selection_collection_length1 = 0;
		gint _selection_collection_size_ = 0;
		gint selection_it = 0;
		selection_collection = selections;
		selection_collection_length1 = selections_length1;
		for (selection_it = 0; selection_it < selection_collection_length1; selection_it = selection_it + 1) {
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp1_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* selection = NULL;
			_tmp1_ = _g_object_ref0 (selection_collection[selection_it]);
			selection = _tmp1_;
			{
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp2_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp3_;
				const gchar* _tmp4_;
				const gchar* _tmp5_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_ = FALSE;
				gboolean _tmp9_ = FALSE;
				gboolean _tmp10_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
				gchar** values = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp28_;
				gint _tmp29_ = 0;
				gchar** _tmp30_;
				gint values_length1;
				gint _values_size_;
				_tmp2_ = self->priv->catalog;
				_tmp3_ = selection;
				_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_option_id (_tmp3_);
				_tmp5_ = _tmp4_;
				_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp2_, _tmp5_);
				metadata = _tmp6_;
				_tmp11_ = metadata;
				if (_tmp11_ == NULL) {
					_tmp10_ = TRUE;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp13_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp14_;
					_tmp12_ = metadata;
					_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_ == NULL;
				}
				if (_tmp10_) {
					_tmp9_ = TRUE;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp15_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp16_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp17_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp18_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp19_;
					_tmp15_ = metadata;
					_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp15_);
					_tmp17_ = _tmp16_;
					_tmp18_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp17_);
					_tmp19_ = _tmp18_;
					_tmp9_ = _tmp19_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT;
				}
				if (_tmp9_) {
					_tmp8_ = TRUE;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp20_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp21_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp22_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp23_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp24_;
					_tmp20_ = metadata;
					_tmp21_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_emission_mode (_tmp22_);
					_tmp24_ = _tmp23_;
					_tmp8_ = _tmp24_ != PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_EMISSION_MODE_DYNAMIC_GAME_ARGUMENTS;
				}
				if (_tmp8_) {
					_tmp7_ = TRUE;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp25_;
					const gchar* _tmp26_;
					const gchar* _tmp27_;
					_tmp25_ = selection;
					_tmp26_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_option_id (_tmp25_);
					_tmp27_ = _tmp26_;
					_tmp7_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) changed, _tmp27_);
				}
				if (_tmp7_) {
					_g_object_unref0 (metadata);
					_g_object_unref0 (selection);
					continue;
				}
				_tmp28_ = selection;
				_tmp30_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_values (_tmp28_, &_tmp29_);
				values = _tmp30_;
				values_length1 = _tmp29_;
				_values_size_ = values_length1;
				{
					gint position = 0;
					position = 0;
					{
						gboolean _tmp31_ = FALSE;
						_tmp31_ = TRUE;
						while (TRUE) {
							gchar** _tmp33_;
							gint _tmp33__length1;
							gchar* _tmp34_ = NULL;
							ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp35_;
							gboolean _tmp36_;
							gboolean _tmp37_;
							gchar* raw = NULL;
							gchar* _tmp44_;
							gboolean _tmp45_ = FALSE;
							ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp46_;
							const gchar* _tmp47_;
							const gchar* _tmp48_;
							gboolean anchors_match_source = FALSE;
							gint _tmp54_ = 0;
							gint source_index = 0;
							if (!_tmp31_) {
								gint _tmp32_;
								_tmp32_ = position;
								position = _tmp32_ + 1;
							}
							_tmp31_ = FALSE;
							_tmp33_ = values;
							_tmp33__length1 = values_length1;
							if (!(position < _tmp33__length1)) {
								break;
							}
							_tmp35_ = selection;
							_tmp36_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_values_are_serialized (_tmp35_);
							_tmp37_ = _tmp36_;
							if (_tmp37_) {
								gchar** _tmp38_;
								gint _tmp38__length1;
								const gchar* _tmp39_;
								gchar* _tmp40_;
								_tmp38_ = values;
								_tmp38__length1 = values_length1;
								_tmp39_ = _tmp38_[position];
								_tmp40_ = g_strdup (_tmp39_);
								_g_free0 (_tmp34_);
								_tmp34_ = _tmp40_;
							} else {
								gchar** _tmp41_;
								gint _tmp41__length1;
								const gchar* _tmp42_;
								gchar* _tmp43_;
								_tmp41_ = values;
								_tmp41__length1 = values_length1;
								_tmp42_ = _tmp41_[position];
								_tmp43_ = proton_plus_widgets_games_launch_options_editor_launch_command_composer_shell_word (_tmp42_);
								_g_free0 (_tmp34_);
								_tmp34_ = _tmp43_;
							}
							_tmp44_ = _tmp34_;
							_tmp34_ = NULL;
							raw = _tmp44_;
							_tmp46_ = selection;
							_tmp47_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_value_source_identity (_tmp46_);
							_tmp48_ = _tmp47_;
							if (g_strcmp0 (_tmp48_, "") == 0) {
								_tmp45_ = TRUE;
							} else {
								ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp49_;
								const gchar* _tmp50_;
								const gchar* _tmp51_;
								const gchar* _tmp52_;
								const gchar* _tmp53_;
								_tmp49_ = selection;
								_tmp50_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_value_source_identity (_tmp49_);
								_tmp51_ = _tmp50_;
								_tmp52_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (parsed);
								_tmp53_ = _tmp52_;
								_tmp45_ = g_strcmp0 (_tmp51_, _tmp53_) == 0;
							}
							anchors_match_source = _tmp45_;
							if (anchors_match_source) {
								ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandSelection* _tmp55_;
								_tmp55_ = selection;
								_tmp54_ = proton_plus_widgets_games_launch_options_editor_launch_command_selection_get_value_source_index (_tmp55_, position);
							} else {
								_tmp54_ = -1;
							}
							source_index = _tmp54_;
							if (source_index >= 0) {
								ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* _tmp56_;
								GeeHashMap* _tmp57_;
								GeeHashMap* _tmp58_;
								const gchar* _tmp59_;
								_tmp56_ = replacements;
								_tmp57_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (_tmp56_);
								_tmp58_ = _tmp57_;
								_tmp59_ = raw;
								gee_abstract_map_set ((GeeAbstractMap*) _tmp58_, (gpointer) ((gintptr) source_index), _tmp59_);
							} else {
								ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* _tmp60_;
								GeeArrayList* _tmp61_;
								GeeArrayList* _tmp62_;
								const gchar* _tmp63_;
								_tmp60_ = replacements;
								_tmp61_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (_tmp60_);
								_tmp62_ = _tmp61_;
								_tmp63_ = raw;
								gee_abstract_collection_add ((GeeAbstractCollection*) _tmp62_, _tmp63_);
							}
							_g_free0 (raw);
							_g_free0 (_tmp34_);
						}
					}
				}
				values = (_vala_array_free (values, values_length1, (GDestroyNotify) g_free), NULL);
				_g_object_unref0 (metadata);
				_g_object_unref0 (selection);
			}
		}
	}
	result = replacements;
	return result;
}

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

static gchar*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_merge_custom_arguments_in_source (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                                        ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* replacements)
{
	GeeArrayList* output = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp32_;
	gint _tmp33_ = 0;
	gpointer* _tmp34_;
	gchar** _tmp35_;
	gint _tmp35__length1;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (replacements != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	output = _tmp0_;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp3_;
				GeeArrayList* _tmp4_;
				gint _tmp5_;
				gint _tmp6_;
				GeeHashMap* _tmp14_;
				GeeHashMap* _tmp15_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = index;
					index = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
				_tmp4_ = _tmp3_;
				_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
				_tmp6_ = _tmp5_;
				if (!(index < _tmp6_)) {
					break;
				}
				if (!proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (source, index)) {
					GeeArrayList* _tmp7_;
					GeeArrayList* _tmp8_;
					GeeArrayList* _tmp9_;
					gpointer _tmp10_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp11_;
					const gchar* _tmp12_;
					const gchar* _tmp13_;
					_tmp7_ = output;
					_tmp8_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
					_tmp9_ = _tmp8_;
					_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, index);
					_tmp11_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp10_;
					_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp11_);
					_tmp13_ = _tmp12_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, _tmp13_);
					_g_object_unref0 (_tmp11_);
					continue;
				}
				_tmp14_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (replacements);
				_tmp15_ = _tmp14_;
				if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp15_, (gpointer) ((gintptr) index))) {
					GeeArrayList* _tmp16_;
					GeeHashMap* _tmp17_;
					GeeHashMap* _tmp18_;
					gpointer _tmp19_;
					gchar* _tmp20_;
					_tmp16_ = output;
					_tmp17_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (replacements);
					_tmp18_ = _tmp17_;
					_tmp19_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp18_, (gpointer) ((gintptr) index));
					_tmp20_ = (gchar*) _tmp19_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, _tmp20_);
					_g_free0 (_tmp20_);
				}
			}
		}
	}
	{
		GeeArrayList* _addition_list = NULL;
		GeeArrayList* _tmp21_;
		GeeArrayList* _tmp22_;
		gint _addition_size = 0;
		GeeArrayList* _tmp23_;
		gint _tmp24_;
		gint _tmp25_;
		gint _addition_index = 0;
		_tmp21_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (replacements);
		_tmp22_ = _tmp21_;
		_addition_list = _tmp22_;
		_tmp23_ = _addition_list;
		_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp23_);
		_tmp25_ = _tmp24_;
		_addition_size = _tmp25_;
		_addition_index = -1;
		while (TRUE) {
			gint _tmp26_;
			gint _tmp27_;
			gchar* addition = NULL;
			GeeArrayList* _tmp28_;
			gpointer _tmp29_;
			GeeArrayList* _tmp30_;
			const gchar* _tmp31_;
			_addition_index = _addition_index + 1;
			_tmp26_ = _addition_index;
			_tmp27_ = _addition_size;
			if (!(_tmp26_ < _tmp27_)) {
				break;
			}
			_tmp28_ = _addition_list;
			_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp28_, _addition_index);
			addition = (gchar*) _tmp29_;
			_tmp30_ = output;
			_tmp31_ = addition;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp30_, _tmp31_);
			_g_free0 (addition);
		}
	}
	_tmp32_ = output;
	_tmp34_ = gee_collection_to_array ((GeeCollection*) _tmp32_, &_tmp33_);
	_tmp35_ = _tmp34_;
	_tmp35__length1 = _tmp33_;
	_tmp36_ = _vala_g_strjoinv (" ", _tmp35_, (gint) _tmp33_);
	_tmp37_ = _tmp36_;
	_tmp35_ = (_vala_array_free (_tmp35_, _tmp35__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp37_;
	_g_object_unref0 (output);
	return result;
}

static gchar*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_merge (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated,
                                                                             GeeHashSet* changed,
                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments)
{
	gint _tmp0_ = 0;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint source_boundary = 0;
	gint _tmp8_ = 0;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	gint generated_boundary = 0;
	GeeArrayList* output = NULL;
	GeeArrayList* _tmp16_;
	GeeHashSet* emitted = NULL;
	GeeHashSet* _tmp17_;
	gboolean replace_unrecognized_arguments = FALSE;
	GeeArrayList* _tmp40_;
	GeeHashSet* _tmp41_;
	gboolean rebuild_wrappers = FALSE;
	gboolean _tmp64_ = FALSE;
	gboolean _tmp65_ = FALSE;
	GeeArrayList* _tmp66_;
	gint _tmp67_;
	gint _tmp68_;
	gboolean needs_boundary = FALSE;
	GeeArrayList* _tmp99_;
	GeeArrayList* _tmp100_;
	GeeArrayList* _tmp101_;
	gint _tmp102_;
	gint _tmp103_;
	GeeHashSet* _tmp104_;
	GeeArrayList* _tmp116_;
	gint _tmp117_ = 0;
	gpointer* _tmp118_;
	gchar** _tmp119_;
	gint _tmp119__length1;
	gchar* _tmp120_;
	gchar* _tmp121_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (source != NULL, NULL);
	g_return_val_if_fail (generated != NULL, NULL);
	g_return_val_if_fail (changed != NULL, NULL);
	g_return_val_if_fail (custom_arguments != NULL, NULL);
	_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (source);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == 1) {
		GeeArrayList* _tmp5_;
		GeeArrayList* _tmp6_;
		gpointer _tmp7_;
		_tmp5_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (source);
		_tmp6_ = _tmp5_;
		_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, 0);
		_tmp0_ = (gint) ((gintptr) _tmp7_);
	} else {
		_tmp0_ = -1;
	}
	source_boundary = _tmp0_;
	_tmp9_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (generated);
	_tmp10_ = _tmp9_;
	_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ == 1) {
		GeeArrayList* _tmp13_;
		GeeArrayList* _tmp14_;
		gpointer _tmp15_;
		_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (generated);
		_tmp14_ = _tmp13_;
		_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, 0);
		_tmp8_ = (gint) ((gintptr) _tmp15_);
	} else {
		_tmp8_ = -1;
	}
	generated_boundary = _tmp8_;
	_tmp16_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	output = _tmp16_;
	_tmp17_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	emitted = _tmp17_;
	replace_unrecognized_arguments = proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_dynamic_game_arguments (self, changed);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp18_ = FALSE;
			_tmp18_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp20_;
				GeeArrayList* _tmp21_;
				gint _tmp22_;
				gint _tmp23_;
				gboolean _tmp24_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp25_;
				gboolean _tmp26_ = FALSE;
				gboolean _tmp27_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp28_;
				if (!_tmp18_) {
					gint _tmp19_;
					_tmp19_ = index;
					index = _tmp19_ + 1;
				}
				_tmp18_ = FALSE;
				_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
				_tmp21_ = _tmp20_;
				_tmp22_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp21_);
				_tmp23_ = _tmp22_;
				if (!(index < _tmp23_)) {
					break;
				}
				if (source_boundary < 0) {
					break;
				}
				if (source_boundary >= 0) {
					_tmp24_ = index >= source_boundary;
				} else {
					_tmp24_ = FALSE;
				}
				if (_tmp24_) {
					break;
				}
				_tmp25_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (self, source, index);
				occurrence = _tmp25_;
				_tmp28_ = occurrence;
				if (_tmp28_ != NULL) {
					_tmp27_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_output_role_at (self, source, index) == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT;
				} else {
					_tmp27_ = FALSE;
				}
				if (_tmp27_) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp29_;
					const gchar* _tmp30_;
					const gchar* _tmp31_;
					_tmp29_ = occurrence;
					_tmp30_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_option_id (_tmp29_);
					_tmp31_ = _tmp30_;
					_tmp26_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) changed, _tmp31_);
				} else {
					_tmp26_ = FALSE;
				}
				if (_tmp26_) {
					GeeArrayList* _tmp32_;
					GeeArrayList* _tmp33_;
					GeeArrayList* _tmp34_;
					gpointer _tmp35_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp36_;
					const gchar* _tmp37_;
					const gchar* _tmp38_;
					_tmp32_ = output;
					_tmp33_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
					_tmp34_ = _tmp33_;
					_tmp35_ = gee_abstract_list_get ((GeeAbstractList*) _tmp34_, index);
					_tmp36_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp35_;
					_tmp37_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp36_);
					_tmp38_ = _tmp37_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp32_, _tmp38_);
					_g_object_unref0 (_tmp36_);
				} else {
					if (proton_plus_widgets_games_launch_options_editor_launch_command_writer_unrecognized_environment_at (self, source, index)) {
						GeeArrayList* _tmp39_;
						_tmp39_ = output;
						proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (self, _tmp39_, source, index, custom_arguments, replace_unrecognized_arguments);
					}
				}
				_g_object_unref0 (occurrence);
			}
		}
	}
	_tmp40_ = output;
	_tmp41_ = emitted;
	proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_generated_region (self, _tmp40_, generated, 0, generated_boundary, changed, _tmp41_, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT, FALSE);
	if (source_boundary >= 0) {
		{
			gint index = 0;
			index = 0;
			{
				gboolean _tmp42_ = FALSE;
				_tmp42_ = TRUE;
				while (TRUE) {
					gboolean _tmp44_ = FALSE;
					gboolean _tmp45_ = FALSE;
					GeeArrayList* _tmp46_;
					if (!_tmp42_) {
						gint _tmp43_;
						_tmp43_ = index;
						index = _tmp43_ + 1;
					}
					_tmp42_ = FALSE;
					if (!(index < source_boundary)) {
						break;
					}
					if (!proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (source, index)) {
						_tmp45_ = TRUE;
					} else {
						_tmp45_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_unrecognized_environment_at (self, source, index);
					}
					if (_tmp45_) {
						_tmp44_ = TRUE;
					} else {
						_tmp44_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_wrapper_token_at (self, source, index);
					}
					if (_tmp44_) {
						continue;
					}
					_tmp46_ = output;
					proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (self, _tmp46_, source, index, custom_arguments, replace_unrecognized_arguments);
				}
			}
		}
	}
	rebuild_wrappers = proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_wrapper (self, changed);
	if (!rebuild_wrappers) {
		{
			gint index = 0;
			index = 0;
			{
				gboolean _tmp47_ = FALSE;
				_tmp47_ = TRUE;
				while (TRUE) {
					GeeArrayList* _tmp49_;
					GeeArrayList* _tmp50_;
					gint _tmp51_;
					gint _tmp52_;
					gboolean _tmp53_ = FALSE;
					if (!_tmp47_) {
						gint _tmp48_;
						_tmp48_ = index;
						index = _tmp48_ + 1;
					}
					_tmp47_ = FALSE;
					_tmp49_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
					_tmp50_ = _tmp49_;
					_tmp51_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp50_);
					_tmp52_ = _tmp51_;
					if (!(index < _tmp52_)) {
						break;
					}
					if (source_boundary >= 0) {
						_tmp53_ = index >= source_boundary;
					} else {
						_tmp53_ = FALSE;
					}
					if (_tmp53_) {
						break;
					}
					if (!proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_wrapper_token_at (self, source, index)) {
						continue;
					}
					if (proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (source, index)) {
						GeeArrayList* _tmp54_;
						_tmp54_ = output;
						proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (self, _tmp54_, source, index, custom_arguments, replace_unrecognized_arguments);
					} else {
						GeeArrayList* _tmp55_;
						GeeArrayList* _tmp56_;
						GeeArrayList* _tmp57_;
						gpointer _tmp58_;
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp59_;
						const gchar* _tmp60_;
						const gchar* _tmp61_;
						_tmp55_ = output;
						_tmp56_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
						_tmp57_ = _tmp56_;
						_tmp58_ = gee_abstract_list_get ((GeeAbstractList*) _tmp57_, index);
						_tmp59_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp58_;
						_tmp60_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp59_);
						_tmp61_ = _tmp60_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp55_, _tmp61_);
						_g_object_unref0 (_tmp59_);
					}
				}
			}
		}
	} else {
		GeeArrayList* _tmp62_;
		GeeHashSet* _tmp63_;
		_tmp62_ = output;
		_tmp63_ = emitted;
		proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_merged_wrappers (self, _tmp62_, source, generated, changed, _tmp63_, custom_arguments, replace_unrecognized_arguments);
	}
	_tmp66_ = output;
	_tmp67_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp66_);
	_tmp68_ = _tmp67_;
	if (_tmp68_ > 0) {
		_tmp65_ = TRUE;
	} else {
		_tmp65_ = generated_boundary >= 0;
	}
	if (_tmp65_) {
		_tmp64_ = TRUE;
	} else {
		gboolean _tmp69_ = FALSE;
		if (source_boundary == 0) {
			_tmp69_ = !proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_game_arguments (self, changed);
		} else {
			_tmp69_ = FALSE;
		}
		_tmp64_ = _tmp69_;
	}
	needs_boundary = _tmp64_;
	if (needs_boundary) {
		GeeArrayList* _tmp70_;
		_tmp70_ = output;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp70_, "%command%");
	}
	{
		gint _tmp71_ = 0;
		gint index = 0;
		if (source_boundary >= 0) {
			_tmp71_ = source_boundary + 1;
		} else {
			_tmp71_ = 0;
		}
		index = _tmp71_;
		{
			gboolean _tmp72_ = FALSE;
			_tmp72_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp74_;
				GeeArrayList* _tmp75_;
				gint _tmp76_;
				gint _tmp77_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp78_;
				gboolean _tmp79_ = FALSE;
				gboolean _tmp81_ = FALSE;
				gboolean _tmp82_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp83_;
				if (!_tmp72_) {
					gint _tmp73_;
					_tmp73_ = index;
					index = _tmp73_ + 1;
				}
				_tmp72_ = FALSE;
				_tmp74_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
				_tmp75_ = _tmp74_;
				_tmp76_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp75_);
				_tmp77_ = _tmp76_;
				if (!(index < _tmp77_)) {
					break;
				}
				_tmp78_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (self, source, index);
				occurrence = _tmp78_;
				if (replace_unrecognized_arguments) {
					_tmp79_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (source, index);
				} else {
					_tmp79_ = FALSE;
				}
				if (_tmp79_) {
					GeeArrayList* _tmp80_;
					_tmp80_ = output;
					proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (self, _tmp80_, source, index, custom_arguments, TRUE);
					_g_object_unref0 (occurrence);
					continue;
				}
				_tmp83_ = occurrence;
				if (_tmp83_ == NULL) {
					_tmp82_ = TRUE;
				} else {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp84_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp85_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp86_;
					_tmp84_ = occurrence;
					_tmp85_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_semantic_kind (_tmp84_);
					_tmp86_ = _tmp85_;
					_tmp82_ = _tmp86_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT;
				}
				if (_tmp82_) {
					gboolean _tmp87_ = FALSE;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp88_;
					_tmp88_ = occurrence;
					if (_tmp88_ == NULL) {
						_tmp87_ = TRUE;
					} else {
						ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp89_;
						const gchar* _tmp90_;
						const gchar* _tmp91_;
						_tmp89_ = occurrence;
						_tmp90_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_option_id (_tmp89_);
						_tmp91_ = _tmp90_;
						_tmp87_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) changed, _tmp91_);
					}
					_tmp81_ = _tmp87_;
				} else {
					_tmp81_ = FALSE;
				}
				if (_tmp81_) {
					GeeArrayList* _tmp92_;
					GeeArrayList* _tmp93_;
					GeeArrayList* _tmp94_;
					gpointer _tmp95_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp96_;
					const gchar* _tmp97_;
					const gchar* _tmp98_;
					_tmp92_ = output;
					_tmp93_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
					_tmp94_ = _tmp93_;
					_tmp95_ = gee_abstract_list_get ((GeeAbstractList*) _tmp94_, index);
					_tmp96_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp95_;
					_tmp97_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp96_);
					_tmp98_ = _tmp97_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp92_, _tmp98_);
					_g_object_unref0 (_tmp96_);
				}
				_g_object_unref0 (occurrence);
			}
		}
	}
	_tmp99_ = output;
	_tmp100_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (generated);
	_tmp101_ = _tmp100_;
	_tmp102_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp101_);
	_tmp103_ = _tmp102_;
	_tmp104_ = emitted;
	proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_generated_region (self, _tmp99_, generated, generated_boundary + 1, _tmp103_, changed, _tmp104_, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_GAME_ARGUMENT, FALSE);
	if (replace_unrecognized_arguments) {
		{
			GeeArrayList* _addition_list = NULL;
			GeeArrayList* _tmp105_;
			GeeArrayList* _tmp106_;
			gint _addition_size = 0;
			GeeArrayList* _tmp107_;
			gint _tmp108_;
			gint _tmp109_;
			gint _addition_index = 0;
			_tmp105_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_additions (custom_arguments);
			_tmp106_ = _tmp105_;
			_addition_list = _tmp106_;
			_tmp107_ = _addition_list;
			_tmp108_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp107_);
			_tmp109_ = _tmp108_;
			_addition_size = _tmp109_;
			_addition_index = -1;
			while (TRUE) {
				gint _tmp110_;
				gint _tmp111_;
				gchar* addition = NULL;
				GeeArrayList* _tmp112_;
				gpointer _tmp113_;
				GeeArrayList* _tmp114_;
				const gchar* _tmp115_;
				_addition_index = _addition_index + 1;
				_tmp110_ = _addition_index;
				_tmp111_ = _addition_size;
				if (!(_tmp110_ < _tmp111_)) {
					break;
				}
				_tmp112_ = _addition_list;
				_tmp113_ = gee_abstract_list_get ((GeeAbstractList*) _tmp112_, _addition_index);
				addition = (gchar*) _tmp113_;
				_tmp114_ = output;
				_tmp115_ = addition;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp114_, _tmp115_);
				_g_free0 (addition);
			}
		}
	}
	_tmp116_ = output;
	_tmp118_ = gee_collection_to_array ((GeeCollection*) _tmp116_, &_tmp117_);
	_tmp119_ = _tmp118_;
	_tmp119__length1 = _tmp117_;
	_tmp120_ = _vala_g_strjoinv (" ", _tmp119_, (gint) _tmp117_);
	_tmp121_ = _tmp120_;
	_tmp119_ = (_vala_array_free (_tmp119_, _tmp119__length1, (GDestroyNotify) g_free), NULL);
	result = _tmp121_;
	_g_object_unref0 (emitted);
	_g_object_unref0 (output);
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                     GeeArrayList* output,
                                                                                                     ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                                     gint index,
                                                                                                     ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* replacements,
                                                                                                     gboolean replace)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (output != NULL);
	g_return_if_fail (source != NULL);
	g_return_if_fail (replacements != NULL);
	if (!replace) {
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gpointer _tmp2_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (source);
		_tmp1_ = _tmp0_;
		_tmp2_ = gee_abstract_list_get ((GeeAbstractList*) _tmp1_, index);
		_tmp3_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp2_;
		_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp3_);
		_tmp5_ = _tmp4_;
		gee_abstract_collection_add ((GeeAbstractCollection*) output, _tmp5_);
		_g_object_unref0 (_tmp3_);
	} else {
		GeeHashMap* _tmp6_;
		GeeHashMap* _tmp7_;
		_tmp6_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (replacements);
		_tmp7_ = _tmp6_;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp7_, (gpointer) ((gintptr) index))) {
			GeeHashMap* _tmp8_;
			GeeHashMap* _tmp9_;
			gpointer _tmp10_;
			gchar* _tmp11_;
			_tmp8_ = proton_plus_widgets_games_launch_options_editor_custom_argument_replacements_get_anchored (replacements);
			_tmp9_ = _tmp8_;
			_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, (gpointer) ((gintptr) index));
			_tmp11_ = (gchar*) _tmp10_;
			gee_abstract_collection_add ((GeeAbstractCollection*) output, _tmp11_);
			_g_free0 (_tmp11_);
		}
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_generated_region (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                               GeeArrayList* output,
                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated,
                                                                                               gint start,
                                                                                               gint end,
                                                                                               GeeHashSet* changed,
                                                                                               GeeHashSet* emitted,
                                                                                               ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion region,
                                                                                               gboolean include_all)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (output != NULL);
	g_return_if_fail (generated != NULL);
	g_return_if_fail (changed != NULL);
	g_return_if_fail (emitted != NULL);
	if (start < 0) {
		start = 0;
	}
	{
		gint index = 0;
		index = start;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp2_;
				gboolean _tmp3_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp12_;
				gboolean _tmp13_ = FALSE;
				gchar* key = NULL;
				gchar* _tmp17_;
				const gchar* _tmp18_;
				GeeArrayList* _tmp19_;
				GeeArrayList* _tmp20_;
				gpointer _tmp21_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp22_;
				const gchar* _tmp23_;
				const gchar* _tmp24_;
				const gchar* _tmp25_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(index < end)) {
					break;
				}
				_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (self, generated, index);
				occurrence = _tmp2_;
				if (proton_plus_widgets_games_launch_options_editor_launch_command_writer_output_role_at (self, generated, index) != region) {
					_g_object_unref0 (occurrence);
					continue;
				}
				if (include_all) {
					_tmp3_ = region == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_WRAPPER;
				} else {
					_tmp3_ = FALSE;
				}
				if (_tmp3_) {
					GeeArrayList* _tmp4_;
					GeeArrayList* _tmp5_;
					gpointer _tmp6_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp7_;
					const gchar* _tmp8_;
					const gchar* _tmp9_;
					gchar* _tmp10_;
					gchar* _tmp11_;
					_tmp4_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (generated);
					_tmp5_ = _tmp4_;
					_tmp6_ = gee_abstract_list_get ((GeeAbstractList*) _tmp5_, index);
					_tmp7_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp6_;
					_tmp8_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp7_);
					_tmp9_ = _tmp8_;
					gee_abstract_collection_add ((GeeAbstractCollection*) output, _tmp9_);
					_g_object_unref0 (_tmp7_);
					_tmp10_ = g_strdup_printf ("token:%d", index);
					_tmp11_ = _tmp10_;
					gee_abstract_collection_add ((GeeAbstractCollection*) emitted, _tmp11_);
					_g_free0 (_tmp11_);
					_g_object_unref0 (occurrence);
					continue;
				}
				_tmp12_ = occurrence;
				if (_tmp12_ == NULL) {
					_g_object_unref0 (occurrence);
					continue;
				}
				if (!include_all) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp14_;
					const gchar* _tmp15_;
					const gchar* _tmp16_;
					_tmp14_ = occurrence;
					_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_option_id (_tmp14_);
					_tmp16_ = _tmp15_;
					_tmp13_ = !gee_abstract_collection_contains ((GeeAbstractCollection*) changed, _tmp16_);
				} else {
					_tmp13_ = FALSE;
				}
				if (_tmp13_) {
					_g_object_unref0 (occurrence);
					continue;
				}
				_tmp17_ = g_strdup_printf ("token:%d", index);
				key = _tmp17_;
				_tmp18_ = key;
				if (gee_abstract_collection_contains ((GeeAbstractCollection*) emitted, _tmp18_)) {
					_g_free0 (key);
					_g_object_unref0 (occurrence);
					continue;
				}
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (generated);
				_tmp20_ = _tmp19_;
				_tmp21_ = gee_abstract_list_get ((GeeAbstractList*) _tmp20_, index);
				_tmp22_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp21_;
				_tmp23_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp22_);
				_tmp24_ = _tmp23_;
				gee_abstract_collection_add ((GeeAbstractCollection*) output, _tmp24_);
				_g_object_unref0 (_tmp22_);
				_tmp25_ = key;
				gee_abstract_collection_add ((GeeAbstractCollection*) emitted, _tmp25_);
				_g_free0 (key);
				_g_object_unref0 (occurrence);
			}
		}
	}
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion
proton_plus_widgets_games_launch_options_editor_launch_command_writer_output_role_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                      gint index)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp1_;
	gint _tmp8_ = 0;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	gint _tmp11_;
	gint _tmp12_;
	gint boundary = 0;
	gboolean _tmp16_ = FALSE;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterRegion result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (parsed != NULL, 0);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (self, parsed, index);
	occurrence = _tmp0_;
	_tmp1_ = occurrence;
	if (_tmp1_ != NULL) {
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp2_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp3_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp4_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp5_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp6_;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp7_;
		_tmp2_ = occurrence;
		_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_semantic_kind (_tmp2_);
		_tmp4_ = _tmp3_;
		if (_tmp4_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT) {
			result = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_GAME_ARGUMENT;
			_g_object_unref0 (occurrence);
			return result;
		}
		_tmp5_ = occurrence;
		_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_semantic_kind (_tmp5_);
		_tmp7_ = _tmp6_;
		if (_tmp7_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_ENVIRONMENT_ASSIGNMENT) {
			result = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT;
			_g_object_unref0 (occurrence);
			return result;
		}
	}
	_tmp9_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (parsed);
	_tmp10_ = _tmp9_;
	_tmp11_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ == 1) {
		GeeArrayList* _tmp13_;
		GeeArrayList* _tmp14_;
		gpointer _tmp15_;
		_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_command_boundary_indexes (parsed);
		_tmp14_ = _tmp13_;
		_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, 0);
		_tmp8_ = (gint) ((gintptr) _tmp15_);
	} else {
		_tmp8_ = -1;
	}
	boundary = _tmp8_;
	if (boundary >= 0) {
		_tmp16_ = index > boundary;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		result = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_GAME_ARGUMENT;
		_g_object_unref0 (occurrence);
		return result;
	}
	if (proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_wrapper_token_at (self, parsed, index)) {
		result = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_WRAPPER;
		_g_object_unref0 (occurrence);
		return result;
	}
	result = PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_WRITER_REGION_ENVIRONMENT;
	_g_object_unref0 (occurrence);
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_merged_wrappers (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                              GeeArrayList* output,
                                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* source,
                                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* generated,
                                                                                              GeeHashSet* changed,
                                                                                              GeeHashSet* emitted,
                                                                                              ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments,
                                                                                              gboolean replace_custom_arguments)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (output != NULL);
	g_return_if_fail (source != NULL);
	g_return_if_fail (generated != NULL);
	g_return_if_fail (changed != NULL);
	g_return_if_fail (emitted != NULL);
	g_return_if_fail (custom_arguments != NULL);
	{
		GeeList* _definition_list = NULL;
		ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp0_;
		GeeList* _tmp1_;
		gint _definition_size = 0;
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _definition_index = 0;
		_tmp0_ = self->priv->catalog;
		_tmp1_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_get_wrappers (_tmp0_);
		_definition_list = _tmp1_;
		_tmp2_ = _definition_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_definition_size = _tmp4_;
		_definition_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperDefinition* definition = NULL;
			GeeList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* source_invocation = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperDefinition* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* generated_invocation = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperDefinition* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp16_;
			gboolean _tmp17_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp18_;
			_definition_index = _definition_index + 1;
			_tmp5_ = _definition_index;
			_tmp6_ = _definition_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _definition_list;
			_tmp8_ = gee_list_get (_tmp7_, _definition_index);
			definition = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperDefinition*) _tmp8_;
			_tmp9_ = definition;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_wrapper_definition_get_id (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_invocation (self, source, _tmp11_);
			source_invocation = _tmp12_;
			_tmp13_ = definition;
			_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_wrapper_definition_get_id (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_invocation (self, generated, _tmp15_);
			generated_invocation = _tmp16_;
			_tmp18_ = source_invocation;
			if (_tmp18_ != NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchWrapperDefinition* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
				_tmp19_ = definition;
				_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_wrapper_definition_get_id (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp17_ = !proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_changed (self, _tmp21_, changed);
			} else {
				_tmp17_ = FALSE;
			}
			if (_tmp17_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp22_;
				_tmp22_ = source_invocation;
				proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_wrapper_tokens (self, output, source, _tmp22_, emitted, custom_arguments, replace_custom_arguments);
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp23_;
				_tmp23_ = generated_invocation;
				if (_tmp23_ != NULL) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp24_;
					_tmp24_ = generated_invocation;
					proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_wrapper_tokens (self, output, generated, _tmp24_, emitted, custom_arguments, FALSE);
				}
			}
			_g_object_unref0 (generated_invocation);
			_g_object_unref0 (source_invocation);
			_g_object_unref0 (definition);
		}
		_g_object_unref0 (_definition_list);
	}
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_invocation (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                          ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                          const gchar* id)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parsed != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	{
		GeeArrayList* _invocation_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _invocation_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _invocation_index = 0;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_wrappers (parsed);
		_tmp1_ = _tmp0_;
		_invocation_list = _tmp1_;
		_tmp2_ = _invocation_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_invocation_size = _tmp4_;
		_invocation_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* invocation = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp9_;
			const gchar* _tmp10_;
			const gchar* _tmp11_;
			_invocation_index = _invocation_index + 1;
			_tmp5_ = _invocation_index;
			_tmp6_ = _invocation_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _invocation_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _invocation_index);
			invocation = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation*) _tmp8_;
			_tmp9_ = invocation;
			_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_command_wrapper_invocation_get_wrapper_id (_tmp9_);
			_tmp11_ = _tmp10_;
			if (g_strcmp0 (_tmp11_, id) == 0) {
				result = invocation;
				return result;
			}
			_g_object_unref0 (invocation);
		}
	}
	result = NULL;
	return result;
}

static gint
__lambda160_ (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
              gint first,
              gint second)
{
	gint result;
	result = first - second;
	return result;
}

static gint
___lambda160__gcompare_data_func (gconstpointer a,
                                  gconstpointer b,
                                  gpointer self)
{
	gint result;
	result = __lambda160_ ((ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter*) self, (gint) ((gintptr) a), (gint) ((gintptr) b));
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_wrapper_tokens (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                             GeeArrayList* output,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* invocation,
                                                                                             GeeHashSet* emitted,
                                                                                             ProtonPlusWidgetsGamesLaunchOptionsEditorCustomArgumentReplacements* custom_arguments,
                                                                                             gboolean replace_custom_arguments)
{
	GeeArrayList* indexes = NULL;
	GeeArrayList* _tmp0_;
	gint* _tmp1_;
	gint _tmp1__length1;
	gint _tmp13_;
	gint _tmp14_;
	GeeArrayList* _tmp18_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (output != NULL);
	g_return_if_fail (parsed != NULL);
	g_return_if_fail (invocation != NULL);
	g_return_if_fail (emitted != NULL);
	g_return_if_fail (custom_arguments != NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	indexes = _tmp0_;
	_tmp1_ = invocation->executable_indexes;
	_tmp1__length1 = invocation->executable_indexes_length1;
	{
		gint* index_collection = NULL;
		gint index_collection_length1 = 0;
		gint _index_collection_size_ = 0;
		gint index_it = 0;
		index_collection = _tmp1_;
		index_collection_length1 = _tmp1__length1;
		for (index_it = 0; index_it < index_collection_length1; index_it = index_it + 1) {
			gint index = 0;
			index = index_collection[index_it];
			{
				GeeArrayList* _tmp2_;
				_tmp2_ = indexes;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, (gpointer) ((gintptr) index));
			}
		}
	}
	{
		GeeArrayList* _index_list = NULL;
		GeeArrayList* _tmp3_;
		GeeArrayList* _tmp4_;
		gint _index_size = 0;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _index_index = 0;
		_tmp3_ = proton_plus_widgets_games_launch_options_editor_launch_command_wrapper_invocation_get_argument_indexes (invocation);
		_tmp4_ = _tmp3_;
		_index_list = _tmp4_;
		_tmp5_ = _index_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_index_size = _tmp7_;
		_index_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint index = 0;
			GeeArrayList* _tmp10_;
			gpointer _tmp11_;
			GeeArrayList* _tmp12_;
			_index_index = _index_index + 1;
			_tmp8_ = _index_index;
			_tmp9_ = _index_size;
			if (!(_tmp8_ < _tmp9_)) {
				break;
			}
			_tmp10_ = _index_list;
			_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _index_index);
			index = (gint) ((gintptr) _tmp11_);
			_tmp12_ = indexes;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp12_, (gpointer) ((gintptr) index));
		}
	}
	_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_command_wrapper_invocation_get_delimiter_index (invocation);
	_tmp14_ = _tmp13_;
	if (_tmp14_ >= 0) {
		GeeArrayList* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		_tmp15_ = indexes;
		_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_command_wrapper_invocation_get_delimiter_index (invocation);
		_tmp17_ = _tmp16_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, (gpointer) ((gintptr) _tmp17_));
	}
	_tmp18_ = indexes;
	gee_list_sort ((GeeList*) _tmp18_, ___lambda160__gcompare_data_func, g_object_ref (self), g_object_unref);
	{
		GeeArrayList* _index_list = NULL;
		GeeArrayList* _tmp19_;
		gint _index_size = 0;
		GeeArrayList* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		gint _index_index = 0;
		_tmp19_ = indexes;
		_index_list = _tmp19_;
		_tmp20_ = _index_list;
		_tmp21_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp20_);
		_tmp22_ = _tmp21_;
		_index_size = _tmp22_;
		_index_index = -1;
		while (TRUE) {
			gint _tmp23_;
			gint _tmp24_;
			gint index = 0;
			GeeArrayList* _tmp25_;
			gpointer _tmp26_;
			gchar* key = NULL;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			gchar* _tmp29_;
			const gchar* _tmp30_;
			_index_index = _index_index + 1;
			_tmp23_ = _index_index;
			_tmp24_ = _index_size;
			if (!(_tmp23_ < _tmp24_)) {
				break;
			}
			_tmp25_ = _index_list;
			_tmp26_ = gee_abstract_list_get ((GeeAbstractList*) _tmp25_, _index_index);
			index = (gint) ((gintptr) _tmp26_);
			_tmp27_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_original_input (parsed);
			_tmp28_ = _tmp27_;
			_tmp29_ = g_strdup_printf ("wrapper:%s:%d", _tmp28_, index);
			key = _tmp29_;
			_tmp30_ = key;
			if (!gee_abstract_collection_contains ((GeeAbstractCollection*) emitted, _tmp30_)) {
				const gchar* _tmp37_;
				if (proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_is_custom_game_argument_index (parsed, index)) {
					proton_plus_widgets_games_launch_options_editor_launch_command_writer_append_source_custom_argument (self, output, parsed, index, custom_arguments, replace_custom_arguments);
				} else {
					GeeArrayList* _tmp31_;
					GeeArrayList* _tmp32_;
					gpointer _tmp33_;
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken* _tmp34_;
					const gchar* _tmp35_;
					const gchar* _tmp36_;
					_tmp31_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
					_tmp32_ = _tmp31_;
					_tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp32_, index);
					_tmp34_ = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionShellToken*) _tmp33_;
					_tmp35_ = proton_plus_widgets_games_launch_options_editor_launch_option_shell_token_get_raw (_tmp34_);
					_tmp36_ = _tmp35_;
					gee_abstract_collection_add ((GeeAbstractCollection*) output, _tmp36_);
					_g_object_unref0 (_tmp34_);
				}
				_tmp37_ = key;
				gee_abstract_collection_add ((GeeAbstractCollection*) emitted, _tmp37_);
			}
			_g_free0 (key);
		}
	}
	_g_object_unref0 (indexes);
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_wrapper_changed (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                       const gchar* wrapper_id,
                                                                                       GeeHashSet* changed)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (wrapper_id != NULL, FALSE);
	g_return_val_if_fail (changed != NULL, FALSE);
	{
		GeeIterator* _id_it = NULL;
		GeeIterator* _tmp0_;
		_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) changed);
		_id_it = _tmp0_;
		while (TRUE) {
			GeeIterator* _tmp1_;
			gchar* id = NULL;
			GeeIterator* _tmp2_;
			gpointer _tmp3_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp4_;
			const gchar* _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
			gboolean _tmp7_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* semantics = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gboolean _tmp19_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp20_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp21_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp22_;
			_tmp1_ = _id_it;
			if (!gee_iterator_next (_tmp1_)) {
				break;
			}
			_tmp2_ = _id_it;
			_tmp3_ = gee_iterator_get (_tmp2_);
			id = (gchar*) _tmp3_;
			_tmp4_ = self->priv->catalog;
			_tmp5_ = id;
			_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp4_, _tmp5_);
			metadata = _tmp6_;
			_tmp8_ = metadata;
			if (_tmp8_ == NULL) {
				_tmp7_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp9_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp10_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp11_;
				_tmp9_ = metadata;
				_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp7_ = _tmp11_ == NULL;
			}
			if (_tmp7_) {
				_g_object_unref0 (metadata);
				_g_free0 (id);
				continue;
			}
			_tmp12_ = metadata;
			_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = _g_object_ref0 (_tmp14_);
			semantics = _tmp15_;
			_tmp16_ = semantics;
			_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_wrapper_id (_tmp16_);
			_tmp18_ = _tmp17_;
			if (g_strcmp0 (_tmp18_, wrapper_id) == 0) {
				result = TRUE;
				_g_object_unref0 (semantics);
				_g_object_unref0 (metadata);
				_g_free0 (id);
				_g_object_unref0 (_id_it);
				return result;
			}
			_tmp20_ = semantics;
			_tmp21_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp20_);
			_tmp22_ = _tmp21_;
			if (_tmp22_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_WRAPPER_SELECTOR) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp23_;
				gchar** _tmp24_;
				gint _tmp24__length1;
				gint _tmp25_ = 0;
				gchar** _tmp26_;
				gint _tmp26__length1;
				_tmp23_ = semantics;
				_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_selectable_wrapper_ids (_tmp23_, &_tmp25_);
				_tmp24__length1 = _tmp25_;
				_tmp26_ = _tmp24_;
				_tmp26__length1 = _tmp24__length1;
				_tmp19_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_contains (self, _tmp26_, (gint) _tmp26__length1, wrapper_id);
			} else {
				_tmp19_ = FALSE;
			}
			if (_tmp19_) {
				result = TRUE;
				_g_object_unref0 (semantics);
				_g_object_unref0 (metadata);
				_g_free0 (id);
				_g_object_unref0 (_id_it);
				return result;
			}
			_g_object_unref0 (semantics);
			_g_object_unref0 (metadata);
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_contains (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                gchar** values,
                                                                                gint values_length1,
                                                                                const gchar* candidate)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (candidate != NULL, FALSE);
	{
		gchar** value_collection = NULL;
		gint value_collection_length1 = 0;
		gint _value_collection_size_ = 0;
		gint value_it = 0;
		value_collection = values;
		value_collection_length1 = values_length1;
		for (value_it = 0; value_it < value_collection_length1; value_it = value_it + 1) {
			gchar* _tmp0_;
			gchar* value = NULL;
			_tmp0_ = g_strdup (value_collection[value_it]);
			value = _tmp0_;
			{
				const gchar* _tmp1_;
				_tmp1_ = value;
				if (g_strcmp0 (_tmp1_, candidate) == 0) {
					result = TRUE;
					_g_free0 (value);
					return result;
				}
				_g_free0 (value);
			}
		}
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_environment (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                      ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp0_;
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (occurrence != NULL, FALSE);
	_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_semantic_kind (occurrence);
	_tmp1_ = _tmp0_;
	result = _tmp1_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_ENVIRONMENT_ASSIGNMENT;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_wrapper (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                           GeeHashSet* changed)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (changed != NULL, FALSE);
	{
		GeeIterator* _id_it = NULL;
		GeeIterator* _tmp0_;
		_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) changed);
		_id_it = _tmp0_;
		while (TRUE) {
			GeeIterator* _tmp1_;
			gchar* id = NULL;
			GeeIterator* _tmp2_;
			gpointer _tmp3_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp4_;
			const gchar* _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
			gboolean _tmp7_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind kind = 0;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp12_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp13_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp14_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp15_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp16_;
			gboolean _tmp17_ = FALSE;
			gboolean _tmp18_ = FALSE;
			gboolean _tmp19_ = FALSE;
			gboolean _tmp20_ = FALSE;
			_tmp1_ = _id_it;
			if (!gee_iterator_next (_tmp1_)) {
				break;
			}
			_tmp2_ = _id_it;
			_tmp3_ = gee_iterator_get (_tmp2_);
			id = (gchar*) _tmp3_;
			_tmp4_ = self->priv->catalog;
			_tmp5_ = id;
			_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp4_, _tmp5_);
			metadata = _tmp6_;
			_tmp8_ = metadata;
			if (_tmp8_ == NULL) {
				_tmp7_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp9_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp10_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp11_;
				_tmp9_ = metadata;
				_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp7_ = _tmp11_ == NULL;
			}
			if (_tmp7_) {
				_g_object_unref0 (metadata);
				_g_free0 (id);
				continue;
			}
			_tmp12_ = metadata;
			_tmp13_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp14_);
			_tmp16_ = _tmp15_;
			kind = _tmp16_;
			if (kind == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_PREFIX_WRAPPER) {
				_tmp20_ = TRUE;
			} else {
				_tmp20_ = kind == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_DELIMITED_WRAPPER;
			}
			if (_tmp20_) {
				_tmp19_ = TRUE;
			} else {
				_tmp19_ = kind == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_WRAPPER_SELECTOR;
			}
			if (_tmp19_) {
				_tmp18_ = TRUE;
			} else {
				_tmp18_ = kind == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_WRAPPER_ARGUMENT;
			}
			if (_tmp18_) {
				_tmp17_ = TRUE;
			} else {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp21_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp22_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp23_;
				const gchar* _tmp24_;
				const gchar* _tmp25_;
				_tmp21_ = metadata;
				_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp24_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_wrapper_id (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp17_ = g_strcmp0 (_tmp25_, "") != 0;
			}
			if (_tmp17_) {
				result = TRUE;
				_g_object_unref0 (metadata);
				_g_free0 (id);
				_g_object_unref0 (_id_it);
				return result;
			}
			_g_object_unref0 (metadata);
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                  GeeHashSet* changed)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (changed != NULL, FALSE);
	{
		GeeIterator* _id_it = NULL;
		GeeIterator* _tmp0_;
		_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) changed);
		_id_it = _tmp0_;
		while (TRUE) {
			GeeIterator* _tmp1_;
			gchar* id = NULL;
			GeeIterator* _tmp2_;
			gpointer _tmp3_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp4_;
			const gchar* _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
			gboolean _tmp7_ = FALSE;
			gboolean _tmp8_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp9_;
			_tmp1_ = _id_it;
			if (!gee_iterator_next (_tmp1_)) {
				break;
			}
			_tmp2_ = _id_it;
			_tmp3_ = gee_iterator_get (_tmp2_);
			id = (gchar*) _tmp3_;
			_tmp4_ = self->priv->catalog;
			_tmp5_ = id;
			_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp4_, _tmp5_);
			metadata = _tmp6_;
			_tmp9_ = metadata;
			if (_tmp9_ != NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp10_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp11_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp12_;
				_tmp10_ = metadata;
				_tmp11_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp10_);
				_tmp12_ = _tmp11_;
				_tmp8_ = _tmp12_ != NULL;
			} else {
				_tmp8_ = FALSE;
			}
			if (_tmp8_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp13_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp14_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp15_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp17_;
				_tmp13_ = metadata;
				_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp16_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp7_ = _tmp17_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT;
			} else {
				_tmp7_ = FALSE;
			}
			if (_tmp7_) {
				result = TRUE;
				_g_object_unref0 (metadata);
				_g_free0 (id);
				_g_object_unref0 (_id_it);
				return result;
			}
			_g_object_unref0 (metadata);
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_has_changed_dynamic_game_arguments (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                          GeeHashSet* changed)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (changed != NULL, FALSE);
	{
		GeeIterator* _id_it = NULL;
		GeeIterator* _tmp0_;
		_tmp0_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) changed);
		_id_it = _tmp0_;
		while (TRUE) {
			GeeIterator* _tmp1_;
			gchar* id = NULL;
			GeeIterator* _tmp2_;
			gpointer _tmp3_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* metadata = NULL;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionCatalog* _tmp4_;
			const gchar* _tmp5_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp6_;
			gboolean _tmp7_ = FALSE;
			gboolean _tmp8_ = FALSE;
			gboolean _tmp9_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp10_;
			_tmp1_ = _id_it;
			if (!gee_iterator_next (_tmp1_)) {
				break;
			}
			_tmp2_ = _id_it;
			_tmp3_ = gee_iterator_get (_tmp2_);
			id = (gchar*) _tmp3_;
			_tmp4_ = self->priv->catalog;
			_tmp5_ = id;
			_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_option_catalog_lookup (_tmp4_, _tmp5_);
			metadata = _tmp6_;
			_tmp10_ = metadata;
			if (_tmp10_ != NULL) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp11_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp12_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp13_;
				_tmp11_ = metadata;
				_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp11_);
				_tmp13_ = _tmp12_;
				_tmp9_ = _tmp13_ != NULL;
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp14_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp15_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp16_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp17_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemanticKind _tmp18_;
				_tmp14_ = metadata;
				_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_kind (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp8_ = _tmp18_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_SEMANTIC_KIND_GAME_ARGUMENT;
			} else {
				_tmp8_ = FALSE;
			}
			if (_tmp8_) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionMetadata* _tmp19_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp20_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionSemantics* _tmp21_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp22_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchOptionEmissionMode _tmp23_;
				_tmp19_ = metadata;
				_tmp20_ = proton_plus_widgets_games_launch_options_editor_launch_option_metadata_get_semantics (_tmp19_);
				_tmp21_ = _tmp20_;
				_tmp22_ = proton_plus_widgets_games_launch_options_editor_launch_option_semantics_get_emission_mode (_tmp21_);
				_tmp23_ = _tmp22_;
				_tmp7_ = _tmp23_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_OPTION_EMISSION_MODE_DYNAMIC_GAME_ARGUMENTS;
			} else {
				_tmp7_ = FALSE;
			}
			if (_tmp7_) {
				result = TRUE;
				_g_object_unref0 (metadata);
				_g_free0 (id);
				_g_object_unref0 (_id_it);
				return result;
			}
			_g_object_unref0 (metadata);
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	result = FALSE;
	return result;
}

static ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence*
proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                     ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                     gint index)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parsed != NULL, NULL);
	{
		GeeArrayList* _occurrence_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _occurrence_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _occurrence_index = 0;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_occurrences (parsed);
		_tmp1_ = _tmp0_;
		_occurrence_list = _tmp1_;
		_tmp2_ = _occurrence_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_occurrence_size = _tmp4_;
		_occurrence_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp9_;
			gint* _tmp10_;
			gint _tmp10__length1;
			_occurrence_index = _occurrence_index + 1;
			_tmp5_ = _occurrence_index;
			_tmp6_ = _occurrence_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _occurrence_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _occurrence_index);
			occurrence = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence*) _tmp8_;
			_tmp9_ = occurrence;
			_tmp10_ = _tmp9_->token_indexes;
			_tmp10__length1 = _tmp9_->token_indexes_length1;
			{
				gint* owned_collection = NULL;
				gint owned_collection_length1 = 0;
				gint _owned_collection_size_ = 0;
				gint owned_it = 0;
				owned_collection = _tmp10_;
				owned_collection_length1 = _tmp10__length1;
				for (owned_it = 0; owned_it < owned_collection_length1; owned_it = owned_it + 1) {
					gint owned = 0;
					owned = owned_collection[owned_it];
					{
						if (owned == index) {
							result = occurrence;
							return result;
						}
					}
				}
			}
			_g_object_unref0 (occurrence);
		}
	}
	result = NULL;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_unrecognized_environment_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                                   ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                                   gint index)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parsed != NULL, FALSE);
	{
		GeeArrayList* _token_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _token_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _token_index = 0;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_unrecognized_tokens (parsed);
		_tmp1_ = _tmp0_;
		_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_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* token = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			gboolean _tmp9_ = FALSE;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp10_;
			gint _tmp11_;
			gint _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 = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken*) _tmp8_;
			_tmp10_ = token;
			_tmp11_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_token_index (_tmp10_);
			_tmp12_ = _tmp11_;
			if (_tmp12_ == index) {
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedToken* _tmp13_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp14_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandUnrecognizedKind _tmp15_;
				_tmp13_ = token;
				_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_command_unrecognized_token_get_kind (_tmp13_);
				_tmp15_ = _tmp14_;
				_tmp9_ = _tmp15_ == PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_LAUNCH_COMMAND_UNRECOGNIZED_KIND_UNKNOWN_ENVIRONMENT_ASSIGNMENT;
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				result = TRUE;
				_g_object_unref0 (token);
				return result;
			}
			_g_object_unref0 (token);
		}
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_widgets_games_launch_options_editor_launch_command_writer_is_wrapper_token_at (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                           ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                           gint index)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parsed != NULL, FALSE);
	{
		GeeArrayList* _wrapper_list = NULL;
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _wrapper_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _wrapper_index = 0;
		_tmp0_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_wrappers (parsed);
		_tmp1_ = _tmp0_;
		_wrapper_list = _tmp1_;
		_tmp2_ = _wrapper_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_wrapper_size = _tmp4_;
		_wrapper_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* wrapper = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp9_;
			gint* _tmp10_;
			gint _tmp10__length1;
			ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp11_;
			gint _tmp12_;
			gint _tmp13_;
			_wrapper_index = _wrapper_index + 1;
			_tmp5_ = _wrapper_index;
			_tmp6_ = _wrapper_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _wrapper_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _wrapper_index);
			wrapper = (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation*) _tmp8_;
			_tmp9_ = wrapper;
			_tmp10_ = _tmp9_->executable_indexes;
			_tmp10__length1 = _tmp9_->executable_indexes_length1;
			{
				gint* executable_collection = NULL;
				gint executable_collection_length1 = 0;
				gint _executable_collection_size_ = 0;
				gint executable_it = 0;
				executable_collection = _tmp10_;
				executable_collection_length1 = _tmp10__length1;
				for (executable_it = 0; executable_it < executable_collection_length1; executable_it = executable_it + 1) {
					gint executable = 0;
					executable = executable_collection[executable_it];
					{
						if (executable == index) {
							result = TRUE;
							_g_object_unref0 (wrapper);
							return result;
						}
					}
				}
			}
			_tmp11_ = wrapper;
			_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_command_wrapper_invocation_get_delimiter_index (_tmp11_);
			_tmp13_ = _tmp12_;
			if (_tmp13_ == index) {
				result = TRUE;
				_g_object_unref0 (wrapper);
				return result;
			}
			{
				GeeArrayList* _argument_list = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWrapperInvocation* _tmp14_;
				GeeArrayList* _tmp15_;
				GeeArrayList* _tmp16_;
				gint _argument_size = 0;
				GeeArrayList* _tmp17_;
				gint _tmp18_;
				gint _tmp19_;
				gint _argument_index = 0;
				_tmp14_ = wrapper;
				_tmp15_ = proton_plus_widgets_games_launch_options_editor_launch_command_wrapper_invocation_get_argument_indexes (_tmp14_);
				_tmp16_ = _tmp15_;
				_argument_list = _tmp16_;
				_tmp17_ = _argument_list;
				_tmp18_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp17_);
				_tmp19_ = _tmp18_;
				_argument_size = _tmp19_;
				_argument_index = -1;
				while (TRUE) {
					gint _tmp20_;
					gint _tmp21_;
					gint argument = 0;
					GeeArrayList* _tmp22_;
					gpointer _tmp23_;
					_argument_index = _argument_index + 1;
					_tmp20_ = _argument_index;
					_tmp21_ = _argument_size;
					if (!(_tmp20_ < _tmp21_)) {
						break;
					}
					_tmp22_ = _argument_list;
					_tmp23_ = gee_abstract_list_get ((GeeAbstractList*) _tmp22_, _argument_index);
					argument = (gint) ((gintptr) _tmp23_);
					if (argument == index) {
						result = TRUE;
						_g_object_unref0 (wrapper);
						return result;
					}
				}
			}
			_g_object_unref0 (wrapper);
		}
	}
	result = FALSE;
	return result;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_record_spans (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter* self,
                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriteResult* _result_,
                                                                                    ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandParseResult* parsed,
                                                                                    GeeHashSet* changed)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (_result_ != NULL);
	g_return_if_fail (parsed != NULL);
	g_return_if_fail (changed != NULL);
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				GeeArrayList* _tmp2_;
				GeeArrayList* _tmp3_;
				gint _tmp4_;
				gint _tmp5_;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* occurrence = NULL;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp6_;
				gboolean _tmp7_ = FALSE;
				ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp8_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = proton_plus_widgets_games_launch_options_editor_launch_command_parse_result_get_tokens (parsed);
				_tmp3_ = _tmp2_;
				_tmp4_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp3_);
				_tmp5_ = _tmp4_;
				if (!(index < _tmp5_)) {
					break;
				}
				_tmp6_ = proton_plus_widgets_games_launch_options_editor_launch_command_writer_occurrence_at (self, parsed, index);
				occurrence = _tmp6_;
				_tmp8_ = occurrence;
				if (_tmp8_ != NULL) {
					ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandOptionOccurrence* _tmp9_;
					const gchar* _tmp10_;
					const gchar* _tmp11_;
					_tmp9_ = occurrence;
					_tmp10_ = proton_plus_widgets_games_launch_options_editor_launch_command_option_occurrence_get_option_id (_tmp9_);
					_tmp11_ = _tmp10_;
					_tmp7_ = gee_abstract_collection_contains ((GeeAbstractCollection*) changed, _tmp11_);
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					GeeArrayList* _tmp12_;
					GeeArrayList* _tmp13_;
					_tmp12_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_replaced_token_spans (_result_);
					_tmp13_ = _tmp12_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, (gpointer) ((gintptr) index));
				} else {
					GeeArrayList* _tmp14_;
					GeeArrayList* _tmp15_;
					_tmp14_ = proton_plus_widgets_games_launch_options_editor_launch_command_write_result_get_preserved_token_spans (_result_);
					_tmp15_ = _tmp14_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, (gpointer) ((gintptr) index));
				}
				_g_object_unref0 (occurrence);
			}
		}
	}
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_class_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterClass * klass,
                                                                                  gpointer klass_data)
{
	proton_plus_widgets_games_launch_options_editor_launch_command_writer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_games_launch_options_editor_launch_command_writer_finalize;
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_instance_init (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter * self,
                                                                                     gpointer klass)
{
	self->priv = proton_plus_widgets_games_launch_options_editor_launch_command_writer_get_instance_private (self);
}

static void
proton_plus_widgets_games_launch_options_editor_launch_command_writer_finalize (GObject * obj)
{
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_GAMES_LAUNCH_OPTIONS_EDITOR_TYPE_LAUNCH_COMMAND_WRITER, ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter);
	_g_object_unref0 (self->priv->catalog);
	_g_object_unref0 (self->priv->composer);
	_g_object_unref0 (self->priv->parser);
	_g_object_unref0 (self->priv->capability_resolver);
	G_OBJECT_CLASS (proton_plus_widgets_games_launch_options_editor_launch_command_writer_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_games_launch_options_editor_launch_command_writer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter), 0, (GInstanceInitFunc) proton_plus_widgets_games_launch_options_editor_launch_command_writer_instance_init, NULL };
	GType proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id;
	proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter", &g_define_type_info, 0);
	ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriter_private_offset = g_type_add_instance_private (proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id, sizeof (ProtonPlusWidgetsGamesLaunchOptionsEditorLaunchCommandWriterPrivate));
	return proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id;
}

GType
proton_plus_widgets_games_launch_options_editor_launch_command_writer_get_type (void)
{
	static volatile gsize proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id__once)) {
		GType proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id;
		proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id = proton_plus_widgets_games_launch_options_editor_launch_command_writer_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id__once, proton_plus_widgets_games_launch_options_editor_launch_command_writer_type_id);
	}
	return proton_plus_widgets_games_launch_options_editor_launch_command_writer_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;
}

