/* compatibility-process-guard.c generated by valac 0.56.19, the Vala compiler
 * generated from compatibility-process-guard.vala, do not modify */

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

#define PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_QUERY_SCRIPT "current_uid=$(id -u) || exit 70; " "scan_failed=false; " "for process_dir in /proc/[0-9]*; do " "if [ \"$process_dir\" = '/proc/[0-9]*' ]; then exit 70; fi; " "owner=$(stat -c '%u' \"$process_dir\" 2>/dev/null); owner_status=$?; " "if [ \"$owner_status\" -ne 0 ]; then " "if [ -d \"$process_dir\" ]; then scan_failed=true; fi; continue; " "fi; " "if [ \"$owner\" != \"$current_uid\" ]; then continue; fi; " "command_line=$(base64 -w 0 \"$process_dir/cmdline\" 2>/dev/null); comm" \
"and_status=$?; " "if [ \"$command_status\" -eq 0 ] && [ -z \"$command_line\" ]; then con" \
"tinue; fi; " "executable=$(readlink \"$process_dir/exe\" 2>/dev/null); executable_st" \
"atus=$?; " "if [ \"$executable_status\" -ne 0 ]; then " "if [ ! -d \"$process_dir\" ]; then continue; fi; " "if [ \"$command_status\" -eq 0 ]; then " "retry_command_line=$(base64 -w 0 \"$process_dir/cmdline\" 2>/dev/null)" \
"; retry_status=$?; " "if [ \"$retry_status\" -ne 0 ]; then command_status=$retry_status; com" \
"mand_line='-'; " "elif [ -z \"$retry_command_line\" ]; then continue; " "else command_line=$retry_command_line; fi; " "fi; " "encoded_executable='-'; " "else " "encoded_executable=$(printf '%s' \"$executable\" | base64 -w 0); encod" \
"e_status=$?; " "if [ \"$encode_status\" -ne 0 ]; then encoded_executable='-'; fi; " "fi; " "if [ \"$command_status\" -ne 0 ]; then command_line='-'; fi; " "printf 'R\\t%s\\t%s\\t%s\\n' \"${process_dir##*/}\" \"$encoded_executa" \
"ble\" \"$command_line\" || exit 70; " "done; " "if $scan_failed; then printf 'S\\tFAILED\\n'; exit 71; fi; " "printf 'S\\tOK\\n'"
#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_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_0_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_OPERATION_KIND_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_INSTALLATION_PATH_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_FAMILY_ID_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_INSTANCE_ID_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_FAMILY_ID_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_ID_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_MUTATES_EXISTING_DESTINATION_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_0_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_PID_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_PATH_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_AVAILABLE_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_AVAILABLE_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_INSPECTION_ERROR_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
enum  {
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_0_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_STATUS_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_REASON_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_INSPECTION_ERROR_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_PROCESSES_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_NUM_PROPERTIES];
enum  {
	PROTON_PLUS_SERVICES_NATIVE_COMPATIBILITY_PROCESS_QUERY_BACKEND_0_PROPERTY,
	PROTON_PLUS_SERVICES_NATIVE_COMPATIBILITY_PROCESS_QUERY_BACKEND_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_native_compatibility_process_query_backend_properties[PROTON_PLUS_SERVICES_NATIVE_COMPATIBILITY_PROCESS_QUERY_BACKEND_NUM_PROPERTIES];
typedef struct _Block63Data Block63Data;
#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL)))
typedef struct _ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY (proton_plus_services_host_flatpak_process_query_get_type ())
#define PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY, ProtonPlusServicesHostFlatpakProcessQuery))
#define PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY, ProtonPlusServicesHostFlatpakProcessQueryClass))
#define PROTON_PLUS_SERVICES_IS_HOST_FLATPAK_PROCESS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY))
#define PROTON_PLUS_SERVICES_IS_HOST_FLATPAK_PROCESS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY))
#define PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY, ProtonPlusServicesHostFlatpakProcessQueryClass))

typedef struct _ProtonPlusServicesHostFlatpakProcessQuery ProtonPlusServicesHostFlatpakProcessQuery;
typedef struct _ProtonPlusServicesHostFlatpakProcessQueryClass ProtonPlusServicesHostFlatpakProcessQueryClass;
typedef struct _ProtonPlusServicesHostFlatpakProcessQueryPrivate ProtonPlusServicesHostFlatpakProcessQueryPrivate;
enum  {
	PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_0_PROPERTY,
	PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_host_flatpak_process_query_properties[PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_NUM_PROPERTIES];
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
typedef struct _ProtonPlusServicesHostFlatpakProcessQueryRunData ProtonPlusServicesHostFlatpakProcessQueryRunData;
enum  {
	PROTON_PLUS_SERVICES_FLATPAK_COMPATIBILITY_PROCESS_QUERY_BACKEND_0_PROPERTY,
	PROTON_PLUS_SERVICES_FLATPAK_COMPATIBILITY_PROCESS_QUERY_BACKEND_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_flatpak_compatibility_process_query_backend_properties[PROTON_PLUS_SERVICES_FLATPAK_COMPATIBILITY_PROCESS_QUERY_BACKEND_NUM_PROPERTIES];
typedef struct _ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData;
enum  {
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_GUARD_0_PROPERTY,
	PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_GUARD_NUM_PROPERTIES
};
static GParamSpec* proton_plus_services_compatibility_process_guard_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_GUARD_NUM_PROPERTIES];
typedef struct _ProtonPlusServicesCompatibilityProcessGuardInspectData ProtonPlusServicesCompatibilityProcessGuardInspectData;

struct _ProtonPlusServicesCompatibilityProcessOperationContextPrivate {
	ProtonPlusServicesCompatibilityProcessOperationKind _operation_kind;
	gchar* _installation_path;
	gchar* _launcher_family_id;
	gchar* _launcher_instance_id;
	gchar* _tool_target_family_id;
	gchar* _tool_target_id;
	gboolean _mutates_existing_destination;
};

struct _ProtonPlusServicesCompatibilityProcessRecordPrivate {
	gint _pid;
	gchar* _executable_path;
	GeeList* _argv;
	gboolean _executable_available;
	gboolean _argv_available;
	gchar* _inspection_error;
};

struct _ProtonPlusServicesCompatibilityProcessInspectionResultPrivate {
	ProtonPlusServicesCompatibilityProcessInspectionStatus _status;
	ProtonPlusServicesCompatibilityProcessRecord* _blocker;
	ProtonPlusServicesCompatibilityProcessMatchReason _blocker_reason;
	gchar* _inspection_error;
	GeeList* _processes;
};

struct _ProtonPlusServicesNativeCompatibilityProcessQueryBackendPrivate {
	gchar* proc_root;
};

struct _Block63Data {
	int _ref_count_;
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self;
	GSourceFunc callback;
	gpointer callback_target;
	GDestroyNotify callback_target_destroy_notify;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _result_;
	gpointer _async_data_;
};

struct _ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	Block63Data* _data63_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp0_;
	GThread* _tmp1_;
	GThread* _tmp2_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp3_;
};

struct _ProtonPlusServicesHostFlatpakProcessQuery {
	GObject parent_instance;
	ProtonPlusServicesHostFlatpakProcessQueryPrivate * priv;
};

struct _ProtonPlusServicesHostFlatpakProcessQueryClass {
	GObjectClass parent_class;
};

struct _ProtonPlusServicesHostFlatpakProcessQueryRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesHostFlatpakProcessQuery* self;
	ProtonPlusUtilsCommandResult* result;
	gchar** argv;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gint argv_length1;
	gint _argv_size_;
	GSubprocess* subprocess;
	gchar** _tmp6_;
	gint _tmp6__length1;
	GSubprocess* _tmp7_;
	GBytes* stdout_bytes;
	GBytes* stderr_bytes;
	GSubprocess* _tmp8_;
	GBytes* _tmp9_;
	GBytes* _tmp10_;
	gchar* _tmp11_;
	GBytes* _tmp12_;
	GBytes* _tmp13_;
	gsize _tmp14_;
	guint8* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* stdout;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GBytes* _tmp20_;
	GBytes* _tmp21_;
	gsize _tmp22_;
	guint8* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* stderr;
	gchar* _tmp26_;
	gint _tmp27_;
	GSubprocess* _tmp28_;
	GSubprocess* _tmp29_;
	gint exit_status;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	ProtonPlusUtilsCommandResult* _tmp32_;
	GError* e;
	GError* _tmp33_;
	const gchar* _tmp34_;
	ProtonPlusUtilsCommandResult* _tmp35_;
	GError* _inner_error0_;
};

struct _ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendPrivate {
	ProtonPlusServicesFlatpakHostProcessQuery* host_query;
};

struct _ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend* self;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	ProtonPlusUtilsCommandResult* command;
	ProtonPlusServicesFlatpakHostProcessQuery* _tmp0_;
	ProtonPlusUtilsCommandResult* _tmp1_;
	ProtonPlusUtilsCommandResult* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gchar* detail;
	ProtonPlusUtilsCommandResult* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	ProtonPlusUtilsCommandResult* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	ProtonPlusUtilsCommandResult* _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp22_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp23_;
	ProtonPlusUtilsCommandResult* _tmp24_;
	gint _tmp25_;
	gint _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp30_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp31_;
	GeeArrayList* records;
	GeeArrayList* _tmp32_;
	gboolean completed;
	ProtonPlusUtilsCommandResult* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	gchar** _tmp36_;
	gchar** _tmp37_;
	gchar** line_collection;
	gint line_collection_length1;
	gint _line_collection_size_;
	gint line_it;
	gchar* _tmp38_;
	gchar* line;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp41_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp42_;
	gchar** fields;
	const gchar* _tmp43_;
	gchar** _tmp44_;
	gchar** _tmp45_;
	gint fields_length1;
	gint _fields_size_;
	gint pid;
	gboolean _tmp46_;
	gboolean _tmp47_;
	gboolean _tmp48_;
	gchar** _tmp49_;
	gint _tmp49__length1;
	gchar** _tmp50_;
	gint _tmp50__length1;
	const gchar* _tmp51_;
	gchar** _tmp52_;
	gint _tmp52__length1;
	const gchar* _tmp53_;
	gint _tmp54_;
	gboolean _tmp55_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp56_;
	guint8* executable_bytes;
	guint8* _tmp57_;
	gint executable_bytes_length1;
	gint _executable_bytes_size_;
	gboolean executable_available;
	gchar** _tmp58_;
	gint _tmp58__length1;
	const gchar* _tmp59_;
	gboolean _tmp60_;
	gboolean _tmp61_;
	gchar** _tmp62_;
	gint _tmp62__length1;
	const gchar* _tmp63_;
	guint8* _tmp64_;
	gint _tmp65_;
	gboolean _tmp66_;
	guint8* _tmp67_;
	gint _tmp67__length1;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp68_;
	guint8* command_line;
	guint8* _tmp69_;
	gint command_line_length1;
	gint _command_line_size_;
	gboolean command_line_available;
	gchar** _tmp70_;
	gint _tmp70__length1;
	const gchar* _tmp71_;
	gboolean _tmp72_;
	gboolean _tmp73_;
	gboolean _tmp74_;
	gchar** _tmp75_;
	gint _tmp75__length1;
	const gchar* _tmp76_;
	guint8* _tmp77_;
	gint _tmp78_;
	gboolean _tmp79_;
	guint8* _tmp80_;
	gint _tmp80__length1;
	guint8* _tmp81_;
	gint _tmp81__length1;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp82_;
	gchar* _tmp83_;
	guint8* _tmp84_;
	gint _tmp84__length1;
	gchar* _tmp85_;
	gchar* _tmp86_;
	gchar* executable;
	gchar* _tmp87_;
	gboolean _tmp88_;
	const gchar* _tmp89_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp90_;
	gboolean _tmp91_;
	GeeArrayList* _tmp92_;
	const gchar* _tmp93_;
	guint8* _tmp94_;
	gint _tmp94__length1;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp95_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp96_;
	GeeArrayList* _tmp97_;
	guint8* _tmp98_;
	gint _tmp98__length1;
	gchar* _tmp99_;
	gchar* _tmp100_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp101_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp102_;
	GeeArrayList* _tmp103_;
	const gchar* _tmp104_;
	gchar* _tmp105_;
	gchar* _tmp106_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp107_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp108_;
	GeeArrayList* _tmp109_;
	gchar* _tmp110_;
	gchar* _tmp111_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp112_;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp113_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp114_;
	GeeArrayList* _tmp115_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp116_;
};

struct _ProtonPlusServicesCompatibilityProcessGuardPrivate {
	ProtonPlusServicesCompatibilityProcessQueryBackend* backend;
};

struct _ProtonPlusServicesCompatibilityProcessGuardInspectData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusServicesCompatibilityProcessGuard* self;
	ProtonPlusServicesCompatibilityProcessOperationContext* context;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	ProtonPlusServicesCompatibilityProcessInspectionResult* observation;
	ProtonPlusServicesCompatibilityProcessQueryBackend* _tmp0_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp1_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp2_;
	ProtonPlusServicesCompatibilityProcessInspectionStatus _tmp3_;
	ProtonPlusServicesCompatibilityProcessInspectionStatus _tmp4_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp5_;
	GeeList* _tmp6_;
	GeeList* _tmp7_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp8_;
};

static gint ProtonPlusServicesCompatibilityProcessOperationContext_private_offset;
static gpointer proton_plus_services_compatibility_process_operation_context_parent_class = NULL;
static gint ProtonPlusServicesCompatibilityProcessRecord_private_offset;
static gpointer proton_plus_services_compatibility_process_record_parent_class = NULL;
static gint ProtonPlusServicesCompatibilityProcessInspectionResult_private_offset;
static gpointer proton_plus_services_compatibility_process_inspection_result_parent_class = NULL;
static gint ProtonPlusServicesNativeCompatibilityProcessQueryBackend_private_offset;
static gpointer proton_plus_services_native_compatibility_process_query_backend_parent_class = NULL;
static ProtonPlusServicesCompatibilityProcessQueryBackendIface * proton_plus_services_native_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_parent_iface = NULL;
static gpointer proton_plus_services_host_flatpak_process_query_parent_class = NULL;
static ProtonPlusServicesFlatpakHostProcessQueryIface * proton_plus_services_host_flatpak_process_query_proton_plus_services_flatpak_host_process_query_parent_iface = NULL;
static gint ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend_private_offset;
static gpointer proton_plus_services_flatpak_compatibility_process_query_backend_parent_class = NULL;
static ProtonPlusServicesCompatibilityProcessQueryBackendIface * proton_plus_services_flatpak_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_parent_iface = NULL;
static gint ProtonPlusServicesCompatibilityProcessGuard_private_offset;
static gpointer proton_plus_services_compatibility_process_guard_parent_class = NULL;

static void proton_plus_services_compatibility_process_operation_context_set_operation_kind (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                      ProtonPlusServicesCompatibilityProcessOperationKind value);
static gchar* proton_plus_services_compatibility_process_operation_context_normalize_path (const gchar* path);
static void proton_plus_services_compatibility_process_operation_context_set_installation_path (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                         const gchar* value);
static void proton_plus_services_compatibility_process_operation_context_set_launcher_family_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                          const gchar* value);
static void proton_plus_services_compatibility_process_operation_context_set_launcher_instance_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                            const gchar* value);
static void proton_plus_services_compatibility_process_operation_context_set_tool_target_family_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                             const gchar* value);
static void proton_plus_services_compatibility_process_operation_context_set_tool_target_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                      const gchar* value);
static void proton_plus_services_compatibility_process_operation_context_set_mutates_existing_destination (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                                    gboolean value);
static void proton_plus_services_compatibility_process_operation_context_finalize (GObject * obj);
static GType proton_plus_services_compatibility_process_operation_context_get_type_once (void);
static void _vala_proton_plus_services_compatibility_process_operation_context_get_property (GObject * object,
                                                                                      guint property_id,
                                                                                      GValue * value,
                                                                                      GParamSpec * pspec);
static void _vala_proton_plus_services_compatibility_process_operation_context_set_property (GObject * object,
                                                                                      guint property_id,
                                                                                      const GValue * value,
                                                                                      GParamSpec * pspec);
static void proton_plus_services_compatibility_process_record_set_pid (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                gint value);
static void proton_plus_services_compatibility_process_record_set_executable_path (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                            const gchar* value);
static void proton_plus_services_compatibility_process_record_set_argv (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                 GeeList* value);
static void proton_plus_services_compatibility_process_record_set_executable_available (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                                 gboolean value);
static void proton_plus_services_compatibility_process_record_set_inspection_error (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                             const gchar* value);
static void proton_plus_services_compatibility_process_record_set_argv_available (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                           gboolean value);
static gchar* proton_plus_services_compatibility_process_record_decode_argument (guint8* bytes,
                                                                          gint bytes_length1,
                                                                          gint start,
                                                                          gint end);
VALA_EXTERN gboolean proton_plus_services_compatibility_process_record_cmdline_is_valid (guint8* command_line,
                                                                             gint command_line_length1);
static void proton_plus_services_compatibility_process_record_finalize (GObject * obj);
static GType proton_plus_services_compatibility_process_record_get_type_once (void);
static void _vala_proton_plus_services_compatibility_process_record_get_property (GObject * object,
                                                                           guint property_id,
                                                                           GValue * value,
                                                                           GParamSpec * pspec);
static void _vala_proton_plus_services_compatibility_process_record_set_property (GObject * object,
                                                                           guint property_id,
                                                                           const GValue * value,
                                                                           GParamSpec * pspec);
static ProtonPlusServicesCompatibilityProcessInspectionResult* proton_plus_services_compatibility_process_inspection_result_new (ProtonPlusServicesCompatibilityProcessInspectionStatus status,
                                                                                                                          ProtonPlusServicesCompatibilityProcessRecord* blocker,
                                                                                                                          ProtonPlusServicesCompatibilityProcessMatchReason blocker_reason,
                                                                                                                          const gchar* inspection_error,
                                                                                                                          GeeList* processes);
static ProtonPlusServicesCompatibilityProcessInspectionResult* proton_plus_services_compatibility_process_inspection_result_construct (GType object_type,
                                                                                                                                ProtonPlusServicesCompatibilityProcessInspectionStatus status,
                                                                                                                                ProtonPlusServicesCompatibilityProcessRecord* blocker,
                                                                                                                                ProtonPlusServicesCompatibilityProcessMatchReason blocker_reason,
                                                                                                                                const gchar* inspection_error,
                                                                                                                                GeeList* processes);
static void proton_plus_services_compatibility_process_inspection_result_set_status (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                              ProtonPlusServicesCompatibilityProcessInspectionStatus value);
static void proton_plus_services_compatibility_process_inspection_result_set_blocker (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                               ProtonPlusServicesCompatibilityProcessRecord* value);
static void proton_plus_services_compatibility_process_inspection_result_set_blocker_reason (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                                      ProtonPlusServicesCompatibilityProcessMatchReason value);
static void proton_plus_services_compatibility_process_inspection_result_set_inspection_error (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                                        const gchar* value);
static void proton_plus_services_compatibility_process_inspection_result_set_processes (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                                 GeeList* value);
VALA_EXTERN GeeList* proton_plus_services_compatibility_process_inspection_result_get_processes (ProtonPlusServicesCompatibilityProcessInspectionResult* self);
static void proton_plus_services_compatibility_process_inspection_result_finalize (GObject * obj);
static GType proton_plus_services_compatibility_process_inspection_result_get_type_once (void);
static void _vala_proton_plus_services_compatibility_process_inspection_result_get_property (GObject * object,
                                                                                      guint property_id,
                                                                                      GValue * value,
                                                                                      GParamSpec * pspec);
static void _vala_proton_plus_services_compatibility_process_inspection_result_set_property (GObject * object,
                                                                                      guint property_id,
                                                                                      const GValue * value,
                                                                                      GParamSpec * pspec);
static GType proton_plus_services_compatibility_process_query_backend_get_type_once (void);
static void proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_data_free (gpointer _data);
static void proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes (ProtonPlusServicesCompatibilityProcessQueryBackend* base,
                                                                                             GAsyncReadyCallback _callback_,
                                                                                             gpointer _user_data_);
static gboolean proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co (ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData* _data_);
static Block63Data* block63_data_ref (Block63Data* _data63_);
static void block63_data_unref (void * _userdata_);
static gboolean _proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co_gsource_func (gpointer self);
static void __lambda20_ (Block63Data* _data63_);
static ProtonPlusServicesCompatibilityProcessInspectionResult* proton_plus_services_native_compatibility_process_query_backend_inspect_processes_sync (ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self);
static gpointer ___lambda20__gthread_func (gpointer self);
static gboolean proton_plus_services_native_compatibility_process_query_backend_process_has_disappeared (const gchar* process_root);
static gchar* proton_plus_services_native_compatibility_process_query_backend_process_read_failure_message (gint pid,
                                                                                                     const gchar* field,
                                                                                                     GError* _error_);
