/* util-app.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from util-app.vala, do not modify */

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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
#include "common.h"
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <osinfo/osinfo.h>
#include <glib/gi18n-lib.h>
#include <glib-object.h>
#include <handy.h>
#include <libvirt-gobject/libvirt-gobject.h>
#include <libvirt-gconfig/libvirt-gconfig.h>
#include "config.h"
#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <glib/gstdio.h>
#include <unistd.h>
#include <cairo-gobject.h>
#include <float.h>
#include <math.h>

#define BOXES_TZ_FILE "/etc/localtime"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _xmlFreeParserCtxt0(var) ((var == NULL) ? NULL : (var = (xmlFreeParserCtxt (var), NULL)))
#define _xmlXPathFreeContext0(var) ((var == NULL) ? NULL : (var = (xmlXPathFreeContext (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef struct _BoxesGetRecommendedDownloadsData BoxesGetRecommendedDownloadsData;

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;
typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES,
	BOXES_UI_STATE_TROUBLESHOOT
} BoxesUIState;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())
typedef struct _BoxesAppWindowPrivate BoxesAppWindowPrivate;

#define BOXES_TYPE_SEARCHBAR (boxes_searchbar_get_type ())
#define BOXES_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbar))
#define BOXES_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))
#define BOXES_IS_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SEARCHBAR))
#define BOXES_IS_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SEARCHBAR))
#define BOXES_SEARCHBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;

#define BOXES_TYPE_TOPBAR (boxes_topbar_get_type ())
#define BOXES_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOPBAR, BoxesTopbar))
#define BOXES_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOPBAR, BoxesTopbarClass))
#define BOXES_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOPBAR))
#define BOXES_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOPBAR))
#define BOXES_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOPBAR, BoxesTopbarClass))

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_TOAST_OVERLAY (boxes_toast_overlay_get_type ())
#define BOXES_TOAST_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOAST_OVERLAY, BoxesToastOverlay))
#define BOXES_TOAST_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOAST_OVERLAY, BoxesToastOverlayClass))
#define BOXES_IS_TOAST_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOAST_OVERLAY))
#define BOXES_IS_TOAST_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOAST_OVERLAY))
#define BOXES_TOAST_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOAST_OVERLAY, BoxesToastOverlayClass))

typedef struct _BoxesToastOverlay BoxesToastOverlay;
typedef struct _BoxesToastOverlayClass BoxesToastOverlayClass;

#define BOXES_TYPE_DISPLAY_PAGE (boxes_display_page_get_type ())
#define BOXES_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPage))
#define BOXES_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))
#define BOXES_IS_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_IS_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_DISPLAY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#define BOXES_TYPE_TROUBLESHOOT_VIEW (boxes_troubleshoot_view_get_type ())
#define BOXES_TROUBLESHOOT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TROUBLESHOOT_VIEW, BoxesTroubleshootView))
#define BOXES_TROUBLESHOOT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TROUBLESHOOT_VIEW, BoxesTroubleshootViewClass))
#define BOXES_IS_TROUBLESHOOT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TROUBLESHOOT_VIEW))
#define BOXES_IS_TROUBLESHOOT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TROUBLESHOOT_VIEW))
#define BOXES_TROUBLESHOOT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TROUBLESHOOT_VIEW, BoxesTroubleshootViewClass))

typedef struct _BoxesTroubleshootView BoxesTroubleshootView;
typedef struct _BoxesTroubleshootViewClass BoxesTroubleshootViewClass;

#define BOXES_TYPE_DOWNLOAD (boxes_download_get_type ())
#define BOXES_DOWNLOAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DOWNLOAD, BoxesDownload))
#define BOXES_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DOWNLOAD, BoxesDownloadClass))
#define BOXES_IS_DOWNLOAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DOWNLOAD))
#define BOXES_IS_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DOWNLOAD))
#define BOXES_DOWNLOAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DOWNLOAD, BoxesDownloadClass))

typedef struct _BoxesDownload BoxesDownload;
typedef struct _BoxesDownloadClass BoxesDownloadClass;

#define BOXES_TYPE_DOWNLOADER (boxes_downloader_get_type ())
#define BOXES_DOWNLOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DOWNLOADER, BoxesDownloader))
#define BOXES_DOWNLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DOWNLOADER, BoxesDownloaderClass))
#define BOXES_IS_DOWNLOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DOWNLOADER))
#define BOXES_IS_DOWNLOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DOWNLOADER))
#define BOXES_DOWNLOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DOWNLOADER, BoxesDownloaderClass))

typedef struct _BoxesDownloader BoxesDownloader;
typedef struct _BoxesDownloaderClass BoxesDownloaderClass;
#define _boxes_download_unref0(var) ((var == NULL) ? NULL : (var = (boxes_download_unref (var), NULL)))
typedef struct _BoxesFetchRecommendedDownloadsFromNetData BoxesFetchRecommendedDownloadsFromNetData;

#define BOXES_TYPE_OS_DATABASE (boxes_os_database_get_type ())
#define BOXES_OS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_OS_DATABASE, BoxesOSDatabase))
#define BOXES_OS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_OS_DATABASE, BoxesOSDatabaseClass))
#define BOXES_IS_OS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_OS_DATABASE))
#define BOXES_IS_OS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_OS_DATABASE))
#define BOXES_OS_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_OS_DATABASE, BoxesOSDatabaseClass))

typedef struct _BoxesOSDatabase BoxesOSDatabase;
typedef struct _BoxesOSDatabaseClass BoxesOSDatabaseClass;

#define BOXES_TYPE_MEDIA_MANAGER (boxes_media_manager_get_type ())
#define BOXES_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManager))
#define BOXES_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))
#define BOXES_IS_MEDIA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_IS_MEDIA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MEDIA_MANAGER))
#define BOXES_MEDIA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MEDIA_MANAGER, BoxesMediaManagerClass))

typedef struct _BoxesMediaManager BoxesMediaManager;
typedef struct _BoxesMediaManagerClass BoxesMediaManagerClass;

#define BOXES_TYPE_OS_DATABASE_ERROR (boxes_os_database_error_get_type ())
typedef struct _BoxesParseRecommendedDownloadsFileData BoxesParseRecommendedDownloadsFileData;
#define __vala_GVirStoragePoolInfo_free0(var) ((var == NULL) ? NULL : (var = (_vala_GVirStoragePoolInfo_free (var), NULL)))
typedef struct _BoxesEnsureStoragePoolData BoxesEnsureStoragePoolData;
typedef struct _BoxesGetSystemVirtConnectionData BoxesGetSystemVirtConnectionData;
typedef struct _BoxesCheckSelinuxContextDefaultData BoxesCheckSelinuxContextDefaultData;
typedef struct _BoxesCheckLibvirtKvmData BoxesCheckLibvirtKvmData;
typedef struct _BoxesCheckCpuVtCapabilityData BoxesCheckCpuVtCapabilityData;
typedef struct _BoxesCheckModuleKvmLoadedData BoxesCheckModuleKvmLoadedData;
typedef struct _BoxesCheckStoragePoolData BoxesCheckStoragePoolData;
typedef struct _Block51Data Block51Data;
typedef enum  {
	BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE = -1,
	BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL = 0,
	BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE = 1,
	BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE = 2
} BoxesCPUArchCompatibility;

#define BOXES_TYPE_CPU_ARCH_COMPATIBILITY (boxes_cpu_arch_compatibility_get_type ())

#define BOXES_FDO_TYPE_TIMEDATE1 (boxes_fdo_timedate1_get_type ())
#define BOXES_FDO_TIMEDATE1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_FDO_TYPE_TIMEDATE1, BoxesFdotimedate1))
#define BOXES_FDO_IS_TIMEDATE1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_FDO_TYPE_TIMEDATE1))
#define BOXES_FDO_TIMEDATE1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_FDO_TYPE_TIMEDATE1, BoxesFdotimedate1Iface))

typedef struct _BoxesFdotimedate1 BoxesFdotimedate1;
typedef struct _BoxesFdotimedate1Iface BoxesFdotimedate1Iface;

#define BOXES_FDO_TYPE_TIMEDATE1_PROXY (boxes_fdo_timedate1_proxy_get_type ())
typedef GDBusProxy BoxesFdotimedate1Proxy;
typedef GDBusProxyClass BoxesFdotimedate1ProxyClass;
typedef struct _BoxesMoveConfigsFromCacheData BoxesMoveConfigsFromCacheData;
typedef struct _BoxesMoveConfigFromCacheData BoxesMoveConfigFromCacheData;
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))

struct _BoxesGetRecommendedDownloadsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GList* result;
	GList* _tmp0_;
};

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

struct _BoxesAppWindow {
	HdyApplicationWindow parent_instance;
	BoxesAppWindowPrivate * priv;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesToastOverlay* toast_overlay;
	BoxesDisplayPage* display_page;
	HdyStatusPage* empty_boxes;
	BoxesTroubleshootView* troubleshoot_view;
	GtkStack* below_bin;
	GSettings* settings;
};

struct _BoxesAppWindowClass {
	HdyApplicationWindowClass parent_class;
};

struct _BoxesFetchRecommendedDownloadsFromNetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GList* result;
	GSettings* settings;
	BoxesApp* _tmp0_;
	BoxesAppWindow* _tmp1_;
	BoxesAppWindow* _tmp2_;
	GSettings* _tmp3_;
	GSettings* _tmp4_;
	gchar* url;
	GSettings* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GFile* remote_file;
	const gchar* _tmp10_;
	GFile* _tmp11_;
	gchar* cached_path;
	gchar* _tmp12_;
	GFile* cached_file;
	const gchar* _tmp13_;
	GFile* _tmp14_;
	BoxesDownload* download;
	GFile* _tmp15_;
	GFile* _tmp16_;
	BoxesActivityProgress* _tmp17_;
	BoxesActivityProgress* _tmp18_;
	BoxesDownload* _tmp19_;
	BoxesDownload* _tmp20_;
	BoxesDownloader* _tmp21_;
	BoxesDownloader* _tmp22_;
	BoxesDownload* _tmp23_;
	GError* _error_;
	GError* _tmp24_;
	const gchar* _tmp25_;
	GFile* _tmp26_;
	GFile* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	GList* _tmp30_;
	GList* _tmp31_;
	GError* _inner_error0_;
};

typedef enum  {
	BOXES_OS_DATABASE_ERROR_NON_BOOTABLE,
	BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_OS_ID,
	BOXES_OS_DATABASE_ERROR_UNKNOWN_MEDIA_ID
} BoxesOSDatabaseError;
#define BOXES_OS_DATABASE_ERROR boxes_os_database_error_quark ()

struct _BoxesParseRecommendedDownloadsFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gchar* uri;
	GList* result;
	guint8* contents;
	gint contents_length1;
	gint _contents_size_;
	GFile* file;
	GFile* _tmp0_;
	GFile* _tmp1_;
	guint8* _tmp2_;
	gsize _tmp3_;
	GError* e;
	GError* _tmp4_;
	const gchar* _tmp5_;
	xmlDoc* doc;
	guint8* _tmp6_;
	gint _tmp6__length1;
	xmlDoc* _tmp7_;
	xmlDoc* _tmp8_;
	xmlNode* root;
	xmlDoc* _tmp9_;
	xmlNode* _tmp10_;
	gboolean _tmp11_;
	xmlNode* _tmp12_;
	xmlNode* _tmp13_;
	const gchar* _tmp14_;
	GList* list;
	BoxesOSDatabase* os_db;
	BoxesMediaManager* _tmp15_;
	BoxesMediaManager* _tmp16_;
	BoxesOSDatabase* _tmp17_;
	BoxesOSDatabase* _tmp18_;
	BoxesOSDatabase* _tmp19_;
	BoxesOSDatabase* _tmp20_;
	xmlNode* iter;
	xmlNode* _tmp21_;
	xmlNode* _tmp22_;
	gboolean _tmp23_;
	xmlNode* _tmp24_;
	xmlNode* _tmp25_;
	xmlNode* _tmp26_;
	gchar* os_id;
	xmlNode* _tmp27_;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	OsinfoOs* os;
	OsinfoOs* _tmp30_;
	BoxesOSDatabase* _tmp31_;
	const gchar* _tmp32_;
	OsinfoOs* _tmp33_;
	OsinfoOs* _tmp34_;
	BoxesOSDatabase* _tmp35_;
	const gchar* _tmp36_;
	OsinfoOs* _tmp37_;
	OsinfoOs* _tmp38_;
	const gchar* _tmp39_;
	OsinfoMediaList* media_list;
	OsinfoOs* _tmp40_;
	OsinfoMediaList* _tmp41_;
	gboolean _tmp42_;
	OsinfoMediaList* _tmp43_;
	OsinfoMediaList* _tmp44_;
	OsinfoMedia* media;
	OsinfoMediaList* _tmp45_;
	OsinfoEntity* _tmp46_;
	OsinfoMedia* _tmp47_;
	gboolean _tmp48_;
	OsinfoMedia* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gboolean _tmp53_;
	const gchar* _tmp54_;
	OsinfoMedia* _tmp55_;
	OsinfoMedia* _tmp56_;
	xmlNode* child_iter;
	xmlNode* _tmp57_;
	xmlNode* _tmp58_;
	gboolean _tmp59_;
	xmlNode* _tmp60_;
	xmlNode* _tmp61_;
	xmlNode* _tmp62_;
	xmlNode* _tmp63_;
	gchar* content;
	xmlNode* _tmp64_;
	gchar* _tmp65_;
	gchar* node_name;
	xmlNode* _tmp66_;
	const gchar* _tmp67_;
	gchar* _tmp68_;
	const gchar* _tmp69_;
	OsinfoMedia* _tmp70_;
	const gchar* _tmp71_;
	OsinfoMedia* _tmp72_;
	const gchar* _tmp73_;
	const gchar* _tmp74_;
	gchar* _tmp75_;
	GError* _inner_error0_;
};

struct _BoxesEnsureStoragePoolData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GVirConnection* connection;
	GVirStoragePool* result;
	GVirStoragePool* pool;
	GVirStoragePool* _tmp0_;
	GVirStoragePool* _tmp1_;
	GVirConfigStoragePool* config;
	GVirConfigStoragePool* _tmp2_;
	GVirStoragePool* _tmp3_;
	GVirConfigStoragePool* _tmp4_;
	GVirStoragePool* _tmp5_;
	GVirStoragePool* _tmp6_;
	GVirStoragePool* _tmp7_;
	gchar* pool_path;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	GVirStoragePoolInfo* _tmp10_;
	GVirStoragePool* _tmp11_;
	GVirStoragePoolInfo* _tmp12_;
	GVirStoragePool* _tmp13_;
	GVirStoragePool* _tmp14_;
	GVirStoragePool* _tmp15_;
	GError* _inner_error0_;
};

struct _BoxesGetSystemVirtConnectionData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GVirConnection* result;
	GVirConnection* _tmp0_;
	GVirConnection* _tmp1_;
	GVirConnection* _tmp2_;
	GVirConnection* _tmp3_;
	GVirConnection* _tmp4_;
	GVirConnection* _tmp5_;
	GVirConnection* _tmp6_;
	GVirConnection* _tmp7_;
	GVirConnection* _tmp8_;
	GError* _inner_error0_;
};

struct _BoxesCheckSelinuxContextDefaultData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gchar* diagnosis;
	gboolean result;
	gchar* _tmp0_;
	gchar* standard_output;
	gchar** argv;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar** _tmp6_;
	gint argv_length1;
	gint _argv_size_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gchar* _tmp13_;
	gchar** _tmp14_;
	gint _tmp14__length1;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GError* _error_;
	GError* _tmp19_;
	const gchar* _tmp20_;
	GError* _inner_error0_;
};

struct _BoxesCheckLibvirtKvmData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean result;
	gchar* standard_output;
	gchar** argv;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar** _tmp2_;
	gint argv_length1;
	gint _argv_size_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar* _tmp4_;
	gint index;
	const gchar* _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	const gchar* _tmp7_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	const gchar* _tmp9_;
	GError* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* kvm;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	GError* _error_;
	GError* _tmp18_;
	const gchar* _tmp19_;
	GError* _inner_error0_;
};

struct _BoxesCheckCpuVtCapabilityData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean result;
	gboolean _result_;
	GFile* file;
	GFile* _tmp0_;
	GFileInputStream* _tmp1_;
	GFile* _tmp2_;
	GFileInputStream* _tmp3_;
	GDataInputStream* stream;
	GDataInputStream* _tmp4_;
	gchar* line;
	gchar* _tmp5_;
	GDataInputStream* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GError* _error_;
	GError* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GError* _inner_error0_;
};

struct _BoxesCheckModuleKvmLoadedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gboolean result;
	gboolean _result_;
	GFile* file;
	GFile* _tmp0_;
	GFileInputStream* _tmp1_;
	GFile* _tmp2_;
	GFileInputStream* _tmp3_;
	GDataInputStream* stream;
	GDataInputStream* _tmp4_;
	gchar* line;
	gchar* _tmp5_;
	GDataInputStream* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	GError* _error_;
	GError* _tmp11_;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GError* _inner_error0_;
};

struct _BoxesCheckStoragePoolData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gchar* diagnosis;
	gboolean result;
	gchar* pool_path;
	gchar* _tmp0_;
	gchar* standard_output;
	gchar** argv;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	gint argv_length1;
	gint _argv_size_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar* _tmp6_;
	gint index;
	const gchar* _tmp7_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	const gchar* _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length1;
	const gchar* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	const gchar* _tmp13_;
	GError* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	GError* _error_;
	GError* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	gchar* _tmp32_;
	GError* _inner_error0_;
};

struct _Block51Data {
	int _ref_count_;
	GtkWidget* widget;
};

struct _BoxesFdotimedate1Iface {
	GTypeInterface parent_iface;
	gchar* (*get_timezone) (BoxesFdotimedate1* self);
	void (*set_timezone) (BoxesFdotimedate1* self, const gchar* value);
};

struct _BoxesMoveConfigsFromCacheData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
};

struct _BoxesMoveConfigFromCacheData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	gchar* config_name;
	gchar* path;
	gchar* _tmp0_;
	GFile* cache_dir;
	const gchar* _tmp1_;
	GFile* _tmp2_;
	gchar* config_path;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GFileEnumerator* enumerator;
	GFile* _tmp7_;
	GFileEnumerator* _tmp8_;
	GList* files;
	GFileEnumerator* _tmp9_;
	GList* _tmp10_;
	GList* _tmp11_;
	GList* _tmp12_;
	GList* info_collection;
	GList* info_it;
	GFileInfo* _tmp13_;
	GFileInfo* info;
	GFile* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GFileInfo* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	GFile* cache_file;
	const gchar* _tmp20_;
	GFile* _tmp21_;
	const gchar* _tmp22_;
	GFileInfo* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	GFile* config_file;
	const gchar* _tmp26_;
	GFile* _tmp27_;
	GFile* _tmp28_;
	GFile* _tmp29_;
	GFile* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	GFile* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	GFile* _tmp36_;
	GError* _error_;
	GError* _tmp37_;
	const gchar* _tmp38_;
	GError* _inner_error0_;
};

VALA_EXTERN BoxesApp* boxes_app_app;
VALA_EXTERN gboolean boxes_libvirt_bridge_net_checked;
gboolean boxes_libvirt_bridge_net_checked = FALSE;
VALA_EXTERN gboolean boxes_libvirt_bridge_net_available;
gboolean boxes_libvirt_bridge_net_available = FALSE;
VALA_EXTERN GVirConnection* boxes_system_virt_connection;
GVirConnection* boxes_system_virt_connection = NULL;

VALA_EXTERN GtkCssProvider* boxes_load_css (const gchar* css);
VALA_EXTERN GdkPixbuf* boxes_load_asset (const gchar* asset,
                             GError** error);
VALA_EXTERN GtkBuilder* boxes_load_ui (const gchar* ui);
VALA_EXTERN void boxes_get_color (const gchar* desc,
                      GdkRGBA* result);
VALA_EXTERN gchar* boxes_extract_xpath (const gchar* xmldoc,
                            const gchar* xpath,
                            gboolean required,
                            GError** error);
