/* vm-configurator.c generated by valac 0.36.1.38-6532, 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;
enum  {
	BOXES_VM_CONFIGURATOR_DUMMY_PROPERTY,
	BOXES_VM_CONFIGURATOR_LAST_PROPERTY
};
static GParamSpec* boxes_vm_configurator_properties[BOXES_VM_CONFIGURATOR_LAST_PROPERTY];

#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_MEDIA (boxes_libvirt_media_get_type ())
#define BOXES_LIBVIRT_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMedia))
#define BOXES_LIBVIRT_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMediaClass))
#define BOXES_IS_LIBVIRT_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_MEDIA))
#define BOXES_IS_LIBVIRT_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_MEDIA))
#define BOXES_LIBVIRT_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_MEDIA, BoxesLibvirtMediaClass))

typedef struct _BoxesLibvirtMedia BoxesLibvirtMedia;
typedef struct _BoxesLibvirtMediaClass BoxesLibvirtMediaClass;

#define BOXES_TYPE_LIBVIRT_CLONED_MEDIA (boxes_libvirt_cloned_media_get_type ())
#define BOXES_LIBVIRT_CLONED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_LIBVIRT_CLONED_MEDIA, BoxesLibvirtClonedMedia))
#define BOXES_LIBVIRT_CLONED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_LIBVIRT_CLONED_MEDIA, BoxesLibvirtClonedMediaClass))
#define BOXES_IS_LIBVIRT_CLONED_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_LIBVIRT_CLONED_MEDIA))
#define BOXES_IS_LIBVIRT_CLONED_MEDIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_LIBVIRT_CLONED_MEDIA))
#define BOXES_LIBVIRT_CLONED_MEDIA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_LIBVIRT_CLONED_MEDIA, BoxesLibvirtClonedMediaClass))

typedef struct _BoxesLibvirtClonedMedia BoxesLibvirtClonedMedia;
typedef struct _BoxesLibvirtClonedMediaClass BoxesLibvirtClonedMediaClass;
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_;
	GTask* _async_result;
	gboolean _task_complete_;
	GVirConfigDomain* domain;
	GVirConnection* connection;
	GVirConfigDomain* _tmp0_;
	gboolean _tmp1_;
	GVirConfigDomainCpu* cpu;
	GVirConfigDomain* _tmp2_;
	GVirConfigDomainCpu* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	GVirConfigDomainCpu* _tmp6_;
	gboolean _tmp7_;
	GVirConfigDomainCpu* _tmp8_;
	GVirConfigDomainCpuMode _tmp9_;
	GVirConfigDomainCpu* _tmp10_;
	GVirConfigDomainCpuMode _tmp11_;
	GVirConfigDomain* _tmp12_;
	gboolean _tmp13_;
	GVirConfigCapabilities* capabilities;
	GVirConnection* _tmp14_;
	GVirConfigCapabilities* _tmp15_;
	GVirConfigDomain* _tmp16_;
	GVirConfigCapabilities* _tmp17_;
	GError* e;
	GVirConfigDomain* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	GError* _tmp21_;
	const gchar* _tmp22_;
	GList* devices;
	GVirConfigDomainInterface* iface;
	GVirConfigDomainGraphicsSpice* graphics;
	GVirConfigDomainChannel* channel_webdav;
	GVirConfigDomain* _tmp23_;
	GList* _tmp24_;
	GList* device_collection;
	GList* device_it;
	GVirConfigDomainDevice* _tmp25_;
	GVirConfigDomainDevice* device;
	GVirConfigDomainDevice* _tmp26_;
	GVirConfigDomainDevice* _tmp27_;
	GVirConfigDomainInterface* _tmp28_;
	GVirConfigDomainDevice* _tmp29_;
	GVirConfigDomainDevice* _tmp30_;
	GVirConfigDomainGraphicsSpice* _tmp31_;
	GVirConfigDomainDevice* _tmp32_;
	GVirConfigDomainChannel* device_channel;
	GVirConfigDomainDevice* _tmp33_;
	GVirConfigDomainChannel* _tmp34_;
	GVirConfigDomainChannel* _tmp35_;
	const gchar* _tmp36_;
	GVirConfigDomainChannel* _tmp37_;
	GVirConfigDomainChannel* _tmp38_;
	GVirConfigDomainDevice* _tmp39_;
	GVirConfigDomainDevice* _tmp40_;
	GVirConfigDomainDevice* _tmp41_;
	GVirConfigDomainDevice* _tmp42_;
	GVirConfigDomainInterface* _tmp43_;
	gboolean bridge;
	gboolean _tmp44_;
	gboolean virtio;
	GVirConfigDomainInterface* _tmp45_;
	const gchar* _tmp46_;
	GVirConfigDomain* _tmp47_;
	gboolean _tmp48_;
	gboolean _tmp49_;
	GVirConfigDomainInterface* _tmp50_;
	GVirConfigDomainGraphicsSpice* _tmp51_;
	GVirConfigDomainGraphicsSpice* _tmp52_;
	GVirConfigDomainChannel* _tmp53_;
	GVirConfigDomainChannel* _tmp54_;
	GVirConfigDomain* _tmp55_;
	GList* _tmp56_;
	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;
#define BOXES_VM_CONFIGURATOR_BOXES_NS "boxes"
#define BOXES_VM_CONFIGURATOR_BOXES_NS_URI PACKAGE_URL
#define BOXES_VM_CONFIGURATOR_BOXES_OLD_NS_URI "http://live.gnome.org/Boxes/"
#define BOXES_VM_CONFIGURATOR_WEBDAV_CHANNEL_URI "org.spice-space.webdav.0"
#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_LIBVIRT_CLONING_STATE "libvirt-cloning"
#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_LIBVIRT_CLONING_XML "<os-state>" BOXES_VM_CONFIGURATOR_LIBVIRT_CLONING_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);
GVirConfigDomainGraphicsSpice* boxes_vm_configurator_create_graphics_device (void);
GVirConfigDomainChannel* boxes_vm_configurator_create_webdav_channel (void);
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);
GVirConfigDomainInterface* boxes_vm_configurator_create_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_libvirt_cloning_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 gboolean boxes_vm_configurator_boxes_created_domain (GVirConfigDomain* domain);
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 inline 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_media_get_type (void) G_GNUC_CONST;
GType boxes_libvirt_cloned_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);
static gint __lambda24_ (GVirConfigCapabilitiesGuest* caps_a, GVirConfigCapabilitiesGuest* caps_b);
static gint ___lambda24__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 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	return g_quark_from_static_string ("boxes_vm_configurator_error-quark");
#line 353 "vm-configurator.c"
}


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


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


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


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 1403 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1403 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1404 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1404 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1404 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1404 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 424 "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_;
	BoxesInstallerMedia* _tmp1_;
	GVirConfigCapabilitiesGuest* best_caps = NULL;
	GVirConfigCapabilities* _tmp2_;
	BoxesInstallerMedia* _tmp3_;
	GVirConfigCapabilitiesGuest* _tmp4_;
	BoxesInstallerMedia* _tmp5_;
	OsinfoResources* _tmp6_;
	gint64 _tmp7_;
	gint64 _tmp8_;
	GVirConfigCapabilities* _tmp9_;
	GVirConfigDomainVirtType _tmp10_ = 0;
	gboolean _tmp11_;
	GVirConfigDomainVirtType virt_type = 0;
	GVirConfigDomainVirtType _tmp12_;
	BoxesInstallerMedia* _tmp13_;
	gchar** features = NULL;
	gchar** _tmp14_;
	gint features_length1;
	gint _features_size_;
	gboolean _tmp15_;
	gboolean _tmp18_;
	gboolean _tmp21_;
	gchar** _tmp24_;
	gint _tmp24__length1;
	GVirConfigDomainClock* clock = NULL;
	GVirConfigDomainClock* _tmp25_;
	gboolean _tmp26_ = FALSE;
	BoxesInstallerMedia* _tmp27_;
	OsinfoOs* _tmp28_;
	GVirConfigDomainTimer* timer = NULL;
	GVirConfigDomainTimerRtc* _tmp36_;
	GVirConfigDomainTimer* _tmp37_;
	GVirConfigDomainClock* _tmp38_;
	GVirConfigDomainTimer* _tmp39_;
	GVirConfigDomainTimerPit* _tmp40_;
	GVirConfigDomainTimer* _tmp41_;
	GVirConfigDomainClock* _tmp42_;
	GVirConfigDomainTimer* _tmp43_;
	GVirConfigDomainTimerHpet* _tmp44_;
	GVirConfigDomainTimer* _tmp45_;
	GVirConfigDomainClock* _tmp46_;
	GVirConfigDomainTimer* _tmp47_;
	GVirConfigDomainClock* _tmp48_;
	const gchar* _tmp49_;
	BoxesInstallerMedia* _tmp50_;
	BoxesInstallerMedia* _tmp51_;
	GVirConfigDomainGraphicsSpice* graphics = NULL;
	GVirConfigDomainGraphicsSpice* _tmp52_;
	GVirConfigDomainGraphicsSpice* _tmp53_;
	GVirConfigDomainChannel* channel = NULL;
	GVirConfigDomainChannel* _tmp54_;
	GVirConfigDomainChannel* _tmp55_;
	GVirConfigDomainChannel* _tmp56_;
	GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp57_;
	GVirConfigDomainChannel* _tmp58_;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp59_;
	GVirConfigDomainChannel* _tmp60_;
	GVirConfigDomainChannel* webdav_channel = NULL;
	GVirConfigDomainChannel* _tmp61_;
	GVirConfigDomainChannel* _tmp62_;
	BoxesInstallerMedia* _tmp63_;
	BoxesInstallerMedia* _tmp64_;
	BoxesInstallerMedia* _tmp65_;
	BoxesInstallerMedia* _tmp66_;
	BoxesInstallerMedia* _tmp67_;
	GVirConfigDomainPowerManagement* pm = NULL;
	GVirConfigDomainPowerManagement* _tmp68_;
	GVirConfigDomainPowerManagement* _tmp69_;
	GVirConfigDomainPowerManagement* _tmp70_;
	GVirConfigDomainPowerManagement* _tmp71_;
	GVirConfigDomainConsole* console = NULL;
	GVirConfigDomainConsole* _tmp72_;
	GVirConfigDomainConsole* _tmp73_;
	GVirConfigDomainChardevSourcePty* _tmp74_;
	GVirConfigDomainChardevSourcePty* _tmp75_;
	GVirConfigDomainConsole* _tmp76_;
	GVirConfigDomainInterface* iface = NULL;
	gboolean _tmp77_;
	BoxesInstallerMedia* _tmp78_;
	gboolean _tmp79_;
	gboolean _tmp80_;
	GVirConfigDomainInterface* _tmp81_;
	GVirConfigDomainInterface* _tmp82_;
	GError * _inner_error_ = NULL;
#line 34 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 34 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (target_path != NULL, NULL);
#line 34 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 36 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_new ();
#line 36 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	domain = _tmp0_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 38 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_setup_custom_xml (domain, _tmp1_);
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = caps;
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = install_media;
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_best_guest_caps (_tmp2_, _tmp3_, &_inner_error_);
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	best_caps = _tmp4_;
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			g_propagate_error (error, _inner_error_);
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (domain);
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return NULL;
#line 549 "vm-configurator.c"
		} else {
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (domain);
#line 40 "/home/fborges/checkout/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 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			g_clear_error (&_inner_error_);
#line 40 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return NULL;
#line 559 "vm-configurator.c"
		}
	}
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = install_media;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_->resources;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = osinfo_resources_get_ram (_tmp6_);
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = _tmp7_;
#line 41 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_memory (domain, (guint64) (_tmp8_ / OSINFO_KIBIBYTES));
#line 42 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = caps;
#line 42 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_cpu_config (domain, _tmp9_);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = boxes_vm_configurator_guest_kvm_enabled (best_caps);
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp11_) {
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = GVIR_CONFIG_DOMAIN_VIRT_KVM;
#line 582 "vm-configurator.c"
	} else {
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = GVIR_CONFIG_DOMAIN_VIRT_QEMU;
#line 586 "vm-configurator.c"
	}
#line 44 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	virt_type = _tmp10_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = virt_type;
#line 45 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_virt_type (domain, _tmp12_);
#line 47 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = install_media;
#line 47 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_os_config (domain, _tmp13_, best_caps);
#line 49 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = g_new0 (gchar*, 0 + 1);
#line 49 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	features = _tmp14_;
#line 49 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	features_length1 = 0;
#line 49 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_features_size_ = features_length1;
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = boxes_vm_configurator_guest_supports_feature (best_caps, "acpi");
#line 50 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp15_) {
#line 610 "vm-configurator.c"
		gchar** _tmp16_;
		gint _tmp16__length1;
		gchar* _tmp17_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = features;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp16__length1 = features_length1;
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp17_ = g_strdup ("acpi");
#line 51 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_vala_array_add12 (&features, &features_length1, &_features_size_, _tmp17_);
#line 622 "vm-configurator.c"
	}
#line 52 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp18_ = boxes_vm_configurator_guest_supports_feature (best_caps, "apic");
#line 52 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp18_) {
#line 628 "vm-configurator.c"
		gchar** _tmp19_;
		gint _tmp19__length1;
		gchar* _tmp20_;
#line 53 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp19_ = features;
#line 53 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp19__length1 = features_length1;
#line 53 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp20_ = g_strdup ("apic");
#line 53 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_vala_array_add13 (&features, &features_length1, &_features_size_, _tmp20_);
#line 640 "vm-configurator.c"
	}
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp21_ = boxes_vm_configurator_guest_supports_feature (best_caps, "pae");
#line 54 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp21_) {
#line 646 "vm-configurator.c"
		gchar** _tmp22_;
		gint _tmp22__length1;
		gchar* _tmp23_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp22_ = features;
#line 55 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp22__length1 = features_length1;
#line 55 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp23_ = g_strdup ("pae");
#line 55 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_vala_array_add14 (&features, &features_length1, &_features_size_, _tmp23_);
#line 658 "vm-configurator.c"
	}
#line 56 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = features;
#line 56 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp24__length1 = features_length1;
#line 56 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_features (domain, _tmp24_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp25_ = gvir_config_domain_clock_new ();
#line 58 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	clock = _tmp25_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp27_ = install_media;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = _tmp27_->os;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp28_ != NULL) {
#line 676 "vm-configurator.c"
		BoxesInstallerMedia* _tmp29_;
		OsinfoOs* _tmp30_;
		const gchar* _tmp31_;
		const gchar* _tmp32_;
		gboolean _tmp33_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp29_ = install_media;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp30_ = _tmp29_->os;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp31_ = osinfo_product_get_short_id ((OsinfoProduct*) _tmp30_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp32_ = _tmp31_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp33_ = string_contains (_tmp32_, "win");
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = _tmp33_;
#line 694 "vm-configurator.c"
	} else {
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp26_ = FALSE;
#line 698 "vm-configurator.c"
	}
#line 59 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp26_) {
#line 702 "vm-configurator.c"
		GVirConfigDomainClock* _tmp34_;
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp34_ = clock;
#line 60 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_clock_set_offset (_tmp34_, GVIR_CONFIG_DOMAIN_CLOCK_LOCALTIME);
#line 708 "vm-configurator.c"
	} else {
		GVirConfigDomainClock* _tmp35_;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp35_ = clock;
#line 62 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_clock_set_offset (_tmp35_, GVIR_CONFIG_DOMAIN_CLOCK_UTC);
#line 715 "vm-configurator.c"
	}
#line 64 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp36_ = gvir_config_domain_timer_rtc_new ();
#line 64 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	timer = (GVirConfigDomainTimer*) _tmp36_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp37_ = timer;
#line 65 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_timer_set_tick_policy (_tmp37_, GVIR_CONFIG_DOMAIN_TIMER_TICK_POLICY_CATCHUP);
#line 66 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp38_ = clock;
#line 66 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp39_ = timer;
#line 66 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_clock_add_timer (_tmp38_, _tmp39_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp40_ = gvir_config_domain_timer_pit_new ();
#line 67 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 67 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	timer = (GVirConfigDomainTimer*) _tmp40_;
#line 68 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp41_ = timer;
#line 68 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_timer_set_tick_policy (_tmp41_, GVIR_CONFIG_DOMAIN_TIMER_TICK_POLICY_DELAY);
#line 69 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp42_ = clock;
#line 69 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp43_ = timer;
#line 69 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_clock_add_timer (_tmp42_, _tmp43_);
#line 70 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp44_ = gvir_config_domain_timer_hpet_new ();
#line 70 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 70 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	timer = (GVirConfigDomainTimer*) _tmp44_;
#line 71 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp45_ = timer;
#line 71 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_timer_set_present (_tmp45_, FALSE);
#line 72 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp46_ = clock;
#line 72 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp47_ = timer;
#line 72 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_clock_add_timer (_tmp46_, _tmp47_);
#line 73 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp48_ = clock;
#line 73 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_clock (domain, _tmp48_);
#line 75 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp49_ = target_path;
#line 75 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp50_ = install_media;
#line 75 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_target_media_config (domain, _tmp49_, _tmp50_, (guint8) 0);
#line 76 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp51_ = install_media;
#line 76 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_setup_domain_config (_tmp51_, domain);
#line 78 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp52_ = boxes_vm_configurator_create_graphics_device ();
#line 78 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	graphics = _tmp52_;
#line 79 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp53_ = graphics;
#line 79 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp53_);
#line 82 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp54_ = gvir_config_domain_channel_new ();
#line 82 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	channel = _tmp54_;
#line 83 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp55_ = channel;
#line 83 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_type (_tmp55_, GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO);
#line 84 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp56_ = channel;
#line 84 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_name (_tmp56_, "com.redhat.spice.0");
#line 85 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp57_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 85 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp57_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp58_ = channel;
#line 86 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp59_ = vmc;
#line 86 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp58_, (GVirConfigDomainChardevSource*) _tmp59_);
#line 87 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp60_ = channel;
#line 87 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp60_);
#line 90 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp61_ = boxes_vm_configurator_create_webdav_channel ();
#line 90 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	webdav_channel = _tmp61_;
#line 91 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp62_ = webdav_channel;
#line 91 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp62_);
#line 93 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_add_usb_support (domain);
#line 94 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_add_smartcard_support (domain);
#line 96 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp63_ = install_media;
#line 96 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_video_config (domain, _tmp63_);
#line 97 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp64_ = install_media;
#line 97 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_sound_config (domain, _tmp64_);
#line 98 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp65_ = install_media;
#line 98 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_tablet_config (domain, _tmp65_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp66_ = install_media;
#line 99 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_mouse_config (domain, _tmp66_);
#line 100 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp67_ = install_media;
#line 100 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_keyboard_config (domain, _tmp67_);
#line 102 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (domain, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_POWEROFF, GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY);
#line 103 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (domain, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_REBOOT, GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY);
#line 104 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (domain, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_CRASH, GVIR_CONFIG_DOMAIN_LIFECYCLE_DESTROY);
#line 106 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp68_ = gvir_config_domain_power_management_new ();
#line 106 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	pm = _tmp68_;
#line 108 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp69_ = pm;
#line 108 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_power_management_set_mem_suspend_enabled (_tmp69_, FALSE);
#line 109 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp70_ = pm;
#line 109 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_power_management_set_disk_suspend_enabled (_tmp70_, FALSE);
#line 110 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp71_ = pm;
#line 110 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_power_management (domain, _tmp71_);
#line 111 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp72_ = gvir_config_domain_console_new ();
#line 111 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	console = _tmp72_;
#line 112 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp73_ = console;
#line 112 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp74_ = gvir_config_domain_chardev_source_pty_new ();
#line 112 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp75_ = _tmp74_;
#line 112 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp73_, (GVirConfigDomainChardevSource*) _tmp75_);
#line 112 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp75_);
#line 113 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp76_ = console;
#line 113 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp76_);
#line 115 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp77_ = boxes_is_libvirt_bridge_net_available ();
#line 115 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp78_ = install_media;
#line 115 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp79_ = boxes_installer_media_get_supports_virtio_net (_tmp78_);
#line 115 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp80_ = _tmp79_;
#line 115 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp81_ = boxes_vm_configurator_create_network_interface (domain, _tmp77_, _tmp80_);
#line 115 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	iface = _tmp81_;
#line 118 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp82_ = iface;
#line 118 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (domain, (GVirConfigDomainDevice*) _tmp82_);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = domain;
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (iface);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (console);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (pm);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (webdav_channel);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (channel);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (graphics);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (timer);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (clock);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	features = (_vala_array_free (features, features_length1, (GDestroyNotify) g_free), NULL);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (best_caps);
#line 120 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 925 "vm-configurator.c"
}


void boxes_vm_configurator_post_install_setup (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomain* _tmp0_;
	GVirConfigDomain* _tmp1_;
	BoxesInstallerMedia* _tmp2_;
	GVirConfigDomain* _tmp5_;
	BoxesInstallerMedia* _tmp6_;
#line 123 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 124 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 124 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_set_post_install_os_config (_tmp0_);
#line 125 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 125 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_lifecycle (_tmp1_, GVIR_CONFIG_DOMAIN_LIFECYCLE_ON_REBOOT, GVIR_CONFIG_DOMAIN_LIFECYCLE_RESTART);
#line 127 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = install_media;
#line 127 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ != NULL) {
#line 949 "vm-configurator.c"
		BoxesInstallerMedia* _tmp3_;
		GVirConfigDomain* _tmp4_;
#line 128 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = install_media;
#line 128 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = domain;
#line 128 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		boxes_installer_media_setup_post_install_domain_config (_tmp3_, _tmp4_);
#line 958 "vm-configurator.c"
	}
#line 130 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 130 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = install_media;
#line 130 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_mark_as_installed (_tmp5_, _tmp6_);
#line 966 "vm-configurator.c"
}


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


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


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


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


gboolean boxes_vm_configurator_is_libvirt_cloning_config (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
#line 149 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_LIBVIRT_CLONING_STATE) == 0;
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 150 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1096 "vm-configurator.c"
}


gboolean boxes_vm_configurator_is_boxes_installed (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	GVirConfigDomain* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
#line 153 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_os_state (_tmp0_);
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = g_strcmp0 (_tmp2_, BOXES_VM_CONFIGURATOR_INSTALLED_STATE) == 0;
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (_tmp2_);
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = _tmp3_;
#line 154 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1122 "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_;
	const gchar* _tmp1_;
	gint64 _tmp2_;
	GVirConfigStorageVolTarget* target = NULL;
	GVirConfigStorageVolTarget* _tmp3_;
	GVirConfigStoragePermissions* permissions = NULL;
	GVirConfigStoragePermissions* _tmp4_;
#line 157 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 158 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_vol_new ();
#line 158 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	volume = _tmp0_;
#line 159 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = name;
#line 159 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_name (volume, _tmp1_);
#line 160 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = storage;
#line 160 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_capacity (volume, (guint64) _tmp2_);
#line 161 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_storage_vol_target_new ();
#line 161 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	target = _tmp3_;
#line 162 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_target_set_format (target, "qcow2");
#line 163 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_default_permissions ();
#line 163 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp4_;
#line 164 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_target_set_permissions (target, permissions);
#line 165 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_vol_set_target (volume, target);
#line 167 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = volume;
#line 167 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (permissions);
#line 167 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (target);
#line 167 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1172 "vm-configurator.c"
}


GVirConfigStoragePool* boxes_vm_configurator_get_pool_config (GError** error) {
	GVirConfigStoragePool* result = NULL;
	gchar* pool_path = NULL;
	gchar* _tmp0_;
	GVirConfigStoragePool* pool = NULL;
	GVirConfigStoragePool* _tmp1_;
	GVirConfigStoragePoolSource* source = NULL;
	GVirConfigStoragePoolSource* _tmp2_;
	GVirConfigStoragePoolTarget* target = NULL;
	GVirConfigStoragePoolTarget* _tmp3_;
	GVirConfigStoragePermissions* permissions = NULL;
	GVirConfigStoragePermissions* _tmp4_;
#line 171 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = boxes_get_user_pkgdata ("images");
#line 171 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	pool_path = _tmp0_;
#line 173 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_storage_pool_new ();
#line 173 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	pool = _tmp1_;
#line 174 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_pool_type (pool, GVIR_CONFIG_STORAGE_POOL_TYPE_DIR);
#line 175 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_name (pool, PACKAGE_TARNAME);
#line 177 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_storage_pool_source_new ();
#line 177 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	source = _tmp2_;
#line 178 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_source_set_directory (source, pool_path);
#line 179 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_source (pool, source);
#line 181 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_storage_pool_target_new ();
#line 181 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	target = _tmp3_;
#line 182 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_target_set_path (target, pool_path);
#line 183 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = boxes_vm_configurator_get_default_permissions ();
#line 183 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp4_;
#line 184 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_target_set_permissions (target, permissions);
#line 185 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_pool_set_target (pool, target);
#line 187 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = pool;
#line 187 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (permissions);
#line 187 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (target);
#line 187 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (source);
#line 187 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (pool_path);
#line 187 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1234 "vm-configurator.c"
}


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


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


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


guint boxes_vm_configurator_get_num_reboots (GVirConfigDomain* domain) {
	guint result = 0U;
	gchar* str = NULL;
	GVirConfigDomain* _tmp0_;
	gchar* _tmp1_;
	gint _tmp2_ = 0;
	const gchar* _tmp3_;
#line 202 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, 0U);
#line 203 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 203 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = boxes_vm_configurator_get_custom_xml_node (_tmp0_, "num-reboots");
#line 203 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	str = _tmp1_;
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = str;
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_ != NULL) {
#line 1311 "vm-configurator.c"
		const gchar* _tmp4_;
		gint _tmp5_;
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = str;
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = atoi (_tmp4_);
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = _tmp5_;
#line 1320 "vm-configurator.c"
	} else {
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = 0;
#line 1324 "vm-configurator.c"
	}
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = (guint) _tmp2_;
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (str);
#line 204 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 1332 "vm-configurator.c"
}


void boxes_vm_configurator_set_num_reboots (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, guint num_reboots) {
	GVirConfigDomain* _tmp0_;
	BoxesInstallerMedia* _tmp1_;
	guint _tmp2_;
#line 207 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 207 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 208 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 208 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 208 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = num_reboots;
#line 208 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_vm_configurator_update_custom_xml (_tmp0_, _tmp1_, _tmp2_, FALSE);
#line 1352 "vm-configurator.c"
}


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


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


static void boxes_vm_configurator_set_cpu_config (GVirConfigDomain* domain, GVirConfigCapabilities* caps) {
	GVirConfigCapabilitiesCpu* cpu_caps = NULL;
	GVirConfigCapabilities* _tmp0_;
	GVirConfigCapabilitiesHost* _tmp1_;
	GVirConfigCapabilitiesHost* _tmp2_;
	GVirConfigCapabilitiesCpu* _tmp3_;
	GVirConfigCapabilitiesCpu* _tmp4_;
	GVirConfigCapabilitiesCpuTopology* topology = NULL;
	GVirConfigCapabilitiesCpu* _tmp5_;
	GVirConfigCapabilitiesCpuTopology* _tmp6_;
	GVirConfigCapabilitiesCpuTopology* _tmp7_;
	GVirConfigDomain* _tmp8_;
	GVirConfigCapabilitiesCpuTopology* _tmp9_;
	guint64 _tmp10_;
	GVirConfigCapabilitiesCpuTopology* _tmp11_;
	guint64 _tmp12_;
	GVirConfigCapabilitiesCpuTopology* _tmp13_;
	guint64 _tmp14_;
	GVirConfigDomainCpu* cpu = NULL;
	GVirConfigDomainCpu* _tmp15_;
	GVirConfigDomainCpu* _tmp16_;
	GVirConfigDomainCpu* _tmp17_;
	GVirConfigCapabilitiesCpuTopology* _tmp18_;
	GVirConfigCapabilitiesCpuModel* model_caps = NULL;
	GVirConfigCapabilitiesCpu* _tmp19_;
	GVirConfigCapabilitiesCpuModel* _tmp20_;
	GVirConfigDomainCpuModel* model = NULL;
	GVirConfigDomainCpuModel* _tmp21_;
	GVirConfigDomainCpuModel* _tmp22_;
	GVirConfigCapabilitiesCpuModel* _tmp23_;
	const gchar* _tmp24_;
	GVirConfigDomainCpu* _tmp25_;
	GVirConfigDomainCpuModel* _tmp26_;
	GVirConfigDomain* _tmp27_;
	GVirConfigDomainCpu* _tmp28_;
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (caps != NULL);
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps;
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_get_host (_tmp0_);
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_host_get_cpu (_tmp2_);
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp2_);
#line 220 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	cpu_caps = _tmp4_;
#line 221 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = cpu_caps;
#line 221 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = gvir_config_capabilities_cpu_get_topology (_tmp5_);
#line 221 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	topology = _tmp6_;
#line 223 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = topology;
#line 223 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp7_ == NULL) {
#line 224 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (topology);
#line 224 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (cpu_caps);
#line 224 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return;
#line 1457 "vm-configurator.c"
	}
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = domain;
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = topology;
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = gvir_config_capabilities_cpu_topology_get_sockets (_tmp9_);
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = topology;
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = gvir_config_capabilities_cpu_topology_get_cores (_tmp11_);
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = topology;
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = gvir_config_capabilities_cpu_topology_get_threads (_tmp13_);
#line 226 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_object_set (_tmp8_, "vcpu", (_tmp10_ * _tmp12_) * _tmp14_, NULL);
#line 228 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = gvir_config_domain_cpu_new ();
#line 228 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	cpu = _tmp15_;
#line 231 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = cpu;
#line 231 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_cpu_set_mode (_tmp16_, GVIR_CONFIG_DOMAIN_CPU_MODE_CUSTOM);
#line 232 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = cpu;
#line 232 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp18_ = topology;
#line 232 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_capabilities_cpu_set_topology ((GVirConfigCapabilitiesCpu*) _tmp17_, _tmp18_);
#line 234 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = cpu_caps;
#line 234 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = gvir_config_capabilities_cpu_get_model (_tmp19_);
#line 234 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	model_caps = _tmp20_;
#line 235 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp21_ = gvir_config_domain_cpu_model_new ();
#line 235 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	model = _tmp21_;
#line 236 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp22_ = model;
#line 236 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = model_caps;
#line 236 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = gvir_config_capabilities_cpu_model_get_name (_tmp23_);
#line 236 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_capabilities_cpu_model_set_name ((GVirConfigCapabilitiesCpuModel*) _tmp22_, _tmp24_);
#line 237 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp25_ = cpu;
#line 237 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp26_ = model;
#line 237 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_cpu_set_model (_tmp25_, _tmp26_);
#line 239 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp27_ = domain;
#line 239 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp28_ = cpu;
#line 239 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_cpu (_tmp27_, _tmp28_);
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (model);
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (model_caps);
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (cpu);
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (topology);
#line 219 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (cpu_caps);
#line 1529 "vm-configurator.c"
}


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


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


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


void boxes_vm_configurator_update_existing_domain_finish (GAsyncResult* _res_) {
	BoxesVmConfiguratorUpdateExistingDomainData* _data_;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_task_complete_ = TRUE;
#line 1599 "vm-configurator.c"
}


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


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


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 1629 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_update_existing_domain_co (BoxesVmConfiguratorUpdateExistingDomainData* _data_) {
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	switch (_data_->_state_) {
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		case 0:
#line 1638 "vm-configurator.c"
		goto _state_0;
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		case 1:
#line 1642 "vm-configurator.c"
		goto _state_1;
		default:
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_assert_not_reached ();
#line 1647 "vm-configurator.c"
	}
	_state_0:
#line 244 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp0_ = _data_->domain;
#line 244 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp1_ = boxes_vm_configurator_boxes_created_domain (_data_->_tmp0_);
#line 244 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (!_data_->_tmp1_) {
#line 245 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 245 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_state_ != 0) {
#line 245 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			while (_data_->_task_complete_ != TRUE) {
#line 245 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1664 "vm-configurator.c"
			}
		}
#line 245 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_object_unref (_data_->_async_result);
#line 245 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return FALSE;
#line 1671 "vm-configurator.c"
	}
	{
#line 248 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp2_ = _data_->domain;
#line 248 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp3_ = gvir_config_domain_get_cpu (_data_->_tmp2_);
#line 248 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->cpu = _data_->_tmp3_;
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp6_ = _data_->cpu;
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_tmp6_ != NULL) {
#line 250 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp8_ = _data_->cpu;
#line 250 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp9_ = gvir_config_domain_cpu_get_mode (_data_->_tmp8_);
#line 250 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			if (_data_->_tmp9_ == GVIR_CONFIG_DOMAIN_CPU_MODE_HOST_PASSTHROUGH) {
#line 250 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp7_ = TRUE;
#line 1692 "vm-configurator.c"
			} else {
#line 251 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp10_ = _data_->cpu;
#line 251 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp11_ = gvir_config_domain_cpu_get_mode (_data_->_tmp10_);
#line 251 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp7_ = _data_->_tmp11_ == GVIR_CONFIG_DOMAIN_CPU_MODE_HOST_MODEL;
#line 1700 "vm-configurator.c"
			}
#line 250 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp5_ = _data_->_tmp7_;
#line 1704 "vm-configurator.c"
		} else {
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp5_ = FALSE;
#line 1708 "vm-configurator.c"
		}
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_tmp5_) {
#line 252 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp12_ = _data_->domain;
#line 252 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp13_ = boxes_vm_configurator_is_boxes_installed (_data_->_tmp12_);
#line 252 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp4_ = _data_->_tmp13_;
#line 1718 "vm-configurator.c"
		} else {
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp4_ = FALSE;
#line 1722 "vm-configurator.c"
		}
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_data_->_tmp4_) {
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp14_ = _data_->connection;
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_state_ = 1;
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			gvir_connection_get_capabilities_async (_data_->_tmp14_, NULL, boxes_vm_configurator_update_existing_domain_ready, _data_);
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return FALSE;
#line 1734 "vm-configurator.c"
			_state_1:
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp15_ = gvir_connection_get_capabilities_finish (_data_->_tmp14_, _data_->_res_, &_data_->_inner_error_);
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->capabilities = _data_->_tmp15_;
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 253 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_data_->cpu);
#line 1744 "vm-configurator.c"
				goto __catch116_g_error;
			}
#line 254 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp16_ = _data_->domain;
#line 254 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp17_ = _data_->capabilities;
#line 254 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			boxes_vm_configurator_set_cpu_config (_data_->_tmp16_, _data_->_tmp17_);
#line 249 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_object_unref0 (_data_->capabilities);
#line 1755 "vm-configurator.c"
		}
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (_data_->cpu);
#line 1759 "vm-configurator.c"
	}
	goto __finally116;
	__catch116_g_error:
	{
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->e = _data_->_inner_error_;
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_inner_error_ = NULL;
#line 257 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp18_ = _data_->domain;
#line 257 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp19_ = gvir_config_domain_get_name (_data_->_tmp18_);
#line 257 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp20_ = _data_->_tmp19_;
#line 257 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp21_ = _data_->e;
#line 257 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp22_ = _data_->_tmp21_->message;
#line 257 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_warning ("vm-configurator.vala:257: Failed to update CPU config for '%s': %s", _data_->_tmp20_, _data_->_tmp22_);
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_error_free0 (_data_->e);
#line 1782 "vm-configurator.c"
	}
	__finally116:
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 247 "/home/fborges/checkout/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 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_data_->_inner_error_);
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_object_unref (_data_->_async_result);
#line 247 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return FALSE;
#line 1795 "vm-configurator.c"
	}
#line 261 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->devices = NULL;
#line 262 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->iface = NULL;
#line 263 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->graphics = NULL;
#line 264 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->channel_webdav = NULL;
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp23_ = _data_->domain;
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp24_ = gvir_config_domain_get_devices (_data_->_tmp23_);
#line 1809 "vm-configurator.c"
	{
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->device_collection = _data_->_tmp24_;
#line 265 "/home/fborges/checkout/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 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->_tmp25_ = _g_object_ref0 ((GVirConfigDomainDevice*) _data_->device_it->data);
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_data_->device = _data_->_tmp25_;
#line 1819 "vm-configurator.c"
			{
#line 266 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_data_->_tmp26_ = _data_->device;
#line 266 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp26_, gvir_config_domain_interface_get_type ())) {
#line 267 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp27_ = _data_->device;
#line 267 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp28_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp27_, gvir_config_domain_interface_get_type ()) ? ((GVirConfigDomainInterface*) _data_->_tmp27_) : NULL);
#line 267 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (_data_->iface);
#line 267 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_data_->iface = _data_->_tmp28_;
#line 1833 "vm-configurator.c"
				} else {
#line 268 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_data_->_tmp29_ = _data_->device;
#line 268 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp29_, gvir_config_domain_graphics_spice_get_type ())) {
#line 269 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_data_->_tmp30_ = _data_->device;
#line 269 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_data_->_tmp31_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp30_, gvir_config_domain_graphics_spice_get_type ()) ? ((GVirConfigDomainGraphicsSpice*) _data_->_tmp30_) : NULL);
#line 269 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_g_object_unref0 (_data_->graphics);
#line 269 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_data_->graphics = _data_->_tmp31_;
#line 1847 "vm-configurator.c"
					} else {
#line 270 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_data_->_tmp32_ = _data_->device;
#line 270 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp32_, gvir_config_domain_channel_get_type ())) {
#line 271 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp33_ = _data_->device;
#line 271 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp34_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp33_, gvir_config_domain_channel_get_type ()) ? ((GVirConfigDomainChannel*) _data_->_tmp33_) : NULL);
#line 271 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->device_channel = _data_->_tmp34_;
#line 272 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp35_ = _data_->device_channel;
#line 272 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp36_ = gvir_config_domain_channel_get_target_name (_data_->_tmp35_);
#line 272 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							if (g_strcmp0 (_data_->_tmp36_, BOXES_VM_CONFIGURATOR_WEBDAV_CHANNEL_URI) == 0) {
#line 273 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
								_data_->_tmp37_ = _data_->device_channel;
#line 273 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
								_data_->_tmp38_ = _g_object_ref0 (_data_->_tmp37_);
#line 273 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
								_g_object_unref0 (_data_->channel_webdav);
#line 273 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
								_data_->channel_webdav = _data_->_tmp38_;
#line 1873 "vm-configurator.c"
							}
#line 274 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp39_ = _data_->device;
#line 274 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp40_ = _g_object_ref0 (_data_->_tmp39_);
#line 274 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->devices = g_list_prepend (_data_->devices, _data_->_tmp40_);
#line 270 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_g_object_unref0 (_data_->device_channel);
#line 1883 "vm-configurator.c"
						} else {
#line 277 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp41_ = _data_->device;
#line 277 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->_tmp42_ = _g_object_ref0 (_data_->_tmp41_);
#line 277 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
							_data_->devices = g_list_prepend (_data_->devices, _data_->_tmp42_);
#line 1891 "vm-configurator.c"
						}
					}
				}
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_data_->device);
#line 1897 "vm-configurator.c"
			}
		}
#line 265 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (_data_->device_collection);
#line 1902 "vm-configurator.c"
	}
#line 281 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp43_ = _data_->iface;
#line 281 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_data_->_tmp43_ != NULL) {
#line 282 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp44_ = boxes_is_libvirt_bridge_net_available ();
#line 282 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->bridge = _data_->_tmp44_;
#line 283 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp45_ = _data_->iface;
#line 283 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp46_ = gvir_config_domain_interface_get_model (_data_->_tmp45_);
#line 283 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->virtio = g_strcmp0 (_data_->_tmp46_, "virtio") == 0;
#line 285 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp47_ = _data_->domain;
#line 285 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp48_ = _data_->bridge;
#line 285 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp49_ = _data_->virtio;
#line 285 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp50_ = boxes_vm_configurator_create_network_interface (_data_->_tmp47_, _data_->_tmp48_, _data_->_tmp49_);
#line 285 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->devices = g_list_prepend (_data_->devices, (GVirConfigDomainDevice*) _data_->_tmp50_);
#line 1928 "vm-configurator.c"
	}
#line 288 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp51_ = _data_->graphics;
#line 288 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_data_->_tmp51_ != NULL) {
#line 289 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp52_ = boxes_vm_configurator_create_graphics_device ();
#line 289 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->devices = g_list_prepend (_data_->devices, (GVirConfigDomainDevice*) _data_->_tmp52_);
#line 1938 "vm-configurator.c"
	}
#line 290 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp53_ = _data_->channel_webdav;
#line 290 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_data_->_tmp53_ == NULL) {
#line 291 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->_tmp54_ = boxes_vm_configurator_create_webdav_channel ();
#line 291 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_data_->devices = g_list_prepend (_data_->devices, (GVirConfigDomainDevice*) _data_->_tmp54_);
#line 1948 "vm-configurator.c"
	}
#line 293 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->devices = g_list_reverse (_data_->devices);
#line 294 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp55_ = _data_->domain;
#line 294 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_data_->_tmp56_ = _data_->devices;
#line 294 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_devices (_data_->_tmp55_, _data_->_tmp56_);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->channel_webdav);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->graphics);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_data_->iface);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (_data_->devices);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_data_->_state_ != 0) {
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		while (_data_->_task_complete_ != TRUE) {
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1974 "vm-configurator.c"
		}
	}
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_object_unref (_data_->_async_result);
#line 242 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return FALSE;
#line 1981 "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_;
	GVirConfigDomainDisk* _tmp1_;
	GVirConfigDomainDisk* _tmp2_;
	GVirConfigDomainDisk* _tmp3_;
	GVirConfigDomainDisk* _tmp4_;
	GVirConfigDomainDisk* _tmp5_;
	const gchar* _tmp6_;
	GVirConfigDomainDisk* _tmp7_;
	gchar* dev_letter_str = NULL;
	guint8 _tmp8_;
	gchar* _tmp9_;
	BoxesInstallerMedia* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	GVirConfigDomain* _tmp23_;
	GVirConfigDomainDisk* _tmp24_;
#line 297 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 297 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (target_path != NULL);
#line 297 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 301 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_disk_new ();
#line 301 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	disk = _tmp0_;
#line 302 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = disk;
#line 302 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_type (_tmp1_, GVIR_CONFIG_DOMAIN_DISK_FILE);
#line 303 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = disk;
#line 303 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_guest_device_type (_tmp2_, GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK);
#line 304 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = disk;
#line 304 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_name (_tmp3_, "qemu");
#line 305 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = disk;
#line 305 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_format (_tmp4_, GVIR_CONFIG_DOMAIN_DISK_FORMAT_QCOW2);
#line 306 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = disk;
#line 306 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = target_path;
#line 306 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_source (_tmp5_, _tmp6_);
#line 307 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = disk;
#line 307 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_disk_set_driver_cache (_tmp7_, GVIR_CONFIG_DOMAIN_DISK_CACHE_WRITEBACK);
#line 309 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = dev_index;
#line 309 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = g_strdup_printf ("%c", (gchar) (_tmp8_ + 97));
#line 309 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	dev_letter_str = _tmp9_;
#line 310 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = install_media;
#line 310 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = boxes_installer_media_get_supports_virtio_disk (_tmp10_);
#line 310 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = _tmp11_;
#line 310 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp12_) {
#line 2053 "vm-configurator.c"
		GVirConfigDomainDisk* _tmp13_;
		GVirConfigDomainDisk* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
#line 311 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:311: Using virtio controller for the main disk");
#line 312 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = disk;
#line 312 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_bus (_tmp13_, GVIR_CONFIG_DOMAIN_DISK_BUS_VIRTIO);
#line 313 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = disk;
#line 313 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp15_ = dev_letter_str;
#line 313 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = g_strconcat ("vd", _tmp15_, NULL);
#line 313 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp17_ = _tmp16_;
#line 313 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp14_, _tmp17_);
#line 313 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp17_);
#line 2077 "vm-configurator.c"
	} else {
		GVirConfigDomainDisk* _tmp18_;
		GVirConfigDomainDisk* _tmp19_;
		const gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
#line 315 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:315: Using IDE controller for the main disk");
#line 316 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp18_ = disk;
#line 316 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_bus (_tmp18_, GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
#line 317 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp19_ = disk;
#line 317 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp20_ = dev_letter_str;
#line 317 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp21_ = g_strconcat ("hd", _tmp20_, NULL);
#line 317 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp22_ = _tmp21_;
#line 317 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_disk_set_target_dev (_tmp19_, _tmp22_);
#line 317 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp22_);
#line 2102 "vm-configurator.c"
	}
#line 320 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = domain;
#line 320 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp24_ = disk;
#line 320 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp23_, (GVirConfigDomainDevice*) _tmp24_);
#line 297 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (dev_letter_str);
#line 297 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (disk);
#line 2114 "vm-configurator.c"
}


static void boxes_vm_configurator_set_post_install_os_config (GVirConfigDomain* domain) {
	GVirConfigDomainOs* os = NULL;
	GVirConfigDomainOs* _tmp0_;
	GVirConfigDomainOs* old_os = NULL;
	GVirConfigDomain* _tmp1_;
	GVirConfigDomainOs* _tmp2_;
	GList* boot_devices = NULL;
	GList* _tmp3_;
	const gchar* _tmp4_;
	GVirConfigDomain* _tmp5_;
#line 323 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 324 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 324 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 325 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_os_type (os, GVIR_CONFIG_DOMAIN_OS_TYPE_HVM);
#line 327 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 327 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_domain_get_os (_tmp1_);
#line 327 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	old_os = _tmp2_;
#line 328 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_domain_os_get_boot_devices (old_os);
#line 328 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boot_devices = _tmp3_;
#line 329 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boot_devices = g_list_remove (boot_devices, (gpointer) ((gintptr) GVIR_CONFIG_DOMAIN_OS_BOOT_DEVICE_CDROM));
#line 330 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 332 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_domain_os_get_arch (old_os);
#line 332 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 334 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = domain;
#line 334 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp5_, os);
#line 323 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 323 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (old_os);
#line 323 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 2164 "vm-configurator.c"
}


static void boxes_vm_configurator_set_os_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media, GVirConfigCapabilitiesGuest* guest_caps) {
	GVirConfigDomainOs* os = NULL;
	GVirConfigDomainOs* _tmp0_;
	GVirConfigCapabilitiesGuest* _tmp1_;
	GVirConfigCapabilitiesGuestArch* _tmp2_;
	GVirConfigCapabilitiesGuestArch* _tmp3_;
	const gchar* _tmp4_;
	GList* boot_devices = NULL;
	BoxesInstallerMedia* _tmp5_;
	GVirConfigDomain* _tmp6_;
#line 337 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 337 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 337 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (guest_caps != NULL);
#line 338 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_os_new ();
#line 338 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	os = _tmp0_;
#line 339 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_os_type (os, GVIR_CONFIG_DOMAIN_OS_TYPE_HVM);
#line 340 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = guest_caps;
#line 340 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = gvir_config_capabilities_guest_get_arch (_tmp1_);
#line 340 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 340 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = gvir_config_capabilities_guest_arch_get_name (_tmp3_);
#line 340 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_arch (os, _tmp4_);
#line 340 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp3_);
#line 342 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boot_devices = NULL;
#line 343 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = install_media;
#line 343 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boxes_installer_media_set_direct_boot_params (_tmp5_, os);
#line 344 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boot_devices = g_list_append (boot_devices, (gpointer) ((gintptr) GVIR_CONFIG_DOMAIN_OS_BOOT_DEVICE_CDROM));
#line 345 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	boot_devices = g_list_append (boot_devices, (gpointer) ((gintptr) GVIR_CONFIG_DOMAIN_OS_BOOT_DEVICE_HD));
#line 346 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_os_set_boot_devices (os, boot_devices);
#line 348 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = domain;
#line 348 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_set_os (_tmp6_, os);
#line 337 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_list_free0 (boot_devices);
#line 337 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (os);
#line 2222 "vm-configurator.c"
}


static void boxes_vm_configurator_set_video_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomainVideo* video = NULL;
	GVirConfigDomainVideo* _tmp0_;
	GVirConfigDomain* _tmp1_;
#line 351 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 351 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 352 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_video_new ();
#line 352 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	video = _tmp0_;
#line 353 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_video_set_model (video, GVIR_CONFIG_DOMAIN_VIDEO_MODEL_QXL);
#line 355 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 355 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp1_, (GVirConfigDomainDevice*) video);
#line 351 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (video);
#line 2246 "vm-configurator.c"
}


static void boxes_vm_configurator_set_sound_config (GVirConfigDomain* domain, BoxesInstallerMedia* install_media) {
	GVirConfigDomainSound* sound = NULL;
	GVirConfigDomainSound* _tmp0_;
	OsinfoDevice* device = NULL;
	BoxesInstallerMedia* _tmp1_;
	OsinfoDeviceList* _tmp2_;
	OsinfoDeviceList* _tmp3_;
	OsinfoDeviceList* _tmp4_;
	OsinfoDevice* _tmp5_;
	OsinfoDevice* _tmp6_;
	gint _tmp7_ = 0;
	OsinfoDevice* _tmp8_;
	gint model = 0;
	GVirConfigDomainSound* _tmp12_;
	GVirConfigDomain* _tmp13_;
	GVirConfigDomainSound* _tmp14_;
#line 358 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 358 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (install_media != NULL);
#line 359 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_sound_new ();
#line 359 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	sound = _tmp0_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = boxes_installer_media_get_supported_devices (_tmp1_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = _tmp2_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = _tmp3_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = boxes_find_device_by_prop (_tmp4_, OSINFO_DEVICE_PROP_CLASS, "audio");
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = _tmp5_;
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp4_);
#line 360 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	device = _tmp6_;
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = device;
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp8_ != NULL) {
#line 2294 "vm-configurator.c"
		OsinfoDevice* _tmp9_;
		const gchar* _tmp10_;
		gint _tmp11_;
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = device;
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = osinfo_device_get_name (_tmp9_);
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = boxes_get_enum_value (_tmp10_, gvir_config_domain_sound_model_get_type ());
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = _tmp11_;
#line 2306 "vm-configurator.c"
	} else {
#line 362 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = (gint) GVIR_CONFIG_DOMAIN_SOUND_MODEL_AC97;
#line 2310 "vm-configurator.c"
	}
#line 361 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	model = _tmp7_;
#line 363 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (model != -1);
#line 364 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = sound;
#line 364 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_sound_set_model (_tmp12_, (GVirConfigDomainSoundModel) model);
#line 366 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 366 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = sound;
#line 366 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 358 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (device);
#line 358 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (sound);
#line 2330 "vm-configurator.c"
}


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


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


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


static void boxes_vm_configurator_set_input_config (GVirConfigDomain* domain, GVirConfigDomainInputDeviceType device_type) {
	GVirConfigDomainInput* input = NULL;
	GVirConfigDomainInput* _tmp0_;
	GVirConfigDomainInputDeviceType _tmp1_;
	GVirConfigDomain* _tmp2_;
#line 381 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 382 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_input_new ();
#line 382 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	input = _tmp0_;
#line 383 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = device_type;
#line 383 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_input_set_device_type (input, _tmp1_);
#line 384 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_input_set_bus (input, GVIR_CONFIG_DOMAIN_INPUT_BUS_USB);
#line 386 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = domain;
#line 386 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp2_, (GVirConfigDomainDevice*) input);
#line 381 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (input);
#line 2399 "vm-configurator.c"
}


static GVirConfigStoragePermissions* boxes_vm_configurator_get_default_permissions (void) {
	GVirConfigStoragePermissions* result = NULL;
	GVirConfigStoragePermissions* permissions = NULL;
	GVirConfigStoragePermissions* _tmp0_;
	uid_t _tmp1_;
	gid_t _tmp2_;
#line 390 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_storage_permissions_new ();
#line 390 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	permissions = _tmp0_;
#line 392 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = getuid ();
#line 392 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_owner (permissions, (guint) _tmp1_);
#line 393 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = getgid ();
#line 393 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_group (permissions, (guint) _tmp2_);
#line 394 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_storage_permissions_set_mode (permissions, (guint) 744);
#line 396 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = permissions;
#line 396 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2427 "vm-configurator.c"
}


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


static guint8* string_get_data (const gchar* self, int* result_length1) {
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	guint8* _tmp4_;
	gint _tmp4__length1;
#line 1428 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1429 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	res = (guint8*) self;
#line 1429 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	res_length1 = -1;
#line 1429 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_res_size_ = res_length1;
#line 1430 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1430 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1430 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	res_length1 = (gint) _tmp1_;
#line 1430 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp2_ = res_length1;
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3_ = res;
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp3__length1 = res_length1;
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp4__length1 = _tmp3__length1;
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	if (result_length1) {
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
		*result_length1 = _tmp4__length1;
#line 2489 "vm-configurator.c"
	}
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 1431 "/home/fborges/jhbuild/install/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 2495 "vm-configurator.c"
}


static gchar* boxes_vm_configurator_get_custom_xml_node (GVirConfigDomain* domain, const gchar* node_name) {
	gchar* result = NULL;
	gchar* ns_uri = NULL;
	gchar* _tmp0_;
	gchar* xml = NULL;
	GVirConfigDomain* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp9_;
	const gchar* _tmp36_;
	GVirConfigDomain* _tmp37_;
	const gchar* _tmp38_;
#line 403 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 403 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (node_name != NULL, NULL);
#line 404 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = g_strdup (BOXES_VM_CONFIGURATOR_BOXES_NS_URI);
#line 404 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	ns_uri = _tmp0_;
#line 405 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = domain;
#line 405 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = ns_uri;
#line 405 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_domain_get_custom_xml (_tmp1_, _tmp2_);
#line 405 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	xml = _tmp3_;
#line 406 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = xml;
#line 406 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp4_ == NULL) {
#line 2532 "vm-configurator.c"
		gchar* _tmp5_;
		GVirConfigDomain* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
#line 407 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = g_strdup (BOXES_VM_CONFIGURATOR_BOXES_OLD_NS_URI);
#line 407 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (ns_uri);
#line 407 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		ns_uri = _tmp5_;
#line 408 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = domain;
#line 408 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = ns_uri;
#line 408 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = gvir_config_domain_get_custom_xml (_tmp6_, _tmp7_);
#line 408 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (xml);
#line 408 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		xml = _tmp8_;
#line 2553 "vm-configurator.c"
	}
#line 411 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = xml;
#line 411 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp9_ != NULL) {
#line 2559 "vm-configurator.c"
		xmlTextReader* reader = NULL;
		const gchar* _tmp10_;
		guint8* _tmp11_;
		gint _tmp11__length1;
		guint8* _tmp12_;
		gint _tmp12__length1;
		const gchar* _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		const gchar* _tmp16_;
		xmlTextReader* _tmp17_;
		xmlTextReader* _tmp18_;
		xmlNode* node = NULL;
		xmlTextReader* _tmp19_;
		xmlNode* _tmp20_;
		xmlNode* _tmp21_;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp10_ = xml;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = string_get_data (_tmp10_, &_tmp11__length1);
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp12_ = _tmp11_;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp12__length1 = _tmp11__length1;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = xml;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = strlen (_tmp13_);
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp15_ = _tmp14_;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp16_ = ns_uri;
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp17_ = xmlReaderForMemory ((gchar*) _tmp12_, _tmp15_, _tmp16_, NULL, (gint) XML_PARSE_COMPACT);
#line 412 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		reader = _tmp17_;
#line 417 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp18_ = reader;
#line 417 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		xmlTextReaderNext (_tmp18_);
#line 419 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp19_ = reader;
#line 419 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp20_ = xmlTextReaderExpand (_tmp19_);
#line 419 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		node = _tmp20_;
#line 420 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp21_ = node;
#line 420 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_tmp21_ != NULL) {
#line 2610 "vm-configurator.c"
			xmlNode* _tmp22_;
			const gchar* _tmp23_;
#line 422 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp22_ = node;
#line 422 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp23_ = _tmp22_->name;
#line 422 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp23_, "gnome-boxes") == 0) {
#line 2619 "vm-configurator.c"
				xmlNode* _tmp24_;
				xmlNode* _tmp25_;
#line 423 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp24_ = node;
#line 423 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp25_ = _tmp24_->children;
#line 423 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				node = _tmp25_;
#line 2628 "vm-configurator.c"
			}
#line 425 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 2632 "vm-configurator.c"
				xmlNode* _tmp26_;
				xmlNode* _tmp27_;
				const gchar* _tmp28_;
				const gchar* _tmp29_;
				xmlNode* _tmp34_;
				xmlNode* _tmp35_;
#line 425 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp26_ = node;
#line 425 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp26_ != NULL)) {
#line 425 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					break;
#line 2645 "vm-configurator.c"
				}
#line 426 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp27_ = node;
#line 426 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp28_ = _tmp27_->name;
#line 426 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp29_ = node_name;
#line 426 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp28_, _tmp29_) == 0) {
#line 2655 "vm-configurator.c"
					xmlNode* _tmp30_;
					xmlNode* _tmp31_;
					const gchar* _tmp32_;
					gchar* _tmp33_;
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp30_ = node;
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp31_ = _tmp30_->children;
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp32_ = _tmp31_->content;
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp33_ = g_strdup (_tmp32_);
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					result = _tmp33_;
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_xmlFreeTextReader0 (reader);
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (xml);
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (ns_uri);
#line 427 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 2678 "vm-configurator.c"
				}
#line 429 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp34_ = node;
#line 429 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp35_ = _tmp34_->next;
#line 429 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				node = _tmp35_;
#line 2686 "vm-configurator.c"
			}
		}
#line 411 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_xmlFreeTextReader0 (reader);
#line 2691 "vm-configurator.c"
	}
#line 434 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp36_ = node_name;
#line 434 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp37_ = domain;
#line 434 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp38_ = gvir_config_domain_get_name (_tmp37_);
#line 434 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_debug ("vm-configurator.vala:434: No XML node %s' for domain '%s'.", _tmp36_, _tmp38_);
#line 436 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = NULL;
#line 436 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (xml);
#line 436 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (ns_uri);
#line 436 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2709 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_boxes_created_domain (GVirConfigDomain* domain) {
	gboolean result = FALSE;
	gchar* xml = NULL;
	GVirConfigDomain* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp5_;
#line 439 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, FALSE);
#line 440 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = domain;
#line 440 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_get_custom_xml (_tmp0_, BOXES_VM_CONFIGURATOR_BOXES_NS_URI);
#line 440 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	xml = _tmp1_;
#line 441 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = xml;
#line 441 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp2_ == NULL) {
#line 2732 "vm-configurator.c"
		GVirConfigDomain* _tmp3_;
		gchar* _tmp4_;
#line 442 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = domain;
#line 442 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = gvir_config_domain_get_custom_xml (_tmp3_, BOXES_VM_CONFIGURATOR_BOXES_OLD_NS_URI);
#line 442 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (xml);
#line 442 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		xml = _tmp4_;
#line 2743 "vm-configurator.c"
	}
#line 444 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = xml;
#line 444 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = _tmp5_ != NULL;
#line 444 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (xml);
#line 444 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 2753 "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_;
	gchar* custom_xml = NULL;
	gboolean _tmp3_;
	BoxesInstallerMedia* _tmp16_;
	guint _tmp45_;
	const gchar* _tmp51_;
	gchar* _tmp52_;
	GError * _inner_error_ = NULL;
#line 447 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 451 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = install_media;
#line 451 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp1_ != NULL) {
#line 451 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = TRUE;
#line 2775 "vm-configurator.c"
	} else {
		gboolean _tmp2_;
#line 451 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = installed;
#line 451 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp0_ = _tmp2_;
#line 2782 "vm-configurator.c"
	}
#line 451 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (_tmp0_);
#line 454 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = installed;
#line 454 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp3_) {
#line 2790 "vm-configurator.c"
		gchar* _tmp4_;
#line 455 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = g_strdup (BOXES_VM_CONFIGURATOR_INSTALLED_XML);
#line 455 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 455 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp4_;
#line 2798 "vm-configurator.c"
	} else {
		BoxesInstallerMedia* _tmp5_;
#line 456 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = install_media;
#line 456 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, BOXES_TYPE_LIBVIRT_CLONED_MEDIA)) {
#line 2805 "vm-configurator.c"
			gchar* _tmp6_;
#line 457 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp6_ = g_strdup (BOXES_VM_CONFIGURATOR_LIBVIRT_CLONING_XML);
#line 457 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 457 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp6_;
#line 2813 "vm-configurator.c"
		} else {
			BoxesInstallerMedia* _tmp7_;
#line 458 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp7_ = install_media;
#line 458 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, BOXES_TYPE_LIBVIRT_MEDIA)) {
#line 2820 "vm-configurator.c"
				gchar* _tmp8_;
#line 459 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (BOXES_VM_CONFIGURATOR_LIBVIRT_SYS_IMPORT_XML);
#line 459 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (custom_xml);
#line 459 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				custom_xml = _tmp8_;
#line 2828 "vm-configurator.c"
			} else {
				BoxesInstallerMedia* _tmp9_;
#line 460 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = install_media;
#line 460 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp9_, BOXES_TYPE_INSTALLED_MEDIA)) {
#line 2835 "vm-configurator.c"
					gchar* _tmp10_;
#line 461 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp10_ = g_strdup (BOXES_VM_CONFIGURATOR_IMPORT_XML);
#line 461 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (custom_xml);
#line 461 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					custom_xml = _tmp10_;
#line 2843 "vm-configurator.c"
				} else {
					const gchar* _tmp11_ = NULL;
					BoxesInstallerMedia* _tmp12_;
					gboolean _tmp13_;
					gboolean _tmp14_;
					gchar* _tmp15_;
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp12_ = install_media;
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp13_ = boxes_installer_media_get_live (_tmp12_);
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp14_ = _tmp13_;
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					if (_tmp14_) {
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_tmp11_ = BOXES_VM_CONFIGURATOR_LIVE_XML;
#line 2860 "vm-configurator.c"
					} else {
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
						_tmp11_ = BOXES_VM_CONFIGURATOR_INSTALLATION_XML;
#line 2864 "vm-configurator.c"
					}
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp15_ = g_strdup (_tmp11_);
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_free0 (custom_xml);
#line 463 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					custom_xml = _tmp15_;
#line 2872 "vm-configurator.c"
				}
			}
		}
	}
#line 465 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = install_media;
#line 465 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp16_ != NULL) {
#line 2881 "vm-configurator.c"
		BoxesInstallerMedia* _tmp17_;
		OsinfoOs* _tmp18_;
		BoxesInstallerMedia* _tmp28_;
		OsinfoMedia* _tmp29_;
		const gchar* _tmp39_;
		BoxesInstallerMedia* _tmp40_;
		const gchar* _tmp41_;
		gchar* _tmp42_;
		gchar* _tmp43_;
		gchar* _tmp44_;
#line 466 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp17_ = install_media;
#line 466 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp18_ = _tmp17_->os;
#line 466 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_tmp18_ != NULL) {
#line 2898 "vm-configurator.c"
			const gchar* _tmp19_;
			BoxesInstallerMedia* _tmp20_;
			OsinfoOs* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp19_ = custom_xml;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp20_ = install_media;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp21_ = _tmp20_->os;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp21_, "id", &_tmp22_, NULL);
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp23_ = _tmp22_;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp24_ = _tmp23_;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp25_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_OS_ID_XML, _tmp24_);
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp26_ = _tmp25_;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp27_ = g_strconcat (_tmp19_, _tmp26_, NULL);
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp27_;
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp26_);
#line 467 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp24_);
#line 2934 "vm-configurator.c"
		}
#line 468 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp28_ = install_media;
#line 468 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp29_ = _tmp28_->os_media;
#line 468 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (_tmp29_ != NULL) {
#line 2942 "vm-configurator.c"
			const gchar* _tmp30_;
			BoxesInstallerMedia* _tmp31_;
			OsinfoMedia* _tmp32_;
			gchar* _tmp33_;
			gchar* _tmp34_;
			gchar* _tmp35_;
			gchar* _tmp36_;
			gchar* _tmp37_;
			gchar* _tmp38_;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp30_ = custom_xml;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp31_ = install_media;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp32_ = _tmp31_->os_media;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			g_object_get ((OsinfoEntity*) _tmp32_, "id", &_tmp33_, NULL);
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp34_ = _tmp33_;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp35_ = _tmp34_;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp36_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_ID_XML, _tmp35_);
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp37_ = _tmp36_;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp38_ = g_strconcat (_tmp30_, _tmp37_, NULL);
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (custom_xml);
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			custom_xml = _tmp38_;
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp37_);
#line 469 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (_tmp35_);
#line 2978 "vm-configurator.c"
		}
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp39_ = custom_xml;
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp40_ = install_media;
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp41_ = _tmp40_->device_file;
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp42_ = g_markup_printf_escaped (BOXES_VM_CONFIGURATOR_MEDIA_XML, _tmp41_);
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp43_ = _tmp42_;
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp44_ = g_strconcat (_tmp39_, _tmp43_, NULL);
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp44_;
#line 470 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp43_);
#line 2998 "vm-configurator.c"
	}
#line 473 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp45_ = num_reboots;
#line 473 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp45_ != ((guint) 0)) {
#line 3004 "vm-configurator.c"
		const gchar* _tmp46_;
		guint _tmp47_;
		gchar* _tmp48_;
		gchar* _tmp49_;
		gchar* _tmp50_;
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp46_ = custom_xml;
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp47_ = num_reboots;
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp48_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_NUM_REBOOTS_XML, _tmp47_);
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp49_ = _tmp48_;
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp50_ = g_strconcat (_tmp46_, _tmp49_, NULL);
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		custom_xml = _tmp50_;
#line 474 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (_tmp49_);
#line 3026 "vm-configurator.c"
	}
#line 476 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp51_ = custom_xml;
#line 476 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp52_ = g_strdup_printf (BOXES_VM_CONFIGURATOR_BOXES_XML, _tmp51_);
#line 476 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 476 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	custom_xml = _tmp52_;
#line 3036 "vm-configurator.c"
	{
		GVirConfigDomain* _tmp53_;
		const gchar* _tmp54_;
#line 478 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp53_ = domain;
#line 478 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp54_ = custom_xml;
#line 478 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_set_custom_xml (_tmp53_, _tmp54_, BOXES_VM_CONFIGURATOR_BOXES_NS, BOXES_VM_CONFIGURATOR_BOXES_NS_URI, &_inner_error_);
#line 478 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3048 "vm-configurator.c"
			goto __catch117_g_error;
		}
	}
	goto __finally117;
	__catch117_g_error:
	{
		GError* _error_ = NULL;
#line 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_error_ = _inner_error_;
#line 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_inner_error_ = NULL;
#line 479 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_assert_not_reached ();
#line 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_error_free0 (_error_);
#line 3064 "vm-configurator.c"
	}
	__finally117:
#line 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_free0 (custom_xml);
#line 477 "/home/fborges/checkout/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 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 477 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return;
#line 3077 "vm-configurator.c"
	}
#line 447 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (custom_xml);
#line 3081 "vm-configurator.c"
}


void boxes_vm_configurator_add_smartcard_support (GVirConfigDomain* domain) {
	GVirConfigDomainSmartcardPassthrough* smartcard = NULL;
	GVirConfigDomainSmartcardPassthrough* _tmp0_;
	GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
	GVirConfigDomainChardevSourceSpiceVmc* _tmp1_;
	GVirConfigDomain* _tmp2_;
#line 482 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 483 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_smartcard_passthrough_new ();
#line 483 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	smartcard = _tmp0_;
#line 484 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 484 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	vmc = _tmp1_;
#line 485 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_smartcard_passthrough_set_source (smartcard, (GVirConfigDomainChardevSource*) vmc);
#line 486 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = domain;
#line 486 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp2_, (GVirConfigDomainDevice*) smartcard);
#line 482 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (vmc);
#line 482 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (smartcard);
#line 3111 "vm-configurator.c"
}


void boxes_vm_configurator_add_usb_support (GVirConfigDomain* domain) {
	GVirConfigDomainControllerUsb* master_controller = NULL;
	GVirConfigDomainControllerUsb* _tmp10_;
	GVirConfigDomain* _tmp11_;
	GVirConfigDomainControllerUsb* controller = NULL;
	GVirConfigDomainControllerUsb* _tmp12_;
	GVirConfigDomain* _tmp13_;
	GVirConfigDomainControllerUsb* _tmp14_;
	GVirConfigDomainControllerUsb* _tmp15_;
	GVirConfigDomain* _tmp16_;
	GVirConfigDomainControllerUsb* _tmp17_;
	GVirConfigDomainControllerUsb* _tmp18_;
	GVirConfigDomain* _tmp19_;
	GVirConfigDomainControllerUsb* _tmp20_;
#line 489 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (domain != NULL);
#line 3131 "vm-configurator.c"
	{
		gint i = 0;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		i = 0;
#line 3136 "vm-configurator.c"
		{
			gboolean _tmp0_ = FALSE;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp0_ = TRUE;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			while (TRUE) {
#line 3143 "vm-configurator.c"
				gint _tmp2_;
				GVirConfigDomainRedirdev* usb_redir = NULL;
				GVirConfigDomainRedirdev* _tmp3_;
				GVirConfigDomainRedirdev* _tmp4_;
				GVirConfigDomainChardevSourceSpiceVmc* vmc = NULL;
				GVirConfigDomainChardevSourceSpiceVmc* _tmp5_;
				GVirConfigDomainRedirdev* _tmp6_;
				GVirConfigDomainChardevSourceSpiceVmc* _tmp7_;
				GVirConfigDomain* _tmp8_;
				GVirConfigDomainRedirdev* _tmp9_;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (!_tmp0_) {
#line 3156 "vm-configurator.c"
					gint _tmp1_;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp1_ = i;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					i = _tmp1_ + 1;
#line 3162 "vm-configurator.c"
				}
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp0_ = FALSE;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp2_ = i;
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (!(_tmp2_ < 4)) {
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					break;
#line 3172 "vm-configurator.c"
				}
#line 492 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = gvir_config_domain_redirdev_new ();
#line 492 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				usb_redir = _tmp3_;
#line 493 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = usb_redir;
#line 493 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_redirdev_set_bus (_tmp4_, GVIR_CONFIG_DOMAIN_REDIRDEV_BUS_USB);
#line 494 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_domain_chardev_source_spicevmc_new ();
#line 494 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				vmc = _tmp5_;
#line 495 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = usb_redir;
#line 495 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = vmc;
#line 495 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) _tmp6_, (GVirConfigDomainChardevSource*) _tmp7_);
#line 496 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = domain;
#line 496 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = usb_redir;
#line 496 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				gvir_config_domain_add_device (_tmp8_, (GVirConfigDomainDevice*) _tmp9_);
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (vmc);
#line 491 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (usb_redir);
#line 3202 "vm-configurator.c"
			}
		}
	}
#line 500 "/home/fborges/checkout/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 500 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	master_controller = _tmp10_;
#line 501 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = domain;
#line 501 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp11_, (GVirConfigDomainDevice*) master_controller);
#line 502 "/home/fborges/checkout/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 502 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp12_;
#line 503 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp13_ = domain;
#line 503 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp14_ = controller;
#line 503 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp13_, (GVirConfigDomainDevice*) _tmp14_);
#line 504 "/home/fborges/checkout/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 504 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 504 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp15_;
#line 505 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp16_ = domain;
#line 505 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp17_ = controller;
#line 505 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp16_, (GVirConfigDomainDevice*) _tmp17_);
#line 506 "/home/fborges/checkout/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 506 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 506 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp18_;
#line 507 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = domain;
#line 507 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp20_ = controller;
#line 507 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_add_device (_tmp19_, (GVirConfigDomainDevice*) _tmp20_);
#line 489 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (controller);
#line 489 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (master_controller);
#line 3252 "vm-configurator.c"
}


GVirConfigDomainInterface* boxes_vm_configurator_create_network_interface (GVirConfigDomain* domain, gboolean bridge, gboolean virtio) {
	GVirConfigDomainInterface* result = NULL;
	GVirConfigDomainInterface* iface = NULL;
	gboolean _tmp0_;
	gboolean _tmp10_;
#line 510 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (domain != NULL, NULL);
#line 513 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = bridge;
#line 513 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp0_) {
#line 3267 "vm-configurator.c"
		GVirConfigDomain* _tmp1_;
		const gchar* _tmp2_;
		GVirConfigDomainInterfaceBridge* bridge_iface = NULL;
		GVirConfigDomainInterfaceBridge* _tmp3_;
		GVirConfigDomainInterfaceBridge* _tmp4_;
		GVirConfigDomainInterfaceBridge* _tmp5_;
		GVirConfigDomainInterface* _tmp6_;
#line 514 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp1_ = domain;
#line 514 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp2_ = gvir_config_domain_get_name (_tmp1_);
#line 514 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:514: Creating bridge network device for %s", _tmp2_);
#line 515 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp3_ = gvir_config_domain_interface_bridge_new ();
#line 515 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		bridge_iface = _tmp3_;
#line 516 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp4_ = bridge_iface;
#line 516 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_bridge_set_source (_tmp4_, "virbr0");
#line 517 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp5_ = bridge_iface;
#line 517 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = _g_object_ref0 ((GVirConfigDomainInterface*) _tmp5_);
#line 517 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 517 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		iface = _tmp6_;
#line 513 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (bridge_iface);
#line 3299 "vm-configurator.c"
	} else {
		GVirConfigDomain* _tmp7_;
		const gchar* _tmp8_;
		GVirConfigDomainInterfaceUser* _tmp9_;
#line 519 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = domain;
#line 519 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = gvir_config_domain_get_name (_tmp7_);
#line 519 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_debug ("vm-configurator.vala:519: Creating user network device for %s", _tmp8_);
#line 520 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp9_ = gvir_config_domain_interface_user_new ();
#line 520 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_g_object_unref0 (iface);
#line 520 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		iface = (GVirConfigDomainInterface*) _tmp9_;
#line 3316 "vm-configurator.c"
	}
#line 523 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = virtio;
#line 523 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp10_) {
#line 3322 "vm-configurator.c"
		GVirConfigDomainInterface* _tmp11_;
#line 524 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp11_ = iface;
#line 524 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_interface_set_model (_tmp11_, "virtio");
#line 3328 "vm-configurator.c"
	}
#line 526 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = iface;
#line 526 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3334 "vm-configurator.c"
}


GVirConfigDomainGraphicsSpice* boxes_vm_configurator_create_graphics_device (void) {
	GVirConfigDomainGraphicsSpice* result = NULL;
	GVirConfigDomainGraphicsSpice* graphics = NULL;
	GVirConfigDomainGraphicsSpice* _tmp0_;
#line 530 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_graphics_spice_new ();
#line 530 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	graphics = _tmp0_;
#line 531 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_graphics_spice_set_autoport (graphics, FALSE);
#line 532 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_graphics_spice_set_image_compression (graphics, GVIR_CONFIG_DOMAIN_GRAPHICS_SPICE_IMAGE_COMPRESSION_OFF);
#line 534 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = graphics;
#line 534 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3354 "vm-configurator.c"
}


GVirConfigDomainChannel* boxes_vm_configurator_create_webdav_channel (void) {
	GVirConfigDomainChannel* result = NULL;
	GVirConfigDomainChannel* channel_webdav = NULL;
	GVirConfigDomainChannel* _tmp0_;
	GVirConfigDomainChardevSourceSpicePort* spice_port = NULL;
	GVirConfigDomainChardevSourceSpicePort* _tmp1_;
#line 538 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_channel_new ();
#line 538 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	channel_webdav = _tmp0_;
#line 539 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_type (channel_webdav, GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO);
#line 540 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_channel_set_target_name (channel_webdav, BOXES_VM_CONFIGURATOR_WEBDAV_CHANNEL_URI);
#line 542 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_domain_chardev_source_spiceport_new ();
#line 542 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	spice_port = _tmp1_;
#line 543 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_source_spiceport_set_channel (spice_port, BOXES_VM_CONFIGURATOR_WEBDAV_CHANNEL_URI);
#line 544 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_chardev_set_source ((GVirConfigDomainChardev*) channel_webdav, (GVirConfigDomainChardevSource*) spice_port);
#line 546 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = channel_webdav;
#line 546 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (spice_port);
#line 546 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3386 "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_;
	GVirConfigDomainControllerUsb* _tmp1_;
	GVirConfigDomainControllerUsbModel _tmp2_;
	GVirConfigDomainControllerUsb* _tmp3_;
	guint _tmp4_;
	GVirConfigDomainControllerUsb* _tmp5_;
#line 553 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = gvir_config_domain_controller_usb_new ();
#line 553 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	controller = _tmp0_;
#line 554 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = controller;
#line 554 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = model;
#line 554 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_usb_set_model (_tmp1_, _tmp2_);
#line 555 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = controller;
#line 555 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = index;
#line 555 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	gvir_config_domain_controller_set_index ((GVirConfigDomainController*) _tmp3_, _tmp4_);
#line 556 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = master;
#line 556 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_tmp5_ != NULL) {
#line 3419 "vm-configurator.c"
		GVirConfigDomainControllerUsb* _tmp6_;
		GVirConfigDomainControllerUsb* _tmp7_;
		guint _tmp8_;
#line 557 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp6_ = controller;
#line 557 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp7_ = master;
#line 557 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp8_ = start_port;
#line 557 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		gvir_config_domain_controller_usb_set_master (_tmp6_, _tmp7_, _tmp8_);
#line 3431 "vm-configurator.c"
	}
#line 559 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = controller;
#line 559 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3437 "vm-configurator.c"
}


static gint __lambda24_ (GVirConfigCapabilitiesGuest* caps_a, GVirConfigCapabilitiesGuest* caps_b) {
	gint result = 0;
	gchar* arch_a = NULL;
	GVirConfigCapabilitiesGuest* _tmp0_;
	GVirConfigCapabilitiesGuestArch* _tmp1_;
	GVirConfigCapabilitiesGuestArch* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* arch_b = NULL;
	GVirConfigCapabilitiesGuest* _tmp6_;
	GVirConfigCapabilitiesGuestArch* _tmp7_;
	GVirConfigCapabilitiesGuestArch* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	const gchar* _tmp12_;
#line 566 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_a != NULL, 0);
#line 566 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps_b != NULL, 0);
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps_a;
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = _tmp1_;
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_name (_tmp2_);
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp5_ = _tmp4_;
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp2_);
#line 567 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	arch_a = _tmp5_;
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp6_ = caps_b;
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp7_ = gvir_config_capabilities_guest_get_arch (_tmp6_);
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp8_ = _tmp7_;
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp9_ = gvir_config_capabilities_guest_arch_get_name (_tmp8_);
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp10_ = g_strdup (_tmp9_);
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp11_ = _tmp10_;
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (_tmp8_);
#line 568 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	arch_b = _tmp11_;
#line 570 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp12_ = arch_a;
#line 570 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (g_strcmp0 (_tmp12_, "i686") == 0) {
#line 3498 "vm-configurator.c"
		const gchar* _tmp13_;
#line 571 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp13_ = arch_b;
#line 571 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp13_, "x86_64") == 0) {
#line 572 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			result = 1;
#line 572 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 572 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 572 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 3512 "vm-configurator.c"
		} else {
#line 574 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 574 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 574 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 574 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 3522 "vm-configurator.c"
		}
	} else {
		const gchar* _tmp14_;
#line 575 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		_tmp14_ = arch_a;
#line 575 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (g_strcmp0 (_tmp14_, "x86_64") == 0) {
#line 576 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			result = -1;
#line 576 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_b);
#line 576 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_g_free0 (arch_a);
#line 576 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return result;
#line 3538 "vm-configurator.c"
		} else {
			gboolean _tmp15_ = FALSE;
			const gchar* _tmp16_;
#line 577 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = arch_b;
#line 577 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			if (g_strcmp0 (_tmp16_, "x86_64") == 0) {
#line 577 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = TRUE;
#line 3548 "vm-configurator.c"
			} else {
				const gchar* _tmp17_;
#line 577 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = arch_b;
#line 577 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp15_ = g_strcmp0 (_tmp17_, "i686") == 0;
#line 3555 "vm-configurator.c"
			}
#line 577 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			if (_tmp15_) {
#line 578 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				result = 1;
#line 578 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 578 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 578 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 3567 "vm-configurator.c"
			} else {
#line 580 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				result = 0;
#line 580 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_b);
#line 580 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (arch_a);
#line 580 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				return result;
#line 3577 "vm-configurator.c"
			}
		}
	}
#line 566 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_b);
#line 566 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_free0 (arch_a);
#line 3585 "vm-configurator.c"
}


static gint ___lambda24__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda24_ ((GVirConfigCapabilitiesGuest*) a, (GVirConfigCapabilitiesGuest*) b);
#line 566 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3594 "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_;
	GList* _tmp1_;
	GList* compat_guests_caps = NULL;
	GList* _tmp2_;
	GList* _tmp15_;
	GList* _tmp19_;
	GError* _tmp23_;
	GError * _inner_error_ = NULL;
#line 562 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (caps != NULL, NULL);
#line 562 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (install_media != NULL, NULL);
#line 564 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = caps;
#line 564 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_get_guests (_tmp0_);
#line 564 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	guests_caps = _tmp1_;
#line 566 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	guests_caps = g_list_sort (guests_caps, ___lambda24__gcompare_func);
#line 584 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	compat_guests_caps = NULL;
#line 585 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = guests_caps;
#line 3625 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 585 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp2_;
#line 585 "/home/fborges/checkout/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* _tmp3_;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 585 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp3_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 585 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp3_;
#line 3640 "vm-configurator.c"
			{
				gchar* guest_arch = NULL;
				GVirConfigCapabilitiesGuest* _tmp4_;
				GVirConfigCapabilitiesGuestArch* _tmp5_;
				GVirConfigCapabilitiesGuestArch* _tmp6_;
				const gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				BoxesInstallerMedia* _tmp10_;
				const gchar* _tmp11_;
				gboolean _tmp12_;
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = guest_caps;
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_get_arch (_tmp4_);
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = _tmp5_;
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp7_ = gvir_config_capabilities_guest_arch_get_name (_tmp6_);
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp8_ = g_strdup (_tmp7_);
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp9_ = _tmp8_;
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (_tmp6_);
#line 586 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				guest_arch = _tmp9_;
#line 588 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp10_ = install_media;
#line 588 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp11_ = guest_arch;
#line 588 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp12_ = boxes_installer_media_is_architecture_compatible (_tmp10_, _tmp11_);
#line 588 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (_tmp12_) {
#line 3676 "vm-configurator.c"
					GVirConfigCapabilitiesGuest* _tmp13_;
					GVirConfigCapabilitiesGuest* _tmp14_;
#line 589 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp13_ = guest_caps;
#line 589 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_tmp14_ = _g_object_ref0 (_tmp13_);
#line 589 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					compat_guests_caps = g_list_append (compat_guests_caps, _tmp14_);
#line 3685 "vm-configurator.c"
				}
#line 585 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_free0 (guest_arch);
#line 585 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3691 "vm-configurator.c"
			}
		}
	}
#line 593 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp15_ = compat_guests_caps;
#line 3697 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 593 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp15_;
#line 593 "/home/fborges/checkout/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 3705 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp16_;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 593 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp16_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 593 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp16_;
#line 3712 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp17_;
				gboolean _tmp18_;
#line 594 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp17_ = guest_caps;
#line 594 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp18_ = boxes_vm_configurator_guest_kvm_enabled (_tmp17_);
#line 594 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (_tmp18_) {
#line 595 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 595 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 595 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 595 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3730 "vm-configurator.c"
				}
#line 593 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3734 "vm-configurator.c"
			}
		}
	}
#line 598 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp19_ = compat_guests_caps;
#line 3740 "vm-configurator.c"
	{
		GList* guest_caps_collection = NULL;
		GList* guest_caps_it = NULL;
#line 598 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		guest_caps_collection = _tmp19_;
#line 598 "/home/fborges/checkout/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 3748 "vm-configurator.c"
			GVirConfigCapabilitiesGuest* _tmp20_;
			GVirConfigCapabilitiesGuest* guest_caps = NULL;
#line 598 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp20_ = _g_object_ref0 ((GVirConfigCapabilitiesGuest*) guest_caps_it->data);
#line 598 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			guest_caps = _tmp20_;
#line 3755 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuest* _tmp21_;
				gboolean _tmp22_;
#line 599 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp21_ = guest_caps;
#line 599 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp22_ = boxes_vm_configurator_guest_is_qemu (_tmp21_);
#line 599 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (_tmp22_) {
#line 600 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					result = guest_caps;
#line 600 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 600 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (guests_caps);
#line 600 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3773 "vm-configurator.c"
				}
#line 598 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (guest_caps);
#line 3777 "vm-configurator.c"
			}
		}
	}
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp23_ = g_error_new_literal (BOXES_VM_CONFIGURATOR_ERROR, BOXES_VM_CONFIGURATOR_ERROR_NO_GUEST_CAPS, _ ("Incapable host system"));
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_inner_error_ = _tmp23_;
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (_inner_error_->domain == BOXES_VM_CONFIGURATOR_ERROR) {
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_propagate_error (error, _inner_error_);
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3795 "vm-configurator.c"
	} else {
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (guests_caps);
#line 604 "/home/fborges/checkout/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 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_clear_error (&_inner_error_);
#line 604 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return NULL;
#line 3807 "vm-configurator.c"
	}
#line 562 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (compat_guests_caps);
#line 562 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	__g_list_free__g_object_unref0_0 (guests_caps);
#line 3813 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_guest_kvm_enabled (GVirConfigCapabilitiesGuest* guest_caps) {
	gboolean result = FALSE;
	GVirConfigCapabilitiesGuestArch* arch = NULL;
	GVirConfigCapabilitiesGuest* _tmp0_;
	GVirConfigCapabilitiesGuestArch* _tmp1_;
	GVirConfigCapabilitiesGuestArch* _tmp2_;
	GList* _tmp3_;
#line 607 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 608 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 608 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 608 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3836 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3844 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3851 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_;
				GVirConfigDomainVirtType _tmp6_;
#line 610 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 610 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 610 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_KVM) {
#line 611 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 611 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 611 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 611 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 611 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3871 "vm-configurator.c"
				}
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3875 "vm-configurator.c"
			}
		}
#line 609 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3880 "vm-configurator.c"
	}
#line 613 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 613 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 613 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3888 "vm-configurator.c"
}


static gboolean boxes_vm_configurator_guest_is_qemu (GVirConfigCapabilitiesGuest* guest_caps) {
	gboolean result = FALSE;
	GVirConfigCapabilitiesGuestArch* arch = NULL;
	GVirConfigCapabilitiesGuest* _tmp0_;
	GVirConfigCapabilitiesGuestArch* _tmp1_;
	GVirConfigCapabilitiesGuestArch* _tmp2_;
	GList* _tmp3_;
#line 616 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 617 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 617 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_arch (_tmp0_);
#line 617 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	arch = _tmp1_;
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp2_ = arch;
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp3_ = gvir_config_capabilities_guest_arch_get_domains (_tmp2_);
#line 3911 "vm-configurator.c"
	{
		GList* domain_collection = NULL;
		GList* domain_it = NULL;
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		domain_collection = _tmp3_;
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		for (domain_it = domain_collection; domain_it != NULL; domain_it = domain_it->next) {
#line 3919 "vm-configurator.c"
			GVirConfigCapabilitiesGuestDomain* _tmp4_;
			GVirConfigCapabilitiesGuestDomain* domain = NULL;
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp4_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestDomain*) domain_it->data);
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			domain = _tmp4_;
#line 3926 "vm-configurator.c"
			{
				GVirConfigCapabilitiesGuestDomain* _tmp5_;
				GVirConfigDomainVirtType _tmp6_;
#line 619 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = domain;
#line 619 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp6_ = gvir_config_capabilities_guest_domain_get_virt_type (_tmp5_);
#line 619 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (_tmp6_ == GVIR_CONFIG_DOMAIN_VIRT_QEMU) {
#line 620 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					result = TRUE;
#line 620 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (domain);
#line 620 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					__g_list_free__g_object_unref0_0 (domain_collection);
#line 620 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (arch);
#line 620 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					return result;
#line 3946 "vm-configurator.c"
				}
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (domain);
#line 3950 "vm-configurator.c"
			}
		}
#line 618 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (domain_collection);
#line 3955 "vm-configurator.c"
	}
#line 622 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = FALSE;
#line 622 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_g_object_unref0 (arch);
#line 622 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 3963 "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_;
	GList* _tmp1_;
#line 625 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (guest_caps != NULL, FALSE);
#line 625 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_val_if_fail (feature_name != NULL, FALSE);
#line 626 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	supports = FALSE;
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp0_ = guest_caps;
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	_tmp1_ = gvir_config_capabilities_guest_get_features (_tmp0_);
#line 3982 "vm-configurator.c"
	{
		GList* feature_collection = NULL;
		GList* feature_it = NULL;
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		feature_collection = _tmp1_;
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		for (feature_it = feature_collection; feature_it != NULL; feature_it = feature_it->next) {
#line 3990 "vm-configurator.c"
			GVirConfigCapabilitiesGuestFeature* _tmp2_;
			GVirConfigCapabilitiesGuestFeature* feature = NULL;
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			_tmp2_ = _g_object_ref0 ((GVirConfigCapabilitiesGuestFeature*) feature_it->data);
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			feature = _tmp2_;
#line 3997 "vm-configurator.c"
			{
				const gchar* _tmp3_;
				GVirConfigCapabilitiesGuestFeature* _tmp4_;
				const gchar* _tmp5_;
#line 629 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp3_ = feature_name;
#line 629 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp4_ = feature;
#line 629 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_tmp5_ = gvir_config_capabilities_guest_feature_get_name (_tmp4_);
#line 629 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				if (g_strcmp0 (_tmp3_, _tmp5_) == 0) {
#line 630 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					supports = TRUE;
#line 632 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					_g_object_unref0 (feature);
#line 632 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
					break;
#line 4016 "vm-configurator.c"
				}
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
				_g_object_unref0 (feature);
#line 4020 "vm-configurator.c"
			}
		}
#line 628 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		__g_list_free__g_object_unref0_0 (feature_collection);
#line 4025 "vm-configurator.c"
	}
#line 635 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	result = supports;
#line 635 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return result;
#line 4031 "vm-configurator.c"
}


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


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


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


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


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


static gpointer boxes_value_vm_configurator_peek_pointer (const GValue* value) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return value->data[0].v_pointer;
#line 4086 "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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (collect_values[0].v_pointer) {
#line 4093 "vm-configurator.c"
		BoxesVMConfigurator * object;
		object = collect_values[0].v_pointer;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		if (object->parent_instance.g_class == NULL) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 4100 "vm-configurator.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 10 "/home/fborges/checkout/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 4104 "vm-configurator.c"
		}
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = boxes_vm_configurator_ref (object);
#line 4108 "vm-configurator.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 4112 "vm-configurator.c"
	}
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 4116 "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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (!object_p) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 4127 "vm-configurator.c"
	}
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (!value->data[0].v_pointer) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		*object_p = NULL;
#line 4133 "vm-configurator.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		*object_p = value->data[0].v_pointer;
#line 4137 "vm-configurator.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		*object_p = boxes_vm_configurator_ref (value->data[0].v_pointer);
#line 4141 "vm-configurator.c"
	}
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return NULL;
#line 4145 "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/fborges/checkout/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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return G_PARAM_SPEC (spec);
#line 4159 "vm-configurator.c"
}


gpointer boxes_value_get_vm_configurator (const GValue* value) {
#line 10 "/home/fborges/checkout/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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return value->data[0].v_pointer;
#line 4168 "vm-configurator.c"
}


void boxes_value_set_vm_configurator (GValue* value, gpointer v_object) {
	BoxesVMConfigurator * old;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	old = value->data[0].v_pointer;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (v_object) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/fborges/checkout/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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = v_object;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_ref (value->data[0].v_pointer);
#line 4188 "vm-configurator.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 4192 "vm-configurator.c"
	}
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (old) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_unref (old);
#line 4198 "vm-configurator.c"
	}
}


void boxes_value_take_vm_configurator (GValue* value, gpointer v_object) {
	BoxesVMConfigurator * old;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	old = value->data[0].v_pointer;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (v_object) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, BOXES_TYPE_VM_CONFIGURATOR));
#line 10 "/home/fborges/checkout/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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = v_object;
#line 4217 "vm-configurator.c"
	} else {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		value->data[0].v_pointer = NULL;
#line 4221 "vm-configurator.c"
	}
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	if (old) {
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
		boxes_vm_configurator_unref (old);
#line 4227 "vm-configurator.c"
	}
}


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


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


static void boxes_vm_configurator_finalize (BoxesVMConfigurator * obj) {
	BoxesVMConfigurator * self;
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_VM_CONFIGURATOR, BoxesVMConfigurator);
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_signal_handlers_destroy (self);
#line 4254 "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/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	g_atomic_int_inc (&self->ref_count);
#line 10 "/home/fborges/checkout/gnome-boxes/src/vm-configurator.vala"
	return instance;
#line 4279 "vm-configurator.c"
}


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


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


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