static guint8* _vala_array_dup52 (guint8* self,
                           gssize length);
static void proton_plus_services_native_compatibility_process_query_backend_finalize (GObject * obj);
static GType proton_plus_services_native_compatibility_process_query_backend_get_type_once (void);
static GType proton_plus_services_flatpak_host_process_query_get_type_once (void);
VALA_EXTERN GType proton_plus_services_host_flatpak_process_query_get_type (void) G_GNUC_CONST ;
static void proton_plus_services_host_flatpak_process_query_real_run_data_free (gpointer _data);
static void proton_plus_services_host_flatpak_process_query_real_run (ProtonPlusServicesFlatpakHostProcessQuery* base,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_);
static gboolean proton_plus_services_host_flatpak_process_query_real_run_co (ProtonPlusServicesHostFlatpakProcessQueryRunData* _data_);
static void proton_plus_services_host_flatpak_process_query_run_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_);
VALA_EXTERN ProtonPlusServicesHostFlatpakProcessQuery* proton_plus_services_host_flatpak_process_query_new (void);
VALA_EXTERN ProtonPlusServicesHostFlatpakProcessQuery* proton_plus_services_host_flatpak_process_query_construct (GType object_type);
static GType proton_plus_services_host_flatpak_process_query_get_type_once (void);
static void proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes_data_free (gpointer _data);
static void proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes (ProtonPlusServicesCompatibilityProcessQueryBackend* base,
                                                                                              GAsyncReadyCallback _callback_,
                                                                                              gpointer _user_data_);
static gboolean proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes_co (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData* _data_);
static void proton_plus_services_flatpak_compatibility_process_query_backend_inspect_processes_ready (GObject* source_object,
                                                                                               GAsyncResult* _res_,
                                                                                               gpointer _user_data_);
static gboolean proton_plus_services_flatpak_compatibility_process_query_backend_decode_base64_field (const gchar* encoded,
                                                                                               guint8** decoded,
                                                                                               gint* decoded_length1);
static void proton_plus_services_flatpak_compatibility_process_query_backend_finalize (GObject * obj);
static GType proton_plus_services_flatpak_compatibility_process_query_backend_get_type_once (void);
static void proton_plus_services_compatibility_process_guard_inspect_data_free (gpointer _data);
static gboolean proton_plus_services_compatibility_process_guard_inspect_co (ProtonPlusServicesCompatibilityProcessGuardInspectData* _data_);
static void proton_plus_services_compatibility_process_guard_inspect_ready (GObject* source_object,
                                                                     GAsyncResult* _res_,
                                                                     gpointer _user_data_);
static ProtonPlusServicesCompatibilityProcessMatchReason proton_plus_services_compatibility_process_guard_target_association_reason (ProtonPlusServicesCompatibilityProcessRecord* process,
                                                                                                                              const gchar* installation_path);
static gboolean proton_plus_services_compatibility_process_guard_incomplete_evidence_could_associate_with_target (ProtonPlusServicesCompatibilityProcessRecord* process,
                                                                                                           const gchar* installation_path);
static gboolean proton_plus_services_compatibility_process_guard_is_runner_token (const gchar* value);
static gboolean proton_plus_services_compatibility_process_guard_path_is_within (const gchar* candidate,
                                                                          const gchar* target);
static gboolean proton_plus_services_compatibility_process_guard_executable_can_launch_runner_argument (const gchar* executable);
static void proton_plus_services_compatibility_process_guard_finalize (GObject * obj);
static GType proton_plus_services_compatibility_process_guard_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 gssize _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GType
proton_plus_services_compatibility_process_inspection_status_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_CLEAR, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_CLEAR", "clear"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_ACTIVE, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_ACTIVE", "active"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_UNKNOWN, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_UNKNOWN", "unknown"}, {0, NULL, NULL}};
	GType proton_plus_services_compatibility_process_inspection_status_type_id;
	proton_plus_services_compatibility_process_inspection_status_type_id = g_enum_register_static ("ProtonPlusServicesCompatibilityProcessInspectionStatus", values);
	return proton_plus_services_compatibility_process_inspection_status_type_id;
}

GType
proton_plus_services_compatibility_process_inspection_status_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_inspection_status_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_inspection_status_type_id__once)) {
		GType proton_plus_services_compatibility_process_inspection_status_type_id;
		proton_plus_services_compatibility_process_inspection_status_type_id = proton_plus_services_compatibility_process_inspection_status_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_inspection_status_type_id__once, proton_plus_services_compatibility_process_inspection_status_type_id);
	}
	return proton_plus_services_compatibility_process_inspection_status_type_id__once;
}

static GType
proton_plus_services_compatibility_process_operation_kind_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_INSTALL, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_INSTALL", "install"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_UPDATE, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_UPDATE", "update"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_REPLACEMENT, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_REPLACEMENT", "replacement"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_REMOVAL, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_KIND_REMOVAL", "removal"}, {0, NULL, NULL}};
	GType proton_plus_services_compatibility_process_operation_kind_type_id;
	proton_plus_services_compatibility_process_operation_kind_type_id = g_enum_register_static ("ProtonPlusServicesCompatibilityProcessOperationKind", values);
	return proton_plus_services_compatibility_process_operation_kind_type_id;
}

GType
proton_plus_services_compatibility_process_operation_kind_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_operation_kind_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_operation_kind_type_id__once)) {
		GType proton_plus_services_compatibility_process_operation_kind_type_id;
		proton_plus_services_compatibility_process_operation_kind_type_id = proton_plus_services_compatibility_process_operation_kind_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_operation_kind_type_id__once, proton_plus_services_compatibility_process_operation_kind_type_id);
	}
	return proton_plus_services_compatibility_process_operation_kind_type_id__once;
}

static GType
proton_plus_services_compatibility_process_match_reason_get_type_once (void)
{
	static const GEnumValue values[] = {{PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE", "none"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_EXECUTABLE_IN_TARGET, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_EXECUTABLE_IN_TARGET", "executable-in-target"}, {PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_ARGUMENT_PATH_IN_TARGET, "PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_ARGUMENT_PATH_IN_TARGET", "argument-path-in-target"}, {0, NULL, NULL}};
	GType proton_plus_services_compatibility_process_match_reason_type_id;
	proton_plus_services_compatibility_process_match_reason_type_id = g_enum_register_static ("ProtonPlusServicesCompatibilityProcessMatchReason", values);
	return proton_plus_services_compatibility_process_match_reason_type_id;
}

GType
proton_plus_services_compatibility_process_match_reason_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_match_reason_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_match_reason_type_id__once)) {
		GType proton_plus_services_compatibility_process_match_reason_type_id;
		proton_plus_services_compatibility_process_match_reason_type_id = proton_plus_services_compatibility_process_match_reason_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_match_reason_type_id__once, proton_plus_services_compatibility_process_match_reason_type_id);
	}
	return proton_plus_services_compatibility_process_match_reason_type_id__once;
}

static inline gpointer
proton_plus_services_compatibility_process_operation_context_get_instance_private (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesCompatibilityProcessOperationContext_private_offset);
}

ProtonPlusServicesCompatibilityProcessOperationContext*
proton_plus_services_compatibility_process_operation_context_construct (GType object_type,
                                                                        ProtonPlusServicesCompatibilityProcessOperationKind operation_kind,
                                                                        const gchar* installation_path,
                                                                        const gchar* launcher_family_id,
                                                                        const gchar* launcher_instance_id,
                                                                        const gchar* tool_target_family_id,
                                                                        const gchar* tool_target_id,
                                                                        gboolean mutates_existing_destination)
{
	ProtonPlusServicesCompatibilityProcessOperationContext * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (installation_path != NULL, NULL);
	g_return_val_if_fail (launcher_family_id != NULL, NULL);
	g_return_val_if_fail (launcher_instance_id != NULL, NULL);
	g_return_val_if_fail (tool_target_family_id != NULL, NULL);
	g_return_val_if_fail (tool_target_id != NULL, NULL);
	self = (ProtonPlusServicesCompatibilityProcessOperationContext*) g_object_new (object_type, NULL);
	proton_plus_services_compatibility_process_operation_context_set_operation_kind (self, operation_kind);
	_tmp0_ = proton_plus_services_compatibility_process_operation_context_normalize_path (installation_path);
	_tmp1_ = _tmp0_;
	proton_plus_services_compatibility_process_operation_context_set_installation_path (self, _tmp1_);
	_g_free0 (_tmp1_);
	proton_plus_services_compatibility_process_operation_context_set_launcher_family_id (self, launcher_family_id);
	proton_plus_services_compatibility_process_operation_context_set_launcher_instance_id (self, launcher_instance_id);
	proton_plus_services_compatibility_process_operation_context_set_tool_target_family_id (self, tool_target_family_id);
	proton_plus_services_compatibility_process_operation_context_set_tool_target_id (self, tool_target_id);
	proton_plus_services_compatibility_process_operation_context_set_mutates_existing_destination (self, mutates_existing_destination);
	return self;
}

ProtonPlusServicesCompatibilityProcessOperationContext*
proton_plus_services_compatibility_process_operation_context_new (ProtonPlusServicesCompatibilityProcessOperationKind operation_kind,
                                                                  const gchar* installation_path,
                                                                  const gchar* launcher_family_id,
                                                                  const gchar* launcher_instance_id,
                                                                  const gchar* tool_target_family_id,
                                                                  const gchar* tool_target_id,
                                                                  gboolean mutates_existing_destination)
{
	return proton_plus_services_compatibility_process_operation_context_construct (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_OPERATION_CONTEXT, operation_kind, installation_path, launcher_family_id, launcher_instance_id, tool_target_family_id, tool_target_id, mutates_existing_destination);
}

static gchar*
proton_plus_services_compatibility_process_operation_context_normalize_path (const gchar* path)
{
	gchar* canonical = NULL;
	gchar* _tmp0_;
	gchar* resolved = NULL;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = g_canonicalize_filename (path, NULL);
	canonical = _tmp0_;
	_tmp1_ = canonical;
	_tmp2_ = realpath (_tmp1_, NULL);
	resolved = _tmp2_;
	_tmp4_ = resolved;
	_tmp3_ = _tmp4_;
	if (_tmp3_ == NULL) {
		const gchar* _tmp5_;
		_tmp5_ = canonical;
		_tmp3_ = _tmp5_;
	}
	_tmp6_ = g_strdup (_tmp3_);
	result = _tmp6_;
	_g_free0 (resolved);
	_g_free0 (canonical);
	return result;
}

ProtonPlusServicesCompatibilityProcessOperationKind
proton_plus_services_compatibility_process_operation_context_get_operation_kind (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	ProtonPlusServicesCompatibilityProcessOperationKind result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_operation_kind;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_operation_kind (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                 ProtonPlusServicesCompatibilityProcessOperationKind value)
{
	ProtonPlusServicesCompatibilityProcessOperationKind old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_operation_kind (self);
	if (old_value != value) {
		self->priv->_operation_kind = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_OPERATION_KIND_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_operation_context_get_installation_path (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_installation_path;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_installation_path (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_installation_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_installation_path);
		self->priv->_installation_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_INSTALLATION_PATH_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_operation_context_get_launcher_family_id (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher_family_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_launcher_family_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_launcher_family_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_launcher_family_id);
		self->priv->_launcher_family_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_FAMILY_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_operation_context_get_launcher_instance_id (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher_instance_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_launcher_instance_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_launcher_instance_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_launcher_instance_id);
		self->priv->_launcher_instance_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_INSTANCE_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_operation_context_get_tool_target_family_id (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool_target_family_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_tool_target_family_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_tool_target_family_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_tool_target_family_id);
		self->priv->_tool_target_family_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_FAMILY_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_operation_context_get_tool_target_id (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tool_target_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_tool_target_id (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_tool_target_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_tool_target_id);
		self->priv->_tool_target_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_ID_PROPERTY]);
	}
}

gboolean
proton_plus_services_compatibility_process_operation_context_get_mutates_existing_destination (ProtonPlusServicesCompatibilityProcessOperationContext* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_mutates_existing_destination;
	return result;
}

static void
proton_plus_services_compatibility_process_operation_context_set_mutates_existing_destination (ProtonPlusServicesCompatibilityProcessOperationContext* self,
                                                                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_operation_context_get_mutates_existing_destination (self);
	if (old_value != value) {
		self->priv->_mutates_existing_destination = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_MUTATES_EXISTING_DESTINATION_PROPERTY]);
	}
}

static void
proton_plus_services_compatibility_process_operation_context_class_init (ProtonPlusServicesCompatibilityProcessOperationContextClass * klass,
                                                                         gpointer klass_data)
{
	proton_plus_services_compatibility_process_operation_context_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesCompatibilityProcessOperationContext_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_services_compatibility_process_operation_context_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_services_compatibility_process_operation_context_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_compatibility_process_operation_context_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_OPERATION_KIND_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_OPERATION_KIND_PROPERTY] = g_param_spec_enum ("operation-kind", "operation-kind", "operation-kind", PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_OPERATION_KIND, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_INSTALLATION_PATH_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_INSTALLATION_PATH_PROPERTY] = g_param_spec_string ("installation-path", "installation-path", "installation-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_FAMILY_ID_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_FAMILY_ID_PROPERTY] = g_param_spec_string ("launcher-family-id", "launcher-family-id", "launcher-family-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_INSTANCE_ID_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_INSTANCE_ID_PROPERTY] = g_param_spec_string ("launcher-instance-id", "launcher-instance-id", "launcher-instance-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_FAMILY_ID_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_FAMILY_ID_PROPERTY] = g_param_spec_string ("tool-target-family-id", "tool-target-family-id", "tool-target-family-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_ID_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_ID_PROPERTY] = g_param_spec_string ("tool-target-id", "tool-target-id", "tool-target-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_MUTATES_EXISTING_DESTINATION_PROPERTY, proton_plus_services_compatibility_process_operation_context_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_MUTATES_EXISTING_DESTINATION_PROPERTY] = g_param_spec_boolean ("mutates-existing-destination", "mutates-existing-destination", "mutates-existing-destination", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_services_compatibility_process_operation_context_instance_init (ProtonPlusServicesCompatibilityProcessOperationContext * self,
                                                                            gpointer klass)
{
	self->priv = proton_plus_services_compatibility_process_operation_context_get_instance_private (self);
}

static void
proton_plus_services_compatibility_process_operation_context_finalize (GObject * obj)
{
	ProtonPlusServicesCompatibilityProcessOperationContext * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_OPERATION_CONTEXT, ProtonPlusServicesCompatibilityProcessOperationContext);
	_g_free0 (self->priv->_installation_path);
	_g_free0 (self->priv->_launcher_family_id);
	_g_free0 (self->priv->_launcher_instance_id);
	_g_free0 (self->priv->_tool_target_family_id);
	_g_free0 (self->priv->_tool_target_id);
	G_OBJECT_CLASS (proton_plus_services_compatibility_process_operation_context_parent_class)->finalize (obj);
}

static GType
proton_plus_services_compatibility_process_operation_context_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesCompatibilityProcessOperationContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_compatibility_process_operation_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesCompatibilityProcessOperationContext), 0, (GInstanceInitFunc) proton_plus_services_compatibility_process_operation_context_instance_init, NULL };
	GType proton_plus_services_compatibility_process_operation_context_type_id;
	proton_plus_services_compatibility_process_operation_context_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesCompatibilityProcessOperationContext", &g_define_type_info, 0);
	ProtonPlusServicesCompatibilityProcessOperationContext_private_offset = g_type_add_instance_private (proton_plus_services_compatibility_process_operation_context_type_id, sizeof (ProtonPlusServicesCompatibilityProcessOperationContextPrivate));
	return proton_plus_services_compatibility_process_operation_context_type_id;
}

GType
proton_plus_services_compatibility_process_operation_context_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_operation_context_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_operation_context_type_id__once)) {
		GType proton_plus_services_compatibility_process_operation_context_type_id;
		proton_plus_services_compatibility_process_operation_context_type_id = proton_plus_services_compatibility_process_operation_context_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_operation_context_type_id__once, proton_plus_services_compatibility_process_operation_context_type_id);
	}
	return proton_plus_services_compatibility_process_operation_context_type_id__once;
}

