/* vm-configurator.c generated by valac 0.30.0, 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 <config.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include <gio/gio.h>
#include <libcommon.h>
#include <gtk/gtk.h>
#include <osinfo/osinfo.h>
#include <libvirt-gobject/libvirt-gobject.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_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 _BoxesVmConfiguratorUpdateExistingDomainData BoxesVmConfiguratorUpdateExistingDomainData;
#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;
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_);
	gboolean (*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_);
	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 _BoxesVmConfiguratorUpdateExistingDomainData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GVirConfigDomain* domain;
	GVirConnection* connection;
	GVirConfigDomainCpu* cpu;
	GVirConfigDomain* _tmp0_;
	GVirConfigDomainCpu* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	GVirConfigDomainCpu* _tmp4_;
	gboolean _tmp5_;
	GVirConfigDomainCpu* _tmp6_;
	GVirConfigDomainCpuMode _tmp7_;
	GVirConfigDomainCpu* _tmp8_;
	GVirConfigDomainCpuMode _tmp9_;
	GVirConfigDomain* _tmp10_;
	gboolean _tmp11_;
	GVirConfigCapabilities* capabilities;
	GVirConnection* _tmp12_;
	GVirConfigCapabilities* _tmp13_;
	GVirConfigDomain* _tmp14_;
	GVirConfigCapabilities* _tmp15_;
	GError* e;
	GVirConfigDomain* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GError* _tmp19_;
	const gchar* _tmp20_;
	gboolean _tmp21_;
	GList* devices;
	GVirConfigDomainInterface* iface;
	GVirConfigDomain* _tmp22_;
	GList* _tmp23_;
	GList* device_collection;
	GList* device_it;
	GVirConfigDomainDevice* _tmp24_;
	GVirConfigDomainDevice* device;
	gboolean _tmp25_;
	GVirConfigDomainDevice* _tmp26_;
	GVirConfigDomainDevice* _tmp27_;
	GVirConfigDomainDevice* _tmp28_;
	GVirConfigDomainInterface* _tmp29_;
	GVirConfigDomainDevice* _tmp30_;
	GVirConfigDomainDevice* _tmp31_;
	GVirConfigDomain* _tmp32_;
	GList* _tmp33_;
	GVirConfigDomainInterface* _tmp34_;
	gboolean virtio;
	GVirConfigDomainInterface* _tmp35_;
	const gchar* _tmp36_;
	GVirConfigDomain* _tmp37_;
	gboolean _tmp38_;
	GError * _inner_error_;
};

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 PACKAGE_URL
#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_add12 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add13 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add14 (gchar*** array, int* length, int* size, gchar* value);
void boxes_vm_configurator_set_target_media_config (GVirConfigDomain* domain, const gchar* target_path, BoxesInstallerMedia* install_media, guint8 dev_index);
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);
static void boxes_vm_configurator_set_mouse_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media);
static void boxes_vm_configurator_set_keyboard_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);
gboolean boxes_vm_configurator_is_boxes_installed (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);
static void boxes_vm_configurator_update_existing_domain_data_free (gpointer _data);
void boxes_vm_configurator_update_existing_domain (GVirConfigDomain* domain, GVirConnection* connection, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_vm_configurator_update_existing_domain_finish (GAsyncResult* _res_);
static gboolean boxes_vm_configurator_update_existing_domain_co (BoxesVmConfiguratorUpdateExistingDomainData* _data_);
static void boxes_vm_configurator_update_existing_domain_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
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);
static void boxes_vm_configurator_set_input_config (GVirConfigDomain* domain, GVirConfigDomainInputDeviceType device_type);
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 gint __lambda149_ (GVirConfigCapabilitiesGuest* caps_a, GVirConfigCapabilitiesGuest* caps_b);
static gint ___lambda149__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 528 "/home/zeenix/checkout/gnome/gnome-boxes/src/libvirt-machine.vala"
	return g_quark_from_static_string ("boxes_vm_configurator_error-quark");
#line 310 "vm-configurator.c"
}


static void _vala_array_add12 (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 321 "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 327 "vm-configurator.c"
}


static void _vala_array_add13 (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 338 "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 344 "vm-configurator.c"
}


static void _vala_array_add14 (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 355 "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 361 "vm-configurator.c"
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1278 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1278 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1279 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1279 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1279 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1279 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	return result;
#line 381 "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;
	GVirConfigDomainTimerHpet* _tmp44_ = NULL;
	GVirConfigDomainTimer* _tmp45_ = NULL;
	GVirConfigDomainClock* _tmp46_ = NULL;
	GVirConfigDomainTimer* _tmp47_ = NULL;
	GVirConfigDomainClock* _tmp48_ = NULL;
	const gchar* _tmp49_ = NULL;
	BoxesInstallerMedia* _tmp50_ = NULL;
	BoxesInstallerMedia* _tmp51_ = NULL;
	GVirConfigDomainGraphicsSpice* graphics = NULL;
	GVirConfigDomainGraphicsSpice* _tmp52_ = NULL;
	GVirConfigDomainGraphicsSpice* _tmp53_ = NULL;
	GVirConfigDomainGraphicsSpice* _tmp54_ = NULL;
	GVirConfigDomainGraphicsSpice* _tmp55_ = NULL;
	GVirConfigDomainChannel* channel = NULL;
	GVirConfigDomainChannel* _tmp56_ = NULL;
	GVirConfigDomainChannel* _tmp57_ = NULL;
	GVirConfigDomainChannel* _tmp58_ = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp59_ = NULL;
	GVirConfigDomainChannel* _tmp60_ = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp61_ = NULL;
	GVirConfigDomainChannel* _tmp62_ = NULL;
	BoxesInstallerMedia* _tmp63_ = NULL;
	BoxesInstallerMedia* _tmp64_ = NULL;
	BoxesInstallerMedia* _tmp65_ = NULL;
	BoxesInstallerMedia* _tmp66_ = NULL;
	BoxesInstallerMedia* _tmp67_ = NULL;
	GVirConfigDomainPowerManagement* pm = NULL;
	GVirConfigDomainPowerManagement* _tmp68_ = NULL;
	GVirConfigDomainPowerManagement* _tmp69_ = NULL;
	GVirConfigDomainPowerManagement* _tmp70_ = NULL;
	GVirConfigDomainPowerManagement* _tmp71_ = NULL;
	GVirConfigDomainConsole* console = NULL;
	GVirConfigDomainConsole* _tmp72_ = NULL;
	GVirConfigDomainConsole* _tmp73_ = NULL;
	GVirConfigDomainChardevSourcePty* _tmp74_ = NULL;
	GVirConfigDomainChardevSourcePty* _tmp75_ = NULL;
	GVirConfigDomainConsole* _tmp76_ = NULL;
	gboolean _tmp77_ = FALSE;
	BoxesInstallerMedia* _tmp78_ = NULL;
	gboolean _tmp79_ = FALSE;
	gboolean _tmp80_ = FALSE;
	GError * _inner_error_ = NULL;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (target_path != NULL, NULL);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_new ();
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	domain = _tmp0_;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_setup_custom_xml (domain, _tmp1_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = caps;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = install_media;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_best_guest_caps (_tmp2_, _tmp3_, &_inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	best_caps = _tmp4_;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_propagate_error (error, _inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (domain);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return NULL;
#line 502 "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 512 "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 535 "vm-configurator.c"
	} else {
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = GVIR_CONFIG_DOMAIN_VIRT_QEMU;
#line 539 "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 563 "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_add12 (&features, &features_length1, &_features_size_, _tmp17_);
#line 575 "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 581 "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_add13 (&features, &features_length1, &_features_size_, _tmp20_);
#line 593 "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 599 "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_add14 (&features, &features_length1, &_features_size_, _tmp23_);
#line 611 "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 629 "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 647 "vm-configurator.c"
	} else {
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = FALSE;
#line 651 "vm-configurator.c"
	}
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp26_) {
#line 655 "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 661 "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 668 "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_ = gvir_config_domain_timer_hpet_new ();
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	timer = (GVirConfigDomainTimer*) _tmp44_;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp45_ = timer;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_timer_set_present (_tmp45_, FALSE);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp46_ = clock;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp47_ = timer;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_clock_add_timer (_tmp46_, _tmp47_);
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp48_ = clock;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_clock (domain, _tmp48_);
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp49_ = target_path;
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp50_ = install_media;
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_target_media_config (domain, _tmp49_, _tmp50_, (guint8) 0);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp51_ = install_media;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_setup_domain_config (_tmp51_, domain);
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp52_ = gvir_config_domain_graphics_spice_new ();
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	graphics = _tmp52_;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp53_ = graphics;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_graphics_spice_set_autoport (_tmp53_, TRUE);
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp54_ = graphics;
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_graphics_spice_set_image_compression (_tmp54_, GVIR_CONFIG_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_OFF);
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp55_ = graphics;
#line 77 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp55_);
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp56_ = gvir_config_domain_channel_new ();
#line 80 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	channel = _tmp56_;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp57_ = channel;
#line 81 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_type (_tmp57_, GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO);
#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_channel_set_target_name (_tmp58_, "com.redhat.spice.0");
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp59_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp59_;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp60_ = channel;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp61_ = vmc;
#line 84 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp60_, (GVirConfigDomainChardevSource*) _tmp61_);
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp62_ = channel;
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp62_);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (HAVE_USBREDIR) {
#line 89 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_add_usb_support (domain);
#line 776 "vm-configurator.c"
	}
#line 91 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (HAVE_SMARTCARD) {
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_add_smartcard_support (domain);
#line 782 "vm-configurator.c"
	}
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp63_ = install_media;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_video_config (domain, _tmp63_);
#line 95 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp64_ = install_media;
#line 95 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_sound_config (domain, _tmp64_);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp65_ = install_media;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_tablet_config (domain, _tmp65_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp66_ = install_media;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_mouse_config (domain, _tmp66_);
#line 98 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp67_ = install_media;
#line 98 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_keyboard_config (domain, _tmp67_);
#line 100 "/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 101 "/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 102 "/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 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp68_ = gvir_config_domain_power_management_new ();
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	pm = _tmp68_;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp69_ = pm;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_power_management_set_mem_suspend_enabled (_tmp69_, FALSE);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp70_ = pm;
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_power_management_set_disk_suspend_enabled (_tmp70_, FALSE);
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp71_ = pm;
#line 108 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_power_management (domain, _tmp71_);
#line 109 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp72_ = gvir_config_domain_console_new ();
#line 109 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	console = _tmp72_;
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp73_ = console;
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp74_ = gvir_config_domain_chardev_source_pty_new ();
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp75_ = _tmp74_;
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp73_, (GVirConfigDomainChardevSource*) _tmp75_);
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp75_);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp76_ = console;
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp76_);
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp77_ = boxes_is_libvirt_bridge_net_available ();
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp78_ = install_media;
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp79_ = boxes_installer_media_get_supports_virtio_net (_tmp78_);
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp80_ = _tmp79_;
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_add_network_interface (domain, _tmp77_, _tmp80_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = domain;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (console);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (pm);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (channel);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (graphics);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (clock);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	features = (_vala_array_free (features, features_length1, (GDestroyNotify) g_free), NULL);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (best_caps);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 876 "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 118 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_post_install_os_config (_tmp0_);
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 120 "/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 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = install_media;
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ != NULL) {
#line 900 "vm-configurator.c"
		BoxesInstallerMedia* _tmp3_ = NULL;
		GVirConfigDomain* _tmp4_ = NULL;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = install_media;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = domain;
#line 123 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_installer_media_setup_post_install_domain_config (_tmp3_, _tmp4_);
#line 909 "vm-configurator.c"
	}
#line 125 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 125 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = install_media;
#line 125 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_mark_as_installed (_tmp5_, _tmp6_);
#line 917 "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 128 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_INSTALLATION_STATE) == 0;
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 129 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 943 "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 132 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_LIVE_STATE) == 0;
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 969 "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 136 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_IMPORT_STATE) == 0;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 995 "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 140 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_STATE) == 0;
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 141 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1021 "vm-configurator.c"
}


gboolean boxes_vm_configurator_is_boxes_installed (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 144 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_INSTALLED_STATE) == 0;
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 145 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1047 "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 148 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_vol_new ();
#line 149 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	volume = _tmp0_;
#line 150 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = name;
#line 150 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_name (volume, _tmp1_);
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = storage;
#line 151 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_capacity (volume, (guint64) _tmp2_);
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_storage_vol_target_new ();
#line 152 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	target = _tmp3_;
#line 153 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_target_set_format (target, "qcow2");
#line 154 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_default_permissions ();
#line 154 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp4_;
#line 155 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_target_set_permissions (target, permissions);
#line 156 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_target (volume, target);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = volume;
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (permissions);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (target);
#line 158 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1097 "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 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = boxes_get_user_pkgdata ("images");
#line 162 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	pool_path = _tmp0_;
#line 164 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_storage_pool_new ();
#line 164 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	pool = _tmp1_;
#line 165 "/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 166 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_name (pool, PACKAGE_TARNAME);
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_storage_pool_source_new ();
#line 168 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	source = _tmp2_;
#line 169 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_source_set_directory (source, pool_path);
#line 170 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_source (pool, source);
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_storage_pool_target_new ();
#line 172 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	target = _tmp3_;
#line 173 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_target_set_path (target, pool_path);
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_default_permissions ();
#line 174 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp4_;
#line 175 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_target_set_permissions (target, permissions);
#line 176 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_target (pool, target);
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = pool;
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (permissions);
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (target);
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (source);
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (pool_path);
#line 178 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1159 "vm-configurator.c"
}


gchar* boxes_vm_configurator_get_os_id (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_, "os-id");
#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 1177 "vm-configurator.c"
}


gchar* boxes_vm_configurator_get_os_media_id (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 185 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#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_, "media-id");
#line 186 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 186 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1195 "vm-configurator.c"
}


gchar* boxes_vm_configurator_get_source_media_path (GVirConfigDomain* domain) {
	gchar* result = NULL;
	GVirConfigDomain* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 189 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 190 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 190 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "media");
#line 190 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = _tmp1_;
#line 190 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1213 "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 193 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, 0U);
#line 194 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 194 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "num-reboots");
#line 194 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	str = _tmp1_;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = str;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_ != NULL) {
#line 1236 "vm-configurator.c"
		const gchar* _tmp4_ = NULL;
		gint _tmp5_ = 0;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = str;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = atoi (_tmp4_);
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = _tmp5_;
#line 1245 "vm-configurator.c"
	} else {
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = 0;
#line 1249 "vm-configurator.c"
	}
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = (guint) _tmp2_;
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (str);
#line 195 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1257 "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 198 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 198 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != 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"
	_tmp2_ = num_reboots;
#line 199 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_custom_xml (_tmp0_, _tmp1_, _tmp2_, FALSE);
#line 1277 "vm-configurator.c"
}


void boxes_vm_configurator_setup_custom_xml (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
	BoxesInstallerMedia* _tmp1_ = 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 (install_media != NULL);
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 203 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_custom_xml (_tmp0_, _tmp1_, (guint) 0, FALSE);
#line 1294 "vm-configurator.c"
}


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


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


static void boxes_vm_configurator_update_existing_domain_data_free (gpointer _data) {
	BoxesVmConfiguratorUpdateExistingDomainData* _data_;
	_data_ = _data;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->domain);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->connection);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_slice_free (BoxesVmConfiguratorUpdateExistingDomainData, _data_);
#line 1467 "vm-configurator.c"
}


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


void boxes_vm_configurator_update_existing_domain (GVirConfigDomain* domain, GVirConnection* connection, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesVmConfiguratorUpdateExistingDomainData* _data_;
	GVirConfigDomain* _tmp0_ = NULL;
	GVirConfigDomain* _tmp1_ = NULL;
	GVirConnection* _tmp2_ = NULL;
	GVirConnection* _tmp3_ = NULL;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_ = g_slice_new0 (BoxesVmConfiguratorUpdateExistingDomainData);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, boxes_vm_configurator_update_existing_domain);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, boxes_vm_configurator_update_existing_domain_data_free);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->domain);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->domain = _tmp1_;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = connection;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->connection);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->connection = _tmp3_;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_existing_domain_co (_data_);
#line 1508 "vm-configurator.c"
}


void boxes_vm_configurator_update_existing_domain_finish (GAsyncResult* _res_) {
	BoxesVmConfiguratorUpdateExistingDomainData* _data_;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1516 "vm-configurator.c"
}


static void boxes_vm_configurator_update_existing_domain_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesVmConfiguratorUpdateExistingDomainData* _data_;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_ = _user_data_;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_source_object_ = source_object;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_res_ = _res_;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_existing_domain_co (_data_);
#line 1530 "vm-configurator.c"
}


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


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


static gboolean boxes_vm_configurator_update_existing_domain_co (BoxesVmConfiguratorUpdateExistingDomainData* _data_) {
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	switch (_data_->_state_) {
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		case 0:
#line 1555 "vm-configurator.c"
		goto _state_0;
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		case 1:
#line 1559 "vm-configurator.c"
		goto _state_1;
		default:
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_assert_not_reached ();
#line 1564 "vm-configurator.c"
	}
	_state_0:
	{
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp0_ = NULL;
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp0_ = _data_->domain;
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp1_ = NULL;
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp1_ = gvir_config_domain_get_cpu (_data_->_tmp0_);
#line 236 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->cpu = _data_->_tmp1_;
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp4_ = NULL;
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp4_ = _data_->cpu;
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_tmp4_ != NULL) {
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp6_ = NULL;
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp6_ = _data_->cpu;
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp7_ = 0;
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp7_ = gvir_config_domain_cpu_get_mode (_data_->_tmp6_);
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (_data_->_tmp7_ == GVIR_CONFIG_DOMAIN_CPU_MODE_HOST_PASSTHROUGH) {
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp5_ = TRUE;
#line 1596 "vm-configurator.c"
			} else {
#line 239 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp8_ = NULL;
#line 239 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp8_ = _data_->cpu;
#line 239 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp9_ = 0;
#line 239 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp9_ = gvir_config_domain_cpu_get_mode (_data_->_tmp8_);
#line 239 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp5_ = _data_->_tmp9_ == GVIR_CONFIG_DOMAIN_CPU_MODE_HOST_MODEL;
#line 1608 "vm-configurator.c"
			}
#line 238 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp3_ = _data_->_tmp5_;
#line 1612 "vm-configurator.c"
		} else {
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp3_ = FALSE;
#line 1616 "vm-configurator.c"
		}
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_tmp3_) {
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp10_ = NULL;
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp10_ = _data_->domain;
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp11_ = FALSE;
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp11_ = boxes_vm_configurator_is_boxes_installed (_data_->_tmp10_);
#line 240 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp2_ = _data_->_tmp11_;
#line 1630 "vm-configurator.c"
		} else {
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp2_ = FALSE;
#line 1634 "vm-configurator.c"
		}
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_tmp2_) {
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp12_ = NULL;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp12_ = _data_->connection;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_state_ = 1;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			gvir_connection_get_capabilities_async (_data_->_tmp12_, NULL, boxes_vm_configurator_update_existing_domain_ready, _data_);
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return FALSE;
#line 1648 "vm-configurator.c"
			_state_1:
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp13_ = NULL;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp13_ = gvir_connection_get_capabilities_finish (_data_->_tmp12_, _data_->_res_, &_data_->_inner_error_);
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->capabilities = _data_->_tmp13_;
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 241 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_data_->cpu);
#line 1660 "vm-configurator.c"
				goto __catch107_g_error;
			}
#line 242 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp14_ = NULL;
#line 242 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp14_ = _data_->domain;
#line 242 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp15_ = NULL;
#line 242 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp15_ = _data_->capabilities;
#line 242 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			boxes_vm_configurator_set_cpu_config (_data_->_tmp14_, _data_->_tmp15_);
#line 237 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (_data_->capabilities);
#line 1675 "vm-configurator.c"
		}
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (_data_->cpu);
#line 1679 "vm-configurator.c"
	}
	goto __finally107;
	__catch107_g_error:
	{
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->e = _data_->_inner_error_;
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_inner_error_ = NULL;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp16_ = NULL;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp16_ = _data_->domain;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp17_ = NULL;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp17_ = gvir_config_domain_get_name (_data_->_tmp16_);
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp18_ = NULL;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp18_ = _data_->_tmp17_;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp19_ = NULL;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp19_ = _data_->e;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp20_ = NULL;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp20_ = _data_->_tmp19_->message;
#line 245 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_warning ("vm-configurator.vala:245: Failed to update CPU config for '%s': %s", _data_->_tmp18_, _data_->_tmp20_);
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_error_free0 (_data_->e);
#line 1712 "vm-configurator.c"
	}
	__finally107:
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_data_->_inner_error_);
#line 235 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return FALSE;
#line 1723 "vm-configurator.c"
	}
#line 248 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp21_ = FALSE;
#line 248 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp21_ = boxes_is_libvirt_bridge_net_available ();
#line 248 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (!_data_->_tmp21_) {
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_state_ == 0) {
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1735 "vm-configurator.c"
		} else {
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1739 "vm-configurator.c"
		}
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_object_unref (_data_->_async_result);
#line 249 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return FALSE;
#line 1745 "vm-configurator.c"
	}
#line 252 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->devices = NULL;
#line 253 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->iface = NULL;
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp22_ = NULL;
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp22_ = _data_->domain;
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp23_ = NULL;
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp23_ = gvir_config_domain_get_devices (_data_->_tmp22_);
#line 1759 "vm-configurator.c"
	{
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->device_collection = _data_->_tmp23_;
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (_data_->device_it = _data_->device_collection; _data_->device_it != NULL; _data_->device_it = _data_->device_it->next) {
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp24_ = NULL;
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp24_ = _g_object_ref0 ((GVirConfigDomainDevice*) _data_->device_it->data);
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_data_->device = _data_->_tmp24_;
#line 1771 "vm-configurator.c"
			{
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp26_ = NULL;
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp26_ = _data_->device;
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp26_, gvir_config_domain_interface_user_get_type ())) {
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp25_ = TRUE;
#line 1781 "vm-configurator.c"
				} else {
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp27_ = NULL;
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp27_ = _data_->device;
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp25_ = G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp27_, gvir_config_domain_interface_network_get_type ());
#line 1789 "vm-configurator.c"
				}
#line 255 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_data_->_tmp25_) {
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp28_ = NULL;
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp28_ = _data_->device;
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp29_ = NULL;
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp28_, gvir_config_domain_interface_get_type ()) ? ((GVirConfigDomainInterface*) _data_->_tmp28_) : NULL);
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (_data_->iface);
#line 256 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->iface = _data_->_tmp29_;
#line 1805 "vm-configurator.c"
				} else {
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp30_ = NULL;
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp30_ = _data_->device;
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp31_ = NULL;
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp31_ = _g_object_ref0 (_data_->_tmp30_);
#line 258 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_data_->devices = g_list_prepend (_data_->devices, _data_->_tmp31_);
#line 1817 "vm-configurator.c"
				}
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_data_->device);
#line 1821 "vm-configurator.c"
			}
		}
#line 254 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (_data_->device_collection);
#line 1826 "vm-configurator.c"
	}
#line 260 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->devices = g_list_reverse (_data_->devices);
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp32_ = NULL;
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp32_ = _data_->domain;
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp33_ = NULL;
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp33_ = _data_->devices;
#line 261 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_devices (_data_->_tmp32_, _data_->_tmp33_);
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp34_ = NULL;
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp34_ = _data_->iface;
#line 264 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_data_->_tmp34_ != NULL) {
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp35_ = NULL;
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp35_ = _data_->iface;
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp36_ = NULL;
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp36_ = gvir_config_domain_interface_get_model (_data_->_tmp35_);
#line 265 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->virtio = g_strcmp0 (_data_->_tmp36_, "virtio") == 0;
#line 266 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp37_ = NULL;
#line 266 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp37_ = _data_->domain;
#line 266 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp38_ = FALSE;
#line 266 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp38_ = _data_->virtio;
#line 266 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_add_network_interface (_data_->_tmp37_, TRUE, _data_->_tmp38_);
#line 1866 "vm-configurator.c"
	}
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->iface);
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (_data_->devices);
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_data_->_state_ == 0) {
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1876 "vm-configurator.c"
	} else {
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1880 "vm-configurator.c"
	}
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_object_unref (_data_->_async_result);
#line 233 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return FALSE;
#line 1886 "vm-configurator.c"
}


void boxes_vm_configurator_set_target_media_config (GVirConfigDomain* domain, const gchar* target_path, BoxesInstallerMedia* install_media, guint8 dev_index) {
	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;
	gchar* dev_letter_str = NULL;
	guint8 _tmp8_ = 0U;
	gchar* _tmp9_ = NULL;
	BoxesInstallerMedia* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	GVirConfigDomain* _tmp23_ = NULL;
	GVirConfigDomainDisk* _tmp24_ = NULL;
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (target_path != NULL);
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 274 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 274 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	disk = _tmp0_;
#line 275 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = disk;
#line 275 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_type (_tmp1_, GVIR_CONFIG_DOMAIN_DISK_FILE);
#line 276 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = disk;
#line 276 "/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 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = disk;
#line 277 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_name (_tmp3_, "qemu");
#line 278 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = disk;
#line 278 "/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 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = disk;
#line 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = target_path;
#line 279 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_source (_tmp5_, _tmp6_);
#line 280 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = disk;
#line 280 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_cache (_tmp7_, GVIR_CONFIG_DOMAIN_DISK_CACHE_WRITEBACK);
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = dev_index;
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = g_strdup_printf ("%c", (gchar) (_tmp8_ + 97));
#line 282 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	dev_letter_str = _tmp9_;
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = install_media;
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = boxes_installer_media_get_supports_virtio_disk (_tmp10_);
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = _tmp11_;
#line 283 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp12_) {
#line 1958 "vm-configurator.c"
		GVirConfigDomainDisk* _tmp13_ = NULL;
		GVirConfigDomainDisk* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
#line 284 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:284: Using virtio controller for the main disk");
#line 285 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = disk;
#line 285 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_bus (_tmp13_, GVIR_CONFIG_DOMAIN_DISK_BUS_VIRTIO);
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = disk;
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp15_ = dev_letter_str;
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = g_strconcat ("vd", _tmp15_, NULL);
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp17_ = _tmp16_;
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp14_, _tmp17_);
#line 286 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp17_);
#line 1982 "vm-configurator.c"
	} else {
		GVirConfigDomainDisk* _tmp18_ = NULL;
		GVirConfigDomainDisk* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
		gchar* _tmp21_ = NULL;
		gchar* _tmp22_ = NULL;
#line 288 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:288: Using IDE controller for the main disk");
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp18_ = disk;
#line 289 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_bus (_tmp18_, GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp19_ = disk;
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp20_ = dev_letter_str;
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp21_ = g_strconcat ("hd", _tmp20_, NULL);
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp22_ = _tmp21_;
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp19_, _tmp22_);
#line 290 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp22_);
#line 2007 "vm-configurator.c"
	}
#line 293 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = domain;
#line 293 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = disk;
#line 293 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp23_, (GVirConfigDomainDevice*) _tmp24_);
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (dev_letter_str);
#line 270 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (disk);
#line 2019 "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 296 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 297 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 297 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 298 "/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 300 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 300 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_domain_get_os (_tmp1_);
#line 300 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	old_os = _tmp2_;
#line 301 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_domain_os_get_boot_devices (old_os);
#line 301 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = _tmp3_;
#line 302 "/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 303 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 305 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_domain_os_get_arch (old_os);
#line 305 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 307 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 307 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp5_, os);
#line 296 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 296 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (old_os);
#line 296 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 2069 "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 310 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 310 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 310 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (guest_caps != NULL);
#line 311 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 311 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 312 "/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 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = guest_caps;
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_capabilities_guest_get_arch (_tmp1_);
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_capabilities_guest_arch_get_name (_tmp3_);
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 313 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp3_);
#line 315 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boot_devices = NULL;
#line 316 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = install_media;
#line 316 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_set_direct_boot_params (_tmp5_, os);
#line 317 "/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 318 "/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 319 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 321 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp6_, os);
#line 310 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 310 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 2127 "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 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 325 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_video_new ();
#line 325 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	video = _tmp0_;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "video");
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 326 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 2175 "vm-configurator.c"
		OsinfoDevice* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_video_model_get_type ());
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 2187 "vm-configurator.c"
	} else {
#line 328 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_VIDEO_MODEL_QXL;
#line 2191 "vm-configurator.c"
	}
#line 327 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 329 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != -1);
#line 330 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = video;
#line 330 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_video_set_model (_tmp12_, (GVirConfigDomainVideoModel) model);
#line 332 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 332 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = video;
#line 332 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 324 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (video);
#line 2211 "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 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_sound_new ();
#line 336 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	sound = _tmp0_;
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "audio");
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 337 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 2259 "vm-configurator.c"
		OsinfoDevice* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_sound_model_get_type ());
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 2271 "vm-configurator.c"
	} else {
#line 339 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_SOUND_MODEL_AC97;
#line 2275 "vm-configurator.c"
	}
#line 338 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 340 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != -1);
#line 341 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = sound;
#line 341 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_sound_set_model (_tmp12_, (GVirConfigDomainSoundModel) model);
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = sound;
#line 343 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 335 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (sound);
#line 2295 "vm-configurator.c"
}


static void boxes_vm_configurator_set_tablet_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
#line 346 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 346 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 347 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 347 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_input_config (_tmp0_, GVIR_CONFIG_DOMAIN_INPUT_DEVICE_TABLET);
#line 2309 "vm-configurator.c"
}


static void boxes_vm_configurator_set_mouse_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
#line 350 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 350 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 351 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 351 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_input_config (_tmp0_, GVIR_CONFIG_DOMAIN_INPUT_DEVICE_MOUSE);
#line 2323 "vm-configurator.c"
}


static void boxes_vm_configurator_set_keyboard_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_ = NULL;
#line 354 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 354 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 355 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_input_config (_tmp0_, GVIR_CONFIG_DOMAIN_INPUT_DEVICE_KEYBOARD);
#line 2337 "vm-configurator.c"
}


static void boxes_vm_configurator_set_input_config (GVirConfigDomain* domain, GVirConfigDomainInputDeviceType device_type) {
	GVirConfigDomainInput* input = NULL;
	GVirConfigDomainInput* _tmp0_ = NULL;
	GVirConfigDomainInputDeviceType _tmp1_ = 0;
	GVirConfigDomain* _tmp2_ = NULL;
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_input_new ();
#line 359 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	input = _tmp0_;
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = device_type;
#line 360 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_input_set_device_type (input, _tmp1_);
#line 361 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_input_set_bus (input, GVIR_CONFIG_DOMAIN_INPUT_BUS_USB);
#line 363 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = domain;
#line 363 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp2_, (GVirConfigDomainDevice*) input);
#line 358 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (input);
#line 2364 "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 367 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_permissions_new ();
#line 367 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp0_;
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = getuid ();
#line 369 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_owner (permissions, (guint) _tmp1_);
#line 370 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = getgid ();
#line 370 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_group (permissions, (guint) _tmp2_);
#line 371 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_mode (permissions, (guint) 744);
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = permissions;
#line 373 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2392 "vm-configurator.c"
}


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


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	gint res_length1 = 0;
	gint _res_size_ = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	guint8* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	guint8* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 1300 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1301 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1301 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1301 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1302 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1302 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1302 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1302 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 2454 "vm-configurator.c"
	}
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1303 "/usr/share/vala-0.30/vapi/glib-2.0.vapi"
	return result;
#line 2460 "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 380 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 380 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (node_name != NULL, NULL);
#line 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 381 "/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 381 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	xml = _tmp1_;
#line 382 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = xml;
#line 382 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ != NULL) {
#line 2487 "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 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = xml;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = string_get_data (_tmp3_, &_tmp4__length1);
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = _tmp4_;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5__length1 = _tmp4__length1;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = xml;
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = strlen (_tmp6_);
#line 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = _tmp7_;
#line 383 "/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 383 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		reader = _tmp9_;
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = reader;
#line 388 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		xmlTextReaderNext (_tmp10_);
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = reader;
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp12_ = xmlTextReaderExpand (_tmp11_);
#line 390 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		node = _tmp12_;
#line 391 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = node;
#line 391 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp13_ != NULL) {
#line 2535 "vm-configurator.c"
			xmlNode* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp14_ = node;
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp15_ = _tmp14_->name;
#line 393 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp15_, "gnome-boxes") == 0) {
#line 2544 "vm-configurator.c"
				xmlNode* _tmp16_ = NULL;
				xmlNode* _tmp17_ = NULL;
#line 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp16_ = node;
#line 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = _tmp16_->children;
#line 394 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				node = _tmp17_;
#line 2553 "vm-configurator.c"
			}
#line 396 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 2557 "vm-configurator.c"
				xmlNode* _tmp18_ = NULL;
				xmlNode* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
				const gchar* _tmp21_ = NULL;
				xmlNode* _tmp26_ = NULL;
				xmlNode* _tmp27_ = NULL;
#line 396 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = node;
#line 396 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp18_ != NULL)) {
#line 396 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 2570 "vm-configurator.c"
				}
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp19_ = node;
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp20_ = _tmp19_->name;
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = node_name;
#line 397 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp20_, _tmp21_) == 0) {
#line 2580 "vm-configurator.c"
					xmlNode* _tmp22_ = NULL;
					xmlNode* _tmp23_ = NULL;
					const gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp22_ = node;
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp23_ = _tmp22_->children;
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp24_ = _tmp23_->content;
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp25_ = g_strdup (_tmp24_);
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = _tmp25_;
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_xmlFreeTextReader0 (reader);
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (xml);
#line 398 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 2601 "vm-configurator.c"
				}
#line 400 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp26_ = node;
#line 400 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp27_ = _tmp26_->next;
#line 400 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				node = _tmp27_;
#line 2609 "vm-configurator.c"
			}
		}
#line 382 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_xmlFreeTextReader0 (reader);
#line 2614 "vm-configurator.c"
	}
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = node_name;
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp29_ = domain;
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp30_ = gvir_config_domain_get_name (_tmp29_);
#line 405 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_debug ("vm-configurator.vala:405: No XML node %s' for domain '%s'.", _tmp28_, _tmp30_);
#line 407 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = NULL;
#line 407 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (xml);
#line 407 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2630 "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 410 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp1_ != NULL) {
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = TRUE;
#line 2652 "vm-configurator.c"
	} else {
		gboolean _tmp2_ = FALSE;
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = installed;
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = _tmp2_;
#line 2659 "vm-configurator.c"
	}
#line 414 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (_tmp0_);
#line 417 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = installed;
#line 417 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_) {
#line 2667 "vm-configurator.c"
		gchar* _tmp4_ = NULL;
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = g_strdup (BOXES_VM_CONFIGURATOR_INSTALLED_XML);
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 418 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp4_;
#line 2675 "vm-configurator.c"
	} else {
		BoxesInstallerMedia* _tmp5_ = NULL;
#line 419 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = install_media;
#line 419 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, BOXES_TYPE_LIBVIRT_SYSTEM_MEDIA)) {
#line 2682 "vm-configurator.c"
			gchar* _tmp6_ = NULL;
#line 420 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp6_ = g_strdup (BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_XML);
#line 420 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 420 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp6_;
#line 2690 "vm-configurator.c"
		} else {
			BoxesInstallerMedia* _tmp7_ = NULL;
#line 421 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp7_ = install_media;
#line 421 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, BOXES_TYPE_INSTALLED_MEDIA)) {
#line 2697 "vm-configurator.c"
				gchar* _tmp8_ = NULL;
#line 422 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (BOXES_VM_CONFIGURATOR_IMPORT_XML);
#line 422 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 422 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp8_;
#line 2705 "vm-configurator.c"
			} else {
				const gchar* _tmp9_ = NULL;
				BoxesInstallerMedia* _tmp10_ = NULL;
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar* _tmp13_ = NULL;
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = boxes_installer_media_get_live (_tmp10_);
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = _tmp11_;
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp9_ = BOXES_VM_CONFIGURATOR_LIVE_XML;
#line 2722 "vm-configurator.c"
				} else {
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp9_ = BOXES_VM_CONFIGURATOR_INSTALLATION_XML;
#line 2726 "vm-configurator.c"
				}
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp13_ = g_strdup (_tmp9_);
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 424 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp13_;
#line 2734 "vm-configurator.c"
			}
		}
	}
#line 426 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = install_media;
#line 426 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp14_ != NULL) {
#line 2742 "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 427 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp15_ = install_media;
#line 427 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = _tmp15_->os;
#line 427 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp16_ != NULL) {
#line 2759 "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 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp17_ = custom_xml;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp18_ = install_media;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp19_ = _tmp18_->os;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp19_, "id", &_tmp20_, NULL);
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp21_ = _tmp20_;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp22_ = _tmp21_;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp23_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_OS_ID_XML, _tmp22_);
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp24_ = _tmp23_;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp25_ = g_strconcat (_tmp17_, _tmp24_, NULL);
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp25_;
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp24_);
#line 428 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp22_);
#line 2795 "vm-configurator.c"
		}
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = install_media;
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp27_ = _tmp26_->os_media;
#line 429 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (_tmp27_ != NULL) {
#line 2803 "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 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp28_ = custom_xml;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp29_ = install_media;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp30_ = _tmp29_->os_media;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp30_, "id", &_tmp31_, NULL);
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp32_ = _tmp31_;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp33_ = _tmp32_;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp34_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_ID_XML, _tmp33_);
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp35_ = _tmp34_;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp36_ = g_strconcat (_tmp28_, _tmp35_, NULL);
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp36_;
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp35_);
#line 430 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp33_);
#line 2839 "vm-configurator.c"
		}
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp37_ = custom_xml;
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp38_ = install_media;
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp39_ = _tmp38_->device_file;
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp40_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_XML, _tmp39_);
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp41_ = _tmp40_;
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp42_ = g_strconcat (_tmp37_, _tmp41_, NULL);
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp42_;
#line 431 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp41_);
#line 2859 "vm-configurator.c"
	}
#line 434 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp43_ = num_reboots;
#line 434 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp43_ != ((guint) 0)) {
#line 2865 "vm-configurator.c"
		const gchar* _tmp44_ = NULL;
		guint _tmp45_ = 0U;
		gchar* _tmp46_ = NULL;
		gchar* _tmp47_ = NULL;
		gchar* _tmp48_ = NULL;
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp44_ = custom_xml;
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp45_ = num_reboots;
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp46_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_NUM_REBOOTS_XML, _tmp45_);
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp47_ = _tmp46_;
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp48_ = g_strconcat (_tmp44_, _tmp47_, NULL);
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp48_;
#line 435 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp47_);
#line 2887 "vm-configurator.c"
	}
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp49_ = custom_xml;
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp50_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_BOXES_XML, _tmp49_);
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 437 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	custom_xml = _tmp50_;
#line 2897 "vm-configurator.c"
	{
		GVirConfigDomain* _tmp51_ = NULL;
		const gchar* _tmp52_ = NULL;
#line 439 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp51_ = domain;
#line 439 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp52_ = custom_xml;
#line 439 "/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 439 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2909 "vm-configurator.c"
			goto __catch108_g_error;
		}
	}
	goto __finally108;
	__catch108_g_error:
	{
		GError* _error_ = NULL;
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_error_ = _inner_error_;
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_inner_error_ = NULL;
#line 440 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_assert_not_reached ();
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_error_free0 (_error_);
#line 2925 "vm-configurator.c"
	}
	__finally108:
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 438 "/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 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 438 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return;
#line 2938 "vm-configurator.c"
	}
#line 410 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 2942 "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 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_smartcard_passthrough_new ();
#line 444 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	smartcard = _tmp0_;
#line 445 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 445 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp1_;
#line 446 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_smartcard_passthrough_set_source (smartcard, (GVirConfigDomainChardevSource*) vmc);
#line 447 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = domain;
#line 447 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp2_, (GVirConfigDomainDevice*) smartcard);
#line 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 443 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (smartcard);
#line 2972 "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 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 2992 "vm-configurator.c"
	{
		gint i = 0;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		i = 0;
#line 2997 "vm-configurator.c"
		{
			gboolean _tmp0_ = FALSE;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp0_ = TRUE;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 3004 "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 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!_tmp0_) {
#line 3017 "vm-configurator.c"
					gint _tmp1_ = 0;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp1_ = i;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					i = _tmp1_ + 1;
#line 3023 "vm-configurator.c"
				}
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp0_ = FALSE;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp2_ = i;
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp2_ < 4)) {
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 3033 "vm-configurator.c"
				}
#line 453 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = gvir_config_domain_redirdev_new ();
#line 453 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				usb_redir = _tmp3_;
#line 454 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = usb_redir;
#line 454 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_redirdev_set_bus (_tmp4_, GVIR_CONFIG_DOMAIN_REDIRDEV_BUS_USB);
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 455 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				vmc = _tmp5_;
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = usb_redir;
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = vmc;
#line 456 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp6_, (GVirConfigDomainChardevSource*) _tmp7_);
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = domain;
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = usb_redir;
#line 457 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_add_device (_tmp8_, (GVirConfigDomainDevice*) _tmp9_);
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (vmc);
#line 452 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (usb_redir);
#line 3063 "vm-configurator.c"
			}
		}
	}
#line 461 "/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 461 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	master_controller = _tmp10_;
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = domain;
#line 462 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp11_, (GVirConfigDomainDevice*) master_controller);
#line 463 "/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 463 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp12_;
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = controller;
#line 464 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 465 "/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 465 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 465 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp15_;
#line 466 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = domain;
#line 466 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = controller;
#line 466 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp16_, (GVirConfigDomainDevice*) _tmp17_);
#line 467 "/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 467 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 467 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp18_;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = domain;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = controller;
#line 468 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp19_, (GVirConfigDomainDevice*) _tmp20_);
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 450 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (master_controller);
#line 3113 "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 471 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 474 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = bridge;
#line 474 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp0_) {
#line 3129 "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 475 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp1_ = domain;
#line 475 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = gvir_config_domain_get_name (_tmp1_);
#line 475 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:475: Adding bridge network to %s", _tmp2_);
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = gvir_config_domain_interface_bridge_new ();
#line 476 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		bridge_iface = _tmp3_;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = bridge_iface;
#line 477 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_bridge_set_source (_tmp4_, "virbr0");
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = bridge_iface;
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = _g_object_ref0 ((GVirConfigDomainInterface*) _tmp5_);
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 478 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		iface = _tmp6_;
#line 474 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (bridge_iface);
#line 3161 "vm-configurator.c"
	} else {
		GVirConfigDomain* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		GVirConfigDomainInterfaceUser* _tmp9_ = NULL;
#line 480 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = domain;
#line 480 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = gvir_config_domain_get_name (_tmp7_);
#line 480 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:480: Adding user network to %s", _tmp8_);
#line 481 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = gvir_config_domain_interface_user_new ();
#line 481 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 481 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		iface = (GVirConfigDomainInterface*) _tmp9_;
#line 3178 "vm-configurator.c"
	}
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = virtio;
#line 484 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp10_) {
#line 3184 "vm-configurator.c"
		GVirConfigDomainInterface* _tmp11_ = NULL;
#line 485 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = iface;
#line 485 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_set_model (_tmp11_, "virtio");
#line 3190 "vm-configurator.c"
	}
#line 487 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = domain;
#line 487 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = iface;
#line 487 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp12_, (GVirConfigDomainDevice*) _tmp13_);
#line 471 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (iface);
#line 3200 "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 494 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_controller_usb_new ();
#line 494 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp0_;
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = controller;
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = model;
#line 495 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_usb_set_model (_tmp1_, _tmp2_);
#line 496 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = controller;
#line 496 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = index;
#line 496 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_set_index ((GVirConfigDomainController*) _tmp3_, _tmp4_);
#line 497 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = master;
#line 497 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_tmp5_ != NULL) {
#line 3233 "vm-configurator.c"
		GVirConfigDomainControllerUsb* _tmp6_ = NULL;
		GVirConfigDomainControllerUsb* _tmp7_ = NULL;
		guint _tmp8_ = 0U;
#line 498 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = controller;
#line 498 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = master;
#line 498 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = start_port;
#line 498 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_controller_usb_set_master (_tmp6_, _tmp7_, _tmp8_);
#line 3245 "vm-configurator.c"
	}
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = controller;
#line 500 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3251 "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 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 505 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	devices = NULL;
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_get_devices (_tmp0_);
#line 3269 "vm-configurator.c"
	{
		GList* device_collection = NULL;
		GList* device_it = NULL;
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		device_collection = _tmp1_;
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (device_it = device_collection; device_it != NULL; device_it = device_it->next) {
#line 3277 "vm-configurator.c"
			GVirConfigDomainDevice* _tmp2_ = NULL;
			GVirConfigDomainDevice* device = NULL;
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigDomainDevice*) device_it->data);
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			device = _tmp2_;
#line 3284 "vm-configurator.c"
			{
				GVirConfigDomainDevice* _tmp3_ = NULL;
#line 507 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = device;
#line 507 "/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 3291 "vm-configurator.c"
					GVirConfigDomainDevice* _tmp4_ = NULL;
					GVirConfigDomainDevice* _tmp5_ = NULL;
#line 508 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp4_ = device;
#line 508 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp5_ = _g_object_ref0 (_tmp4_);
#line 508 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					devices = g_list_prepend (devices, _tmp5_);
#line 3300 "vm-configurator.c"
				}
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (device);
#line 3304 "vm-configurator.c"
			}
		}
#line 506 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (device_collection);
#line 3309 "vm-configurator.c"
	}
#line 511 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	devices = g_list_reverse (devices);
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = devices;
#line 512 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_devices (_tmp6_, _tmp7_);
#line 504 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (devices);
#line 3321 "vm-configurator.c"
}


static gint __lambda149_ (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 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_a != NULL, 0);
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_b != NULL, 0);
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps_a;
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_name (_tmp2_);
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = _tmp4_;
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp2_);
#line 520 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch_a = _tmp5_;
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = caps_b;
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = gvir_config_capabilities_guest_get_arch (_tmp6_);
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = _tmp7_;
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = gvir_config_capabilities_guest_arch_get_name (_tmp8_);
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = g_strdup (_tmp9_);
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = _tmp10_;
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp8_);
#line 521 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch_b = _tmp11_;
#line 523 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = arch_a;
#line 523 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (g_strcmp0 (_tmp12_, "i686") == 0) {
#line 3382 "vm-configurator.c"
		const gchar* _tmp13_ = NULL;
#line 524 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = arch_b;
#line 524 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp13_, "x86_64") == 0) {
#line 525 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = 1;
#line 525 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 525 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 525 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 3396 "vm-configurator.c"
		} else {
#line 527 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 527 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 527 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 527 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 3406 "vm-configurator.c"
		}
	} else {
		const gchar* _tmp14_ = NULL;
#line 528 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = arch_a;
#line 528 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp14_, "x86_64") == 0) {
#line 529 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 529 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 529 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 529 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 3422 "vm-configurator.c"
		} else {
			gboolean _tmp15_ = FALSE;
			const gchar* _tmp16_ = NULL;
#line 530 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = arch_b;
#line 530 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp16_, "x86_64") == 0) {
#line 530 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = TRUE;
#line 3432 "vm-configurator.c"
			} else {
				const gchar* _tmp17_ = NULL;
#line 530 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = arch_b;
#line 530 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = g_strcmp0 (_tmp17_, "i686") == 0;
#line 3439 "vm-configurator.c"
			}
#line 530 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			if (_tmp15_) {
#line 531 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				result = 1;
#line 531 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 531 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 531 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 3451 "vm-configurator.c"
			} else {
#line 533 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				result = 0;
#line 533 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 533 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 533 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 3461 "vm-configurator.c"
			}
		}
	}
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_b);
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_a);
#line 3469 "vm-configurator.c"
}


static gint ___lambda149__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda149_ ((GVirConfigCapabilitiesGuest*) a, (GVirConfigCapabilitiesGuest*) b);
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3478 "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 515 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 515 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 517 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps;
#line 517 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_get_guests (_tmp0_);
#line 517 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	guests_caps = _tmp1_;
#line 519 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	guests_caps = g_list_sort (guests_caps, ___lambda149__gcompare_func);
#line 537 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	compat_guests_caps = NULL;
#line 538 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = guests_caps;
#line 3510 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 538 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp2_;
#line 538 "/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 3518 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp3_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 538 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp3_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 538 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp3_;
#line 3525 "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 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = guest_caps;
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_get_arch (_tmp4_);
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = _tmp5_;
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = gvir_config_capabilities_guest_arch_get_name (_tmp6_);
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (_tmp7_);
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = _tmp8_;
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_tmp6_);
#line 539 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				guest_arch = _tmp9_;
#line 541 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 541 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = guest_arch;
#line 541 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = boxes_installer_media_is_architecture_compatible (_tmp10_, _tmp11_);
#line 541 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 3561 "vm-configurator.c"
					GVirConfigCapabilitiesGuest* _tmp13_ = NULL;
					GVirConfigCapabilitiesGuest* _tmp14_ = NULL;
#line 542 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp13_ = guest_caps;
#line 542 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_tmp14_ = _g_object_ref0 (_tmp13_);
#line 542 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					compat_guests_caps = g_list_append (compat_guests_caps, _tmp14_);
#line 3570 "vm-configurator.c"
				}
#line 538 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (guest_arch);
#line 538 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3576 "vm-configurator.c"
			}
		}
	}
#line 546 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = compat_guests_caps;
#line 3582 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 546 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp15_;
#line 546 "/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 3590 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp16_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 546 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 546 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp16_;
#line 3597 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp17_ = NULL;
				gboolean _tmp18_ = FALSE;
#line 547 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = guest_caps;
#line 547 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = boxes_vm_configurator_guest_kvm_enabled (_tmp17_);
#line 547 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp18_) {
#line 548 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 548 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 548 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 548 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3615 "vm-configurator.c"
				}
#line 546 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3619 "vm-configurator.c"
			}
		}
	}
#line 551 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = compat_guests_caps;
#line 3625 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 551 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp19_;
#line 551 "/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 3633 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp20_ = NULL;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 551 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp20_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 551 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp20_;
#line 3640 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp21_ = NULL;
				gboolean _tmp22_ = FALSE;
#line 552 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = guest_caps;
#line 552 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp22_ = boxes_vm_configurator_guest_is_qemu (_tmp21_);
#line 552 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp22_) {
#line 553 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 553 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 553 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 553 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3658 "vm-configurator.c"
				}
#line 551 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3662 "vm-configurator.c"
			}
		}
	}
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = _ ("Incapable host system");
#line 557 "/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 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_inner_error_ = _tmp24_;
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_propagate_error (error, _inner_error_);
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3682 "vm-configurator.c"
	} else {
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 557 "/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 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 557 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3694 "vm-configurator.c"
	}
#line 515 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 515 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (guests_caps);
#line 3700 "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 560 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 561 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 561 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 561 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3723 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3731 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_ = NULL;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3738 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_ = NULL;
				GVirConfigDomainVirtType _tmp6_ = 0;
#line 563 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 563 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 563 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_KVM) {
#line 564 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 564 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 564 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 564 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 564 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3758 "vm-configurator.c"
				}
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3762 "vm-configurator.c"
			}
		}
#line 562 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3767 "vm-configurator.c"
	}
#line 566 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 566 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 566 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3775 "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 569 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 570 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 570 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 570 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3798 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3806 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_ = NULL;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3813 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_ = NULL;
				GVirConfigDomainVirtType _tmp6_ = 0;
#line 572 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 572 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 572 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_QEMU) {
#line 573 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 573 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 573 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 573 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 573 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3833 "vm-configurator.c"
				}
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3837 "vm-configurator.c"
			}
		}
#line 571 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3842 "vm-configurator.c"
	}
#line 575 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 575 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 575 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3850 "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 578 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 578 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (feature_name != NULL, FALSE);
#line 579 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	supports = FALSE;
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_features (_tmp0_);
#line 3869 "vm-configurator.c"
	{
		GList* feature_collection = NULL;
		GList* feature_it = NULL;
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		feature_collection = _tmp1_;
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		for (feature_it = feature_collection; feature_it != NULL; feature_it = feature_it->next) {
#line 3877 "vm-configurator.c"
			GVirConfigCapabilitiesGuestFeature* _tmp2_ = NULL;
			GVirConfigCapabilitiesGuestFeature* feature = NULL;
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestFeature*) feature_it->data);
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
			feature = _tmp2_;
#line 3884 "vm-configurator.c"
			{
				const gchar* _tmp3_ = NULL;
				GVirConfigCapabilitiesGuestFeature* _tmp4_ = NULL;
				const gchar* _tmp5_ = NULL;
#line 582 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = feature_name;
#line 582 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = feature;
#line 582 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_feature_get_name (_tmp4_);
#line 582 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
#line 583 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					supports = TRUE;
#line 585 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (feature);
#line 585 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
					break;
#line 3903 "vm-configurator.c"
				}
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (feature);
#line 3907 "vm-configurator.c"
			}
		}
#line 581 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (feature_collection);
#line 3912 "vm-configurator.c"
	}
#line 588 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	result = supports;
#line 588 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3918 "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 3928 "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 3935 "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 3942 "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 3951 "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 3961 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		dest_value->data[0].v_pointer = NULL;
#line 3965 "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 3973 "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 3980 "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 3987 "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 3991 "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 3995 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 3999 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 4003 "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 4014 "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 4020 "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 4024 "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 4028 "vm-configurator.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 4032 "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 4046 "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 4055 "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 4075 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 4079 "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 4085 "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 4104 "vm-configurator.c"
	} else {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 4108 "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 4114 "vm-configurator.c"
	}
}


static void boxes_vm_configurator_class_init (BoxesVMConfiguratorClass * klass) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_parent_class = g_type_class_peek_parent (klass);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	((BoxesVMConfiguratorClass *) klass)->finalize = boxes_vm_configurator_finalize;
#line 4124 "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 4131 "vm-configurator.c"
}


static void boxes_vm_configurator_finalize (BoxesVMConfigurator* obj) {
	BoxesVMConfigurator * self;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_VM_CONFIGURATOR, BoxesVMConfigurator);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/vm-configurator.vala"
	g_signal_handlers_destroy (self);
#line 4141 "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 4166 "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 4179 "vm-configurator.c"
	}
}


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


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



