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

#include "protonplus_core.h"
#include <glib.h>
#include <glib-object.h>
#include <json-glib/json-glib.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_0_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_X86_64_LEVEL_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_AARCH64_LEVEL_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_ARCHITECTURE_INDEPENDENT_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_IS_SPECIFIED_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusModelsVariantCompatibilityPrivate {
	ProtonPlusModelsCpuArchitecture* supported_architectures;
	gint supported_architectures_length1;
	gint _supported_architectures_size_;
	ProtonPlusModelsX86_64Level _minimum_x86_64_level;
	ProtonPlusModelsAarch64Level _minimum_aarch64_level;
	gboolean _architecture_independent;
};

static gint ProtonPlusModelsVariantCompatibility_private_offset;
static gpointer proton_plus_models_variant_compatibility_parent_class = NULL;

static ProtonPlusModelsCpuArchitecture* proton_plus_models_variant_compatibility_copy_architectures (ProtonPlusModelsCpuArchitecture* values,
                                                                                              gint values_length1,
                                                                                              gint* result_length1);
static void proton_plus_models_variant_compatibility_set_minimum_x86_64_level (ProtonPlusModelsVariantCompatibility* self,
                                                                        ProtonPlusModelsX86_64Level value);
static gboolean proton_plus_models_variant_compatibility_supports_architecture (ProtonPlusModelsVariantCompatibility* self,
                                                                         ProtonPlusModelsCpuArchitecture architecture);
static void proton_plus_models_variant_compatibility_set_minimum_aarch64_level (ProtonPlusModelsVariantCompatibility* self,
                                                                         ProtonPlusModelsAarch64Level value);
static void proton_plus_models_variant_compatibility_set_architecture_independent (ProtonPlusModelsVariantCompatibility* self,
                                                                            gboolean value);
static void _vala_array_add6 (ProtonPlusModelsCpuArchitecture* * array,
                       gint* length,
                       gint* size,
                       ProtonPlusModelsCpuArchitecture value);
static gchar* proton_plus_models_variant_compatibility_architecture_to_string (ProtonPlusModelsCpuArchitecture architecture);
static gchar* proton_plus_models_variant_compatibility_x86_64_level_to_string (ProtonPlusModelsX86_64Level level);
static gchar* proton_plus_models_variant_compatibility_aarch64_level_to_string (ProtonPlusModelsAarch64Level level);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
static void _vala_JsonNode_free (JsonNode* self);
static ProtonPlusModelsCpuArchitecture proton_plus_models_variant_compatibility_architecture_from_string (const gchar* value);
static void _vala_array_add7 (ProtonPlusModelsCpuArchitecture* * array,
                       gint* length,
                       gint* size,
                       ProtonPlusModelsCpuArchitecture value);