static void
_vala_proton_plus_services_compatibility_process_operation_context_get_property (GObject * object,
                                                                                 guint property_id,
                                                                                 GValue * value,
                                                                                 GParamSpec * pspec)
{
	ProtonPlusServicesCompatibilityProcessOperationContext * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_OPERATION_CONTEXT, ProtonPlusServicesCompatibilityProcessOperationContext);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_OPERATION_KIND_PROPERTY:
		g_value_set_enum (value, proton_plus_services_compatibility_process_operation_context_get_operation_kind (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_INSTALLATION_PATH_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_operation_context_get_installation_path (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_FAMILY_ID_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_operation_context_get_launcher_family_id (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_INSTANCE_ID_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_operation_context_get_launcher_instance_id (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_FAMILY_ID_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_operation_context_get_tool_target_family_id (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_ID_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_operation_context_get_tool_target_id (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_MUTATES_EXISTING_DESTINATION_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_compatibility_process_operation_context_get_mutates_existing_destination (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_services_compatibility_process_operation_context_set_property (GObject * object,
                                                                                 guint property_id,
                                                                                 const GValue * value,
                                                                                 GParamSpec * pspec)
{
	ProtonPlusServicesCompatibilityProcessOperationContext * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_OPERATION_CONTEXT, ProtonPlusServicesCompatibilityProcessOperationContext);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_OPERATION_KIND_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_operation_kind (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_INSTALLATION_PATH_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_installation_path (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_FAMILY_ID_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_launcher_family_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_LAUNCHER_INSTANCE_ID_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_launcher_instance_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_FAMILY_ID_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_tool_target_family_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_TOOL_TARGET_ID_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_tool_target_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_OPERATION_CONTEXT_MUTATES_EXISTING_DESTINATION_PROPERTY:
		proton_plus_services_compatibility_process_operation_context_set_mutates_existing_destination (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_services_compatibility_process_record_get_instance_private (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesCompatibilityProcessRecord_private_offset);
}

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

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_construct (GType object_type,
                                                             gint pid,
                                                             const gchar* executable_path,
                                                             GeeList* argv)
{
	ProtonPlusServicesCompatibilityProcessRecord * self = NULL;
	GeeList* _tmp0_ = NULL;
	GeeList* _tmp1_;
	g_return_val_if_fail (executable_path != NULL, NULL);
	self = (ProtonPlusServicesCompatibilityProcessRecord*) g_object_new (object_type, NULL);
	proton_plus_services_compatibility_process_record_set_pid (self, pid);
	proton_plus_services_compatibility_process_record_set_executable_path (self, executable_path);
	_tmp1_ = _g_object_ref0 (argv);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		GeeArrayList* _tmp2_;
		_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (GeeList*) _tmp2_;
	}
	proton_plus_services_compatibility_process_record_set_argv (self, _tmp0_);
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_new (gint pid,
                                                       const gchar* executable_path,
                                                       GeeList* argv)
{
	return proton_plus_services_compatibility_process_record_construct (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, pid, executable_path, argv);
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_construct_from_cmdline_bytes (GType object_type,
                                                                                gint pid,
                                                                                const gchar* executable_path,
                                                                                guint8* command_line,
                                                                                gint command_line_length1)
{
	ProtonPlusServicesCompatibilityProcessRecord * self = NULL;
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	g_return_val_if_fail (executable_path != NULL, NULL);
	_tmp0_ = proton_plus_services_compatibility_process_record_decode_cmdline (command_line, (gint) command_line_length1);
	_tmp1_ = _tmp0_;
	self = (ProtonPlusServicesCompatibilityProcessRecord*) proton_plus_services_compatibility_process_record_construct (object_type, pid, executable_path, _tmp1_);
	_g_object_unref0 (_tmp1_);
	return self;
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_new_from_cmdline_bytes (gint pid,
                                                                          const gchar* executable_path,
                                                                          guint8* command_line,
                                                                          gint command_line_length1)
{
	return proton_plus_services_compatibility_process_record_construct_from_cmdline_bytes (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, pid, executable_path, command_line, command_line_length1);
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_construct_with_unreadable_executable (GType object_type,
                                                                                        gint pid,
                                                                                        guint8* command_line,
                                                                                        gint command_line_length1,
                                                                                        const gchar* inspection_error)
{
	ProtonPlusServicesCompatibilityProcessRecord * self = NULL;
	GeeList* _tmp0_;
	GeeList* _tmp1_;
	g_return_val_if_fail (inspection_error != NULL, NULL);
	_tmp0_ = proton_plus_services_compatibility_process_record_decode_cmdline (command_line, (gint) command_line_length1);
	_tmp1_ = _tmp0_;
	self = (ProtonPlusServicesCompatibilityProcessRecord*) proton_plus_services_compatibility_process_record_construct (object_type, pid, "", _tmp1_);
	_g_object_unref0 (_tmp1_);
	proton_plus_services_compatibility_process_record_set_executable_available (self, FALSE);
	proton_plus_services_compatibility_process_record_set_inspection_error (self, inspection_error);
	return self;
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_new_with_unreadable_executable (gint pid,
                                                                                  guint8* command_line,
                                                                                  gint command_line_length1,
                                                                                  const gchar* inspection_error)
{
	return proton_plus_services_compatibility_process_record_construct_with_unreadable_executable (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, pid, command_line, command_line_length1, inspection_error);
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_construct_with_unreadable_argv (GType object_type,
                                                                                  gint pid,
                                                                                  const gchar* executable_path,
                                                                                  const gchar* inspection_error)
{
	ProtonPlusServicesCompatibilityProcessRecord * self = NULL;
	g_return_val_if_fail (executable_path != NULL, NULL);
	g_return_val_if_fail (inspection_error != NULL, NULL);
	self = (ProtonPlusServicesCompatibilityProcessRecord*) proton_plus_services_compatibility_process_record_construct (object_type, pid, executable_path, NULL);
	proton_plus_services_compatibility_process_record_set_argv_available (self, FALSE);
	proton_plus_services_compatibility_process_record_set_inspection_error (self, inspection_error);
	return self;
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_new_with_unreadable_argv (gint pid,
                                                                            const gchar* executable_path,
                                                                            const gchar* inspection_error)
{
	return proton_plus_services_compatibility_process_record_construct_with_unreadable_argv (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, pid, executable_path, inspection_error);
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_construct_with_unreadable_metadata (GType object_type,
                                                                                      gint pid,
                                                                                      const gchar* inspection_error)
{
	ProtonPlusServicesCompatibilityProcessRecord * self = NULL;
	g_return_val_if_fail (inspection_error != NULL, NULL);
	self = (ProtonPlusServicesCompatibilityProcessRecord*) proton_plus_services_compatibility_process_record_construct (object_type, pid, "", NULL);
	proton_plus_services_compatibility_process_record_set_executable_available (self, FALSE);
	proton_plus_services_compatibility_process_record_set_argv_available (self, FALSE);
	proton_plus_services_compatibility_process_record_set_inspection_error (self, inspection_error);
	return self;
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_record_new_with_unreadable_metadata (gint pid,
                                                                                const gchar* inspection_error)
{
	return proton_plus_services_compatibility_process_record_construct_with_unreadable_metadata (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, pid, inspection_error);
}

gboolean
proton_plus_services_compatibility_process_record_has_complete_metadata (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_executable_available;
	if (_tmp1_) {
		gboolean _tmp2_;
		_tmp2_ = self->priv->_argv_available;
		_tmp0_ = _tmp2_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

GeeList*
proton_plus_services_compatibility_process_record_decode_cmdline (guint8* command_line,
                                                                  gint command_line_length1)
{
	GeeArrayList* _result_ = NULL;
	GeeArrayList* _tmp0_;
	gint start = 0;
	GeeList* result;
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_result_ = _tmp0_;
	start = 0;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				guint8 _tmp3_;
				GeeArrayList* _tmp4_;
				gchar* _tmp5_;
				gchar* _tmp6_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = index;
					index = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(index < command_line_length1)) {
					break;
				}
				_tmp3_ = command_line[index];
				if (((gint) _tmp3_) != 0) {
					continue;
				}
				_tmp4_ = _result_;
				_tmp5_ = proton_plus_services_compatibility_process_record_decode_argument (command_line, (gint) command_line_length1, start, index);
				_tmp6_ = _tmp5_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp4_, _tmp6_);
				_g_free0 (_tmp6_);
				start = index + 1;
			}
		}
	}
	if (start < command_line_length1) {
		GeeArrayList* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp7_ = _result_;
		_tmp8_ = proton_plus_services_compatibility_process_record_decode_argument (command_line, (gint) command_line_length1, start, command_line_length1);
		_tmp9_ = _tmp8_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, _tmp9_);
		_g_free0 (_tmp9_);
	}
	result = (GeeList*) _result_;
	return result;
}

gboolean
proton_plus_services_compatibility_process_record_cmdline_is_valid (guint8* command_line,
                                                                    gint command_line_length1)
{
	gint start = 0;
	gboolean _tmp6_ = FALSE;
	gboolean result;
	start = 0;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				guint8 _tmp2_;
				gchar* _tmp3_;
				gchar* _tmp4_;
				gboolean _tmp5_;
				if (!_tmp0_) {
					gint _tmp1_;
					_tmp1_ = index;
					index = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(index < command_line_length1)) {
					break;
				}
				_tmp2_ = command_line[index];
				if (((gint) _tmp2_) != 0) {
					continue;
				}
				_tmp3_ = proton_plus_services_compatibility_process_record_decode_argument (command_line, (gint) command_line_length1, start, index);
				_tmp4_ = _tmp3_;
				_tmp5_ = !g_utf8_validate (_tmp4_, (gssize) -1, NULL);
				_g_free0 (_tmp4_);
				if (_tmp5_) {
					result = FALSE;
					return result;
				}
				start = index + 1;
			}
		}
	}
	if (start >= command_line_length1) {
		_tmp6_ = TRUE;
	} else {
		gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp7_ = proton_plus_services_compatibility_process_record_decode_argument (command_line, (gint) command_line_length1, start, command_line_length1);
		_tmp8_ = _tmp7_;
		_tmp6_ = g_utf8_validate (_tmp8_, (gssize) -1, NULL);
		_g_free0 (_tmp8_);
	}
	result = _tmp6_;
	return result;
}

static gchar*
proton_plus_services_compatibility_process_record_decode_argument (guint8* bytes,
                                                                   gint bytes_length1,
                                                                   gint start,
                                                                   gint end)
{
	GString* value = NULL;
	GString* _tmp0_;
	GString* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* result;
	_tmp0_ = g_string_new ("");
	value = _tmp0_;
	{
		gint index = 0;
		index = start;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				GString* _tmp3_;
				guint8 _tmp4_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = index;
					index = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(index < end)) {
					break;
				}
				_tmp3_ = value;
				_tmp4_ = bytes[index];
				g_string_append_c (_tmp3_, (gchar) _tmp4_);
			}
		}
	}
	_tmp5_ = value;
	_tmp6_ = _tmp5_->str;
	_tmp7_ = g_strdup (_tmp6_);
	result = _tmp7_;
	_g_string_free0 (value);
	return result;
}

gint
proton_plus_services_compatibility_process_record_get_pid (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_pid;
	return result;
}

static void
proton_plus_services_compatibility_process_record_set_pid (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                           gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_record_get_pid (self);
	if (old_value != value) {
		self->priv->_pid = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_PID_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_record_get_executable_path (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_executable_path;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_record_set_executable_path (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_record_get_executable_path (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_executable_path);
		self->priv->_executable_path = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_PATH_PROPERTY]);
	}
}

GeeList*
proton_plus_services_compatibility_process_record_get_argv (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_argv;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_record_set_argv (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                            GeeList* value)
{
	GeeList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_record_get_argv (self);
	if (old_value != value) {
		GeeList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_argv);
		self->priv->_argv = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_PROPERTY]);
	}
}

gboolean
proton_plus_services_compatibility_process_record_get_executable_available (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_executable_available;
	return result;
}

static void
proton_plus_services_compatibility_process_record_set_executable_available (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_record_get_executable_available (self);
	if (old_value != value) {
		self->priv->_executable_available = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_AVAILABLE_PROPERTY]);
	}
}

gboolean
proton_plus_services_compatibility_process_record_get_argv_available (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_argv_available;
	return result;
}

static void
proton_plus_services_compatibility_process_record_set_argv_available (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_record_get_argv_available (self);
	if (old_value != value) {
		self->priv->_argv_available = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_AVAILABLE_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_record_get_inspection_error (ProtonPlusServicesCompatibilityProcessRecord* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_inspection_error;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_record_set_inspection_error (ProtonPlusServicesCompatibilityProcessRecord* self,
                                                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_record_get_inspection_error (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_inspection_error);
		self->priv->_inspection_error = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_INSPECTION_ERROR_PROPERTY]);
	}
}

static void
proton_plus_services_compatibility_process_record_class_init (ProtonPlusServicesCompatibilityProcessRecordClass * klass,
                                                              gpointer klass_data)
{
	proton_plus_services_compatibility_process_record_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesCompatibilityProcessRecord_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_services_compatibility_process_record_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_services_compatibility_process_record_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_compatibility_process_record_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_PID_PROPERTY, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_PID_PROPERTY] = g_param_spec_int ("pid", "pid", "pid", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_PATH_PROPERTY, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_PATH_PROPERTY] = g_param_spec_string ("executable-path", "executable-path", "executable-path", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_PROPERTY, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_PROPERTY] = g_param_spec_object ("argv", "argv", "argv", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_AVAILABLE_PROPERTY, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_AVAILABLE_PROPERTY] = g_param_spec_boolean ("executable-available", "executable-available", "executable-available", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_AVAILABLE_PROPERTY, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_AVAILABLE_PROPERTY] = g_param_spec_boolean ("argv-available", "argv-available", "argv-available", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_INSPECTION_ERROR_PROPERTY, proton_plus_services_compatibility_process_record_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_INSPECTION_ERROR_PROPERTY] = g_param_spec_string ("inspection-error", "inspection-error", "inspection-error", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_services_compatibility_process_record_instance_init (ProtonPlusServicesCompatibilityProcessRecord * self,
                                                                 gpointer klass)
{
	self->priv = proton_plus_services_compatibility_process_record_get_instance_private (self);
	self->priv->_executable_available = TRUE;
	self->priv->_argv_available = TRUE;
	self->priv->_inspection_error = NULL;
}

static void
proton_plus_services_compatibility_process_record_finalize (GObject * obj)
{
	ProtonPlusServicesCompatibilityProcessRecord * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, ProtonPlusServicesCompatibilityProcessRecord);
	_g_free0 (self->priv->_executable_path);
	_g_object_unref0 (self->priv->_argv);
	_g_free0 (self->priv->_inspection_error);
	G_OBJECT_CLASS (proton_plus_services_compatibility_process_record_parent_class)->finalize (obj);
}

static GType
proton_plus_services_compatibility_process_record_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesCompatibilityProcessRecordClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_compatibility_process_record_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesCompatibilityProcessRecord), 0, (GInstanceInitFunc) proton_plus_services_compatibility_process_record_instance_init, NULL };
	GType proton_plus_services_compatibility_process_record_type_id;
	proton_plus_services_compatibility_process_record_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesCompatibilityProcessRecord", &g_define_type_info, 0);
	ProtonPlusServicesCompatibilityProcessRecord_private_offset = g_type_add_instance_private (proton_plus_services_compatibility_process_record_type_id, sizeof (ProtonPlusServicesCompatibilityProcessRecordPrivate));
	return proton_plus_services_compatibility_process_record_type_id;
}

GType
proton_plus_services_compatibility_process_record_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_record_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_record_type_id__once)) {
		GType proton_plus_services_compatibility_process_record_type_id;
		proton_plus_services_compatibility_process_record_type_id = proton_plus_services_compatibility_process_record_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_record_type_id__once, proton_plus_services_compatibility_process_record_type_id);
	}
	return proton_plus_services_compatibility_process_record_type_id__once;
}

static void
_vala_proton_plus_services_compatibility_process_record_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec)
{
	ProtonPlusServicesCompatibilityProcessRecord * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, ProtonPlusServicesCompatibilityProcessRecord);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_PID_PROPERTY:
		g_value_set_int (value, proton_plus_services_compatibility_process_record_get_pid (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_PATH_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_record_get_executable_path (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_PROPERTY:
		g_value_set_object (value, proton_plus_services_compatibility_process_record_get_argv (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_AVAILABLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_compatibility_process_record_get_executable_available (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_AVAILABLE_PROPERTY:
		g_value_set_boolean (value, proton_plus_services_compatibility_process_record_get_argv_available (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_INSPECTION_ERROR_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_record_get_inspection_error (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_services_compatibility_process_record_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec)
{
	ProtonPlusServicesCompatibilityProcessRecord * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, ProtonPlusServicesCompatibilityProcessRecord);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_PID_PROPERTY:
		proton_plus_services_compatibility_process_record_set_pid (self, g_value_get_int (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_PATH_PROPERTY:
		proton_plus_services_compatibility_process_record_set_executable_path (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_PROPERTY:
		proton_plus_services_compatibility_process_record_set_argv (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_EXECUTABLE_AVAILABLE_PROPERTY:
		proton_plus_services_compatibility_process_record_set_executable_available (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_ARGV_AVAILABLE_PROPERTY:
		proton_plus_services_compatibility_process_record_set_argv_available (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_RECORD_INSPECTION_ERROR_PROPERTY:
		proton_plus_services_compatibility_process_record_set_inspection_error (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
proton_plus_services_compatibility_process_inspection_result_get_instance_private (ProtonPlusServicesCompatibilityProcessInspectionResult* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesCompatibilityProcessInspectionResult_private_offset);
}

static ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_inspection_result_construct (GType object_type,
                                                                        ProtonPlusServicesCompatibilityProcessInspectionStatus status,
                                                                        ProtonPlusServicesCompatibilityProcessRecord* blocker,
                                                                        ProtonPlusServicesCompatibilityProcessMatchReason blocker_reason,
                                                                        const gchar* inspection_error,
                                                                        GeeList* processes)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult * self = NULL;
	GeeList* _tmp0_ = NULL;
	GeeList* _tmp1_;
	self = (ProtonPlusServicesCompatibilityProcessInspectionResult*) g_object_new (object_type, NULL);
	proton_plus_services_compatibility_process_inspection_result_set_status (self, status);
	proton_plus_services_compatibility_process_inspection_result_set_blocker (self, blocker);
	proton_plus_services_compatibility_process_inspection_result_set_blocker_reason (self, blocker_reason);
	proton_plus_services_compatibility_process_inspection_result_set_inspection_error (self, inspection_error);
	_tmp1_ = _g_object_ref0 (processes);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		GeeArrayList* _tmp2_;
		_tmp2_ = gee_array_list_new (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (GeeList*) _tmp2_;
	}
	proton_plus_services_compatibility_process_inspection_result_set_processes (self, _tmp0_);
	_g_object_unref0 (_tmp0_);
	return self;
}

static ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_inspection_result_new (ProtonPlusServicesCompatibilityProcessInspectionStatus status,
                                                                  ProtonPlusServicesCompatibilityProcessRecord* blocker,
                                                                  ProtonPlusServicesCompatibilityProcessMatchReason blocker_reason,
                                                                  const gchar* inspection_error,
                                                                  GeeList* processes)
{
	return proton_plus_services_compatibility_process_inspection_result_construct (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_INSPECTION_RESULT, status, blocker, blocker_reason, inspection_error, processes);
}

ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_inspection_result_clear (GeeList* processes)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp0_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	_tmp0_ = proton_plus_services_compatibility_process_inspection_result_new (PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_CLEAR, NULL, PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE, NULL, processes);
	result = _tmp0_;
	return result;
}

ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_inspection_result_active (ProtonPlusServicesCompatibilityProcessRecord* blocker,
                                                                     ProtonPlusServicesCompatibilityProcessMatchReason blocker_reason)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp0_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	g_return_val_if_fail (blocker != NULL, NULL);
	_tmp0_ = proton_plus_services_compatibility_process_inspection_result_new (PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_ACTIVE, blocker, blocker_reason, NULL, NULL);
	result = _tmp0_;
	return result;
}

ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_inspection_result_unknown (const gchar* _error_)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp0_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	g_return_val_if_fail (_error_ != NULL, NULL);
	_tmp0_ = proton_plus_services_compatibility_process_inspection_result_new (PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_UNKNOWN, NULL, PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE, _error_, NULL);
	result = _tmp0_;
	return result;
}

ProtonPlusServicesCompatibilityProcessInspectionStatus
proton_plus_services_compatibility_process_inspection_result_get_status (ProtonPlusServicesCompatibilityProcessInspectionResult* self)
{
	ProtonPlusServicesCompatibilityProcessInspectionStatus result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_status;
	return result;
}

static void
proton_plus_services_compatibility_process_inspection_result_set_status (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                         ProtonPlusServicesCompatibilityProcessInspectionStatus value)
{
	ProtonPlusServicesCompatibilityProcessInspectionStatus old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_inspection_result_get_status (self);
	if (old_value != value) {
		self->priv->_status = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_STATUS_PROPERTY]);
	}
}

ProtonPlusServicesCompatibilityProcessRecord*
proton_plus_services_compatibility_process_inspection_result_get_blocker (ProtonPlusServicesCompatibilityProcessInspectionResult* self)
{
	ProtonPlusServicesCompatibilityProcessRecord* result;
	ProtonPlusServicesCompatibilityProcessRecord* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_blocker;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_inspection_result_set_blocker (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                          ProtonPlusServicesCompatibilityProcessRecord* value)
{
	ProtonPlusServicesCompatibilityProcessRecord* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_inspection_result_get_blocker (self);
	if (old_value != value) {
		ProtonPlusServicesCompatibilityProcessRecord* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_blocker);
		self->priv->_blocker = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_PROPERTY]);
	}
}

ProtonPlusServicesCompatibilityProcessMatchReason
proton_plus_services_compatibility_process_inspection_result_get_blocker_reason (ProtonPlusServicesCompatibilityProcessInspectionResult* self)
{
	ProtonPlusServicesCompatibilityProcessMatchReason result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_blocker_reason;
	return result;
}

static void
proton_plus_services_compatibility_process_inspection_result_set_blocker_reason (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                                 ProtonPlusServicesCompatibilityProcessMatchReason value)
{
	ProtonPlusServicesCompatibilityProcessMatchReason old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_inspection_result_get_blocker_reason (self);
	if (old_value != value) {
		self->priv->_blocker_reason = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_REASON_PROPERTY]);
	}
}

const gchar*
proton_plus_services_compatibility_process_inspection_result_get_inspection_error (ProtonPlusServicesCompatibilityProcessInspectionResult* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_inspection_error;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_inspection_result_set_inspection_error (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_inspection_result_get_inspection_error (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_inspection_error);
		self->priv->_inspection_error = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_INSPECTION_ERROR_PROPERTY]);
	}
}

GeeList*
proton_plus_services_compatibility_process_inspection_result_get_processes (ProtonPlusServicesCompatibilityProcessInspectionResult* self)
{
	GeeList* result;
	GeeList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_processes;
	result = _tmp0_;
	return result;
}

static void
proton_plus_services_compatibility_process_inspection_result_set_processes (ProtonPlusServicesCompatibilityProcessInspectionResult* self,
                                                                            GeeList* value)
{
	GeeList* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_services_compatibility_process_inspection_result_get_processes (self);
	if (old_value != value) {
		GeeList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_processes);
		self->priv->_processes = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_PROCESSES_PROPERTY]);
	}
}

static void
proton_plus_services_compatibility_process_inspection_result_class_init (ProtonPlusServicesCompatibilityProcessInspectionResultClass * klass,
                                                                         gpointer klass_data)
{
	proton_plus_services_compatibility_process_inspection_result_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesCompatibilityProcessInspectionResult_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_services_compatibility_process_inspection_result_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_services_compatibility_process_inspection_result_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_compatibility_process_inspection_result_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_STATUS_PROPERTY, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_STATUS_PROPERTY] = g_param_spec_enum ("status", "status", "status", PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_INSPECTION_STATUS, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_PROPERTY, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_PROPERTY] = g_param_spec_object ("blocker", "blocker", "blocker", PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_REASON_PROPERTY, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_REASON_PROPERTY] = g_param_spec_enum ("blocker-reason", "blocker-reason", "blocker-reason", PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_MATCH_REASON, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_INSPECTION_ERROR_PROPERTY, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_INSPECTION_ERROR_PROPERTY] = g_param_spec_string ("inspection-error", "inspection-error", "inspection-error", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_PROCESSES_PROPERTY, proton_plus_services_compatibility_process_inspection_result_properties[PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_PROCESSES_PROPERTY] = g_param_spec_object ("processes", "processes", "processes", GEE_TYPE_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_services_compatibility_process_inspection_result_instance_init (ProtonPlusServicesCompatibilityProcessInspectionResult * self,
                                                                            gpointer klass)
{
	self->priv = proton_plus_services_compatibility_process_inspection_result_get_instance_private (self);
}

static void
proton_plus_services_compatibility_process_inspection_result_finalize (GObject * obj)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_INSPECTION_RESULT, ProtonPlusServicesCompatibilityProcessInspectionResult);
	_g_object_unref0 (self->priv->_blocker);
	_g_free0 (self->priv->_inspection_error);
	_g_object_unref0 (self->priv->_processes);
	G_OBJECT_CLASS (proton_plus_services_compatibility_process_inspection_result_parent_class)->finalize (obj);
}

