/* vm-configurator.c generated by valac 0.23.3.6-62e8, 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_add10 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add11 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add12 (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 __lambda36_ (GVirConfigCapabilitiesGuest* caps_a, GVirConfigCapabilitiesGuest* caps_b);
static gint ___lambda36__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_add10 (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_add11 (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_add12 (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 1274 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1274 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1275 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1275 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1275 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1275 "/home/zeenix/jhbuild/share/vala-0.24/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 (_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_add10 (&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_add11 (&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_add12 (&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) {
	GVirConfigCapabilitiesCpuTopology* topology = NULL;
	GVirConfigCapabilities* _tmp0_ = NULL;
	GVirConfigCapabilitiesHost* _tmp1_ = NULL;
	GVirConfigCapabilitiesHost* _tmp2_ = NULL;
	GVirConfigCapabilitiesCpu* _tmp3_ = NULL;
	GVirConfigCapabilitiesCpu* _tmp4_ = NULL;
	GVirConfigCapabilitiesCpuTopology* _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;
	GVirConfigDomain* _tmp19_ = NULL;
	GVirConfigDomainCpu* _tmp20_ = 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"
	_tmp5_ = gvir_config_capabilities_cpu_get_topology (_tmp4_);
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#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"
	topology = _tmp6_;
#line 205 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = topology;
#line 205 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp7_ == NULL) {
#line 206 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (topology);
#line 206 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return;
#line 1246 "vm-configurator.c"
	}
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = domain;
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = topology;
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = gvir_config_capabilities_cpu_topology_get_sockets (_tmp9_);
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = topology;
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = gvir_config_capabilities_cpu_topology_get_cores (_tmp11_);
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = topology;
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = gvir_config_capabilities_cpu_topology_get_threads (_tmp13_);
#line 208 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_object_set (_tmp8_, "vcpu", (_tmp10_ * _tmp12_) * _tmp14_, NULL);
#line 210 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = gvir_config_domain_cpu_new ();
#line 210 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	cpu = _tmp15_;
#line 213 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = cpu;
#line 213 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_cpu_set_mode (_tmp16_, GVIR_CONFIG_DOMAIN_CPU_MODE_HOST_PASSTHROUGH);
#line 214 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = cpu;
#line 214 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp18_ = topology;
#line 214 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_capabilities_cpu_set_topology ((GVirConfigCapabilitiesCpu*) _tmp17_, _tmp18_);
#line 215 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = domain;
#line 215 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = cpu;
#line 215 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_cpu (_tmp19_, _tmp20_);
#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 1288 "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 218 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 218 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (target_path != NULL);
#line 218 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 219 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 219 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	disk = _tmp0_;
#line 220 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = disk;
#line 220 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_type (_tmp1_, GVIR_CONFIG_DOMAIN_DISK_FILE);
#line 221 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = disk;
#line 221 "/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 222 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = disk;
#line 222 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_name (_tmp3_, "qemu");
#line 223 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = disk;
#line 223 "/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 224 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = disk;
#line 224 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = target_path;
#line 224 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_source (_tmp5_, _tmp6_);
#line 225 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = disk;
#line 225 "/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 227 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = install_media;
#line 227 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = boxes_installer_media_get_supports_virtio_disk (_tmp8_);
#line 227 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = _tmp9_;
#line 227 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp10_) {
#line 1351 "vm-configurator.c"
		GVirConfigDomainDisk* _tmp11_ = NULL;
		GVirConfigDomainDisk* _tmp12_ = NULL;
#line 228 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:228: Using virtio controller for the main disk");
#line 229 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = disk;
#line 229 "/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 230 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp12_ = disk;
#line 230 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp12_, "vda");
#line 1364 "vm-configurator.c"
	} else {
		GVirConfigDomainDisk* _tmp13_ = NULL;
		GVirConfigDomainDisk* _tmp14_ = NULL;
#line 232 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:232: Using IDE controller for the main disk");
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = disk;
#line 233 "/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 234 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = disk;
#line 234 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp14_, "hda");
#line 1378 "vm-configurator.c"
	}
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = domain;
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = disk;
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp15_, (GVirConfigDomainDevice*) _tmp16_);
#line 218 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (disk);
#line 1388 "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 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 242 "/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 244 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 244 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_domain_get_os (_tmp1_);
#line 244 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	old_os = _tmp2_;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_domain_os_get_boot_devices (old_os);
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = _tmp3_;
#line 246 "/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 247 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_domain_os_get_arch (old_os);
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 251 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 251 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp5_, os);
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (old_os);
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 1438 "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 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (guest_caps != NULL);
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 256 "/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 257 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = guest_caps;
#line 257 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_capabilities_guest_get_arch (_tmp1_);
#line 257 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 257 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_capabilities_guest_arch_get_name (_tmp3_);
#line 257 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 257 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp3_);
#line 259 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = NULL;
#line 260 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = install_media;
#line 260 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_set_direct_boot_params (_tmp5_, os);
#line 261 "/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 262 "/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 263 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp6_, os);
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 1496 "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 268 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 268 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 269 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_video_new ();
#line 269 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	video = _tmp0_;
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "video");
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 1544 "vm-configurator.c"
		OsinfoDevice* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_video_model_get_type ());
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 1556 "vm-configurator.c"
	} else {
#line 272 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_VIDEO_MODEL_QXL;
#line 1560 "vm-configurator.c"
	}
#line 271 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 273 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != (-1));
#line 274 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = video;
#line 274 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_video_set_model (_tmp12_, (GVirConfigDomainVideoModel) model);
#line 276 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 276 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = video;
#line 276 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 268 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 268 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (video);
#line 1580 "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 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 280 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_sound_new ();
#line 280 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	sound = _tmp0_;
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "audio");
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 281 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 1628 "vm-configurator.c"
		OsinfoDevice* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_sound_model_get_type ());
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 1640 "vm-configurator.c"
	} else {
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_SOUND_MODEL_AC97;
#line 1644 "vm-configurator.c"
	}
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 284 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != (-1));
#line 285 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = sound;
#line 285 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_sound_set_model (_tmp12_, (GVirConfigDomainSoundModel) model);
#line 287 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 287 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = sound;
#line 287 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (sound);
#line 1664 "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 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 291 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_input_new ();
#line 291 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	input = _tmp0_;
#line 292 "/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 294 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 294 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp1_, (GVirConfigDomainDevice*) input);
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (input);
#line 1688 "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 298 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_permissions_new ();
#line 298 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp0_;
#line 300 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = getuid ();
#line 300 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_owner (permissions, (guint) _tmp1_);
#line 301 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = getgid ();
#line 301 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_group (permissions, (guint) _tmp2_);
#line 302 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_mode (permissions, (guint) 744);
#line 304 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = permissions;
#line 304 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1716 "vm-configurator.c"
}


static gchar* boxes_vm_configurator_get_os_state (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 307 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 308 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 308 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "os-state");
#line 308 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 308 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1734 "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 1296 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1297 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1297 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1297 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1298 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1298 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1298 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1298 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 1778 "vm-configurator.c"
	}
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1299 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	return result;
#line 1784 "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 311 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 311 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (node_name != NULL, NULL);
#line 312 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 312 "/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 312 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	xml = _tmp1_;
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = xml;
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ != NULL) {
#line 1811 "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 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = xml;
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = string_get_data (_tmp3_, &_tmp4__length1);
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = _tmp4_;
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5__length1 = _tmp4__length1;
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = xml;
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = strlen (_tmp6_);
#line 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = _tmp7_;
#line 314 "/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 314 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		reader = _tmp9_;
#line 319 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = reader;
#line 319 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		xmlTextReaderNext (_tmp10_);
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = reader;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp12_ = xmlTextReaderExpand (_tmp11_);
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		node = _tmp12_;
#line 322 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = node;
#line 322 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp13_ != NULL) {
#line 1859 "vm-configurator.c"
			xmlNode* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp14_ = node;
#line 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp15_ = _tmp14_->name;
#line 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp15_, "gnome-boxes") == 0) {
#line 1868 "vm-configurator.c"
				xmlNode* _tmp16_ = NULL;
				xmlNode* _tmp17_ = NULL;
#line 325 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp16_ = node;
#line 325 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = _tmp16_->children;
#line 325 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				node = _tmp17_;
#line 1877 "vm-configurator.c"
			}
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 1881 "vm-configurator.c"
				xmlNode* _tmp18_ = NULL;
				xmlNode* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
				const gchar* _tmp21_ = NULL;
				xmlNode* _tmp26_ = NULL;
				xmlNode* _tmp27_ = NULL;
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = node;
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp18_ != NULL)) {
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 1894 "vm-configurator.c"
				}
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp19_ = node;
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp20_ = _tmp19_->name;
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = node_name;
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp20_, _tmp21_) == 0) {
#line 1904 "vm-configurator.c"
					xmlNode* _tmp22_ = NULL;
					xmlNode* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp22_ = node;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp23_ = _tmp22_->children;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp24_ = _tmp23_->content;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp25_ = g_strdup (_tmp24_);
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = _tmp25_;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_xmlFreeTextReader0 (reader);
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (xml);
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 1925 "vm-configurator.c"
				}
#line 331 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp26_ = node;
#line 331 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp27_ = _tmp26_->next;
#line 331 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				node = _tmp27_;
#line 1933 "vm-configurator.c"
			}
		}
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_xmlFreeTextReader0 (reader);
#line 1938 "vm-configurator.c"
	}
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = node_name;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp29_ = domain;
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp30_ = gvir_config_domain_get_name (_tmp29_);
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_debug ("vm-configurator.vala:336: No XML node %s' for domain '%s'.", _tmp28_, _tmp30_);
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = NULL;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (xml);
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1954 "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 341 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp1_ != NULL) {
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = TRUE;
#line 1976 "vm-configurator.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = installed;
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = _tmp2_;
#line 1983 "vm-configurator.c"
	}
#line 345 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (_tmp0_);
#line 348 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = installed;
#line 348 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_) {
#line 1991 "vm-configurator.c"
		gchar* _tmp4_ = NULL;
#line 349 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = g_strdup (BOXES_VM_CONFIGURATOR_INSTALLED_XML);
#line 349 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 349 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp4_;
#line 1999 "vm-configurator.c"
	} else {
		BoxesInstallerMedia* _tmp5_ = NULL;
#line 350 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = install_media;
#line 350 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA)) {
#line 2006 "vm-configurator.c"
			gchar* _tmp6_ = NULL;
#line 351 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp6_ = g_strdup (BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_XML);
#line 351 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 351 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp6_;
#line 2014 "vm-configurator.c"
		} else {
			BoxesInstallerMedia* _tmp7_ = NULL;
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp7_ = install_media;
#line 352 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, BOXES_TYPE_INSTALLED_MEDIA)) {
#line 2021 "vm-configurator.c"
				gchar* _tmp8_ = NULL;
#line 353 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (BOXES_VM_CONFIGURATOR_IMPORT_XML);
#line 353 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 353 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp8_;
#line 2029 "vm-configurator.c"
			} else {
				const gchar* _tmp9_ = NULL;
				BoxesInstallerMedia* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar* _tmp13_ = NULL;
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = boxes_installer_media_get_live (_tmp10_);
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = _tmp11_;
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp9_ = BOXES_VM_CONFIGURATOR_LIVE_XML;
#line 2046 "vm-configurator.c"
				} else {
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp9_ = BOXES_VM_CONFIGURATOR_INSTALLATION_XML;
#line 2050 "vm-configurator.c"
				}
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp13_ = g_strdup (_tmp9_);
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp13_;
#line 2058 "vm-configurator.c"
			}
		}
	}
#line 357 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = install_media;
#line 357 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp14_ != NULL) {
#line 2066 "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 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp15_ = install_media;
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = _tmp15_->os;
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp16_ != NULL) {
#line 2083 "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 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp17_ = custom_xml;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp18_ = install_media;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp19_ = _tmp18_->os;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp19_, "id", &_tmp20_, NULL);
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp21_ = _tmp20_;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp22_ = _tmp21_;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp23_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_OS_ID_XML, _tmp22_);
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp24_ = _tmp23_;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp25_ = g_strconcat (_tmp17_, _tmp24_, NULL);
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp25_;
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp24_);
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp22_);
#line 2119 "vm-configurator.c"
		}
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = install_media;
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp27_ = _tmp26_->os_media;
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp27_ != NULL) {
#line 2127 "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 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp28_ = custom_xml;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp29_ = install_media;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp30_ = _tmp29_->os_media;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp30_, "id", &_tmp31_, NULL);
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp32_ = _tmp31_;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp33_ = _tmp32_;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp34_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_ID_XML, _tmp33_);
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp35_ = _tmp34_;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp36_ = g_strconcat (_tmp28_, _tmp35_, NULL);
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp36_;
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp35_);
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp33_);
#line 2163 "vm-configurator.c"
		}
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp37_ = custom_xml;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp38_ = install_media;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp39_ = _tmp38_->device_file;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp40_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_XML, _tmp39_);
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp41_ = _tmp40_;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp42_ = g_strconcat (_tmp37_, _tmp41_, NULL);
#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 = _tmp42_;
#line 362 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp41_);
#line 2183 "vm-configurator.c"
	}
#line 365 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp43_ = num_reboots;
#line 365 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp43_ != ((guint) 0)) {
#line 2189 "vm-configurator.c"
		const gchar* _tmp44_ = NULL;
		guint _tmp45_ = 0U;
		gchar* _tmp46_ = NULL;
		gchar* _tmp47_ = NULL;
		gchar* _tmp48_ = NULL;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp44_ = custom_xml;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp45_ = num_reboots;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp46_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_NUM_REBOOTS_XML, _tmp45_);
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp47_ = _tmp46_;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp48_ = g_strconcat (_tmp44_, _tmp47_, 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 = _tmp48_;
#line 366 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp47_);
#line 2211 "vm-configurator.c"
	}
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp49_ = custom_xml;
#line 368 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp50_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_BOXES_XML, _tmp49_);
#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 = _tmp50_;
#line 2221 "vm-configurator.c"
	{
		GVirConfigDomain* _tmp51_ = NULL;
		const gchar* _tmp52_ = NULL;
#line 370 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp51_ = domain;
#line 370 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp52_ = custom_xml;
#line 370 "/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 370 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_inner_error_ != NULL) {
#line 2233 "vm-configurator.c"
			goto __catch94_g_error;
		}
	}
	goto __finally94;
	__catch94_g_error:
	{
		GError* _error_ = NULL;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_error_ = _inner_error_;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_inner_error_ = NULL;
#line 371 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_assert_not_reached ();
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_error_free0 (_error_);
#line 2249 "vm-configurator.c"
	}
	__finally94:
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_inner_error_ != 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"
		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 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return;
#line 2262 "vm-configurator.c"
	}
#line 341 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 2266 "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 374 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 375 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_smartcard_passthrough_new ();
#line 375 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	smartcard = _tmp0_;
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 376 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp1_;
#line 377 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_smartcard_passthrough_set_source (smartcard, (GVirConfigDomainChardevSource*) vmc);
#line 378 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = domain;
#line 378 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp2_, (GVirConfigDomainDevice*) smartcard);
#line 374 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 374 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (smartcard);
#line 2296 "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 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 2316 "vm-configurator.c"
	{
		gint i = 0;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		i = 0;
#line 2321 "vm-configurator.c"
		{
			gboolean _tmp0_ = FALSE;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp0_ = TRUE;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 2328 "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 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!_tmp0_) {
#line 2341 "vm-configurator.c"
					gint _tmp1_ = 0;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp1_ = i;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					i = _tmp1_ + 1;
#line 2347 "vm-configurator.c"
				}
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp0_ = FALSE;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp2_ = i;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp2_ < 4)) {
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 2357 "vm-configurator.c"
				}
#line 384 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = gvir_config_domain_redirdev_new ();
#line 384 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				usb_redir = _tmp3_;
#line 385 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = usb_redir;
#line 385 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_redirdev_set_bus (_tmp4_, GVIR_CONFIG_DOMAIN_REDIRDEV_BUS_USB);
#line 386 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 386 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				vmc = _tmp5_;
#line 387 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = usb_redir;
#line 387 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = vmc;
#line 387 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp6_, (GVirConfigDomainChardevSource*) _tmp7_);
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = domain;
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = usb_redir;
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_add_device (_tmp8_, (GVirConfigDomainDevice*) _tmp9_);
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (vmc);
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (usb_redir);
#line 2387 "vm-configurator.c"
			}
		}
	}
#line 392 "/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 392 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	master_controller = _tmp10_;
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = domain;
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp11_, (GVirConfigDomainDevice*) master_controller);
#line 394 "/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 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp12_;
#line 395 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 395 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = controller;
#line 395 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 396 "/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 396 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 396 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp15_;
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = domain;
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = controller;
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp16_, (GVirConfigDomainDevice*) _tmp17_);
#line 398 "/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 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp18_;
#line 399 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = domain;
#line 399 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = controller;
#line 399 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp19_, (GVirConfigDomainDevice*) _tmp20_);
#line 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (master_controller);
#line 2437 "vm-configurator.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return self ? g_object_ref (self) : NULL;
#line 2444 "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 402 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = bridge;
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp0_) {
#line 2460 "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 406 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp1_ = domain;
#line 406 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = gvir_config_domain_get_name (_tmp1_);
#line 406 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:406: Adding bridge network to %s", _tmp2_);
#line 407 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = gvir_config_domain_interface_bridge_new ();
#line 407 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		bridge_iface = _tmp3_;
#line 408 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = bridge_iface;
#line 408 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_bridge_set_source (_tmp4_, "virbr0");
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = bridge_iface;
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = _g_object_ref0 ((GVirConfigDomainInterface*) _tmp5_);
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 409 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		iface = _tmp6_;
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (bridge_iface);
#line 2492 "vm-configurator.c"
	} else {
		GVirConfigDomain* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		GVirConfigDomainInterfaceUser* _tmp9_ = NULL;
#line 411 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = domain;
#line 411 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = gvir_config_domain_get_name (_tmp7_);
#line 411 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:411: Adding user network to %s", _tmp8_);
#line 412 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = gvir_config_domain_interface_user_new ();
#line 412 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 412 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		iface = (GVirConfigDomainInterface*) _tmp9_;
#line 2509 "vm-configurator.c"
	}
#line 415 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = virtio;
#line 415 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp10_) {
#line 2515 "vm-configurator.c"
		GVirConfigDomainInterface* _tmp11_ = NULL;
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = iface;
#line 416 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_set_model (_tmp11_, "virtio");
#line 2521 "vm-configurator.c"
	}
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = domain;
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = iface;
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp12_, (GVirConfigDomainDevice*) _tmp13_);
#line 402 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (iface);
#line 2531 "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 425 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_controller_usb_new ();
#line 425 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp0_;
#line 426 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = controller;
#line 426 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = model;
#line 426 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_usb_set_model (_tmp1_, _tmp2_);
#line 427 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = controller;
#line 427 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = index;
#line 427 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_set_index ((GVirConfigDomainController*) _tmp3_, _tmp4_);
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = master;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp5_ != NULL) {
#line 2564 "vm-configurator.c"
		GVirConfigDomainControllerUsb* _tmp6_ = NULL;
		GVirConfigDomainControllerUsb* _tmp7_ = NULL;
		guint _tmp8_ = 0U;
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = controller;
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = master;
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = start_port;
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_controller_usb_set_master (_tmp6_, _tmp7_, _tmp8_);
#line 2576 "vm-configurator.c"
	}
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = controller;
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2582 "vm-configurator.c"
}


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


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_list_free (self);
#line 2598 "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 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 436 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	devices = NULL;
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_get_devices (_tmp0_);
#line 2616 "vm-configurator.c"
	{
		GList* device_collection = NULL;
		GList* device_it = NULL;
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		device_collection = _tmp1_;
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
#line 2624 "vm-configurator.c"
			GVirConfigDomainDevice* _tmp2_ = NULL;
			GVirConfigDomainDevice* device = NULL;
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigDomainDevice*) device_it->data);
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			device = _tmp2_;
#line 2631 "vm-configurator.c"
			{
				GVirConfigDomainDevice* _tmp3_ = NULL;
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = device;
#line 438 "/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 2638 "vm-configurator.c"
					GVirConfigDomainDevice* _tmp4_ = NULL;
					GVirConfigDomainDevice* _tmp5_ = NULL;
#line 439 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp4_ = device;
#line 439 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp5_ = _g_object_ref0 (_tmp4_);
#line 439 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					devices = g_list_prepend (devices, _tmp5_);
#line 2647 "vm-configurator.c"
				}
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (device);
#line 2651 "vm-configurator.c"
			}
		}
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (device_collection);
#line 2656 "vm-configurator.c"
	}
#line 442 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	devices = g_list_reverse (devices);
#line 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = devices;
#line 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_devices (_tmp6_, _tmp7_);
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (devices);
#line 2668 "vm-configurator.c"
}


static gint __lambda36_ (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 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_a != NULL, 0);
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_b != NULL, 0);
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps_a;
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_name (_tmp2_);
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = _tmp4_;
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp2_);
#line 451 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch_a = _tmp5_;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = caps_b;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = gvir_config_capabilities_guest_get_arch (_tmp6_);
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = _tmp7_;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = gvir_config_capabilities_guest_arch_get_name (_tmp8_);
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = g_strdup (_tmp9_);
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = _tmp10_;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp8_);
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch_b = _tmp11_;
#line 454 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = arch_a;
#line 454 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (g_strcmp0 (_tmp12_, "i686") == 0) {
#line 2729 "vm-configurator.c"
		const gchar* _tmp13_ = NULL;
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = arch_b;
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp13_, "x86_64") == 0) {
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = 1;
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 2743 "vm-configurator.c"
		} else {
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 458 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 2753 "vm-configurator.c"
		}
	} else {
		const gchar* _tmp14_ = NULL;
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = arch_a;
#line 459 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp14_, "x86_64") == 0) {
#line 460 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 460 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 460 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 460 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 2769 "vm-configurator.c"
		} else {
			gboolean _tmp15_ = FALSE;
			const gchar* _tmp16_ = NULL;
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = arch_b;
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp16_, "x86_64") == 0) {
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = TRUE;
#line 2779 "vm-configurator.c"
			} else {
				const gchar* _tmp17_ = NULL;
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = arch_b;
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = g_strcmp0 (_tmp17_, "i686") == 0;
#line 2786 "vm-configurator.c"
			}
#line 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (_tmp15_) {
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				result = 1;
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 2798 "vm-configurator.c"
			} else {
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				result = 0;
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 2808 "vm-configurator.c"
			}
		}
	}
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_b);
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_a);
#line 2816 "vm-configurator.c"
}


static gint ___lambda36__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda36_ ((GVirConfigCapabilitiesGuest*) a, (GVirConfigCapabilitiesGuest*) b);
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2825 "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 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 448 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps;
#line 448 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_get_guests (_tmp0_);
#line 448 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	guests_caps = _tmp1_;
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	guests_caps = g_list_sort (guests_caps, ___lambda36__gcompare_func);
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	compat_guests_caps = NULL;
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = guests_caps;
#line 2857 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp2_;
#line 469 "/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 2865 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp3_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp3_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp3_;
#line 2872 "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 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = guest_caps;
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_get_arch (_tmp4_);
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = _tmp5_;
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = gvir_config_capabilities_guest_arch_get_name (_tmp6_);
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (_tmp7_);
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = _tmp8_;
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_tmp6_);
#line 470 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				guest_arch = _tmp9_;
#line 472 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 472 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = guest_arch;
#line 472 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = boxes_installer_media_is_architecture_compatible (_tmp10_, _tmp11_);
#line 472 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 2908 "vm-configurator.c"
					GVirConfigCapabilitiesGuest* _tmp13_ = NULL;
					GVirConfigCapabilitiesGuest* _tmp14_ = NULL;
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp13_ = guest_caps;
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp14_ = _g_object_ref0 (_tmp13_);
#line 473 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					compat_guests_caps = g_list_append (compat_guests_caps, _tmp14_);
#line 2917 "vm-configurator.c"
				}
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (guest_arch);
#line 469 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 2923 "vm-configurator.c"
			}
		}
	}
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = compat_guests_caps;
#line 2929 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp15_;
#line 477 "/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 2937 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp16_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp16_;
#line 2944 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp17_ = NULL;
				gboolean _tmp18_ = FALSE;
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = guest_caps;
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = boxes_vm_configurator_guest_kvm_enabled (_tmp17_);
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp18_) {
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 479 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 2962 "vm-configurator.c"
				}
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 2966 "vm-configurator.c"
			}
		}
	}
#line 482 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = compat_guests_caps;
#line 2972 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 482 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp19_;
#line 482 "/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* _tmp20_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 482 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp20_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 482 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp20_;
#line 2987 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp21_ = NULL;
				gboolean _tmp22_ = FALSE;
#line 483 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = guest_caps;
#line 483 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp22_ = boxes_vm_configurator_guest_is_qemu (_tmp21_);
#line 483 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp22_) {
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3005 "vm-configurator.c"
				}
#line 482 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3009 "vm-configurator.c"
			}
		}
	}
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = _ ("Incapable host system");
#line 488 "/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 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_inner_error_ = _tmp24_;
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_propagate_error (error, _inner_error_);
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3029 "vm-configurator.c"
	} else {
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 488 "/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 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 488 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3041 "vm-configurator.c"
	}
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (guests_caps);
#line 3047 "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 491 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 492 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 492 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 492 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3070 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3078 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_ = NULL;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3085 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_ = NULL;
				GVirConfigDomainVirtType _tmp6_ = 0;
#line 494 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 494 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 494 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_KVM) {
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3105 "vm-configurator.c"
				}
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3109 "vm-configurator.c"
			}
		}
#line 493 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3114 "vm-configurator.c"
	}
#line 497 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 497 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 497 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3122 "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 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 501 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 501 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 501 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3145 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3153 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_ = NULL;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3160 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_ = NULL;
				GVirConfigDomainVirtType _tmp6_ = 0;
#line 503 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 503 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 503 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_QEMU) {
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#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 3180 "vm-configurator.c"
				}
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3184 "vm-configurator.c"
			}
		}
#line 502 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3189 "vm-configurator.c"
	}
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3197 "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 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 509 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (feature_name != NULL, FALSE);
#line 510 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	supports = FALSE;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_features (_tmp0_);
#line 3216 "vm-configurator.c"
	{
		GList* feature_collection = NULL;
		GList* feature_it = NULL;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		feature_collection = _tmp1_;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (feature_it = feature_collection; feature_it != NULL; feature_it = feature_it->next) {
#line 3224 "vm-configurator.c"
			GVirConfigCapabilitiesGuestFeature* _tmp2_ = NULL;
			GVirConfigCapabilitiesGuestFeature* feature = NULL;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestFeature*) feature_it->data);
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			feature = _tmp2_;
#line 3231 "vm-configurator.c"
			{
				const gchar* _tmp3_ = NULL;
				GVirConfigCapabilitiesGuestFeature* _tmp4_ = NULL;
				const gchar* _tmp5_ = NULL;
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = feature_name;
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = feature;
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_feature_get_name (_tmp4_);
#line 513 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
#line 514 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					supports = TRUE;
#line 516 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (feature);
#line 516 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 3250 "vm-configurator.c"
				}
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (feature);
#line 3254 "vm-configurator.c"
			}
		}
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (feature_collection);
#line 3259 "vm-configurator.c"
	}
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = supports;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3265 "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 3275 "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 3282 "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 3289 "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 3298 "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 3308 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3312 "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 3320 "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 3327 "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 3334 "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 3338 "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 3342 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3346 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 3350 "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 3361 "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 3367 "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 3371 "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 3375 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 3379 "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 3393 "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 3402 "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 3422 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3426 "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 3432 "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 3451 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3455 "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 3461 "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"
	BOXES_VM_CONFIGURATOR_CLASS (klass)->finalize = boxes_vm_configurator_finalize;
#line 3471 "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 3478 "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 3486 "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 3511 "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 3524 "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 3532 "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 3540 "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 3552 "vm-configurator.c"
}