static ProtonPlusModelsX86_64Level proton_plus_models_variant_compatibility_x86_64_level_from_string (const gchar* value);
static ProtonPlusModelsAarch64Level proton_plus_models_variant_compatibility_aarch64_level_from_string (const gchar* value);
static void proton_plus_models_variant_compatibility_finalize (GObject * obj);
static GType proton_plus_models_variant_compatibility_get_type_once (void);
static void _vala_proton_plus_models_variant_compatibility_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static void _vala_proton_plus_models_variant_compatibility_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_models_variant_compatibility_get_instance_private (ProtonPlusModelsVariantCompatibility* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsVariantCompatibility_private_offset);
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_construct (GType object_type,
                                                    ProtonPlusModelsCpuArchitecture* supported_architectures,
                                                    gint supported_architectures_length1,
                                                    ProtonPlusModelsX86_64Level minimum_x86_64_level,
                                                    gboolean architecture_independent,
                                                    ProtonPlusModelsAarch64Level minimum_aarch64_level)
{
	ProtonPlusModelsVariantCompatibility * self = NULL;
	gint _tmp0_ = 0;
	ProtonPlusModelsCpuArchitecture* _tmp1_;
	ProtonPlusModelsAarch64Level _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	self = (ProtonPlusModelsVariantCompatibility*) g_object_new (object_type, NULL);
	_tmp1_ = proton_plus_models_variant_compatibility_copy_architectures (supported_architectures, (gint) supported_architectures_length1, &_tmp0_);
	self->priv->supported_architectures = (g_free (self->priv->supported_architectures), NULL);
	self->priv->supported_architectures = _tmp1_;
	self->priv->supported_architectures_length1 = _tmp0_;
	self->priv->_supported_architectures_size_ = self->priv->supported_architectures_length1;
	proton_plus_models_variant_compatibility_set_minimum_x86_64_level (self, minimum_x86_64_level);
	if (minimum_aarch64_level == PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN) {
		_tmp3_ = proton_plus_models_variant_compatibility_supports_architecture (self, PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_0;
	} else {
		_tmp2_ = minimum_aarch64_level;
	}
	proton_plus_models_variant_compatibility_set_minimum_aarch64_level (self, _tmp2_);
	proton_plus_models_variant_compatibility_set_architecture_independent (self, architecture_independent);
	return self;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_new (ProtonPlusModelsCpuArchitecture* supported_architectures,
                                              gint supported_architectures_length1,
                                              ProtonPlusModelsX86_64Level minimum_x86_64_level,
                                              gboolean architecture_independent,
                                              ProtonPlusModelsAarch64Level minimum_aarch64_level)
{
	return proton_plus_models_variant_compatibility_construct (PROTON_PLUS_MODELS_TYPE_VARIANT_COMPATIBILITY, supported_architectures, supported_architectures_length1, minimum_x86_64_level, architecture_independent, minimum_aarch64_level);
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_unspecified (void)
{
	ProtonPlusModelsVariantCompatibility* _tmp0_;
	ProtonPlusModelsVariantCompatibility* result;
	_tmp0_ = proton_plus_models_variant_compatibility_new (NULL, 0, PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN, FALSE, PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_independent (void)
{
	ProtonPlusModelsVariantCompatibility* _tmp0_;
	ProtonPlusModelsVariantCompatibility* result;
	_tmp0_ = proton_plus_models_variant_compatibility_new (NULL, 0, PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN, TRUE, PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_for_architecture (ProtonPlusModelsCpuArchitecture architecture)
{
	ProtonPlusModelsCpuArchitecture* _tmp2_;
	ProtonPlusModelsCpuArchitecture* _tmp3_;
	gint _tmp3__length1;
	ProtonPlusModelsVariantCompatibility* _tmp4_;
	ProtonPlusModelsVariantCompatibility* _tmp5_;
	ProtonPlusModelsVariantCompatibility* result;
	if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64) {
		ProtonPlusModelsVariantCompatibility* _tmp0_;
		_tmp0_ = proton_plus_models_variant_compatibility_for_x86_64_level (PROTON_PLUS_MODELS_X86_64LEVEL_BASELINE);
		result = _tmp0_;
		return result;
	}
	if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64) {
		ProtonPlusModelsVariantCompatibility* _tmp1_;
		_tmp1_ = proton_plus_models_variant_compatibility_for_aarch64_level (PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_0);
		result = _tmp1_;
		return result;
	}
	_tmp2_ = g_new0 (ProtonPlusModelsCpuArchitecture, 1);
	_tmp2_[0] = architecture;
	_tmp3_ = _tmp2_;
	_tmp3__length1 = 1;
	_tmp4_ = proton_plus_models_variant_compatibility_new (_tmp3_, 1, PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN, FALSE, PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN);
	_tmp5_ = _tmp4_;
	_tmp3_ = (g_free (_tmp3_), NULL);
	result = _tmp5_;
	return result;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_for_architectures (ProtonPlusModelsCpuArchitecture* architectures,
                                                            gint architectures_length1)
{
	ProtonPlusModelsX86_64Level x86_64_level = 0;
	ProtonPlusModelsAarch64Level aarch64_level = 0;
	ProtonPlusModelsVariantCompatibility* _tmp0_;
	ProtonPlusModelsVariantCompatibility* result;
	x86_64_level = PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN;
	aarch64_level = PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN;
	{
		ProtonPlusModelsCpuArchitecture* architecture_collection = NULL;
		gint architecture_collection_length1 = 0;
		gint _architecture_collection_size_ = 0;
		gint architecture_it = 0;
		architecture_collection = architectures;
		architecture_collection_length1 = architectures_length1;
		for (architecture_it = 0; architecture_it < architecture_collection_length1; architecture_it = architecture_it + 1) {
			ProtonPlusModelsCpuArchitecture architecture = 0;
			architecture = architecture_collection[architecture_it];
			{
				if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64) {
					x86_64_level = PROTON_PLUS_MODELS_X86_64LEVEL_BASELINE;
				}
				if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64) {
					aarch64_level = PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_0;
				}
			}
		}
	}
	_tmp0_ = proton_plus_models_variant_compatibility_new (architectures, architectures_length1, x86_64_level, FALSE, aarch64_level);
	result = _tmp0_;
	return result;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_for_x86_64_level (ProtonPlusModelsX86_64Level level)
{
	ProtonPlusModelsCpuArchitecture* _tmp0_;
	ProtonPlusModelsCpuArchitecture* _tmp1_;
	gint _tmp1__length1;
	ProtonPlusModelsVariantCompatibility* _tmp2_;
	ProtonPlusModelsVariantCompatibility* _tmp3_;
	ProtonPlusModelsVariantCompatibility* result;
	_tmp0_ = g_new0 (ProtonPlusModelsCpuArchitecture, 1);
	_tmp0_[0] = PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 1;
	_tmp2_ = proton_plus_models_variant_compatibility_new (_tmp1_, 1, level, FALSE, PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN);
	_tmp3_ = _tmp2_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp3_;
	return result;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_for_aarch64_level (ProtonPlusModelsAarch64Level level)
{
	ProtonPlusModelsCpuArchitecture* _tmp0_;
	ProtonPlusModelsCpuArchitecture* _tmp1_;
	gint _tmp1__length1;
	ProtonPlusModelsVariantCompatibility* _tmp2_;
	ProtonPlusModelsVariantCompatibility* _tmp3_;
	ProtonPlusModelsVariantCompatibility* result;
	_tmp0_ = g_new0 (ProtonPlusModelsCpuArchitecture, 1);
	_tmp0_[0] = PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = 1;
	_tmp2_ = proton_plus_models_variant_compatibility_new (_tmp1_, 1, PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN, FALSE, level);
	_tmp3_ = _tmp2_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp3_;
	return result;
}

ProtonPlusModelsCpuArchitecture*
proton_plus_models_variant_compatibility_get_supported_architectures (ProtonPlusModelsVariantCompatibility* self,
                                                                      gint* result_length1)
{
	ProtonPlusModelsCpuArchitecture* _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_ = 0;
	ProtonPlusModelsCpuArchitecture* _tmp2_;
	ProtonPlusModelsCpuArchitecture* _tmp3_;
	gint _tmp3__length1;
	ProtonPlusModelsCpuArchitecture* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->supported_architectures;
	_tmp0__length1 = self->priv->supported_architectures_length1;
	_tmp2_ = proton_plus_models_variant_compatibility_copy_architectures (_tmp0_, (gint) _tmp0__length1, &_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp3__length1 = _tmp1_;
	if (result_length1) {
		*result_length1 = _tmp3__length1;
	}
	result = _tmp3_;
	return result;
}

gboolean
proton_plus_models_variant_compatibility_explicitly_supports_architecture (ProtonPlusModelsVariantCompatibility* self,
                                                                           ProtonPlusModelsCpuArchitecture architecture)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = proton_plus_models_variant_compatibility_supports_architecture (self, architecture);
	return result;
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_copy (ProtonPlusModelsVariantCompatibility* self)
{
	ProtonPlusModelsCpuArchitecture* _tmp0_;
	gint _tmp0__length1;
	ProtonPlusModelsX86_64Level _tmp1_;
	gboolean _tmp2_;
	ProtonPlusModelsAarch64Level _tmp3_;
	ProtonPlusModelsVariantCompatibility* _tmp4_;
	ProtonPlusModelsVariantCompatibility* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->supported_architectures;
	_tmp0__length1 = self->priv->supported_architectures_length1;
	_tmp1_ = self->priv->_minimum_x86_64_level;
	_tmp2_ = self->priv->_architecture_independent;
	_tmp3_ = self->priv->_minimum_aarch64_level;
	_tmp4_ = proton_plus_models_variant_compatibility_new (_tmp0_, _tmp0__length1, _tmp1_, _tmp2_, _tmp3_);
	result = _tmp4_;
	return result;
}

gboolean
proton_plus_models_variant_compatibility_equals (ProtonPlusModelsVariantCompatibility* self,
                                                 ProtonPlusModelsVariantCompatibility* other)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ProtonPlusModelsCpuArchitecture* _tmp11_;
	gint _tmp11__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (other != NULL, FALSE);
	_tmp3_ = self->priv->_architecture_independent;
	_tmp4_ = other->priv->_architecture_independent;
	if (_tmp3_ != _tmp4_) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusModelsX86_64Level _tmp5_;
		ProtonPlusModelsX86_64Level _tmp6_;
		_tmp5_ = self->priv->_minimum_x86_64_level;
		_tmp6_ = other->priv->_minimum_x86_64_level;
		_tmp2_ = _tmp5_ != _tmp6_;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusModelsAarch64Level _tmp7_;
		ProtonPlusModelsAarch64Level _tmp8_;
		_tmp7_ = self->priv->_minimum_aarch64_level;
		_tmp8_ = other->priv->_minimum_aarch64_level;
		_tmp1_ = _tmp7_ != _tmp8_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusModelsCpuArchitecture* _tmp9_;
		gint _tmp9__length1;
		ProtonPlusModelsCpuArchitecture* _tmp10_;
		gint _tmp10__length1;
		_tmp9_ = self->priv->supported_architectures;
		_tmp9__length1 = self->priv->supported_architectures_length1;
		_tmp10_ = other->priv->supported_architectures;
		_tmp10__length1 = other->priv->supported_architectures_length1;
		_tmp0_ = _tmp9__length1 != _tmp10__length1;
	}
	if (_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp11_ = self->priv->supported_architectures;
	_tmp11__length1 = self->priv->supported_architectures_length1;
	{
		ProtonPlusModelsCpuArchitecture* architecture_collection = NULL;
		gint architecture_collection_length1 = 0;
		gint _architecture_collection_size_ = 0;
		gint architecture_it = 0;
		architecture_collection = _tmp11_;
		architecture_collection_length1 = _tmp11__length1;
		for (architecture_it = 0; architecture_it < architecture_collection_length1; architecture_it = architecture_it + 1) {
			ProtonPlusModelsCpuArchitecture architecture = 0;
			architecture = architecture_collection[architecture_it];
			{
				if (!proton_plus_models_variant_compatibility_supports_architecture (other, architecture)) {
					result = FALSE;
					return result;
				}
			}
		}
	}
	result = TRUE;
	return result;
}

gboolean
proton_plus_models_variant_compatibility_is_compatible_with (ProtonPlusModelsVariantCompatibility* self,
                                                             ProtonPlusModelsCpuCapabilities* capabilities)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ProtonPlusModelsCpuArchitecture _tmp2_;
	ProtonPlusModelsCpuArchitecture _tmp3_;
	gboolean _tmp7_ = FALSE;
	ProtonPlusModelsCpuArchitecture* _tmp8_;
	gint _tmp8__length1;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	ProtonPlusModelsCpuArchitecture _tmp16_;
	ProtonPlusModelsCpuArchitecture _tmp17_;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_ = FALSE;
	ProtonPlusModelsCpuArchitecture _tmp22_;
	ProtonPlusModelsCpuArchitecture _tmp23_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (capabilities != NULL, FALSE);
	_tmp2_ = proton_plus_models_cpu_capabilities_get_architecture (capabilities);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_UNKNOWN) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp4_ = proton_plus_models_variant_compatibility_get_is_specified (self);
		_tmp5_ = _tmp4_;
		_tmp1_ = !_tmp5_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp6_;
		_tmp6_ = self->priv->_architecture_independent;
		_tmp0_ = _tmp6_;
	}
	if (_tmp0_) {
		result = TRUE;
		return result;
	}
	_tmp8_ = self->priv->supported_architectures;
	_tmp8__length1 = self->priv->supported_architectures_length1;
	if (_tmp8__length1 > 0) {
		ProtonPlusModelsCpuArchitecture _tmp9_;
		ProtonPlusModelsCpuArchitecture _tmp10_;
		_tmp9_ = proton_plus_models_cpu_capabilities_get_architecture (capabilities);
		_tmp10_ = _tmp9_;
		_tmp7_ = !proton_plus_models_variant_compatibility_supports_architecture (self, _tmp10_);
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		gboolean _tmp11_ = FALSE;
		ProtonPlusModelsCpuArchitecture _tmp12_;
		ProtonPlusModelsCpuArchitecture _tmp13_;
		gboolean supports_emulated_x86_64 = FALSE;
		_tmp12_ = proton_plus_models_cpu_capabilities_get_architecture (capabilities);
		_tmp13_ = _tmp12_;
		if (_tmp13_ == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64) {
			_tmp11_ = proton_plus_models_variant_compatibility_supports_architecture (self, PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64);
		} else {
			_tmp11_ = FALSE;
		}
		supports_emulated_x86_64 = _tmp11_;
		if (!supports_emulated_x86_64) {
			result = FALSE;
			return result;
		}
	}
	_tmp16_ = proton_plus_models_cpu_capabilities_get_architecture (capabilities);
	_tmp17_ = _tmp16_;
	if (_tmp17_ == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64) {
		_tmp15_ = proton_plus_models_variant_compatibility_supports_architecture (self, PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64);
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		ProtonPlusModelsX86_64Level _tmp18_;
		_tmp18_ = self->priv->_minimum_x86_64_level;
		_tmp14_ = _tmp18_ != PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		ProtonPlusModelsX86_64Level _tmp19_;
		_tmp19_ = self->priv->_minimum_x86_64_level;
		result = proton_plus_models_cpu_capabilities_supports_x86_64_level (capabilities, _tmp19_);
		return result;
	}
	_tmp22_ = proton_plus_models_cpu_capabilities_get_architecture (capabilities);
	_tmp23_ = _tmp22_;
	if (_tmp23_ == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64) {
		_tmp21_ = proton_plus_models_variant_compatibility_supports_architecture (self, PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64);
	} else {
		_tmp21_ = FALSE;
	}
	if (_tmp21_) {
		ProtonPlusModelsAarch64Level _tmp24_;
		_tmp24_ = self->priv->_minimum_aarch64_level;
		_tmp20_ = _tmp24_ != PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN;
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		ProtonPlusModelsAarch64Level _tmp25_;
		_tmp25_ = self->priv->_minimum_aarch64_level;
		result = proton_plus_models_cpu_capabilities_supports_aarch64_level (capabilities, _tmp25_);
		return result;
	}
	result = TRUE;
	return result;
}

static void
_vala_array_add6 (ProtonPlusModelsCpuArchitecture* * array,
                  gint* length,
                  gint* size,
                  ProtonPlusModelsCpuArchitecture value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (ProtonPlusModelsCpuArchitecture, *array, *size);
	}
	(*array)[(*length)++] = value;
}

gboolean
proton_plus_models_variant_compatibility_is_structurally_valid (ProtonPlusModelsVariantCompatibility* self)
{
	gboolean _tmp0_;
	gboolean has_x86_64 = FALSE;
	gboolean has_aarch64 = FALSE;
	ProtonPlusModelsCpuArchitecture* seen_architectures = NULL;
	ProtonPlusModelsCpuArchitecture* _tmp6_;
	gint seen_architectures_length1;
	gint _seen_architectures_size_;
	ProtonPlusModelsCpuArchitecture* _tmp7_;
	gint _tmp7__length1;
	gboolean _tmp9_ = FALSE;
	ProtonPlusModelsX86_64Level _tmp10_;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp13_ = FALSE;
	ProtonPlusModelsAarch64Level _tmp14_;
	gboolean _tmp15_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_architecture_independent;
	if (_tmp0_) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		ProtonPlusModelsCpuArchitecture* _tmp3_;
		gint _tmp3__length1;
		_tmp3_ = self->priv->supported_architectures;
		_tmp3__length1 = self->priv->supported_architectures_length1;
		if (_tmp3__length1 == 0) {
			ProtonPlusModelsX86_64Level _tmp4_;
			_tmp4_ = self->priv->_minimum_x86_64_level;
			_tmp2_ = _tmp4_ == PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN;
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			ProtonPlusModelsAarch64Level _tmp5_;
			_tmp5_ = self->priv->_minimum_aarch64_level;
			_tmp1_ = _tmp5_ == PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN;
		} else {
			_tmp1_ = FALSE;
		}
		result = _tmp1_;
		return result;
	}
	has_x86_64 = FALSE;
	has_aarch64 = FALSE;
	_tmp6_ = g_new0 (ProtonPlusModelsCpuArchitecture, 0);
	seen_architectures = _tmp6_;
	seen_architectures_length1 = 0;
	_seen_architectures_size_ = seen_architectures_length1;
	_tmp7_ = self->priv->supported_architectures;
	_tmp7__length1 = self->priv->supported_architectures_length1;
	{
		ProtonPlusModelsCpuArchitecture* architecture_collection = NULL;
		gint architecture_collection_length1 = 0;
		gint _architecture_collection_size_ = 0;
		gint architecture_it = 0;
		architecture_collection = _tmp7_;
		architecture_collection_length1 = _tmp7__length1;
		for (architecture_it = 0; architecture_it < architecture_collection_length1; architecture_it = architecture_it + 1) {
			ProtonPlusModelsCpuArchitecture architecture = 0;
			architecture = architecture_collection[architecture_it];
			{
				ProtonPlusModelsCpuArchitecture* _tmp8_;
				gint _tmp8__length1;
				if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_UNKNOWN) {
					result = FALSE;
					seen_architectures = (g_free (seen_architectures), NULL);
					return result;
				}
				_tmp8_ = seen_architectures;
				_tmp8__length1 = seen_architectures_length1;
				{
					ProtonPlusModelsCpuArchitecture* seen_architecture_collection = NULL;
					gint seen_architecture_collection_length1 = 0;
					gint _seen_architecture_collection_size_ = 0;
					gint seen_architecture_it = 0;
					seen_architecture_collection = _tmp8_;
					seen_architecture_collection_length1 = _tmp8__length1;
					for (seen_architecture_it = 0; seen_architecture_it < seen_architecture_collection_length1; seen_architecture_it = seen_architecture_it + 1) {
						ProtonPlusModelsCpuArchitecture seen_architecture = 0;
						seen_architecture = seen_architecture_collection[seen_architecture_it];
						{
							if (architecture == seen_architecture) {
								result = FALSE;
								seen_architectures = (g_free (seen_architectures), NULL);
								return result;
							}
						}
					}
				}
				_vala_array_add6 (&seen_architectures, &seen_architectures_length1, &_seen_architectures_size_, architecture);
				if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64) {
					has_x86_64 = TRUE;
				}
				if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64) {
					has_aarch64 = TRUE;
				}
			}
		}
	}
	_tmp10_ = self->priv->_minimum_x86_64_level;
	if (_tmp10_ != PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN) {
		_tmp9_ = !has_x86_64;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		result = FALSE;
		seen_architectures = (g_free (seen_architectures), NULL);
		return result;
	}
	if (has_x86_64) {
		ProtonPlusModelsX86_64Level _tmp12_;
		_tmp12_ = self->priv->_minimum_x86_64_level;
		_tmp11_ = _tmp12_ < PROTON_PLUS_MODELS_X86_64LEVEL_BASELINE;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		result = FALSE;
		seen_architectures = (g_free (seen_architectures), NULL);
		return result;
	}
	_tmp14_ = self->priv->_minimum_aarch64_level;
	if (_tmp14_ != PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN) {
		_tmp13_ = !has_aarch64;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		result = FALSE;
		seen_architectures = (g_free (seen_architectures), NULL);
		return result;
	}
	if (has_aarch64) {
		ProtonPlusModelsAarch64Level _tmp16_;
		_tmp16_ = self->priv->_minimum_aarch64_level;
		_tmp15_ = _tmp16_ < PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_0;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		result = FALSE;
		seen_architectures = (g_free (seen_architectures), NULL);
		return result;
	}
	result = TRUE;
	seen_architectures = (g_free (seen_architectures), NULL);
	return result;
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