static GType
proton_plus_services_compatibility_process_inspection_result_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesCompatibilityProcessInspectionResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_compatibility_process_inspection_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesCompatibilityProcessInspectionResult), 0, (GInstanceInitFunc) proton_plus_services_compatibility_process_inspection_result_instance_init, NULL };
	GType proton_plus_services_compatibility_process_inspection_result_type_id;
	proton_plus_services_compatibility_process_inspection_result_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesCompatibilityProcessInspectionResult", &g_define_type_info, 0);
	ProtonPlusServicesCompatibilityProcessInspectionResult_private_offset = g_type_add_instance_private (proton_plus_services_compatibility_process_inspection_result_type_id, sizeof (ProtonPlusServicesCompatibilityProcessInspectionResultPrivate));
	return proton_plus_services_compatibility_process_inspection_result_type_id;
}

GType
proton_plus_services_compatibility_process_inspection_result_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_inspection_result_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_inspection_result_type_id__once)) {
		GType proton_plus_services_compatibility_process_inspection_result_type_id;
		proton_plus_services_compatibility_process_inspection_result_type_id = proton_plus_services_compatibility_process_inspection_result_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_inspection_result_type_id__once, proton_plus_services_compatibility_process_inspection_result_type_id);
	}
	return proton_plus_services_compatibility_process_inspection_result_type_id__once;
}

static void
_vala_proton_plus_services_compatibility_process_inspection_result_get_property (GObject * object,
                                                                                 guint property_id,
                                                                                 GValue * value,
                                                                                 GParamSpec * pspec)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_INSPECTION_RESULT, ProtonPlusServicesCompatibilityProcessInspectionResult);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_STATUS_PROPERTY:
		g_value_set_enum (value, proton_plus_services_compatibility_process_inspection_result_get_status (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_PROPERTY:
		g_value_set_object (value, proton_plus_services_compatibility_process_inspection_result_get_blocker (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_REASON_PROPERTY:
		g_value_set_enum (value, proton_plus_services_compatibility_process_inspection_result_get_blocker_reason (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_INSPECTION_ERROR_PROPERTY:
		g_value_set_string (value, proton_plus_services_compatibility_process_inspection_result_get_inspection_error (self));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_PROCESSES_PROPERTY:
		g_value_set_object (value, proton_plus_services_compatibility_process_inspection_result_get_processes (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_services_compatibility_process_inspection_result_set_property (GObject * object,
                                                                                 guint property_id,
                                                                                 const GValue * value,
                                                                                 GParamSpec * pspec)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_INSPECTION_RESULT, ProtonPlusServicesCompatibilityProcessInspectionResult);
	switch (property_id) {
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_STATUS_PROPERTY:
		proton_plus_services_compatibility_process_inspection_result_set_status (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_PROPERTY:
		proton_plus_services_compatibility_process_inspection_result_set_blocker (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_BLOCKER_REASON_PROPERTY:
		proton_plus_services_compatibility_process_inspection_result_set_blocker_reason (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_INSPECTION_ERROR_PROPERTY:
		proton_plus_services_compatibility_process_inspection_result_set_inspection_error (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_RESULT_PROCESSES_PROPERTY:
		proton_plus_services_compatibility_process_inspection_result_set_processes (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
proton_plus_services_compatibility_process_query_backend_inspect_processes (ProtonPlusServicesCompatibilityProcessQueryBackend* self,
                                                                            GAsyncReadyCallback _callback_,
                                                                            gpointer _user_data_)
{
	ProtonPlusServicesCompatibilityProcessQueryBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_QUERY_BACKEND_GET_INTERFACE (self);
	if (_iface_->inspect_processes) {
		_iface_->inspect_processes (self, _callback_, _user_data_);
	}
}

ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_query_backend_inspect_processes_finish (ProtonPlusServicesCompatibilityProcessQueryBackend* self,
                                                                                   GAsyncResult* _res_)
{
	ProtonPlusServicesCompatibilityProcessQueryBackendIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_QUERY_BACKEND_GET_INTERFACE (self);
	if (_iface_->inspect_processes_finish) {
		return _iface_->inspect_processes_finish (self, _res_);
	}
	return NULL;
}

static void
proton_plus_services_compatibility_process_query_backend_default_init (ProtonPlusServicesCompatibilityProcessQueryBackendIface * iface,
                                                                       gpointer iface_data)
{
}

static GType
proton_plus_services_compatibility_process_query_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesCompatibilityProcessQueryBackendIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_compatibility_process_query_backend_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType proton_plus_services_compatibility_process_query_backend_type_id;
	proton_plus_services_compatibility_process_query_backend_type_id = g_type_register_static (G_TYPE_INTERFACE, "ProtonPlusServicesCompatibilityProcessQueryBackend", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (proton_plus_services_compatibility_process_query_backend_type_id, G_TYPE_OBJECT);
	return proton_plus_services_compatibility_process_query_backend_type_id;
}

GType
proton_plus_services_compatibility_process_query_backend_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_query_backend_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_query_backend_type_id__once)) {
		GType proton_plus_services_compatibility_process_query_backend_type_id;
		proton_plus_services_compatibility_process_query_backend_type_id = proton_plus_services_compatibility_process_query_backend_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_query_backend_type_id__once, proton_plus_services_compatibility_process_query_backend_type_id);
	}
	return proton_plus_services_compatibility_process_query_backend_type_id__once;
}

static inline gpointer
proton_plus_services_native_compatibility_process_query_backend_get_instance_private (ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesNativeCompatibilityProcessQueryBackend_private_offset);
}

ProtonPlusServicesNativeCompatibilityProcessQueryBackend*
proton_plus_services_native_compatibility_process_query_backend_construct (GType object_type,
                                                                           const gchar* proc_root)
{
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend * self = NULL;
	gchar* _tmp0_;
	g_return_val_if_fail (proc_root != NULL, NULL);
	self = (ProtonPlusServicesNativeCompatibilityProcessQueryBackend*) g_object_new (object_type, NULL);
	_tmp0_ = g_strdup (proc_root);
	_g_free0 (self->priv->proc_root);
	self->priv->proc_root = _tmp0_;
	return self;
}

ProtonPlusServicesNativeCompatibilityProcessQueryBackend*
proton_plus_services_native_compatibility_process_query_backend_new (const gchar* proc_root)
{
	return proton_plus_services_native_compatibility_process_query_backend_construct (PROTON_PLUS_SERVICES_TYPE_NATIVE_COMPATIBILITY_PROCESS_QUERY_BACKEND, proc_root);
}

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

static void
proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes (ProtonPlusServicesCompatibilityProcessQueryBackend* base,
                                                                                        GAsyncReadyCallback _callback_,
                                                                                        gpointer _user_data_)
{
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend * self;
	ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData* _data_;
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend* _tmp0_;
	self = (ProtonPlusServicesNativeCompatibilityProcessQueryBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co (_data_);
}

static ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_native_compatibility_process_query_backend_inspect_processes_finish (ProtonPlusServicesCompatibilityProcessQueryBackend* base,
                                                                                          GAsyncResult* _res_)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block63Data*
block63_data_ref (Block63Data* _data63_)
{
	g_atomic_int_inc (&_data63_->_ref_count_);
	return _data63_;
}

static void
block63_data_unref (void * _userdata_)
{
	Block63Data* _data63_;
	_data63_ = (Block63Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data63_->_ref_count_)) {
		ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self;
		self = _data63_->self;
		_g_object_unref0 (_data63_->_result_);
		(_data63_->callback_target_destroy_notify == NULL) ? NULL : (_data63_->callback_target_destroy_notify (_data63_->callback_target), NULL);
		_data63_->callback = NULL;
		_data63_->callback_target = NULL;
		_data63_->callback_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block63Data, _data63_);
	}
}

static gboolean
_proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co_gsource_func (gpointer self)
{
	gboolean result;
	result = proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co (self);
	return result;
}

static void
__lambda20_ (Block63Data* _data63_)
{
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp0_;
	GSourceFunc _tmp1_;
	gpointer _tmp1__target;
	GDestroyNotify _tmp1__target_destroy_notify;
	self = _data63_->self;
	_tmp0_ = proton_plus_services_native_compatibility_process_query_backend_inspect_processes_sync (self);
	_g_object_unref0 (_data63_->_result_);
	_data63_->_result_ = _tmp0_;
	_tmp1_ = _data63_->callback;
	_tmp1__target = _data63_->callback_target;
	_tmp1__target_destroy_notify = _data63_->callback_target_destroy_notify;
	_data63_->callback = NULL;
	_data63_->callback_target = NULL;
	_data63_->callback_target_destroy_notify = NULL;
	g_idle_add_full (G_PRIORITY_DEFAULT, _tmp1_, _tmp1__target, _tmp1__target_destroy_notify);
}

static gpointer
___lambda20__gthread_func (gpointer self)
{
	gpointer result;
	__lambda20_ (self);
	result = NULL;
	block63_data_unref (self);
	return result;
}

static gboolean
proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co (ProtonPlusServicesNativeCompatibilityProcessQueryBackendInspectProcessesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data63_ = g_slice_new0 (Block63Data);
	_data_->_data63_->_ref_count_ = 1;
	_data_->_data63_->self = g_object_ref (_data_->self);
	_data_->_data63_->_async_data_ = _data_;
	_data_->_data63_->callback = _proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes_co_gsource_func;
	_data_->_data63_->callback_target = _data_;
	_data_->_data63_->callback_target_destroy_notify = NULL;
	_data_->_tmp0_ = proton_plus_services_compatibility_process_inspection_result_unknown ("Process inspection did not complete.");
	_data_->_data63_->_result_ = _data_->_tmp0_;
	_data_->_tmp1_ = g_thread_new ("compatibility-process-query", ___lambda20__gthread_func, block63_data_ref (_data_->_data63_));
	_data_->_tmp2_ = _data_->_tmp1_;
	_g_thread_unref0 (_data_->_tmp2_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp3_ = _g_object_ref0 (_data_->_data63_->_result_);
	_data_->result = _data_->_tmp3_;
	block63_data_unref (_data_->_data63_);
	_data_->_data63_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gboolean
int_try_parse (const gchar* str,
               gint* _result_,
               const gchar** unparsed,
               guint _base)
{
	gint _vala__result_ = 0;
	const gchar* _vala_unparsed = NULL;
	gchar* endptr = NULL;
	glong long_result = 0L;
	gchar* _tmp0_ = NULL;
	glong _tmp1_;
	gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	glong _tmp6_;
	gboolean result;
	g_return_val_if_fail (str != NULL, FALSE);
	errno = 0;
	_tmp1_ = strtol (str, &_tmp0_, (gint) _base);
	endptr = _tmp0_;
	long_result = _tmp1_;
	_tmp2_ = endptr;
	_tmp3_ = strlen (str);
	_tmp4_ = _tmp3_;
	if (_tmp2_ == (((gchar*) str) + _tmp4_)) {
		_vala_unparsed = "";
	} else {
		gchar* _tmp5_;
		_tmp5_ = endptr;
		_vala_unparsed = (const gchar*) _tmp5_;
	}
	_tmp6_ = long_result;
	if ((((glong) G_MININT) <= _tmp6_) && (_tmp6_ <= ((glong) G_MAXINT))) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_vala__result_ = (gint) long_result;
		if (errno != ERANGE) {
			_tmp8_ = errno != EINVAL;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = _vala_unparsed;
			_tmp10_ = endptr;
			_tmp7_ = _tmp9_ != _tmp10_;
		} else {
			_tmp7_ = FALSE;
		}
		result = _tmp7_;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	} else {
		_vala__result_ = G_MAXINT;
		result = FALSE;
		if (_result_) {
			*_result_ = _vala__result_;
		}
		if (unparsed) {
			*unparsed = _vala_unparsed;
		}
		return result;
	}
}

static guint8*
_vala_array_dup52 (guint8* self,
                   gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (guint8));
	}
	return NULL;
}

static ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_native_compatibility_process_query_backend_inspect_processes_sync (ProtonPlusServicesNativeCompatibilityProcessQueryBackend* self)
{
	GError* _inner_error0_ = NULL;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	g_return_val_if_fail (self != NULL, NULL);
	{
		GeeArrayList* records = NULL;
		GeeArrayList* _tmp0_;
		GFileEnumerator* directory = NULL;
		const gchar* _tmp1_;
		GFile* _tmp2_;
		GFile* _tmp3_;
		GFileEnumerator* _tmp4_;
		GFileEnumerator* _tmp5_;
		guint32 current_user_id = 0U;
		GFileInfo* info = NULL;
		GFileEnumerator* _tmp91_;
		GeeArrayList* _tmp92_;
		ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp93_;
		_tmp0_ = gee_array_list_new (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		records = _tmp0_;
		_tmp1_ = self->priv->proc_root;
		_tmp2_ = g_file_new_for_path (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_file_enumerate_children (_tmp3_, "standard::name,unix::uid", G_FILE_QUERY_INFO_NONE, NULL, &_inner_error0_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		directory = _tmp5_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (records);
			goto __catch0_g_error;
		}
		current_user_id = (guint32) geteuid ();
		while (TRUE) {
			GFileInfo* _tmp6_ = NULL;
			GFileEnumerator* _tmp7_;
			GFileInfo* _tmp8_;
			GFileInfo* _tmp9_;
			GFileInfo* _tmp10_;
			gchar* name = NULL;
			GFileInfo* _tmp11_;
			const gchar* _tmp12_;
			gchar* _tmp13_;
			gint pid = 0;
			gboolean _tmp14_ = FALSE;
			const gchar* _tmp15_;
			gint _tmp16_ = 0;
			gboolean _tmp17_;
			GFileInfo* _tmp18_;
			GFileInfo* _tmp23_;
			gchar* root = NULL;
			const gchar* _tmp24_;
			const gchar* _tmp25_;
			gchar* _tmp26_;
			guint8* command_line = NULL;
			guint8* _tmp27_;
			gint command_line_length1;
			gint _command_line_size_;
			gboolean command_line_available = FALSE;
			gchar* command_line_error = NULL;
			gboolean _tmp36_ = FALSE;
			gboolean _tmp38_ = FALSE;
			gchar* executable = NULL;
			gchar* _tmp41_;
			gboolean executable_available = FALSE;
			gchar* executable_error = NULL;
			gboolean _tmp65_ = FALSE;
			gboolean _tmp68_ = FALSE;
			_tmp7_ = directory;
			_tmp8_ = g_file_enumerator_next_file (_tmp7_, NULL, &_inner_error0_);
			_tmp6_ = _tmp8_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (info);
				_g_object_unref0 (directory);
				_g_object_unref0 (records);
				goto __catch0_g_error;
			}
			_tmp9_ = _tmp6_;
			_tmp6_ = NULL;
			_g_object_unref0 (info);
			info = _tmp9_;
			_tmp10_ = info;
			if (!(_tmp10_ != NULL)) {
				_g_object_unref0 (_tmp6_);
				break;
			}
			_tmp11_ = info;
			_tmp12_ = g_file_info_get_name (_tmp11_);
			_tmp13_ = g_strdup (_tmp12_);
			name = _tmp13_;
			_tmp15_ = name;
			_tmp17_ = int_try_parse (_tmp15_, &_tmp16_, NULL, (guint) 0);
			pid = _tmp16_;
			if (!_tmp17_) {
				_tmp14_ = TRUE;
			} else {
				_tmp14_ = pid <= 0;
			}
			if (_tmp14_) {
				_g_free0 (name);
				_g_object_unref0 (_tmp6_);
				continue;
			}
			_tmp18_ = info;
			if (!g_file_info_has_attribute (_tmp18_, G_FILE_ATTRIBUTE_UNIX_UID)) {
				gchar* _tmp19_;
				gchar* _tmp20_;
				ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp21_;
				ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp22_;
				_tmp19_ = g_strdup_printf ("Unable to determine the owner of process %d.", pid);
				_tmp20_ = _tmp19_;
				_tmp21_ = proton_plus_services_compatibility_process_inspection_result_unknown (_tmp20_);
				_tmp22_ = _tmp21_;
				_g_free0 (_tmp20_);
				result = _tmp22_;
				_g_free0 (name);
				_g_object_unref0 (_tmp6_);
				_g_object_unref0 (info);
				_g_object_unref0 (directory);
				_g_object_unref0 (records);
				return result;
			}
			_tmp23_ = info;
			if (g_file_info_get_attribute_uint32 (_tmp23_, G_FILE_ATTRIBUTE_UNIX_UID) != current_user_id) {
				_g_free0 (name);
				_g_object_unref0 (_tmp6_);
				continue;
			}
			_tmp24_ = self->priv->proc_root;
			_tmp25_ = name;
			_tmp26_ = g_build_filename (_tmp24_, _tmp25_, NULL);
			root = _tmp26_;
			_tmp27_ = g_new0 (guint8, 0);
			command_line = _tmp27_;
			command_line_length1 = 0;
			_command_line_size_ = command_line_length1;
			command_line_available = TRUE;
			command_line_error = NULL;
			{
				const gchar* _tmp28_;
				gchar* _tmp29_;
				gchar* _tmp30_;
				guint8* _tmp31_ = NULL;
				gsize _tmp32_ = 0;
				_tmp28_ = root;
				_tmp29_ = g_build_filename (_tmp28_, "cmdline", NULL);
				_tmp30_ = _tmp29_;
				g_file_get_contents (_tmp30_, (gchar**) (&_tmp31_), &_tmp32_, &_inner_error0_);
				command_line = (g_free (command_line), NULL);
				command_line = _tmp31_;
				command_line_length1 = _tmp32_;
				_command_line_size_ = command_line_length1;
				_g_free0 (_tmp30_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					if (_inner_error0_->domain == G_FILE_ERROR) {
						goto __catch1_g_file_error;
					}
					_g_free0 (command_line_error);
					command_line = (g_free (command_line), NULL);
					_g_free0 (root);
					_g_free0 (name);
					_g_object_unref0 (_tmp6_);
					_g_object_unref0 (info);
					_g_object_unref0 (directory);
					_g_object_unref0 (records);
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
			}
			goto __finally1;
			__catch1_g_file_error:
			{
				GError* e = NULL;
				const gchar* _tmp33_;
				GError* _tmp34_;
				gchar* _tmp35_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp33_ = root;
				if (proton_plus_services_native_compatibility_process_query_backend_process_has_disappeared (_tmp33_)) {
					_g_error_free0 (e);
					_g_free0 (command_line_error);
					command_line = (g_free (command_line), NULL);
					_g_free0 (root);
					_g_free0 (name);
					_g_object_unref0 (_tmp6_);
					continue;
				}
				command_line_available = FALSE;
				_tmp34_ = e;
				_tmp35_ = proton_plus_services_native_compatibility_process_query_backend_process_read_failure_message (pid, "command line", _tmp34_);
				_g_free0 (command_line_error);
				command_line_error = _tmp35_;
				_g_error_free0 (e);
			}
			__finally1:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (command_line_error);
				command_line = (g_free (command_line), NULL);
				_g_free0 (root);
				_g_free0 (name);
				_g_object_unref0 (_tmp6_);
				_g_object_unref0 (info);
				_g_object_unref0 (directory);
				_g_object_unref0 (records);
				goto __catch0_g_error;
			}
			if (command_line_available) {
				guint8* _tmp37_;
				gint _tmp37__length1;
				_tmp37_ = command_line;
				_tmp37__length1 = command_line_length1;
				_tmp36_ = _tmp37__length1 == 0;
			} else {
				_tmp36_ = FALSE;
			}
			if (_tmp36_) {
				_g_free0 (command_line_error);
				command_line = (g_free (command_line), NULL);
				_g_free0 (root);
				_g_free0 (name);
				_g_object_unref0 (_tmp6_);
				continue;
			}
			if (command_line_available) {
				guint8* _tmp39_;
				gint _tmp39__length1;
				_tmp39_ = command_line;
				_tmp39__length1 = command_line_length1;
				_tmp38_ = !proton_plus_services_compatibility_process_record_cmdline_is_valid (_tmp39_, (gint) _tmp39__length1);
			} else {
				_tmp38_ = FALSE;
			}
			if (_tmp38_) {
				gchar* _tmp40_;
				command_line_available = FALSE;
				_tmp40_ = g_strdup_printf ("Process %d returned malformed command-line data.", pid);
				_g_free0 (command_line_error);
				command_line_error = _tmp40_;
			}
			_tmp41_ = g_strdup ("");
			executable = _tmp41_;
			executable_available = TRUE;
			executable_error = NULL;
			{
				gchar* _tmp42_ = NULL;
				const gchar* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				gchar* _tmp46_;
				gchar* _tmp47_;
				gchar* _tmp48_;
				_tmp43_ = root;
				_tmp44_ = g_build_filename (_tmp43_, "exe", NULL);
				_tmp45_ = _tmp44_;
				_tmp46_ = g_file_read_link (_tmp45_, &_inner_error0_);
				_tmp47_ = _tmp46_;
				_g_free0 (_tmp45_);
				_tmp42_ = _tmp47_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					if (_inner_error0_->domain == G_FILE_ERROR) {
						goto __catch2_g_file_error;
					}
					_g_free0 (executable_error);
					_g_free0 (executable);
					_g_free0 (command_line_error);
					command_line = (g_free (command_line), NULL);
					_g_free0 (root);
					_g_free0 (name);
					_g_object_unref0 (_tmp6_);
					_g_object_unref0 (info);
					_g_object_unref0 (directory);
					_g_object_unref0 (records);
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return NULL;
				}
				_tmp48_ = _tmp42_;
				_tmp42_ = NULL;
				_g_free0 (executable);
				executable = _tmp48_;
				_g_free0 (_tmp42_);
			}
			goto __finally2;
			__catch2_g_file_error:
			{
				GError* e = NULL;
				const gchar* _tmp49_;
				GError* _tmp63_;
				gchar* _tmp64_;
				e = _inner_error0_;
				_inner_error0_ = NULL;
				_tmp49_ = root;
				if (proton_plus_services_native_compatibility_process_query_backend_process_has_disappeared (_tmp49_)) {
					_g_error_free0 (e);
					_g_free0 (executable_error);
					_g_free0 (executable);
					_g_free0 (command_line_error);
					command_line = (g_free (command_line), NULL);
					_g_free0 (root);
					_g_free0 (name);
					_g_object_unref0 (_tmp6_);
					continue;
				}
				if (command_line_available) {
					guint8* retry_command_line = NULL;
					gint retry_command_line_length1 = 0;
					gint _retry_command_line_size_ = 0;
					{
						const gchar* _tmp50_;
						gchar* _tmp51_;
						gchar* _tmp52_;
						guint8* _tmp53_ = NULL;
						gsize _tmp54_ = 0;
						_tmp50_ = root;
						_tmp51_ = g_build_filename (_tmp50_, "cmdline", NULL);
						_tmp52_ = _tmp51_;
						g_file_get_contents (_tmp52_, (gchar**) (&_tmp53_), &_tmp54_, &_inner_error0_);
						retry_command_line = (g_free (retry_command_line), NULL);
						retry_command_line = _tmp53_;
						retry_command_line_length1 = _tmp54_;
						_retry_command_line_size_ = retry_command_line_length1;
						_g_free0 (_tmp52_);
						if (G_UNLIKELY (_inner_error0_ != NULL)) {
							if (_inner_error0_->domain == G_FILE_ERROR) {
								goto __catch3_g_file_error;
							}
							retry_command_line = (g_free (retry_command_line), NULL);
							_g_error_free0 (e);
							_g_free0 (executable_error);
							_g_free0 (executable);
							_g_free0 (command_line_error);
							command_line = (g_free (command_line), NULL);
							_g_free0 (root);
							_g_free0 (name);
							_g_object_unref0 (_tmp6_);
							_g_object_unref0 (info);
							_g_object_unref0 (directory);
							_g_object_unref0 (records);
							g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
							g_clear_error (&_inner_error0_);
							return NULL;
						}
					}
					goto __finally3;
					__catch3_g_file_error:
					{
						GError* retry_error = NULL;
						const gchar* _tmp55_;
						GError* _tmp56_;
						gchar* _tmp57_;
						retry_error = _inner_error0_;
						_inner_error0_ = NULL;
						_tmp55_ = root;
						if (proton_plus_services_native_compatibility_process_query_backend_process_has_disappeared (_tmp55_)) {
							_g_error_free0 (retry_error);
							retry_command_line = (g_free (retry_command_line), NULL);
							_g_error_free0 (e);
							_g_free0 (executable_error);
							_g_free0 (executable);
							_g_free0 (command_line_error);
							command_line = (g_free (command_line), NULL);
							_g_free0 (root);
							_g_free0 (name);
							_g_object_unref0 (_tmp6_);
							continue;
						}
						command_line_available = FALSE;
						_tmp56_ = retry_error;
						_tmp57_ = proton_plus_services_native_compatibility_process_query_backend_process_read_failure_message (pid, "command line", _tmp56_);
						_g_free0 (command_line_error);
						command_line_error = _tmp57_;
						_g_error_free0 (retry_error);
					}
					__finally3:
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						retry_command_line = (g_free (retry_command_line), NULL);
						_g_error_free0 (e);
						_g_free0 (executable_error);
						_g_free0 (executable);
						_g_free0 (command_line_error);
						command_line = (g_free (command_line), NULL);
						_g_free0 (root);
						_g_free0 (name);
						_g_object_unref0 (_tmp6_);
						_g_object_unref0 (info);
						_g_object_unref0 (directory);
						_g_object_unref0 (records);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
						g_clear_error (&_inner_error0_);
						return NULL;
					}
					if (command_line_available) {
						guint8* _tmp58_;
						gint _tmp58__length1;
						guint8* _tmp59_;
						gint _tmp59__length1;
						_tmp58_ = retry_command_line;
						_tmp58__length1 = retry_command_line_length1;
						if (_tmp58__length1 == 0) {
							retry_command_line = (g_free (retry_command_line), NULL);
							_g_error_free0 (e);
							_g_free0 (executable_error);
							_g_free0 (executable);
							_g_free0 (command_line_error);
							command_line = (g_free (command_line), NULL);
							_g_free0 (root);
							_g_free0 (name);
							_g_object_unref0 (_tmp6_);
							continue;
						}
						_tmp59_ = retry_command_line;
						_tmp59__length1 = retry_command_line_length1;
						if (proton_plus_services_compatibility_process_record_cmdline_is_valid (_tmp59_, (gint) _tmp59__length1)) {
							guint8* _tmp60_;
							gint _tmp60__length1;
							guint8* _tmp61_;
							gint _tmp61__length1;
							_tmp60_ = retry_command_line;
							_tmp60__length1 = retry_command_line_length1;
							_tmp61_ = (_tmp60_ != NULL) ? _vala_array_dup52 (_tmp60_, _tmp60__length1) : _tmp60_;
							_tmp61__length1 = _tmp60__length1;
							command_line = (g_free (command_line), NULL);
							command_line = _tmp61_;
							command_line_length1 = _tmp61__length1;
							_command_line_size_ = command_line_length1;
						} else {
							gchar* _tmp62_;
							command_line_available = FALSE;
							_tmp62_ = g_strdup_printf ("Process %d returned malformed command-line data.", pid);
							_g_free0 (command_line_error);
							command_line_error = _tmp62_;
						}
					}
					retry_command_line = (g_free (retry_command_line), NULL);
				}
				executable_available = FALSE;
				_tmp63_ = e;
				_tmp64_ = proton_plus_services_native_compatibility_process_query_backend_process_read_failure_message (pid, "executable", _tmp63_);
				_g_free0 (executable_error);
				executable_error = _tmp64_;
				_g_error_free0 (e);
			}
			__finally2:
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_free0 (executable_error);
				_g_free0 (executable);
				_g_free0 (command_line_error);
				command_line = (g_free (command_line), NULL);
				_g_free0 (root);
				_g_free0 (name);
				_g_object_unref0 (_tmp6_);
				_g_object_unref0 (info);
				_g_object_unref0 (directory);
				_g_object_unref0 (records);
				goto __catch0_g_error;
			}
			if (executable_available) {
				const gchar* _tmp66_;
				_tmp66_ = executable;
				_tmp65_ = !g_utf8_validate (_tmp66_, (gssize) -1, NULL);
			} else {
				_tmp65_ = FALSE;
			}
			if (_tmp65_) {
				gchar* _tmp67_;
				executable_available = FALSE;
				_tmp67_ = g_strdup_printf ("Process %d returned malformed executable data.", pid);
				_g_free0 (executable_error);
				executable_error = _tmp67_;
			}
			if (executable_available) {
				_tmp68_ = command_line_available;
			} else {
				_tmp68_ = FALSE;
			}
			if (_tmp68_) {
				GeeArrayList* _tmp69_;
				const gchar* _tmp70_;
				guint8* _tmp71_;
				gint _tmp71__length1;
				ProtonPlusServicesCompatibilityProcessRecord* _tmp72_;
				ProtonPlusServicesCompatibilityProcessRecord* _tmp73_;
				_tmp69_ = records;
				_tmp70_ = executable;
				_tmp71_ = command_line;
				_tmp71__length1 = command_line_length1;
				_tmp72_ = proton_plus_services_compatibility_process_record_new_from_cmdline_bytes (pid, _tmp70_, _tmp71_, _tmp71__length1);
				_tmp73_ = _tmp72_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp69_, _tmp73_);
				_g_object_unref0 (_tmp73_);
			} else {
				if (command_line_available) {
					GeeArrayList* _tmp74_;
					guint8* _tmp75_;
					gint _tmp75__length1;
					const gchar* _tmp76_;
					ProtonPlusServicesCompatibilityProcessRecord* _tmp77_;
					ProtonPlusServicesCompatibilityProcessRecord* _tmp78_;
					_tmp74_ = records;
					_tmp75_ = command_line;
					_tmp75__length1 = command_line_length1;
					_tmp76_ = executable_error;
					_tmp77_ = proton_plus_services_compatibility_process_record_new_with_unreadable_executable (pid, _tmp75_, _tmp75__length1, (const gchar*) _tmp76_);
					_tmp78_ = _tmp77_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp74_, _tmp78_);
					_g_object_unref0 (_tmp78_);
				} else {
					if (executable_available) {
						GeeArrayList* _tmp79_;
						const gchar* _tmp80_;
						const gchar* _tmp81_;
						ProtonPlusServicesCompatibilityProcessRecord* _tmp82_;
						ProtonPlusServicesCompatibilityProcessRecord* _tmp83_;
						_tmp79_ = records;
						_tmp80_ = executable;
						_tmp81_ = command_line_error;
						_tmp82_ = proton_plus_services_compatibility_process_record_new_with_unreadable_argv (pid, _tmp80_, (const gchar*) _tmp81_);
						_tmp83_ = _tmp82_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp79_, _tmp83_);
						_g_object_unref0 (_tmp83_);
					} else {
						GeeArrayList* _tmp84_;
						const gchar* _tmp85_;
						const gchar* _tmp86_;
						gchar* _tmp87_;
						gchar* _tmp88_;
						ProtonPlusServicesCompatibilityProcessRecord* _tmp89_;
						ProtonPlusServicesCompatibilityProcessRecord* _tmp90_;
						_tmp84_ = records;
						_tmp85_ = executable_error;
						_tmp86_ = command_line_error;
						_tmp87_ = g_strdup_printf ("%s %s", (const gchar*) _tmp85_, (const gchar*) _tmp86_);
						_tmp88_ = _tmp87_;
						_tmp89_ = proton_plus_services_compatibility_process_record_new_with_unreadable_metadata (pid, _tmp88_);
						_tmp90_ = _tmp89_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp84_, _tmp90_);
						_g_object_unref0 (_tmp90_);
						_g_free0 (_tmp88_);
					}
				}
			}
			_g_free0 (executable_error);
			_g_free0 (executable);
			_g_free0 (command_line_error);
			command_line = (g_free (command_line), NULL);
			_g_free0 (root);
			_g_free0 (name);
			_g_object_unref0 (_tmp6_);
		}
		_tmp91_ = directory;
		g_file_enumerator_close (_tmp91_, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (info);
			_g_object_unref0 (directory);
			_g_object_unref0 (records);
			goto __catch0_g_error;
		}
		_tmp92_ = records;
		_tmp93_ = proton_plus_services_compatibility_process_inspection_result_clear ((GeeList*) _tmp92_);
		result = _tmp93_;
		_g_object_unref0 (info);
		_g_object_unref0 (directory);
		_g_object_unref0 (records);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp94_;
		GError* _tmp95_;
		const gchar* _tmp96_;
		gchar* _tmp97_;
		gchar* _tmp98_;
		ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp99_;
		ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp100_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp94_ = self->priv->proc_root;
		_tmp95_ = e;
		_tmp96_ = _tmp95_->message;
		_tmp97_ = g_strdup_printf ("Unable to inspect %s: %s", _tmp94_, _tmp96_);
		_tmp98_ = _tmp97_;
		_tmp99_ = proton_plus_services_compatibility_process_inspection_result_unknown (_tmp98_);
		_tmp100_ = _tmp99_;
		_g_free0 (_tmp98_);
		result = _tmp100_;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gboolean
proton_plus_services_native_compatibility_process_query_backend_process_has_disappeared (const gchar* process_root)
{
	gboolean _tmp8_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (process_root != NULL, FALSE);
	{
		GFileInfo* info = NULL;
		GFile* _tmp0_;
		GFile* _tmp1_;
		GFileInfo* _tmp2_;
		GFileInfo* _tmp3_;
		GFileInfo* _tmp4_;
		_tmp0_ = g_file_new_for_path (process_root);
		_tmp1_ = _tmp0_;
		_tmp2_ = g_file_query_info (_tmp1_, G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error0_);
		_tmp3_ = _tmp2_;
		_g_object_unref0 (_tmp1_);
		info = _tmp3_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_IO_ERROR) {
				goto __catch0_g_io_error;
			}
			goto __catch0_g_error;
		}
		_tmp4_ = info;
		result = g_file_info_get_file_type (_tmp4_) != G_FILE_TYPE_DIRECTORY;
		_g_object_unref0 (info);
		return result;
	}
	goto __finally0;
	__catch0_g_io_error:
	{
		GError* e = NULL;
		gboolean _tmp5_ = FALSE;
		GError* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = e;
		if (_tmp6_->code == G_IO_ERROR_NOT_FOUND) {
			_tmp5_ = TRUE;
		} else {
			GError* _tmp7_;
			_tmp7_ = e;
			_tmp5_ = _tmp7_->code == G_IO_ERROR_NOT_DIRECTORY;
		}
		result = _tmp5_;
		_g_error_free0 (e);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		result = FALSE;
		return result;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return _tmp8_;
}

static gchar*
proton_plus_services_native_compatibility_process_query_backend_process_read_failure_message (gint pid,
                                                                                              const gchar* field,
                                                                                              GError* _error_)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (field != NULL, NULL);
	_tmp0_ = _error_->message;
	_tmp1_ = g_strdup_printf ("Unable to inspect the %s of same-user process %d: %s", field, pid, _tmp0_);
	result = _tmp1_;
	return result;
}