VALA_EXTERN void boxes_widget_remove (GtkWidget* widget);
VALA_EXTERN void boxes_use_list_box_separator (GtkListBoxRow* row,
                                   GtkListBoxRow* before_row);
VALA_EXTERN OsinfoDevice* boxes_find_device_by_prop (OsinfoDeviceList* devices,
                                         const gchar* prop_name,
                                         const gchar* prop_value);
VALA_EXTERN GtkImage* boxes_get_os_logo (OsinfoOs* os,
                             gint size);
VALA_EXTERN void boxes_fetch_os_logo (GtkImage* image,
                          OsinfoOs* os,
                          gint size);
VALA_EXTERN gchar* boxes_get_logo_path (OsinfoOs* os,
                            gchar** extensions,
                            gint extensions_length1);
VALA_EXTERN gchar* boxes_serialize_os_title (OsinfoMedia* media);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void boxes_get_recommended_downloads_data_free (gpointer _data);
VALA_EXTERN void boxes_get_recommended_downloads (GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN GList* boxes_get_recommended_downloads_finish (GAsyncResult* _res_);
static gboolean boxes_get_recommended_downloads_co (BoxesGetRecommendedDownloadsData* _data_);
VALA_EXTERN void boxes_parse_recommended_downloads_file (const gchar* uri,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN GList* boxes_parse_recommended_downloads_file_finish (GAsyncResult* _res_);
static void boxes_get_recommended_downloads_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
static void boxes_fetch_recommended_downloads_from_net_data_free (gpointer _data);
VALA_EXTERN void boxes_fetch_recommended_downloads_from_net (GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
VALA_EXTERN GList* boxes_fetch_recommended_downloads_from_net_finish (GAsyncResult* _res_);
static gboolean boxes_fetch_recommended_downloads_from_net_co (BoxesFetchRecommendedDownloadsFromNetData* _data_);
VALA_EXTERN GType boxes_app_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesApp, g_object_unref)
VALA_EXTERN GType boxes_app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesAppWindow, g_object_unref)
VALA_EXTERN BoxesAppWindow* boxes_app_get_main_window (BoxesApp* self);
VALA_EXTERN GType boxes_ui_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType boxes_ui_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUI, g_object_unref)
VALA_EXTERN GType boxes_searchbar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesSearchbar, g_object_unref)
VALA_EXTERN GType boxes_topbar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesTopbar, g_object_unref)
VALA_EXTERN GType boxes_toast_overlay_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesToastOverlay, g_object_unref)
VALA_EXTERN GType boxes_display_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesDisplayPage, g_object_unref)
VALA_EXTERN GType boxes_troubleshoot_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesTroubleshootView, g_object_unref)
VALA_EXTERN gpointer boxes_download_ref (gpointer instance);
VALA_EXTERN void boxes_download_unref (gpointer instance);
VALA_EXTERN GParamSpec* boxes_param_spec_download (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags);
VALA_EXTERN void boxes_value_set_download (GValue* value,
                               gpointer v_object);
VALA_EXTERN void boxes_value_take_download (GValue* value,
                                gpointer v_object);
VALA_EXTERN gpointer boxes_value_get_download (const GValue* value);
VALA_EXTERN GType boxes_download_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesDownload, boxes_download_unref)
VALA_EXTERN BoxesDownload* boxes_download_new (GFile* remote_file,
                                   GFile* cached_file,
                                   BoxesActivityProgress* progress);
VALA_EXTERN BoxesDownload* boxes_download_construct (GType object_type,
                                         GFile* remote_file,
                                         GFile* cached_file,
                                         BoxesActivityProgress* progress);