JsonObject*
proton_plus_models_variant_compatibility_to_json (ProtonPlusModelsVariantCompatibility* self)
{
	JsonObject* obj = NULL;
	JsonObject* _tmp0_;
	JsonArray* architectures = NULL;
	JsonArray* _tmp1_;
	ProtonPlusModelsCpuArchitecture* _tmp2_;
	gint _tmp2__length1;
	JsonObject* _tmp6_;
	JsonArray* _tmp7_;
	JsonArray* _tmp8_;
	JsonObject* _tmp9_;
	ProtonPlusModelsX86_64Level _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	JsonObject* _tmp13_;
	ProtonPlusModelsAarch64Level _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	JsonObject* _tmp17_;
	gboolean _tmp18_;
	JsonObject* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = json_object_new ();
	obj = _tmp0_;
	_tmp1_ = json_array_new ();
	architectures = _tmp1_;
	_tmp2_ = self->priv->supported_architectures;
	_tmp2__length1 = self->priv->supported_architectures_length1;
	{
		ProtonPlusModelsCpuArchitecture* architecture_collection = NULL;
		gint architecture_collection_length1 = 0;
		gint _architecture_collection_size_ = 0;
		gint architecture_it = 0;
		architecture_collection = _tmp2_;
		architecture_collection_length1 = _tmp2__length1;
		for (architecture_it = 0; architecture_it < architecture_collection_length1; architecture_it = architecture_it + 1) {
			ProtonPlusModelsCpuArchitecture architecture = 0;
			architecture = architecture_collection[architecture_it];
			{
				JsonArray* _tmp3_;
				gchar* _tmp4_;
				gchar* _tmp5_;
				_tmp3_ = architectures;
				_tmp4_ = proton_plus_models_variant_compatibility_architecture_to_string (architecture);
				_tmp5_ = _tmp4_;
				json_array_add_string_element (_tmp3_, _tmp5_);
				_g_free0 (_tmp5_);
			}
		}
	}
	_tmp6_ = obj;
	_tmp7_ = architectures;
	_tmp8_ = _json_array_ref0 (_tmp7_);
	json_object_set_array_member (_tmp6_, "architectures", _tmp8_);
	_tmp9_ = obj;
	_tmp10_ = self->priv->_minimum_x86_64_level;
	_tmp11_ = proton_plus_models_variant_compatibility_x86_64_level_to_string (_tmp10_);
	_tmp12_ = _tmp11_;
	json_object_set_string_member (_tmp9_, "minimum_x86_64_level", _tmp12_);
	_g_free0 (_tmp12_);
	_tmp13_ = obj;
	_tmp14_ = self->priv->_minimum_aarch64_level;
	_tmp15_ = proton_plus_models_variant_compatibility_aarch64_level_to_string (_tmp14_);
	_tmp16_ = _tmp15_;
	json_object_set_string_member (_tmp13_, "minimum_aarch64_level", _tmp16_);
	_g_free0 (_tmp16_);
	_tmp17_ = obj;
	_tmp18_ = self->priv->_architecture_independent;
	json_object_set_boolean_member (_tmp17_, "architecture_independent", _tmp18_);
	result = obj;
	_json_array_unref0 (architectures);
	return result;
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

static void
_vala_array_add7 (ProtonPlusModelsCpuArchitecture* * array,
                  gint* length,
                  gint* size,
                  ProtonPlusModelsCpuArchitecture value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (ProtonPlusModelsCpuArchitecture, *array, *size);
	}
	(*array)[(*length)++] = value;
}

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

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_compatibility_from_json (JsonObject* obj)
{
	gboolean architecture_independent = FALSE;
	ProtonPlusModelsCpuArchitecture* parsed_architectures = NULL;
	ProtonPlusModelsCpuArchitecture* _tmp10_;
	gint parsed_architectures_length1;
	gint _parsed_architectures_size_;
	ProtonPlusModelsX86_64Level level = 0;
	ProtonPlusModelsAarch64Level aarch64_level = 0;
	ProtonPlusModelsVariantCompatibility* compatibility = NULL;
	ProtonPlusModelsCpuArchitecture* _tmp58_;
	gint _tmp58__length1;
	ProtonPlusModelsVariantCompatibility* _tmp59_;
	ProtonPlusModelsVariantCompatibility* _tmp60_ = NULL;
	ProtonPlusModelsVariantCompatibility* _tmp61_;
	ProtonPlusModelsVariantCompatibility* _tmp65_;
	ProtonPlusModelsVariantCompatibility* result;
	if (obj == NULL) {
		ProtonPlusModelsVariantCompatibility* _tmp0_;
		_tmp0_ = proton_plus_models_variant_compatibility_unspecified ();
		result = _tmp0_;
		return result;
	}
	architecture_independent = FALSE;
	if (json_object_has_member (obj, "architecture_independent")) {
		JsonNode* node = NULL;
		JsonNode* _tmp1_;
		JsonNode* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		JsonNode* _tmp5_;
		JsonNode* _tmp9_;
		_tmp1_ = json_object_get_member (obj, "architecture_independent");
		_tmp2_ = __vala_JsonNode_copy0 (_tmp1_);
		node = _tmp2_;
		_tmp5_ = node;
		if (_tmp5_ == NULL) {
			_tmp4_ = TRUE;
		} else {
			JsonNode* _tmp6_;
			_tmp6_ = node;
			_tmp4_ = json_node_get_node_type (_tmp6_) != JSON_NODE_VALUE;
		}
		if (_tmp4_) {
			_tmp3_ = TRUE;
		} else {
			JsonNode* _tmp7_;
			_tmp7_ = node;
			_tmp3_ = json_node_get_value_type (_tmp7_) != G_TYPE_BOOLEAN;
		}
		if (_tmp3_) {
			ProtonPlusModelsVariantCompatibility* _tmp8_;
			_tmp8_ = proton_plus_models_variant_compatibility_unspecified ();
			result = _tmp8_;
			__vala_JsonNode_free0 (node);
			return result;
		}
		_tmp9_ = node;
		architecture_independent = json_node_get_boolean (_tmp9_);
		__vala_JsonNode_free0 (node);
	}
	_tmp10_ = g_new0 (ProtonPlusModelsCpuArchitecture, 0);
	parsed_architectures = _tmp10_;
	parsed_architectures_length1 = 0;
	_parsed_architectures_size_ = parsed_architectures_length1;
	if (json_object_has_member (obj, "architectures")) {
		JsonArray* values = NULL;
		JsonArray* _tmp11_;
		JsonArray* _tmp12_;
		JsonArray* _tmp13_;
		_tmp11_ = json_object_get_array_member (obj, "architectures");
		_tmp12_ = _json_array_ref0 (_tmp11_);
		values = _tmp12_;
		_tmp13_ = values;
		if (_tmp13_ == NULL) {
			ProtonPlusModelsVariantCompatibility* _tmp14_;
			_tmp14_ = proton_plus_models_variant_compatibility_unspecified ();
			result = _tmp14_;
			_json_array_unref0 (values);
			parsed_architectures = (g_free (parsed_architectures), NULL);
			return result;
		}
		{
			gint index = 0;
			index = 0;
			{
				gboolean _tmp15_ = FALSE;
				_tmp15_ = TRUE;
				while (TRUE) {
					JsonArray* _tmp17_;
					JsonNode* node = NULL;
					JsonArray* _tmp18_;
					JsonNode* _tmp19_;
					JsonNode* _tmp20_;
					gboolean _tmp21_ = FALSE;
					gboolean _tmp22_ = FALSE;
					JsonNode* _tmp23_;
					ProtonPlusModelsCpuArchitecture architecture = 0;
					JsonNode* _tmp27_;
					const gchar* _tmp28_;
					if (!_tmp15_) {
						gint _tmp16_;
						_tmp16_ = index;
						index = _tmp16_ + 1;
					}
					_tmp15_ = FALSE;
					_tmp17_ = values;
					if (!(((guint) index) < json_array_get_length (_tmp17_))) {
						break;
					}
					_tmp18_ = values;
					_tmp19_ = json_array_get_element (_tmp18_, (guint) index);
					_tmp20_ = __vala_JsonNode_copy0 (_tmp19_);
					node = _tmp20_;
					_tmp23_ = node;
					if (_tmp23_ == NULL) {
						_tmp22_ = TRUE;
					} else {
						JsonNode* _tmp24_;
						_tmp24_ = node;
						_tmp22_ = json_node_get_node_type (_tmp24_) != JSON_NODE_VALUE;
					}
					if (_tmp22_) {
						_tmp21_ = TRUE;
					} else {
						JsonNode* _tmp25_;
						_tmp25_ = node;
						_tmp21_ = json_node_get_value_type (_tmp25_) != G_TYPE_STRING;
					}
					if (_tmp21_) {
						ProtonPlusModelsVariantCompatibility* _tmp26_;
						_tmp26_ = proton_plus_models_variant_compatibility_unspecified ();
						result = _tmp26_;
						__vala_JsonNode_free0 (node);
						_json_array_unref0 (values);
						parsed_architectures = (g_free (parsed_architectures), NULL);
						return result;
					}
					_tmp27_ = node;
					_tmp28_ = json_node_get_string (_tmp27_);
					architecture = proton_plus_models_variant_compatibility_architecture_from_string (_tmp28_);
					if (architecture == PROTON_PLUS_MODELS_CPU_ARCHITECTURE_UNKNOWN) {
						ProtonPlusModelsVariantCompatibility* _tmp29_;
						_tmp29_ = proton_plus_models_variant_compatibility_unspecified ();
						result = _tmp29_;
						__vala_JsonNode_free0 (node);
						_json_array_unref0 (values);
						parsed_architectures = (g_free (parsed_architectures), NULL);
						return result;
					}
					_vala_array_add7 (&parsed_architectures, &parsed_architectures_length1, &_parsed_architectures_size_, architecture);
					__vala_JsonNode_free0 (node);
				}
			}
		}
		_json_array_unref0 (values);
	}
	level = PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN;
	if (json_object_has_member (obj, "minimum_x86_64_level")) {
		JsonNode* node = NULL;
		JsonNode* _tmp30_;
		JsonNode* _tmp31_;
		gboolean _tmp32_ = FALSE;
		gboolean _tmp33_ = FALSE;
		JsonNode* _tmp34_;
		JsonNode* _tmp38_;
		const gchar* _tmp39_;
		gboolean _tmp40_ = FALSE;
		_tmp30_ = json_object_get_member (obj, "minimum_x86_64_level");
		_tmp31_ = __vala_JsonNode_copy0 (_tmp30_);
		node = _tmp31_;
		_tmp34_ = node;
		if (_tmp34_ == NULL) {
			_tmp33_ = TRUE;
		} else {
			JsonNode* _tmp35_;
			_tmp35_ = node;
			_tmp33_ = json_node_get_node_type (_tmp35_) != JSON_NODE_VALUE;
		}
		if (_tmp33_) {
			_tmp32_ = TRUE;
		} else {
			JsonNode* _tmp36_;
			_tmp36_ = node;
			_tmp32_ = json_node_get_value_type (_tmp36_) != G_TYPE_STRING;
		}
		if (_tmp32_) {
			ProtonPlusModelsVariantCompatibility* _tmp37_;
			_tmp37_ = proton_plus_models_variant_compatibility_unspecified ();
			result = _tmp37_;
			__vala_JsonNode_free0 (node);
			parsed_architectures = (g_free (parsed_architectures), NULL);
			return result;
		}
		_tmp38_ = node;
		_tmp39_ = json_node_get_string (_tmp38_);
		level = proton_plus_models_variant_compatibility_x86_64_level_from_string (_tmp39_);
		if (level == PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN) {
			JsonNode* _tmp41_;
			const gchar* _tmp42_;
			_tmp41_ = node;
			_tmp42_ = json_node_get_string (_tmp41_);
			_tmp40_ = g_strcmp0 (_tmp42_, "") != 0;
		} else {
			_tmp40_ = FALSE;
		}
		if (_tmp40_) {
			ProtonPlusModelsVariantCompatibility* _tmp43_;
			_tmp43_ = proton_plus_models_variant_compatibility_unspecified ();
			result = _tmp43_;
			__vala_JsonNode_free0 (node);
			parsed_architectures = (g_free (parsed_architectures), NULL);
			return result;
		}
		__vala_JsonNode_free0 (node);
	}
	aarch64_level = PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN;
	if (json_object_has_member (obj, "minimum_aarch64_level")) {
		JsonNode* node = NULL;
		JsonNode* _tmp44_;
		JsonNode* _tmp45_;
		gboolean _tmp46_ = FALSE;
		gboolean _tmp47_ = FALSE;
		JsonNode* _tmp48_;
		JsonNode* _tmp52_;
		const gchar* _tmp53_;
		gboolean _tmp54_ = FALSE;
		_tmp44_ = json_object_get_member (obj, "minimum_aarch64_level");
		_tmp45_ = __vala_JsonNode_copy0 (_tmp44_);
		node = _tmp45_;
		_tmp48_ = node;
		if (_tmp48_ == NULL) {
			_tmp47_ = TRUE;
		} else {
			JsonNode* _tmp49_;
			_tmp49_ = node;
			_tmp47_ = json_node_get_node_type (_tmp49_) != JSON_NODE_VALUE;
		}
		if (_tmp47_) {
			_tmp46_ = TRUE;
		} else {
			JsonNode* _tmp50_;
			_tmp50_ = node;
			_tmp46_ = json_node_get_value_type (_tmp50_) != G_TYPE_STRING;
		}
		if (_tmp46_) {
			ProtonPlusModelsVariantCompatibility* _tmp51_;
			_tmp51_ = proton_plus_models_variant_compatibility_unspecified ();
			result = _tmp51_;
			__vala_JsonNode_free0 (node);
			parsed_architectures = (g_free (parsed_architectures), NULL);
			return result;
		}
		_tmp52_ = node;
		_tmp53_ = json_node_get_string (_tmp52_);
		aarch64_level = proton_plus_models_variant_compatibility_aarch64_level_from_string (_tmp53_);
		if (aarch64_level == PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN) {
			JsonNode* _tmp55_;
			const gchar* _tmp56_;
			_tmp55_ = node;
			_tmp56_ = json_node_get_string (_tmp55_);
			_tmp54_ = g_strcmp0 (_tmp56_, "") != 0;
		} else {
			_tmp54_ = FALSE;
		}
		if (_tmp54_) {
			ProtonPlusModelsVariantCompatibility* _tmp57_;
			_tmp57_ = proton_plus_models_variant_compatibility_unspecified ();
			result = _tmp57_;
			__vala_JsonNode_free0 (node);
			parsed_architectures = (g_free (parsed_architectures), NULL);
			return result;
		}
		__vala_JsonNode_free0 (node);
	}
	_tmp58_ = parsed_architectures;
	_tmp58__length1 = parsed_architectures_length1;
	_tmp59_ = proton_plus_models_variant_compatibility_new (_tmp58_, _tmp58__length1, level, architecture_independent, aarch64_level);
	compatibility = _tmp59_;
	_tmp61_ = compatibility;
	if (proton_plus_models_variant_compatibility_is_structurally_valid (_tmp61_)) {
		ProtonPlusModelsVariantCompatibility* _tmp62_;
		ProtonPlusModelsVariantCompatibility* _tmp63_;
		_tmp62_ = compatibility;
		_tmp63_ = _g_object_ref0 (_tmp62_);
		_g_object_unref0 (_tmp60_);
		_tmp60_ = _tmp63_;
	} else {
		ProtonPlusModelsVariantCompatibility* _tmp64_;
		_tmp64_ = proton_plus_models_variant_compatibility_unspecified ();
		_g_object_unref0 (_tmp60_);
		_tmp60_ = _tmp64_;
	}
	_tmp65_ = _tmp60_;
	_tmp60_ = NULL;
	result = _tmp65_;
	_g_object_unref0 (_tmp60_);
	_g_object_unref0 (compatibility);
	parsed_architectures = (g_free (parsed_architectures), NULL);
	return result;
}