static void
proton_plus_services_native_compatibility_process_query_backend_class_init (ProtonPlusServicesNativeCompatibilityProcessQueryBackendClass * klass,
                                                                            gpointer klass_data)
{
	proton_plus_services_native_compatibility_process_query_backend_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesNativeCompatibilityProcessQueryBackend_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_native_compatibility_process_query_backend_finalize;
}

static void
proton_plus_services_native_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_interface_init (ProtonPlusServicesCompatibilityProcessQueryBackendIface * iface,
                                                                                                                                         gpointer iface_data)
{
	proton_plus_services_native_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_parent_iface = g_type_interface_peek_parent (iface);
	iface->inspect_processes = (void (*) (ProtonPlusServicesCompatibilityProcessQueryBackend*, GAsyncReadyCallback, gpointer)) proton_plus_services_native_compatibility_process_query_backend_real_inspect_processes;
	iface->inspect_processes_finish = (ProtonPlusServicesCompatibilityProcessInspectionResult* (*) (ProtonPlusServicesCompatibilityProcessQueryBackend*, GAsyncResult*)) proton_plus_services_native_compatibility_process_query_backend_inspect_processes_finish;
}

static void
proton_plus_services_native_compatibility_process_query_backend_instance_init (ProtonPlusServicesNativeCompatibilityProcessQueryBackend * self,
                                                                               gpointer klass)
{
	self->priv = proton_plus_services_native_compatibility_process_query_backend_get_instance_private (self);
}

static void
proton_plus_services_native_compatibility_process_query_backend_finalize (GObject * obj)
{
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_NATIVE_COMPATIBILITY_PROCESS_QUERY_BACKEND, ProtonPlusServicesNativeCompatibilityProcessQueryBackend);
	_g_free0 (self->priv->proc_root);
	G_OBJECT_CLASS (proton_plus_services_native_compatibility_process_query_backend_parent_class)->finalize (obj);
}

static GType
proton_plus_services_native_compatibility_process_query_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesNativeCompatibilityProcessQueryBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_native_compatibility_process_query_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesNativeCompatibilityProcessQueryBackend), 0, (GInstanceInitFunc) proton_plus_services_native_compatibility_process_query_backend_instance_init, NULL };
	static const GInterfaceInfo proton_plus_services_compatibility_process_query_backend_info = { (GInterfaceInitFunc) proton_plus_services_native_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_services_native_compatibility_process_query_backend_type_id;
	proton_plus_services_native_compatibility_process_query_backend_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesNativeCompatibilityProcessQueryBackend", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_services_native_compatibility_process_query_backend_type_id, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_QUERY_BACKEND, &proton_plus_services_compatibility_process_query_backend_info);
	ProtonPlusServicesNativeCompatibilityProcessQueryBackend_private_offset = g_type_add_instance_private (proton_plus_services_native_compatibility_process_query_backend_type_id, sizeof (ProtonPlusServicesNativeCompatibilityProcessQueryBackendPrivate));
	return proton_plus_services_native_compatibility_process_query_backend_type_id;
}

GType
proton_plus_services_native_compatibility_process_query_backend_get_type (void)
{
	static volatile gsize proton_plus_services_native_compatibility_process_query_backend_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_native_compatibility_process_query_backend_type_id__once)) {
		GType proton_plus_services_native_compatibility_process_query_backend_type_id;
		proton_plus_services_native_compatibility_process_query_backend_type_id = proton_plus_services_native_compatibility_process_query_backend_get_type_once ();
		g_once_init_leave (&proton_plus_services_native_compatibility_process_query_backend_type_id__once, proton_plus_services_native_compatibility_process_query_backend_type_id);
	}
	return proton_plus_services_native_compatibility_process_query_backend_type_id__once;
}

void
proton_plus_services_flatpak_host_process_query_run (ProtonPlusServicesFlatpakHostProcessQuery* self,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	ProtonPlusServicesFlatpakHostProcessQueryIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_FLATPAK_HOST_PROCESS_QUERY_GET_INTERFACE (self);
	if (_iface_->run) {
		_iface_->run (self, _callback_, _user_data_);
	}
}

ProtonPlusUtilsCommandResult*
proton_plus_services_flatpak_host_process_query_run_finish (ProtonPlusServicesFlatpakHostProcessQuery* self,
                                                            GAsyncResult* _res_)
{
	ProtonPlusServicesFlatpakHostProcessQueryIface* _iface_;
	_iface_ = PROTON_PLUS_SERVICES_FLATPAK_HOST_PROCESS_QUERY_GET_INTERFACE (self);
	if (_iface_->run_finish) {
		return _iface_->run_finish (self, _res_);
	}
	return NULL;
}

static void
proton_plus_services_flatpak_host_process_query_default_init (ProtonPlusServicesFlatpakHostProcessQueryIface * iface,
                                                              gpointer iface_data)
{
}

static GType
proton_plus_services_flatpak_host_process_query_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesFlatpakHostProcessQueryIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_flatpak_host_process_query_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType proton_plus_services_flatpak_host_process_query_type_id;
	proton_plus_services_flatpak_host_process_query_type_id = g_type_register_static (G_TYPE_INTERFACE, "ProtonPlusServicesFlatpakHostProcessQuery", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (proton_plus_services_flatpak_host_process_query_type_id, G_TYPE_OBJECT);
	return proton_plus_services_flatpak_host_process_query_type_id;
}

GType
proton_plus_services_flatpak_host_process_query_get_type (void)
{
	static volatile gsize proton_plus_services_flatpak_host_process_query_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_flatpak_host_process_query_type_id__once)) {
		GType proton_plus_services_flatpak_host_process_query_type_id;
		proton_plus_services_flatpak_host_process_query_type_id = proton_plus_services_flatpak_host_process_query_get_type_once ();
		g_once_init_leave (&proton_plus_services_flatpak_host_process_query_type_id__once, proton_plus_services_flatpak_host_process_query_type_id);
	}
	return proton_plus_services_flatpak_host_process_query_type_id__once;
}

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

