/* vm-configurator.c generated by valac 0.25.1.6-a1f05, the Vala compiler
 * generated from vm-configurator.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <gio/gio.h>
#include <libcommon.h>
#include <gtk/gtk.h>
#include <osinfo/osinfo.h>
#include <config.h>
#include <unistd.h>
#include <libxml/xmlreader.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <glib/gi18n-lib.h>
#include <gobject/gvaluecollector.h>


#define BOXES_TYPE_VM_CONFIGURATOR (boxes_vm_configurator_get_type ())
#define BOXES_VM_CONFIGURATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CONFIGURATOR, BoxesVMConfigurator))
#define BOXES_VM_CONFIGURATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CONFIGURATOR, BoxesVMConfiguratorClass))
#define BOXES_IS_VM_CONFIGURATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CONFIGURATOR))
#define BOXES_IS_VM_CONFIGURATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CONFIGURATOR))
#define BOXES_VM_CONFIGURATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CONFIGURATOR, BoxesVMConfiguratorClass))

typedef struct _BoxesVMConfigurator BoxesVMConfigurator;
typedef struct _BoxesVMConfiguratorClass BoxesVMConfiguratorClass;
typedef struct _BoxesVMConfiguratorPrivate BoxesVMConfiguratorPrivate;

#define BOXES_TYPE_INSTALLER_MEDIA (boxes_installer_media_get_type ())
#define BOXES_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMedia))
#define BOXES_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))
#define BOXES_IS_INSTALLER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_IS_INSTALLER_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLER_MEDIA))
#define BOXES_INSTALLER_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLER_MEDIA, BoxesInstallerMediaClass))

typedef struct _BoxesInstallerMedia BoxesInstallerMedia;
typedef struct _BoxesInstallerMediaClass BoxesInstallerMediaClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _BoxesInstallerMediaPrivate BoxesInstallerMediaPrivate;

#define BOXES_TYPE_VM_CREATOR (boxes_vm_creator_get_type ())
#define BOXES_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreator))
#define BOXES_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))
#define BOXES_IS_VM_CREATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_VM_CREATOR))
#define BOXES_IS_VM_CREATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_VM_CREATOR))
#define BOXES_VM_CREATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_VM_CREATOR, BoxesVMCreatorClass))

typedef struct _BoxesVMCreator BoxesVMCreator;
typedef struct _BoxesVMCreatorClass BoxesVMCreatorClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _xmlFreeTextReader0(var) ((var == NULL) ? NULL : (var = (xmlFreeTextReader (var), NULL)))

#define BOXES_TYPE_INSTALLED_MEDIA (boxes_installed_media_get_type ())
#define BOXES_INSTALLED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMedia))
#define BOXES_INSTALLED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMediaClass))
#define BOXES_IS_INSTALLED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_INSTALLED_MEDIA))
#define BOXES_IS_INSTALLED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_INSTALLED_MEDIA))
#define BOXES_INSTALLED_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_INSTALLED_MEDIA, BoxesInstalledMediaClass))

typedef struct _BoxesInstalledMedia BoxesInstalledMedia;
typedef struct _BoxesInstalledMediaClass BoxesInstalledMediaClass;

#define BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA (boxes_libvirt_system_media_get_type ())
#define BOXES_LIBVIRT_SYSTEM_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMedia))
#define BOXES_LIBVIRT_SYSTEM_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaClass))
#define BOXES_IS_LIBVIRT_SYSTEM_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA))
#define BOXES_IS_LIBVIRT_SYSTEM_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA))
#define BOXES_LIBVIRT_SYSTEM_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA, BoxesLibvirtSystemMediaClass))

typedef struct _BoxesLibvirtSystemMedia BoxesLibvirtSystemMedia;
typedef struct _BoxesLibvirtSystemMediaClass BoxesLibvirtSystemMediaClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _BoxesParamSpecVMConfigurator BoxesParamSpecVMConfigurator;

typedef enum  {
	BOXES_VM_CONFIGURATOR_ERROR_NO_GUEST_CAPS
} BoxesVMConfiguratorError;
#define BOXES_VM_CONFIGURATOR_ERROR boxes_vm_configurator_error_quark ()
struct _BoxesVMConfigurator {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BoxesVMConfiguratorPrivate * priv;
};

struct _BoxesVMConfiguratorClass {
	GTypeClass parent_class;
	void (*finalize) (BoxesVMConfigurator *self);
};

struct _BoxesInstallerMedia {
	GObject parent_instance;
	BoxesInstallerMediaPrivate * priv;
	OsinfoOs* os;
	OsinfoResources* resources;
	OsinfoMedia* os_media;
	gchar* label;
	gchar* device_file;
	gchar* mount_point;
	gboolean from_image;
};

struct _BoxesInstallerMediaClass {
	GObjectClass parent_class;
	void (*set_direct_boot_params) (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
	void (*prepare) (BoxesInstallerMedia* self, BoxesActivityProgress* progress, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_);
	void (*prepare_for_installation) (BoxesInstallerMedia* self, const gchar* vm_name, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*prepare_for_installation_finish) (BoxesInstallerMedia* self, GAsyncResult* _res_, GError** error);
	void (*prepare_to_continue_installation) (BoxesInstallerMedia* self, const gchar* vm_name);
	void (*clean_up) (BoxesInstallerMedia* self);
	void (*clean_up_preparation_cache) (BoxesInstallerMedia* self);
	void (*setup_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*setup_post_install_domain_config) (BoxesInstallerMedia* self, GVirConfigDomain* domain);
	void (*populate_setup_box) (BoxesInstallerMedia* self, GtkBox* setup_box);
	GList* (*get_vm_properties) (BoxesInstallerMedia* self);
	BoxesVMCreator* (*get_vm_creator) (BoxesInstallerMedia* self);
	OsinfoDeviceList* (*get_supported_devices) (BoxesInstallerMedia* self);
	guint64 (*get_installed_size) (BoxesInstallerMedia* self);
	gboolean (*get_need_user_input_for_vm_creation) (BoxesInstallerMedia* self);
	gboolean (*get_ready_to_create) (BoxesInstallerMedia* self);
	gboolean (*get_live) (BoxesInstallerMedia* self);
	gchar* (*get_architecture) (BoxesInstallerMedia* self);
};

struct _BoxesParamSpecVMConfigurator {
	GParamSpec parent_instance;
};


static gpointer boxes_vm_configurator_parent_class = NULL;

GQuark boxes_vm_configurator_error_quark (void);
gpointer boxes_vm_configurator_ref (gpointer instance);
void boxes_vm_configurator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_configurator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_configurator (GValue* value, gpointer v_object);
void boxes_value_take_vm_configurator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_configurator (const GValue* value);
GType boxes_vm_configurator_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_VM_CONFIGURATOR_DUMMY_PROPERTY
};
#define BOXES_VM_CONFIGURATOR_BOXES_NS "boxes"
#define BOXES_VM_CONFIGURATOR_BOXES_NS_URI "http://live.gnome.org/Boxes/"
#define BOXES_VM_CONFIGURATOR_BOXES_XML "<gnome-boxes>%s</gnome-boxes>"
#define BOXES_VM_CONFIGURATOR_LIVE_STATE "live"
#define BOXES_VM_CONFIGURATOR_INSTALLATION_STATE "installation"
#define BOXES_VM_CONFIGURATOR_IMPORT_STATE "importing"
#define BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_STATE "libvirt-system-importing"
#define BOXES_VM_CONFIGURATOR_INSTALLED_STATE "installed"
#define BOXES_VM_CONFIGURATOR_LIVE_XML "<os-state>" BOXES_VM_CONFIGURATOR_LIVE_STATE "</os-state>"
#define BOXES_VM_CONFIGURATOR_INSTALLATION_XML "<os-state>" BOXES_VM_CONFIGURATOR_INSTALLATION_STATE "</os-state>"
#define BOXES_VM_CONFIGURATOR_IMPORT_XML "<os-state>" BOXES_VM_CONFIGURATOR_IMPORT_STATE "</os-state>"
#define BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_XML "<os-state>" BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_STATE "</os-state>"
#define BOXES_VM_CONFIGURATOR_INSTALLED_XML "<os-state>" BOXES_VM_CONFIGURATOR_INSTALLED_STATE "</os-state>"
#define BOXES_VM_CONFIGURATOR_OS_ID_XML "<os-id>%s</os-id>"
#define BOXES_VM_CONFIGURATOR_MEDIA_ID_XML "<media-id>%s</media-id>"
#define BOXES_VM_CONFIGURATOR_MEDIA_XML "<media>%s</media>"
#define BOXES_VM_CONFIGURATOR_NUM_REBOOTS_XML "<num-reboots>%u</num-reboots>"
GType boxes_installer_media_get_type (void) G_GNUC_CONST;
GVirConfigDomain* boxes_vm_configurator_create_domain_config (BoxesInstallerMedia* install_media, const gchar* target_path, GVirConfigCapabilities* caps, GError** error);
void boxes_vm_configurator_setup_custom_xml (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
static GVirConfigCapabilitiesGuest* boxes_vm_configurator_get_best_guest_caps (GVirConfigCapabilities* caps, BoxesInstallerMedia* install_media, GError** error);
gpointer boxes_vm_creator_ref (gpointer instance);
void boxes_vm_creator_unref (gpointer instance);
GParamSpec* boxes_param_spec_vm_creator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void boxes_value_set_vm_creator (GValue* value, gpointer v_object);
void boxes_value_take_vm_creator (GValue* value, gpointer v_object);
gpointer boxes_value_get_vm_creator (const GValue* value);
GType boxes_vm_creator_get_type (void) G_GNUC_CONST;
static void boxes_vm_configurator_set_cpu_config (GVirConfigDomain* domain, GVirConfigCapabilities* caps);
static gboolean boxes_vm_configurator_guest_kvm_enabled (GVirConfigCapabilitiesGuest* guest_caps);
static void boxes_vm_configurator_set_os_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, GVirConfigCapabilitiesGuest* guest_caps);
static gboolean boxes_vm_configurator_guest_supports_feature (GVirConfigCapabilitiesGuest* guest_caps, const gchar* feature_name);
static void _vala_array_add13 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add14 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add15 (gchar*** array, int* length, int* size, gchar* value);
static void boxes_vm_configurator_set_target_media_config (GVirConfigDomain* domain, const gchar* target_path, BoxesInstallerMedia* install_media);
void boxes_installer_media_setup_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
void boxes_vm_configurator_add_usb_support (GVirConfigDomain* domain);
void boxes_vm_configurator_add_smartcard_support (GVirConfigDomain* domain);
static void boxes_vm_configurator_set_video_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
static void boxes_vm_configurator_set_sound_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
static void boxes_vm_configurator_set_tablet_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
void boxes_vm_configurator_add_network_interface (GVirConfigDomain* domain, gboolean bridge, gboolean virtio);
gboolean boxes_is_libvirt_bridge_net_available (void);
gboolean boxes_installer_media_get_supports_virtio_net (BoxesInstallerMedia* self);
void boxes_vm_configurator_post_install_setup (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
static void boxes_vm_configurator_set_post_install_os_config (GVirConfigDomain* domain);
void boxes_installer_media_setup_post_install_domain_config (BoxesInstallerMedia* self, GVirConfigDomain* domain);
static void boxes_vm_configurator_mark_as_installed (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
gboolean boxes_vm_configurator_is_install_config (GVirConfigDomain* domain);
static gchar* boxes_vm_configurator_get_os_state (GVirConfigDomain* domain);
gboolean boxes_vm_configurator_is_live_config (GVirConfigDomain* domain);
gboolean boxes_vm_configurator_is_import_config (GVirConfigDomain* domain);
gboolean boxes_vm_configurator_is_libvirt_system_import_config (GVirConfigDomain* domain);
GVirConfigStorageVol* boxes_vm_configurator_create_volume_config (const gchar* name, gint64 storage, GError** error);
static GVirConfigStoragePermissions* boxes_vm_configurator_get_default_permissions (void);
GVirConfigStoragePool* boxes_vm_configurator_get_pool_config (GError** error);
gchar* boxes_vm_configurator_get_os_id (GVirConfigDomain* domain);
static gchar* boxes_vm_configurator_get_custom_xml_node (GVirConfigDomain* domain, const gchar* node_name);
gchar* boxes_vm_configurator_get_os_media_id (GVirConfigDomain* domain);
gchar* boxes_vm_configurator_get_source_media_path (GVirConfigDomain* domain);
guint boxes_vm_configurator_get_num_reboots (GVirConfigDomain* domain);
void boxes_vm_configurator_set_num_reboots (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, guint num_reboots);
static void boxes_vm_configurator_update_custom_xml (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, guint num_reboots, gboolean installed);
gboolean boxes_installer_media_get_supports_virtio_disk (BoxesInstallerMedia* self);
void boxes_installer_media_set_direct_boot_params (BoxesInstallerMedia* self, GVirConfigDomainOs* os);
OsinfoDevice* boxes_find_device_by_prop (OsinfoDeviceList* devices, const gchar* prop_name, const gchar* prop_value);
OsinfoDeviceList* boxes_installer_media_get_supported_devices (BoxesInstallerMedia* self);
GType boxes_installed_media_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_system_media_get_type (void) G_GNUC_CONST;
gboolean boxes_installer_media_get_live (BoxesInstallerMedia* self);
static GVirConfigDomainControllerUsb* boxes_vm_configurator_create_usb_controller (GVirConfigDomainControllerUsbModel model, GVirConfigDomainControllerUsb* master, guint index, guint start_port);
void boxes_vm_configurator_remove_usb_controllers (GVirConfigDomain* domain, GError** error);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
static gint __lambda23_ (GVirConfigCapabilitiesGuest* caps_a, GVirConfigCapabilitiesGuest* caps_b);
static gint ___lambda23__gcompare_func (gconstpointer a, gconstpointer b);
gboolean boxes_installer_media_is_architecture_compatible (BoxesInstallerMedia* self, const gchar* architecture);
static gboolean boxes_vm_configurator_guest_is_qemu (GVirConfigCapabilitiesGuest* guest_caps);
BoxesVMConfigurator* boxes_vm_configurator_new (void);
BoxesVMConfigurator* boxes_vm_configurator_construct (GType object_type);
static void boxes_vm_configurator_finalize (BoxesVMConfigurator* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


GQuark boxes_vm_configurator_error_quark (void) {
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
	return g_quark_from_static_string ("boxes_vm_configurator_error-quark");
#line 241 "vm-configurator.c"
}


static void _vala_array_add13 (gchar*** array, int* length, int* size, gchar* value) {
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if ((*length) == (*size)) {
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 252 "vm-configurator.c"
	}
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(*array)[(*length)++] = value;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(*array)[*length] = NULL;
#line 258 "vm-configurator.c"
}


static void _vala_array_add14 (gchar*** array, int* length, int* size, gchar* value) {
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if ((*length) == (*size)) {
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 269 "vm-configurator.c"
	}
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(*array)[(*length)++] = value;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(*array)[*length] = NULL;
#line 275 "vm-configurator.c"
}


static void _vala_array_add15 (gchar*** array, int* length, int* size, gchar* value) {
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if ((*length) == (*size)) {
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 286 "vm-configurator.c"
	}
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(*array)[(*length)++] = value;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(*array)[*length] = NULL;
#line 292 "vm-configurator.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1278 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1278 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1279 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1279 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1279 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1279 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 312 "vm-configurator.c"
}


GVirConfigDomain* boxes_vm_configurator_create_domain_config (BoxesInstallerMedia* install_media, const gchar* target_path, GVirConfigCapabilities* caps, GError** error) {
	GVirConfigDomain* result = NULL;
	GVirConfigDomain* domain = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
	GVirConfigCapabilitiesGuest* best_caps = NULL;
	GVirConfigCapabilities* _tmp2_ = NULL;
	BoxesInstallerMedia* _tmp3_ = NULL;
	GVirConfigCapabilitiesGuest* _tmp4_ = NULL;
	BoxesInstallerMedia* _tmp5_ = NULL;
	OsinfoResources* _tmp6_ = NULL;
	gint64 _tmp7_ = 0LL;
	gint64 _tmp8_ = 0LL;
	GVirConfigCapabilities* _tmp9_ = NULL;
	GVirConfigDomainVirtType _tmp10_ = 0;
	gboolean _tmp11_ = FALSE;
	GVirConfigDomainVirtType virt_type = 0;
	GVirConfigDomainVirtType _tmp12_ = 0;
	BoxesInstallerMedia* _tmp13_ = NULL;
	gchar** features = NULL;
	gchar** _tmp14_ = NULL;
	gint features_length1 = 0;
	gint _features_size_ = 0;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp21_ = FALSE;
	gchar** _tmp24_ = NULL;
	gint _tmp24__length1 = 0;
	GVirConfigDomainClock* clock = NULL;
	GVirConfigDomainClock* _tmp25_ = NULL;
	gboolean _tmp26_ = FALSE;
	BoxesInstallerMedia* _tmp27_ = NULL;
	OsinfoOs* _tmp28_ = NULL;
	GVirConfigDomainTimer* timer = NULL;
	GVirConfigDomainTimerRtc* _tmp36_ = NULL;
	GVirConfigDomainTimer* _tmp37_ = NULL;
	GVirConfigDomainClock* _tmp38_ = NULL;
	GVirConfigDomainTimer* _tmp39_ = NULL;
	GVirConfigDomainTimerPit* _tmp40_ = NULL;
	GVirConfigDomainTimer* _tmp41_ = NULL;
	GVirConfigDomainClock* _tmp42_ = NULL;
	GVirConfigDomainTimer* _tmp43_ = NULL;
	GVirConfigDomainClock* _tmp44_ = NULL;
	const gchar* _tmp45_ = NULL;
	BoxesInstallerMedia* _tmp46_ = NULL;
	BoxesInstallerMedia* _tmp47_ = NULL;
	GVirConfigDomainGraphicsSpice* graphics = NULL;
	GVirConfigDomainGraphicsSpice* _tmp48_ = NULL;
	GVirConfigDomainGraphicsSpice* _tmp49_ = NULL;
	GVirConfigDomainGraphicsSpice* _tmp50_ = NULL;
	GVirConfigDomainGraphicsSpice* _tmp51_ = NULL;
	GVirConfigDomainChannel* channel = NULL;
	GVirConfigDomainChannel* _tmp52_ = NULL;
	GVirConfigDomainChannel* _tmp53_ = NULL;
	GVirConfigDomainChannel* _tmp54_ = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp55_ = NULL;
	GVirConfigDomainChannel* _tmp56_ = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp57_ = NULL;
	GVirConfigDomainChannel* _tmp58_ = NULL;
	BoxesInstallerMedia* _tmp59_ = NULL;
	BoxesInstallerMedia* _tmp60_ = NULL;
	BoxesInstallerMedia* _tmp61_ = NULL;
	GVirConfigDomainPowerManagement* pm = NULL;
	GVirConfigDomainPowerManagement* _tmp62_ = NULL;
	GVirConfigDomainPowerManagement* _tmp63_ = NULL;
	GVirConfigDomainPowerManagement* _tmp64_ = NULL;
	GVirConfigDomainPowerManagement* _tmp65_ = NULL;
	GVirConfigDomainConsole* console = NULL;
	GVirConfigDomainConsole* _tmp66_ = NULL;
	GVirConfigDomainConsole* _tmp67_ = NULL;
	GVirConfigDomainChardevSourcePty* _tmp68_ = NULL;
	GVirConfigDomainChardevSourcePty* _tmp69_ = NULL;
	GVirConfigDomainConsole* _tmp70_ = NULL;
	gboolean _tmp71_ = FALSE;
	BoxesInstallerMedia* _tmp72_ = NULL;
	gboolean _tmp73_ = FALSE;
	gboolean _tmp74_ = FALSE;
	GError * _inner_error_ = NULL;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (target_path != NULL, NULL);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_new ();
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	domain = _tmp0_;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_setup_custom_xml (domain, _tmp1_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = caps;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = install_media;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_best_guest_caps (_tmp2_, _tmp3_, &_inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	best_caps = _tmp4_;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_propagate_error (error, _inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (domain);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return NULL;
#line 427 "vm-configurator.c"
		} else {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (domain);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_clear_error (&_inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return NULL;
#line 437 "vm-configurator.c"
		}
	}
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = install_media;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_->resources;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = osinfo_resources_get_ram (_tmp6_);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = _tmp7_;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_memory (domain, (guint64) (_tmp8_ / OSINFO_KIBIBYTES));
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = caps;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_cpu_config (domain, _tmp9_);
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = boxes_vm_configurator_guest_kvm_enabled (best_caps);
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp11_) {
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = GVIR_CONFIG_DOMAIN_VIRT_KVM;
#line 460 "vm-configurator.c"
	} else {
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = GVIR_CONFIG_DOMAIN_VIRT_QEMU;
#line 464 "vm-configurator.c"
	}
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	virt_type = _tmp10_;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = virt_type;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_virt_type (domain, _tmp12_);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = install_media;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_os_config (domain, _tmp13_, best_caps);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = g_new0 (gchar*, 0 + 1);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	features = _tmp14_;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	features_length1 = 0;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_features_size_ = features_length1;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = boxes_vm_configurator_guest_supports_feature (best_caps, "acpi");
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp15_) {
#line 488 "vm-configurator.c"
		gchar** _tmp16_ = NULL;
		gint _tmp16__length1 = 0;
		gchar* _tmp17_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = features;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp16__length1 = features_length1;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp17_ = g_strdup ("acpi");
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_vala_array_add13 (&features, &features_length1, &_features_size_, _tmp17_);
#line 500 "vm-configurator.c"
	}
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp18_ = boxes_vm_configurator_guest_supports_feature (best_caps, "apic");
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp18_) {
#line 506 "vm-configurator.c"
		gchar** _tmp19_ = NULL;
		gint _tmp19__length1 = 0;
		gchar* _tmp20_ = NULL;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp19_ = features;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp19__length1 = features_length1;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp20_ = g_strdup ("apic");
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_vala_array_add14 (&features, &features_length1, &_features_size_, _tmp20_);
#line 518 "vm-configurator.c"
	}
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp21_ = boxes_vm_configurator_guest_supports_feature (best_caps, "pae");
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp21_) {
#line 524 "vm-configurator.c"
		gchar** _tmp22_ = NULL;
		gint _tmp22__length1 = 0;
		gchar* _tmp23_ = NULL;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp22_ = features;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp22__length1 = features_length1;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp23_ = g_strdup ("pae");
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_vala_array_add15 (&features, &features_length1, &_features_size_, _tmp23_);
#line 536 "vm-configurator.c"
	}
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = features;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp24__length1 = features_length1;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_features (domain, _tmp24_);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp25_ = gvir_config_domain_clock_new ();
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	clock = _tmp25_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp27_ = install_media;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = _tmp27_->os;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp28_ != NULL) {
#line 554 "vm-configurator.c"
		BoxesInstallerMedia* _tmp29_ = NULL;
		OsinfoOs* _tmp30_ = NULL;
		const gchar* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		gboolean _tmp33_ = FALSE;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp29_ = install_media;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp30_ = _tmp29_->os;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp31_ = osinfo_product_get_short_id ((OsinfoProduct*) _tmp30_);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp32_ = _tmp31_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp33_ = string_contains (_tmp32_, "win");
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = _tmp33_;
#line 572 "vm-configurator.c"
	} else {
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = FALSE;
#line 576 "vm-configurator.c"
	}
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp26_) {
#line 580 "vm-configurator.c"
		GVirConfigDomainClock* _tmp34_ = NULL;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp34_ = clock;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_clock_set_offset (_tmp34_, GVIR_CONFIG_DOMAIN_CLOCK_LOCALTIME);
#line 586 "vm-configurator.c"
	} else {
		GVirConfigDomainClock* _tmp35_ = NULL;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp35_ = clock;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_clock_set_offset (_tmp35_, GVIR_CONFIG_DOMAIN_CLOCK_UTC);
#line 593 "vm-configurator.c"
	}
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp36_ = gvir_config_domain_timer_rtc_new ();
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	timer = (GVirConfigDomainTimer*) _tmp36_;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp37_ = timer;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_timer_set_tick_policy (_tmp37_, GVIR_CONFIG_DOMAIN_TIMER_TICK_POLICY_CATCHUP);
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp38_ = clock;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp39_ = timer;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_clock_add_timer (_tmp38_, _tmp39_);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp40_ = gvir_config_domain_timer_pit_new ();
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	timer = (GVirConfigDomainTimer*) _tmp40_;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp41_ = timer;
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_timer_set_tick_policy (_tmp41_, GVIR_CONFIG_DOMAIN_TIMER_TICK_POLICY_DELAY);
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp42_ = clock;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp43_ = timer;
#line 65 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_clock_add_timer (_tmp42_, _tmp43_);
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp44_ = clock;
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_clock (domain, _tmp44_);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp45_ = target_path;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp46_ = install_media;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_target_media_config (domain, _tmp45_, _tmp46_);
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp47_ = install_media;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_setup_domain_config (_tmp47_, domain);
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp48_ = gvir_config_domain_graphics_spice_new ();
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	graphics = _tmp48_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp49_ = graphics;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_graphics_spice_set_autoport (_tmp49_, TRUE);
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp50_ = graphics;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_graphics_spice_set_image_compression (_tmp50_, GVIR_CONFIG_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_OFF);
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp51_ = graphics;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp51_);
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp52_ = gvir_config_domain_channel_new ();
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	channel = _tmp52_;
#line 78 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp53_ = channel;
#line 78 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_type (_tmp53_, GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp54_ = channel;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_name (_tmp54_, "com.redhat.spice.0");
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp55_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp55_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp56_ = channel;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp57_ = vmc;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp56_, (GVirConfigDomainChardevSource*) _tmp57_);
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp58_ = channel;
#line 82 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp58_);
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (HAVE_USBREDIR) {
#line 86 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_add_usb_support (domain);
#line 685 "vm-configurator.c"
	}
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (HAVE_SMARTCARD) {
#line 89 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_add_smartcard_support (domain);
#line 691 "vm-configurator.c"
	}
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp59_ = install_media;
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_video_config (domain, _tmp59_);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp60_ = install_media;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_sound_config (domain, _tmp60_);
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp61_ = install_media;
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_tablet_config (domain, _tmp61_);
#line 95 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (domain, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_POWEROFF, GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (domain, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_REBOOT, GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (domain, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_CRASH, GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY);
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp62_ = gvir_config_domain_power_management_new ();
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	pm = _tmp62_;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp63_ = pm;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_power_management_set_mem_suspend_enabled (_tmp63_, FALSE);
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp64_ = pm;
#line 102 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_power_management_set_disk_suspend_enabled (_tmp64_, FALSE);
#line 103 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp65_ = pm;
#line 103 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_power_management (domain, _tmp65_);
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp66_ = gvir_config_domain_console_new ();
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	console = _tmp66_;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp67_ = console;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp68_ = gvir_config_domain_chardev_source_pty_new ();
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp69_ = _tmp68_;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp67_, (GVirConfigDomainChardevSource*) _tmp69_);
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp69_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp70_ = console;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp70_);
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp71_ = boxes_is_libvirt_bridge_net_available ();
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp72_ = install_media;
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp73_ = boxes_installer_media_get_supports_virtio_net (_tmp72_);
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp74_ = _tmp73_;
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_add_network_interface (domain, _tmp71_, _tmp74_);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = domain;
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (console);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (pm);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (channel);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (graphics);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (clock);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	features = (_vala_array_free (features, features_length1, (GDestroyNotify) g_free), NULL);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (best_caps);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 777 "vm-configurator.c"
}


void boxes_vm_configurator_post_install_setup (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
	GVirConfigDomain* _tmp1_ = NULL;
	BoxesInstallerMedia* _tmp2_ = NULL;
	GVirConfigDomain* _tmp5_ = NULL;
	BoxesInstallerMedia* _tmp6_ = NULL;
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_post_install_os_config (_tmp0_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (_tmp1_, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_REBOOT, GVIR_CONFIG_DOMAIN_LIFECYCLE_RESTART);
#line 117 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = install_media;
#line 117 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ != NULL) {
#line 801 "vm-configurator.c"
		BoxesInstallerMedia* _tmp3_ = NULL;
		GVirConfigDomain* _tmp4_ = NULL;
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = install_media;
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = domain;
#line 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_installer_media_setup_post_install_domain_config (_tmp3_, _tmp4_);
#line 810 "vm-configurator.c"
	}
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = install_media;
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_mark_as_installed (_tmp5_, _tmp6_);
#line 818 "vm-configurator.c"
}


gboolean boxes_vm_configurator_is_install_config (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_INSTALLATION_STATE) == 0;
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 124 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 844 "vm-configurator.c"
}


gboolean boxes_vm_configurator_is_live_config (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_LIVE_STATE) == 0;
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 870 "vm-configurator.c"
}


gboolean boxes_vm_configurator_is_import_config (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_IMPORT_STATE) == 0;
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 896 "vm-configurator.c"
}


gboolean boxes_vm_configurator_is_libvirt_system_import_config (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_STATE) == 0;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 922 "vm-configurator.c"
}


GVirConfigStorageVol* boxes_vm_configurator_create_volume_config (const gchar* name, gint64 storage, GError** error) {
	GVirConfigStorageVol* result = NULL;
	GVirConfigStorageVol* volume = NULL;
	GVirConfigStorageVol* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
	GVirConfigStorageVolTarget* target = NULL;
	GVirConfigStorageVolTarget* _tmp3_ = NULL;
	GVirConfigStoragePermissions* permissions = NULL;
	GVirConfigStoragePermissions* _tmp4_ = NULL;
#line 139 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 140 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_vol_new ();
#line 140 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	volume = _tmp0_;
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = name;
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_name (volume, _tmp1_);
#line 142 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = storage;
#line 142 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_capacity (volume, (guint64) _tmp2_);
#line 143 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_storage_vol_target_new ();
#line 143 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	target = _tmp3_;
#line 144 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_target_set_format (target, "qcow2");
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_default_permissions ();
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp4_;
#line 146 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_target_set_permissions (target, permissions);
#line 147 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_target (volume, target);
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = volume;
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (permissions);
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (target);
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 972 "vm-configurator.c"
}


GVirConfigStoragePool* boxes_vm_configurator_get_pool_config (GError** error) {
	GVirConfigStoragePool* result = NULL;
	gchar* pool_path = NULL;
	gchar* _tmp0_ = NULL;
	GVirConfigStoragePool* pool = NULL;
	GVirConfigStoragePool* _tmp1_ = NULL;
	GVirConfigStoragePoolSource* source = NULL;
	GVirConfigStoragePoolSource* _tmp2_ = NULL;
	GVirConfigStoragePoolTarget* target = NULL;
	GVirConfigStoragePoolTarget* _tmp3_ = NULL;
	GVirConfigStoragePermissions* permissions = NULL;
	GVirConfigStoragePermissions* _tmp4_ = NULL;
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = boxes_get_user_pkgdata ("images");
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	pool_path = _tmp0_;
#line 154 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_ensure_directory (pool_path);
#line 156 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_storage_pool_new ();
#line 156 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	pool = _tmp1_;
#line 157 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_pool_type (pool, GVIR_CONFIG_STORAGE_POOL_TYPE_DIR);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_name (pool, PACKAGE_TARNAME);
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_storage_pool_source_new ();
#line 160 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	source = _tmp2_;
#line 161 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_source_set_directory (source, pool_path);
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_source (pool, source);
#line 164 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_storage_pool_target_new ();
#line 164 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	target = _tmp3_;
#line 165 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_target_set_path (target, pool_path);
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_default_permissions ();
#line 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp4_;
#line 167 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_target_set_permissions (target, permissions);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_target (pool, target);
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = pool;
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (permissions);
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (target);
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (source);
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (pool_path);
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1036 "vm-configurator.c"
}


gchar* boxes_vm_configurator_get_os_id (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 173 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "os-id");
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1054 "vm-configurator.c"
}


gchar* boxes_vm_configurator_get_os_media_id (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 177 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "media-id");
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1072 "vm-configurator.c"
}


gchar* boxes_vm_configurator_get_source_media_path (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 181 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "media");
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 182 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1090 "vm-configurator.c"
}


guint boxes_vm_configurator_get_num_reboots (GVirConfigDomain* domain) {
	guint result = 0U;
	gchar* str = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	const gchar* _tmp3_ = NULL;
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, 0U);
#line 186 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 186 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "num-reboots");
#line 186 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	str = _tmp1_;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = str;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_ != NULL) {
#line 1113 "vm-configurator.c"
		const gchar* _tmp4_ = NULL;
		gint _tmp5_ = 0;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = str;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = atoi (_tmp4_);
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = _tmp5_;
#line 1122 "vm-configurator.c"
	} else {
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = 0;
#line 1126 "vm-configurator.c"
	}
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = (guint) _tmp2_;
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (str);
#line 187 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1134 "vm-configurator.c"
}


void boxes_vm_configurator_set_num_reboots (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, guint num_reboots) {
	GVirConfigDomain* _tmp0_ = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
#line 190 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 190 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = num_reboots;
#line 191 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_custom_xml (_tmp0_, _tmp1_, _tmp2_, FALSE);
#line 1154 "vm-configurator.c"
}


void boxes_vm_configurator_setup_custom_xml (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
#line 194 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 194 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_custom_xml (_tmp0_, _tmp1_, (guint) 0, FALSE);
#line 1171 "vm-configurator.c"
}


static void boxes_vm_configurator_mark_as_installed (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
#line 198 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 199 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 199 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 199 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_custom_xml (_tmp0_, _tmp1_, (guint) 0, TRUE);
#line 1186 "vm-configurator.c"
}


static void boxes_vm_configurator_set_cpu_config (GVirConfigDomain* domain, GVirConfigCapabilities* caps) {
	GVirConfigCapabilitiesCpu* cpu_caps = NULL;
	GVirConfigCapabilities* _tmp0_ = NULL;
	GVirConfigCapabilitiesHost* _tmp1_ = NULL;
	GVirConfigCapabilitiesHost* _tmp2_ = NULL;
	GVirConfigCapabilitiesCpu* _tmp3_ = NULL;
	GVirConfigCapabilitiesCpu* _tmp4_ = NULL;
	GVirConfigCapabilitiesCpuTopology* topology = NULL;
	GVirConfigCapabilitiesCpu* _tmp5_ = NULL;
	GVirConfigCapabilitiesCpuTopology* _tmp6_ = NULL;
	GVirConfigCapabilitiesCpuTopology* _tmp7_ = NULL;
	GVirConfigDomain* _tmp8_ = NULL;
	GVirConfigCapabilitiesCpuTopology* _tmp9_ = NULL;
	guint64 _tmp10_ = 0ULL;
	GVirConfigCapabilitiesCpuTopology* _tmp11_ = NULL;
	guint64 _tmp12_ = 0ULL;
	GVirConfigCapabilitiesCpuTopology* _tmp13_ = NULL;
	guint64 _tmp14_ = 0ULL;
	GVirConfigDomainCpu* cpu = NULL;
	GVirConfigDomainCpu* _tmp15_ = NULL;
	GVirConfigDomainCpu* _tmp16_ = NULL;
	GVirConfigDomainCpu* _tmp17_ = NULL;
	GVirConfigCapabilitiesCpuTopology* _tmp18_ = NULL;
	GVirConfigCapabilitiesCpuModel* model_caps = NULL;
	GVirConfigCapabilitiesCpu* _tmp19_ = NULL;
	GVirConfigCapabilitiesCpuModel* _tmp20_ = NULL;
	GVirConfigDomainCpuModel* model = NULL;
	GVirConfigDomainCpuModel* _tmp21_ = NULL;
	GVirConfigDomainCpuModel* _tmp22_ = NULL;
	GVirConfigCapabilitiesCpuModel* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	GVirConfigDomainCpu* _tmp25_ = NULL;
	GVirConfigDomainCpuModel* _tmp26_ = NULL;
	GVirConfigDomain* _tmp27_ = NULL;
	GVirConfigDomainCpu* _tmp28_ = NULL;
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (caps != NULL);
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps;
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_get_host (_tmp0_);
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_host_get_cpu (_tmp2_);
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp2_);
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	cpu_caps = _tmp4_;
#line 204 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = cpu_caps;
#line 204 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = gvir_config_capabilities_cpu_get_topology (_tmp5_);
#line 204 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	topology = _tmp6_;
#line 206 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = topology;
#line 206 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp7_ == NULL) {
#line 207 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (topology);
#line 207 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (cpu_caps);
#line 207 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return;
#line 1259 "vm-configurator.c"
	}
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = domain;
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = topology;
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = gvir_config_capabilities_cpu_topology_get_sockets (_tmp9_);
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = topology;
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = gvir_config_capabilities_cpu_topology_get_cores (_tmp11_);
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = topology;
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = gvir_config_capabilities_cpu_topology_get_threads (_tmp13_);
#line 209 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_object_set (_tmp8_, "vcpu", (_tmp10_ * _tmp12_) * _tmp14_, NULL);
#line 211 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = gvir_config_domain_cpu_new ();
#line 211 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	cpu = _tmp15_;
#line 214 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = cpu;
#line 214 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_cpu_set_mode (_tmp16_, GVIR_CONFIG_DOMAIN_CPU_MODE_CUSTOM);
#line 215 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = cpu;
#line 215 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp18_ = topology;
#line 215 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_capabilities_cpu_set_topology ((GVirConfigCapabilitiesCpu*) _tmp17_, _tmp18_);
#line 217 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = cpu_caps;
#line 217 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = gvir_config_capabilities_cpu_get_model (_tmp19_);
#line 217 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model_caps = _tmp20_;
#line 218 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp21_ = gvir_config_domain_cpu_model_new ();
#line 218 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp21_;
#line 219 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp22_ = model;
#line 219 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = model_caps;
#line 219 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = gvir_config_capabilities_cpu_model_get_name (_tmp23_);
#line 219 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_capabilities_cpu_model_set_name ((GVirConfigCapabilitiesCpuModel*) _tmp22_, _tmp24_);
#line 220 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp25_ = cpu;
#line 220 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp26_ = model;
#line 220 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_cpu_set_model (_tmp25_, _tmp26_);
#line 222 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp27_ = domain;
#line 222 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = cpu;
#line 222 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_cpu (_tmp27_, _tmp28_);
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (model);
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (model_caps);
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (cpu);
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (topology);
#line 202 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (cpu_caps);
#line 1331 "vm-configurator.c"
}


static void boxes_vm_configurator_set_target_media_config (GVirConfigDomain* domain, const gchar* target_path, BoxesInstallerMedia* install_media) {
	GVirConfigDomainDisk* disk = NULL;
	GVirConfigDomainDisk* _tmp0_ = NULL;
	GVirConfigDomainDisk* _tmp1_ = NULL;
	GVirConfigDomainDisk* _tmp2_ = NULL;
	GVirConfigDomainDisk* _tmp3_ = NULL;
	GVirConfigDomainDisk* _tmp4_ = NULL;
	GVirConfigDomainDisk* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GVirConfigDomainDisk* _tmp7_ = NULL;
	BoxesInstallerMedia* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	GVirConfigDomain* _tmp15_ = NULL;
	GVirConfigDomainDisk* _tmp16_ = NULL;
#line 225 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 225 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (target_path != NULL);
#line 225 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 226 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 226 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	disk = _tmp0_;
#line 227 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = disk;
#line 227 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_type (_tmp1_, GVIR_CONFIG_DOMAIN_DISK_FILE);
#line 228 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = disk;
#line 228 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_guest_device_type (_tmp2_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK);
#line 229 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = disk;
#line 229 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_name (_tmp3_, "qemu");
#line 230 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = disk;
#line 230 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_format (_tmp4_, GVIR_CONFIG_DOMAIN_DISK_FORMAT_QCOW2);
#line 231 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = disk;
#line 231 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = target_path;
#line 231 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_source (_tmp5_, _tmp6_);
#line 232 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = disk;
#line 232 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_cache (_tmp7_, GVIR_CONFIG_DOMAIN_DISK_CACHE_NONE);
#line 234 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = install_media;
#line 234 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = boxes_installer_media_get_supports_virtio_disk (_tmp8_);
#line 234 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = _tmp9_;
#line 234 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp10_) {
#line 1394 "vm-configurator.c"
		GVirConfigDomainDisk* _tmp11_ = NULL;
		GVirConfigDomainDisk* _tmp12_ = NULL;
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:235: Using virtio controller for the main disk");
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = disk;
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_bus (_tmp11_, GVIR_CONFIG_DOMAIN_DISK_BUS_VIRTIO);
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp12_ = disk;
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp12_, "vda");
#line 1407 "vm-configurator.c"
	} else {
		GVirConfigDomainDisk* _tmp13_ = NULL;
		GVirConfigDomainDisk* _tmp14_ = NULL;
#line 239 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:239: Using IDE controller for the main disk");
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = disk;
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_bus (_tmp13_, GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = disk;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp14_, "hda");
#line 1421 "vm-configurator.c"
	}
#line 244 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = domain;
#line 244 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = disk;
#line 244 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp15_, (GVirConfigDomainDevice*) _tmp16_);
#line 225 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (disk);
#line 1431 "vm-configurator.c"
}


static void boxes_vm_configurator_set_post_install_os_config (GVirConfigDomain* domain) {
	GVirConfigDomainOs* os = NULL;
	GVirConfigDomainOs* _tmp0_ = NULL;
	GVirConfigDomainOs* old_os = NULL;
	GVirConfigDomain* _tmp1_ = NULL;
	GVirConfigDomainOs* _tmp2_ = NULL;
	GList* boot_devices = NULL;
	GList* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	GVirConfigDomain* _tmp5_ = NULL;
#line 247 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 248 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 248 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_os_type (os, GVIR_CONFIG_DOMAIN_OS_TYPE_HVM);
#line 251 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 251 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_domain_get_os (_tmp1_);
#line 251 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	old_os = _tmp2_;
#line 252 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_domain_os_get_boot_devices (old_os);
#line 252 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = _tmp3_;
#line 253 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = g_list_remove (boot_devices, (gpointer) ((gintptr) GVIR_CONFIG_DOMAIN_OS_BOOT_DEVICE_CDROM));
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_domain_os_get_arch (old_os);
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp5_, os);
#line 247 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 247 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (old_os);
#line 247 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 1481 "vm-configurator.c"
}


static void boxes_vm_configurator_set_os_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, GVirConfigCapabilitiesGuest* guest_caps) {
	GVirConfigDomainOs* os = NULL;
	GVirConfigDomainOs* _tmp0_ = NULL;
	GVirConfigCapabilitiesGuest* _tmp1_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp2_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	GList* boot_devices = NULL;
	BoxesInstallerMedia* _tmp5_ = NULL;
	GVirConfigDomain* _tmp6_ = NULL;
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (guest_caps != NULL);
#line 262 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 262 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 263 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_os_type (os, GVIR_CONFIG_DOMAIN_OS_TYPE_HVM);
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = guest_caps;
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_capabilities_guest_get_arch (_tmp1_);
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_capabilities_guest_arch_get_name (_tmp3_);
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp3_);
#line 266 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = NULL;
#line 267 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = install_media;
#line 267 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_set_direct_boot_params (_tmp5_, os);
#line 268 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = g_list_append (boot_devices, (gpointer) ((gintptr) GVIR_CONFIG_DOMAIN_OS_BOOT_DEVICE_CDROM));
#line 269 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = g_list_append (boot_devices, (gpointer) ((gintptr) GVIR_CONFIG_DOMAIN_OS_BOOT_DEVICE_HD));
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 272 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 272 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp6_, os);
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 1539 "vm-configurator.c"
}


static void boxes_vm_configurator_set_video_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomainVideo* video = NULL;
	GVirConfigDomainVideo* _tmp0_ = NULL;
	OsinfoDevice* device = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
	OsinfoDeviceList* _tmp2_ = NULL;
	OsinfoDeviceList* _tmp3_ = NULL;
	OsinfoDeviceList* _tmp4_ = NULL;
	OsinfoDevice* _tmp5_ = NULL;
	OsinfoDevice* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	OsinfoDevice* _tmp8_ = NULL;
	gint model = 0;
	GVirConfigDomainVideo* _tmp12_ = NULL;
	GVirConfigDomain* _tmp13_ = NULL;
	GVirConfigDomainVideo* _tmp14_ = NULL;
#line 275 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 275 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 276 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_video_new ();
#line 276 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	video = _tmp0_;
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "video");
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 1587 "vm-configurator.c"
		OsinfoDevice* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_video_model_get_type ());
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 1599 "vm-configurator.c"
	} else {
#line 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_VIDEO_MODEL_QXL;
#line 1603 "vm-configurator.c"
	}
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 280 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != (-1));
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = video;
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_video_set_model (_tmp12_, (GVirConfigDomainVideoModel) model);
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = video;
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 275 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 275 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (video);
#line 1623 "vm-configurator.c"
}


static void boxes_vm_configurator_set_sound_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomainSound* sound = NULL;
	GVirConfigDomainSound* _tmp0_ = NULL;
	OsinfoDevice* device = NULL;
	BoxesInstallerMedia* _tmp1_ = NULL;
	OsinfoDeviceList* _tmp2_ = NULL;
	OsinfoDeviceList* _tmp3_ = NULL;
	OsinfoDeviceList* _tmp4_ = NULL;
	OsinfoDevice* _tmp5_ = NULL;
	OsinfoDevice* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	OsinfoDevice* _tmp8_ = NULL;
	gint model = 0;
	GVirConfigDomainSound* _tmp12_ = NULL;
	GVirConfigDomain* _tmp13_ = NULL;
	GVirConfigDomainSound* _tmp14_ = NULL;
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 287 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_sound_new ();
#line 287 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	sound = _tmp0_;
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "audio");
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 1671 "vm-configurator.c"
		OsinfoDevice* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_sound_model_get_type ());
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 1683 "vm-configurator.c"
	} else {
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_SOUND_MODEL_AC97;
#line 1687 "vm-configurator.c"
	}
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 291 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != (-1));
#line 292 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = sound;
#line 292 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_sound_set_model (_tmp12_, (GVirConfigDomainSoundModel) model);
#line 294 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 294 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = sound;
#line 294 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (sound);
#line 1707 "vm-configurator.c"
}


static void boxes_vm_configurator_set_tablet_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomainInput* input = NULL;
	GVirConfigDomainInput* _tmp0_ = NULL;
	GVirConfigDomain* _tmp1_ = NULL;
#line 297 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 297 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 298 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_input_new ();
#line 298 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	input = _tmp0_;
#line 299 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_input_set_device_type (input, GVIR_CONFIG_DOMAIN_INPUT_DEVICE_TABLET);
#line 301 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 301 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp1_, (GVirConfigDomainDevice*) input);
#line 297 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (input);
#line 1731 "vm-configurator.c"
}


static GVirConfigStoragePermissions* boxes_vm_configurator_get_default_permissions (void) {
	GVirConfigStoragePermissions* result = NULL;
	GVirConfigStoragePermissions* permissions = NULL;
	GVirConfigStoragePermissions* _tmp0_ = NULL;
	uid_t _tmp1_ = {0};
	gid_t _tmp2_ = {0};
#line 305 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_permissions_new ();
#line 305 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp0_;
#line 307 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = getuid ();
#line 307 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_owner (permissions, (guint) _tmp1_);
#line 308 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = getgid ();
#line 308 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_group (permissions, (guint) _tmp2_);
#line 309 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_mode (permissions, (guint) 744);
#line 311 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = permissions;
#line 311 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1759 "vm-configurator.c"
}


static gchar* boxes_vm_configurator_get_os_state (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 315 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 315 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "os-state");
#line 315 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 315 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1777 "vm-configurator.c"
}


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	gint res_length1 = 0;
	gint _res_size_ = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 1300 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1301 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1301 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1301 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1302 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1302 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1302 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1302 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 1821 "vm-configurator.c"
	}
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1303 "/home/zeenix/jhbuild/share/vala-0.26/vapi/glib-2.0.vapi"
	return result;
#line 1827 "vm-configurator.c"
}


static gchar* boxes_vm_configurator_get_custom_xml_node (GVirConfigDomain* domain, const gchar* node_name) {
	gchar* result = NULL;
	gchar* xml = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp28_ = NULL;
	GVirConfigDomain* _tmp29_ = NULL;
	const gchar* _tmp30_ = NULL;
#line 318 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 318 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (node_name != NULL, NULL);
#line 319 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 319 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_get_custom_xml (_tmp0_, BOXES_VM_CONFIGURATOR_BOXES_NS_URI);
#line 319 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	xml = _tmp1_;
#line 320 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = xml;
#line 320 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ != NULL) {
#line 1854 "vm-configurator.c"
		xmlTextReader* reader = NULL;
		const gchar* _tmp3_ = NULL;
		guint8* _tmp4_ = NULL;
		gint _tmp4__length1 = 0;
		guint8* _tmp5_ = NULL;
		gint _tmp5__length1 = 0;
		const gchar* _tmp6_ = NULL;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
		xmlTextReader* _tmp9_ = NULL;
		xmlTextReader* _tmp10_ = NULL;
		xmlNode* node = NULL;
		xmlTextReader* _tmp11_ = NULL;
		xmlNode* _tmp12_ = NULL;
		xmlNode* _tmp13_ = NULL;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = xml;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = string_get_data (_tmp3_, &_tmp4__length1);
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = _tmp4_;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5__length1 = _tmp4__length1;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = xml;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = strlen (_tmp6_);
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = _tmp7_;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = xmlReaderForMemory ((gchar*) _tmp5_, _tmp8_, BOXES_VM_CONFIGURATOR_BOXES_NS_URI, NULL, (gint) XML_PARSE_COMPACT);
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		reader = _tmp9_;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = reader;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		xmlTextReaderNext (_tmp10_);
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = reader;
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp12_ = xmlTextReaderExpand (_tmp11_);
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		node = _tmp12_;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = node;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp13_ != NULL) {
#line 1902 "vm-configurator.c"
			xmlNode* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 331 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp14_ = node;
#line 331 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp15_ = _tmp14_->name;
#line 331 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp15_, "gnome-boxes") == 0) {
#line 1911 "vm-configurator.c"
				xmlNode* _tmp16_ = NULL;
				xmlNode* _tmp17_ = NULL;
#line 332 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp16_ = node;
#line 332 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = _tmp16_->children;
#line 332 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				node = _tmp17_;
#line 1920 "vm-configurator.c"
			}
#line 334 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 1924 "vm-configurator.c"
				xmlNode* _tmp18_ = NULL;
				xmlNode* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
				const gchar* _tmp21_ = NULL;
				xmlNode* _tmp26_ = NULL;
				xmlNode* _tmp27_ = NULL;
#line 334 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = node;
#line 334 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp18_ != NULL)) {
#line 334 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 1937 "vm-configurator.c"
				}
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp19_ = node;
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp20_ = _tmp19_->name;
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = node_name;
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp20_, _tmp21_) == 0) {
#line 1947 "vm-configurator.c"
					xmlNode* _tmp22_ = NULL;
					xmlNode* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp22_ = node;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp23_ = _tmp22_->children;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp24_ = _tmp23_->content;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp25_ = g_strdup (_tmp24_);
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = _tmp25_;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_xmlFreeTextReader0 (reader);
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (xml);
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 1968 "vm-configurator.c"
				}
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp26_ = node;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp27_ = _tmp26_->next;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				node = _tmp27_;
#line 1976 "vm-configurator.c"
			}
		}
#line 320 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_xmlFreeTextReader0 (reader);
#line 1981 "vm-configurator.c"
	}
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = node_name;
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp29_ = domain;
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp30_ = gvir_config_domain_get_name (_tmp29_);
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_debug ("vm-configurator.vala:343: No XML node %s' for domain '%s'.", _tmp28_, _tmp30_);
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = NULL;
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (xml);
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1997 "vm-configurator.c"
}


static void boxes_vm_configurator_update_custom_xml (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, guint num_reboots, gboolean installed) {
	gboolean _tmp0_ = FALSE;
	BoxesInstallerMedia* _tmp1_ = NULL;
	gchar* custom_xml = NULL;
	gboolean _tmp3_ = FALSE;
	BoxesInstallerMedia* _tmp14_ = NULL;
	guint _tmp43_ = 0U;
	const gchar* _tmp49_ = NULL;
	gchar* _tmp50_ = NULL;
	GError * _inner_error_ = NULL;
#line 348 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp1_ != NULL) {
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = TRUE;
#line 2019 "vm-configurator.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = installed;
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = _tmp2_;
#line 2026 "vm-configurator.c"
	}
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (_tmp0_);
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = installed;
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_) {
#line 2034 "vm-configurator.c"
		gchar* _tmp4_ = NULL;
#line 356 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = g_strdup (BOXES_VM_CONFIGURATOR_INSTALLED_XML);
#line 356 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 356 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp4_;
#line 2042 "vm-configurator.c"
	} else {
		BoxesInstallerMedia* _tmp5_ = NULL;
#line 357 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = install_media;
#line 357 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA)) {
#line 2049 "vm-configurator.c"
			gchar* _tmp6_ = NULL;
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp6_ = g_strdup (BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_XML);
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp6_;
#line 2057 "vm-configurator.c"
		} else {
			BoxesInstallerMedia* _tmp7_ = NULL;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp7_ = install_media;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, BOXES_TYPE_INSTALLED_MEDIA)) {
#line 2064 "vm-configurator.c"
				gchar* _tmp8_ = NULL;
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (BOXES_VM_CONFIGURATOR_IMPORT_XML);
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp8_;
#line 2072 "vm-configurator.c"
			} else {
				const gchar* _tmp9_ = NULL;
				BoxesInstallerMedia* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar* _tmp13_ = NULL;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = boxes_installer_media_get_live (_tmp10_);
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = _tmp11_;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp9_ = BOXES_VM_CONFIGURATOR_LIVE_XML;
#line 2089 "vm-configurator.c"
				} else {
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp9_ = BOXES_VM_CONFIGURATOR_INSTALLATION_XML;
#line 2093 "vm-configurator.c"
				}
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp13_ = g_strdup (_tmp9_);
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp13_;
#line 2101 "vm-configurator.c"
			}
		}
	}
#line 364 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = install_media;
#line 364 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp14_ != NULL) {
#line 2109 "vm-configurator.c"
		BoxesInstallerMedia* _tmp15_ = NULL;
		OsinfoOs* _tmp16_ = NULL;
		BoxesInstallerMedia* _tmp26_ = NULL;
		OsinfoMedia* _tmp27_ = NULL;
		const gchar* _tmp37_ = NULL;
		BoxesInstallerMedia* _tmp38_ = NULL;
		const gchar* _tmp39_ = NULL;
		gchar* _tmp40_ = NULL;
		gchar* _tmp41_ = NULL;
		gchar* _tmp42_ = NULL;
#line 365 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp15_ = install_media;
#line 365 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = _tmp15_->os;
#line 365 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp16_ != NULL) {
#line 2126 "vm-configurator.c"
			const gchar* _tmp17_ = NULL;
			BoxesInstallerMedia* _tmp18_ = NULL;
			OsinfoOs* _tmp19_ = NULL;
			gchar* _tmp20_ = NULL;
			gchar* _tmp21_ = NULL;
			gchar* _tmp22_ = NULL;
			gchar* _tmp23_ = NULL;
			gchar* _tmp24_ = NULL;
			gchar* _tmp25_ = NULL;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp17_ = custom_xml;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp18_ = install_media;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp19_ = _tmp18_->os;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp19_, "id", &_tmp20_, NULL);
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp21_ = _tmp20_;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp22_ = _tmp21_;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp23_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_OS_ID_XML, _tmp22_);
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp24_ = _tmp23_;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp25_ = g_strconcat (_tmp17_, _tmp24_, NULL);
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp25_;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp24_);
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp22_);
#line 2162 "vm-configurator.c"
		}
#line 367 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = install_media;
#line 367 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp27_ = _tmp26_->os_media;
#line 367 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp27_ != NULL) {
#line 2170 "vm-configurator.c"
			const gchar* _tmp28_ = NULL;
			BoxesInstallerMedia* _tmp29_ = NULL;
			OsinfoMedia* _tmp30_ = NULL;
			gchar* _tmp31_ = NULL;
			gchar* _tmp32_ = NULL;
			gchar* _tmp33_ = NULL;
			gchar* _tmp34_ = NULL;
			gchar* _tmp35_ = NULL;
			gchar* _tmp36_ = NULL;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp28_ = custom_xml;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp29_ = install_media;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp30_ = _tmp29_->os_media;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp30_, "id", &_tmp31_, NULL);
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp32_ = _tmp31_;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp33_ = _tmp32_;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp34_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_ID_XML, _tmp33_);
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp35_ = _tmp34_;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp36_ = g_strconcat (_tmp28_, _tmp35_, NULL);
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp36_;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp35_);
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp33_);
#line 2206 "vm-configurator.c"
		}
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp37_ = custom_xml;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp38_ = install_media;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp39_ = _tmp38_->device_file;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp40_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_XML, _tmp39_);
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp41_ = _tmp40_;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp42_ = g_strconcat (_tmp37_, _tmp41_, NULL);
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp42_;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp41_);
#line 2226 "vm-configurator.c"
	}
#line 372 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp43_ = num_reboots;
#line 372 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp43_ != ((guint) 0)) {
#line 2232 "vm-configurator.c"
		const gchar* _tmp44_ = NULL;
		guint _tmp45_ = 0U;
		gchar* _tmp46_ = NULL;
		gchar* _tmp47_ = NULL;
		gchar* _tmp48_ = NULL;
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp44_ = custom_xml;
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp45_ = num_reboots;
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp46_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_NUM_REBOOTS_XML, _tmp45_);
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp47_ = _tmp46_;
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp48_ = g_strconcat (_tmp44_, _tmp47_, NULL);
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp48_;
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp47_);
#line 2254 "vm-configurator.c"
	}
#line 375 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp49_ = custom_xml;
#line 375 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp50_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_BOXES_XML, _tmp49_);
#line 375 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 375 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	custom_xml = _tmp50_;
#line 2264 "vm-configurator.c"
	{
		GVirConfigDomain* _tmp51_ = NULL;
		const gchar* _tmp52_ = NULL;
#line 377 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp51_ = domain;
#line 377 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp52_ = custom_xml;
#line 377 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_set_custom_xml (_tmp51_, _tmp52_, BOXES_VM_CONFIGURATOR_BOXES_NS, BOXES_VM_CONFIGURATOR_BOXES_NS_URI, &_inner_error_);
#line 377 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2276 "vm-configurator.c"
			goto __catch96_g_error;
		}
	}
	goto __finally96;
	__catch96_g_error:
	{
		GError* _error_ = NULL;
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_error_ = _inner_error_;
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_inner_error_ = NULL;
#line 378 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_assert_not_reached ();
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_error_free0 (_error_);
#line 2292 "vm-configurator.c"
	}
	__finally96:
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return;
#line 2305 "vm-configurator.c"
	}
#line 348 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 2309 "vm-configurator.c"
}


void boxes_vm_configurator_add_smartcard_support (GVirConfigDomain* domain) {
	GVirConfigDomainSmartcardPassthrough* smartcard = NULL;
	GVirConfigDomainSmartcardPassthrough* _tmp0_ = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp1_ = NULL;
	GVirConfigDomain* _tmp2_ = NULL;
#line 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 382 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_smartcard_passthrough_new ();
#line 382 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	smartcard = _tmp0_;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp1_;
#line 384 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_smartcard_passthrough_set_source (smartcard, (GVirConfigDomainChardevSource*) vmc);
#line 385 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = domain;
#line 385 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp2_, (GVirConfigDomainDevice*) smartcard);
#line 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (smartcard);
#line 2339 "vm-configurator.c"
}


void boxes_vm_configurator_add_usb_support (GVirConfigDomain* domain) {
	GVirConfigDomainControllerUsb* master_controller = NULL;
	GVirConfigDomainControllerUsb* _tmp10_ = NULL;
	GVirConfigDomain* _tmp11_ = NULL;
	GVirConfigDomainControllerUsb* controller = NULL;
	GVirConfigDomainControllerUsb* _tmp12_ = NULL;
	GVirConfigDomain* _tmp13_ = NULL;
	GVirConfigDomainControllerUsb* _tmp14_ = NULL;
	GVirConfigDomainControllerUsb* _tmp15_ = NULL;
	GVirConfigDomain* _tmp16_ = NULL;
	GVirConfigDomainControllerUsb* _tmp17_ = NULL;
	GVirConfigDomainControllerUsb* _tmp18_ = NULL;
	GVirConfigDomain* _tmp19_ = NULL;
	GVirConfigDomainControllerUsb* _tmp20_ = NULL;
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 2359 "vm-configurator.c"
	{
		gint i = 0;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		i = 0;
#line 2364 "vm-configurator.c"
		{
			gboolean _tmp0_ = FALSE;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp0_ = TRUE;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 2371 "vm-configurator.c"
				gint _tmp2_ = 0;
				GVirConfigDomainRedirdev* usb_redir = NULL;
				GVirConfigDomainRedirdev* _tmp3_ = NULL;
				GVirConfigDomainRedirdev* _tmp4_ = NULL;
				GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
				GVirConfigDomainChardevSourceSpiceVmc* _tmp5_ = NULL;
				GVirConfigDomainRedirdev* _tmp6_ = NULL;
				GVirConfigDomainChardevSourceSpiceVmc* _tmp7_ = NULL;
				GVirConfigDomain* _tmp8_ = NULL;
				GVirConfigDomainRedirdev* _tmp9_ = NULL;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!_tmp0_) {
#line 2384 "vm-configurator.c"
					gint _tmp1_ = 0;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp1_ = i;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					i = _tmp1_ + 1;
#line 2390 "vm-configurator.c"
				}
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp0_ = FALSE;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp2_ = i;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp2_ < 4)) {
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 2400 "vm-configurator.c"
				}
#line 391 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = gvir_config_domain_redirdev_new ();
#line 391 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				usb_redir = _tmp3_;
#line 392 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = usb_redir;
#line 392 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_redirdev_set_bus (_tmp4_, GVIR_CONFIG_DOMAIN_REDIRDEV_BUS_USB);
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				vmc = _tmp5_;
#line 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = usb_redir;
#line 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = vmc;
#line 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp6_, (GVirConfigDomainChardevSource*) _tmp7_);
#line 395 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = domain;
#line 395 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = usb_redir;
#line 395 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_add_device (_tmp8_, (GVirConfigDomainDevice*) _tmp9_);
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (vmc);
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (usb_redir);
#line 2430 "vm-configurator.c"
			}
		}
	}
#line 399 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = boxes_vm_configurator_create_usb_controller (GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_EHCI1, NULL, (guint) 0, (guint) 0);
#line 399 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	master_controller = _tmp10_;
#line 400 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = domain;
#line 400 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp11_, (GVirConfigDomainDevice*) master_controller);
#line 401 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = boxes_vm_configurator_create_usb_controller (GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_UHCI1, master_controller, (guint) 0, (guint) 0);
#line 401 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp12_;
#line 402 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 402 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = controller;
#line 402 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 403 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = boxes_vm_configurator_create_usb_controller (GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_UHCI2, master_controller, (guint) 0, (guint) 2);
#line 403 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 403 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp15_;
#line 404 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = domain;
#line 404 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = controller;
#line 404 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp16_, (GVirConfigDomainDevice*) _tmp17_);
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp18_ = boxes_vm_configurator_create_usb_controller (GVIR_CONFIG_DOMAIN_CONTROLLER_USB_MODEL_ICH9_UHCI3, master_controller, (guint) 0, (guint) 4);
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp18_;
#line 406 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = domain;
#line 406 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = controller;
#line 406 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp19_, (GVirConfigDomainDevice*) _tmp20_);
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (master_controller);
#line 2480 "vm-configurator.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return self ? g_object_ref (self) : NULL;
#line 2487 "vm-configurator.c"
}


void boxes_vm_configurator_add_network_interface (GVirConfigDomain* domain, gboolean bridge, gboolean virtio) {
	GVirConfigDomainInterface* iface = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp10_ = FALSE;
	GVirConfigDomain* _tmp12_ = NULL;
	GVirConfigDomainInterface* _tmp13_ = NULL;
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 412 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = bridge;
#line 412 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp0_) {
#line 2503 "vm-configurator.c"
		GVirConfigDomain* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		GVirConfigDomainInterfaceBridge* bridge_iface = NULL;
		GVirConfigDomainInterfaceBridge* _tmp3_ = NULL;
		GVirConfigDomainInterfaceBridge* _tmp4_ = NULL;
		GVirConfigDomainInterfaceBridge* _tmp5_ = NULL;
		GVirConfigDomainInterface* _tmp6_ = NULL;
#line 413 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp1_ = domain;
#line 413 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = gvir_config_domain_get_name (_tmp1_);
#line 413 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:413: Adding bridge network to %s", _tmp2_);
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = gvir_config_domain_interface_bridge_new ();
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		bridge_iface = _tmp3_;
#line 415 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = bridge_iface;
#line 415 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_bridge_set_source (_tmp4_, "virbr0");
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = bridge_iface;
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = _g_object_ref0 ((GVirConfigDomainInterface*) _tmp5_);
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		iface = _tmp6_;
#line 412 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (bridge_iface);
#line 2535 "vm-configurator.c"
	} else {
		GVirConfigDomain* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		GVirConfigDomainInterfaceUser* _tmp9_ = NULL;
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = domain;
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = gvir_config_domain_get_name (_tmp7_);
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:418: Adding user network to %s", _tmp8_);
#line 419 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = gvir_config_domain_interface_user_new ();
#line 419 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 419 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		iface = (GVirConfigDomainInterface*) _tmp9_;
#line 2552 "vm-configurator.c"
	}
#line 422 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = virtio;
#line 422 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp10_) {
#line 2558 "vm-configurator.c"
		GVirConfigDomainInterface* _tmp11_ = NULL;
#line 423 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = iface;
#line 423 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_set_model (_tmp11_, "virtio");
#line 2564 "vm-configurator.c"
	}
#line 425 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = domain;
#line 425 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = iface;
#line 425 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp12_, (GVirConfigDomainDevice*) _tmp13_);
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (iface);
#line 2574 "vm-configurator.c"
}


static GVirConfigDomainControllerUsb* boxes_vm_configurator_create_usb_controller (GVirConfigDomainControllerUsbModel model, GVirConfigDomainControllerUsb* master, guint index, guint start_port) {
	GVirConfigDomainControllerUsb* result = NULL;
	GVirConfigDomainControllerUsb* controller = NULL;
	GVirConfigDomainControllerUsb* _tmp0_ = NULL;
	GVirConfigDomainControllerUsb* _tmp1_ = NULL;
	GVirConfigDomainControllerUsbModel _tmp2_ = 0;
	GVirConfigDomainControllerUsb* _tmp3_ = NULL;
	guint _tmp4_ = 0U;
	GVirConfigDomainControllerUsb* _tmp5_ = NULL;
#line 432 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_controller_usb_new ();
#line 432 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp0_;
#line 433 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = controller;
#line 433 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = model;
#line 433 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_usb_set_model (_tmp1_, _tmp2_);
#line 434 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = controller;
#line 434 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = index;
#line 434 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_set_index ((GVirConfigDomainController*) _tmp3_, _tmp4_);
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = master;
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp5_ != NULL) {
#line 2607 "vm-configurator.c"
		GVirConfigDomainControllerUsb* _tmp6_ = NULL;
		GVirConfigDomainControllerUsb* _tmp7_ = NULL;
		guint _tmp8_ = 0U;
#line 436 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = controller;
#line 436 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = master;
#line 436 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = start_port;
#line 436 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_controller_usb_set_master (_tmp6_, _tmp7_, _tmp8_);
#line 2619 "vm-configurator.c"
	}
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = controller;
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2625 "vm-configurator.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 2632 "vm-configurator.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_list_free (self);
#line 2641 "vm-configurator.c"
}


void boxes_vm_configurator_remove_usb_controllers (GVirConfigDomain* domain, GError** error) {
	GList* devices = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GVirConfigDomain* _tmp6_ = NULL;
	GList* _tmp7_ = NULL;
#line 442 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	devices = NULL;
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_get_devices (_tmp0_);
#line 2659 "vm-configurator.c"
	{
		GList* device_collection = NULL;
		GList* device_it = NULL;
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		device_collection = _tmp1_;
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
#line 2667 "vm-configurator.c"
			GVirConfigDomainDevice* _tmp2_ = NULL;
			GVirConfigDomainDevice* device = NULL;
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigDomainDevice*) device_it->data);
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			device = _tmp2_;
#line 2674 "vm-configurator.c"
			{
				GVirConfigDomainDevice* _tmp3_ = NULL;
#line 445 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = device;
#line 445 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, gvir_config_domain_controller_usb_get_type ())) {
#line 2681 "vm-configurator.c"
					GVirConfigDomainDevice* _tmp4_ = NULL;
					GVirConfigDomainDevice* _tmp5_ = NULL;
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp4_ = device;
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp5_ = _g_object_ref0 (_tmp4_);
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					devices = g_list_prepend (devices, _tmp5_);
#line 2690 "vm-configurator.c"
				}
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (device);
#line 2694 "vm-configurator.c"
			}
		}
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (device_collection);
#line 2699 "vm-configurator.c"
	}
#line 449 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	devices = g_list_reverse (devices);
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = devices;
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_devices (_tmp6_, _tmp7_);
#line 442 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (devices);
#line 2711 "vm-configurator.c"
}


static gint __lambda23_ (GVirConfigCapabilitiesGuest* caps_a, GVirConfigCapabilitiesGuest* caps_b) {
	gint result = 0;
	gchar* arch_a = NULL;
	GVirConfigCapabilitiesGuest* _tmp0_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp1_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* arch_b = NULL;
	GVirConfigCapabilitiesGuest* _tmp6_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp7_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_a != NULL, 0);
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_b != NULL, 0);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps_a;
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_name (_tmp2_);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = _tmp4_;
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp2_);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch_a = _tmp5_;
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = caps_b;
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = gvir_config_capabilities_guest_get_arch (_tmp6_);
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = _tmp7_;
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = gvir_config_capabilities_guest_arch_get_name (_tmp8_);
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = g_strdup (_tmp9_);
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = _tmp10_;
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp8_);
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch_b = _tmp11_;
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = arch_a;
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (g_strcmp0 (_tmp12_, "i686") == 0) {
#line 2772 "vm-configurator.c"
		const gchar* _tmp13_ = NULL;
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = arch_b;
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp13_, "x86_64") == 0) {
#line 463 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = 1;
#line 463 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 463 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 463 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 2786 "vm-configurator.c"
		} else {
#line 465 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 465 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 465 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 465 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 2796 "vm-configurator.c"
		}
	} else {
		const gchar* _tmp14_ = NULL;
#line 466 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = arch_a;
#line 466 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp14_, "x86_64") == 0) {
#line 467 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 467 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 467 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 467 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 2812 "vm-configurator.c"
		} else {
			gboolean _tmp15_ = FALSE;
			const gchar* _tmp16_ = NULL;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = arch_b;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp16_, "x86_64") == 0) {
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = TRUE;
#line 2822 "vm-configurator.c"
			} else {
				const gchar* _tmp17_ = NULL;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = arch_b;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = g_strcmp0 (_tmp17_, "i686") == 0;
#line 2829 "vm-configurator.c"
			}
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (_tmp15_) {
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				result = 1;
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 2841 "vm-configurator.c"
			} else {
#line 471 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				result = 0;
#line 471 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 471 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 471 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 2851 "vm-configurator.c"
			}
		}
	}
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_b);
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_a);
#line 2859 "vm-configurator.c"
}


static gint ___lambda23__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda23_ ((GVirConfigCapabilitiesGuest*) a, (GVirConfigCapabilitiesGuest*) b);
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2868 "vm-configurator.c"
}


static GVirConfigCapabilitiesGuest* boxes_vm_configurator_get_best_guest_caps (GVirConfigCapabilities* caps, BoxesInstallerMedia* install_media, GError** error) {
	GVirConfigCapabilitiesGuest* result = NULL;
	GList* guests_caps = NULL;
	GVirConfigCapabilities* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* compat_guests_caps = NULL;
	GList* _tmp2_ = NULL;
	GList* _tmp15_ = NULL;
	GList* _tmp19_ = NULL;
	const gchar* _tmp23_ = NULL;
	GError* _tmp24_ = NULL;
	GError * _inner_error_ = NULL;
#line 453 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 453 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps;
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_get_guests (_tmp0_);
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	guests_caps = _tmp1_;
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	guests_caps = g_list_sort (guests_caps, ___lambda23__gcompare_func);
#line 475 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	compat_guests_caps = NULL;
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = guests_caps;
#line 2900 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp2_;
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (guest_caps_it = guest_caps_collection; guest_caps_it != NULL; guest_caps_it = guest_caps_it->next) {
#line 2908 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp3_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp3_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp3_;
#line 2915 "vm-configurator.c"
			{
				gchar* guest_arch = NULL;
				GVirConfigCapabilitiesGuest* _tmp4_ = NULL;
				GVirConfigCapabilitiesGuestArch* _tmp5_ = NULL;
				GVirConfigCapabilitiesGuestArch* _tmp6_ = NULL;
				const gchar* _tmp7_ = NULL;
				gchar* _tmp8_ = NULL;
				gchar* _tmp9_ = NULL;
				BoxesInstallerMedia* _tmp10_ = NULL;
				const gchar* _tmp11_ = NULL;
				gboolean _tmp12_ = FALSE;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = guest_caps;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_get_arch (_tmp4_);
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = _tmp5_;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = gvir_config_capabilities_guest_arch_get_name (_tmp6_);
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (_tmp7_);
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = _tmp8_;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_tmp6_);
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				guest_arch = _tmp9_;
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = guest_arch;
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = boxes_installer_media_is_architecture_compatible (_tmp10_, _tmp11_);
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 2951 "vm-configurator.c"
					GVirConfigCapabilitiesGuest* _tmp13_ = NULL;
					GVirConfigCapabilitiesGuest* _tmp14_ = NULL;
#line 480 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp13_ = guest_caps;
#line 480 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp14_ = _g_object_ref0 (_tmp13_);
#line 480 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					compat_guests_caps = g_list_append (compat_guests_caps, _tmp14_);
#line 2960 "vm-configurator.c"
				}
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (guest_arch);
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 2966 "vm-configurator.c"
			}
		}
	}
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = compat_guests_caps;
#line 2972 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp15_;
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (guest_caps_it = guest_caps_collection; guest_caps_it != NULL; guest_caps_it = guest_caps_it->next) {
#line 2980 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp16_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp16_;
#line 2987 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp17_ = NULL;
				gboolean _tmp18_ = FALSE;
#line 485 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = guest_caps;
#line 485 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = boxes_vm_configurator_guest_kvm_enabled (_tmp17_);
#line 485 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp18_) {
#line 486 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 486 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 486 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 486 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3005 "vm-configurator.c"
				}
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3009 "vm-configurator.c"
			}
		}
	}
#line 489 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = compat_guests_caps;
#line 3015 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 489 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp19_;
#line 489 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (guest_caps_it = guest_caps_collection; guest_caps_it != NULL; guest_caps_it = guest_caps_it->next) {
#line 3023 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp20_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 489 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp20_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 489 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp20_;
#line 3030 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp21_ = NULL;
				gboolean _tmp22_ = FALSE;
#line 490 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = guest_caps;
#line 490 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp22_ = boxes_vm_configurator_guest_is_qemu (_tmp21_);
#line 490 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp22_) {
#line 491 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 491 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 491 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 491 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3048 "vm-configurator.c"
				}
#line 489 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3052 "vm-configurator.c"
			}
		}
	}
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = _ ("Incapable host system");
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = g_error_new_literal (BOXES_VM_CONFIGURATOR_ERROR, BOXES_VM_CONFIGURATOR_ERROR_NO_GUEST_CAPS, _tmp23_);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_inner_error_ = _tmp24_;
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_propagate_error (error, _inner_error_);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3072 "vm-configurator.c"
	} else {
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3084 "vm-configurator.c"
	}
#line 453 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 453 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (guests_caps);
#line 3090 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_guest_kvm_enabled (GVirConfigCapabilitiesGuest* guest_caps) {
	gboolean result = FALSE;
	GVirConfigCapabilitiesGuestArch* arch = NULL;
	GVirConfigCapabilitiesGuest* _tmp0_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp1_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
#line 498 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 499 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 499 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 499 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3113 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3121 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_ = NULL;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3128 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_ = NULL;
				GVirConfigDomainVirtType _tmp6_ = 0;
#line 501 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 501 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 501 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_KVM) {
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3148 "vm-configurator.c"
				}
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3152 "vm-configurator.c"
			}
		}
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3157 "vm-configurator.c"
	}
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3165 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_guest_is_qemu (GVirConfigCapabilitiesGuest* guest_caps) {
	gboolean result = FALSE;
	GVirConfigCapabilitiesGuestArch* arch = NULL;
	GVirConfigCapabilitiesGuest* _tmp0_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp1_ = NULL;
	GVirConfigCapabilitiesGuestArch* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
#line 507 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 508 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 508 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 508 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3188 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3196 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_ = NULL;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3203 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_ = NULL;
				GVirConfigDomainVirtType _tmp6_ = 0;
#line 510 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 510 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 510 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_QEMU) {
#line 511 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 511 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 511 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 511 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 511 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3223 "vm-configurator.c"
				}
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3227 "vm-configurator.c"
			}
		}
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3232 "vm-configurator.c"
	}
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3240 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_guest_supports_feature (GVirConfigCapabilitiesGuest* guest_caps, const gchar* feature_name) {
	gboolean result = FALSE;
	gboolean supports = FALSE;
	GVirConfigCapabilitiesGuest* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
#line 516 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 516 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (feature_name != NULL, FALSE);
#line 517 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	supports = FALSE;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_features (_tmp0_);
#line 3259 "vm-configurator.c"
	{
		GList* feature_collection = NULL;
		GList* feature_it = NULL;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		feature_collection = _tmp1_;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (feature_it = feature_collection; feature_it != NULL; feature_it = feature_it->next) {
#line 3267 "vm-configurator.c"
			GVirConfigCapabilitiesGuestFeature* _tmp2_ = NULL;
			GVirConfigCapabilitiesGuestFeature* feature = NULL;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestFeature*) feature_it->data);
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			feature = _tmp2_;
#line 3274 "vm-configurator.c"
			{
				const gchar* _tmp3_ = NULL;
				GVirConfigCapabilitiesGuestFeature* _tmp4_ = NULL;
				const gchar* _tmp5_ = NULL;
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = feature_name;
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = feature;
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_feature_get_name (_tmp4_);
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					supports = TRUE;
#line 523 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (feature);
#line 523 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 3293 "vm-configurator.c"
				}
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (feature);
#line 3297 "vm-configurator.c"
			}
		}
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (feature_collection);
#line 3302 "vm-configurator.c"
	}
#line 526 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = supports;
#line 526 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3308 "vm-configurator.c"
}


BoxesVMConfigurator* boxes_vm_configurator_construct (GType object_type) {
	BoxesVMConfigurator* self = NULL;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	self = (BoxesVMConfigurator*) g_type_create_instance (object_type);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return self;
#line 3318 "vm-configurator.c"
}


BoxesVMConfigurator* boxes_vm_configurator_new (void) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return boxes_vm_configurator_construct (BOXES_TYPE_VM_CONFIGURATOR);
#line 3325 "vm-configurator.c"
}


static void boxes_value_vm_configurator_init (GValue* value) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	value->data[0].v_pointer = NULL;
#line 3332 "vm-configurator.c"
}


static void boxes_value_vm_configurator_free_value (GValue* value) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (value->data[0].v_pointer) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_unref (value->data[0].v_pointer);
#line 3341 "vm-configurator.c"
	}
}


static void boxes_value_vm_configurator_copy_value (const GValue* src_value, GValue* dest_value) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (src_value->data[0].v_pointer) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		dest_value->data[0].v_pointer = boxes_vm_configurator_ref (src_value->data[0].v_pointer);
#line 3351 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3355 "vm-configurator.c"
	}
}


static gpointer boxes_value_vm_configurator_peek_pointer (const GValue* value) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return value->data[0].v_pointer;
#line 3363 "vm-configurator.c"
}


static gchar* boxes_value_vm_configurator_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (collect_values[0].v_pointer) {
#line 3370 "vm-configurator.c"
		BoxesVMConfigurator* object;
		object = collect_values[0].v_pointer;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (object->parent_instance.g_class == NULL) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 3377 "vm-configurator.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 3381 "vm-configurator.c"
		}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = boxes_vm_configurator_ref (object);
#line 3385 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3389 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 3393 "vm-configurator.c"
}


static gchar* boxes_value_vm_configurator_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	BoxesVMConfigurator** object_p;
	object_p = collect_values[0].v_pointer;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (!object_p) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 3404 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (!value->data[0].v_pointer) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*object_p = NULL;
#line 3410 "vm-configurator.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*object_p = value->data[0].v_pointer;
#line 3414 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		*object_p = boxes_vm_configurator_ref (value->data[0].v_pointer);
#line 3418 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 3422 "vm-configurator.c"
}


GParamSpec* boxes_param_spec_vm_configurator (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	BoxesParamSpecVMConfigurator* spec;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (g_type_is_a (object_type, BOXES_TYPE_VM_CONFIGURATOR), NULL);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return G_PARAM_SPEC (spec);
#line 3436 "vm-configurator.c"
}


gpointer boxes_value_get_vm_configurator (const GValue* value) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CONFIGURATOR), NULL);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return value->data[0].v_pointer;
#line 3445 "vm-configurator.c"
}


void boxes_value_set_vm_configurator (GValue* value, gpointer v_object) {
	BoxesVMConfigurator* old;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	old = value->data[0].v_pointer;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (v_object) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = v_object;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_ref (value->data[0].v_pointer);
#line 3465 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3469 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (old) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_unref (old);
#line 3475 "vm-configurator.c"
	}
}


void boxes_value_take_vm_configurator (GValue* value, gpointer v_object) {
	BoxesVMConfigurator* old;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	old = value->data[0].v_pointer;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (v_object) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = v_object;
#line 3494 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3498 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (old) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_unref (old);
#line 3504 "vm-configurator.c"
	}
}


static void boxes_vm_configurator_class_init (BoxesVMConfiguratorClass * klass) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_parent_class = g_type_class_peek_parent (klass);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	((BoxesVMConfiguratorClass *) klass)->finalize = boxes_vm_configurator_finalize;
#line 3514 "vm-configurator.c"
}


static void boxes_vm_configurator_instance_init (BoxesVMConfigurator * self) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	self->ref_count = 1;
#line 3521 "vm-configurator.c"
}


static void boxes_vm_configurator_finalize (BoxesVMConfigurator* obj) {
	BoxesVMConfigurator * self;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_VM_CONFIGURATOR, BoxesVMConfigurator);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_signal_handlers_destroy (self);
#line 3531 "vm-configurator.c"
}


GType boxes_vm_configurator_get_type (void) {
	static volatile gsize boxes_vm_configurator_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_vm_configurator_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { boxes_value_vm_configurator_init, boxes_value_vm_configurator_free_value, boxes_value_vm_configurator_copy_value, boxes_value_vm_configurator_peek_pointer, "p", boxes_value_vm_configurator_collect_value, "p", boxes_value_vm_configurator_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (BoxesVMConfiguratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_vm_configurator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesVMConfigurator), 0, (GInstanceInitFunc) boxes_vm_configurator_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType boxes_vm_configurator_type_id;
		boxes_vm_configurator_type_id = g_type_register_fundamental (g_type_fundamental_next (), "BoxesVMConfigurator", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&boxes_vm_configurator_type_id__volatile, boxes_vm_configurator_type_id);
	}
	return boxes_vm_configurator_type_id__volatile;
}


gpointer boxes_vm_configurator_ref (gpointer instance) {
	BoxesVMConfigurator* self;
	self = instance;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_atomic_int_inc (&self->ref_count);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return instance;
#line 3556 "vm-configurator.c"
}


void boxes_vm_configurator_unref (gpointer instance) {
	BoxesVMConfigurator* self;
	self = instance;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		BOXES_VM_CONFIGURATOR_GET_CLASS (self)->finalize (self);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 3569 "vm-configurator.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 3577 "vm-configurator.c"
		int i;
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
				destroy_func (((gpointer*) array)[i]);
#line 3585 "vm-configurator.c"
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
	g_free (array);
#line 3597 "vm-configurator.c"
}