static gboolean
proton_plus_models_variant_compatibility_supports_architecture (ProtonPlusModelsVariantCompatibility* self,
                                                                ProtonPlusModelsCpuArchitecture architecture)
{
	ProtonPlusModelsCpuArchitecture* _tmp0_;
	gint _tmp0__length1;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->supported_architectures;
	_tmp0__length1 = self->priv->supported_architectures_length1;
	{
		ProtonPlusModelsCpuArchitecture* supported_architecture_collection = NULL;
		gint supported_architecture_collection_length1 = 0;
		gint _supported_architecture_collection_size_ = 0;
		gint supported_architecture_it = 0;
		supported_architecture_collection = _tmp0_;
		supported_architecture_collection_length1 = _tmp0__length1;
		for (supported_architecture_it = 0; supported_architecture_it < supported_architecture_collection_length1; supported_architecture_it = supported_architecture_it + 1) {
			ProtonPlusModelsCpuArchitecture supported_architecture = 0;
			supported_architecture = supported_architecture_collection[supported_architecture_it];
			{
				if (supported_architecture == architecture) {
					result = TRUE;
					return result;
				}
			}
		}
	}
	result = FALSE;
	return result;
}

static ProtonPlusModelsCpuArchitecture*
proton_plus_models_variant_compatibility_copy_architectures (ProtonPlusModelsCpuArchitecture* values,
                                                             gint values_length1,
                                                             gint* result_length1)
{
	ProtonPlusModelsCpuArchitecture* copied = NULL;
	ProtonPlusModelsCpuArchitecture* _tmp2_;
	gint copied_length1;
	gint _copied_size_;
	ProtonPlusModelsCpuArchitecture* _tmp7_;
	gint _tmp7__length1;
	ProtonPlusModelsCpuArchitecture* result;
	if (values == NULL) {
		ProtonPlusModelsCpuArchitecture* _tmp0_;
		ProtonPlusModelsCpuArchitecture* _tmp1_;
		gint _tmp1__length1;
		_tmp0_ = g_new0 (ProtonPlusModelsCpuArchitecture, 0);
		_tmp1_ = _tmp0_;
		_tmp1__length1 = 0;
		if (result_length1) {
			*result_length1 = _tmp1__length1;
		}
		result = _tmp1_;
		return result;
	}
	_tmp2_ = g_new0 (ProtonPlusModelsCpuArchitecture, values_length1);
	copied = _tmp2_;
	copied_length1 = values_length1;
	_copied_size_ = copied_length1;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				ProtonPlusModelsCpuArchitecture* _tmp5_;
				gint _tmp5__length1;
				ProtonPlusModelsCpuArchitecture _tmp6_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = index;
					index = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				if (!(index < values_length1)) {
					break;
				}
				_tmp5_ = copied;
				_tmp5__length1 = copied_length1;
				_tmp6_ = values[index];
				_tmp5_[index] = _tmp6_;
			}
		}
	}
	_tmp7_ = copied;
	_tmp7__length1 = copied_length1;
	if (result_length1) {
		*result_length1 = _tmp7__length1;
	}
	result = _tmp7_;
	return result;
}