static void
proton_plus_services_host_flatpak_process_query_real_run (ProtonPlusServicesFlatpakHostProcessQuery* base,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_)
{
	ProtonPlusServicesHostFlatpakProcessQuery * self;
	ProtonPlusServicesHostFlatpakProcessQueryRunData* _data_;
	ProtonPlusServicesHostFlatpakProcessQuery* _tmp0_;
	self = (ProtonPlusServicesHostFlatpakProcessQuery*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesHostFlatpakProcessQueryRunData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_host_flatpak_process_query_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_host_flatpak_process_query_real_run_co (_data_);
}

static ProtonPlusUtilsCommandResult*
proton_plus_services_host_flatpak_process_query_run_finish (ProtonPlusServicesFlatpakHostProcessQuery* base,
                                                            GAsyncResult* _res_)
{
	ProtonPlusUtilsCommandResult* result;
	ProtonPlusServicesHostFlatpakProcessQueryRunData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_host_flatpak_process_query_run_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_)
{
	ProtonPlusServicesHostFlatpakProcessQueryRunData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_host_flatpak_process_query_real_run_co (_data_);
}

static gboolean
proton_plus_services_host_flatpak_process_query_real_run_co (ProtonPlusServicesHostFlatpakProcessQueryRunData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = g_strdup ("flatpak-spawn");
		_data_->_tmp1_ = g_strdup ("--host");
		_data_->_tmp2_ = g_strdup ("/bin/sh");
		_data_->_tmp3_ = g_strdup ("-c");
		_data_->_tmp4_ = g_strdup (PROTON_PLUS_SERVICES_HOST_FLATPAK_PROCESS_QUERY_QUERY_SCRIPT);
		_data_->_tmp5_ = g_new0 (gchar*, 5 + 1);
		_data_->_tmp5_[0] = _data_->_tmp0_;
		_data_->_tmp5_[1] = _data_->_tmp1_;
		_data_->_tmp5_[2] = _data_->_tmp2_;
		_data_->_tmp5_[3] = _data_->_tmp3_;
		_data_->_tmp5_[4] = _data_->_tmp4_;
		_data_->argv = _data_->_tmp5_;
		_data_->argv_length1 = 5;
		_data_->_argv_size_ = _data_->argv_length1;
		_data_->_tmp6_ = _data_->argv;
		_data_->_tmp6__length1 = _data_->argv_length1;
		_data_->_tmp7_ = g_subprocess_newv (_data_->_tmp6_, G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_PIPE, &_data_->_inner_error0_);
		_data_->subprocess = _data_->_tmp7_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			goto __catch0_g_error;
		}
		_data_->_tmp8_ = _data_->subprocess;
		_data_->_tmp9_ = NULL;
		_data_->_tmp10_ = NULL;
		_data_->_state_ = 1;
		g_subprocess_communicate_async (_data_->_tmp8_, NULL, NULL, proton_plus_services_host_flatpak_process_query_run_ready, _data_);
		return FALSE;
		_state_1:
		g_subprocess_communicate_finish (_data_->_tmp8_, _data_->_res_, &_data_->_tmp9_, &_data_->_tmp10_, &_data_->_inner_error0_);
		_g_bytes_unref0 (_data_->stdout_bytes);
		_data_->stdout_bytes = _data_->_tmp9_;
		_g_bytes_unref0 (_data_->stderr_bytes);
		_data_->stderr_bytes = _data_->_tmp10_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_bytes_unref0 (_data_->stderr_bytes);
			_g_bytes_unref0 (_data_->stdout_bytes);
			_g_object_unref0 (_data_->subprocess);
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			goto __catch0_g_error;
		}
		_data_->_tmp12_ = _data_->stdout_bytes;
		if (_data_->_tmp12_ != NULL) {
			_data_->_tmp13_ = _data_->stdout_bytes;
			_data_->_tmp14_ = 0;
			_data_->_tmp15_ = g_bytes_get_data (_data_->_tmp13_, &_data_->_tmp14_);
			_data_->_tmp16_ = proton_plus_utils_parser_data_to_string (_data_->_tmp15_, (gint) _data_->_tmp14_);
			_g_free0 (_data_->_tmp11_);
			_data_->_tmp11_ = _data_->_tmp16_;
		} else {
			_data_->_tmp17_ = g_strdup ("");
			_g_free0 (_data_->_tmp11_);
			_data_->_tmp11_ = _data_->_tmp17_;
		}
		_data_->_tmp18_ = _data_->_tmp11_;
		_data_->_tmp11_ = NULL;
		_data_->stdout = _data_->_tmp18_;
		_data_->_tmp20_ = _data_->stderr_bytes;
		if (_data_->_tmp20_ != NULL) {
			_data_->_tmp21_ = _data_->stderr_bytes;
			_data_->_tmp22_ = 0;
			_data_->_tmp23_ = g_bytes_get_data (_data_->_tmp21_, &_data_->_tmp22_);
			_data_->_tmp24_ = proton_plus_utils_parser_data_to_string (_data_->_tmp23_, (gint) _data_->_tmp22_);
			_g_free0 (_data_->_tmp19_);
			_data_->_tmp19_ = _data_->_tmp24_;
		} else {
			_data_->_tmp25_ = g_strdup ("");
			_g_free0 (_data_->_tmp19_);
			_data_->_tmp19_ = _data_->_tmp25_;
		}
		_data_->_tmp26_ = _data_->_tmp19_;
		_data_->_tmp19_ = NULL;
		_data_->stderr = _data_->_tmp26_;
		_data_->_tmp28_ = _data_->subprocess;
		if (g_subprocess_get_if_exited (_data_->_tmp28_)) {
			_data_->_tmp29_ = _data_->subprocess;
			_data_->_tmp27_ = g_subprocess_get_exit_status (_data_->_tmp29_);
		} else {
			_data_->_tmp27_ = -1;
		}
		_data_->exit_status = _data_->_tmp27_;
		_data_->_tmp30_ = _data_->stdout;
		_data_->_tmp31_ = _data_->stderr;
		_data_->_tmp32_ = proton_plus_utils_command_result_new (_data_->_tmp30_, _data_->_tmp31_, _data_->exit_status);
		_data_->result = _data_->_tmp32_;
		_g_free0 (_data_->stderr);
		_g_free0 (_data_->_tmp19_);
		_g_free0 (_data_->stdout);
		_g_free0 (_data_->_tmp11_);
		_g_bytes_unref0 (_data_->stderr_bytes);
		_g_bytes_unref0 (_data_->stdout_bytes);
		_g_object_unref0 (_data_->subprocess);
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp33_ = _data_->e;
		_data_->_tmp34_ = _data_->_tmp33_->message;
		_data_->_tmp35_ = proton_plus_utils_command_result_new ("", _data_->_tmp34_, -1);
		_data_->result = _data_->_tmp35_;
		_g_error_free0 (_data_->e);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
	g_clear_error (&_data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

ProtonPlusServicesHostFlatpakProcessQuery*
proton_plus_services_host_flatpak_process_query_construct (GType object_type)
{
	ProtonPlusServicesHostFlatpakProcessQuery * self = NULL;
	self = (ProtonPlusServicesHostFlatpakProcessQuery*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusServicesHostFlatpakProcessQuery*
proton_plus_services_host_flatpak_process_query_new (void)
{
	return proton_plus_services_host_flatpak_process_query_construct (PROTON_PLUS_SERVICES_TYPE_HOST_FLATPAK_PROCESS_QUERY);
}

static void
proton_plus_services_host_flatpak_process_query_class_init (ProtonPlusServicesHostFlatpakProcessQueryClass * klass,
                                                            gpointer klass_data)
{
	proton_plus_services_host_flatpak_process_query_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_services_host_flatpak_process_query_proton_plus_services_flatpak_host_process_query_interface_init (ProtonPlusServicesFlatpakHostProcessQueryIface * iface,
                                                                                                                gpointer iface_data)
{
	proton_plus_services_host_flatpak_process_query_proton_plus_services_flatpak_host_process_query_parent_iface = g_type_interface_peek_parent (iface);
	iface->run = (void (*) (ProtonPlusServicesFlatpakHostProcessQuery*, GAsyncReadyCallback, gpointer)) proton_plus_services_host_flatpak_process_query_real_run;
	iface->run_finish = (ProtonPlusUtilsCommandResult* (*) (ProtonPlusServicesFlatpakHostProcessQuery*, GAsyncResult*)) proton_plus_services_host_flatpak_process_query_run_finish;
}

static void
proton_plus_services_host_flatpak_process_query_instance_init (ProtonPlusServicesHostFlatpakProcessQuery * self,
                                                               gpointer klass)
{
}

static GType
proton_plus_services_host_flatpak_process_query_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesHostFlatpakProcessQueryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_host_flatpak_process_query_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesHostFlatpakProcessQuery), 0, (GInstanceInitFunc) proton_plus_services_host_flatpak_process_query_instance_init, NULL };
	static const GInterfaceInfo proton_plus_services_flatpak_host_process_query_info = { (GInterfaceInitFunc) proton_plus_services_host_flatpak_process_query_proton_plus_services_flatpak_host_process_query_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_services_host_flatpak_process_query_type_id;
	proton_plus_services_host_flatpak_process_query_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesHostFlatpakProcessQuery", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_services_host_flatpak_process_query_type_id, PROTON_PLUS_SERVICES_TYPE_FLATPAK_HOST_PROCESS_QUERY, &proton_plus_services_flatpak_host_process_query_info);
	return proton_plus_services_host_flatpak_process_query_type_id;
}

GType
proton_plus_services_host_flatpak_process_query_get_type (void)
{
	static volatile gsize proton_plus_services_host_flatpak_process_query_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_host_flatpak_process_query_type_id__once)) {
		GType proton_plus_services_host_flatpak_process_query_type_id;
		proton_plus_services_host_flatpak_process_query_type_id = proton_plus_services_host_flatpak_process_query_get_type_once ();
		g_once_init_leave (&proton_plus_services_host_flatpak_process_query_type_id__once, proton_plus_services_host_flatpak_process_query_type_id);
	}
	return proton_plus_services_host_flatpak_process_query_type_id__once;
}

static inline gpointer
proton_plus_services_flatpak_compatibility_process_query_backend_get_instance_private (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend_private_offset);
}

ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend*
proton_plus_services_flatpak_compatibility_process_query_backend_construct (GType object_type,
                                                                            ProtonPlusServicesFlatpakHostProcessQuery* host_query)
{
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend * self = NULL;
	ProtonPlusServicesFlatpakHostProcessQuery* _tmp0_ = NULL;
	ProtonPlusServicesFlatpakHostProcessQuery* _tmp1_;
	ProtonPlusServicesFlatpakHostProcessQuery* _tmp3_;
	self = (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend*) g_object_new (object_type, NULL);
	_tmp1_ = _g_object_ref0 (host_query);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		ProtonPlusServicesHostFlatpakProcessQuery* _tmp2_;
		_tmp2_ = proton_plus_services_host_flatpak_process_query_new ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (ProtonPlusServicesFlatpakHostProcessQuery*) _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->host_query);
	self->priv->host_query = _tmp3_;
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend*
proton_plus_services_flatpak_compatibility_process_query_backend_new (ProtonPlusServicesFlatpakHostProcessQuery* host_query)
{
	return proton_plus_services_flatpak_compatibility_process_query_backend_construct (PROTON_PLUS_SERVICES_TYPE_FLATPAK_COMPATIBILITY_PROCESS_QUERY_BACKEND, host_query);
}

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