VALA_EXTERN GType boxes_downloader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesDownloader, g_object_unref)
VALA_EXTERN BoxesDownloader* boxes_downloader_get_default (void);
VALA_EXTERN void boxes_downloader_download_from_http (BoxesDownloader* self,
                                          BoxesDownload* download,
                                          GCancellable* cancellable,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
VALA_EXTERN void boxes_downloader_download_from_http_finish (BoxesDownloader* self,
                                                 GAsyncResult* _res_,
                                                 GError** error);
static void boxes_fetch_recommended_downloads_from_net_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
static void boxes_parse_recommended_downloads_file_data_free (gpointer _data);
static gboolean boxes_parse_recommended_downloads_file_co (BoxesParseRecommendedDownloadsFileData* _data_);
VALA_EXTERN GType boxes_os_database_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesOSDatabase, g_object_unref)
VALA_EXTERN GType boxes_media_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesMediaManager, g_object_unref)
VALA_EXTERN BoxesMediaManager* boxes_media_manager_get_default (void);
VALA_EXTERN BoxesOSDatabase* boxes_media_manager_get_os_db (BoxesMediaManager* self);
VALA_EXTERN void boxes_os_database_get_os_by_id (BoxesOSDatabase* self,
                                     const gchar* id,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
VALA_EXTERN GQuark boxes_os_database_error_quark (void);
VALA_EXTERN GType boxes_os_database_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN OsinfoOs* boxes_os_database_get_os_by_id_finish (BoxesOSDatabase* self,
                                                 GAsyncResult* _res_,
                                                 GError** error);
static void boxes_parse_recommended_downloads_file_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
VALA_EXTERN void boxes_os_database_get_latest_release_for_os_prefix (BoxesOSDatabase* self,
                                                         const gchar* os_id_prefix,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
VALA_EXTERN OsinfoOs* boxes_os_database_get_latest_release_for_os_prefix_finish (BoxesOSDatabase* self,
                                                                     GAsyncResult* _res_);
static void boxes_ensure_storage_pool_data_free (gpointer _data);
VALA_EXTERN void boxes_ensure_storage_pool (GVirConnection* connection,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN GVirStoragePool* boxes_ensure_storage_pool_finish (GAsyncResult* _res_,
                                                   GError** error);
static gboolean boxes_ensure_storage_pool_co (BoxesEnsureStoragePoolData* _data_);
VALA_EXTERN GVirStoragePool* boxes_get_storage_pool (GVirConnection* connection);
VALA_EXTERN GVirConfigStoragePool* boxes_vm_configurator_get_pool_config (GError** error);
static void boxes_ensure_storage_pool_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_);
static void _vala_GVirStoragePoolInfo_free (GVirStoragePoolInfo* self);
VALA_EXTERN GVirStorageVol* boxes_get_storage_volume (GVirConnection* connection,
                                          GVirDomain* domain);
VALA_EXTERN gboolean boxes_is_libvirt_bridge_net_available (void);
static void boxes_get_system_virt_connection_data_free (gpointer _data);
VALA_EXTERN void boxes_get_system_virt_connection (GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
VALA_EXTERN GVirConnection* boxes_get_system_virt_connection_finish (GAsyncResult* _res_,
                                                         GError** error);
static gboolean boxes_get_system_virt_connection_co (BoxesGetSystemVirtConnectionData* _data_);
static void boxes_get_system_virt_connection_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_);
static void boxes_check_selinux_context_default_data_free (gpointer _data);
VALA_EXTERN void boxes_check_selinux_context_default (GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
VALA_EXTERN gboolean boxes_check_selinux_context_default_finish (GAsyncResult* _res_,
                                                     gchar** diagnosis);
static gboolean boxes_check_selinux_context_default_co (BoxesCheckSelinuxContextDefaultData* _data_);
static void boxes_check_selinux_context_default_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static void boxes_check_libvirt_kvm_data_free (gpointer _data);
VALA_EXTERN void boxes_check_libvirt_kvm (GAsyncReadyCallback _callback_,
                              gpointer _user_data_);
VALA_EXTERN gboolean boxes_check_libvirt_kvm_finish (GAsyncResult* _res_);
static gboolean boxes_check_libvirt_kvm_co (BoxesCheckLibvirtKvmData* _data_);
static void boxes_check_libvirt_kvm_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_);
static void boxes_check_cpu_vt_capability_data_free (gpointer _data);
VALA_EXTERN void boxes_check_cpu_vt_capability (GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN gboolean boxes_check_cpu_vt_capability_finish (GAsyncResult* _res_);
static gboolean boxes_check_cpu_vt_capability_co (BoxesCheckCpuVtCapabilityData* _data_);
static void boxes_check_cpu_vt_capability_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
static void boxes_check_module_kvm_loaded_data_free (gpointer _data);
VALA_EXTERN void boxes_check_module_kvm_loaded (GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN gboolean boxes_check_module_kvm_loaded_finish (GAsyncResult* _res_);
static gboolean boxes_check_module_kvm_loaded_co (BoxesCheckModuleKvmLoadedData* _data_);
static void boxes_check_module_kvm_loaded_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
static void boxes_check_storage_pool_data_free (gpointer _data);
VALA_EXTERN void boxes_check_storage_pool (GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN gboolean boxes_check_storage_pool_finish (GAsyncResult* _res_,
                                          gchar** diagnosis);
static gboolean boxes_check_storage_pool_co (BoxesCheckStoragePoolData* _data_);
static void boxes_check_storage_pool_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_);
VALA_EXTERN void boxes_draw_as_css_box (GtkWidget* widget);
static Block51Data* block51_data_ref (Block51Data* _data51_);
static void block51_data_unref (void * _userdata_);
static gboolean __lambda152_ (Block51Data* _data51_,
                       cairo_t* cr);
static gboolean ___lambda152__gtk_widget_draw (GtkWidget* _sender,
                                        cairo_t* cr,
                                        gpointer self);
VALA_EXTERN GType boxes_cpu_arch_compatibility_get_type (void) G_GNUC_CONST ;
VALA_EXTERN BoxesCPUArchCompatibility boxes_compare_cpu_architectures (const gchar* arch1,
                                                           const gchar* arch2);
VALA_EXTERN GType boxes_fdo_timedate1_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesFdotimedate1, g_object_unref)
VALA_EXTERN GType boxes_fdo_timedate1_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint boxes_fdo_timedate1_register_object (void* object,
                                           GDBusConnection* connection,
                                           const gchar* path,
                                           GError** error);
VALA_EXTERN gchar* boxes_fdo_timedate1_get_timezone (BoxesFdotimedate1* self);
VALA_EXTERN void boxes_fdo_timedate1_set_timezone (BoxesFdotimedate1* self,
                                       const gchar* value);
static GType boxes_fdo_timedate1_get_type_once (void);
static void boxes_fdo_timedate1_proxy_g_signal (GDBusProxy* proxy,
                                         const gchar* sender_name,
                                         const gchar* signal_name,
                                         GVariant* parameters);
static gchar* boxes_fdo_timedate1_dbus_proxy_get_timezone (BoxesFdotimedate1* self);
static void boxes_fdo_timedate1_dbus_proxy_set_timezone (BoxesFdotimedate1* self,
                                                  const gchar* value);
static void boxes_fdo_timedate1_proxy_boxes_fdo_timedate1_interface_init (BoxesFdotimedate1Iface* iface);
static void boxes_fdo_timedate1_dbus_interface_method_call (GDBusConnection* connection,
                                                     const gchar* sender,
                                                     const gchar* object_path,
                                                     const gchar* interface_name,
                                                     const gchar* method_name,
                                                     GVariant* parameters,
                                                     GDBusMethodInvocation* invocation,
                                                     gpointer user_data);
static GVariant* boxes_fdo_timedate1_dbus_interface_get_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GError** error,
                                                           gpointer user_data);
static GVariant* _dbus_boxes_fdo_timedate1_get_timezone (BoxesFdotimedate1* self);
static gboolean boxes_fdo_timedate1_dbus_interface_set_property (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* property_name,
                                                          GVariant* value,
                                                          GError** error,
                                                          gpointer user_data);
static void _dbus_boxes_fdo_timedate1_set_timezone (BoxesFdotimedate1* self,
                                             GVariant* _value);
static void _boxes_fdo_timedate1_unregister_object (gpointer user_data);
VALA_EXTERN gchar* boxes_get_timezone (void);
VALA_EXTERN gchar* boxes_get_timezone_from_systemd (GError** error);
VALA_EXTERN gchar* boxes_get_timezone_from_linux (GError** error);
static void boxes_move_configs_from_cache_data_free (gpointer _data);
VALA_EXTERN void boxes_move_configs_from_cache (GAsyncReadyCallback _callback_,
                                    gpointer _user_data_);
VALA_EXTERN void boxes_move_configs_from_cache_finish (GAsyncResult* _res_);
static gboolean boxes_move_configs_from_cache_co (BoxesMoveConfigsFromCacheData* _data_);
VALA_EXTERN void boxes_move_config_from_cache (const gchar* config_name,
                                   GAsyncReadyCallback _callback_,
                                   gpointer _user_data_);
VALA_EXTERN void boxes_move_config_from_cache_finish (GAsyncResult* _res_);
static void boxes_move_configs_from_cache_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
static void boxes_move_config_from_cache_data_free (gpointer _data);
static gboolean boxes_move_config_from_cache_co (BoxesMoveConfigFromCacheData* _data_);
static void boxes_move_config_from_cache_ready (GObject* source_object,
                                         GAsyncResult* _res_,
                                         gpointer _user_data_);
VALA_EXTERN GdkPixbuf* boxes_paint_empty_frame (gint width,
                                    gint height);
VALA_EXTERN GdkPixbuf* boxes_round_image (GdkPixbuf* source);
VALA_EXTERN GDBusProxy* boxes_create_gnome_settings_dbus_proxy (void);
VALA_EXTERN void boxes_open_permission_settings (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static GRegex* _tmp_regex_0 = NULL;
static GRegex* _tmp_regex_1 = NULL;
static const GDBusMethodInfo * const _boxes_fdo_timedate1_dbus_method_info[] = {NULL};
static const GDBusSignalInfo * const _boxes_fdo_timedate1_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _boxes_fdo_timedate1_dbus_property_info_timezone = {-1, "Timezone", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo * const _boxes_fdo_timedate1_dbus_property_info[] = {&_boxes_fdo_timedate1_dbus_property_info_timezone, NULL};
static const GDBusInterfaceInfo _boxes_fdo_timedate1_dbus_interface_info = {-1, "org.freedesktop.timedate1", (GDBusMethodInfo **) (&_boxes_fdo_timedate1_dbus_method_info), (GDBusSignalInfo **) (&_boxes_fdo_timedate1_dbus_signal_info), (GDBusPropertyInfo **) (&_boxes_fdo_timedate1_dbus_property_info), NULL};
static const GDBusInterfaceVTable _boxes_fdo_timedate1_dbus_interface_vtable = {boxes_fdo_timedate1_dbus_interface_method_call, boxes_fdo_timedate1_dbus_interface_get_property, boxes_fdo_timedate1_dbus_interface_set_property};

GtkCssProvider*
boxes_load_css (const gchar* css)
{
	GtkCssProvider* provider = NULL;
	GtkCssProvider* _tmp0_;
	GError* _inner_error0_ = NULL;
	GtkCssProvider* result;
	g_return_val_if_fail (css != NULL, NULL);
	_tmp0_ = gtk_css_provider_new ();
	provider = _tmp0_;
	{
		GFile* file = NULL;
		gchar* _tmp1_;
		gchar* _tmp2_;
		GFile* _tmp3_;
		GFile* _tmp4_;
		_tmp1_ = g_strconcat ("resource:///org/gnome/Boxes/", css, NULL);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_file_new_for_uri (_tmp2_);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp2_);
		file = _tmp4_;
		gtk_css_provider_load_from_file (provider, file, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (file);
			goto __catch0_g_error;
		}
		_g_object_unref0 (file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = e;
		_tmp6_ = _tmp5_->message;
		g_warning ("util-app.vala:14: loading css: %s", _tmp6_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (provider);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	result = provider;
	return result;
}

GdkPixbuf*
boxes_load_asset (const gchar* asset,
                  GError** error)
{
	GdkPixbuf* _tmp0_ = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GdkPixbuf* _tmp3_;
	GdkPixbuf* _tmp4_;
	GdkPixbuf* _tmp5_;
	GError* _inner_error0_ = NULL;
	GdkPixbuf* result;
	g_return_val_if_fail (asset != NULL, NULL);
	_tmp1_ = g_strconcat ("/org/gnome/Boxes/icons/", asset, NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = gdk_pixbuf_new_from_resource (_tmp2_, &_inner_error0_);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	_tmp0_ = _tmp4_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp5_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp5_;
	_g_object_unref0 (_tmp0_);
	return result;
}

GtkBuilder*
boxes_load_ui (const gchar* ui)
{
	GtkBuilder* builder = NULL;
	GtkBuilder* _tmp0_;
	GError* _inner_error0_ = NULL;
	GtkBuilder* result;
	g_return_val_if_fail (ui != NULL, NULL);
	_tmp0_ = gtk_builder_new ();
	builder = _tmp0_;
	{
		gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = g_strconcat ("/org/gnome/Boxes/ui/", ui, NULL, NULL);
		_tmp2_ = _tmp1_;
		gtk_builder_add_from_resource (builder, _tmp2_, &_inner_error0_);
		_g_free0 (_tmp2_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e->message;
		g_error ("util-app.vala:28: Failed to load UI file '%s': %s", ui, _tmp3_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (builder);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	result = builder;
	return result;
}

void
boxes_get_color (const gchar* desc,
                 GdkRGBA* result)
{
	GdkRGBA color = {0};
	g_return_if_fail (desc != NULL);
	memset (&color, 0, sizeof (GdkRGBA));
	gdk_rgba_parse (&color, desc);
	*result = color;
	return;
}

gchar*
boxes_extract_xpath (const gchar* xmldoc,
                     const gchar* xpath,
                     gboolean required,
                     GError** error)
{
	xmlParserCtxt* parser = NULL;
	xmlParserCtxt* _tmp0_;
	xmlDoc* doc = NULL;
	xmlParserCtxt* _tmp1_;
	xmlDoc* _tmp2_;
	xmlDoc* _tmp3_;
	xmlXPathContext* ctxt = NULL;
	xmlDoc* _tmp5_;
	xmlXPathContext* _tmp6_;
	xmlXPathObject* obj = NULL;
	xmlXPathContext* _tmp7_;
	xmlXPathObject* _tmp8_;
	gboolean _tmp9_ = FALSE;
	xmlXPathObject* _tmp10_;
	xmlXPathObject* _tmp17_;
	xmlXPathObject* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (xmldoc != NULL, NULL);
	g_return_val_if_fail (xpath != NULL, NULL);
	_tmp0_ = xmlNewParserCtxt ();
	parser = _tmp0_;
	_tmp1_ = parser;
	_tmp2_ = xmlCtxtReadDoc (_tmp1_, (xmlChar*) xmldoc, "doc.xml", NULL, 0);
	doc = _tmp2_;
	_tmp3_ = doc;
	if (_tmp3_ == NULL) {
		GError* _tmp4_;
		_tmp4_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, "Can't parse XML doc");
		_inner_error0_ = _tmp4_;
		if (_inner_error0_->domain == BOXES_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_xmlFreeParserCtxt0 (parser);
			return NULL;
		} else {
			_xmlFreeParserCtxt0 (parser);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp5_ = doc;
	_tmp6_ = xmlXPathNewContext (_tmp5_);
	ctxt = _tmp6_;
	_tmp7_ = ctxt;
	_tmp8_ = xmlXPathEval ((xmlChar*) xpath, _tmp7_);
	obj = _tmp8_;
	_tmp10_ = obj;
	if (_tmp10_ == NULL) {
		_tmp9_ = TRUE;
	} else {
		xmlXPathObject* _tmp11_;
		const gchar* _tmp12_;
		_tmp11_ = obj;
		_tmp12_ = _tmp11_->stringval;
		_tmp9_ = _tmp12_ == NULL;
	}
	if (_tmp9_) {
		if (required) {
			gchar* _tmp13_;
			gchar* _tmp14_;
			GError* _tmp15_;
			GError* _tmp16_;
			_tmp13_ = g_strconcat ("Failed to extract xpath ", xpath, NULL);
			_tmp14_ = _tmp13_;
			_tmp15_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _tmp14_);
			_tmp16_ = _tmp15_;
			_g_free0 (_tmp14_);
			_inner_error0_ = _tmp16_;
			if (_inner_error0_->domain == BOXES_ERROR) {
				g_propagate_error (error, _inner_error0_);
				_xmlXPathFreeContext0 (ctxt);
				_xmlFreeParserCtxt0 (parser);
				return NULL;
			} else {
				_xmlXPathFreeContext0 (ctxt);
				_xmlFreeParserCtxt0 (parser);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return NULL;
			}
		} else {
			result = NULL;
			_xmlXPathFreeContext0 (ctxt);
			_xmlFreeParserCtxt0 (parser);
			return result;
		}
	}
	_tmp17_ = obj;
	if (_tmp17_->type != XPATH_STRING) {
		gchar* _tmp18_;
		gchar* _tmp19_;
		GError* _tmp20_;
		GError* _tmp21_;
		_tmp18_ = g_strconcat ("Failed to extract xpath ", xpath, NULL);
		_tmp19_ = _tmp18_;
		_tmp20_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, _tmp19_);
		_tmp21_ = _tmp20_;
		_g_free0 (_tmp19_);
		_inner_error0_ = _tmp21_;
		if (_inner_error0_->domain == BOXES_ERROR) {
			g_propagate_error (error, _inner_error0_);
			_xmlXPathFreeContext0 (ctxt);
			_xmlFreeParserCtxt0 (parser);
			return NULL;
		} else {
			_xmlXPathFreeContext0 (ctxt);
			_xmlFreeParserCtxt0 (parser);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	_tmp22_ = obj;
	_tmp23_ = _tmp22_->stringval;
	_tmp24_ = g_strdup (_tmp23_);
	result = _tmp24_;
	_xmlXPathFreeContext0 (ctxt);
	_xmlFreeParserCtxt0 (parser);
	return result;
}

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

void
boxes_widget_remove (GtkWidget* widget)
{
	GtkContainer* container = NULL;
	GtkContainer* _tmp0_;
	GtkContainer* _tmp1_;
	GtkContainer* _tmp2_;
	GtkContainer* _tmp3_;
	g_return_if_fail (widget != NULL);
	_tmp0_ = gtk_widget_get_parent (widget);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_container_get_type ()) ? ((GtkContainer*) _tmp0_) : NULL);
	container = _tmp1_;
	_tmp2_ = container;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (container);
		return;
	}
	_tmp3_ = container;
	gtk_container_remove (_tmp3_, widget);
	_g_object_unref0 (container);
}

void
boxes_use_list_box_separator (GtkListBoxRow* row,
                              GtkListBoxRow* before_row)
{
	GtkWidget* current = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	g_return_if_fail (row != NULL);
	if (before_row == NULL) {
		gtk_list_box_row_set_header (row, NULL);
		return;
	}
	_tmp0_ = gtk_list_box_row_get_header (row);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	current = _tmp1_;
	_tmp2_ = current;
	if (_tmp2_ == NULL) {
		GtkSeparator* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp5_;
		_tmp3_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
		g_object_ref_sink (_tmp3_);
		_g_object_unref0 (current);
		current = (GtkWidget*) _tmp3_;
		_tmp4_ = current;
		gtk_widget_set_visible (_tmp4_, TRUE);
		_tmp5_ = current;
		gtk_list_box_row_set_header (row, _tmp5_);
	}
	_g_object_unref0 (current);
}

OsinfoDevice*
boxes_find_device_by_prop (OsinfoDeviceList* devices,
                           const gchar* prop_name,
                           const gchar* prop_value)
{
	OsinfoFilter* filter = NULL;
	OsinfoFilter* _tmp0_;
	OsinfoFilter* _tmp1_;
	OsinfoList* osinfo_list = NULL;
	OsinfoList* _tmp2_;
	OsinfoList* filtered = NULL;
	OsinfoList* _tmp3_;
	OsinfoFilter* _tmp4_;
	OsinfoList* _tmp5_;
	OsinfoList* _tmp6_;
	OsinfoDevice* result;
	g_return_val_if_fail (devices != NULL, NULL);
	g_return_val_if_fail (prop_name != NULL, NULL);
	g_return_val_if_fail (prop_value != NULL, NULL);
	_tmp0_ = osinfo_filter_new ();
	filter = _tmp0_;
	_tmp1_ = filter;
	osinfo_filter_add_constraint (_tmp1_, prop_name, prop_value);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (devices, osinfo_list_get_type ()) ? ((OsinfoList*) devices) : NULL);
	osinfo_list = _tmp2_;
	_tmp3_ = osinfo_list;
	_tmp4_ = filter;
	_tmp5_ = osinfo_list_new_filtered (_tmp3_, _tmp4_);
	filtered = _tmp5_;
	_tmp6_ = filtered;
	if (osinfo_list_get_length (_tmp6_) > 0) {
		OsinfoList* _tmp7_;
		OsinfoEntity* _tmp8_;
		OsinfoDevice* _tmp9_;
		_tmp7_ = filtered;
		_tmp8_ = osinfo_list_get_nth (_tmp7_, 0);
		_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, osinfo_device_get_type ()) ? ((OsinfoDevice*) _tmp8_) : NULL);
		result = _tmp9_;
		_g_object_unref0 (filtered);
		_g_object_unref0 (osinfo_list);
		_g_object_unref0 (filter);
		return result;
	} else {
		result = NULL;
		_g_object_unref0 (filtered);
		_g_object_unref0 (osinfo_list);
		_g_object_unref0 (filter);
		return result;
	}
}

GtkImage*
boxes_get_os_logo (OsinfoOs* os,
                   gint size)
{
	GtkImage* image = NULL;
	GtkImage* _tmp0_;
	GtkImage* _tmp1_;
	GtkImage* result;
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("media-optical", (GtkIconSize) 0);
	g_object_ref_sink (_tmp0_);
	image = _tmp0_;
	_tmp1_ = image;
	gtk_image_set_pixel_size (_tmp1_, size);
	if (os != NULL) {
		GtkImage* _tmp2_;
		_tmp2_ = image;
		boxes_fetch_os_logo (_tmp2_, os, size);
	}
	result = image;
	return result;
}

void
boxes_fetch_os_logo (GtkImage* image,
                     OsinfoOs* os,
                     gint size)
{
	gchar* path = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (image != NULL);
	g_return_if_fail (os != NULL);
	_tmp0_ = g_strdup (".svg");
	_tmp1_ = g_strdup (".png");
	_tmp2_ = g_strdup (".jpg");
	_tmp3_ = g_new0 (gchar*, 3 + 1);
	_tmp3_[0] = _tmp0_;
	_tmp3_[1] = _tmp1_;
	_tmp3_[2] = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp4__length1 = 3;
	_tmp5_ = boxes_get_logo_path (os, _tmp4_, (gint) 3);
	_tmp6_ = _tmp5_;
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
	path = _tmp6_;
	_tmp7_ = path;
	if (_tmp7_ == NULL) {
		_g_free0 (path);
		return;
	}
	{
		GdkPixbuf* pixbuf = NULL;
		const gchar* _tmp8_;
		GdkPixbuf* _tmp9_;
		GdkPixbuf* _tmp10_;
		_tmp8_ = path;
		_tmp9_ = gdk_pixbuf_new_from_file_at_size (_tmp8_, size, -1, &_inner_error0_);
		pixbuf = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp10_ = pixbuf;
		gtk_image_set_from_pixbuf (image, _tmp10_);
		_g_object_unref0 (pixbuf);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		const gchar* _tmp11_;
		GError* _tmp12_;
		const gchar* _tmp13_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp11_ = path;
		_tmp12_ = _error_;
		_tmp13_ = _tmp12_->message;
		g_warning ("util-app.vala:118: Error loading logo file '%s': %s", _tmp11_, _tmp13_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_free0 (path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	_g_free0 (path);
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

gchar*
boxes_serialize_os_title (OsinfoMedia* media)
{
	gchar* title = NULL;
	gchar* _tmp0_;
	gchar* variant = NULL;
	gchar* _tmp1_;
	OsinfoOsVariantList* variants = NULL;
	OsinfoOsVariantList* _tmp2_;
	OsinfoProduct* product = NULL;
	OsinfoOs* _tmp3_;
	OsinfoOs* _tmp4_;
	OsinfoProduct* _tmp5_;
	gchar* media_url = NULL;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gboolean _tmp10_;
	gchar* variant_id = NULL;
	gchar* _tmp15_;
	OsinfoOsVariantList* _tmp16_;
	gboolean _tmp26_ = FALSE;
	const gchar* _tmp27_;
	gchar* subvariant = NULL;
	gchar* _tmp58_;
	const gchar* _tmp59_;
	gboolean _tmp63_ = FALSE;
	const gchar* _tmp64_;
	gchar* _tmp77_ = NULL;
	gboolean _tmp78_;
	gboolean _tmp79_;
	gchar* is_live = NULL;
	gchar* _tmp84_;
	const gchar* _tmp85_;
	const gchar* _tmp86_;
	gchar* _tmp87_;
	gchar* _tmp88_;
	gchar* _tmp89_;
	const gchar* _tmp90_;
	const gchar* _tmp91_;
	const gchar* _tmp92_;
	const gchar* _tmp93_;
	gchar* _tmp94_;
	const gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* result;
	g_return_val_if_fail (media != NULL, NULL);
	_tmp0_ = g_strdup ("unknown");
	title = _tmp0_;
	_tmp1_ = g_strdup ("");
	variant = _tmp1_;
	_tmp2_ = osinfo_media_get_os_variants (media);
	variants = _tmp2_;
	g_object_get (media, "os", &_tmp3_, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, osinfo_product_get_type ()) ? ((OsinfoProduct*) _tmp4_) : NULL;
	if (_tmp5_ == NULL) {
		_g_object_unref0 (_tmp4_);
	}
	product = _tmp5_;
	_tmp6_ = g_strdup ("");
	media_url = _tmp6_;
	g_object_get (media, "url", &_tmp7_, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_ != NULL;
	_g_free0 (_tmp9_);
	if (_tmp10_) {
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		g_object_get (media, "url", &_tmp11_, NULL);
		_tmp12_ = _tmp11_;
		_tmp13_ = _tmp12_;
		_tmp14_ = g_ascii_strdown (_tmp13_, (gssize) -1);
		_g_free0 (media_url);
		media_url = _tmp14_;
		_g_free0 (_tmp13_);
	}
	_tmp15_ = g_strdup ("");
	variant_id = _tmp15_;
	_tmp16_ = variants;
	if (osinfo_list_get_length ((OsinfoList*) _tmp16_) > 0) {
		OsinfoOsVariant* os_variant = NULL;
		OsinfoOsVariantList* _tmp17_;
		OsinfoEntity* _tmp18_;
		OsinfoOsVariant* _tmp19_;
		OsinfoOsVariant* _tmp20_;
		const gchar* _tmp21_;
		gchar* _tmp22_;
		OsinfoOsVariant* _tmp23_;
		const gchar* _tmp24_;
		gchar* _tmp25_;
		_tmp17_ = variants;
		_tmp18_ = osinfo_list_get_nth ((OsinfoList*) _tmp17_, 0);
		_tmp19_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, osinfo_os_variant_get_type ()) ? ((OsinfoOsVariant*) _tmp18_) : NULL);
		os_variant = _tmp19_;
		_tmp20_ = os_variant;
		_tmp21_ = osinfo_os_variant_get_name (_tmp20_);
		_tmp22_ = g_strdup (_tmp21_);
		_g_free0 (variant);
		variant = _tmp22_;
		_tmp23_ = os_variant;
		_tmp24_ = osinfo_entity_get_param_value ((OsinfoEntity*) _tmp23_, "id");
		_tmp25_ = g_strdup (_tmp24_);
		_g_free0 (variant_id);
		variant_id = _tmp25_;
		_g_object_unref0 (os_variant);
	}
	_tmp27_ = variant;
	if (g_strcmp0 (_tmp27_, "") == 0) {
		OsinfoProduct* _tmp28_;
		const gchar* _tmp29_;
		const gchar* _tmp30_;
		_tmp28_ = product;
		_tmp29_ = osinfo_product_get_name (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp26_ = _tmp30_ != NULL;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		OsinfoProduct* _tmp31_;
		const gchar* _tmp32_;
		const gchar* _tmp33_;
		gchar* _tmp34_;
		gboolean _tmp35_ = FALSE;
		const gchar* _tmp36_;
		_tmp31_ = product;
		_tmp32_ = osinfo_product_get_name (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = g_strdup (_tmp33_);
		_g_free0 (variant);
		variant = _tmp34_;
		_tmp36_ = variant_id;
		if (string_contains (_tmp36_, "server")) {
			_tmp35_ = TRUE;
		} else {
			gboolean _tmp37_ = FALSE;
			gchar* _tmp38_;
			gchar* _tmp39_;
			gchar* _tmp40_;
			gboolean _tmp41_;
			g_object_get (media, "url", &_tmp38_, NULL);
			_tmp39_ = _tmp38_;
			_tmp40_ = _tmp39_;
			_tmp41_ = _tmp40_ != NULL;
			_g_free0 (_tmp40_);
			if (_tmp41_) {
				const gchar* _tmp42_;
				_tmp42_ = media_url;
				_tmp37_ = string_contains (_tmp42_, "server");
			} else {
				_tmp37_ = FALSE;
			}
			_tmp35_ = _tmp37_;
		}
		if (_tmp35_) {
			const gchar* _tmp43_;
			gchar* _tmp44_;
			_tmp43_ = variant;
			_tmp44_ = g_strconcat (_tmp43_, " Server", NULL);
			_g_free0 (variant);
			variant = _tmp44_;
		}
	} else {
		gchar* _tmp45_;
		gchar* _tmp46_;
		gchar* _tmp47_;
		gboolean _tmp48_;
		g_object_get (media, "url", &_tmp45_, NULL);
		_tmp46_ = _tmp45_;
		_tmp47_ = _tmp46_;
		_tmp48_ = _tmp47_ != NULL;
		_g_free0 (_tmp47_);
		if (_tmp48_) {
			GFile* file = NULL;
			gchar* _tmp49_;
			gchar* _tmp50_;
			gchar* _tmp51_;
			GFile* _tmp52_;
			GFile* _tmp53_;
			GFile* _tmp54_;
			gchar* _tmp55_;
			gchar* _tmp56_;
			gchar* _tmp57_;
			g_object_get (media, "url", &_tmp49_, NULL);
			_tmp50_ = _tmp49_;
			_tmp51_ = _tmp50_;
			_tmp52_ = g_file_new_for_uri (_tmp51_);
			_tmp53_ = _tmp52_;
			_g_free0 (_tmp51_);
			file = _tmp53_;
			_tmp54_ = file;
			_tmp55_ = g_file_get_basename (_tmp54_);
			_tmp56_ = _tmp55_;
			_tmp57_ = string_replace (_tmp56_, "_", "");
			_g_free0 (title);
			title = _tmp57_;
			_g_free0 (_tmp56_);
			_g_object_unref0 (file);
		}
	}
	_tmp58_ = g_strdup ("");
	subvariant = _tmp58_;
	_tmp59_ = variant_id;
	if (string_contains (_tmp59_, "netinst")) {
		gchar* _tmp60_;
		_tmp60_ = g_strdup ("(netinst)");
		_g_free0 (subvariant);
		subvariant = _tmp60_;
	} else {
		const gchar* _tmp61_;
		_tmp61_ = variant_id;
		if (string_contains (_tmp61_, "minimal")) {
			gchar* _tmp62_;
			_tmp62_ = g_strdup ("(minimal)");
			_g_free0 (subvariant);
			subvariant = _tmp62_;
		}
	}
	_tmp64_ = subvariant;
	if (g_strcmp0 (_tmp64_, "") == 0) {
		gchar* _tmp65_;
		gchar* _tmp66_;
		gchar* _tmp67_;
		g_object_get (media, "url", &_tmp65_, NULL);
		_tmp66_ = _tmp65_;
		_tmp67_ = _tmp66_;
		_tmp63_ = _tmp67_ != NULL;
		_g_free0 (_tmp67_);
	} else {
		_tmp63_ = FALSE;
	}
	if (_tmp63_) {
		gchar* _tmp68_;
		gchar* _tmp69_;
		gchar* _tmp70_;
		gboolean _tmp71_;
		g_object_get (media, "url", &_tmp68_, NULL);
		_tmp69_ = _tmp68_;
		_tmp70_ = _tmp69_;
		_tmp71_ = string_contains (_tmp70_, "netinst");
		_g_free0 (_tmp70_);
		if (_tmp71_) {
			gchar* _tmp72_;
			_tmp72_ = g_strdup ("(netinst)");
			_g_free0 (subvariant);
			subvariant = _tmp72_;
		} else {
			const gchar* _tmp73_;
			_tmp73_ = media_url;
			if (string_contains (_tmp73_, "minimal")) {
				gchar* _tmp74_;
				_tmp74_ = g_strdup ("(minimal)");
				_g_free0 (subvariant);
				subvariant = _tmp74_;
			} else {
				const gchar* _tmp75_;
				_tmp75_ = media_url;
				if (string_contains (_tmp75_, "dvd")) {
					gchar* _tmp76_;
					_tmp76_ = g_strdup ("(DVD)");
					_g_free0 (subvariant);
					subvariant = _tmp76_;
				}
			}
		}
	}
	g_object_get (media, "live", &_tmp78_, NULL);
	_tmp79_ = _tmp78_;
	if (_tmp79_) {
		gchar* _tmp80_;
		gchar* _tmp81_;
		gchar* _tmp82_;
		_tmp80_ = g_strconcat (" (", _ ("Live"), NULL);
		_tmp81_ = _tmp80_;
		_tmp82_ = g_strconcat (_tmp81_, ")", NULL);
		_g_free0 (_tmp77_);
		_tmp77_ = _tmp82_;
		_g_free0 (_tmp81_);
	} else {
		gchar* _tmp83_;
		_tmp83_ = g_strdup ("");
		_g_free0 (_tmp77_);
		_tmp77_ = _tmp83_;
	}
	_tmp84_ = g_strdup (_tmp77_);
	is_live = _tmp84_;
	_tmp85_ = variant;
	_tmp86_ = string_to_string (_tmp85_);
	g_object_get (media, "architecture", &_tmp87_, NULL);
	_tmp88_ = _tmp87_;
	_tmp89_ = _tmp88_;
	_tmp90_ = string_to_string (_tmp89_);
	_tmp91_ = subvariant;
	_tmp92_ = string_to_string (_tmp91_);
	_tmp93_ = string_to_string (is_live);
	_tmp94_ = g_strconcat (_tmp86_, " ", _tmp90_, " ", _tmp92_, " ", _tmp93_, NULL);
	_g_free0 (title);
	title = _tmp94_;
	_g_free0 (_tmp89_);
	_tmp95_ = title;
	_tmp96_ = string_replace (_tmp95_, "  ", "");
	result = _tmp96_;
	_g_free0 (is_live);
	_g_free0 (_tmp77_);
	_g_free0 (subvariant);
	_g_free0 (variant_id);
	_g_free0 (media_url);
	_g_object_unref0 (product);
	_g_object_unref0 (variants);
	_g_free0 (variant);
	_g_free0 (title);
	return result;
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
boxes_get_recommended_downloads_data_free (gpointer _data)
{
	BoxesGetRecommendedDownloadsData* _data_;
	_data_ = _data;
	(_data_->result == NULL) ? NULL : (_data_->result = (_g_list_free__g_object_unref0_ (_data_->result), NULL));
	g_slice_free (BoxesGetRecommendedDownloadsData, _data_);
}

void
boxes_get_recommended_downloads (GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	BoxesGetRecommendedDownloadsData* _data_;
	_data_ = g_slice_new0 (BoxesGetRecommendedDownloadsData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_get_recommended_downloads_data_free);
	boxes_get_recommended_downloads_co (_data_);
}

GList*
boxes_get_recommended_downloads_finish (GAsyncResult* _res_)
{
	GList* result;
	BoxesGetRecommendedDownloadsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_get_recommended_downloads_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	BoxesGetRecommendedDownloadsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_get_recommended_downloads_co (_data_);
}

static gboolean
boxes_get_recommended_downloads_co (BoxesGetRecommendedDownloadsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	boxes_parse_recommended_downloads_file ("resource:///org/gnome/Boxes/recommended-downloads.xml", boxes_get_recommended_downloads_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp0_ = boxes_parse_recommended_downloads_file_finish (_data_->_res_);
	_data_->result = _data_->_tmp0_;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_fetch_recommended_downloads_from_net_data_free (gpointer _data)
{
	BoxesFetchRecommendedDownloadsFromNetData* _data_;
	_data_ = _data;
	(_data_->result == NULL) ? NULL : (_data_->result = (_g_list_free__g_object_unref0_ (_data_->result), NULL));
	g_slice_free (BoxesFetchRecommendedDownloadsFromNetData, _data_);
}

void
boxes_fetch_recommended_downloads_from_net (GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	BoxesFetchRecommendedDownloadsFromNetData* _data_;
	_data_ = g_slice_new0 (BoxesFetchRecommendedDownloadsFromNetData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_fetch_recommended_downloads_from_net_data_free);
	boxes_fetch_recommended_downloads_from_net_co (_data_);
}

GList*
boxes_fetch_recommended_downloads_from_net_finish (GAsyncResult* _res_)
{
	GList* result;
	BoxesFetchRecommendedDownloadsFromNetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_fetch_recommended_downloads_from_net_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	BoxesFetchRecommendedDownloadsFromNetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_fetch_recommended_downloads_from_net_co (_data_);
}

static gboolean
boxes_fetch_recommended_downloads_from_net_co (BoxesFetchRecommendedDownloadsFromNetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_app_app;
	_data_->_tmp1_ = boxes_app_get_main_window (_data_->_tmp0_);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = _data_->_tmp2_->settings;
	_data_->_tmp4_ = _g_object_ref0 (_data_->_tmp3_);
	_data_->settings = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->settings;
	_data_->_tmp6_ = g_settings_get_string (_data_->_tmp5_, "recommended-downloads-url");
	_data_->url = _data_->_tmp6_;
	_data_->_tmp8_ = _data_->url;
	if (_data_->_tmp8_ == NULL) {
		_data_->_tmp7_ = TRUE;
	} else {
		_data_->_tmp9_ = _data_->url;
		_data_->_tmp7_ = g_strcmp0 (_data_->_tmp9_, "") == 0;
	}
	if (_data_->_tmp7_) {
		_data_->result = NULL;
		_g_free0 (_data_->url);
		_g_object_unref0 (_data_->settings);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp10_ = _data_->url;
	_data_->_tmp11_ = g_file_new_for_uri (_data_->_tmp10_);
	_data_->remote_file = _data_->_tmp11_;
	_data_->_tmp12_ = boxes_get_logo_cache ("recommended-downloads.xml");
	_data_->cached_path = _data_->_tmp12_;
	_data_->_tmp13_ = _data_->cached_path;
	_data_->_tmp14_ = g_file_new_for_path (_data_->_tmp13_);
	_data_->cached_file = _data_->_tmp14_;
	_data_->_tmp15_ = _data_->remote_file;
	_data_->_tmp16_ = _data_->cached_file;
	_data_->_tmp17_ = boxes_activity_progress_new ();
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = boxes_download_new (_data_->_tmp15_, _data_->_tmp16_, _data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	_g_object_unref0 (_data_->_tmp18_);
	_data_->download = _data_->_tmp20_;
	{
		_data_->_tmp21_ = boxes_downloader_get_default ();
		_data_->_tmp22_ = _data_->_tmp21_;
		_data_->_tmp23_ = _data_->download;
		_data_->_state_ = 1;
		boxes_downloader_download_from_http (_data_->_tmp22_, _data_->_tmp23_, NULL, boxes_fetch_recommended_downloads_from_net_ready, _data_);
		return FALSE;
		_state_1:
		boxes_downloader_download_from_http_finish (_data_->_tmp22_, _data_->_res_, &_data_->_inner_error0_);
		_g_object_unref0 (_data_->_tmp22_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp24_ = _data_->_error_;
		_data_->_tmp25_ = _data_->_tmp24_->message;
		g_message ("util-app.vala:199: Failed to download recommended-downloads file: %s", _data_->_tmp25_);
		_data_->_tmp26_ = _data_->cached_file;
		if (!g_file_query_exists (_data_->_tmp26_, NULL)) {
			_data_->result = NULL;
			_g_error_free0 (_data_->_error_);
			_boxes_download_unref0 (_data_->download);
			_g_object_unref0 (_data_->cached_file);
			_g_free0 (_data_->cached_path);
			_g_object_unref0 (_data_->remote_file);
			_g_free0 (_data_->url);
			_g_object_unref0 (_data_->settings);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_boxes_download_unref0 (_data_->download);
		_g_object_unref0 (_data_->cached_file);
		_g_free0 (_data_->cached_path);
		_g_object_unref0 (_data_->remote_file);
		_g_free0 (_data_->url);
		_g_object_unref0 (_data_->settings);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp27_ = _data_->cached_file;
	_data_->_tmp28_ = g_file_get_uri (_data_->_tmp27_);
	_data_->_tmp29_ = _data_->_tmp28_;
	_data_->_state_ = 2;
	boxes_parse_recommended_downloads_file (_data_->_tmp29_, boxes_fetch_recommended_downloads_from_net_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp30_ = boxes_parse_recommended_downloads_file_finish (_data_->_res_);
	_data_->_tmp31_ = _data_->_tmp30_;
	_g_free0 (_data_->_tmp29_);
	_data_->result = _data_->_tmp31_;
	_boxes_download_unref0 (_data_->download);
	_g_object_unref0 (_data_->cached_file);
	_g_free0 (_data_->cached_path);
	_g_object_unref0 (_data_->remote_file);
	_g_free0 (_data_->url);
	_g_object_unref0 (_data_->settings);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_parse_recommended_downloads_file_data_free (gpointer _data)
{
	BoxesParseRecommendedDownloadsFileData* _data_;
	_data_ = _data;
	_g_free0 (_data_->uri);
	(_data_->result == NULL) ? NULL : (_data_->result = (_g_list_free__g_object_unref0_ (_data_->result), NULL));
	g_slice_free (BoxesParseRecommendedDownloadsFileData, _data_);
}

void
boxes_parse_recommended_downloads_file (const gchar* uri,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	BoxesParseRecommendedDownloadsFileData* _data_;
	gchar* _tmp0_;
	g_return_if_fail (uri != NULL);
	_data_ = g_slice_new0 (BoxesParseRecommendedDownloadsFileData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_parse_recommended_downloads_file_data_free);
	_tmp0_ = g_strdup (uri);
	_g_free0 (_data_->uri);
	_data_->uri = _tmp0_;
	boxes_parse_recommended_downloads_file_co (_data_);
}

GList*
boxes_parse_recommended_downloads_file_finish (GAsyncResult* _res_)
{
	GList* result;
	BoxesParseRecommendedDownloadsFileData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_parse_recommended_downloads_file_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	BoxesParseRecommendedDownloadsFileData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_parse_recommended_downloads_file_co (_data_);
}

static gboolean
boxes_parse_recommended_downloads_file_co (BoxesParseRecommendedDownloadsFileData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->contents_length1 = 0;
	_data_->_contents_size_ = 0;
	{
		_data_->_tmp0_ = g_file_new_for_uri (_data_->uri);
		_data_->file = _data_->_tmp0_;
		_data_->_tmp1_ = _data_->file;
		_data_->_tmp2_ = NULL;
		_data_->_tmp3_ = 0;
		g_file_load_contents (_data_->_tmp1_, NULL, &_data_->_tmp2_, &_data_->_tmp3_, NULL, &_data_->_inner_error0_);
		_data_->contents = (g_free (_data_->contents), NULL);
		_data_->contents = _data_->_tmp2_;
		_data_->contents_length1 = _data_->_tmp3_;
		_data_->_contents_size_ = _data_->contents_length1;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->file);
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->file);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp4_ = _data_->e;
		_data_->_tmp5_ = _data_->_tmp4_->message;
		g_warning ("util-app.vala:216: Failed to load recommended downloads file: %s", _data_->_tmp5_);
		_data_->result = NULL;
		_g_error_free0 (_data_->e);
		_data_->contents = (g_free (_data_->contents), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_data_->contents = (g_free (_data_->contents), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = _data_->contents;
	_data_->_tmp6__length1 = _data_->contents_length1;
	_data_->_tmp7_ = xmlParseDoc ((xmlChar*) ((const gchar*) _data_->_tmp6_));
	_data_->doc = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->doc;
	if (_data_->_tmp8_ == NULL) {
		_data_->result = NULL;
		_data_->contents = (g_free (_data_->contents), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp9_ = _data_->doc;
	_data_->_tmp10_ = xmlDocGetRootElement (_data_->_tmp9_);
	_data_->root = _data_->_tmp10_;
	_data_->_tmp12_ = _data_->root;
	if (_data_->_tmp12_ == NULL) {
		_data_->_tmp11_ = TRUE;
	} else {
		_data_->_tmp13_ = _data_->root;
		_data_->_tmp14_ = _data_->_tmp13_->name;
		_data_->_tmp11_ = g_strcmp0 (_data_->_tmp14_, "list") != 0;
	}
	if (_data_->_tmp11_) {
		g_warning ("util-app.vala:227: Failed to parse recommended downloads");
		_data_->result = NULL;
		_data_->contents = (g_free (_data_->contents), NULL);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->list = NULL;
	_data_->_tmp15_ = boxes_media_manager_get_default ();
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp17_ = boxes_media_manager_get_os_db (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = _g_object_ref0 (_data_->_tmp18_);
	_data_->_tmp20_ = _data_->_tmp19_;
	_g_object_unref0 (_data_->_tmp16_);
	_data_->os_db = _data_->_tmp20_;
	{
		_data_->_tmp21_ = _data_->root;
		_data_->_tmp22_ = _data_->_tmp21_->children;
		_data_->iter = _data_->_tmp22_;
		{
			_data_->_tmp23_ = TRUE;
			while (TRUE) {
				if (!_data_->_tmp23_) {
					_data_->_tmp24_ = _data_->iter;
					_data_->_tmp25_ = _data_->_tmp24_->next;
					_data_->iter = _data_->_tmp25_;
				}
				_data_->_tmp23_ = FALSE;
				_data_->_tmp26_ = _data_->iter;
				if (!(_data_->_tmp26_ != NULL)) {
					break;
				}
				_data_->_tmp27_ = _data_->iter;
				_data_->_tmp28_ = (gchar*) xmlGetProp (_data_->_tmp27_, (xmlChar*) "id");
				_data_->os_id = _data_->_tmp28_;
				_data_->_tmp29_ = _data_->os_id;
				if (_data_->_tmp29_ == NULL) {
					_g_free0 (_data_->os_id);
					continue;
				}
				{
					_data_->_tmp31_ = _data_->os_db;
					_data_->_tmp32_ = _data_->os_id;
					_data_->_state_ = 1;
					boxes_os_database_get_os_by_id (_data_->_tmp31_, _data_->_tmp32_, boxes_parse_recommended_downloads_file_ready, _data_);
					return FALSE;
					_state_1:
					_data_->_tmp33_ = boxes_os_database_get_os_by_id_finish (_data_->_tmp31_, _data_->_res_, &_data_->_inner_error0_);
					_data_->_tmp30_ = _data_->_tmp33_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == BOXES_OS_DATABASE_ERROR) {
							goto __catch1_boxes_os_database_error;
						}
						_g_object_unref0 (_data_->os);
						_g_free0 (_data_->os_id);
						_g_object_unref0 (_data_->os_db);
						(_data_->list == NULL) ? NULL : (_data_->list = (_g_list_free__g_object_unref0_ (_data_->list), NULL));
						_data_->contents = (g_free (_data_->contents), NULL);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp34_ = _data_->_tmp30_;
					_data_->_tmp30_ = NULL;
					_g_object_unref0 (_data_->os);
					_data_->os = _data_->_tmp34_;
					_g_object_unref0 (_data_->_tmp30_);
				}
				goto __finally1;
				__catch1_boxes_os_database_error:
				{
					g_clear_error (&_data_->_inner_error0_);
					_data_->_tmp35_ = _data_->os_db;
					_data_->_tmp36_ = _data_->os_id;
					_data_->_state_ = 2;
					boxes_os_database_get_latest_release_for_os_prefix (_data_->_tmp35_, _data_->_tmp36_, boxes_parse_recommended_downloads_file_ready, _data_);
					return FALSE;
					_state_2:
					_data_->_tmp37_ = boxes_os_database_get_latest_release_for_os_prefix_finish (_data_->_tmp35_, _data_->_res_);
					_g_object_unref0 (_data_->os);
					_data_->os = _data_->_tmp37_;
				}
				__finally1:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_object_unref0 (_data_->os);
					_g_free0 (_data_->os_id);
					_g_object_unref0 (_data_->os_db);
					(_data_->list == NULL) ? NULL : (_data_->list = (_g_list_free__g_object_unref0_ (_data_->list), NULL));
					_data_->contents = (g_free (_data_->contents), NULL);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
					g_clear_error (&_data_->_inner_error0_);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_data_->_tmp38_ = _data_->os;
				if (_data_->_tmp38_ == NULL) {
					_data_->_tmp39_ = _data_->os_id;
					g_warning ("util-app.vala:248: Failed to load %s", _data_->_tmp39_);
					_g_object_unref0 (_data_->os);
					_g_free0 (_data_->os_id);
					continue;
				}
				_data_->_tmp40_ = _data_->os;
				_data_->_tmp41_ = osinfo_os_get_media_list (_data_->_tmp40_);
				_data_->media_list = _data_->_tmp41_;
				_data_->_tmp43_ = _data_->media_list;
				if (_data_->_tmp43_ == NULL) {
					_data_->_tmp42_ = TRUE;
				} else {
					_data_->_tmp44_ = _data_->media_list;
					_data_->_tmp42_ = osinfo_list_get_length ((OsinfoList*) _data_->_tmp44_) == 0;
				}
				if (_data_->_tmp42_) {
					_g_object_unref0 (_data_->media_list);
					_g_object_unref0 (_data_->os);
					_g_free0 (_data_->os_id);
					continue;
				}
				_data_->_tmp45_ = _data_->media_list;
				_data_->_tmp46_ = osinfo_list_get_nth ((OsinfoList*) _data_->_tmp45_, 0);
				_data_->_tmp47_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp46_, osinfo_media_get_type ()) ? ((OsinfoMedia*) _data_->_tmp46_) : NULL);
				_data_->media = _data_->_tmp47_;
				_data_->_tmp49_ = _data_->media;
				g_object_get (_data_->_tmp49_, "url", &_data_->_tmp50_, NULL);
				_data_->_tmp51_ = _data_->_tmp50_;
				_data_->_tmp52_ = _data_->_tmp51_;
				_data_->_tmp53_ = _data_->_tmp52_ != NULL;
				_g_free0 (_data_->_tmp52_);
				if (_data_->_tmp53_) {
					_data_->_tmp48_ = TRUE;
				} else {
					_data_->_tmp54_ = _data_->os_id;
					_data_->_tmp48_ = g_str_has_prefix (_data_->_tmp54_, "http://redhat.com");
				}
				if (_data_->_tmp48_) {
					_data_->_tmp55_ = _data_->media;
					_data_->_tmp56_ = _g_object_ref0 (_data_->_tmp55_);
					_data_->list = g_list_append (_data_->list, _data_->_tmp56_);
				}
				{
					_data_->_tmp57_ = _data_->iter;
					_data_->_tmp58_ = _data_->_tmp57_->children;
					_data_->child_iter = _data_->_tmp58_;
					{
						_data_->_tmp59_ = TRUE;
						while (TRUE) {
							if (!_data_->_tmp59_) {
								_data_->_tmp60_ = _data_->child_iter;
								_data_->_tmp61_ = _data_->_tmp60_->next;
								_data_->child_iter = _data_->_tmp61_;
							}
							_data_->_tmp59_ = FALSE;
							_data_->_tmp62_ = _data_->child_iter;
							if (!(_data_->_tmp62_ != NULL)) {
								break;
							}
							_data_->_tmp63_ = _data_->child_iter;
							if (_data_->_tmp63_->type != XML_ELEMENT_NODE) {
								continue;
							}
							_data_->_tmp64_ = _data_->child_iter;
							_data_->_tmp65_ = (gchar*) xmlNodeGetContent (_data_->_tmp64_);
							_data_->content = _data_->_tmp65_;
							_data_->_tmp66_ = _data_->child_iter;
							_data_->_tmp67_ = _data_->_tmp66_->name;
							_data_->_tmp68_ = g_strdup (_data_->_tmp67_);
							_data_->node_name = _data_->_tmp68_;
							_data_->_tmp69_ = _data_->node_name;
							if (g_strcmp0 (_data_->_tmp69_, "url") == 0) {
								_data_->_tmp70_ = _data_->media;
								_data_->_tmp71_ = _data_->content;
								g_object_set (_data_->_tmp70_, "url", _data_->_tmp71_, NULL);
							} else {
								_data_->_tmp72_ = _data_->media;
								_data_->_tmp73_ = _data_->node_name;
								_data_->_tmp74_ = _data_->content;
								_data_->_tmp75_ = g_strdup (_data_->_tmp74_);
								g_object_set_data_full ((GObject*) _data_->_tmp72_, _data_->_tmp73_, _data_->_tmp75_, g_free);
							}
							_g_free0 (_data_->node_name);
							_g_free0 (_data_->content);
						}
					}
				}
				_g_object_unref0 (_data_->media);
				_g_object_unref0 (_data_->media_list);
				_g_object_unref0 (_data_->os);
				_g_free0 (_data_->os_id);
			}
		}
	}
	_data_->result = _data_->list;
	_g_object_unref0 (_data_->os_db);
	_data_->contents = (g_free (_data_->contents), NULL);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_ensure_storage_pool_data_free (gpointer _data)
{
	BoxesEnsureStoragePoolData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->connection);
	_g_object_unref0 (_data_->result);
	g_slice_free (BoxesEnsureStoragePoolData, _data_);
}

void
boxes_ensure_storage_pool (GVirConnection* connection,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_)
{
	BoxesEnsureStoragePoolData* _data_;
	GVirConnection* _tmp0_;
	g_return_if_fail (connection != NULL);
	_data_ = g_slice_new0 (BoxesEnsureStoragePoolData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_ensure_storage_pool_data_free);
	_tmp0_ = _g_object_ref0 (connection);
	_g_object_unref0 (_data_->connection);
	_data_->connection = _tmp0_;
	boxes_ensure_storage_pool_co (_data_);
}

GVirStoragePool*
boxes_ensure_storage_pool_finish (GAsyncResult* _res_,
                                  GError** error)
{
	GVirStoragePool* result;
	BoxesEnsureStoragePoolData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_ensure_storage_pool_ready (GObject* source_object,
                                 GAsyncResult* _res_,
                                 gpointer _user_data_)
{
	BoxesEnsureStoragePoolData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_ensure_storage_pool_co (_data_);
}

static void
_vala_GVirStoragePoolInfo_free (GVirStoragePoolInfo* self)
{
	g_boxed_free (gvir_storage_pool_info_get_type (), self);
}

static gboolean
boxes_ensure_storage_pool_co (BoxesEnsureStoragePoolData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_get_storage_pool (_data_->connection);
	_data_->pool = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->pool;
	if (_data_->_tmp1_ == NULL) {
		g_debug ("util-app.vala:280: Creating storage pool..");
		_data_->_tmp2_ = boxes_vm_configurator_get_pool_config (&_data_->_inner_error0_);
		_data_->config = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->pool);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp4_ = _data_->config;
		_data_->_tmp5_ = gvir_connection_create_storage_pool (_data_->connection, _data_->_tmp4_, (guint) 0, &_data_->_inner_error0_);
		_data_->_tmp3_ = _data_->_tmp5_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->pool);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp6_ = _data_->_tmp3_;
		_data_->_tmp3_ = NULL;
		_g_object_unref0 (_data_->pool);
		_data_->pool = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->pool;
		_data_->_state_ = 1;
		gvir_storage_pool_build_async (_data_->_tmp7_, (guint) 0, NULL, boxes_ensure_storage_pool_ready, _data_);
		return FALSE;
		_state_1:
		gvir_storage_pool_build_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			_g_object_unref0 (_data_->_tmp3_);
			_g_object_unref0 (_data_->config);
			_g_object_unref0 (_data_->pool);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		g_debug ("util-app.vala:284: Created storage pool.");
		_g_object_unref0 (_data_->_tmp3_);
		_g_object_unref0 (_data_->config);
	}
	_data_->_tmp8_ = boxes_get_user_pkgdata ("images");
	_data_->pool_path = _data_->_tmp8_;
	_data_->_tmp9_ = _data_->pool_path;
	boxes_ensure_directory (_data_->_tmp9_);
	_data_->_tmp11_ = _data_->pool;
	_data_->_tmp12_ = gvir_storage_pool_get_info (_data_->_tmp11_, &_data_->_inner_error0_);
	_data_->_tmp10_ = _data_->_tmp12_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_free0 (_data_->pool_path);
		_g_object_unref0 (_data_->pool);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	if (_data_->_tmp10_->state == GVIR_STORAGE_POOL_STATE_INACTIVE) {
		_data_->_tmp13_ = _data_->pool;
		_data_->_state_ = 2;
		gvir_storage_pool_start_async (_data_->_tmp13_, (guint) 0, NULL, boxes_ensure_storage_pool_ready, _data_);
		return FALSE;
		_state_2:
		gvir_storage_pool_start_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
			__vala_GVirStoragePoolInfo_free0 (_data_->_tmp10_);
			_g_free0 (_data_->pool_path);
			_g_object_unref0 (_data_->pool);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	_data_->_tmp14_ = _data_->pool;
	_data_->_state_ = 3;
	gvir_storage_pool_refresh_async (_data_->_tmp14_, NULL, boxes_ensure_storage_pool_ready, _data_);
	return FALSE;
	_state_3:
	gvir_storage_pool_refresh_finish (_data_->_tmp14_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		__vala_GVirStoragePoolInfo_free0 (_data_->_tmp10_);
		_g_free0 (_data_->pool_path);
		_g_object_unref0 (_data_->pool);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp15_ = _data_->pool;
	gvir_storage_pool_set_autostart (_data_->_tmp15_, TRUE, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		__vala_GVirStoragePoolInfo_free0 (_data_->_tmp10_);
		_g_free0 (_data_->pool_path);
		_g_object_unref0 (_data_->pool);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->pool;
	__vala_GVirStoragePoolInfo_free0 (_data_->_tmp10_);
	_g_free0 (_data_->pool_path);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

GVirStoragePool*
boxes_get_storage_pool (GVirConnection* connection)
{
	GVirStoragePool* _tmp0_;
	GVirStoragePool* result;
	g_return_val_if_fail (connection != NULL, NULL);
	_tmp0_ = gvir_connection_find_storage_pool_by_name (connection, PACKAGE_TARNAME);
	result = _tmp0_;
	return result;
}

GVirStorageVol*
boxes_get_storage_volume (GVirConnection* connection,
                          GVirDomain* domain)
{
	GVirStoragePool* pool = NULL;
	GVirStoragePool* _tmp0_;
	GVirStoragePool* _tmp1_;
	GVirStoragePool* _tmp2_;
	const gchar* _tmp3_;
	GVirStorageVol* _tmp4_;
	GVirStorageVol* result;
	g_return_val_if_fail (connection != NULL, NULL);
	g_return_val_if_fail (domain != NULL, NULL);
	_tmp0_ = boxes_get_storage_pool (connection);
	pool = _tmp0_;
	_tmp1_ = pool;
	if (_tmp1_ == NULL) {
		result = NULL;
		_g_object_unref0 (pool);
		return result;
	}
	_tmp2_ = pool;
	_tmp3_ = gvir_domain_get_name (domain);
	_tmp4_ = gvir_storage_pool_get_volume (_tmp2_, _tmp3_);
	result = _tmp4_;
	_g_object_unref0 (pool);
	return result;
}

static gchar
string_get (const gchar* self,
            glong index)
{
	gchar _tmp0_;
	gchar result;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = ((gchar*) self)[index];
	result = _tmp0_;
	return result;
}

gboolean
boxes_is_libvirt_bridge_net_available (void)
{
	GError* _inner_error0_ = NULL;
	gboolean result;
	if (boxes_libvirt_bridge_net_checked) {
		result = boxes_libvirt_bridge_net_available;
		return result;
	}
	{
		gint sock = 0;
		struct ifreq req = {0};
		gchar* if_name = NULL;
		gchar* _tmp1_;
		gboolean _tmp8_ = FALSE;
		gint _tmp9_;
		GFile* file = NULL;
		GFile* _tmp12_;
		guint8* contents = NULL;
		gint contents_length1 = 0;
		gint _contents_size_ = 0;
		guint8* _tmp20_;
		gint _tmp20__length1;
		sock = socket (AF_INET, SOCK_STREAM, 0);
		if (sock < 0) {
			GError* _tmp0_;
			_tmp0_ = g_error_new ((GQuark) G_IO_ERROR, g_io_error_from_errno (errno), "Failed to create a socket");
			_inner_error0_ = (GError*) _tmp0_;
			goto __catch0_g_error;
		}
		memset (&req, 0, sizeof (struct ifreq));
		_tmp1_ = g_strdup ("virbr0");
		if_name = _tmp1_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp2_ = FALSE;
				_tmp2_ = TRUE;
				while (TRUE) {
					const gchar* _tmp4_;
					gint _tmp5_;
					gint _tmp6_;
					const gchar* _tmp7_;
					if (!_tmp2_) {
						gint _tmp3_;
						_tmp3_ = i;
						i = _tmp3_ + 1;
					}
					_tmp2_ = FALSE;
					_tmp4_ = if_name;
					_tmp5_ = strlen (_tmp4_);
					_tmp6_ = _tmp5_;
					if (!(i <= _tmp6_)) {
						break;
					}
					_tmp7_ = if_name;
					req.ifr_name[i] = (gchar) string_get (_tmp7_, (glong) i);
				}
			}
		}
		_tmp9_ = ioctl (sock, SIOCGIFFLAGS, &req);
		if (_tmp9_ < 0) {
			_tmp8_ = TRUE;
		} else {
			struct ifreq _tmp10_;
			_tmp10_ = req;
			_tmp8_ = !((_tmp10_.ifr_flags & IFF_UP) == IFF_UP);
		}
		if (_tmp8_) {
			const gchar* _tmp11_;
			_tmp11_ = if_name;
			g_debug ("util-app.vala:334: Interface '%s' is either not available or not up.", _tmp11_);
			result = FALSE;
			_g_free0 (if_name);
			 (&req);
			return result;
		}
		_tmp12_ = g_file_new_for_path ("/etc/qemu/bridge.conf");
		file = _tmp12_;
		{
			GFile* _tmp13_;
			guint8* _tmp14_ = NULL;
			gsize _tmp15_ = 0;
			_tmp13_ = file;
			g_file_load_contents (_tmp13_, NULL, &_tmp14_, &_tmp15_, NULL, &_inner_error0_);
			contents = (g_free (contents), NULL);
			contents = _tmp14_;
			contents_length1 = _tmp15_;
			_contents_size_ = contents_length1;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (g_error_matches (_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
					goto __catch1_g_io_error_not_found;
				}
				goto __finally1;
			}
		}
		goto __finally1;
		__catch1_g_io_error_not_found:
		{
			GFile* _tmp16_;
			GFile* _tmp17_;
			guint8* _tmp18_ = NULL;
			gsize _tmp19_ = 0;
			g_clear_error (&_inner_error0_);
			_tmp16_ = g_file_new_for_path ("/etc/qemu-kvm/bridge.conf");
			_g_object_unref0 (file);
			file = _tmp16_;
			_tmp17_ = file;
			g_file_load_contents (_tmp17_, NULL, &_tmp18_, &_tmp19_, NULL, &_inner_error0_);
			contents = (g_free (contents), NULL);
			contents = _tmp18_;
			contents_length1 = _tmp19_;
			_contents_size_ = contents_length1;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __finally1;
			}
		}
		__finally1:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			contents = (g_free (contents), NULL);
			_g_object_unref0 (file);
			_g_free0 (if_name);
			 (&req);
			goto __catch0_g_error;
		}
		_tmp20_ = contents;
		_tmp20__length1 = contents_length1;
		boxes_libvirt_bridge_net_available = g_regex_match_simple ("(?m)^allow.*virbr0", (const gchar*) _tmp20_, 0, 0);
		contents = (g_free (contents), NULL);
		_g_object_unref0 (file);
		_g_free0 (if_name);
		 (&req);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp21_;
		const gchar* _tmp22_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp21_ = _error_;
		_tmp22_ = _tmp21_->message;
		g_debug ("util-app.vala:351: %s", _tmp22_);
		boxes_libvirt_bridge_net_available = FALSE;
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp23_ = FALSE;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp23_;
	}
	boxes_libvirt_bridge_net_checked = TRUE;
	result = boxes_libvirt_bridge_net_available;
	return result;
}

static void
boxes_get_system_virt_connection_data_free (gpointer _data)
{
	BoxesGetSystemVirtConnectionData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->result);
	g_slice_free (BoxesGetSystemVirtConnectionData, _data_);
}

void
boxes_get_system_virt_connection (GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	BoxesGetSystemVirtConnectionData* _data_;
	_data_ = g_slice_new0 (BoxesGetSystemVirtConnectionData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_get_system_virt_connection_data_free);
	boxes_get_system_virt_connection_co (_data_);
}

GVirConnection*
boxes_get_system_virt_connection_finish (GAsyncResult* _res_,
                                         GError** error)
{
	GVirConnection* result;
	BoxesGetSystemVirtConnectionData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
boxes_get_system_virt_connection_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	BoxesGetSystemVirtConnectionData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_get_system_virt_connection_co (_data_);
}

static gboolean
boxes_get_system_virt_connection_co (BoxesGetSystemVirtConnectionData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_system_virt_connection;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = boxes_system_virt_connection;
		_data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
		_data_->result = _data_->_tmp2_;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = gvir_connection_new ("qemu+unix:///system");
	_g_object_unref0 (boxes_system_virt_connection);
	boxes_system_virt_connection = _data_->_tmp3_;
	_data_->_tmp4_ = boxes_system_virt_connection;
	_data_->_state_ = 1;
	gvir_connection_open_read_only_async (_data_->_tmp4_, NULL, boxes_get_system_virt_connection_ready, _data_);
	return FALSE;
	_state_1:
	gvir_connection_open_read_only_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_debug ("util-app.vala:371: Connected to system libvirt, now fetching domains..");
	_data_->_tmp5_ = boxes_system_virt_connection;
	_data_->_state_ = 2;
	gvir_connection_fetch_domains_async (_data_->_tmp5_, NULL, boxes_get_system_virt_connection_ready, _data_);
	return FALSE;
	_state_2:
	gvir_connection_fetch_domains_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = boxes_system_virt_connection;
	_data_->_state_ = 3;
	gvir_connection_fetch_networks_async (_data_->_tmp6_, NULL, boxes_get_system_virt_connection_ready, _data_);
	return FALSE;
	_state_3:
	gvir_connection_fetch_networks_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error0_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp7_ = boxes_system_virt_connection;
	_data_->_tmp8_ = _g_object_ref0 (_data_->_tmp7_);
	_data_->result = _data_->_tmp8_;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

gchar*
boxes_get_logo_path (OsinfoOs* os,
                     gchar** extensions,
                     gint extensions_length1)
{
	gchar* path = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GFile* file = NULL;
	const gchar* _tmp7_;
	GFile* _tmp8_;
	GFile* _tmp9_;
	GFile* _tmp18_;
	gchar* result;
	g_return_val_if_fail (os != NULL, NULL);
	if (extensions_length1 == 0) {
		result = NULL;
		return result;
	}
	_tmp0_ = osinfo_product_get_short_id ((OsinfoProduct*) os);
	_tmp1_ = _tmp0_;
	_tmp2_ = extensions[0];
	_tmp3_ = g_strconcat (_tmp1_, _tmp2_, NULL);
	_tmp4_ = _tmp3_;
	_tmp5_ = boxes_get_pixmap (_tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	path = _tmp6_;
	_tmp7_ = path;
	_tmp8_ = g_file_new_for_path (_tmp7_);
	file = _tmp8_;
	_tmp9_ = file;
	if (!g_file_query_exists (_tmp9_, NULL)) {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		const gchar* _tmp16_;
		GFile* _tmp17_;
		_tmp10_ = osinfo_os_get_distro (os);
		_tmp11_ = _tmp10_;
		_tmp12_ = extensions[0];
		_tmp13_ = g_strconcat (_tmp11_, _tmp12_, NULL);
		_tmp14_ = _tmp13_;
		_tmp15_ = boxes_get_pixmap (_tmp14_);
		_g_free0 (path);
		path = _tmp15_;
		_g_free0 (_tmp14_);
		_tmp16_ = path;
		_tmp17_ = g_file_new_for_path (_tmp16_);
		_g_object_unref0 (file);
		file = _tmp17_;
	}
	_tmp18_ = file;
	if (g_file_query_exists (_tmp18_, NULL)) {
		result = path;
		_g_object_unref0 (file);
		return result;
	} else {
		gchar* _tmp19_;
		_tmp19_ = boxes_get_logo_path (os, extensions + 1, (gint) (extensions_length1 - 1));
		result = _tmp19_;
		_g_object_unref0 (file);
		_g_free0 (path);
		return result;
	}
}

static void
boxes_check_selinux_context_default_data_free (gpointer _data)
{
	BoxesCheckSelinuxContextDefaultData* _data_;
	_data_ = _data;
	g_slice_free (BoxesCheckSelinuxContextDefaultData, _data_);
}

void
boxes_check_selinux_context_default (GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	BoxesCheckSelinuxContextDefaultData* _data_;
	_data_ = g_slice_new0 (BoxesCheckSelinuxContextDefaultData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_check_selinux_context_default_data_free);
	boxes_check_selinux_context_default_co (_data_);
}

gboolean
boxes_check_selinux_context_default_finish (GAsyncResult* _res_,
                                            gchar** diagnosis)
{
	gboolean result;
	BoxesCheckSelinuxContextDefaultData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (diagnosis) {
		*diagnosis = _data_->diagnosis;
	} else {
		_g_free0 (_data_->diagnosis);
	}
	_data_->diagnosis = NULL;
	result = _data_->result;
	return result;
}

static void
boxes_check_selinux_context_default_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	BoxesCheckSelinuxContextDefaultData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_check_selinux_context_default_co (_data_);
}

static gchar*
_vala_g_strjoinv (const gchar* separator,
                  gchar** str_array,
                  gint str_array_length1)
{
	gboolean _tmp0_ = FALSE;
	gchar* result;
	if (separator == NULL) {
		separator = "";
	}
	if (str_array != NULL) {
		gboolean _tmp1_ = FALSE;
		if (str_array_length1 > 0) {
			_tmp1_ = TRUE;
		} else {
			gboolean _tmp2_ = FALSE;
			if (str_array_length1 == -1) {
				const gchar* _tmp3_;
				_tmp3_ = str_array[0];
				_tmp2_ = _tmp3_ != NULL;
			} else {
				_tmp2_ = FALSE;
			}
			_tmp1_ = _tmp2_;
		}
		_tmp0_ = _tmp1_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp16_;
		gint _tmp17_;
		const gchar* res = NULL;
		void* _tmp18_;
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		void* ptr = NULL;
		const gchar* _tmp22_;
		void* _tmp23_;
		const gchar* _tmp33_;
		len = (gsize) 1;
		{
			gboolean _tmp4_ = FALSE;
			i = 0;
			_tmp4_ = TRUE;
			while (TRUE) {
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				gint _tmp10_ = 0;
				const gchar* _tmp11_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = i;
					i = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				if (str_array_length1 != -1) {
					_tmp7_ = i < str_array_length1;
				} else {
					_tmp7_ = FALSE;
				}
				if (_tmp7_) {
					_tmp6_ = TRUE;
				} else {
					gboolean _tmp8_ = FALSE;
					if (str_array_length1 == -1) {
						const gchar* _tmp9_;
						_tmp9_ = str_array[i];
						_tmp8_ = _tmp9_ != NULL;
					} else {
						_tmp8_ = FALSE;
					}
					_tmp6_ = _tmp8_;
				}
				if (!_tmp6_) {
					break;
				}
				_tmp11_ = str_array[i];
				if (_tmp11_ != NULL) {
					const gchar* _tmp12_;
					gint _tmp13_;
					gint _tmp14_;
					_tmp12_ = str_array[i];
					_tmp13_ = strlen ((const gchar*) _tmp12_);
					_tmp14_ = _tmp13_;
					_tmp10_ = _tmp14_;
				} else {
					_tmp10_ = 0;
				}
				len += (gsize) _tmp10_;
			}
		}
		if (i == 0) {
			gchar* _tmp15_;
			_tmp15_ = g_strdup ("");
			result = _tmp15_;
			return result;
		}
		str_array_length1 = i;
		_tmp16_ = strlen ((const gchar*) separator);
		_tmp17_ = _tmp16_;
		len += (gsize) (_tmp17_ * (i - 1));
		_tmp18_ = g_malloc (len);
		res = _tmp18_;
		_tmp20_ = str_array[0];
		if (_tmp20_ != NULL) {
			const gchar* _tmp21_;
			_tmp21_ = str_array[0];
			_tmp19_ = (const gchar*) _tmp21_;
		} else {
			_tmp19_ = "";
		}
		_tmp22_ = res;
		_tmp23_ = g_stpcpy ((void*) _tmp22_, _tmp19_);
		ptr = _tmp23_;
		{
			gboolean _tmp24_ = FALSE;
			i = 1;
			_tmp24_ = TRUE;
			while (TRUE) {
				void* _tmp26_;
				void* _tmp27_;
				const gchar* _tmp28_ = NULL;
				const gchar* _tmp29_;
				void* _tmp31_;
				void* _tmp32_;
				if (!_tmp24_) {
					gint _tmp25_;
					_tmp25_ = i;
					i = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				if (!(i < str_array_length1)) {
					break;
				}
				_tmp26_ = ptr;
				_tmp27_ = g_stpcpy (_tmp26_, (const gchar*) separator);
				ptr = _tmp27_;
				_tmp29_ = str_array[i];
				if (_tmp29_ != NULL) {
					const gchar* _tmp30_;
					_tmp30_ = str_array[i];
					_tmp28_ = (const gchar*) _tmp30_;
				} else {
					_tmp28_ = "";
				}
				_tmp31_ = ptr;
				_tmp32_ = g_stpcpy (_tmp31_, _tmp28_);
				ptr = _tmp32_;
			}
		}
		_tmp33_ = res;
		res = NULL;
		result = (gchar*) _tmp33_;
		return result;
	} else {
		gchar* _tmp34_;
		_tmp34_ = g_strdup ("");
		result = _tmp34_;
		return result;
	}
}

static gboolean
boxes_check_selinux_context_default_co (BoxesCheckSelinuxContextDefaultData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_strdup ("");
	_g_free0 (_data_->diagnosis);
	_data_->diagnosis = _data_->_tmp0_;
	{
		_data_->_tmp1_ = g_strdup ("restorecon");
		_data_->_tmp2_ = g_strdup ("-nrv");
		_data_->_tmp3_ = boxes_get_user_pkgconfig (NULL);
		_data_->_tmp4_ = boxes_get_user_pkgdata (NULL);
		_data_->_tmp5_ = boxes_get_user_pkgcache (NULL);
		_data_->_tmp6_ = g_new0 (gchar*, 5 + 1);
		_data_->_tmp6_[0] = _data_->_tmp1_;
		_data_->_tmp6_[1] = _data_->_tmp2_;
		_data_->_tmp6_[2] = _data_->_tmp3_;
		_data_->_tmp6_[3] = _data_->_tmp4_;
		_data_->_tmp6_[4] = _data_->_tmp5_;
		_data_->argv = _data_->_tmp6_;
		_data_->argv_length1 = 5;
		_data_->_argv_size_ = _data_->argv_length1;
		_data_->_tmp7_ = _data_->argv;
		_data_->_tmp7__length1 = _data_->argv_length1;
		_data_->_tmp8_ = NULL;
		_data_->_state_ = 1;
		boxes_exec (_data_->_tmp7_, (gint) _data_->_tmp7__length1, NULL, boxes_check_selinux_context_default_ready, _data_);
		return FALSE;
		_state_1:
		boxes_exec_finish (_data_->_res_, &_data_->_tmp8_, NULL, &_data_->_inner_error0_);
		_g_free0 (_data_->standard_output);
		_data_->standard_output = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			if (g_error_matches (_data_->_inner_error0_, G_SPAWN_ERROR, G_SPAWN_ERROR_NOEXEC)) {
				goto __catch0_g_spawn_error_noexec;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp9_ = _data_->standard_output;
		_data_->_tmp10_ = strlen (_data_->_tmp9_);
		_data_->_tmp11_ = _data_->_tmp10_;
		if (_data_->_tmp11_ == 0) {
			_data_->result = TRUE;
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp12_ = _data_->argv;
		_data_->_tmp12__length1 = _data_->argv_length1;
		_data_->_tmp13_ = g_strdup ("-r");
		_g_free0 (_data_->_tmp12_[1]);
		_data_->_tmp12_[1] = _data_->_tmp13_;
		_data_->_tmp14_ = _data_->argv;
		_data_->_tmp14__length1 = _data_->argv_length1;
		_data_->_tmp15_ = _vala_g_strjoinv (" ", _data_->_tmp14_, (gint) _data_->_tmp14__length1);
		_data_->_tmp16_ = _data_->_tmp15_;
		_data_->_tmp17_ = g_strdup_printf (_ ("Your SELinux context looks incorrect, you can try to fix it by running" \
":\n" \
"%s"), _data_->_tmp16_);
		_g_free0 (_data_->diagnosis);
		_data_->diagnosis = _data_->_tmp17_;
		_g_free0 (_data_->_tmp16_);
		_data_->result = FALSE;
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data_->standard_output);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_spawn_error_noexec:
	{
		g_clear_error (&_data_->_inner_error0_);
		_data_->_tmp18_ = g_strdup (_ ("SELinux not installed?"));
		_g_free0 (_data_->diagnosis);
		_data_->diagnosis = _data_->_tmp18_;
		_data_->result = TRUE;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp19_ = _data_->_error_;
		_data_->_tmp20_ = _data_->_tmp19_->message;
		g_warning ("util-app.vala:422: %s", _data_->_tmp20_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->diagnosis);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_check_libvirt_kvm_data_free (gpointer _data)
{
	BoxesCheckLibvirtKvmData* _data_;
	_data_ = _data;
	g_slice_free (BoxesCheckLibvirtKvmData, _data_);
}

void
boxes_check_libvirt_kvm (GAsyncReadyCallback _callback_,
                         gpointer _user_data_)
{
	BoxesCheckLibvirtKvmData* _data_;
	_data_ = g_slice_new0 (BoxesCheckLibvirtKvmData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_check_libvirt_kvm_data_free);
	boxes_check_libvirt_kvm_co (_data_);
}

gboolean
boxes_check_libvirt_kvm_finish (GAsyncResult* _res_)
{
	gboolean result;
	BoxesCheckLibvirtKvmData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
boxes_check_libvirt_kvm_ready (GObject* source_object,
                               GAsyncResult* _res_,
                               gpointer _user_data_)
{
	BoxesCheckLibvirtKvmData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_check_libvirt_kvm_co (_data_);
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static gboolean
boxes_check_libvirt_kvm_co (BoxesCheckLibvirtKvmData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = g_strdup ("virsh");
		_data_->_tmp1_ = g_strdup ("capabilities");
		_data_->_tmp2_ = g_new0 (gchar*, 2 + 1);
		_data_->_tmp2_[0] = _data_->_tmp0_;
		_data_->_tmp2_[1] = _data_->_tmp1_;
		_data_->argv = _data_->_tmp2_;
		_data_->argv_length1 = 2;
		_data_->_argv_size_ = _data_->argv_length1;
		_data_->_tmp3_ = _data_->argv;
		_data_->_tmp3__length1 = _data_->argv_length1;
		_data_->_tmp4_ = NULL;
		_data_->_state_ = 1;
		boxes_exec (_data_->_tmp3_, (gint) _data_->_tmp3__length1, NULL, boxes_check_libvirt_kvm_ready, _data_);
		return FALSE;
		_state_1:
		boxes_exec_finish (_data_->_res_, &_data_->_tmp4_, NULL, &_data_->_inner_error0_);
		_g_free0 (_data_->standard_output);
		_data_->standard_output = _data_->_tmp4_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			if (g_error_matches (_data_->_inner_error0_, G_SPAWN_ERROR, G_SPAWN_ERROR_NOEXEC)) {
				goto __catch0_g_spawn_error_noexec;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp5_ = _data_->standard_output;
		_data_->index = string_index_of (_data_->_tmp5_, "<capabilities", 0);
		if (_data_->index < 0) {
			_data_->_tmp6_ = _data_->argv;
			_data_->_tmp6__length1 = _data_->argv_length1;
			_data_->_tmp7_ = _data_->_tmp6_[0];
			_data_->_tmp8_ = _data_->argv;
			_data_->_tmp8__length1 = _data_->argv_length1;
			_data_->_tmp9_ = _data_->_tmp8_[1];
			_data_->_tmp10_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Unexpected output while running command '%s %s'", _data_->_tmp7_, _data_->_tmp9_);
			_data_->_inner_error0_ = _data_->_tmp10_;
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			if (g_error_matches (_data_->_inner_error0_, G_SPAWN_ERROR, G_SPAWN_ERROR_NOEXEC)) {
				goto __catch0_g_spawn_error_noexec;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp11_ = _data_->standard_output;
		_data_->_tmp12_ = string_substring (_data_->_tmp11_, (glong) _data_->index, (glong) -1);
		_g_free0 (_data_->standard_output);
		_data_->standard_output = _data_->_tmp12_;
		_data_->_tmp13_ = _data_->standard_output;
		_data_->_tmp14_ = boxes_extract_xpath (_data_->_tmp13_, "string(/capabilities/guest[os_type='hvm']/arch/domain[@type='kvm']/../" \
"emulator)", FALSE, &_data_->_inner_error0_);
		_data_->kvm = _data_->_tmp14_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			if (g_error_matches (_data_->_inner_error0_, G_SPAWN_ERROR, G_SPAWN_ERROR_NOEXEC)) {
				goto __catch0_g_spawn_error_noexec;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = _data_->kvm;
		_data_->_tmp16_ = strlen (_data_->_tmp15_);
		_data_->_tmp17_ = _data_->_tmp16_;
		_data_->result = _data_->_tmp17_ != 0;
		_g_free0 (_data_->kvm);
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data_->standard_output);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_g_spawn_error_noexec:
	{
		g_clear_error (&_data_->_inner_error0_);
		g_critical ("util-app.vala:446: libvirt is not installed correctly");
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp18_ = _data_->_error_;
		_data_->_tmp19_ = _data_->_tmp18_->message;
		g_warning ("util-app.vala:448: %s", _data_->_tmp19_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_check_cpu_vt_capability_data_free (gpointer _data)
{
	BoxesCheckCpuVtCapabilityData* _data_;
	_data_ = _data;
	g_slice_free (BoxesCheckCpuVtCapabilityData, _data_);
}

void
boxes_check_cpu_vt_capability (GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	BoxesCheckCpuVtCapabilityData* _data_;
	_data_ = g_slice_new0 (BoxesCheckCpuVtCapabilityData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_check_cpu_vt_capability_data_free);
	boxes_check_cpu_vt_capability_co (_data_);
}

gboolean
boxes_check_cpu_vt_capability_finish (GAsyncResult* _res_)
{
	gboolean result;
	BoxesCheckCpuVtCapabilityData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
boxes_check_cpu_vt_capability_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	BoxesCheckCpuVtCapabilityData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_check_cpu_vt_capability_co (_data_);
}

static inline GRegex*
_thread_safe_regex_init (GRegex** re,
                         const gchar * pattern,
                         GRegexCompileFlags compile_flags)
{
	if (g_once_init_enter ((volatile gsize*) re)) {
		GRegex* val = g_regex_new (pattern, compile_flags, 0, NULL);
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
	}
	return *re;
}

static gboolean
boxes_check_cpu_vt_capability_co (BoxesCheckCpuVtCapabilityData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_result_ = FALSE;
	_data_->_tmp0_ = g_file_new_for_path ("/proc/cpuinfo");
	_data_->file = _data_->_tmp0_;
	{
		_data_->_tmp2_ = _data_->file;
		_data_->_tmp3_ = g_file_read (_data_->_tmp2_, NULL, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp1_);
		_data_->stream = _data_->_tmp4_;
		_data_->line = NULL;
		while (TRUE) {
			_data_->_tmp6_ = _data_->stream;
			_data_->_state_ = 1;
			g_data_input_stream_read_line_async (_data_->_tmp6_, G_PRIORITY_DEFAULT, NULL, boxes_check_cpu_vt_capability_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp7_ = g_data_input_stream_read_line_finish (_data_->_tmp6_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp5_ = _data_->_tmp7_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_free0 (_data_->line);
				_g_object_unref0 (_data_->stream);
				_g_object_unref0 (_data_->_tmp1_);
				goto __catch0_g_error;
			}
			_data_->_tmp8_ = _data_->_tmp5_;
			_data_->_tmp5_ = NULL;
			_g_free0 (_data_->line);
			_data_->line = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->line;
			if (!(_data_->_tmp9_ != NULL)) {
				_g_free0 (_data_->_tmp5_);
				break;
			}
			_data_->_tmp10_ = _data_->line;
			_data_->_result_ = g_regex_match (_thread_safe_regex_init (&_tmp_regex_0, "^flags.*(vmx|svm)", 0), _data_->_tmp10_, 0, NULL);
			if (_data_->_result_) {
				_g_free0 (_data_->_tmp5_);
				break;
			}
			_g_free0 (_data_->_tmp5_);
		}
		_g_free0 (_data_->line);
		_g_object_unref0 (_data_->stream);
		_g_object_unref0 (_data_->_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp11_ = _data_->_error_;
		_data_->_tmp12_ = _data_->_tmp11_->message;
		g_warning ("util-app.vala:467: Failed to read file /proc/cpuinfo: %s", _data_->_tmp12_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp13_ = boxes_yes_no (_data_->_result_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = g_strconcat ("check_cpu_vt_capability: ", _data_->_tmp14_, NULL);
	_data_->_tmp16_ = _data_->_tmp15_;
	g_debug ("util-app.vala:470: %s", _data_->_tmp16_);
	_g_free0 (_data_->_tmp16_);
	_g_free0 (_data_->_tmp14_);
	_data_->result = _data_->_result_;
	_g_object_unref0 (_data_->file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_check_module_kvm_loaded_data_free (gpointer _data)
{
	BoxesCheckModuleKvmLoadedData* _data_;
	_data_ = _data;
	g_slice_free (BoxesCheckModuleKvmLoadedData, _data_);
}

void
boxes_check_module_kvm_loaded (GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	BoxesCheckModuleKvmLoadedData* _data_;
	_data_ = g_slice_new0 (BoxesCheckModuleKvmLoadedData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_check_module_kvm_loaded_data_free);
	boxes_check_module_kvm_loaded_co (_data_);
}

gboolean
boxes_check_module_kvm_loaded_finish (GAsyncResult* _res_)
{
	gboolean result;
	BoxesCheckModuleKvmLoadedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
boxes_check_module_kvm_loaded_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	BoxesCheckModuleKvmLoadedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_check_module_kvm_loaded_co (_data_);
}

static gboolean
boxes_check_module_kvm_loaded_co (BoxesCheckModuleKvmLoadedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_result_ = FALSE;
	_data_->_tmp0_ = g_file_new_for_path ("/proc/modules");
	_data_->file = _data_->_tmp0_;
	{
		_data_->_tmp2_ = _data_->file;
		_data_->_tmp3_ = g_file_read (_data_->_tmp2_, NULL, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp3_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp1_);
		_data_->stream = _data_->_tmp4_;
		_data_->line = NULL;
		while (TRUE) {
			_data_->_tmp6_ = _data_->stream;
			_data_->_state_ = 1;
			g_data_input_stream_read_line_async (_data_->_tmp6_, G_PRIORITY_DEFAULT, NULL, boxes_check_module_kvm_loaded_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp7_ = g_data_input_stream_read_line_finish (_data_->_tmp6_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp5_ = _data_->_tmp7_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_free0 (_data_->line);
				_g_object_unref0 (_data_->stream);
				_g_object_unref0 (_data_->_tmp1_);
				goto __catch0_g_error;
			}
			_data_->_tmp8_ = _data_->_tmp5_;
			_data_->_tmp5_ = NULL;
			_g_free0 (_data_->line);
			_data_->line = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->line;
			if (!(_data_->_tmp9_ != NULL)) {
				_g_free0 (_data_->_tmp5_);
				break;
			}
			_data_->_tmp10_ = _data_->line;
			_data_->_result_ = g_regex_match (_thread_safe_regex_init (&_tmp_regex_1, "^(kvm_intel|kvm_amd)", 0), _data_->_tmp10_, 0, NULL);
			if (_data_->_result_) {
				_g_free0 (_data_->_tmp5_);
				break;
			}
			_g_free0 (_data_->_tmp5_);
		}
		_g_free0 (_data_->line);
		_g_object_unref0 (_data_->stream);
		_g_object_unref0 (_data_->_tmp1_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp11_ = _data_->_error_;
		_data_->_tmp12_ = _data_->_tmp11_->message;
		g_warning ("util-app.vala:487: Failed to read file /proc/modules: %s", _data_->_tmp12_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->file);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp13_ = boxes_yes_no (_data_->_result_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_data_->_tmp15_ = g_strconcat ("check_module_kvm_loaded: ", _data_->_tmp14_, NULL);
	_data_->_tmp16_ = _data_->_tmp15_;
	g_debug ("util-app.vala:490: %s", _data_->_tmp16_);
	_g_free0 (_data_->_tmp16_);
	_g_free0 (_data_->_tmp14_);
	_data_->result = _data_->_result_;
	_g_object_unref0 (_data_->file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_check_storage_pool_data_free (gpointer _data)
{
	BoxesCheckStoragePoolData* _data_;
	_data_ = _data;
	g_slice_free (BoxesCheckStoragePoolData, _data_);
}

void
boxes_check_storage_pool (GAsyncReadyCallback _callback_,
                          gpointer _user_data_)
{
	BoxesCheckStoragePoolData* _data_;
	_data_ = g_slice_new0 (BoxesCheckStoragePoolData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_check_storage_pool_data_free);
	boxes_check_storage_pool_co (_data_);
}

gboolean
boxes_check_storage_pool_finish (GAsyncResult* _res_,
                                 gchar** diagnosis)
{
	gboolean result;
	BoxesCheckStoragePoolData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (diagnosis) {
		*diagnosis = _data_->diagnosis;
	} else {
		_g_free0 (_data_->diagnosis);
	}
	_data_->diagnosis = NULL;
	result = _data_->result;
	return result;
}

static void
boxes_check_storage_pool_ready (GObject* source_object,
                                GAsyncResult* _res_,
                                gpointer _user_data_)
{
	BoxesCheckStoragePoolData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_check_storage_pool_co (_data_);
}

static gboolean
boxes_check_storage_pool_co (BoxesCheckStoragePoolData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_strdup ("");
	_g_free0 (_data_->diagnosis);
	_data_->diagnosis = _data_->_tmp0_;
	{
		_data_->_tmp1_ = g_strdup ("virsh");
		_data_->_tmp2_ = g_strdup ("pool-dumpxml");
		_data_->_tmp3_ = g_strdup (PACKAGE_TARNAME);
		_data_->_tmp4_ = g_new0 (gchar*, 3 + 1);
		_data_->_tmp4_[0] = _data_->_tmp1_;
		_data_->_tmp4_[1] = _data_->_tmp2_;
		_data_->_tmp4_[2] = _data_->_tmp3_;
		_data_->argv = _data_->_tmp4_;
		_data_->argv_length1 = 3;
		_data_->_argv_size_ = _data_->argv_length1;
		_data_->_tmp5_ = _data_->argv;
		_data_->_tmp5__length1 = _data_->argv_length1;
		_data_->_tmp6_ = NULL;
		_data_->_state_ = 1;
		boxes_exec (_data_->_tmp5_, (gint) _data_->_tmp5__length1, NULL, boxes_check_storage_pool_ready, _data_);
		return FALSE;
		_state_1:
		boxes_exec_finish (_data_->_res_, &_data_->_tmp6_, NULL, &_data_->_inner_error0_);
		_g_free0 (_data_->standard_output);
		_data_->standard_output = _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->standard_output;
		_data_->index = string_index_of (_data_->_tmp7_, "<pool", 0);
		if (_data_->index < 0) {
			_data_->_tmp8_ = _data_->argv;
			_data_->_tmp8__length1 = _data_->argv_length1;
			_data_->_tmp9_ = _data_->_tmp8_[0];
			_data_->_tmp10_ = _data_->argv;
			_data_->_tmp10__length1 = _data_->argv_length1;
			_data_->_tmp11_ = _data_->_tmp10_[1];
			_data_->_tmp12_ = _data_->argv;
			_data_->_tmp12__length1 = _data_->argv_length1;
			_data_->_tmp13_ = _data_->_tmp12_[2];
			_data_->_tmp14_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Unexpected output while running command '%s %s %s'", _data_->_tmp9_, _data_->_tmp11_, _data_->_tmp13_);
			_data_->_inner_error0_ = _data_->_tmp14_;
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = _data_->standard_output;
		_data_->_tmp16_ = string_substring (_data_->_tmp15_, (glong) _data_->index, (glong) -1);
		_g_free0 (_data_->standard_output);
		_data_->standard_output = _data_->_tmp16_;
		_data_->_tmp18_ = _data_->standard_output;
		_data_->_tmp19_ = boxes_extract_xpath (_data_->_tmp18_, "string(/pool[@type='dir']/target/path)", FALSE, &_data_->_inner_error0_);
		_data_->_tmp17_ = _data_->_tmp19_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->standard_output);
			goto __catch0_g_error;
		}
		_data_->_tmp20_ = _data_->_tmp17_;
		_data_->_tmp17_ = NULL;
		_g_free0 (_data_->pool_path);
		_data_->pool_path = _data_->_tmp20_;
		_g_free0 (_data_->_tmp17_);
		_data_->argv = (_vala_array_free (_data_->argv, _data_->argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data_->standard_output);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp21_ = _data_->_error_;
		_data_->_tmp22_ = _data_->_tmp21_->message;
		g_debug ("util-app.vala:511: %s", _data_->_tmp22_);
		_data_->_tmp23_ = g_strdup (_ ("Could not get “gnome-boxes” storage pool information from libvirt. Mak" \
"e sure “virsh -c qemu:///session pool-dumpxml gnome-boxes” is working."));
		_g_free0 (_data_->diagnosis);
		_data_->diagnosis = _data_->_tmp23_;
		_data_->result = FALSE;
		_g_error_free0 (_data_->_error_);
		_g_free0 (_data_->pool_path);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->pool_path);
		_g_free0 (_data_->diagnosis);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp24_ = _data_->pool_path;
	if (!g_file_test (_data_->_tmp24_, G_FILE_TEST_EXISTS)) {
		_data_->_tmp25_ = _data_->pool_path;
		_data_->_tmp26_ = g_strdup_printf (_ ("%s is known to libvirt as GNOME Boxes’s storage pool but this director" \
"y does not exist"), _data_->_tmp25_);
		_g_free0 (_data_->diagnosis);
		_data_->diagnosis = _data_->_tmp26_;
		_data_->result = FALSE;
		_g_free0 (_data_->pool_path);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp27_ = _data_->pool_path;
	if (!g_file_test (_data_->_tmp27_, G_FILE_TEST_IS_DIR)) {
		_data_->_tmp28_ = _data_->pool_path;
		_data_->_tmp29_ = g_strdup_printf (_ ("%s is known to libvirt as GNOME Boxes’s storage pool but is not a dire" \
"ctory"), _data_->_tmp28_);
		_g_free0 (_data_->diagnosis);
		_data_->diagnosis = _data_->_tmp29_;
		_data_->result = FALSE;
		_g_free0 (_data_->pool_path);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp30_ = _data_->pool_path;
	if (access (_data_->_tmp30_, (R_OK | W_OK) | X_OK) != 0) {
		_data_->_tmp31_ = _data_->pool_path;
		_data_->_tmp32_ = g_strdup_printf (_ ("%s is known to libvirt as GNOME Boxes’s storage pool but is not user-r" \
"eadable/writable"), _data_->_tmp31_);
		_g_free0 (_data_->diagnosis);
		_data_->diagnosis = _data_->_tmp32_;
		_data_->result = FALSE;
		_g_free0 (_data_->pool_path);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = TRUE;
	_g_free0 (_data_->pool_path);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static Block51Data*
block51_data_ref (Block51Data* _data51_)
{
	g_atomic_int_inc (&_data51_->_ref_count_);
	return _data51_;
}

static void
block51_data_unref (void * _userdata_)
{
	Block51Data* _data51_;
	_data51_ = (Block51Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data51_->_ref_count_)) {
		_g_object_unref0 (_data51_->widget);
		g_slice_free (Block51Data, _data51_);
	}
}

static gboolean
__lambda152_ (Block51Data* _data51_,
              cairo_t* cr)
{
	GtkStyleContext* context = NULL;
	GtkStyleContext* _tmp0_;
	GtkStyleContext* _tmp1_;
	GtkAllocation allocation = {0};
	GtkAllocation _tmp2_ = {0};
	GtkAllocation _tmp3_;
	GtkAllocation _tmp4_;
	GtkAllocation _tmp5_;
	GtkAllocation _tmp6_;
	gboolean result;
	g_return_val_if_fail (cr != NULL, FALSE);
	_tmp0_ = gtk_widget_get_style_context (_data51_->widget);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	context = _tmp1_;
	gtk_widget_get_allocation (_data51_->widget, &_tmp2_);
	allocation = _tmp2_;
	_tmp3_ = allocation;
	_tmp4_ = allocation;
	gtk_render_background (context, cr, (gdouble) 0, (gdouble) 0, (gdouble) _tmp3_.width, (gdouble) _tmp4_.height);
	_tmp5_ = allocation;
	_tmp6_ = allocation;
	gtk_render_frame (context, cr, (gdouble) 0, (gdouble) 0, (gdouble) _tmp5_.width, (gdouble) _tmp6_.height);
	result = FALSE;
	_g_object_unref0 (context);
	return result;
}

static gboolean
___lambda152__gtk_widget_draw (GtkWidget* _sender,
                               cairo_t* cr,
                               gpointer self)
{
	gboolean result;
	result = __lambda152_ (self, cr);
	return result;
}

void
boxes_draw_as_css_box (GtkWidget* widget)
{
	Block51Data* _data51_;
	GtkWidget* _tmp0_;
	g_return_if_fail (widget != NULL);
	_data51_ = g_slice_new0 (Block51Data);
	_data51_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (widget);
	_g_object_unref0 (_data51_->widget);
	_data51_->widget = _tmp0_;
	g_signal_connect_data (_data51_->widget, "draw", (GCallback) ___lambda152__gtk_widget_draw, block51_data_ref (_data51_), (GClosureNotify) block51_data_unref, 0);
	block51_data_unref (_data51_);
	_data51_ = NULL;
}

static GType
boxes_cpu_arch_compatibility_get_type_once (void)
{
	static const GEnumValue values[] = {{BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE, "BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE", "incompatible"}, {BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL, "BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL", "identical"}, {BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE, "BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE", "compatible"}, {BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE, "BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE", "compatible-diff-wordsize"}, {0, NULL, NULL}};
	GType boxes_cpu_arch_compatibility_type_id;
	boxes_cpu_arch_compatibility_type_id = g_enum_register_static ("BoxesCPUArchCompatibility", values);
	return boxes_cpu_arch_compatibility_type_id;
}

GType
boxes_cpu_arch_compatibility_get_type (void)
{
	static volatile gsize boxes_cpu_arch_compatibility_type_id__once = 0;
	if (g_once_init_enter (&boxes_cpu_arch_compatibility_type_id__once)) {
		GType boxes_cpu_arch_compatibility_type_id;
		boxes_cpu_arch_compatibility_type_id = boxes_cpu_arch_compatibility_get_type_once ();
		g_once_init_leave (&boxes_cpu_arch_compatibility_type_id__once, boxes_cpu_arch_compatibility_type_id);
	}
	return boxes_cpu_arch_compatibility_type_id__once;
}

BoxesCPUArchCompatibility
boxes_compare_cpu_architectures (const gchar* arch1,
                                 const gchar* arch2)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	BoxesCPUArchCompatibility result;
	g_return_val_if_fail (arch1 != NULL, 0);
	g_return_val_if_fail (arch2 != NULL, 0);
	_tmp0_ = arch2;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("i386")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp3_;
				GQuark _tmp5_ = 0U;
				static GQuark _tmp4_label0 = 0;
				static GQuark _tmp4_label1 = 0;
				static GQuark _tmp4_label2 = 0;
				static GQuark _tmp4_label3 = 0;
				static GQuark _tmp4_label4 = 0;
				_tmp3_ = arch1;
				_tmp5_ = (NULL == _tmp3_) ? 0 : g_quark_from_string (_tmp3_);
				if (_tmp5_ == ((0 != _tmp4_label0) ? _tmp4_label0 : (_tmp4_label0 = g_quark_from_static_string ("i386")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL;
							return result;
						}
					}
				} else if (((_tmp5_ == ((0 != _tmp4_label1) ? _tmp4_label1 : (_tmp4_label1 = g_quark_from_static_string ("i486")))) || (_tmp5_ == ((0 != _tmp4_label2) ? _tmp4_label2 : (_tmp4_label2 = g_quark_from_static_string ("i586"))))) || (_tmp5_ == ((0 != _tmp4_label3) ? _tmp4_label3 : (_tmp4_label3 = g_quark_from_static_string ("i686"))))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE;
							return result;
						}
					}
				} else if (_tmp5_ == ((0 != _tmp4_label4) ? _tmp4_label4 : (_tmp4_label4 = g_quark_from_static_string ("x86_64")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE;
							return result;
						}
					}
				} else {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
							return result;
						}
					}
				}
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("i486")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp6_;
				GQuark _tmp8_ = 0U;
				static GQuark _tmp7_label0 = 0;
				static GQuark _tmp7_label1 = 0;
				static GQuark _tmp7_label2 = 0;
				static GQuark _tmp7_label3 = 0;
				_tmp6_ = arch1;
				_tmp8_ = (NULL == _tmp6_) ? 0 : g_quark_from_string (_tmp6_);
				if (_tmp8_ == ((0 != _tmp7_label0) ? _tmp7_label0 : (_tmp7_label0 = g_quark_from_static_string ("i486")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL;
							return result;
						}
					}
				} else if ((_tmp8_ == ((0 != _tmp7_label1) ? _tmp7_label1 : (_tmp7_label1 = g_quark_from_static_string ("i586")))) || (_tmp8_ == ((0 != _tmp7_label2) ? _tmp7_label2 : (_tmp7_label2 = g_quark_from_static_string ("i686"))))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE;
							return result;
						}
					}
				} else if (_tmp8_ == ((0 != _tmp7_label3) ? _tmp7_label3 : (_tmp7_label3 = g_quark_from_static_string ("x86_64")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE;
							return result;
						}
					}
				} else {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
							return result;
						}
					}
				}
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("i586")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp9_;
				GQuark _tmp11_ = 0U;
				static GQuark _tmp10_label0 = 0;
				static GQuark _tmp10_label1 = 0;
				static GQuark _tmp10_label2 = 0;
				_tmp9_ = arch1;
				_tmp11_ = (NULL == _tmp9_) ? 0 : g_quark_from_string (_tmp9_);
				if (_tmp11_ == ((0 != _tmp10_label0) ? _tmp10_label0 : (_tmp10_label0 = g_quark_from_static_string ("i586")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL;
							return result;
						}
					}
				} else if (_tmp11_ == ((0 != _tmp10_label1) ? _tmp10_label1 : (_tmp10_label1 = g_quark_from_static_string ("i686")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE;
							return result;
						}
					}
				} else if (_tmp11_ == ((0 != _tmp10_label2) ? _tmp10_label2 : (_tmp10_label2 = g_quark_from_static_string ("x86_64")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE;
							return result;
						}
					}
				} else {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
							return result;
						}
					}
				}
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("i686")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp12_;
				GQuark _tmp14_ = 0U;
				static GQuark _tmp13_label0 = 0;
				static GQuark _tmp13_label1 = 0;
				_tmp12_ = arch1;
				_tmp14_ = (NULL == _tmp12_) ? 0 : g_quark_from_string (_tmp12_);
				if (_tmp14_ == ((0 != _tmp13_label0) ? _tmp13_label0 : (_tmp13_label0 = g_quark_from_static_string ("i686")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL;
							return result;
						}
					}
				} else if (_tmp14_ == ((0 != _tmp13_label1) ? _tmp13_label1 : (_tmp13_label1 = g_quark_from_static_string ("x86_64")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE_DIFF_WORDSIZE;
							return result;
						}
					}
				} else {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
							return result;
						}
					}
				}
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("x86_64")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp15_;
				GQuark _tmp17_ = 0U;
				static GQuark _tmp16_label0 = 0;
				_tmp15_ = arch1;
				_tmp17_ = (NULL == _tmp15_) ? 0 : g_quark_from_string (_tmp15_);
				if (_tmp17_ == ((0 != _tmp16_label0) ? _tmp16_label0 : (_tmp16_label0 = g_quark_from_static_string ("x86_64")))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL;
							return result;
						}
					}
				} else {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
							return result;
						}
					}
				}
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string (OSINFO_ARCHITECTURE_ALL)))) {
		switch (0) {
			default:
			{
				result = BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp18_;
				GQuark _tmp20_ = 0U;
				static GQuark _tmp19_label0 = 0;
				_tmp18_ = arch1;
				_tmp20_ = (NULL == _tmp18_) ? 0 : g_quark_from_string (_tmp18_);
				if (_tmp20_ == ((0 != _tmp19_label0) ? _tmp19_label0 : (_tmp19_label0 = g_quark_from_static_string (OSINFO_ARCHITECTURE_ALL)))) {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL;
							return result;
						}
					}
				} else {
					switch (0) {
						default:
						{
							result = BOXES_CPU_ARCH_COMPATIBILITY_INCOMPATIBLE;
							return result;
						}
					}
				}
			}
		}
	}
}

gchar*
boxes_fdo_timedate1_get_timezone (BoxesFdotimedate1* self)
{
	BoxesFdotimedate1Iface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = BOXES_FDO_TIMEDATE1_GET_INTERFACE (self);
	if (_iface_->get_timezone) {
		return _iface_->get_timezone (self);
	}
	return NULL;
}

void
boxes_fdo_timedate1_set_timezone (BoxesFdotimedate1* self,
                                  const gchar* value)
{
	BoxesFdotimedate1Iface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BOXES_FDO_TIMEDATE1_GET_INTERFACE (self);
	if (_iface_->set_timezone) {
		_iface_->set_timezone (self, value);
	}
}

static void
boxes_fdo_timedate1_default_init (BoxesFdotimedate1Iface * iface,
                                  gpointer iface_data)
{
}

static GType
boxes_fdo_timedate1_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesFdotimedate1Iface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_fdo_timedate1_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType boxes_fdo_timedate1_type_id;
	boxes_fdo_timedate1_type_id = g_type_register_static (G_TYPE_INTERFACE, "BoxesFdotimedate1", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (boxes_fdo_timedate1_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (boxes_fdo_timedate1_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) boxes_fdo_timedate1_proxy_get_type);
	g_type_set_qdata (boxes_fdo_timedate1_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.timedate1");
	g_type_set_qdata (boxes_fdo_timedate1_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_boxes_fdo_timedate1_dbus_interface_info));
	g_type_set_qdata (boxes_fdo_timedate1_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) boxes_fdo_timedate1_register_object);
	return boxes_fdo_timedate1_type_id;
}

GType
boxes_fdo_timedate1_get_type (void)
{
	static volatile gsize boxes_fdo_timedate1_type_id__once = 0;
	if (g_once_init_enter (&boxes_fdo_timedate1_type_id__once)) {
		GType boxes_fdo_timedate1_type_id;
		boxes_fdo_timedate1_type_id = boxes_fdo_timedate1_get_type_once ();
		g_once_init_leave (&boxes_fdo_timedate1_type_id__once, boxes_fdo_timedate1_type_id);
	}
	return boxes_fdo_timedate1_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (BoxesFdotimedate1Proxy, boxes_fdo_timedate1_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (BOXES_FDO_TYPE_TIMEDATE1, boxes_fdo_timedate1_proxy_boxes_fdo_timedate1_interface_init) )
static void
boxes_fdo_timedate1_proxy_class_init (BoxesFdotimedate1ProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = boxes_fdo_timedate1_proxy_g_signal;
}

static void
boxes_fdo_timedate1_proxy_g_signal (GDBusProxy* proxy,
                                    const gchar* sender_name,
                                    const gchar* signal_name,
                                    GVariant* parameters)
{
}

static void
boxes_fdo_timedate1_proxy_init (BoxesFdotimedate1Proxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_boxes_fdo_timedate1_dbus_interface_info));
}

static gchar*
boxes_fdo_timedate1_dbus_proxy_get_timezone (BoxesFdotimedate1* self)
{
	GVariant *_inner_reply;
	gchar* _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "Timezone");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.timedate1"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Timezone"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			return NULL;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_dup_string (_inner_reply, NULL);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
boxes_fdo_timedate1_dbus_proxy_set_timezone (BoxesFdotimedate1* self,
                                             const gchar* value)
{
	GVariant *_arguments;
	GVariant *_reply;
	GVariantBuilder _arguments_builder;
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.freedesktop.timedate1"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("Timezone"));
	g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (value));
	g_variant_builder_close (&_arguments_builder);
	_arguments = g_variant_builder_end (&_arguments_builder);
	_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
	if (!_reply) {
		return;
	}
	g_variant_unref (_reply);
}

static void
boxes_fdo_timedate1_proxy_boxes_fdo_timedate1_interface_init (BoxesFdotimedate1Iface* iface)
{
	iface->get_timezone = boxes_fdo_timedate1_dbus_proxy_get_timezone;
	iface->set_timezone = boxes_fdo_timedate1_dbus_proxy_set_timezone;
}

static void
boxes_fdo_timedate1_dbus_interface_method_call (GDBusConnection* connection,
                                                const gchar* sender,
                                                const gchar* object_path,
                                                const gchar* interface_name,
                                                const gchar* method_name,
                                                GVariant* parameters,
                                                GDBusMethodInvocation* invocation,
                                                gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	g_object_unref (invocation);
}

static GVariant*
_dbus_boxes_fdo_timedate1_get_timezone (BoxesFdotimedate1* self)
{
	gchar* result;
	GVariant* _reply;
	result = boxes_fdo_timedate1_get_timezone (self);
	_reply = g_variant_new_string (result);
	_g_free0 (result);
	return _reply;
}

static GVariant*
boxes_fdo_timedate1_dbus_interface_get_property (GDBusConnection* connection,
                                                 const gchar* sender,
                                                 const gchar* object_path,
                                                 const gchar* interface_name,
                                                 const gchar* property_name,
                                                 GError** error,
                                                 gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Timezone") == 0) {
		return _dbus_boxes_fdo_timedate1_get_timezone (object);
	}
	return NULL;
}

static void
_dbus_boxes_fdo_timedate1_set_timezone (BoxesFdotimedate1* self,
                                        GVariant* _value)
{
	gchar* value = NULL;
	value = g_variant_dup_string (_value, NULL);
	boxes_fdo_timedate1_set_timezone (self, value);
	_g_free0 (value);
}

static gboolean
boxes_fdo_timedate1_dbus_interface_set_property (GDBusConnection* connection,
                                                 const gchar* sender,
                                                 const gchar* object_path,
                                                 const gchar* interface_name,
                                                 const gchar* property_name,
                                                 GVariant* value,
                                                 GError** error,
                                                 gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "Timezone") == 0) {
		_dbus_boxes_fdo_timedate1_set_timezone (object, value);
		return TRUE;
	}
	return FALSE;
}

guint
boxes_fdo_timedate1_register_object (gpointer object,
                                     GDBusConnection* connection,
                                     const gchar* path,
                                     GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_boxes_fdo_timedate1_dbus_interface_info), &_boxes_fdo_timedate1_dbus_interface_vtable, data, _boxes_fdo_timedate1_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_boxes_fdo_timedate1_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

gchar*
boxes_get_timezone (void)
{
	GError* _inner_error0_ = NULL;
	gchar* result;
	{
		gchar* _tmp0_ = NULL;
		gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = boxes_get_timezone_from_systemd (&_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		result = _tmp2_;
		_g_free0 (_tmp0_);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp3_ = e;
		_tmp4_ = _tmp3_->message;
		g_debug ("util-app.vala:633: Failed to get timezone from systemd: %s", _tmp4_);
		{
			gchar* _tmp5_ = NULL;
			gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp6_ = boxes_get_timezone_from_linux (&_inner_error0_);
			_tmp5_ = _tmp6_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
			_tmp7_ = _tmp5_;
			_tmp5_ = NULL;
			result = _tmp7_;
			_g_free0 (_tmp5_);
			_g_error_free0 (e);
			return result;
		}
		goto __finally1;
		__catch1_g_error:
		{
			GError* e = NULL;
			GError* _tmp8_;
			const gchar* _tmp9_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp8_ = e;
			_tmp9_ = _tmp8_->message;
			g_warning ("util-app.vala:637: Failed to find system timezone: %s", _tmp9_);
			result = NULL;
			_g_error_free0 (e);
			_g_error_free0 (e);
			return result;
		}
		__finally1:
		_g_error_free0 (e);
		g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

gchar*
boxes_get_timezone_from_systemd (GError** error)
{
	BoxesFdotimedate1* timedate = NULL;
	BoxesFdotimedate1* _tmp0_;
	BoxesFdotimedate1* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	BoxesFdotimedate1* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	_tmp0_ = (BoxesFdotimedate1*) g_initable_new (BOXES_FDO_TYPE_TIMEDATE1_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.freedesktop.timedate1", "g-bus-type", G_BUS_TYPE_SYSTEM, "g-object-path", "/org/freedesktop/timedate1", "g-interface-name", "org.freedesktop.timedate1", NULL);
	timedate = (BoxesFdotimedate1*) _tmp0_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp1_ = timedate;
	_tmp2_ = boxes_fdo_timedate1_get_timezone (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_ == NULL;
	_g_free0 (_tmp4_);
	if (_tmp5_) {
		GError* _tmp6_;
		_tmp6_ = g_error_new_literal (BOXES_ERROR, BOXES_ERROR_INVALID, "Failed to get timezone from systemd");
		_inner_error0_ = _tmp6_;
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (timedate);
		return NULL;
	}
	_tmp7_ = timedate;
	_tmp8_ = boxes_fdo_timedate1_get_timezone (_tmp7_);
	_tmp9_ = _tmp8_;
	result = _tmp9_;
	_g_object_unref0 (timedate);
	return result;
}

gchar*
boxes_get_timezone_from_linux (GError** error)
{
	GFile* file = NULL;
	GFile* _tmp0_;
	GFileInfo* info = NULL;
	GFileInfo* _tmp2_;
	gchar* target = NULL;
	GFileInfo* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar** tokens = NULL;
	const gchar* _tmp8_;
	gchar** _tmp9_;
	gchar** _tmp10_;
	gint tokens_length1;
	gint _tokens_size_;
	gboolean _tmp11_ = FALSE;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gchar** _tmp16_;
	gint _tmp16__length1;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	GError* _inner_error0_ = NULL;
	gchar* result;
	_tmp0_ = g_file_new_for_path (BOXES_TZ_FILE);
	file = _tmp0_;
	if (!g_file_query_exists (file, NULL)) {
		GError* _tmp1_;
		_tmp1_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Timezone file not found in expected location '%s'", BOXES_TZ_FILE);
		_inner_error0_ = _tmp1_;
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (file);
		return NULL;
	}
	_tmp2_ = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error0_);
	info = _tmp2_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (file);
		return NULL;
	}
	_tmp3_ = info;
	_tmp4_ = g_file_info_get_symlink_target (_tmp3_);
	_tmp5_ = g_strdup (_tmp4_);
	target = _tmp5_;
	_tmp6_ = target;
	if (_tmp6_ == NULL) {
		GError* _tmp7_;
		_tmp7_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Timezone file '%s' is expected to be a symlink", BOXES_TZ_FILE);
		_inner_error0_ = _tmp7_;
		g_propagate_error (error, _inner_error0_);
		_g_free0 (target);
		_g_object_unref0 (info);
		_g_object_unref0 (file);
		return NULL;
	}
	_tmp8_ = target;
	_tmp10_ = _tmp9_ = g_strsplit (_tmp8_, "zoneinfo/", 0);
	tokens = _tmp10_;
	tokens_length1 = _vala_array_length (_tmp9_);
	_tokens_size_ = tokens_length1;
	_tmp12_ = tokens;
	_tmp12__length1 = tokens_length1;
	if (_tmp12_ == NULL) {
		_tmp11_ = TRUE;
	} else {
		gchar** _tmp13_;
		gint _tmp13__length1;
		_tmp13_ = tokens;
		_tmp13__length1 = tokens_length1;
		_tmp11_ = _tmp13__length1 < 2;
	}
	if (_tmp11_) {
		const gchar* _tmp14_;
		GError* _tmp15_;
		_tmp14_ = target;
		_tmp15_ = g_error_new (BOXES_ERROR, BOXES_ERROR_INVALID, "Timezone file in unexpected location '%s'", _tmp14_);
		_inner_error0_ = _tmp15_;
		g_propagate_error (error, _inner_error0_);
		tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (target);
		_g_object_unref0 (info);
		_g_object_unref0 (file);
		return NULL;
	}
	_tmp16_ = tokens;
	_tmp16__length1 = tokens_length1;
	_tmp17_ = _tmp16_[1];
	_tmp18_ = g_strdup (_tmp17_);
	result = _tmp18_;
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (target);
	_g_object_unref0 (info);
	_g_object_unref0 (file);
	return result;
}

static void
boxes_move_configs_from_cache_data_free (gpointer _data)
{
	BoxesMoveConfigsFromCacheData* _data_;
	_data_ = _data;
	g_slice_free (BoxesMoveConfigsFromCacheData, _data_);
}

void
boxes_move_configs_from_cache (GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	BoxesMoveConfigsFromCacheData* _data_;
	_data_ = g_slice_new0 (BoxesMoveConfigsFromCacheData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_move_configs_from_cache_data_free);
	boxes_move_configs_from_cache_co (_data_);
}

void
boxes_move_configs_from_cache_finish (GAsyncResult* _res_)
{
	BoxesMoveConfigsFromCacheData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
boxes_move_configs_from_cache_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	BoxesMoveConfigsFromCacheData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_move_configs_from_cache_co (_data_);
}

static gboolean
boxes_move_configs_from_cache_co (BoxesMoveConfigsFromCacheData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	boxes_move_config_from_cache ("unattended", boxes_move_configs_from_cache_ready, _data_);
	return FALSE;
	_state_1:
	boxes_move_config_from_cache_finish (_data_->_res_);
	_data_->_state_ = 2;
	boxes_move_config_from_cache ("sources", boxes_move_configs_from_cache_ready, _data_);
	return FALSE;
	_state_2:
	boxes_move_config_from_cache_finish (_data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
boxes_move_config_from_cache_data_free (gpointer _data)
{
	BoxesMoveConfigFromCacheData* _data_;
	_data_ = _data;
	_g_free0 (_data_->config_name);
	g_slice_free (BoxesMoveConfigFromCacheData, _data_);
}

void
boxes_move_config_from_cache (const gchar* config_name,
                              GAsyncReadyCallback _callback_,
                              gpointer _user_data_)
{
	BoxesMoveConfigFromCacheData* _data_;
	gchar* _tmp0_;
	g_return_if_fail (config_name != NULL);
	_data_ = g_slice_new0 (BoxesMoveConfigFromCacheData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, boxes_move_config_from_cache_data_free);
	_tmp0_ = g_strdup (config_name);
	_g_free0 (_data_->config_name);
	_data_->config_name = _tmp0_;
	boxes_move_config_from_cache_co (_data_);
}

void
boxes_move_config_from_cache_finish (GAsyncResult* _res_)
{
	BoxesMoveConfigFromCacheData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
boxes_move_config_from_cache_ready (GObject* source_object,
                                    GAsyncResult* _res_,
                                    gpointer _user_data_)
{
	BoxesMoveConfigFromCacheData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	boxes_move_config_from_cache_co (_data_);
}

static gboolean
boxes_move_config_from_cache_co (BoxesMoveConfigFromCacheData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = boxes_get_cache (_data_->config_name, NULL);
	_data_->path = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->path;
	_data_->_tmp2_ = g_file_new_for_path (_data_->_tmp1_);
	_data_->cache_dir = _data_->_tmp2_;
	_data_->_tmp3_ = boxes_get_user_pkgconfig (NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = g_build_filename (_data_->_tmp4_, _data_->config_name, NULL);
	_data_->_tmp6_ = _data_->_tmp5_;
	_g_free0 (_data_->_tmp4_);
	_data_->config_path = _data_->_tmp6_;
	{
		_data_->_tmp7_ = _data_->cache_dir;
		_data_->_state_ = 1;
		g_file_enumerate_children_async (_data_->_tmp7_, G_FILE_ATTRIBUTE_STANDARD_NAME, 0, G_PRIORITY_DEFAULT, NULL, boxes_move_config_from_cache_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp8_ = g_file_enumerate_children_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
		_data_->enumerator = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
				goto __catch0_g_io_error_not_found;
			}
			goto __catch0_g_error;
		}
		while (TRUE) {
			_data_->_tmp9_ = _data_->enumerator;
			_data_->_state_ = 2;
			g_file_enumerator_next_files_async (_data_->_tmp9_, 10, G_PRIORITY_DEFAULT, NULL, boxes_move_config_from_cache_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp10_ = g_file_enumerator_next_files_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error0_);
			_data_->files = _data_->_tmp10_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->enumerator);
				if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
					goto __catch0_g_io_error_not_found;
				}
				goto __catch0_g_error;
			}
			_data_->_tmp11_ = _data_->files;
			if (_data_->_tmp11_ == NULL) {
				(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
				break;
			}
			_data_->_tmp12_ = _data_->files;
			{
				_data_->info_collection = _data_->_tmp12_;
				for (_data_->info_it = _data_->info_collection; _data_->info_it != NULL; _data_->info_it = _data_->info_it->next) {
					_data_->_tmp13_ = _g_object_ref0 ((GFileInfo*) _data_->info_it->data);
					_data_->info = _data_->_tmp13_;
					{
						_data_->_tmp14_ = _data_->cache_dir;
						_data_->_tmp15_ = g_file_get_path (_data_->_tmp14_);
						_data_->_tmp16_ = _data_->_tmp15_;
						_data_->_tmp17_ = _data_->info;
						_data_->_tmp18_ = g_file_info_get_name (_data_->_tmp17_);
						_data_->_tmp19_ = g_build_filename (_data_->_tmp16_, _data_->_tmp18_, NULL);
						_g_free0 (_data_->path);
						_data_->path = _data_->_tmp19_;
						_g_free0 (_data_->_tmp16_);
						_data_->_tmp20_ = _data_->path;
						_data_->_tmp21_ = g_file_new_for_path (_data_->_tmp20_);
						_data_->cache_file = _data_->_tmp21_;
						_data_->_tmp22_ = _data_->config_path;
						_data_->_tmp23_ = _data_->info;
						_data_->_tmp24_ = g_file_info_get_name (_data_->_tmp23_);
						_data_->_tmp25_ = g_build_filename (_data_->_tmp22_, _data_->_tmp24_, NULL);
						_g_free0 (_data_->path);
						_data_->path = _data_->_tmp25_;
						_data_->_tmp26_ = _data_->path;
						_data_->_tmp27_ = g_file_new_for_path (_data_->_tmp26_);
						_data_->config_file = _data_->_tmp27_;
						_data_->_tmp28_ = _data_->cache_file;
						_data_->_tmp29_ = _data_->config_file;
						g_file_move (_data_->_tmp28_, _data_->_tmp29_, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, &_data_->_inner_error0_);
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_object_unref0 (_data_->config_file);
							_g_object_unref0 (_data_->cache_file);
							_g_object_unref0 (_data_->info);
							(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
							_g_object_unref0 (_data_->enumerator);
							if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
								goto __catch0_g_io_error_not_found;
							}
							goto __catch0_g_error;
						}
						_data_->_tmp30_ = _data_->cache_file;
						_data_->_tmp31_ = g_file_get_path (_data_->_tmp30_);
						_data_->_tmp32_ = _data_->_tmp31_;
						_data_->_tmp33_ = _data_->config_file;
						_data_->_tmp34_ = g_file_get_path (_data_->_tmp33_);
						_data_->_tmp35_ = _data_->_tmp34_;
						g_debug ("util-app.vala:698: moved %s to %s", _data_->_tmp32_, _data_->_tmp35_);
						_g_free0 (_data_->_tmp35_);
						_g_free0 (_data_->_tmp32_);
						_g_object_unref0 (_data_->config_file);
						_g_object_unref0 (_data_->cache_file);
						_g_object_unref0 (_data_->info);
					}
				}
			}
			(_data_->files == NULL) ? NULL : (_data_->files = (_g_list_free__g_object_unref0_ (_data_->files), NULL));
		}
		_data_->_tmp36_ = _data_->cache_dir;
		_data_->_state_ = 3;
		g_file_delete_async (_data_->_tmp36_, G_PRIORITY_DEFAULT, NULL, boxes_move_config_from_cache_ready, _data_);
		return FALSE;
		_state_3:
		g_file_delete_finish (_data_->_tmp36_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->enumerator);
			if (g_error_matches (_data_->_inner_error0_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
				goto __catch0_g_io_error_not_found;
			}
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->enumerator);
	}
	goto __finally0;
	__catch0_g_io_error_not_found:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp37_ = _data_->_error_;
		_data_->_tmp38_ = _data_->_tmp37_->message;
		g_warning ("util-app.vala:706: %s", _data_->_tmp38_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->config_path);
		_g_object_unref0 (_data_->cache_dir);
		_g_free0 (_data_->path);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_free0 (_data_->config_path);
	_g_object_unref0 (_data_->cache_dir);
	_g_free0 (_data_->path);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

GdkPixbuf*
boxes_paint_empty_frame (gint width,
                         gint height)
{
	cairo_surface_t* surface = NULL;
	cairo_surface_t* _tmp0_;
	GdkPixbuf* _tmp1_;
	GdkPixbuf* result;
	_tmp0_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
	surface = _tmp0_;
	_tmp1_ = gdk_pixbuf_get_from_surface (surface, 0, 0, width, height);
	result = _tmp1_;
	_cairo_surface_destroy0 (surface);
	return result;
}

GdkPixbuf*
boxes_round_image (GdkPixbuf* source)
{
	gint size = 0;
	gint _tmp0_;
	gint _tmp1_;
	cairo_surface_t* surface = NULL;
	cairo_surface_t* _tmp2_;
	cairo_t* cr = NULL;
	cairo_t* _tmp3_;
	GdkPixbuf* _tmp4_;
	GdkPixbuf* result;
	g_return_val_if_fail (source != NULL, NULL);
	_tmp0_ = gdk_pixbuf_get_width (source);
	_tmp1_ = _tmp0_;
	size = _tmp1_;
	_tmp2_ = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, size, size);
	surface = _tmp2_;
	_tmp3_ = cairo_create (surface);
	cr = _tmp3_;
	cairo_arc (cr, (gdouble) (size / 2), (gdouble) (size / 2), (gdouble) (size / 2), (gdouble) 0, 2 * G_PI);
	cairo_clip (cr);
	cairo_new_path (cr);
	gdk_cairo_set_source_pixbuf (cr, source, (gdouble) 0, (gdouble) 0);
	cairo_paint (cr);
	_tmp4_ = gdk_pixbuf_get_from_surface (surface, 0, 0, size, size);
	result = _tmp4_;
	_cairo_destroy0 (cr);
	_cairo_surface_destroy0 (surface);
	return result;
}

GDBusProxy*
boxes_create_gnome_settings_dbus_proxy (void)
{
	GDBusProxy* proxy = NULL;
	GError* _inner_error0_ = NULL;
	GDBusProxy* result;
	proxy = NULL;
	{
		GDBusProxy* _tmp0_ = NULL;
		GDBusProxy* _tmp1_;
		GDBusProxy* _tmp2_;
		_tmp1_ = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.gnome.Settings", "/org/gnome/Settings", "org.gtk.Actions", NULL, &_inner_error0_);
		_tmp0_ = _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (proxy);
		proxy = _tmp2_;
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_debug ("util-app.vala:741: Failed to launch org.gnome.Settings. Fallback to or" \
"g.gnome.ControlCenter");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (proxy);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	{
		GDBusProxy* _tmp3_ = NULL;
		GDBusProxy* _tmp4_;
		GDBusProxy* _tmp5_;
		_tmp4_ = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, NULL, "org.gnome.ControlCenter", "/org/gnome/ControlCenter", "org.gtk.Actions", NULL, &_inner_error0_);
		_tmp3_ = _tmp4_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch1_g_error;
		}
		_tmp5_ = _tmp3_;
		_tmp3_ = NULL;
		_g_object_unref0 (proxy);
		proxy = _tmp5_;
		_g_object_unref0 (_tmp3_);
	}
	goto __finally1;
	__catch1_g_error:
	{
		g_clear_error (&_inner_error0_);
		g_debug ("util-app.vala:752: Failed to launch org.gnome.ControlCenter");
	}
	__finally1:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		_g_object_unref0 (proxy);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	result = proxy;
	return result;
}

void
boxes_open_permission_settings (void)
{
	GError* _inner_error0_ = NULL;
	{
		GDBusProxy* proxy = NULL;
		GDBusProxy* _tmp0_;
		GDBusProxy* _tmp1_;
		GVariantBuilder* builder = NULL;
		GVariantType* _tmp3_;
		GVariantType* _tmp4_;
		GVariantBuilder* _tmp5_;
		GVariantBuilder* _tmp6_;
		GVariantBuilder* _tmp7_;
		GVariant* _tmp8_;
		GVariant* _tmp9_;
		GVariant* param = NULL;
		GVariant* _tmp10_;
		GVariantType* _tmp11_;
		GVariantType* _tmp12_;
		GVariantBuilder* _tmp13_;
		GVariant* _tmp14_;
		GVariant* _tmp15_;
		GVariant* _tmp16_;
		GVariant** _tmp17_;
		GVariant** _tmp18_;
		gint _tmp18__length1;
		GVariant* _tmp19_;
		GVariantType* _tmp20_;
		GVariantType* _tmp21_;
		GVariant** _tmp22_;
		GVariant** _tmp23_;
		gint _tmp23__length1;
		GVariant* _tmp24_;
		GVariant** _tmp25_;
		GVariant** _tmp26_;
		gint _tmp26__length1;
		GVariant* _tmp27_;
		GVariant* _tmp28_;
		GDBusProxy* _tmp29_;
		GVariant* _tmp30_;
		GVariant* _tmp31_;
		GVariant* _tmp32_;
		_tmp0_ = boxes_create_gnome_settings_dbus_proxy ();
		proxy = _tmp0_;
		_tmp1_ = proxy;
		if (_tmp1_ == NULL) {
			GError* _tmp2_;
			_tmp2_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_FAILED, "Couldn't create DBusProxy for GNOME Settings");
			_inner_error0_ = _tmp2_;
			_g_object_unref0 (proxy);
			goto __catch0_g_error;
		}
		_tmp3_ = g_variant_type_new ("av");
		_tmp4_ = _tmp3_;
		_tmp5_ = g_variant_builder_new (_tmp4_);
		_tmp6_ = _tmp5_;
		_g_variant_type_free0 (_tmp4_);
		builder = _tmp6_;
		_tmp7_ = builder;
		_tmp8_ = g_variant_new_string (APPLICATION_ID);
		g_variant_ref_sink (_tmp8_);
		_tmp9_ = _tmp8_;
		g_variant_builder_add (_tmp7_, "v", _tmp9_, NULL);
		_g_variant_unref0 (_tmp9_);
		_tmp10_ = g_variant_new_string ("launch-panel");
		g_variant_ref_sink (_tmp10_);
		_tmp11_ = g_variant_type_new ("v");
		_tmp12_ = _tmp11_;
		_tmp13_ = builder;
		_tmp14_ = g_variant_new ("(sav)", "applications", _tmp13_, NULL);
		g_variant_ref_sink (_tmp14_);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_variant_new ("v", _tmp15_, NULL);
		g_variant_ref_sink (_tmp16_);
		_tmp17_ = g_new0 (GVariant*, 1 + 1);
		_tmp17_[0] = _tmp16_;
		_tmp18_ = _tmp17_;
		_tmp18__length1 = 1;
		_tmp19_ = g_variant_new_array (_tmp12_, _tmp18_, 1);
		g_variant_ref_sink (_tmp19_);
		_tmp20_ = g_variant_type_new ("{sv}");
		_tmp21_ = _tmp20_;
		_tmp22_ = g_new0 (GVariant*, 0 + 1);
		_tmp23_ = _tmp22_;
		_tmp23__length1 = 0;
		_tmp24_ = g_variant_new_array (_tmp21_, _tmp23_, 0);
		g_variant_ref_sink (_tmp24_);
		_tmp25_ = g_new0 (GVariant*, 3 + 1);
		_tmp25_[0] = _tmp10_;
		_tmp25_[1] = _tmp19_;
		_tmp25_[2] = _tmp24_;
		_tmp26_ = _tmp25_;
		_tmp26__length1 = 3;
		_tmp27_ = g_variant_new_tuple (_tmp26_, 3);
		g_variant_ref_sink (_tmp27_);
		_tmp28_ = _tmp27_;
		_tmp26_ = (_vala_array_free (_tmp26_, _tmp26__length1, (GDestroyNotify) g_variant_unref), NULL);
		_tmp23_ = (_vala_array_free (_tmp23_, _tmp23__length1, (GDestroyNotify) g_variant_unref), NULL);
		_g_variant_type_free0 (_tmp21_);
		_tmp18_ = (_vala_array_free (_tmp18_, _tmp18__length1, (GDestroyNotify) g_variant_unref), NULL);
		_g_variant_unref0 (_tmp15_);
		_g_variant_type_free0 (_tmp12_);
		param = _tmp28_;
		_tmp29_ = proxy;
		_tmp30_ = param;
		_tmp31_ = g_dbus_proxy_call_sync (_tmp29_, "Activate", _tmp30_, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &_inner_error0_);
		_tmp32_ = _tmp31_;
		_g_variant_unref0 (_tmp32_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_variant_unref0 (param);
			_g_variant_builder_unref0 (builder);
			_g_object_unref0 (proxy);
			goto __catch0_g_error;
		}
		_g_variant_unref0 (param);
		_g_variant_builder_unref0 (builder);
		_g_object_unref0 (proxy);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp33_;
		const gchar* _tmp34_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp33_ = _error_;
		_tmp34_ = _tmp33_->message;
		g_warning ("util-app.vala:776: Failed to launch gnome-control-center: %s", _tmp34_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