static gchar*
proton_plus_models_variant_compatibility_architecture_to_string (ProtonPlusModelsCpuArchitecture architecture)
{
	gchar* result;
	switch (architecture) {
		case PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_32:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("x86_32");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("x86_64");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("aarch64");
			result = _tmp2_;
			return result;
		}
		default:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("unknown");
			result = _tmp3_;
			return result;
		}
	}
}

static ProtonPlusModelsCpuArchitecture
proton_plus_models_variant_compatibility_architecture_from_string (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	ProtonPlusModelsCpuArchitecture result;
	g_return_val_if_fail (value != NULL, 0);
	_tmp0_ = value;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("x86_32")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_32;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("x86_64")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_CPU_ARCHITECTURE_X86_64;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("aarch64")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_CPU_ARCHITECTURE_AARCH64;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_CPU_ARCHITECTURE_UNKNOWN;
				return result;
			}
		}
	}
}

static gchar*
proton_plus_models_variant_compatibility_x86_64_level_to_string (ProtonPlusModelsX86_64Level level)
{
	gchar* result;
	switch (level) {
		case PROTON_PLUS_MODELS_X86_64LEVEL_BASELINE:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("baseline");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_X86_64LEVEL_V2:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("v2");
			result = _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_X86_64LEVEL_V3:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("v3");
			result = _tmp2_;
			return result;
		}
		case PROTON_PLUS_MODELS_X86_64LEVEL_V4:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("v4");
			result = _tmp3_;
			return result;
		}
		default:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("");
			result = _tmp4_;
			return result;
		}
	}
}