static void
proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes (ProtonPlusServicesCompatibilityProcessQueryBackend* base,
                                                                                         GAsyncReadyCallback _callback_,
                                                                                         gpointer _user_data_)
{
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend * self;
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData* _data_;
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend* _tmp0_;
	self = (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend*) base;
	_data_ = g_slice_new0 (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes_co (_data_);
}

static ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_flatpak_compatibility_process_query_backend_inspect_processes_finish (ProtonPlusServicesCompatibilityProcessQueryBackend* base,
                                                                                           GAsyncResult* _res_)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_flatpak_compatibility_process_query_backend_inspect_processes_ready (GObject* source_object,
                                                                                          GAsyncResult* _res_,
                                                                                          gpointer _user_data_)
{
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes_co (_data_);
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static gboolean
proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes_co (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendInspectProcessesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->host_query;
	_data_->_state_ = 1;
	proton_plus_services_flatpak_host_process_query_run (_data_->_tmp0_, proton_plus_services_flatpak_compatibility_process_query_backend_inspect_processes_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_services_flatpak_host_process_query_run_finish (_data_->_tmp0_, _data_->_res_);
	_data_->command = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->command;
	_data_->_tmp3_ = proton_plus_utils_command_result_get_exit_status (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	if (_data_->_tmp4_ != 0) {
		_data_->_tmp5_ = _data_->command;
		_data_->_tmp6_ = proton_plus_utils_command_result_get_stderr (_data_->_tmp5_);
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = string_strip (_data_->_tmp7_);
		_data_->detail = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->detail;
		if (g_strcmp0 (_data_->_tmp9_, "") == 0) {
			_data_->_tmp10_ = _data_->command;
			_data_->_tmp11_ = proton_plus_utils_command_result_get_stdout (_data_->_tmp10_);
			_data_->_tmp12_ = _data_->_tmp11_;
			_data_->_tmp13_ = string_strip (_data_->_tmp12_);
			_g_free0 (_data_->detail);
			_data_->detail = _data_->_tmp13_;
		}
		_data_->_tmp14_ = _data_->detail;
		if (g_strcmp0 (_data_->_tmp14_, "") == 0) {
			_data_->_tmp15_ = g_strdup ("no diagnostic output");
			_g_free0 (_data_->detail);
			_data_->detail = _data_->_tmp15_;
		}
		_data_->_tmp16_ = _data_->command;
		_data_->_tmp17_ = proton_plus_utils_command_result_get_exit_status (_data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		if (_data_->_tmp18_ < 0) {
			_data_->_tmp19_ = _data_->detail;
			_data_->_tmp20_ = g_strdup_printf ("Unable to launch the Flatpak host process query: %s", _data_->_tmp19_);
			_data_->_tmp21_ = _data_->_tmp20_;
			_data_->_tmp22_ = proton_plus_services_compatibility_process_inspection_result_unknown (_data_->_tmp21_);
			_data_->_tmp23_ = _data_->_tmp22_;
			_g_free0 (_data_->_tmp21_);
			_data_->result = _data_->_tmp23_;
			_g_free0 (_data_->detail);
			_g_object_unref0 (_data_->command);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp24_ = _data_->command;
		_data_->_tmp25_ = proton_plus_utils_command_result_get_exit_status (_data_->_tmp24_);
		_data_->_tmp26_ = _data_->_tmp25_;
		_data_->_tmp27_ = _data_->detail;
		_data_->_tmp28_ = g_strdup_printf ("Flatpak host process query exited with status %d: %s", _data_->_tmp26_, _data_->_tmp27_);
		_data_->_tmp29_ = _data_->_tmp28_;
		_data_->_tmp30_ = proton_plus_services_compatibility_process_inspection_result_unknown (_data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		_g_free0 (_data_->_tmp29_);
		_data_->result = _data_->_tmp31_;
		_g_free0 (_data_->detail);
		_g_object_unref0 (_data_->command);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp32_ = gee_array_list_new (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_RECORD, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->records = _data_->_tmp32_;
	_data_->completed = FALSE;
	_data_->_tmp33_ = _data_->command;
	_data_->_tmp34_ = proton_plus_utils_command_result_get_stdout (_data_->_tmp33_);
	_data_->_tmp35_ = _data_->_tmp34_;
	_data_->_tmp37_ = _data_->_tmp36_ = g_strsplit (_data_->_tmp35_, "\n", 0);
	{
		_data_->line_collection_length1 = 0;
		_data_->_line_collection_size_ = 0;
		_data_->line_collection = _data_->_tmp37_;
		_data_->line_collection_length1 = _vala_array_length (_data_->_tmp36_);
		for (_data_->line_it = 0; _data_->line_it < _data_->line_collection_length1; _data_->line_it = _data_->line_it + 1) {
			_data_->_tmp38_ = g_strdup (_data_->line_collection[_data_->line_it]);
			_data_->line = _data_->_tmp38_;
			{
				_data_->_tmp39_ = _data_->line;
				if (g_strcmp0 (_data_->_tmp39_, "") == 0) {
					_g_free0 (_data_->line);
					continue;
				}
				_data_->_tmp40_ = _data_->line;
				if (g_strcmp0 (_data_->_tmp40_, "S\tOK") == 0) {
					if (_data_->completed) {
						_data_->_tmp41_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query returned duplicate completion records.");
						_data_->result = _data_->_tmp41_;
						_g_free0 (_data_->line);
						_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
						_g_object_unref0 (_data_->records);
						_g_object_unref0 (_data_->command);
						g_task_return_pointer (_data_->_async_result, _data_, NULL);
						if (_data_->_state_ != 0) {
							while (!g_task_get_completed (_data_->_async_result)) {
								g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
							}
						}
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->completed = TRUE;
					_g_free0 (_data_->line);
					continue;
				}
				if (_data_->completed) {
					_data_->_tmp42_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query returned data after completion.");
					_data_->result = _data_->_tmp42_;
					_g_free0 (_data_->line);
					_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_data_->records);
					_g_object_unref0 (_data_->command);
					g_task_return_pointer (_data_->_async_result, _data_, NULL);
					if (_data_->_state_ != 0) {
						while (!g_task_get_completed (_data_->_async_result)) {
							g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
						}
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_data_->_tmp43_ = _data_->line;
				_data_->_tmp45_ = _data_->_tmp44_ = g_strsplit (_data_->_tmp43_, "\t", 4);
				_data_->fields = _data_->_tmp45_;
				_data_->fields_length1 = _vala_array_length (_data_->_tmp44_);
				_data_->_fields_size_ = _data_->fields_length1;
				_data_->pid = 0;
				_data_->_tmp49_ = _data_->fields;
				_data_->_tmp49__length1 = _data_->fields_length1;
				if (_data_->_tmp49__length1 != 4) {
					_data_->_tmp48_ = TRUE;
				} else {
					_data_->_tmp50_ = _data_->fields;
					_data_->_tmp50__length1 = _data_->fields_length1;
					_data_->_tmp51_ = _data_->_tmp50_[0];
					_data_->_tmp48_ = g_strcmp0 (_data_->_tmp51_, "R") != 0;
				}
				if (_data_->_tmp48_) {
					_data_->_tmp47_ = TRUE;
				} else {
					_data_->_tmp52_ = _data_->fields;
					_data_->_tmp52__length1 = _data_->fields_length1;
					_data_->_tmp53_ = _data_->_tmp52_[1];
					_data_->_tmp54_ = 0;
					_data_->_tmp55_ = int_try_parse (_data_->_tmp53_, &_data_->_tmp54_, NULL, (guint) 0);
					_data_->pid = _data_->_tmp54_;
					_data_->_tmp47_ = !_data_->_tmp55_;
				}
				if (_data_->_tmp47_) {
					_data_->_tmp46_ = TRUE;
				} else {
					_data_->_tmp46_ = _data_->pid <= 0;
				}
				if (_data_->_tmp46_) {
					_data_->_tmp56_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query returned malformed output.");
					_data_->result = _data_->_tmp56_;
					_data_->fields = (_vala_array_free (_data_->fields, _data_->fields_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (_data_->line);
					_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_data_->records);
					_g_object_unref0 (_data_->command);
					g_task_return_pointer (_data_->_async_result, _data_, NULL);
					if (_data_->_state_ != 0) {
						while (!g_task_get_completed (_data_->_async_result)) {
							g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
						}
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_data_->_tmp57_ = g_new0 (guint8, 0);
				_data_->executable_bytes = _data_->_tmp57_;
				_data_->executable_bytes_length1 = 0;
				_data_->_executable_bytes_size_ = _data_->executable_bytes_length1;
				_data_->_tmp58_ = _data_->fields;
				_data_->_tmp58__length1 = _data_->fields_length1;
				_data_->_tmp59_ = _data_->_tmp58_[2];
				_data_->executable_available = g_strcmp0 (_data_->_tmp59_, "-") != 0;
				if (_data_->executable_available) {
					_data_->_tmp62_ = _data_->fields;
					_data_->_tmp62__length1 = _data_->fields_length1;
					_data_->_tmp63_ = _data_->_tmp62_[2];
					_data_->_tmp64_ = NULL;
					_data_->_tmp65_ = 0;
					_data_->_tmp66_ = proton_plus_services_flatpak_compatibility_process_query_backend_decode_base64_field (_data_->_tmp63_, &_data_->_tmp64_, &_data_->_tmp65_);
					_data_->executable_bytes = (g_free (_data_->executable_bytes), NULL);
					_data_->executable_bytes = _data_->_tmp64_;
					_data_->executable_bytes_length1 = _data_->_tmp65_;
					_data_->_executable_bytes_size_ = _data_->executable_bytes_length1;
					if (!_data_->_tmp66_) {
						_data_->_tmp61_ = TRUE;
					} else {
						_data_->_tmp67_ = _data_->executable_bytes;
						_data_->_tmp67__length1 = _data_->executable_bytes_length1;
						_data_->_tmp61_ = _data_->_tmp67__length1 == 0;
					}
					_data_->_tmp60_ = _data_->_tmp61_;
				} else {
					_data_->_tmp60_ = FALSE;
				}
				if (_data_->_tmp60_) {
					_data_->_tmp68_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query returned malformed process data.");
					_data_->result = _data_->_tmp68_;
					_data_->executable_bytes = (g_free (_data_->executable_bytes), NULL);
					_data_->fields = (_vala_array_free (_data_->fields, _data_->fields_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (_data_->line);
					_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_data_->records);
					_g_object_unref0 (_data_->command);
					g_task_return_pointer (_data_->_async_result, _data_, NULL);
					if (_data_->_state_ != 0) {
						while (!g_task_get_completed (_data_->_async_result)) {
							g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
						}
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_data_->_tmp69_ = g_new0 (guint8, 0);
				_data_->command_line = _data_->_tmp69_;
				_data_->command_line_length1 = 0;
				_data_->_command_line_size_ = _data_->command_line_length1;
				_data_->_tmp70_ = _data_->fields;
				_data_->_tmp70__length1 = _data_->fields_length1;
				_data_->_tmp71_ = _data_->_tmp70_[3];
				_data_->command_line_available = g_strcmp0 (_data_->_tmp71_, "-") != 0;
				if (_data_->command_line_available) {
					_data_->_tmp75_ = _data_->fields;
					_data_->_tmp75__length1 = _data_->fields_length1;
					_data_->_tmp76_ = _data_->_tmp75_[3];
					_data_->_tmp77_ = NULL;
					_data_->_tmp78_ = 0;
					_data_->_tmp79_ = proton_plus_services_flatpak_compatibility_process_query_backend_decode_base64_field (_data_->_tmp76_, &_data_->_tmp77_, &_data_->_tmp78_);
					_data_->command_line = (g_free (_data_->command_line), NULL);
					_data_->command_line = _data_->_tmp77_;
					_data_->command_line_length1 = _data_->_tmp78_;
					_data_->_command_line_size_ = _data_->command_line_length1;
					if (!_data_->_tmp79_) {
						_data_->_tmp74_ = TRUE;
					} else {
						_data_->_tmp80_ = _data_->command_line;
						_data_->_tmp80__length1 = _data_->command_line_length1;
						_data_->_tmp74_ = _data_->_tmp80__length1 == 0;
					}
					if (_data_->_tmp74_) {
						_data_->_tmp73_ = TRUE;
					} else {
						_data_->_tmp81_ = _data_->command_line;
						_data_->_tmp81__length1 = _data_->command_line_length1;
						_data_->_tmp73_ = !proton_plus_services_compatibility_process_record_cmdline_is_valid (_data_->_tmp81_, (gint) _data_->_tmp81__length1);
					}
					_data_->_tmp72_ = _data_->_tmp73_;
				} else {
					_data_->_tmp72_ = FALSE;
				}
				if (_data_->_tmp72_) {
					_data_->_tmp82_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query returned malformed process data.");
					_data_->result = _data_->_tmp82_;
					_data_->command_line = (g_free (_data_->command_line), NULL);
					_data_->executable_bytes = (g_free (_data_->executable_bytes), NULL);
					_data_->fields = (_vala_array_free (_data_->fields, _data_->fields_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (_data_->line);
					_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_data_->records);
					_g_object_unref0 (_data_->command);
					g_task_return_pointer (_data_->_async_result, _data_, NULL);
					if (_data_->_state_ != 0) {
						while (!g_task_get_completed (_data_->_async_result)) {
							g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
						}
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				if (_data_->executable_available) {
					_data_->_tmp84_ = _data_->executable_bytes;
					_data_->_tmp84__length1 = _data_->executable_bytes_length1;
					_data_->_tmp85_ = proton_plus_utils_parser_data_to_string (_data_->_tmp84_, (gint) _data_->_tmp84__length1);
					_g_free0 (_data_->_tmp83_);
					_data_->_tmp83_ = _data_->_tmp85_;
				} else {
					_data_->_tmp86_ = g_strdup ("");
					_g_free0 (_data_->_tmp83_);
					_data_->_tmp83_ = _data_->_tmp86_;
				}
				_data_->_tmp87_ = _data_->_tmp83_;
				_data_->_tmp83_ = NULL;
				_data_->executable = _data_->_tmp87_;
				if (_data_->executable_available) {
					_data_->_tmp89_ = _data_->executable;
					_data_->_tmp88_ = !g_utf8_validate (_data_->_tmp89_, (gssize) -1, NULL);
				} else {
					_data_->_tmp88_ = FALSE;
				}
				if (_data_->_tmp88_) {
					_data_->_tmp90_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query returned malformed executable data.");
					_data_->result = _data_->_tmp90_;
					_g_free0 (_data_->executable);
					_g_free0 (_data_->_tmp83_);
					_data_->command_line = (g_free (_data_->command_line), NULL);
					_data_->executable_bytes = (g_free (_data_->executable_bytes), NULL);
					_data_->fields = (_vala_array_free (_data_->fields, _data_->fields_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (_data_->line);
					_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
					_g_object_unref0 (_data_->records);
					_g_object_unref0 (_data_->command);
					g_task_return_pointer (_data_->_async_result, _data_, NULL);
					if (_data_->_state_ != 0) {
						while (!g_task_get_completed (_data_->_async_result)) {
							g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
						}
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				if (_data_->executable_available) {
					_data_->_tmp91_ = _data_->command_line_available;
				} else {
					_data_->_tmp91_ = FALSE;
				}
				if (_data_->_tmp91_) {
					_data_->_tmp92_ = _data_->records;
					_data_->_tmp93_ = _data_->executable;
					_data_->_tmp94_ = _data_->command_line;
					_data_->_tmp94__length1 = _data_->command_line_length1;
					_data_->_tmp95_ = proton_plus_services_compatibility_process_record_new_from_cmdline_bytes (_data_->pid, _data_->_tmp93_, _data_->_tmp94_, _data_->_tmp94__length1);
					_data_->_tmp96_ = _data_->_tmp95_;
					gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp92_, _data_->_tmp96_);
					_g_object_unref0 (_data_->_tmp96_);
				} else {
					if (_data_->command_line_available) {
						_data_->_tmp97_ = _data_->records;
						_data_->_tmp98_ = _data_->command_line;
						_data_->_tmp98__length1 = _data_->command_line_length1;
						_data_->_tmp99_ = g_strdup_printf ("Unable to inspect the executable of same-user host process %d.", _data_->pid);
						_data_->_tmp100_ = _data_->_tmp99_;
						_data_->_tmp101_ = proton_plus_services_compatibility_process_record_new_with_unreadable_executable (_data_->pid, _data_->_tmp98_, _data_->_tmp98__length1, _data_->_tmp100_);
						_data_->_tmp102_ = _data_->_tmp101_;
						gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp97_, _data_->_tmp102_);
						_g_object_unref0 (_data_->_tmp102_);
						_g_free0 (_data_->_tmp100_);
					} else {
						if (_data_->executable_available) {
							_data_->_tmp103_ = _data_->records;
							_data_->_tmp104_ = _data_->executable;
							_data_->_tmp105_ = g_strdup_printf ("Unable to inspect the command line of same-user host process %d.", _data_->pid);
							_data_->_tmp106_ = _data_->_tmp105_;
							_data_->_tmp107_ = proton_plus_services_compatibility_process_record_new_with_unreadable_argv (_data_->pid, _data_->_tmp104_, _data_->_tmp106_);
							_data_->_tmp108_ = _data_->_tmp107_;
							gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp103_, _data_->_tmp108_);
							_g_object_unref0 (_data_->_tmp108_);
							_g_free0 (_data_->_tmp106_);
						} else {
							_data_->_tmp109_ = _data_->records;
							_data_->_tmp110_ = g_strdup_printf ("Unable to inspect the executable and command line of same-user host pr" \
"ocess %d.", _data_->pid);
							_data_->_tmp111_ = _data_->_tmp110_;
							_data_->_tmp112_ = proton_plus_services_compatibility_process_record_new_with_unreadable_metadata (_data_->pid, _data_->_tmp111_);
							_data_->_tmp113_ = _data_->_tmp112_;
							gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp109_, _data_->_tmp113_);
							_g_object_unref0 (_data_->_tmp113_);
							_g_free0 (_data_->_tmp111_);
						}
					}
				}
				_g_free0 (_data_->executable);
				_g_free0 (_data_->_tmp83_);
				_data_->command_line = (g_free (_data_->command_line), NULL);
				_data_->executable_bytes = (g_free (_data_->executable_bytes), NULL);
				_data_->fields = (_vala_array_free (_data_->fields, _data_->fields_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (_data_->line);
			}
		}
		_data_->line_collection = (_vala_array_free (_data_->line_collection, _data_->line_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	if (!_data_->completed) {
		_data_->_tmp114_ = proton_plus_services_compatibility_process_inspection_result_unknown ("The Flatpak host process query did not report a completed scan.");
		_data_->result = _data_->_tmp114_;
		_g_object_unref0 (_data_->records);
		_g_object_unref0 (_data_->command);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp115_ = _data_->records;
	_data_->_tmp116_ = proton_plus_services_compatibility_process_inspection_result_clear ((GeeList*) _data_->_tmp115_);
	_data_->result = _data_->_tmp116_;
	_g_object_unref0 (_data_->records);
	_g_object_unref0 (_data_->command);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static gboolean
proton_plus_services_flatpak_compatibility_process_query_backend_decode_base64_field (const gchar* encoded,
                                                                                      guint8** decoded,
                                                                                      gint* decoded_length1)
{
	guint8* _vala_decoded = NULL;
	gint _vala_decoded_length1 = 0;
	gsize _tmp0_ = 0;
	guchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gint _tmp3_;
	gint _tmp4_;
	gboolean result;
	g_return_val_if_fail (encoded != NULL, FALSE);
	_tmp1_ = g_base64_decode (encoded, &_tmp0_);
	_vala_decoded = (g_free (_vala_decoded), NULL);
	_vala_decoded = _tmp1_;
	_vala_decoded_length1 = _tmp0_;
	_tmp3_ = strlen (encoded);
	_tmp4_ = _tmp3_;
	if ((_tmp4_ % 4) == 0) {
		guint8* _tmp5_;
		gint _tmp5__length1;
		gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp5_ = _vala_decoded;
		_tmp5__length1 = _vala_decoded_length1;
		_tmp6_ = g_base64_encode (_tmp5_, (gint) _tmp5__length1);
		_tmp7_ = _tmp6_;
		_tmp2_ = g_strcmp0 (_tmp7_, encoded) == 0;
		_g_free0 (_tmp7_);
	} else {
		_tmp2_ = FALSE;
	}
	result = _tmp2_;
	if (decoded) {
		*decoded = _vala_decoded;
	} else {
		_vala_decoded = (g_free (_vala_decoded), NULL);
	}
	if (decoded_length1) {
		*decoded_length1 = _vala_decoded_length1;
	}
	return result;
}

static void
proton_plus_services_flatpak_compatibility_process_query_backend_class_init (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendClass * klass,
                                                                             gpointer klass_data)
{
	proton_plus_services_flatpak_compatibility_process_query_backend_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_flatpak_compatibility_process_query_backend_finalize;
}

static void
proton_plus_services_flatpak_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_interface_init (ProtonPlusServicesCompatibilityProcessQueryBackendIface * iface,
                                                                                                                                          gpointer iface_data)
{
	proton_plus_services_flatpak_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_parent_iface = g_type_interface_peek_parent (iface);
	iface->inspect_processes = (void (*) (ProtonPlusServicesCompatibilityProcessQueryBackend*, GAsyncReadyCallback, gpointer)) proton_plus_services_flatpak_compatibility_process_query_backend_real_inspect_processes;
	iface->inspect_processes_finish = (ProtonPlusServicesCompatibilityProcessInspectionResult* (*) (ProtonPlusServicesCompatibilityProcessQueryBackend*, GAsyncResult*)) proton_plus_services_flatpak_compatibility_process_query_backend_inspect_processes_finish;
}

static void
proton_plus_services_flatpak_compatibility_process_query_backend_instance_init (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend * self,
                                                                                gpointer klass)
{
	self->priv = proton_plus_services_flatpak_compatibility_process_query_backend_get_instance_private (self);
}

static void
proton_plus_services_flatpak_compatibility_process_query_backend_finalize (GObject * obj)
{
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_FLATPAK_COMPATIBILITY_PROCESS_QUERY_BACKEND, ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend);
	_g_object_unref0 (self->priv->host_query);
	G_OBJECT_CLASS (proton_plus_services_flatpak_compatibility_process_query_backend_parent_class)->finalize (obj);
}

static GType
proton_plus_services_flatpak_compatibility_process_query_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_flatpak_compatibility_process_query_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend), 0, (GInstanceInitFunc) proton_plus_services_flatpak_compatibility_process_query_backend_instance_init, NULL };
	static const GInterfaceInfo proton_plus_services_compatibility_process_query_backend_info = { (GInterfaceInitFunc) proton_plus_services_flatpak_compatibility_process_query_backend_proton_plus_services_compatibility_process_query_backend_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType proton_plus_services_flatpak_compatibility_process_query_backend_type_id;
	proton_plus_services_flatpak_compatibility_process_query_backend_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend", &g_define_type_info, 0);
	g_type_add_interface_static (proton_plus_services_flatpak_compatibility_process_query_backend_type_id, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_QUERY_BACKEND, &proton_plus_services_compatibility_process_query_backend_info);
	ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend_private_offset = g_type_add_instance_private (proton_plus_services_flatpak_compatibility_process_query_backend_type_id, sizeof (ProtonPlusServicesFlatpakCompatibilityProcessQueryBackendPrivate));
	return proton_plus_services_flatpak_compatibility_process_query_backend_type_id;
}

GType
proton_plus_services_flatpak_compatibility_process_query_backend_get_type (void)
{
	static volatile gsize proton_plus_services_flatpak_compatibility_process_query_backend_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_flatpak_compatibility_process_query_backend_type_id__once)) {
		GType proton_plus_services_flatpak_compatibility_process_query_backend_type_id;
		proton_plus_services_flatpak_compatibility_process_query_backend_type_id = proton_plus_services_flatpak_compatibility_process_query_backend_get_type_once ();
		g_once_init_leave (&proton_plus_services_flatpak_compatibility_process_query_backend_type_id__once, proton_plus_services_flatpak_compatibility_process_query_backend_type_id);
	}
	return proton_plus_services_flatpak_compatibility_process_query_backend_type_id__once;
}

static inline gpointer
proton_plus_services_compatibility_process_guard_get_instance_private (ProtonPlusServicesCompatibilityProcessGuard* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusServicesCompatibilityProcessGuard_private_offset);
}

ProtonPlusServicesCompatibilityProcessGuard*
proton_plus_services_compatibility_process_guard_construct (GType object_type,
                                                            ProtonPlusServicesCompatibilityProcessQueryBackend* backend)
{
	ProtonPlusServicesCompatibilityProcessGuard * self = NULL;
	ProtonPlusServicesCompatibilityProcessQueryBackend* _tmp0_ = NULL;
	ProtonPlusServicesCompatibilityProcessQueryBackend* _tmp1_;
	ProtonPlusServicesCompatibilityProcessQueryBackend* _tmp3_;
	self = (ProtonPlusServicesCompatibilityProcessGuard*) g_object_new (object_type, NULL);
	_tmp1_ = _g_object_ref0 (backend);
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		ProtonPlusServicesNativeCompatibilityProcessQueryBackend* _tmp2_;
		_tmp2_ = proton_plus_services_native_compatibility_process_query_backend_new ("/proc");
		_g_object_unref0 (_tmp0_);
		_tmp0_ = (ProtonPlusServicesCompatibilityProcessQueryBackend*) _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->backend);
	self->priv->backend = _tmp3_;
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusServicesCompatibilityProcessGuard*
proton_plus_services_compatibility_process_guard_new (ProtonPlusServicesCompatibilityProcessQueryBackend* backend)
{
	return proton_plus_services_compatibility_process_guard_construct (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_GUARD, backend);
}

ProtonPlusServicesCompatibilityProcessGuard*
proton_plus_services_compatibility_process_guard_construct_for_package (GType object_type,
                                                                        gboolean is_flatpak)
{
	ProtonPlusServicesCompatibilityProcessGuard * self = NULL;
	self = (ProtonPlusServicesCompatibilityProcessGuard*) g_object_new (object_type, NULL);
	if (is_flatpak) {
		ProtonPlusServicesFlatpakCompatibilityProcessQueryBackend* _tmp0_;
		_tmp0_ = proton_plus_services_flatpak_compatibility_process_query_backend_new (NULL);
		_g_object_unref0 (self->priv->backend);
		self->priv->backend = (ProtonPlusServicesCompatibilityProcessQueryBackend*) _tmp0_;
	} else {
		ProtonPlusServicesNativeCompatibilityProcessQueryBackend* _tmp1_;
		_tmp1_ = proton_plus_services_native_compatibility_process_query_backend_new ("/proc");
		_g_object_unref0 (self->priv->backend);
		self->priv->backend = (ProtonPlusServicesCompatibilityProcessQueryBackend*) _tmp1_;
	}
	return self;
}

ProtonPlusServicesCompatibilityProcessGuard*
proton_plus_services_compatibility_process_guard_new_for_package (gboolean is_flatpak)
{
	return proton_plus_services_compatibility_process_guard_construct_for_package (PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_GUARD, is_flatpak);
}

static void
proton_plus_services_compatibility_process_guard_inspect_data_free (gpointer _data)
{
	ProtonPlusServicesCompatibilityProcessGuardInspectData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->context);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusServicesCompatibilityProcessGuardInspectData, _data_);
}

void
proton_plus_services_compatibility_process_guard_inspect (ProtonPlusServicesCompatibilityProcessGuard* self,
                                                          ProtonPlusServicesCompatibilityProcessOperationContext* context,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_)
{
	ProtonPlusServicesCompatibilityProcessGuardInspectData* _data_;
	ProtonPlusServicesCompatibilityProcessGuard* _tmp0_;
	ProtonPlusServicesCompatibilityProcessOperationContext* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	_data_ = g_slice_new0 (ProtonPlusServicesCompatibilityProcessGuardInspectData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_services_compatibility_process_guard_inspect_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (context);
	_g_object_unref0 (_data_->context);
	_data_->context = _tmp1_;
	proton_plus_services_compatibility_process_guard_inspect_co (_data_);
}

ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_guard_inspect_finish (ProtonPlusServicesCompatibilityProcessGuard* self,
                                                                 GAsyncResult* _res_)
{
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	ProtonPlusServicesCompatibilityProcessGuardInspectData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
proton_plus_services_compatibility_process_guard_inspect_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_)
{
	ProtonPlusServicesCompatibilityProcessGuardInspectData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_services_compatibility_process_guard_inspect_co (_data_);
}

static gboolean
proton_plus_services_compatibility_process_guard_inspect_co (ProtonPlusServicesCompatibilityProcessGuardInspectData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->backend;
	_data_->_state_ = 1;
	proton_plus_services_compatibility_process_query_backend_inspect_processes (_data_->_tmp0_, proton_plus_services_compatibility_process_guard_inspect_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = proton_plus_services_compatibility_process_query_backend_inspect_processes_finish (_data_->_tmp0_, _data_->_res_);
	_data_->observation = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->observation;
	_data_->_tmp3_ = proton_plus_services_compatibility_process_inspection_result_get_status (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	if (_data_->_tmp4_ == PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_INSPECTION_STATUS_UNKNOWN) {
		_data_->result = _data_->observation;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp5_ = _data_->observation;
	_data_->_tmp6_ = proton_plus_services_compatibility_process_inspection_result_get_processes (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = proton_plus_services_compatibility_process_guard_inspect_records (_data_->_tmp7_, _data_->context);
	_data_->result = _data_->_tmp8_;
	_g_object_unref0 (_data_->observation);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

ProtonPlusServicesCompatibilityProcessInspectionResult*
proton_plus_services_compatibility_process_guard_inspect_records (GeeList* processes,
                                                                  ProtonPlusServicesCompatibilityProcessOperationContext* context)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp35_;
	ProtonPlusServicesCompatibilityProcessInspectionResult* result;
	g_return_val_if_fail (processes != NULL, NULL);
	g_return_val_if_fail (context != NULL, NULL);
	_tmp0_ = proton_plus_services_compatibility_process_operation_context_get_mutates_existing_destination (context);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp2_;
		_tmp2_ = proton_plus_services_compatibility_process_inspection_result_clear (NULL);
		result = _tmp2_;
		return result;
	}
	{
		GeeList* _process_list = NULL;
		gint _process_size = 0;
		GeeList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _process_index = 0;
		_process_list = processes;
		_tmp3_ = _process_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_process_size = _tmp5_;
		_process_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			ProtonPlusServicesCompatibilityProcessRecord* process = NULL;
			GeeList* _tmp8_;
			gpointer _tmp9_;
			ProtonPlusServicesCompatibilityProcessMatchReason reason = 0;
			ProtonPlusServicesCompatibilityProcessRecord* _tmp10_;
			const gchar* _tmp11_;
			const gchar* _tmp12_;
			_process_index = _process_index + 1;
			_tmp6_ = _process_index;
			_tmp7_ = _process_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _process_list;
			_tmp9_ = gee_list_get (_tmp8_, _process_index);
			process = (ProtonPlusServicesCompatibilityProcessRecord*) _tmp9_;
			_tmp10_ = process;
			_tmp11_ = proton_plus_services_compatibility_process_operation_context_get_installation_path (context);
			_tmp12_ = _tmp11_;
			reason = proton_plus_services_compatibility_process_guard_target_association_reason (_tmp10_, _tmp12_);
			if (reason != PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE) {
				ProtonPlusServicesCompatibilityProcessRecord* _tmp13_;
				ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp14_;
				_tmp13_ = process;
				_tmp14_ = proton_plus_services_compatibility_process_inspection_result_active (_tmp13_, reason);
				result = _tmp14_;
				_g_object_unref0 (process);
				return result;
			}
			_g_object_unref0 (process);
		}
	}
	{
		GeeList* _process_list = NULL;
		gint _process_size = 0;
		GeeList* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint _process_index = 0;
		_process_list = processes;
		_tmp15_ = _process_list;
		_tmp16_ = gee_collection_get_size ((GeeCollection*) _tmp15_);
		_tmp17_ = _tmp16_;
		_process_size = _tmp17_;
		_process_index = -1;
		while (TRUE) {
			gint _tmp18_;
			gint _tmp19_;
			ProtonPlusServicesCompatibilityProcessRecord* process = NULL;
			GeeList* _tmp20_;
			gpointer _tmp21_;
			ProtonPlusServicesCompatibilityProcessRecord* _tmp22_;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			_process_index = _process_index + 1;
			_tmp18_ = _process_index;
			_tmp19_ = _process_size;
			if (!(_tmp18_ < _tmp19_)) {
				break;
			}
			_tmp20_ = _process_list;
			_tmp21_ = gee_list_get (_tmp20_, _process_index);
			process = (ProtonPlusServicesCompatibilityProcessRecord*) _tmp21_;
			_tmp22_ = process;
			_tmp23_ = proton_plus_services_compatibility_process_operation_context_get_installation_path (context);
			_tmp24_ = _tmp23_;
			if (proton_plus_services_compatibility_process_guard_incomplete_evidence_could_associate_with_target (_tmp22_, _tmp24_)) {
				gchar* _tmp25_ = NULL;
				ProtonPlusServicesCompatibilityProcessRecord* _tmp26_;
				const gchar* _tmp27_;
				const gchar* _tmp28_;
				gchar* _tmp29_;
				ProtonPlusServicesCompatibilityProcessInspectionResult* _tmp34_;
				_tmp26_ = process;
				_tmp27_ = proton_plus_services_compatibility_process_record_get_inspection_error (_tmp26_);
				_tmp28_ = _tmp27_;
				_tmp29_ = g_strdup (_tmp28_);
				_tmp25_ = _tmp29_;
				if (_tmp25_ == NULL) {
					ProtonPlusServicesCompatibilityProcessRecord* _tmp30_;
					gint _tmp31_;
					gint _tmp32_;
					gchar* _tmp33_;
					_tmp30_ = process;
					_tmp31_ = proton_plus_services_compatibility_process_record_get_pid (_tmp30_);
					_tmp32_ = _tmp31_;
					_tmp33_ = g_strdup_printf ("Process %d returned incomplete process metadata.", _tmp32_);
					_g_free0 (_tmp25_);
					_tmp25_ = _tmp33_;
				}
				_tmp34_ = proton_plus_services_compatibility_process_inspection_result_unknown (_tmp25_);
				result = _tmp34_;
				_g_free0 (_tmp25_);
				_g_object_unref0 (process);
				return result;
			}
			_g_object_unref0 (process);
		}
	}
	_tmp35_ = proton_plus_services_compatibility_process_inspection_result_clear (NULL);
	result = _tmp35_;
	return result;
}

gboolean
proton_plus_services_compatibility_process_guard_is_compatibility_process (ProtonPlusServicesCompatibilityProcessRecord* process)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean result;
	g_return_val_if_fail (process != NULL, FALSE);
	_tmp0_ = proton_plus_services_compatibility_process_record_get_executable_path (process);
	_tmp1_ = _tmp0_;
	if (proton_plus_services_compatibility_process_guard_is_runner_token (_tmp1_)) {
		result = TRUE;
		return result;
	}
	{
		GeeList* _argument_list = NULL;
		GeeList* _tmp2_;
		GeeList* _tmp3_;
		gint _argument_size = 0;
		GeeList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _argument_index = 0;
		_tmp2_ = proton_plus_services_compatibility_process_record_get_argv (process);
		_tmp3_ = _tmp2_;
		_argument_list = _tmp3_;
		_tmp4_ = _argument_list;
		_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_argument_size = _tmp6_;
		_argument_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			gchar* argument = NULL;
			GeeList* _tmp9_;
			gpointer _tmp10_;
			const gchar* _tmp11_;
			_argument_index = _argument_index + 1;
			_tmp7_ = _argument_index;
			_tmp8_ = _argument_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _argument_list;
			_tmp10_ = gee_list_get (_tmp9_, _argument_index);
			argument = (gchar*) _tmp10_;
			_tmp11_ = argument;
			if (proton_plus_services_compatibility_process_guard_is_runner_token (_tmp11_)) {
				result = TRUE;
				_g_free0 (argument);
				return result;
			}
			_g_free0 (argument);
		}
	}
	result = FALSE;
	return result;
}

static gboolean
proton_plus_services_compatibility_process_guard_is_runner_token (const gchar* value)
{
	gchar* basename = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	const gchar* _tmp11_;
	gboolean result;
	g_return_val_if_fail (value != NULL, FALSE);
	_tmp0_ = g_path_get_basename (value);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_ascii_strdown (_tmp1_, (gssize) -1);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	basename = _tmp3_;
	_tmp11_ = basename;
	if (g_strcmp0 (_tmp11_, "proton") == 0) {
		_tmp10_ = TRUE;
	} else {
		const gchar* _tmp12_;
		_tmp12_ = basename;
		_tmp10_ = g_strcmp0 (_tmp12_, "umu") == 0;
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		const gchar* _tmp13_;
		_tmp13_ = basename;
		_tmp9_ = g_strcmp0 (_tmp13_, "umu-run") == 0;
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp14_;
		_tmp14_ = basename;
		_tmp8_ = g_strcmp0 (_tmp14_, "wine") == 0;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		const gchar* _tmp15_;
		_tmp15_ = basename;
		_tmp7_ = g_strcmp0 (_tmp15_, "wine64") == 0;
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		const gchar* _tmp16_;
		_tmp16_ = basename;
		_tmp6_ = g_strcmp0 (_tmp16_, "wine-preloader") == 0;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		const gchar* _tmp17_;
		_tmp17_ = basename;
		_tmp5_ = g_strcmp0 (_tmp17_, "wine64-preloader") == 0;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp18_;
		_tmp18_ = basename;
		_tmp4_ = g_strcmp0 (_tmp18_, "wineserver") == 0;
	}
	result = _tmp4_;
	_g_free0 (basename);
	return result;
}

static ProtonPlusServicesCompatibilityProcessMatchReason
proton_plus_services_compatibility_process_guard_target_association_reason (ProtonPlusServicesCompatibilityProcessRecord* process,
                                                                            const gchar* installation_path)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_;
	gboolean _tmp22_;
	ProtonPlusServicesCompatibilityProcessMatchReason result;
	g_return_val_if_fail (process != NULL, 0);
	g_return_val_if_fail (installation_path != NULL, 0);
	_tmp1_ = proton_plus_services_compatibility_process_record_get_executable_available (process);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = proton_plus_services_compatibility_process_record_get_executable_path (process);
		_tmp4_ = _tmp3_;
		_tmp0_ = proton_plus_services_compatibility_process_guard_path_is_within (_tmp4_, installation_path);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		result = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_EXECUTABLE_IN_TARGET;
		return result;
	}
	_tmp8_ = proton_plus_services_compatibility_process_record_get_executable_available (process);
	_tmp9_ = _tmp8_;
	if (!_tmp9_) {
		gboolean _tmp10_;
		gboolean _tmp11_;
		_tmp10_ = proton_plus_services_compatibility_process_record_get_argv_available (process);
		_tmp11_ = _tmp10_;
		_tmp7_ = _tmp11_;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		GeeList* _tmp12_;
		GeeList* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		_tmp12_ = proton_plus_services_compatibility_process_record_get_argv (process);
		_tmp13_ = _tmp12_;
		_tmp14_ = gee_collection_get_size ((GeeCollection*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp6_ = _tmp15_ > 0;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		GeeList* _tmp16_;
		GeeList* _tmp17_;
		gpointer _tmp18_;
		gchar* _tmp19_;
		_tmp16_ = proton_plus_services_compatibility_process_record_get_argv (process);
		_tmp17_ = _tmp16_;
		_tmp18_ = gee_list_get (_tmp17_, 0);
		_tmp19_ = (gchar*) _tmp18_;
		_tmp5_ = proton_plus_services_compatibility_process_guard_path_is_within (_tmp19_, installation_path);
		_g_free0 (_tmp19_);
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		result = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_EXECUTABLE_IN_TARGET;
		return result;
	}
	_tmp21_ = proton_plus_services_compatibility_process_record_get_argv_available (process);
	_tmp22_ = _tmp21_;
	if (!_tmp22_) {
		_tmp20_ = TRUE;
	} else {
		_tmp20_ = !proton_plus_services_compatibility_process_guard_is_compatibility_process (process);
	}
	if (_tmp20_) {
		result = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE;
		return result;
	}
	{
		GeeList* _argument_list = NULL;
		GeeList* _tmp23_;
		GeeList* _tmp24_;
		gint _argument_size = 0;
		GeeList* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		gint _argument_index = 0;
		_tmp23_ = proton_plus_services_compatibility_process_record_get_argv (process);
		_tmp24_ = _tmp23_;
		_argument_list = _tmp24_;
		_tmp25_ = _argument_list;
		_tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_);
		_tmp27_ = _tmp26_;
		_argument_size = _tmp27_;
		_argument_index = -1;
		while (TRUE) {
			gint _tmp28_;
			gint _tmp29_;
			gchar* argument = NULL;
			GeeList* _tmp30_;
			gpointer _tmp31_;
			const gchar* _tmp32_;
			_argument_index = _argument_index + 1;
			_tmp28_ = _argument_index;
			_tmp29_ = _argument_size;
			if (!(_tmp28_ < _tmp29_)) {
				break;
			}
			_tmp30_ = _argument_list;
			_tmp31_ = gee_list_get (_tmp30_, _argument_index);
			argument = (gchar*) _tmp31_;
			_tmp32_ = argument;
			if (proton_plus_services_compatibility_process_guard_path_is_within (_tmp32_, installation_path)) {
				result = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_ARGUMENT_PATH_IN_TARGET;
				_g_free0 (argument);
				return result;
			}
			_g_free0 (argument);
		}
	}
	result = PROTON_PLUS_SERVICES_COMPATIBILITY_PROCESS_MATCH_REASON_NONE;
	return result;
}

static gboolean
proton_plus_services_compatibility_process_guard_incomplete_evidence_could_associate_with_target (ProtonPlusServicesCompatibilityProcessRecord* process,
                                                                                                  const gchar* installation_path)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gboolean result;
	g_return_val_if_fail (process != NULL, FALSE);
	g_return_val_if_fail (installation_path != NULL, FALSE);
	if (proton_plus_services_compatibility_process_record_has_complete_metadata (process)) {
		result = FALSE;
		return result;
	}
	_tmp1_ = proton_plus_services_compatibility_process_record_get_executable_available (process);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp3_ = proton_plus_services_compatibility_process_record_get_argv_available (process);
		_tmp4_ = _tmp3_;
		_tmp0_ = !_tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		result = TRUE;
		return result;
	}
	_tmp5_ = proton_plus_services_compatibility_process_record_get_executable_available (process);
	_tmp6_ = _tmp5_;
	if (!_tmp6_) {
		{
			GeeList* _argument_list = NULL;
			GeeList* _tmp7_;
			GeeList* _tmp8_;
			gint _argument_size = 0;
			GeeList* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gint _argument_index = 0;
			_tmp7_ = proton_plus_services_compatibility_process_record_get_argv (process);
			_tmp8_ = _tmp7_;
			_argument_list = _tmp8_;
			_tmp9_ = _argument_list;
			_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
			_tmp11_ = _tmp10_;
			_argument_size = _tmp11_;
			_argument_index = -1;
			while (TRUE) {
				gint _tmp12_;
				gint _tmp13_;
				gchar* argument = NULL;
				GeeList* _tmp14_;
				gpointer _tmp15_;
				gboolean _tmp16_ = FALSE;
				const gchar* _tmp17_;
				_argument_index = _argument_index + 1;
				_tmp12_ = _argument_index;
				_tmp13_ = _argument_size;
				if (!(_tmp12_ < _tmp13_)) {
					break;
				}
				_tmp14_ = _argument_list;
				_tmp15_ = gee_list_get (_tmp14_, _argument_index);
				argument = (gchar*) _tmp15_;
				_tmp17_ = argument;
				if (proton_plus_services_compatibility_process_guard_is_runner_token (_tmp17_)) {
					const gchar* _tmp18_;
					_tmp18_ = argument;
					_tmp16_ = !g_path_is_absolute (_tmp18_);
				} else {
					_tmp16_ = FALSE;
				}
				if (_tmp16_) {
					result = TRUE;
					_g_free0 (argument);
					return result;
				}
				_g_free0 (argument);
			}
		}
		result = FALSE;
		return result;
	}
	_tmp19_ = proton_plus_services_compatibility_process_record_get_executable_path (process);
	_tmp20_ = _tmp19_;
	result = proton_plus_services_compatibility_process_guard_executable_can_launch_runner_argument (_tmp20_);
	return result;
}

static gboolean
proton_plus_services_compatibility_process_guard_executable_can_launch_runner_argument (const gchar* executable)
{
	gchar* basename = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	const gchar* _tmp11_;
	gboolean result;
	g_return_val_if_fail (executable != NULL, FALSE);
	_tmp0_ = g_path_get_basename (executable);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_ascii_strdown (_tmp1_, (gssize) -1);
	_tmp3_ = _tmp2_;
	_g_free0 (_tmp1_);
	basename = _tmp3_;
	_tmp11_ = basename;
	if (g_strcmp0 (_tmp11_, "env") == 0) {
		_tmp10_ = TRUE;
	} else {
		const gchar* _tmp12_;
		_tmp12_ = basename;
		_tmp10_ = g_strcmp0 (_tmp12_, "sh") == 0;
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		const gchar* _tmp13_;
		_tmp13_ = basename;
		_tmp9_ = g_strcmp0 (_tmp13_, "bash") == 0;
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp14_;
		_tmp14_ = basename;
		_tmp8_ = g_strcmp0 (_tmp14_, "dash") == 0;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		const gchar* _tmp15_;
		_tmp15_ = basename;
		_tmp7_ = g_strcmp0 (_tmp15_, "zsh") == 0;
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		const gchar* _tmp16_;
		_tmp16_ = basename;
		_tmp6_ = g_strcmp0 (_tmp16_, "fish") == 0;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		const gchar* _tmp17_;
		_tmp17_ = basename;
		_tmp5_ = g_strcmp0 (_tmp17_, "perl") == 0;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp18_;
		_tmp18_ = basename;
		_tmp4_ = g_str_has_prefix (_tmp18_, "python");
	}
	result = _tmp4_;
	_g_free0 (basename);
	return result;
}

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

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

static gboolean
proton_plus_services_compatibility_process_guard_path_is_within (const gchar* candidate,
                                                                 const gchar* target)
{
	gboolean _tmp0_ = FALSE;
	gchar* cleaned = NULL;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* canonical = NULL;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* resolved = NULL;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_ = NULL;
	const gchar* _tmp15_;
	gchar* normalized = NULL;
	gchar* _tmp17_;
	gboolean _tmp18_ = FALSE;
	const gchar* _tmp19_;
	gboolean result;
	g_return_val_if_fail (candidate != NULL, FALSE);
	g_return_val_if_fail (target != NULL, FALSE);
	if (!g_path_is_absolute (candidate)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (target, "") == 0;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp1_ = g_strdup (candidate);
	cleaned = _tmp1_;
	_tmp2_ = cleaned;
	if (g_str_has_suffix (_tmp2_, " (deleted)")) {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		gchar* _tmp9_;
		_tmp3_ = cleaned;
		_tmp4_ = cleaned;
		_tmp5_ = strlen (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = strlen (" (deleted)");
		_tmp8_ = _tmp7_;
		_tmp9_ = string_substring (_tmp3_, (glong) 0, (glong) (_tmp6_ - _tmp8_));
		_g_free0 (cleaned);
		cleaned = _tmp9_;
	}
	_tmp10_ = cleaned;
	_tmp11_ = g_canonicalize_filename (_tmp10_, NULL);
	canonical = _tmp11_;
	_tmp12_ = canonical;
	_tmp13_ = realpath (_tmp12_, NULL);
	resolved = _tmp13_;
	_tmp15_ = resolved;
	_tmp14_ = _tmp15_;
	if (_tmp14_ == NULL) {
		const gchar* _tmp16_;
		_tmp16_ = canonical;
		_tmp14_ = _tmp16_;
	}
	_tmp17_ = g_strdup (_tmp14_);
	normalized = _tmp17_;
	_tmp19_ = normalized;
	if (g_strcmp0 (_tmp19_, target) == 0) {
		_tmp18_ = TRUE;
	} else {
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp20_ = normalized;
		_tmp21_ = g_strconcat (target, G_DIR_SEPARATOR_S, NULL);
		_tmp22_ = _tmp21_;
		_tmp18_ = g_str_has_prefix (_tmp20_, _tmp22_);
		_g_free0 (_tmp22_);
	}
	result = _tmp18_;
	_g_free0 (normalized);
	_g_free0 (resolved);
	_g_free0 (canonical);
	_g_free0 (cleaned);
	return result;
}

static void
proton_plus_services_compatibility_process_guard_class_init (ProtonPlusServicesCompatibilityProcessGuardClass * klass,
                                                             gpointer klass_data)
{
	proton_plus_services_compatibility_process_guard_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusServicesCompatibilityProcessGuard_private_offset);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_services_compatibility_process_guard_finalize;
}

static void
proton_plus_services_compatibility_process_guard_instance_init (ProtonPlusServicesCompatibilityProcessGuard * self,
                                                                gpointer klass)
{
	self->priv = proton_plus_services_compatibility_process_guard_get_instance_private (self);
}

static void
proton_plus_services_compatibility_process_guard_finalize (GObject * obj)
{
	ProtonPlusServicesCompatibilityProcessGuard * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_SERVICES_TYPE_COMPATIBILITY_PROCESS_GUARD, ProtonPlusServicesCompatibilityProcessGuard);
	_g_object_unref0 (self->priv->backend);
	G_OBJECT_CLASS (proton_plus_services_compatibility_process_guard_parent_class)->finalize (obj);
}

static GType
proton_plus_services_compatibility_process_guard_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusServicesCompatibilityProcessGuardClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_services_compatibility_process_guard_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusServicesCompatibilityProcessGuard), 0, (GInstanceInitFunc) proton_plus_services_compatibility_process_guard_instance_init, NULL };
	GType proton_plus_services_compatibility_process_guard_type_id;
	proton_plus_services_compatibility_process_guard_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusServicesCompatibilityProcessGuard", &g_define_type_info, 0);
	ProtonPlusServicesCompatibilityProcessGuard_private_offset = g_type_add_instance_private (proton_plus_services_compatibility_process_guard_type_id, sizeof (ProtonPlusServicesCompatibilityProcessGuardPrivate));
	return proton_plus_services_compatibility_process_guard_type_id;
}

GType
proton_plus_services_compatibility_process_guard_get_type (void)
{
	static volatile gsize proton_plus_services_compatibility_process_guard_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_services_compatibility_process_guard_type_id__once)) {
		GType proton_plus_services_compatibility_process_guard_type_id;
		proton_plus_services_compatibility_process_guard_type_id = proton_plus_services_compatibility_process_guard_get_type_once ();
		g_once_init_leave (&proton_plus_services_compatibility_process_guard_type_id__once, proton_plus_services_compatibility_process_guard_type_id);
	}
	return proton_plus_services_compatibility_process_guard_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 gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

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

