/* os-database.c generated by valac 0.38.4, the Vala compiler
 * generated from os-database.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <osinfo/osinfo.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <libcommon.h>
#include <stdlib.h>
#include <string.h>


#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;
typedef struct _BoxesOSDatabasePrivate BoxesOSDatabasePrivate;
enum  {
	BOXES_OS_DATABASE_0_PROPERTY,
	BOXES_OS_DATABASE_NUM_PROPERTIES
};
static GParamSpec* boxes_os_database_properties[BOXES_OS_DATABASE_NUM_PROPERTIES];

#define BOXES_OS_DATABASE_TYPE_MEDIA_UR_LS_COLUMNS (boxes_os_database_media_ur_ls_columns_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block66Data Block66Data;

#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;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _BoxesOsDatabaseLoadData BoxesOsDatabaseLoadData;
typedef struct _BoxesOsDatabaseGuessOsFromInstallMediaPathData BoxesOsDatabaseGuessOsFromInstallMediaPathData;
typedef struct _BoxesOsDatabaseGuessOsFromInstallMediaData BoxesOsDatabaseGuessOsFromInstallMediaData;
typedef struct _BoxesOsDatabaseGetOsByIdData BoxesOsDatabaseGetOsByIdData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _BoxesOsDatabaseListLatestDownloadableOsesData BoxesOsDatabaseListLatestDownloadableOsesData;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _BoxesOsDatabaseListOsByDistroData BoxesOsDatabaseListOsByDistroData;
typedef struct _BoxesOsDatabaseGetAllMediaUrlsAsStoreData BoxesOsDatabaseGetAllMediaUrlsAsStoreData;

#define BOXES_TYPE_CPU_ARCH_COMPATIBILITY (boxes_cpu_arch_compatibility_get_type ())
typedef struct _Block67Data Block67Data;
typedef struct _Block68Data Block68Data;
typedef struct _BoxesOsDatabaseEnsureDbLoadedData BoxesOsDatabaseEnsureDbLoadedData;
enum  {
	BOXES_OS_DATABASE_DB_LOADED_SIGNAL,
	BOXES_OS_DATABASE_NUM_SIGNALS
};
static guint boxes_os_database_signals[BOXES_OS_DATABASE_NUM_SIGNALS] = {0};

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 _BoxesOSDatabase {
	GObject parent_instance;
	BoxesOSDatabasePrivate * priv;
};

struct _BoxesOSDatabaseClass {
	GObjectClass parent_class;
};

struct _BoxesOSDatabasePrivate {
	OsinfoDb* db;
	gboolean db_loading;
};

typedef enum  {
	BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_URL = 0,
	BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_OS = 1,
	BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_LAST
} BoxesOSDatabaseMediaURLsColumns;

struct _Block66Data {
	int _ref_count_;
	BoxesOSDatabase* self;
	OsinfoLoader* loader;
	gpointer _async_data_;
};

struct _BoxesApp {
	GtkApplication parent_instance;
	BoxesAppPrivate * priv;
	BoxesCollection* collection;
	BoxesAsyncLauncher* async_launcher;
};

struct _BoxesAppClass {
	GtkApplicationClass parent_class;
};

struct _BoxesOsDatabaseLoadData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	Block66Data* _data66_;
	OsinfoLoader* _tmp0_;
	BoxesApp* _tmp1_;
	BoxesAsyncLauncher* _tmp2_;
	GError* e;
	GError* _tmp3_;
	const gchar* _tmp4_;
	BoxesApp* _tmp5_;
	BoxesAsyncLauncher* _tmp6_;
	GError* _vala1_e;
	GError* _tmp7_;
	const gchar* _tmp8_;
	OsinfoDb* _tmp9_;
	OsinfoDb* _tmp10_;
	GError * _inner_error_;
};

struct _BoxesOsDatabaseGuessOsFromInstallMediaPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	gchar* media_path;
	GCancellable* cancellable;
	OsinfoMedia* result;
	gboolean _tmp0_;
	OsinfoMedia* media;
	const gchar* _tmp1_;
	GCancellable* _tmp2_;
	OsinfoMedia* _tmp3_;
	OsinfoMedia* _tmp4_;
	OsinfoMedia* _tmp5_;
	OsinfoMedia* _tmp6_;
	OsinfoMedia* _tmp7_;
	GError * _inner_error_;
};

struct _BoxesOsDatabaseGuessOsFromInstallMediaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	OsinfoMedia* media;
	OsinfoMedia* result;
	gboolean _tmp0_;
	OsinfoDb* _tmp1_;
	OsinfoMedia* _tmp2_;
	gboolean _tmp3_;
	OsinfoMedia* _tmp4_;
	OsinfoMedia* _tmp5_;
};

struct _BoxesOsDatabaseGetOsByIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	gchar* id;
	OsinfoOs* result;
	gboolean _tmp0_;
	GError* _tmp1_;
	OsinfoOs* os;
	OsinfoDb* _tmp2_;
	const gchar* _tmp3_;
	OsinfoOs* _tmp4_;
	OsinfoOs* _tmp5_;
	OsinfoOs* _tmp6_;
	const gchar* _tmp7_;
	GError* _tmp8_;
	GError * _inner_error_;
};

struct _BoxesOsDatabaseListLatestDownloadableOsesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	GHashTable* result;
	gboolean _tmp0_;
	GError* _tmp1_;
	OsinfoOsList* os_list;
	OsinfoDb* _tmp2_;
	OsinfoOsList* _tmp3_;
	GHashTable* table;
	GHashFunc _tmp4_;
	GEqualFunc _tmp5_;
	GHashTable* _tmp6_;
	OsinfoOsList* _tmp7_;
	GList* _tmp8_;
	GList* entity_collection;
	GList* entity_it;
	OsinfoEntity* entity;
	OsinfoOs* os;
	OsinfoEntity* _tmp9_;
	OsinfoOs* _tmp10_;
	gboolean has_url;
	OsinfoOs* _tmp11_;
	OsinfoMediaList* _tmp12_;
	OsinfoMediaList* _tmp13_;
	GList* _tmp14_;
	GList* _tmp15_;
	GList* media_entity_collection;
	GList* media_entity_it;
	OsinfoEntity* media_entity;
	OsinfoMedia* media;
	OsinfoEntity* _tmp16_;
	OsinfoMedia* _tmp17_;
	OsinfoMedia* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gboolean _tmp22_;
	OsinfoOs* _tmp23_;
	OsinfoMediaList* _tmp24_;
	OsinfoMediaList* _tmp25_;
	gint _tmp26_;
	gboolean _tmp27_;
	gchar* os_distro;
	OsinfoOs* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	OsinfoOs* distro;
	GHashTable* _tmp31_;
	const gchar* _tmp32_;
	gconstpointer _tmp33_;
	OsinfoOs* _tmp34_;
	OsinfoOs* _tmp35_;
	GHashTable* _tmp36_;
	const gchar* _tmp37_;
	gchar* _tmp38_;
	OsinfoOs* _tmp39_;
	OsinfoOs* _tmp40_;
	GDate* release_a;
	OsinfoOs* _tmp41_;
	GDate* _tmp42_;
	GDate* release_b;
	OsinfoOs* _tmp43_;
	GDate* _tmp44_;
	gboolean _tmp45_;
	GDate* _tmp46_;
	GDate* _tmp47_;
	GDate* _tmp48_;
	GDate* _tmp49_;
	GDate _tmp50_;
	gint _tmp51_;
	GHashTable* _tmp52_;
	const gchar* _tmp53_;
	gchar* _tmp54_;
	OsinfoOs* _tmp55_;
	OsinfoOs* _tmp56_;
	GError * _inner_error_;
};

struct _BoxesOsDatabaseListOsByDistroData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	gchar* distro;
	GDate* after;
	GList* result;
	gboolean _tmp0_;
	GError* _tmp1_;
	OsinfoOsList* os_list;
	OsinfoDb* _tmp2_;
	OsinfoOsList* _tmp3_;
	OsinfoFilter* filter;
	OsinfoFilter* _tmp4_;
	OsinfoFilter* _tmp5_;
	const gchar* _tmp6_;
	OsinfoOsList* _tmp7_;
	OsinfoFilter* _tmp8_;
	OsinfoList* _tmp9_;
	OsinfoOsList* _tmp10_;
	GList* after_list;
	OsinfoOsList* _tmp11_;
	GList* _tmp12_;
	GList* entity_collection;
	GList* entity_it;
	OsinfoEntity* entity;
	OsinfoOs* os;
	OsinfoEntity* _tmp13_;
	OsinfoOs* _tmp14_;
	GDate* _tmp15_;
	GDate* release_date;
	OsinfoOs* _tmp16_;
	GDate* _tmp17_;
	OsinfoReleaseStatus status;
	OsinfoOs* _tmp18_;
	OsinfoReleaseStatus _tmp19_;
	gboolean _tmp20_;
	OsinfoReleaseStatus _tmp21_;
	gboolean _tmp22_;
	GDate* _tmp23_;
	GDate* _tmp24_;
	GDate* _tmp25_;
	GDate _tmp26_;
	gint _tmp27_;
	OsinfoOs* _tmp28_;
	OsinfoOs* _tmp29_;
	OsinfoOs* _tmp30_;
	OsinfoOs* _tmp31_;
	GError * _inner_error_;
};

struct _BoxesOsDatabaseGetAllMediaUrlsAsStoreData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	GtkListStore* result;
	gboolean _tmp0_;
	GError* _tmp1_;
	GtkListStore* store;
	GtkListStore* _tmp2_;
	OsinfoDb* _tmp3_;
	OsinfoOsList* _tmp4_;
	OsinfoOsList* _tmp5_;
	GList* _tmp6_;
	GList* _tmp7_;
	GList* entity_collection;
	GList* entity_it;
	OsinfoEntity* entity;
	OsinfoOs* os;
	OsinfoEntity* _tmp8_;
	OsinfoOs* _tmp9_;
	OsinfoOs* _tmp10_;
	OsinfoMediaList* _tmp11_;
	OsinfoMediaList* _tmp12_;
	GList* _tmp13_;
	GList* _tmp14_;
	GList* media_entity_collection;
	GList* media_entity_it;
	OsinfoEntity* media_entity;
	OsinfoMedia* media;
	OsinfoEntity* _tmp15_;
	OsinfoMedia* _tmp16_;
	gboolean _tmp17_;
	OsinfoMedia* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	OsinfoMedia* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	OsinfoMedia* _tmp27_;
	gboolean _tmp28_;
	gboolean _tmp29_;
	GtkTreeIter iter;
	GtkListStore* _tmp30_;
	GtkTreeIter _tmp31_;
	GtkListStore* _tmp32_;
	GtkTreeIter _tmp33_;
	OsinfoMedia* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	OsinfoOs* _tmp38_;
	GError * _inner_error_;
};

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;

struct _Block67Data {
	int _ref_count_;
	BoxesOSDatabase* self;
	gpointer _async_data_;
};

struct _Block68Data {
	int _ref_count_;
	Block67Data * _data67_;
	gulong db_loaded_id;
};

struct _BoxesOsDatabaseEnsureDbLoadedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	BoxesOSDatabase* self;
	gboolean result;
	Block67Data* _data67_;
	OsinfoDb* _tmp0_;
	gboolean _tmp1_;
	Block68Data* _data68_;
	gulong _tmp2_;
	OsinfoDb* _tmp3_;
};


static gpointer boxes_os_database_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GQuark boxes_os_database_error_quark (void);
GType boxes_os_database_get_type (void) G_GNUC_CONST;
#define BOXES_OS_DATABASE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_OS_DATABASE, BoxesOSDatabasePrivate))
GType boxes_os_database_media_ur_ls_columns_get_type (void) G_GNUC_CONST;
#define BOXES_OS_DATABASE_MINIMAL_STORAGE (10 * ((gint64) OSINFO_GIBIBYTES))
#define BOXES_OS_DATABASE_DEFAULT_VCPUS 1
#define BOXES_OS_DATABASE_DEFAULT_RAM (2 * ((gint64) OSINFO_GIBIBYTES))
#define BOXES_OS_DATABASE_DEFAULT_STORAGE (20 * ((gint64) OSINFO_GIBIBYTES))
OsinfoResources* boxes_os_database_get_default_resources (void);
OsinfoResources* boxes_os_database_get_minimum_resources (void);
static void boxes_os_database_load_data_free (gpointer _data);
void boxes_os_database_load (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void boxes_os_database_load_finish (BoxesOSDatabase* self, GAsyncResult* _res_);
static gboolean boxes_os_database_load_co (BoxesOsDatabaseLoadData* _data_);
static Block66Data* block66_data_ref (Block66Data* _data66_);
static void block66_data_unref (void * _userdata_);
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
static void ___lambda17_ (Block66Data* _data66_, GError** error);
static void ____lambda17__boxes_async_launcher_run_in_thread_func (gpointer self, GError** error);
static void boxes_os_database_load_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void ___lambda18_ (Block66Data* _data66_, GError** error);
static void ____lambda18__boxes_async_launcher_run_in_thread_func (gpointer self, GError** error);
static void boxes_os_database_guess_os_from_install_media_path_data_free (gpointer _data);
void boxes_os_database_guess_os_from_install_media_path (BoxesOSDatabase* self, const gchar* media_path, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoMedia* boxes_os_database_guess_os_from_install_media_path_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_os_database_guess_os_from_install_media_path_co (BoxesOsDatabaseGuessOsFromInstallMediaPathData* _data_);
static void boxes_os_database_ensure_db_loaded (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean boxes_os_database_ensure_db_loaded_finish (BoxesOSDatabase* self, GAsyncResult* _res_);
static void boxes_os_database_guess_os_from_install_media_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void boxes_os_database_guess_os_from_install_media (BoxesOSDatabase* self, OsinfoMedia* media, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoMedia* boxes_os_database_guess_os_from_install_media_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static void boxes_os_database_guess_os_from_install_media_data_free (gpointer _data);
static gboolean boxes_os_database_guess_os_from_install_media_co (BoxesOsDatabaseGuessOsFromInstallMediaData* _data_);
static void boxes_os_database_guess_os_from_install_media_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_os_database_get_os_by_id_data_free (gpointer _data);
void boxes_os_database_get_os_by_id (BoxesOSDatabase* self, const gchar* id, GAsyncReadyCallback _callback_, gpointer _user_data_);
OsinfoOs* boxes_os_database_get_os_by_id_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_os_database_get_os_by_id_co (BoxesOsDatabaseGetOsByIdData* _data_);
static void boxes_os_database_get_os_by_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void boxes_os_database_list_latest_downloadable_oses_data_free (gpointer _data);
void boxes_os_database_list_latest_downloadable_oses (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
GHashTable* boxes_os_database_list_latest_downloadable_oses_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_os_database_list_latest_downloadable_oses_co (BoxesOsDatabaseListLatestDownloadableOsesData* _data_);
static void boxes_os_database_list_latest_downloadable_oses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _g_free0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void boxes_os_database_list_os_by_distro_data_free (gpointer _data);
static GDate* _g_date_dup (GDate* self);
void boxes_os_database_list_os_by_distro (BoxesOSDatabase* self, const gchar* distro, GDate* after, GAsyncReadyCallback _callback_, gpointer _user_data_);
GList* boxes_os_database_list_os_by_distro_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_os_database_list_os_by_distro_co (BoxesOsDatabaseListOsByDistroData* _data_);
static void boxes_os_database_list_os_by_distro_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gint __lambda20_ (OsinfoOs* os_a, OsinfoOs* os_b);
static gint ___lambda20__gcompare_func (gconstpointer a, gconstpointer b);
static void boxes_os_database_get_all_media_urls_as_store_data_free (gpointer _data);
void boxes_os_database_get_all_media_urls_as_store (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
GtkListStore* boxes_os_database_get_all_media_urls_as_store_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error);
static gboolean boxes_os_database_get_all_media_urls_as_store_co (BoxesOsDatabaseGetAllMediaUrlsAsStoreData* _data_);
static void boxes_os_database_get_all_media_urls_as_store_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
OsinfoMedia* boxes_os_database_get_media_by_id (BoxesOSDatabase* self, OsinfoOs* os, const gchar* id, GError** error);
OsinfoResources* boxes_os_database_get_resources_for_os (BoxesOSDatabase* self, OsinfoOs* os, const gchar* architecture);
static void _vala_array_add7 (gchar** * array, int* length, int* size, gchar* value);
static void _vala_array_add8 (gchar** * array, int* length, int* size, gchar* value);
static gchar** _vala_array_dup3 (gchar** self, int length);
static OsinfoResources* boxes_os_database_get_prefered_resources (OsinfoResourcesList* list, gchar** prefs, int prefs_length1);
static OsinfoResources* boxes_os_database_get_resources_from_os_resources (BoxesOSDatabase* self, OsinfoResources* minimum, OsinfoResources* recommended);
OsinfoResources* boxes_os_database_get_recommended_resources_for_os (OsinfoOs* os, const gchar* architecture);
OsinfoResources* boxes_os_database_get_minimum_resources_for_os (OsinfoOs* os, const gchar* architecture);
static OsinfoResourcesList* boxes_os_database_filter_resources_list_by_arch (OsinfoResourcesList* list, const gchar* arch);
GType boxes_cpu_arch_compatibility_get_type (void) G_GNUC_CONST;
BoxesCPUArchCompatibility boxes_compare_cpu_architectures (const gchar* arch1, const gchar* arch2);
static void boxes_os_database_ensure_db_loaded_data_free (gpointer _data);
static gboolean boxes_os_database_ensure_db_loaded_co (BoxesOsDatabaseEnsureDbLoadedData* _data_);
static Block67Data* block67_data_ref (Block67Data* _data67_);
static void block67_data_unref (void * _userdata_);
static Block68Data* block68_data_ref (Block68Data* _data68_);
static void block68_data_unref (void * _userdata_);
static void ___lambda19_ (Block68Data* _data68_);
static void ____lambda19__boxes_os_database_db_loaded (BoxesOSDatabase* _sender, gpointer self);
BoxesOSDatabase* boxes_os_database_new (void);
BoxesOSDatabase* boxes_os_database_construct (GType object_type);
static void boxes_os_database_finalize (GObject * obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


GQuark boxes_os_database_error_quark (void) {
#line 535 "/home/fborges/checkout/gnome-boxes/src/libvirt-machine.vala"
	return g_quark_from_static_string ("boxes_os_database_error-quark");
#line 529 "os-database.c"
}


GType boxes_os_database_media_ur_ls_columns_get_type (void) {
	static volatile gsize boxes_os_database_media_ur_ls_columns_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_os_database_media_ur_ls_columns_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_URL, "BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_URL", "url"}, {BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_OS, "BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_OS", "os"}, {BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_LAST, "BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_LAST", "last"}, {0, NULL, NULL}};
		GType boxes_os_database_media_ur_ls_columns_type_id;
		boxes_os_database_media_ur_ls_columns_type_id = g_enum_register_static ("BoxesOSDatabaseMediaURLsColumns", values);
		g_once_init_leave (&boxes_os_database_media_ur_ls_columns_type_id__volatile, boxes_os_database_media_ur_ls_columns_type_id);
	}
	return boxes_os_database_media_ur_ls_columns_type_id__volatile;
}


OsinfoResources* boxes_os_database_get_default_resources (void) {
	OsinfoResources* result = NULL;
	OsinfoResources* resources = NULL;
	OsinfoResources* _tmp0_;
#line 36 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = osinfo_resources_new ("whatever", "x86_64");
#line 36 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	resources = _tmp0_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_resources_set_n_cpus (resources, BOXES_OS_DATABASE_DEFAULT_VCPUS);
#line 39 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_resources_set_ram (resources, BOXES_OS_DATABASE_DEFAULT_RAM);
#line 40 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_resources_set_storage (resources, BOXES_OS_DATABASE_DEFAULT_STORAGE);
#line 42 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = resources;
#line 42 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 563 "os-database.c"
}


OsinfoResources* boxes_os_database_get_minimum_resources (void) {
	OsinfoResources* result = NULL;
	OsinfoResources* resources = NULL;
	OsinfoResources* _tmp0_;
#line 46 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = osinfo_resources_new ("whatever", "x86_64");
#line 46 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	resources = _tmp0_;
#line 48 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_resources_set_n_cpus (resources, BOXES_OS_DATABASE_DEFAULT_VCPUS);
#line 49 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_resources_set_ram (resources, BOXES_OS_DATABASE_DEFAULT_RAM);
#line 50 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_resources_set_storage (resources, BOXES_OS_DATABASE_MINIMAL_STORAGE);
#line 52 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = resources;
#line 52 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 585 "os-database.c"
}


static void boxes_os_database_load_data_free (gpointer _data) {
	BoxesOsDatabaseLoadData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseLoadData, _data_);
#line 596 "os-database.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return self ? g_object_ref (self) : NULL;
#line 603 "os-database.c"
}


void boxes_os_database_load (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseLoadData* _data_;
	BoxesOSDatabase* _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseLoadData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_load_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_load_co (_data_);
#line 622 "os-database.c"
}


void boxes_os_database_load_finish (BoxesOSDatabase* self, GAsyncResult* _res_) {
	BoxesOsDatabaseLoadData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 630 "os-database.c"
}


static Block66Data* block66_data_ref (Block66Data* _data66_) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_atomic_int_inc (&_data66_->_ref_count_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return _data66_;
#line 639 "os-database.c"
}


static void block66_data_unref (void * _userdata_) {
	Block66Data* _data66_;
	_data66_ = (Block66Data*) _userdata_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (g_atomic_int_dec_and_test (&_data66_->_ref_count_)) {
#line 648 "os-database.c"
		BoxesOSDatabase* self;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		self = _data66_->self;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (_data66_->loader);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (self);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_slice_free (Block66Data, _data66_);
#line 658 "os-database.c"
	}
}


static void ___lambda17_ (Block66Data* _data66_, GError** error) {
	BoxesOSDatabase* self;
	GError * _inner_error_ = NULL;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	self = _data66_->self;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_loader_process_default_path (_data66_->loader, &_inner_error_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_propagate_error (error, _inner_error_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return;
#line 676 "os-database.c"
	}
}


static void ____lambda17__boxes_async_launcher_run_in_thread_func (gpointer self, GError** error) {
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	___lambda17_ (self, error);
#line 684 "os-database.c"
}


static void boxes_os_database_load_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseLoadData* _data_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_load_co (_data_);
#line 698 "os-database.c"
}


static void ___lambda18_ (Block66Data* _data66_, GError** error) {
	BoxesOSDatabase* self;
	gchar* _tmp0_;
	gchar* _tmp1_;
	GError * _inner_error_ = NULL;
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	self = _data66_->self;
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = boxes_get_custom_osinfo_db ();
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = _tmp0_;
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_loader_process_path (_data66_->loader, _tmp1_, &_inner_error_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_tmp1_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_propagate_error (error, _inner_error_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return;
#line 723 "os-database.c"
	}
}


static void ____lambda18__boxes_async_launcher_run_in_thread_func (gpointer self, GError** error) {
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	___lambda18_ (self, error);
#line 731 "os-database.c"
}


static gboolean boxes_os_database_load_co (BoxesOsDatabaseLoadData* _data_) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 740 "os-database.c"
		goto _state_0;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 744 "os-database.c"
		goto _state_1;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 2:
#line 748 "os-database.c"
		goto _state_2;
		default:
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 753 "os-database.c"
	}
	_state_0:
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data66_ = g_slice_new0 (Block66Data);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data66_->_ref_count_ = 1;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data66_->self = g_object_ref (_data_->self);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data66_->_async_data_ = _data_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self->priv->db_loading = TRUE;
#line 57 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = osinfo_loader_new ();
#line 57 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data66_->loader = _data_->_tmp0_;
#line 770 "os-database.c"
	{
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp1_ = boxes_app_app;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp2_ = _data_->_tmp1_->async_launcher;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_state_ = 1;
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		boxes_async_launcher_launch (_data_->_tmp2_, ____lambda17__boxes_async_launcher_run_in_thread_func, block66_data_ref (_data_->_data66_), block66_data_unref, boxes_os_database_load_ready, _data_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 782 "os-database.c"
		_state_1:
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		boxes_async_launcher_launch_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 788 "os-database.c"
			goto __catch73_g_error;
		}
	}
	goto __finally73;
	__catch73_g_error:
	{
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->e = _data_->_inner_error_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = NULL;
#line 61 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp3_ = _data_->e;
#line 61 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp4_ = _data_->_tmp3_->message;
#line 61 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_warning ("os-database.vala:61: Error loading default libosinfo database: %s", _data_->_tmp4_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_error_free0 (_data_->e);
#line 807 "os-database.c"
	}
	__finally73:
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		block66_data_unref (_data_->_data66_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data66_ = NULL;
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_clear_error (&_data_->_inner_error_);
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 58 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 824 "os-database.c"
	}
	{
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp5_ = boxes_app_app;
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp6_ = _data_->_tmp5_->async_launcher;
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_state_ = 2;
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		boxes_async_launcher_launch (_data_->_tmp6_, ____lambda18__boxes_async_launcher_run_in_thread_func, block66_data_ref (_data_->_data66_), block66_data_unref, boxes_os_database_load_ready, _data_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 837 "os-database.c"
		_state_2:
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		boxes_async_launcher_launch_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 843 "os-database.c"
			goto __catch74_g_error;
		}
	}
	goto __finally74;
	__catch74_g_error:
	{
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_vala1_e = _data_->_inner_error_;
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = NULL;
#line 66 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp7_ = _data_->_vala1_e;
#line 66 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp8_ = _data_->_tmp7_->message;
#line 66 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_warning ("os-database.vala:66: Error loading GNOME Boxes libosinfo database: %s", _data_->_tmp8_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_error_free0 (_data_->_vala1_e);
#line 862 "os-database.c"
	}
	__finally74:
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		block66_data_unref (_data_->_data66_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data66_ = NULL;
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_clear_error (&_data_->_inner_error_);
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 63 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 879 "os-database.c"
	}
#line 68 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp9_ = osinfo_loader_get_db (_data_->_data66_->loader);
#line 68 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp10_ = _g_object_ref0 (_data_->_tmp9_);
#line 68 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self->priv->db);
#line 68 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self->priv->db = _data_->_tmp10_;
#line 69 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self->priv->db_loading = FALSE;
#line 70 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_signal_emit (_data_->self, boxes_os_database_signals[BOXES_OS_DATABASE_DB_LOADED_SIGNAL], 0);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	block66_data_unref (_data_->_data66_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data66_ = NULL;
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 905 "os-database.c"
		}
	}
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 55 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 912 "os-database.c"
}


static void boxes_os_database_guess_os_from_install_media_path_data_free (gpointer _data) {
	BoxesOsDatabaseGuessOsFromInstallMediaPathData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->media_path);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->cancellable);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->result);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseGuessOsFromInstallMediaPathData, _data_);
#line 929 "os-database.c"
}


void boxes_os_database_guess_os_from_install_media_path (BoxesOSDatabase* self, const gchar* media_path, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseGuessOsFromInstallMediaPathData* _data_;
	BoxesOSDatabase* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseGuessOsFromInstallMediaPathData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_guess_os_from_install_media_path_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = media_path;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->media_path);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->media_path = _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = cancellable;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->cancellable);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->cancellable = _tmp4_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_guess_os_from_install_media_path_co (_data_);
#line 968 "os-database.c"
}


OsinfoMedia* boxes_os_database_guess_os_from_install_media_path_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error) {
	OsinfoMedia* result;
	BoxesOsDatabaseGuessOsFromInstallMediaPathData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (NULL == _data_) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return NULL;
#line 981 "os-database.c"
	}
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 989 "os-database.c"
}


static void boxes_os_database_guess_os_from_install_media_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseGuessOsFromInstallMediaPathData* _data_;
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_guess_os_from_install_media_path_co (_data_);
#line 1003 "os-database.c"
}


static gboolean boxes_os_database_guess_os_from_install_media_path_co (BoxesOsDatabaseGuessOsFromInstallMediaPathData* _data_) {
#line 73 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 73 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 1012 "os-database.c"
		goto _state_0;
#line 73 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 1016 "os-database.c"
		goto _state_1;
#line 73 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 2:
#line 1020 "os-database.c"
		goto _state_2;
#line 73 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 3:
#line 1024 "os-database.c"
		goto _state_3;
		default:
#line 73 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 1029 "os-database.c"
	}
	_state_0:
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 1;
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded (_data_->self, boxes_os_database_guess_os_from_install_media_path_ready, _data_);
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1038 "os-database.c"
	_state_1:
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = boxes_os_database_ensure_db_loaded_finish (_data_->self, _data_->_res_);
#line 75 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (!_data_->_tmp0_) {
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->result = NULL;
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_state_ != 0) {
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1054 "os-database.c"
			}
		}
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 76 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 1061 "os-database.c"
	}
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp1_ = _data_->media_path;
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp2_ = _data_->cancellable;
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 2;
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_media_create_from_location_async (_data_->_tmp1_, G_PRIORITY_DEFAULT, _data_->_tmp2_, boxes_os_database_guess_os_from_install_media_path_ready, _data_);
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1073 "os-database.c"
	_state_2:
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = osinfo_media_create_from_location_finish (_data_->_res_, &_data_->_inner_error_);
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->media = _data_->_tmp3_;
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 78 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 1087 "os-database.c"
	}
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp5_ = _data_->media;
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 3;
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_guess_os_from_install_media (_data_->self, _data_->_tmp5_, boxes_os_database_guess_os_from_install_media_path_ready, _data_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1097 "os-database.c"
	_state_3:
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp6_ = boxes_os_database_guess_os_from_install_media_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp4_ = _data_->_tmp6_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (_data_->media);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 1113 "os-database.c"
	}
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp7_ = _data_->_tmp4_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp4_ = NULL;
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = _data_->_tmp7_;
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->_tmp4_);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->media);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1133 "os-database.c"
		}
	}
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 80 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1140 "os-database.c"
}


static void boxes_os_database_guess_os_from_install_media_data_free (gpointer _data) {
	BoxesOsDatabaseGuessOsFromInstallMediaData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->media);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->result);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseGuessOsFromInstallMediaData, _data_);
#line 1155 "os-database.c"
}


void boxes_os_database_guess_os_from_install_media (BoxesOSDatabase* self, OsinfoMedia* media, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseGuessOsFromInstallMediaData* _data_;
	BoxesOSDatabase* _tmp0_;
	OsinfoMedia* _tmp1_;
	OsinfoMedia* _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseGuessOsFromInstallMediaData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_guess_os_from_install_media_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = media;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->media);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->media = _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_guess_os_from_install_media_co (_data_);
#line 1184 "os-database.c"
}


OsinfoMedia* boxes_os_database_guess_os_from_install_media_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error) {
	OsinfoMedia* result;
	BoxesOsDatabaseGuessOsFromInstallMediaData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (NULL == _data_) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return NULL;
#line 1197 "os-database.c"
	}
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 1205 "os-database.c"
}


static void boxes_os_database_guess_os_from_install_media_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseGuessOsFromInstallMediaData* _data_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_guess_os_from_install_media_co (_data_);
#line 1219 "os-database.c"
}


static gboolean boxes_os_database_guess_os_from_install_media_co (BoxesOsDatabaseGuessOsFromInstallMediaData* _data_) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 83 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 1228 "os-database.c"
		goto _state_0;
#line 83 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 1232 "os-database.c"
		goto _state_1;
		default:
#line 83 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 1237 "os-database.c"
	}
	_state_0:
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 1;
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded (_data_->self, boxes_os_database_guess_os_from_install_media_ready, _data_);
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1246 "os-database.c"
	_state_1:
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = boxes_os_database_ensure_db_loaded_finish (_data_->self, _data_->_res_);
#line 84 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (!_data_->_tmp0_) {
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->result = NULL;
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_state_ != 0) {
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1262 "os-database.c"
			}
		}
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 85 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 1269 "os-database.c"
	}
#line 87 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp1_ = _data_->self->priv->db;
#line 87 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp2_ = _data_->media;
#line 87 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = osinfo_db_identify_media (_data_->_tmp1_, _data_->_tmp2_);
#line 87 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_tmp3_) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp4_ = _data_->media;
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp5_ = _g_object_ref0 (_data_->_tmp4_);
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->result = _data_->_tmp5_;
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_state_ != 0) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1293 "os-database.c"
			}
		}
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 88 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 1300 "os-database.c"
	}
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1312 "os-database.c"
		}
	}
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 90 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1319 "os-database.c"
}


static void boxes_os_database_get_os_by_id_data_free (gpointer _data) {
	BoxesOsDatabaseGetOsByIdData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->id);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->result);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseGetOsByIdData, _data_);
#line 1334 "os-database.c"
}


void boxes_os_database_get_os_by_id (BoxesOSDatabase* self, const gchar* id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseGetOsByIdData* _data_;
	BoxesOSDatabase* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseGetOsByIdData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_get_os_by_id_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = id;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->id);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->id = _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_get_os_by_id_co (_data_);
#line 1363 "os-database.c"
}


OsinfoOs* boxes_os_database_get_os_by_id_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error) {
	OsinfoOs* result;
	BoxesOsDatabaseGetOsByIdData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (NULL == _data_) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return NULL;
#line 1376 "os-database.c"
	}
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 1384 "os-database.c"
}


static void boxes_os_database_get_os_by_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseGetOsByIdData* _data_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_get_os_by_id_co (_data_);
#line 1398 "os-database.c"
}


static gboolean boxes_os_database_get_os_by_id_co (BoxesOsDatabaseGetOsByIdData* _data_) {
#line 93 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 93 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 1407 "os-database.c"
		goto _state_0;
#line 93 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 1411 "os-database.c"
		goto _state_1;
		default:
#line 93 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 1416 "os-database.c"
	}
	_state_0:
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 1;
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded (_data_->self, boxes_os_database_get_os_by_id_ready, _data_);
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1425 "os-database.c"
	_state_1:
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = boxes_os_database_ensure_db_loaded_finish (_data_->self, _data_->_res_);
#line 94 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (!_data_->_tmp0_) {
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp1_ = g_error_new_literal (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED, "Failed to load OS database");
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = _data_->_tmp1_;
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 1443 "os-database.c"
		} else {
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_clear_error (&_data_->_inner_error_);
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 95 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 1453 "os-database.c"
		}
	}
#line 97 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp2_ = _data_->self->priv->db;
#line 97 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = _data_->id;
#line 97 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp4_ = osinfo_db_get_os (_data_->_tmp2_, _data_->_tmp3_);
#line 97 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp5_ = _g_object_ref0 (_data_->_tmp4_);
#line 97 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->os = _data_->_tmp5_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp6_ = _data_->os;
#line 98 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_tmp6_ == NULL) {
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp7_ = _data_->id;
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp8_ = g_error_new (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_UNKNOWN_OS_ID, "Unknown OS ID '%s'", _data_->_tmp7_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = _data_->_tmp8_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_object_unref0 (_data_->os);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 1486 "os-database.c"
		} else {
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_object_unref0 (_data_->os);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_clear_error (&_data_->_inner_error_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 99 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 1498 "os-database.c"
		}
	}
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = _data_->os;
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1511 "os-database.c"
		}
	}
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 101 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1518 "os-database.c"
}


static void boxes_os_database_list_latest_downloadable_oses_data_free (gpointer _data) {
	BoxesOsDatabaseListLatestDownloadableOsesData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_hash_table_unref0 (_data_->result);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseListLatestDownloadableOsesData, _data_);
#line 1531 "os-database.c"
}


void boxes_os_database_list_latest_downloadable_oses (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseListLatestDownloadableOsesData* _data_;
	BoxesOSDatabase* _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseListLatestDownloadableOsesData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_list_latest_downloadable_oses_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_list_latest_downloadable_oses_co (_data_);
#line 1550 "os-database.c"
}


GHashTable* boxes_os_database_list_latest_downloadable_oses_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error) {
	GHashTable* result;
	BoxesOsDatabaseListLatestDownloadableOsesData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (NULL == _data_) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return NULL;
#line 1563 "os-database.c"
	}
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 1571 "os-database.c"
}


static void boxes_os_database_list_latest_downloadable_oses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseListLatestDownloadableOsesData* _data_;
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_list_latest_downloadable_oses_co (_data_);
#line 1585 "os-database.c"
}


static void _g_free0_ (gpointer var) {
#line 109 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	var = (g_free (var), NULL);
#line 1592 "os-database.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 109 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1599 "os-database.c"
}


static gboolean boxes_os_database_list_latest_downloadable_oses_co (BoxesOsDatabaseListLatestDownloadableOsesData* _data_) {
#line 104 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 104 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 1608 "os-database.c"
		goto _state_0;
#line 104 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 1612 "os-database.c"
		goto _state_1;
		default:
#line 104 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 1617 "os-database.c"
	}
	_state_0:
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 1;
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded (_data_->self, boxes_os_database_list_latest_downloadable_oses_ready, _data_);
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1626 "os-database.c"
	_state_1:
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = boxes_os_database_ensure_db_loaded_finish (_data_->self, _data_->_res_);
#line 105 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (!_data_->_tmp0_) {
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp1_ = g_error_new_literal (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED, "Failed to load OS database");
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = _data_->_tmp1_;
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 1644 "os-database.c"
		} else {
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_clear_error (&_data_->_inner_error_);
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 106 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 1654 "os-database.c"
		}
	}
#line 108 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp2_ = _data_->self->priv->db;
#line 108 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = osinfo_db_get_os_list (_data_->_tmp2_);
#line 108 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->os_list = _data_->_tmp3_;
#line 109 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp4_ = g_str_hash;
#line 109 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp5_ = g_str_equal;
#line 109 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp6_ = g_hash_table_new_full (_data_->_tmp4_, _data_->_tmp5_, _g_free0_, _g_object_unref0_);
#line 109 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->table = _data_->_tmp6_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp7_ = _data_->os_list;
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp8_ = osinfo_list_get_elements ((OsinfoList*) _data_->_tmp7_);
#line 1675 "os-database.c"
	{
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->entity_collection = _data_->_tmp8_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		for (_data_->entity_it = _data_->entity_collection; _data_->entity_it != NULL; _data_->entity_it = _data_->entity_it->next) {
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_data_->entity = (OsinfoEntity*) _data_->entity_it->data;
#line 1683 "os-database.c"
			{
#line 111 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp9_ = _data_->entity;
#line 111 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp9_, osinfo_os_get_type ()) ? ((OsinfoOs*) _data_->_tmp9_) : NULL);
#line 111 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->os = _data_->_tmp10_;
#line 113 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->has_url = FALSE;
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp11_ = _data_->os;
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp12_ = osinfo_os_get_media_list (_data_->_tmp11_);
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp13_ = _data_->_tmp12_;
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp14_ = osinfo_list_get_elements ((OsinfoList*) _data_->_tmp13_);
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp15_ = _data_->_tmp14_;
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->_tmp13_);
#line 1705 "os-database.c"
				{
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->media_entity_collection = _data_->_tmp15_;
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					for (_data_->media_entity_it = _data_->media_entity_collection; _data_->media_entity_it != NULL; _data_->media_entity_it = _data_->media_entity_it->next) {
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->media_entity = (OsinfoEntity*) _data_->media_entity_it->data;
#line 1713 "os-database.c"
						{
#line 115 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp16_ = _data_->media_entity;
#line 115 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp16_, osinfo_media_get_type ()) ? ((OsinfoMedia*) _data_->_tmp16_) : NULL);
#line 115 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->media = _data_->_tmp17_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp18_ = _data_->media;
#line 117 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							g_object_get (_data_->_tmp18_, "url", &_data_->_tmp19_, NULL);
#line 117 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp20_ = _data_->_tmp19_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp21_ = _data_->_tmp20_;
#line 117 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->has_url = _data_->_tmp21_ != NULL;
#line 117 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_g_free0 (_data_->_tmp21_);
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_g_object_unref0 (_data_->media);
#line 1735 "os-database.c"
						}
					}
#line 114 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_list_free0 (_data_->media_entity_collection);
#line 1740 "os-database.c"
				}
#line 120 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp22_ = _data_->has_url;
#line 120 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (!_data_->_tmp22_) {
#line 121 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_object_unref0 (_data_->os);
#line 121 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					continue;
#line 1750 "os-database.c"
				}
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp23_ = _data_->os;
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp24_ = osinfo_os_get_media_list (_data_->_tmp23_);
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp25_ = _data_->_tmp24_;
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp26_ = osinfo_list_get_length ((OsinfoList*) _data_->_tmp25_);
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp27_ = _data_->_tmp26_ == 0;
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->_tmp25_);
#line 123 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_data_->_tmp27_) {
#line 124 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_object_unref0 (_data_->os);
#line 124 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					continue;
#line 1770 "os-database.c"
				}
#line 126 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp28_ = _data_->os;
#line 126 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp29_ = osinfo_os_get_distro (_data_->_tmp28_);
#line 126 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp30_ = g_strdup (_data_->_tmp29_);
#line 126 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->os_distro = _data_->_tmp30_;
#line 127 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp31_ = _data_->table;
#line 127 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp32_ = _data_->os_distro;
#line 127 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp33_ = g_hash_table_lookup (_data_->_tmp31_, _data_->_tmp32_);
#line 127 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp34_ = _g_object_ref0 ((OsinfoOs*) _data_->_tmp33_);
#line 127 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->distro = _data_->_tmp34_;
#line 128 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp35_ = _data_->distro;
#line 128 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_data_->_tmp35_ == NULL) {
#line 129 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp36_ = _data_->table;
#line 129 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp37_ = _data_->os_distro;
#line 129 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp38_ = g_strdup (_data_->_tmp37_);
#line 129 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp39_ = _data_->os;
#line 129 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp40_ = _g_object_ref0 (_data_->_tmp39_);
#line 129 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					g_hash_table_insert (_data_->_tmp36_, _data_->_tmp38_, _data_->_tmp40_);
#line 130 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_object_unref0 (_data_->distro);
#line 130 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_free0 (_data_->os_distro);
#line 130 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_object_unref0 (_data_->os);
#line 130 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					continue;
#line 1814 "os-database.c"
				}
#line 133 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp41_ = _data_->os;
#line 133 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp42_ = osinfo_product_get_release_date ((OsinfoProduct*) _data_->_tmp41_);
#line 133 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->release_a = _data_->_tmp42_;
#line 134 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp43_ = _data_->distro;
#line 134 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp44_ = osinfo_product_get_release_date ((OsinfoProduct*) _data_->_tmp43_);
#line 134 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->release_b = _data_->_tmp44_;
#line 136 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp46_ = _data_->release_a;
#line 136 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_data_->_tmp46_ == NULL) {
#line 136 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp45_ = TRUE;
#line 1834 "os-database.c"
				} else {
#line 136 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp47_ = _data_->release_b;
#line 136 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp45_ = _data_->_tmp47_ == NULL;
#line 1840 "os-database.c"
				}
#line 136 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_data_->_tmp45_) {
#line 137 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_free0 (_data_->release_b);
#line 137 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_free0 (_data_->release_a);
#line 137 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_object_unref0 (_data_->distro);
#line 137 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_free0 (_data_->os_distro);
#line 137 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_object_unref0 (_data_->os);
#line 137 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					continue;
#line 1856 "os-database.c"
				}
#line 139 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp48_ = _data_->release_a;
#line 139 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp49_ = _data_->release_b;
#line 139 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp50_ = *_data_->_tmp49_;
#line 139 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp51_ = g_date_compare (_data_->_tmp48_, &_data_->_tmp50_);
#line 139 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_data_->_tmp51_ > 0) {
#line 140 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp52_ = _data_->table;
#line 140 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp53_ = _data_->os_distro;
#line 140 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp54_ = g_strdup (_data_->_tmp53_);
#line 140 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp55_ = _data_->os;
#line 140 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp56_ = _g_object_ref0 (_data_->_tmp55_);
#line 140 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					g_hash_table_replace (_data_->_tmp52_, _data_->_tmp54_, _data_->_tmp56_);
#line 1880 "os-database.c"
				}
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_free0 (_data_->release_b);
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_free0 (_data_->release_a);
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->distro);
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_free0 (_data_->os_distro);
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->os);
#line 1892 "os-database.c"
			}
		}
#line 110 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_list_free0 (_data_->entity_collection);
#line 1897 "os-database.c"
	}
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = _data_->table;
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->os_list);
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1911 "os-database.c"
		}
	}
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 143 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 1918 "os-database.c"
}


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 1925 "os-database.c"
}


static void boxes_os_database_list_os_by_distro_data_free (gpointer _data) {
	BoxesOsDatabaseListOsByDistroData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->distro);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->after);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	__g_list_free__g_object_unref0_0 (_data_->result);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseListOsByDistroData, _data_);
#line 1942 "os-database.c"
}


static GDate* _g_date_dup (GDate* self) {
	GDate* dup;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	dup = g_new0 (GDate, 1);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	memcpy (dup, self, sizeof (GDate));
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return dup;
#line 1954 "os-database.c"
}


static gpointer __g_date_dup0 (gpointer self) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return self ? _g_date_dup (self) : NULL;
#line 1961 "os-database.c"
}


void boxes_os_database_list_os_by_distro (BoxesOSDatabase* self, const gchar* distro, GDate* after, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseListOsByDistroData* _data_;
	BoxesOSDatabase* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GDate* _tmp3_;
	GDate* _tmp4_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseListOsByDistroData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_list_os_by_distro_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = distro;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->distro);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->distro = _tmp2_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = after;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = __g_date_dup0 (_tmp3_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (_data_->after);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->after = _tmp4_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_list_os_by_distro_co (_data_);
#line 2000 "os-database.c"
}


GList* boxes_os_database_list_os_by_distro_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error) {
	GList* result;
	BoxesOsDatabaseListOsByDistroData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (NULL == _data_) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return NULL;
#line 2013 "os-database.c"
	}
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 2021 "os-database.c"
}


static void boxes_os_database_list_os_by_distro_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseListOsByDistroData* _data_;
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_list_os_by_distro_co (_data_);
#line 2035 "os-database.c"
}


static gint __lambda20_ (OsinfoOs* os_a, OsinfoOs* os_b) {
	gint result = 0;
	OsinfoOs* _tmp0_;
	OsinfoReleaseStatus _tmp1_;
	GDate* release_a = NULL;
	OsinfoOs* _tmp4_;
	GDate* _tmp5_;
	GDate* release_b = NULL;
	OsinfoOs* _tmp6_;
	GDate* _tmp7_;
	GDate* _tmp8_;
#line 175 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (os_a != NULL, 0);
#line 175 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (os_b != NULL, 0);
#line 176 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = os_a;
#line 176 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = osinfo_os_get_release_status (_tmp0_);
#line 176 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp1_ != OSINFO_RELEASE_STATUS_RELEASED) {
#line 177 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result = 1;
#line 177 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return result;
#line 2064 "os-database.c"
	} else {
		OsinfoOs* _tmp2_;
		OsinfoReleaseStatus _tmp3_;
#line 178 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp2_ = os_b;
#line 178 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp3_ = osinfo_os_get_release_status (_tmp2_);
#line 178 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp3_ != OSINFO_RELEASE_STATUS_RELEASED) {
#line 179 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			result = -1;
#line 179 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return result;
#line 2078 "os-database.c"
		}
	}
#line 181 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = os_a;
#line 181 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp5_ = osinfo_product_get_release_date ((OsinfoProduct*) _tmp4_);
#line 181 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	release_a = _tmp5_;
#line 182 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_ = os_b;
#line 182 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp7_ = osinfo_product_get_release_date ((OsinfoProduct*) _tmp6_);
#line 182 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	release_b = _tmp7_;
#line 184 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp8_ = release_a;
#line 184 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp8_ == NULL) {
#line 185 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result = 1;
#line 185 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_free0 (release_b);
#line 185 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_free0 (release_a);
#line 185 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return result;
#line 2105 "os-database.c"
	} else {
		GDate* _tmp9_;
#line 186 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp9_ = release_b;
#line 186 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp9_ == NULL) {
#line 187 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			result = -1;
#line 187 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_free0 (release_b);
#line 187 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_free0 (release_a);
#line 187 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return result;
#line 2120 "os-database.c"
		} else {
			GDate* _tmp10_;
			GDate* _tmp11_;
			GDate _tmp12_;
			gint _tmp13_;
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp10_ = release_a;
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp11_ = release_b;
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp12_ = *_tmp11_;
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp13_ = g_date_compare (_tmp10_, &_tmp12_);
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			result = _tmp13_;
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_free0 (release_b);
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_free0 (release_a);
#line 189 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return result;
#line 2142 "os-database.c"
		}
	}
#line 175 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (release_b);
#line 175 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_free0 (release_a);
#line 2149 "os-database.c"
}


static gint ___lambda20__gcompare_func (gconstpointer a, gconstpointer b) {
	gint result;
	result = __lambda20_ ((OsinfoOs*) a, (OsinfoOs*) b);
#line 175 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 2158 "os-database.c"
}


static gboolean boxes_os_database_list_os_by_distro_co (BoxesOsDatabaseListOsByDistroData* _data_) {
#line 152 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 152 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 2167 "os-database.c"
		goto _state_0;
#line 152 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 2171 "os-database.c"
		goto _state_1;
		default:
#line 152 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 2176 "os-database.c"
	}
	_state_0:
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 1;
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded (_data_->self, boxes_os_database_list_os_by_distro_ready, _data_);
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 2185 "os-database.c"
	_state_1:
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = boxes_os_database_ensure_db_loaded_finish (_data_->self, _data_->_res_);
#line 153 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (!_data_->_tmp0_) {
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp1_ = g_error_new_literal (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED, "Failed to load OS database");
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = _data_->_tmp1_;
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 2203 "os-database.c"
		} else {
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_clear_error (&_data_->_inner_error_);
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 154 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 2213 "os-database.c"
		}
	}
#line 156 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp2_ = _data_->self->priv->db;
#line 156 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = osinfo_db_get_os_list (_data_->_tmp2_);
#line 156 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->os_list = _data_->_tmp3_;
#line 157 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp4_ = osinfo_filter_new ();
#line 157 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->filter = _data_->_tmp4_;
#line 158 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp5_ = _data_->filter;
#line 158 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp6_ = _data_->distro;
#line 158 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	osinfo_filter_add_constraint (_data_->_tmp5_, OSINFO_OS_PROP_DISTRO, _data_->_tmp6_);
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp7_ = _data_->os_list;
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp8_ = _data_->filter;
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp9_ = osinfo_list_new_filtered (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp7_, osinfo_list_get_type ()) ? ((OsinfoList*) _data_->_tmp7_) : NULL, _data_->_tmp8_);
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp10_ = G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp9_, osinfo_oslist_get_type ()) ? ((OsinfoOsList*) _data_->_tmp9_) : NULL;
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_tmp10_ == NULL) {
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (_data_->_tmp9_);
#line 2244 "os-database.c"
	}
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->os_list);
#line 159 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->os_list = _data_->_tmp10_;
#line 161 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->after_list = NULL;
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp11_ = _data_->os_list;
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp12_ = osinfo_list_get_elements ((OsinfoList*) _data_->_tmp11_);
#line 2256 "os-database.c"
	{
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->entity_collection = _data_->_tmp12_;
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		for (_data_->entity_it = _data_->entity_collection; _data_->entity_it != NULL; _data_->entity_it = _data_->entity_it->next) {
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_data_->entity = (OsinfoEntity*) _data_->entity_it->data;
#line 2264 "os-database.c"
			{
#line 163 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp13_ = _data_->entity;
#line 163 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp13_, osinfo_os_get_type ()) ? ((OsinfoOs*) _data_->_tmp13_) : NULL);
#line 163 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->os = _data_->_tmp14_;
#line 165 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp15_ = _data_->after;
#line 165 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_data_->_tmp15_ != NULL) {
#line 166 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp16_ = _data_->os;
#line 166 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp17_ = osinfo_product_get_release_date ((OsinfoProduct*) _data_->_tmp16_);
#line 166 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->release_date = _data_->_tmp17_;
#line 167 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp18_ = _data_->os;
#line 167 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp19_ = osinfo_os_get_release_status (_data_->_tmp18_);
#line 167 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->status = _data_->_tmp19_;
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp21_ = _data_->status;
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					if (_data_->_tmp21_ != OSINFO_RELEASE_STATUS_RELEASED) {
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->_tmp20_ = TRUE;
#line 2294 "os-database.c"
					} else {
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->_tmp23_ = _data_->release_date;
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						if (_data_->_tmp23_ != NULL) {
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp24_ = _data_->release_date;
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp25_ = _data_->after;
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp26_ = *_data_->_tmp25_;
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp27_ = g_date_compare (_data_->_tmp24_, &_data_->_tmp26_);
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp22_ = _data_->_tmp27_ > 0;
#line 2310 "os-database.c"
						} else {
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp22_ = FALSE;
#line 2314 "os-database.c"
						}
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->_tmp20_ = _data_->_tmp22_;
#line 2318 "os-database.c"
					}
#line 169 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					if (_data_->_tmp20_) {
#line 170 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->_tmp28_ = _data_->os;
#line 170 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->_tmp29_ = _g_object_ref0 (_data_->_tmp28_);
#line 170 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->after_list = g_list_append (_data_->after_list, _data_->_tmp29_);
#line 2328 "os-database.c"
					}
#line 165 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_free0 (_data_->release_date);
#line 2332 "os-database.c"
				} else {
#line 172 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp30_ = _data_->os;
#line 172 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->_tmp31_ = _g_object_ref0 (_data_->_tmp30_);
#line 172 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->after_list = g_list_append (_data_->after_list, _data_->_tmp31_);
#line 2340 "os-database.c"
				}
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->os);
#line 2344 "os-database.c"
			}
		}
#line 162 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_list_free0 (_data_->entity_collection);
#line 2349 "os-database.c"
	}
#line 175 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->after_list = g_list_sort (_data_->after_list, ___lambda20__gcompare_func);
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = _data_->after_list;
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->filter);
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->os_list);
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2367 "os-database.c"
		}
	}
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 192 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 2374 "os-database.c"
}


static void boxes_os_database_get_all_media_urls_as_store_data_free (gpointer _data) {
	BoxesOsDatabaseGetAllMediaUrlsAsStoreData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->result);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseGetAllMediaUrlsAsStoreData, _data_);
#line 2387 "os-database.c"
}


void boxes_os_database_get_all_media_urls_as_store (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseGetAllMediaUrlsAsStoreData* _data_;
	BoxesOSDatabase* _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseGetAllMediaUrlsAsStoreData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_get_all_media_urls_as_store_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_get_all_media_urls_as_store_co (_data_);
#line 2406 "os-database.c"
}


GtkListStore* boxes_os_database_get_all_media_urls_as_store_finish (BoxesOSDatabase* self, GAsyncResult* _res_, GError** error) {
	GtkListStore* result;
	BoxesOsDatabaseGetAllMediaUrlsAsStoreData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (NULL == _data_) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return NULL;
#line 2419 "os-database.c"
	}
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 2427 "os-database.c"
}


static void boxes_os_database_get_all_media_urls_as_store_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	BoxesOsDatabaseGetAllMediaUrlsAsStoreData* _data_;
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = _user_data_;
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_source_object_ = source_object;
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_res_ = _res_;
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_get_all_media_urls_as_store_co (_data_);
#line 2441 "os-database.c"
}


static gboolean boxes_os_database_get_all_media_urls_as_store_co (BoxesOsDatabaseGetAllMediaUrlsAsStoreData* _data_) {
#line 195 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 195 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 2450 "os-database.c"
		goto _state_0;
#line 195 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 2454 "os-database.c"
		goto _state_1;
		default:
#line 195 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 2459 "os-database.c"
	}
	_state_0:
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_state_ = 1;
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded (_data_->self, boxes_os_database_get_all_media_urls_as_store_ready, _data_);
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 2468 "os-database.c"
	_state_1:
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = boxes_os_database_ensure_db_loaded_finish (_data_->self, _data_->_res_);
#line 196 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (!_data_->_tmp0_) {
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp1_ = g_error_new_literal (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_DB_LOADING_FAILED, "Failed to load OS database");
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_inner_error_ = _data_->_tmp1_;
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 2486 "os-database.c"
		} else {
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_clear_error (&_data_->_inner_error_);
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_object_unref (_data_->_async_result);
#line 197 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return FALSE;
#line 2496 "os-database.c"
		}
	}
#line 199 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp2_ = gtk_list_store_new ((gint) BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_LAST, G_TYPE_STRING, osinfo_os_get_type (), -1);
#line 199 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->store = _data_->_tmp2_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = _data_->self->priv->db;
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp4_ = osinfo_db_get_os_list (_data_->_tmp3_);
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp6_ = osinfo_list_get_elements ((OsinfoList*) _data_->_tmp5_);
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->_tmp5_);
#line 2515 "os-database.c"
	{
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->entity_collection = _data_->_tmp7_;
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		for (_data_->entity_it = _data_->entity_collection; _data_->entity_it != NULL; _data_->entity_it = _data_->entity_it->next) {
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_data_->entity = (OsinfoEntity*) _data_->entity_it->data;
#line 2523 "os-database.c"
			{
#line 201 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp8_ = _data_->entity;
#line 201 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp8_, osinfo_os_get_type ()) ? ((OsinfoOs*) _data_->_tmp8_) : NULL);
#line 201 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->os = _data_->_tmp9_;
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp10_ = _data_->os;
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp11_ = osinfo_os_get_media_list (_data_->_tmp10_);
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp12_ = _data_->_tmp11_;
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp13_ = osinfo_list_get_elements ((OsinfoList*) _data_->_tmp12_);
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_data_->_tmp14_ = _data_->_tmp13_;
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->_tmp12_);
#line 2543 "os-database.c"
				{
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_data_->media_entity_collection = _data_->_tmp14_;
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					for (_data_->media_entity_it = _data_->media_entity_collection; _data_->media_entity_it != NULL; _data_->media_entity_it = _data_->media_entity_it->next) {
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_data_->media_entity = (OsinfoEntity*) _data_->media_entity_it->data;
#line 2551 "os-database.c"
						{
#line 204 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp15_ = _data_->media_entity;
#line 204 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp15_, osinfo_media_get_type ()) ? ((OsinfoMedia*) _data_->_tmp15_) : NULL);
#line 204 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->media = _data_->_tmp16_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp18_ = _data_->media;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							g_object_get (_data_->_tmp18_, "url", &_data_->_tmp19_, NULL);
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp20_ = _data_->_tmp19_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp21_ = _data_->_tmp20_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_data_->_tmp22_ = _data_->_tmp21_ != NULL;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_g_free0 (_data_->_tmp21_);
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							if (_data_->_tmp22_) {
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp24_ = _data_->media;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								g_object_get (_data_->_tmp24_, "installer", &_data_->_tmp25_, NULL);
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp26_ = _data_->_tmp25_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								if (_data_->_tmp26_) {
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
									_data_->_tmp23_ = TRUE;
#line 2583 "os-database.c"
								} else {
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
									_data_->_tmp27_ = _data_->media;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
									g_object_get (_data_->_tmp27_, "live", &_data_->_tmp28_, NULL);
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
									_data_->_tmp29_ = _data_->_tmp28_;
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
									_data_->_tmp23_ = _data_->_tmp29_;
#line 2593 "os-database.c"
								}
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp17_ = _data_->_tmp23_;
#line 2597 "os-database.c"
							} else {
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp17_ = FALSE;
#line 2601 "os-database.c"
							}
#line 206 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							if (_data_->_tmp17_) {
#line 209 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp30_ = _data_->store;
#line 209 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								memset (&_data_->_tmp31_, 0, sizeof (GtkTreeIter));
#line 209 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								gtk_list_store_append (_data_->_tmp30_, &_data_->_tmp31_);
#line 209 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->iter = _data_->_tmp31_;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp32_ = _data_->store;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp33_ = _data_->iter;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp34_ = _data_->media;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								g_object_get (_data_->_tmp34_, "url", &_data_->_tmp35_, NULL);
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp36_ = _data_->_tmp35_;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp37_ = _data_->_tmp36_;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_data_->_tmp38_ = _data_->os;
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								gtk_list_store_set (_data_->_tmp32_, &_data_->_tmp33_, BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_URL, _data_->_tmp37_, BOXES_OS_DATABASE_MEDIA_UR_LS_COLUMNS_OS, _data_->_tmp38_, -1);
#line 210 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
								_g_free0 (_data_->_tmp37_);
#line 2631 "os-database.c"
							}
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
							_g_object_unref0 (_data_->media);
#line 2635 "os-database.c"
						}
					}
#line 203 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_list_free0 (_data_->media_entity_collection);
#line 2640 "os-database.c"
				}
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (_data_->os);
#line 2644 "os-database.c"
			}
		}
#line 200 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_list_free0 (_data_->entity_collection);
#line 2649 "os-database.c"
	}
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = _data_->store;
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2661 "os-database.c"
		}
	}
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 215 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 2668 "os-database.c"
}


OsinfoMedia* boxes_os_database_get_media_by_id (BoxesOSDatabase* self, OsinfoOs* os, const gchar* id, GError** error) {
	OsinfoMedia* result = NULL;
	OsinfoMediaList* medias = NULL;
	OsinfoOs* _tmp0_;
	OsinfoMediaList* _tmp1_;
	OsinfoMedia* media = NULL;
	OsinfoMediaList* _tmp2_;
	const gchar* _tmp3_;
	OsinfoEntity* _tmp4_;
	OsinfoMedia* _tmp5_;
	OsinfoMedia* _tmp6_;
	GError * _inner_error_ = NULL;
#line 218 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 218 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (os != NULL, NULL);
#line 218 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (id != NULL, NULL);
#line 219 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = os;
#line 219 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = osinfo_os_get_media_list (_tmp0_);
#line 219 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	medias = _tmp1_;
#line 221 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = medias;
#line 221 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = id;
#line 221 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = osinfo_list_find_by_id ((OsinfoList*) _tmp2_, _tmp3_);
#line 221 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, osinfo_media_get_type ()) ? ((OsinfoMedia*) _tmp4_) : NULL);
#line 221 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	media = _tmp5_;
#line 222 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_ = media;
#line 222 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp6_ == NULL) {
#line 2710 "os-database.c"
		const gchar* _tmp7_;
		GError* _tmp8_;
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp7_ = id;
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp8_ = g_error_new (BOXES_OS_DATABASE_ERROR, BOXES_OS_DATABASE_ERROR_UNKNOWN_MEDIA_ID, "Unknown media ID '%s'", _tmp7_);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_inner_error_ = _tmp8_;
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_inner_error_->domain == BOXES_OS_DATABASE_ERROR) {
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_propagate_error (error, _inner_error_);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_object_unref0 (media);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_object_unref0 (medias);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return NULL;
#line 2729 "os-database.c"
		} else {
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_object_unref0 (media);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_g_object_unref0 (medias);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_clear_error (&_inner_error_);
#line 223 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			return NULL;
#line 2741 "os-database.c"
		}
	}
#line 225 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = media;
#line 225 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (medias);
#line 225 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 2750 "os-database.c"
}


static void _vala_array_add7 (gchar** * array, int* length, int* size, gchar* value) {
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if ((*length) == (*size)) {
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 2761 "os-database.c"
	}
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	(*array)[(*length)++] = value;
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	(*array)[*length] = NULL;
#line 2767 "os-database.c"
}


static void _vala_array_add8 (gchar** * array, int* length, int* size, gchar* value) {
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if ((*length) == (*size)) {
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 2778 "os-database.c"
	}
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	(*array)[(*length)++] = value;
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	(*array)[*length] = NULL;
#line 2784 "os-database.c"
}


static gchar** _vala_array_dup3 (gchar** self, int length) {
	gchar** result;
	int i;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = g_new0 (gchar*, length + 1);
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	for (i = 0; i < length; i++) {
#line 2795 "os-database.c"
		gchar* _tmp0_;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp0_ = g_strdup (self[i]);
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result[i] = _tmp0_;
#line 2801 "os-database.c"
	}
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 2805 "os-database.c"
}


OsinfoResources* boxes_os_database_get_resources_for_os (BoxesOSDatabase* self, OsinfoOs* os, const gchar* architecture) {
	OsinfoResources* result = NULL;
	OsinfoOs* _tmp0_;
	gchar** architectures = NULL;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar** _tmp6_;
	gint architectures_length1;
	gint _architectures_size_;
	gchar** prefs = NULL;
	gint prefs_length1 = 0;
	gint _prefs_size_ = 0;
	const gchar* _tmp7_;
	OsinfoResourcesList* list = NULL;
	OsinfoOs* _tmp21_;
	OsinfoResourcesList* _tmp22_;
	OsinfoResources* recommended = NULL;
	OsinfoResourcesList* _tmp23_;
	gchar** _tmp24_;
	gint _tmp24__length1;
	OsinfoResources* _tmp25_;
	OsinfoOs* _tmp26_;
	OsinfoResourcesList* _tmp27_;
	OsinfoResources* minimum = NULL;
	OsinfoResourcesList* _tmp28_;
	gchar** _tmp29_;
	gint _tmp29__length1;
	OsinfoResources* _tmp30_;
	OsinfoResources* _tmp31_;
	OsinfoResources* _tmp32_;
	OsinfoResources* _tmp33_;
#line 228 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 229 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = os;
#line 229 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp0_ == NULL) {
#line 2848 "os-database.c"
		OsinfoResources* _tmp1_;
#line 230 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp1_ = boxes_os_database_get_default_resources ();
#line 230 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result = _tmp1_;
#line 230 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return result;
#line 2856 "os-database.c"
	}
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = g_strdup ("x86_64");
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = g_strdup ("i686");
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = g_strdup ("i386");
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp5_ = g_strdup (OSINFO_ARCHITECTURE_ALL);
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_ = g_new0 (gchar*, 4 + 1);
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_[0] = _tmp2_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_[1] = _tmp3_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_[2] = _tmp4_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_[3] = _tmp5_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	architectures = _tmp6_;
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	architectures_length1 = 4;
#line 233 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_architectures_size_ = architectures_length1;
#line 235 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp7_ = architecture;
#line 235 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp7_ != NULL) {
#line 2886 "os-database.c"
		gchar** _tmp8_;
		gchar** _tmp9_;
		gint _tmp9__length1;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		gchar** _tmp12_;
		gint _tmp12__length1;
#line 236 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp8_ = g_new0 (gchar*, 0 + 1);
#line 236 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		prefs = (_vala_array_free (prefs, prefs_length1, (GDestroyNotify) g_free), NULL);
#line 236 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		prefs = _tmp8_;
#line 236 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		prefs_length1 = 0;
#line 236 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_prefs_size_ = prefs_length1;
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp9_ = prefs;
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp9__length1 = prefs_length1;
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp10_ = architecture;
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp11_ = g_strdup (_tmp10_);
#line 237 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_vala_array_add7 (&prefs, &prefs_length1, &_prefs_size_, _tmp11_);
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp12_ = architectures;
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp12__length1 = architectures_length1;
#line 2918 "os-database.c"
		{
			gchar** arch_collection = NULL;
			gint arch_collection_length1 = 0;
			gint _arch_collection_size_ = 0;
			gint arch_it = 0;
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			arch_collection = _tmp12_;
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			arch_collection_length1 = _tmp12__length1;
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			for (arch_it = 0; arch_it < _tmp12__length1; arch_it = arch_it + 1) {
#line 2930 "os-database.c"
				gchar* _tmp13_;
				gchar* arch = NULL;
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp13_ = g_strdup (arch_collection[arch_it]);
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				arch = _tmp13_;
#line 2937 "os-database.c"
				{
					const gchar* _tmp14_;
					const gchar* _tmp15_;
#line 240 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp14_ = arch;
#line 240 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp15_ = architecture;
#line 240 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					if (g_strcmp0 (_tmp14_, _tmp15_) != 0) {
#line 2947 "os-database.c"
						gchar** _tmp16_;
						gint _tmp16__length1;
						const gchar* _tmp17_;
						gchar* _tmp18_;
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_tmp16_ = prefs;
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_tmp16__length1 = prefs_length1;
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_tmp17_ = arch;
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_tmp18_ = g_strdup (_tmp17_);
#line 241 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
						_vala_array_add8 (&prefs, &prefs_length1, &_prefs_size_, _tmp18_);
#line 2962 "os-database.c"
					}
#line 239 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_g_free0 (arch);
#line 2966 "os-database.c"
				}
			}
		}
	} else {
		gchar** _tmp19_;
		gint _tmp19__length1;
		gchar** _tmp20_;
		gint _tmp20__length1;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp19_ = architectures;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp19__length1 = architectures_length1;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp20_ = (_tmp19_ != NULL) ? _vala_array_dup3 (_tmp19_, _tmp19__length1) : ((gpointer) _tmp19_);
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp20__length1 = _tmp19__length1;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		prefs = (_vala_array_free (prefs, prefs_length1, (GDestroyNotify) g_free), NULL);
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		prefs = _tmp20_;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		prefs_length1 = _tmp20__length1;
#line 243 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_prefs_size_ = prefs_length1;
#line 2991 "os-database.c"
	}
#line 246 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp21_ = os;
#line 246 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp22_ = osinfo_os_get_recommended_resources (_tmp21_);
#line 246 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	list = _tmp22_;
#line 247 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp23_ = list;
#line 247 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp24_ = prefs;
#line 247 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp24__length1 = prefs_length1;
#line 247 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp25_ = boxes_os_database_get_prefered_resources (_tmp23_, _tmp24_, _tmp24__length1);
#line 247 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	recommended = _tmp25_;
#line 249 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp26_ = os;
#line 249 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp27_ = osinfo_os_get_minimum_resources (_tmp26_);
#line 249 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (list);
#line 249 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	list = _tmp27_;
#line 250 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp28_ = list;
#line 250 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp29_ = prefs;
#line 250 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp29__length1 = prefs_length1;
#line 250 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp30_ = boxes_os_database_get_prefered_resources (_tmp28_, _tmp29_, _tmp29__length1);
#line 250 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	minimum = _tmp30_;
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp31_ = minimum;
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp32_ = recommended;
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp33_ = boxes_os_database_get_resources_from_os_resources (self, _tmp31_, _tmp32_);
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _tmp33_;
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (minimum);
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (recommended);
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (list);
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs = (_vala_array_free (prefs, prefs_length1, (GDestroyNotify) g_free), NULL);
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	architectures = (_vala_array_free (architectures, architectures_length1, (GDestroyNotify) g_free), NULL);
#line 252 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 3047 "os-database.c"
}


OsinfoResources* boxes_os_database_get_recommended_resources_for_os (OsinfoOs* os, const gchar* architecture) {
	OsinfoResources* result = NULL;
	gchar** prefs = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint prefs_length1;
	gint _prefs_size_;
	OsinfoResourcesList* list = NULL;
	OsinfoOs* _tmp4_;
	OsinfoResourcesList* _tmp5_;
	OsinfoResources* _tmp6_;
#line 255 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (os != NULL, NULL);
#line 255 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (architecture != NULL, NULL);
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = architecture;
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = g_strdup (OSINFO_ARCHITECTURE_ALL);
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = g_new0 (gchar*, 2 + 1);
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_[0] = _tmp1_;
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_[1] = _tmp2_;
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs = _tmp3_;
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs_length1 = 2;
#line 256 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_prefs_size_ = prefs_length1;
#line 258 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = os;
#line 258 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp5_ = osinfo_os_get_recommended_resources (_tmp4_);
#line 258 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	list = _tmp5_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_ = boxes_os_database_get_prefered_resources (list, prefs, prefs_length1);
#line 260 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _tmp6_;
#line 260 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (list);
#line 260 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs = (_vala_array_free (prefs, prefs_length1, (GDestroyNotify) g_free), NULL);
#line 260 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 3102 "os-database.c"
}


OsinfoResources* boxes_os_database_get_minimum_resources_for_os (OsinfoOs* os, const gchar* architecture) {
	OsinfoResources* result = NULL;
	gchar** prefs = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint prefs_length1;
	gint _prefs_size_;
	OsinfoResourcesList* list = NULL;
	OsinfoOs* _tmp4_;
	OsinfoResourcesList* _tmp5_;
	OsinfoResources* _tmp6_;
#line 263 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (os != NULL, NULL);
#line 263 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (architecture != NULL, NULL);
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = architecture;
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = g_strdup (OSINFO_ARCHITECTURE_ALL);
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = g_new0 (gchar*, 2 + 1);
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_[0] = _tmp1_;
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_[1] = _tmp2_;
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs = _tmp3_;
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs_length1 = 2;
#line 264 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_prefs_size_ = prefs_length1;
#line 266 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = os;
#line 266 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp5_ = osinfo_os_get_minimum_resources (_tmp4_);
#line 266 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	list = _tmp5_;
#line 268 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_ = boxes_os_database_get_prefered_resources (list, prefs, prefs_length1);
#line 268 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _tmp6_;
#line 268 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (list);
#line 268 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	prefs = (_vala_array_free (prefs, prefs_length1, (GDestroyNotify) g_free), NULL);
#line 268 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 3157 "os-database.c"
}


static OsinfoResources* boxes_os_database_get_resources_from_os_resources (BoxesOSDatabase* self, OsinfoResources* minimum, OsinfoResources* recommended) {
	OsinfoResources* result = NULL;
	OsinfoResources* resources = NULL;
	OsinfoResources* _tmp0_;
	gboolean _tmp1_ = FALSE;
	OsinfoResources* _tmp2_;
	gboolean _tmp23_ = FALSE;
	OsinfoResources* _tmp24_;
	gboolean _tmp45_ = FALSE;
	OsinfoResources* _tmp46_;
#line 271 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 272 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = boxes_os_database_get_default_resources ();
#line 272 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	resources = _tmp0_;
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = recommended;
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp2_ != NULL) {
#line 3181 "os-database.c"
		OsinfoResources* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp3_ = recommended;
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp4_ = osinfo_resources_get_n_cpus (_tmp3_);
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp5_ = _tmp4_;
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp1_ = _tmp5_ > 0;
#line 3193 "os-database.c"
	} else {
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp1_ = FALSE;
#line 3197 "os-database.c"
	}
#line 275 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp1_) {
#line 3201 "os-database.c"
		OsinfoResources* _tmp6_;
		OsinfoResources* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
#line 276 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp6_ = resources;
#line 276 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp7_ = recommended;
#line 276 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp8_ = osinfo_resources_get_n_cpus (_tmp7_);
#line 276 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp9_ = _tmp8_;
#line 276 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		osinfo_resources_set_n_cpus (_tmp6_, _tmp9_);
#line 3216 "os-database.c"
	} else {
		gboolean _tmp10_ = FALSE;
		OsinfoResources* _tmp11_;
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp11_ = minimum;
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp11_ != NULL) {
#line 3224 "os-database.c"
			OsinfoResources* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp12_ = minimum;
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp13_ = osinfo_resources_get_n_cpus (_tmp12_);
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp14_ = _tmp13_;
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp10_ = _tmp14_ > 0;
#line 3236 "os-database.c"
		} else {
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp10_ = FALSE;
#line 3240 "os-database.c"
		}
#line 277 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp10_) {
#line 3244 "os-database.c"
			OsinfoResources* _tmp15_;
			OsinfoResources* _tmp16_;
			gint _tmp17_;
			gint _tmp18_;
			OsinfoResources* _tmp19_;
			gint _tmp20_;
			gint _tmp21_;
			gint _tmp22_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp15_ = resources;
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp16_ = minimum;
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp17_ = osinfo_resources_get_n_cpus (_tmp16_);
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp18_ = _tmp17_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp19_ = resources;
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp20_ = osinfo_resources_get_n_cpus (_tmp19_);
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp21_ = _tmp20_;
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp22_ = MAX (_tmp18_, _tmp21_);
#line 278 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			osinfo_resources_set_n_cpus (_tmp15_, _tmp22_);
#line 3271 "os-database.c"
		}
	}
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp24_ = recommended;
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp24_ != NULL) {
#line 3278 "os-database.c"
		OsinfoResources* _tmp25_;
		gint64 _tmp26_;
		gint64 _tmp27_;
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp25_ = recommended;
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp26_ = osinfo_resources_get_ram (_tmp25_);
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp27_ = _tmp26_;
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp23_ = _tmp27_ > ((gint64) 0);
#line 3290 "os-database.c"
	} else {
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp23_ = FALSE;
#line 3294 "os-database.c"
	}
#line 281 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp23_) {
#line 3298 "os-database.c"
		OsinfoResources* _tmp28_;
		OsinfoResources* _tmp29_;
		gint64 _tmp30_;
		gint64 _tmp31_;
#line 282 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp28_ = resources;
#line 282 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp29_ = recommended;
#line 282 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp30_ = osinfo_resources_get_ram (_tmp29_);
#line 282 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp31_ = _tmp30_;
#line 282 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		osinfo_resources_set_ram (_tmp28_, _tmp31_);
#line 3313 "os-database.c"
	} else {
		gboolean _tmp32_ = FALSE;
		OsinfoResources* _tmp33_;
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp33_ = minimum;
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp33_ != NULL) {
#line 3321 "os-database.c"
			OsinfoResources* _tmp34_;
			gint64 _tmp35_;
			gint64 _tmp36_;
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp34_ = minimum;
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp35_ = osinfo_resources_get_ram (_tmp34_);
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp36_ = _tmp35_;
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp32_ = _tmp36_ > ((gint64) 0);
#line 3333 "os-database.c"
		} else {
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp32_ = FALSE;
#line 3337 "os-database.c"
		}
#line 283 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp32_) {
#line 3341 "os-database.c"
			OsinfoResources* _tmp37_;
			OsinfoResources* _tmp38_;
			gint64 _tmp39_;
			gint64 _tmp40_;
			OsinfoResources* _tmp41_;
			gint64 _tmp42_;
			gint64 _tmp43_;
			gint64 _tmp44_;
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp37_ = resources;
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp38_ = minimum;
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp39_ = osinfo_resources_get_ram (_tmp38_);
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp40_ = _tmp39_;
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp41_ = resources;
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp42_ = osinfo_resources_get_ram (_tmp41_);
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp43_ = _tmp42_;
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp44_ = MAX (_tmp40_, _tmp43_);
#line 284 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			osinfo_resources_set_ram (_tmp37_, _tmp44_);
#line 3368 "os-database.c"
		}
	}
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp46_ = recommended;
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp46_ != NULL) {
#line 3375 "os-database.c"
		OsinfoResources* _tmp47_;
		gint64 _tmp48_;
		gint64 _tmp49_;
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp47_ = recommended;
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp48_ = osinfo_resources_get_storage (_tmp47_);
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp49_ = _tmp48_;
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp45_ = _tmp49_ > ((gint64) 0);
#line 3387 "os-database.c"
	} else {
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp45_ = FALSE;
#line 3391 "os-database.c"
	}
#line 287 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp45_) {
#line 3395 "os-database.c"
		OsinfoResources* _tmp50_;
		OsinfoResources* _tmp51_;
		gint64 _tmp52_;
		gint64 _tmp53_;
#line 288 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp50_ = resources;
#line 288 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp51_ = recommended;
#line 288 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp52_ = osinfo_resources_get_storage (_tmp51_);
#line 288 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp53_ = _tmp52_;
#line 288 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		osinfo_resources_set_storage (_tmp50_, _tmp53_);
#line 3410 "os-database.c"
	} else {
		gboolean _tmp54_ = FALSE;
		OsinfoResources* _tmp55_;
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp55_ = minimum;
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp55_ != NULL) {
#line 3418 "os-database.c"
			OsinfoResources* _tmp56_;
			gint64 _tmp57_;
			gint64 _tmp58_;
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp56_ = minimum;
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp57_ = osinfo_resources_get_storage (_tmp56_);
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp58_ = _tmp57_;
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp54_ = _tmp58_ > ((gint64) 0);
#line 3430 "os-database.c"
		} else {
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp54_ = FALSE;
#line 3434 "os-database.c"
		}
#line 289 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_tmp54_) {
#line 3438 "os-database.c"
			OsinfoResources* _tmp59_;
			OsinfoResources* _tmp60_;
			gint64 _tmp61_;
			gint64 _tmp62_;
			OsinfoResources* _tmp63_;
			gint64 _tmp64_;
			gint64 _tmp65_;
			gint64 _tmp66_;
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp59_ = resources;
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp60_ = minimum;
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp61_ = osinfo_resources_get_storage (_tmp60_);
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp62_ = _tmp61_;
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp63_ = resources;
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp64_ = osinfo_resources_get_storage (_tmp63_);
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp65_ = _tmp64_;
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			_tmp66_ = MAX (_tmp62_ * 2, _tmp65_);
#line 290 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			osinfo_resources_set_storage (_tmp59_, _tmp66_);
#line 3465 "os-database.c"
		}
	}
#line 292 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = resources;
#line 292 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 3472 "os-database.c"
}


static OsinfoResources* boxes_os_database_get_prefered_resources (OsinfoResourcesList* list, gchar** prefs, int prefs_length1) {
	OsinfoResources* result = NULL;
	gchar** _tmp0_;
	gint _tmp0__length1;
	OsinfoResourcesList* filtered = NULL;
	OsinfoResourcesList* _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp3_;
	OsinfoResourcesList* _tmp4_;
	OsinfoResourcesList* _tmp5_;
	gint _tmp6_;
#line 295 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (list != NULL, NULL);
#line 296 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = prefs;
#line 296 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0__length1 = prefs_length1;
#line 296 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp0__length1 <= 0) {
#line 297 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result = NULL;
#line 297 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return result;
#line 3500 "os-database.c"
	}
#line 299 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = list;
#line 299 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = prefs;
#line 299 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2__length1 = prefs_length1;
#line 299 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp3_ = _tmp2_[0];
#line 299 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp4_ = boxes_os_database_filter_resources_list_by_arch (_tmp1_, _tmp3_);
#line 299 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	filtered = _tmp4_;
#line 300 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp5_ = filtered;
#line 300 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp6_ = osinfo_list_get_length ((OsinfoList*) _tmp5_);
#line 300 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_tmp6_ <= 0) {
#line 3520 "os-database.c"
		OsinfoResourcesList* _tmp7_;
		gchar** _tmp8_;
		gint _tmp8__length1;
		gchar** _tmp9_;
		gint _tmp9__length1;
		OsinfoResources* _tmp10_;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp7_ = list;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp8_ = prefs;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp8__length1 = prefs_length1;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp9_ = prefs;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp9__length1 = prefs_length1;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp10_ = boxes_os_database_get_prefered_resources (_tmp7_, _tmp8_ + 1, _tmp9__length1 - 1);
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result = _tmp10_;
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (filtered);
#line 301 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return result;
#line 3545 "os-database.c"
	} else {
		OsinfoResourcesList* _tmp11_;
		OsinfoEntity* _tmp12_;
		OsinfoResources* _tmp13_;
#line 305 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp11_ = filtered;
#line 305 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp12_ = osinfo_list_get_nth ((OsinfoList*) _tmp11_, 0);
#line 305 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, osinfo_resources_get_type ()) ? ((OsinfoResources*) _tmp12_) : NULL);
#line 305 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		result = _tmp13_;
#line 305 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (filtered);
#line 305 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return result;
#line 3562 "os-database.c"
	}
#line 295 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (filtered);
#line 3566 "os-database.c"
}


static OsinfoResourcesList* boxes_os_database_filter_resources_list_by_arch (OsinfoResourcesList* list, const gchar* arch) {
	OsinfoResourcesList* result = NULL;
	OsinfoResourcesList* new_list = NULL;
	OsinfoResourcesList* _tmp0_;
	OsinfoResourcesList* _tmp1_;
	GList* _tmp2_;
#line 308 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (list != NULL, NULL);
#line 308 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_return_val_if_fail (arch != NULL, NULL);
#line 309 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = osinfo_resourceslist_new ();
#line 309 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	new_list = _tmp0_;
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp1_ = list;
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp2_ = osinfo_list_get_elements ((OsinfoList*) _tmp1_);
#line 3588 "os-database.c"
	{
		GList* entity_collection = NULL;
		GList* entity_it = NULL;
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		entity_collection = _tmp2_;
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		for (entity_it = entity_collection; entity_it != NULL; entity_it = entity_it->next) {
#line 3596 "os-database.c"
			OsinfoEntity* entity = NULL;
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			entity = (OsinfoEntity*) entity_it->data;
#line 3600 "os-database.c"
			{
				OsinfoResources* resources = NULL;
				OsinfoEntity* _tmp3_;
				OsinfoResources* _tmp4_;
				BoxesCPUArchCompatibility compatibility = 0;
				const gchar* _tmp5_;
				OsinfoResources* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				BoxesCPUArchCompatibility _tmp9_;
				gboolean _tmp10_ = FALSE;
				BoxesCPUArchCompatibility _tmp11_;
#line 311 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp3_ = entity;
#line 311 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp4_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, osinfo_resources_get_type ()) ? ((OsinfoResources*) _tmp3_) : NULL);
#line 311 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				resources = _tmp4_;
#line 312 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp5_ = arch;
#line 312 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp6_ = resources;
#line 312 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp7_ = osinfo_resources_get_architecture (_tmp6_);
#line 312 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp8_ = _tmp7_;
#line 312 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp9_ = boxes_compare_cpu_architectures (_tmp5_, _tmp8_);
#line 312 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				compatibility = _tmp9_;
#line 313 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_tmp11_ = compatibility;
#line 313 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_tmp11_ == BOXES_CPU_ARCH_COMPATIBILITY_IDENTICAL) {
#line 313 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp10_ = TRUE;
#line 3637 "os-database.c"
				} else {
					BoxesCPUArchCompatibility _tmp12_;
#line 313 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp12_ = compatibility;
#line 313 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp10_ = _tmp12_ == BOXES_CPU_ARCH_COMPATIBILITY_COMPATIBLE;
#line 3644 "os-database.c"
				}
#line 313 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				if (_tmp10_) {
#line 3648 "os-database.c"
					OsinfoResourcesList* _tmp13_;
					OsinfoResources* _tmp14_;
#line 314 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp13_ = new_list;
#line 314 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					_tmp14_ = resources;
#line 314 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
					osinfo_list_add ((OsinfoList*) _tmp13_, (OsinfoEntity*) _tmp14_);
#line 3657 "os-database.c"
				}
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				_g_object_unref0 (resources);
#line 3661 "os-database.c"
			}
		}
#line 310 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_list_free0 (entity_collection);
#line 3666 "os-database.c"
	}
#line 317 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = new_list;
#line 317 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 3672 "os-database.c"
}


static void boxes_os_database_ensure_db_loaded_data_free (gpointer _data) {
	BoxesOsDatabaseEnsureDbLoadedData* _data_;
	_data_ = _data;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (_data_->self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_slice_free (BoxesOsDatabaseEnsureDbLoadedData, _data_);
#line 3683 "os-database.c"
}


static void boxes_os_database_ensure_db_loaded (BoxesOSDatabase* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	BoxesOsDatabaseEnsureDbLoadedData* _data_;
	BoxesOSDatabase* _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_slice_new0 (BoxesOsDatabaseEnsureDbLoadedData);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_set_task_data (_data_->_async_result, _data_, boxes_os_database_ensure_db_loaded_data_free);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->self = _tmp0_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded_co (_data_);
#line 3702 "os-database.c"
}


static gboolean boxes_os_database_ensure_db_loaded_finish (BoxesOSDatabase* self, GAsyncResult* _res_) {
	gboolean result;
	BoxesOsDatabaseEnsureDbLoadedData* _data_;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	result = _data_->result;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return result;
#line 3715 "os-database.c"
}


static Block67Data* block67_data_ref (Block67Data* _data67_) {
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_atomic_int_inc (&_data67_->_ref_count_);
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return _data67_;
#line 3724 "os-database.c"
}


static void block67_data_unref (void * _userdata_) {
	Block67Data* _data67_;
	_data67_ = (Block67Data*) _userdata_;
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (g_atomic_int_dec_and_test (&_data67_->_ref_count_)) {
#line 3733 "os-database.c"
		BoxesOSDatabase* self;
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		self = _data67_->self;
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_g_object_unref0 (self);
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_slice_free (Block67Data, _data67_);
#line 3741 "os-database.c"
	}
}


static Block68Data* block68_data_ref (Block68Data* _data68_) {
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_atomic_int_inc (&_data68_->_ref_count_);
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return _data68_;
#line 3751 "os-database.c"
}


static void block68_data_unref (void * _userdata_) {
	Block68Data* _data68_;
	_data68_ = (Block68Data*) _userdata_;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (g_atomic_int_dec_and_test (&_data68_->_ref_count_)) {
#line 3760 "os-database.c"
		BoxesOSDatabase* self;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		self = _data68_->_data67_->self;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		block67_data_unref (_data68_->_data67_);
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data68_->_data67_ = NULL;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_slice_free (Block68Data, _data68_);
#line 3770 "os-database.c"
	}
}


static void ___lambda19_ (Block68Data* _data68_) {
	Block67Data* _data67_;
	BoxesOSDatabase* self;
	gulong _tmp0_;
#line 327 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data67_ = _data68_->_data67_;
#line 327 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	self = _data67_->self;
#line 328 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_ensure_db_loaded_co (_data67_->_async_data_);
#line 329 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_tmp0_ = _data68_->db_loaded_id;
#line 329 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_signal_handler_disconnect ((GObject*) self, _tmp0_);
#line 3789 "os-database.c"
}


static void ____lambda19__boxes_os_database_db_loaded (BoxesOSDatabase* _sender, gpointer self) {
#line 327 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	___lambda19_ (self);
#line 3796 "os-database.c"
}


static gboolean boxes_os_database_ensure_db_loaded_co (BoxesOsDatabaseEnsureDbLoadedData* _data_) {
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	switch (_data_->_state_) {
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 0:
#line 3805 "os-database.c"
		goto _state_0;
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		case 1:
#line 3809 "os-database.c"
		goto _state_1;
		default:
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_assert_not_reached ();
#line 3814 "os-database.c"
	}
	_state_0:
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data67_ = g_slice_new0 (Block67Data);
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data67_->_ref_count_ = 1;
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data67_->self = g_object_ref (_data_->self);
#line 320 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data67_->_async_data_ = _data_;
#line 321 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp0_ = _data_->self->priv->db;
#line 321 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_tmp0_ != NULL) {
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->result = TRUE;
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		block67_data_unref (_data_->_data67_);
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data67_ = NULL;
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		if (_data_->_state_ != 0) {
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 3843 "os-database.c"
			}
		}
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		g_object_unref (_data_->_async_result);
#line 322 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 3850 "os-database.c"
	}
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp1_ = _data_->self->priv->db_loading;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_tmp1_) {
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data68_ = g_slice_new0 (Block68Data);
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data68_->_ref_count_ = 1;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data68_->_data67_ = block67_data_ref (_data_->_data67_);
#line 325 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data68_->db_loaded_id = (gulong) 0;
#line 327 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_tmp2_ = g_signal_connect_data (_data_->self, "db-loaded", (GCallback) ____lambda19__boxes_os_database_db_loaded, block68_data_ref (_data_->_data68_), (GClosureNotify) block68_data_unref, 0);
#line 327 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data68_->db_loaded_id = _data_->_tmp2_;
#line 332 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_state_ = 1;
#line 332 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		return FALSE;
#line 3872 "os-database.c"
		_state_1:
		;
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		block68_data_unref (_data_->_data68_);
#line 324 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		_data_->_data68_ = NULL;
#line 3879 "os-database.c"
	}
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_tmp3_ = _data_->self->priv->db;
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->result = _data_->_tmp3_ != NULL;
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	block67_data_unref (_data_->_data67_);
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_data_->_data67_ = NULL;
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	if (_data_->_state_ != 0) {
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 3897 "os-database.c"
		}
	}
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_object_unref (_data_->_async_result);
#line 335 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return FALSE;
#line 3904 "os-database.c"
}


BoxesOSDatabase* boxes_os_database_construct (GType object_type) {
	BoxesOSDatabase * self = NULL;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	self = (BoxesOSDatabase*) g_object_new (object_type, NULL);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return self;
#line 3914 "os-database.c"
}


BoxesOSDatabase* boxes_os_database_new (void) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	return boxes_os_database_construct (BOXES_TYPE_OS_DATABASE);
#line 3921 "os-database.c"
}


static void boxes_os_database_class_init (BoxesOSDatabaseClass * klass) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_parent_class = g_type_class_peek_parent (klass);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	g_type_class_add_private (klass, sizeof (BoxesOSDatabasePrivate));
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_os_database_finalize;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	boxes_os_database_signals[BOXES_OS_DATABASE_DB_LOADED_SIGNAL] = g_signal_new ("db-loaded", BOXES_TYPE_OS_DATABASE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 3934 "os-database.c"
}


static void boxes_os_database_instance_init (BoxesOSDatabase * self) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	self->priv = BOXES_OS_DATABASE_GET_PRIVATE (self);
#line 3941 "os-database.c"
}


static void boxes_os_database_finalize (GObject * obj) {
	BoxesOSDatabase * self;
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_OS_DATABASE, BoxesOSDatabase);
#line 29 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	_g_object_unref0 (self->priv->db);
#line 12 "/home/fborges/checkout/gnome-boxes/src/os-database.vala"
	G_OBJECT_CLASS (boxes_os_database_parent_class)->finalize (obj);
#line 3953 "os-database.c"
}


GType boxes_os_database_get_type (void) {
	static volatile gsize boxes_os_database_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_os_database_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesOSDatabaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_os_database_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesOSDatabase), 0, (GInstanceInitFunc) boxes_os_database_instance_init, NULL };
		GType boxes_os_database_type_id;
		boxes_os_database_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesOSDatabase", &g_define_type_info, 0);
		g_once_init_leave (&boxes_os_database_type_id__volatile, boxes_os_database_type_id);
	}
	return boxes_os_database_type_id__volatile;
}


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


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