static ProtonPlusModelsX86_64Level
proton_plus_models_variant_compatibility_x86_64_level_from_string (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	ProtonPlusModelsX86_64Level result;
	g_return_val_if_fail (value != NULL, 0);
	_tmp0_ = value;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("baseline")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_X86_64LEVEL_BASELINE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("v2")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_X86_64LEVEL_V2;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("v3")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_X86_64LEVEL_V3;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("v4")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_X86_64LEVEL_V4;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN;
				return result;
			}
		}
	}
}

static gchar*
proton_plus_models_variant_compatibility_aarch64_level_to_string (ProtonPlusModelsAarch64Level level)
{
	gchar* result;
	switch (level) {
		case PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_0:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("v8_0");
			result = _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_1:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("v8_1");
			result = _tmp1_;
			return result;
		}
		default:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("");
			result = _tmp2_;
			return result;
		}
	}
}

static ProtonPlusModelsAarch64Level
proton_plus_models_variant_compatibility_aarch64_level_from_string (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	ProtonPlusModelsAarch64Level result;
	g_return_val_if_fail (value != NULL, 0);
	_tmp0_ = value;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("v8_0")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_0;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("v8_1")))) {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_AARCH64_LEVEL_V8_1;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN;
				return result;
			}
		}
	}
}

ProtonPlusModelsX86_64Level
proton_plus_models_variant_compatibility_get_minimum_x86_64_level (ProtonPlusModelsVariantCompatibility* self)
{
	ProtonPlusModelsX86_64Level result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_minimum_x86_64_level;
	return result;
}

static void
proton_plus_models_variant_compatibility_set_minimum_x86_64_level (ProtonPlusModelsVariantCompatibility* self,
                                                                   ProtonPlusModelsX86_64Level value)
{
	ProtonPlusModelsX86_64Level old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_compatibility_get_minimum_x86_64_level (self);
	if (old_value != value) {
		self->priv->_minimum_x86_64_level = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_X86_64_LEVEL_PROPERTY]);
	}
}

ProtonPlusModelsAarch64Level
proton_plus_models_variant_compatibility_get_minimum_aarch64_level (ProtonPlusModelsVariantCompatibility* self)
{
	ProtonPlusModelsAarch64Level result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_minimum_aarch64_level;
	return result;
}

static void
proton_plus_models_variant_compatibility_set_minimum_aarch64_level (ProtonPlusModelsVariantCompatibility* self,
                                                                    ProtonPlusModelsAarch64Level value)
{
	ProtonPlusModelsAarch64Level old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_compatibility_get_minimum_aarch64_level (self);
	if (old_value != value) {
		self->priv->_minimum_aarch64_level = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_AARCH64_LEVEL_PROPERTY]);
	}
}

gboolean
proton_plus_models_variant_compatibility_get_architecture_independent (ProtonPlusModelsVariantCompatibility* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_architecture_independent;
	return result;
}

static void
proton_plus_models_variant_compatibility_set_architecture_independent (ProtonPlusModelsVariantCompatibility* self,
                                                                       gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_compatibility_get_architecture_independent (self);
	if (old_value != value) {
		self->priv->_architecture_independent = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_ARCHITECTURE_INDEPENDENT_PROPERTY]);
	}
}

gboolean
proton_plus_models_variant_compatibility_get_is_specified (ProtonPlusModelsVariantCompatibility* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp3_ = self->priv->_architecture_independent;
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		ProtonPlusModelsCpuArchitecture* _tmp4_;
		gint _tmp4__length1;
		_tmp4_ = self->priv->supported_architectures;
		_tmp4__length1 = self->priv->supported_architectures_length1;
		_tmp2_ = _tmp4__length1 > 0;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ProtonPlusModelsX86_64Level _tmp5_;
		_tmp5_ = self->priv->_minimum_x86_64_level;
		_tmp1_ = _tmp5_ != PROTON_PLUS_MODELS_X86_64LEVEL_UNKNOWN;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ProtonPlusModelsAarch64Level _tmp6_;
		_tmp6_ = self->priv->_minimum_aarch64_level;
		_tmp0_ = _tmp6_ != PROTON_PLUS_MODELS_AARCH64_LEVEL_UNKNOWN;
	}
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_variant_compatibility_class_init (ProtonPlusModelsVariantCompatibilityClass * klass,
                                                     gpointer klass_data)
{
	proton_plus_models_variant_compatibility_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsVariantCompatibility_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_variant_compatibility_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_variant_compatibility_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_variant_compatibility_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_X86_64_LEVEL_PROPERTY, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_X86_64_LEVEL_PROPERTY] = g_param_spec_enum ("minimum-x86-64-level", "minimum-x86-64-level", "minimum-x86-64-level", PROTON_PLUS_MODELS_TYPE_X86_64LEVEL, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_AARCH64_LEVEL_PROPERTY, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_AARCH64_LEVEL_PROPERTY] = g_param_spec_enum ("minimum-aarch64-level", "minimum-aarch64-level", "minimum-aarch64-level", PROTON_PLUS_MODELS_TYPE_AARCH64_LEVEL, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_ARCHITECTURE_INDEPENDENT_PROPERTY, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_ARCHITECTURE_INDEPENDENT_PROPERTY] = g_param_spec_boolean ("architecture-independent", "architecture-independent", "architecture-independent", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_IS_SPECIFIED_PROPERTY, proton_plus_models_variant_compatibility_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_IS_SPECIFIED_PROPERTY] = g_param_spec_boolean ("is-specified", "is-specified", "is-specified", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_variant_compatibility_instance_init (ProtonPlusModelsVariantCompatibility * self,
                                                        gpointer klass)
{
	self->priv = proton_plus_models_variant_compatibility_get_instance_private (self);
}

static void
proton_plus_models_variant_compatibility_finalize (GObject * obj)
{
	ProtonPlusModelsVariantCompatibility * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_VARIANT_COMPATIBILITY, ProtonPlusModelsVariantCompatibility);
	self->priv->supported_architectures = (g_free (self->priv->supported_architectures), NULL);
	G_OBJECT_CLASS (proton_plus_models_variant_compatibility_parent_class)->finalize (obj);
}

static GType
proton_plus_models_variant_compatibility_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsVariantCompatibilityClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_variant_compatibility_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsVariantCompatibility), 0, (GInstanceInitFunc) proton_plus_models_variant_compatibility_instance_init, NULL };
	GType proton_plus_models_variant_compatibility_type_id;
	proton_plus_models_variant_compatibility_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsVariantCompatibility", &g_define_type_info, 0);
	ProtonPlusModelsVariantCompatibility_private_offset = g_type_add_instance_private (proton_plus_models_variant_compatibility_type_id, sizeof (ProtonPlusModelsVariantCompatibilityPrivate));
	return proton_plus_models_variant_compatibility_type_id;
}

GType
proton_plus_models_variant_compatibility_get_type (void)
{
	static volatile gsize proton_plus_models_variant_compatibility_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_variant_compatibility_type_id__once)) {
		GType proton_plus_models_variant_compatibility_type_id;
		proton_plus_models_variant_compatibility_type_id = proton_plus_models_variant_compatibility_get_type_once ();
		g_once_init_leave (&proton_plus_models_variant_compatibility_type_id__once, proton_plus_models_variant_compatibility_type_id);
	}
	return proton_plus_models_variant_compatibility_type_id__once;
}

static void
_vala_proton_plus_models_variant_compatibility_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	ProtonPlusModelsVariantCompatibility * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_VARIANT_COMPATIBILITY, ProtonPlusModelsVariantCompatibility);
	switch (property_id) {
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_X86_64_LEVEL_PROPERTY:
		g_value_set_enum (value, proton_plus_models_variant_compatibility_get_minimum_x86_64_level (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_AARCH64_LEVEL_PROPERTY:
		g_value_set_enum (value, proton_plus_models_variant_compatibility_get_minimum_aarch64_level (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_ARCHITECTURE_INDEPENDENT_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_variant_compatibility_get_architecture_independent (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_IS_SPECIFIED_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_variant_compatibility_get_is_specified (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_variant_compatibility_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec)
{
	ProtonPlusModelsVariantCompatibility * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_VARIANT_COMPATIBILITY, ProtonPlusModelsVariantCompatibility);
	switch (property_id) {
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_X86_64_LEVEL_PROPERTY:
		proton_plus_models_variant_compatibility_set_minimum_x86_64_level (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_MINIMUM_AARCH64_LEVEL_PROPERTY:
		proton_plus_models_variant_compatibility_set_minimum_aarch64_level (self, g_value_get_enum (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_ARCHITECTURE_INDEPENDENT_PROPERTY:
		proton_plus_models_variant_compatibility_set_architecture_independent (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

