/* gitg-avatar-cache.c generated by valac 0.34.0.108-f56ac, the Vala compiler
 * generated from gitg-avatar-cache.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2013 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gio/gio.h>
#include <libgitg/gitg-platform-support.h>


#define GITG_TYPE_AVATAR_CACHE (gitg_avatar_cache_get_type ())
#define GITG_AVATAR_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_AVATAR_CACHE, GitgAvatarCache))
#define GITG_AVATAR_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_AVATAR_CACHE, GitgAvatarCacheClass))
#define GITG_IS_AVATAR_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_AVATAR_CACHE))
#define GITG_IS_AVATAR_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_AVATAR_CACHE))
#define GITG_AVATAR_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_AVATAR_CACHE, GitgAvatarCacheClass))

typedef struct _GitgAvatarCache GitgAvatarCache;
typedef struct _GitgAvatarCacheClass GitgAvatarCacheClass;
typedef struct _GitgAvatarCachePrivate GitgAvatarCachePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GitgAvatarCacheLoadData GitgAvatarCacheLoadData;
typedef struct _GitgAvatarCacheReadAvatarFromFileData GitgAvatarCacheReadAvatarFromFileData;
typedef struct _GitgAvatarCacheReadAvatarData GitgAvatarCacheReadAvatarData;

struct _GitgAvatarCache {
	GObject parent_instance;
	GitgAvatarCachePrivate * priv;
};

struct _GitgAvatarCacheClass {
	GObjectClass parent_class;
};

struct _GitgAvatarCachePrivate {
	GeeHashMap* d_cache;
};

struct _GitgAvatarCacheLoadData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgAvatarCache* self;
	gchar* email;
	gint size;
	GCancellable* cancellable;
	GdkPixbuf* result;
	gchar* id;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* ckey;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GeeHashMap* _tmp12_;
	const gchar* _tmp13_;
	gboolean _tmp14_;
	GeeHashMap* _tmp15_;
	const gchar* _tmp16_;
	gpointer _tmp17_;
	gchar* gravatar;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	gint _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	GFile* gfile;
	const gchar* _tmp25_;
	GFile* _tmp26_;
	GdkPixbuf* pixbuf;
	const gchar* _tmp27_;
	GFile* _tmp28_;
	gint _tmp29_;
	GCancellable* _tmp30_;
	GdkPixbuf* _tmp31_;
	GeeHashMap* _tmp32_;
	const gchar* _tmp33_;
	GdkPixbuf* _tmp34_;
};

struct _GitgAvatarCacheReadAvatarFromFileData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgAvatarCache* self;
	gchar* id;
	GFile* file;
	gint size;
	GCancellable* cancellable;
	GdkPixbuf* result;
	GInputStream* stream;
	GInputStream* _tmp0_;
	GFile* _tmp1_;
	GCancellable* _tmp2_;
	GInputStream* _tmp3_;
	GInputStream* _tmp4_;
	guint8* buffer;
	guint8* _tmp5_;
	gint buffer_length1;
	gint _buffer_size_;
	GdkPixbufLoader* loader;
	GdkPixbufLoader* _tmp6_;
	GdkPixbufLoader* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	const gchar* _tmp10_;
	GInputStream* _tmp11_;
	guint8* _tmp12_;
	gint _tmp12__length1;
	GdkPixbufLoader* _tmp13_;
	GCancellable* _tmp14_;
	GdkPixbuf* _tmp15_;
	GError * _inner_error_;
};

struct _GitgAvatarCacheReadAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgAvatarCache* self;
	gchar* id;
	GInputStream* stream;
	guint8* buffer;
	gint buffer_length1;
	GdkPixbufLoader* loader;
	GCancellable* cancellable;
	GdkPixbuf* result;
	gssize n;
	gssize _tmp0_;
	GInputStream* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	GCancellable* _tmp3_;
	gssize _tmp4_;
	gssize _tmp5_;
	GdkPixbufLoader* _tmp6_;
	guint8* _tmp7_;
	gint _tmp7__length1;
	gssize _tmp8_;
	const gchar* _tmp9_;
	GInputStream* _tmp10_;
	guint8* _tmp11_;
	gint _tmp11__length1;
	GdkPixbufLoader* _tmp12_;
	GCancellable* _tmp13_;
	GdkPixbuf* _tmp14_;
	GdkPixbufLoader* _tmp15_;
	GdkPixbufLoader* _tmp16_;
	GdkPixbuf* _tmp17_;
	GdkPixbuf* _tmp18_;
	GError * _inner_error_;
};


static gpointer gitg_avatar_cache_parent_class = NULL;
static GitgAvatarCache* gitg_avatar_cache_s_instance;
static GitgAvatarCache* gitg_avatar_cache_s_instance = NULL;

GType gitg_avatar_cache_get_type (void) G_GNUC_CONST;
#define GITG_AVATAR_CACHE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_AVATAR_CACHE, GitgAvatarCachePrivate))
enum  {
	GITG_AVATAR_CACHE_DUMMY_PROPERTY
};
static GitgAvatarCache* gitg_avatar_cache_new (void);
static GitgAvatarCache* gitg_avatar_cache_construct (GType object_type);
GitgAvatarCache* gitg_avatar_cache_default (void);
static void gitg_avatar_cache_load_data_free (gpointer _data);
void gitg_avatar_cache_load (GitgAvatarCache* self, const gchar* email, gint size, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GdkPixbuf* gitg_avatar_cache_load_finish (GitgAvatarCache* self, GAsyncResult* _res_);
static gboolean gitg_avatar_cache_load_co (GitgAvatarCacheLoadData* _data_);
static void gitg_avatar_cache_read_avatar_from_file (GitgAvatarCache* self, const gchar* id, GFile* file, gint size, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GdkPixbuf* gitg_avatar_cache_read_avatar_from_file_finish (GitgAvatarCache* self, GAsyncResult* _res_);
static void gitg_avatar_cache_load_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_avatar_cache_read_avatar_from_file_data_free (gpointer _data);
static gboolean gitg_avatar_cache_read_avatar_from_file_co (GitgAvatarCacheReadAvatarFromFileData* _data_);
static void gitg_avatar_cache_read_avatar_from_file_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_avatar_cache_read_avatar (GitgAvatarCache* self, const gchar* id, GInputStream* stream, guint8* buffer, int buffer_length1, GdkPixbufLoader* loader, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GdkPixbuf* gitg_avatar_cache_read_avatar_finish (GitgAvatarCache* self, GAsyncResult* _res_);
static void gitg_avatar_cache_read_avatar_data_free (gpointer _data);
static gboolean gitg_avatar_cache_read_avatar_co (GitgAvatarCacheReadAvatarData* _data_);
static void gitg_avatar_cache_read_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static GObject * gitg_avatar_cache_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void gitg_avatar_cache_finalize (GObject * obj);


static GitgAvatarCache* gitg_avatar_cache_construct (GType object_type) {
	GitgAvatarCache * self = NULL;
#line 32 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	self = (GitgAvatarCache*) g_object_new (object_type, NULL);
#line 30 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return self;
#line 228 "gitg-avatar-cache.c"
}


static GitgAvatarCache* gitg_avatar_cache_new (void) {
#line 30 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return gitg_avatar_cache_construct (GITG_TYPE_AVATAR_CACHE);
#line 235 "gitg-avatar-cache.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return self ? g_object_ref (self) : NULL;
#line 242 "gitg-avatar-cache.c"
}


GitgAvatarCache* gitg_avatar_cache_default (void) {
	GitgAvatarCache* result = NULL;
	GitgAvatarCache* _tmp0_ = NULL;
	GitgAvatarCache* _tmp2_ = NULL;
	GitgAvatarCache* _tmp3_ = NULL;
#line 37 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp0_ = gitg_avatar_cache_s_instance;
#line 37 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_tmp0_ == NULL) {
#line 255 "gitg-avatar-cache.c"
		GitgAvatarCache* _tmp1_ = NULL;
#line 39 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_tmp1_ = gitg_avatar_cache_new ();
#line 39 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_object_unref0 (gitg_avatar_cache_s_instance);
#line 39 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		gitg_avatar_cache_s_instance = _tmp1_;
#line 263 "gitg-avatar-cache.c"
	}
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp2_ = gitg_avatar_cache_s_instance;
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	result = _tmp3_;
#line 42 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return result;
#line 273 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_load_data_free (gpointer _data) {
	GitgAvatarCacheLoadData* _data_;
	_data_ = _data;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->email);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->cancellable);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->result);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->self);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_slice_free (GitgAvatarCacheLoadData, _data_);
#line 290 "gitg-avatar-cache.c"
}


void gitg_avatar_cache_load (GitgAvatarCache* self, const gchar* email, gint size, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgAvatarCacheLoadData* _data_;
	GitgAvatarCache* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GCancellable* _tmp4_ = NULL;
	GCancellable* _tmp5_ = NULL;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = g_slice_new0 (GitgAvatarCacheLoadData);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_avatar_cache_load);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_avatar_cache_load_data_free);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->self = _tmp0_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp1_ = email;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->email);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->email = _tmp2_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp3_ = size;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->size = _tmp3_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp4_ = cancellable;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->cancellable);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->cancellable = _tmp5_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_load_co (_data_);
#line 334 "gitg-avatar-cache.c"
}


GdkPixbuf* gitg_avatar_cache_load_finish (GitgAvatarCache* self, GAsyncResult* _res_) {
	GdkPixbuf* result;
	GitgAvatarCacheLoadData* _data_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	result = _data_->result;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->result = NULL;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return result;
#line 349 "gitg-avatar-cache.c"
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
#line 1434 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1435 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	result = self;
#line 1435 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 361 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_load_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgAvatarCacheLoadData* _data_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = _user_data_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_source_object_ = source_object;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_res_ = _res_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_load_co (_data_);
#line 375 "gitg-avatar-cache.c"
}


static gboolean gitg_avatar_cache_load_co (GitgAvatarCacheLoadData* _data_) {
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	switch (_data_->_state_) {
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 0:
#line 384 "gitg-avatar-cache.c"
		goto _state_0;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 1:
#line 388 "gitg-avatar-cache.c"
		goto _state_1;
		default:
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_assert_not_reached ();
#line 393 "gitg-avatar-cache.c"
	}
	_state_0:
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp0_ = NULL;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp0_ = _data_->email;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp1_ = NULL;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp1_ = g_utf8_strdown (_data_->_tmp0_, (gssize) -1);
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp2_ = NULL;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp3_ = NULL;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp3_ = g_compute_checksum_for_string (G_CHECKSUM_MD5, _data_->_tmp2_, (gsize) -1);
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp4_ = NULL;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->_tmp2_);
#line 47 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->id = _data_->_tmp4_;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp5_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp5_ = _data_->id;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp6_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp6_ = string_to_string (_data_->_tmp5_);
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp7_ = 0;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp7_ = _data_->size;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp8_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp8_ = g_strdup_printf ("%i", _data_->_tmp7_);
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp9_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp9_ = _data_->_tmp8_;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp10_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp10_ = g_strconcat (_data_->_tmp6_, " ", _data_->_tmp9_, NULL);
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp11_ = NULL;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp11_ = _data_->_tmp10_;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->_tmp9_);
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->ckey = _data_->_tmp11_;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp12_ = NULL;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp12_ = _data_->self->priv->d_cache;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp13_ = NULL;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp13_ = _data_->ckey;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp14_ = FALSE;
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp14_ = gee_abstract_map_has_key ((GeeAbstractMap*) _data_->_tmp12_, _data_->_tmp13_);
#line 51 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_tmp14_) {
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp15_ = NULL;
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp15_ = _data_->self->priv->d_cache;
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp16_ = NULL;
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp16_ = _data_->ckey;
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp17_ = NULL;
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp15_, _data_->_tmp16_);
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->result = (GdkPixbuf*) _data_->_tmp17_;
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_free0 (_data_->ckey);
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_free0 (_data_->id);
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (_data_->_state_ == 0) {
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 488 "gitg-avatar-cache.c"
		} else {
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 492 "gitg-avatar-cache.c"
		}
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_object_unref (_data_->_async_result);
#line 53 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 498 "gitg-avatar-cache.c"
	}
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp18_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp18_ = _data_->id;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp19_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp19_ = string_to_string (_data_->_tmp18_);
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp20_ = 0;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp20_ = _data_->size;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp21_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp21_ = g_strdup_printf ("%i", _data_->_tmp20_);
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp22_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp22_ = _data_->_tmp21_;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp23_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp23_ = g_strconcat ("https://www.gravatar.com/avatar/", _data_->_tmp19_, "?d=404&s=", _data_->_tmp22_, NULL);
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp24_ = NULL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp24_ = _data_->_tmp23_;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->_tmp22_);
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->gravatar = _data_->_tmp24_;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp25_ = NULL;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp25_ = _data_->gravatar;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp26_ = NULL;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp26_ = g_file_new_for_uri (_data_->_tmp25_);
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->gfile = _data_->_tmp26_;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp27_ = NULL;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp27_ = _data_->id;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp28_ = NULL;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp28_ = _data_->gfile;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp29_ = 0;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp29_ = _data_->size;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp30_ = NULL;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp30_ = _data_->cancellable;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_state_ = 1;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_read_avatar_from_file (_data_->self, _data_->_tmp27_, _data_->_tmp28_, _data_->_tmp29_, _data_->_tmp30_, gitg_avatar_cache_load_ready, _data_);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 564 "gitg-avatar-cache.c"
	_state_1:
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp31_ = NULL;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp31_ = gitg_avatar_cache_read_avatar_from_file_finish (_data_->self, _data_->_res_);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->pixbuf = _data_->_tmp31_;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp32_ = NULL;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp32_ = _data_->self->priv->d_cache;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp33_ = NULL;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp33_ = _data_->ckey;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp34_ = NULL;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp34_ = _data_->pixbuf;
#line 61 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp32_, _data_->_tmp33_, _data_->_tmp34_);
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->result = _data_->pixbuf;
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->gfile);
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->gravatar);
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->ckey);
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->id);
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_state_ == 0) {
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 600 "gitg-avatar-cache.c"
	} else {
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 604 "gitg-avatar-cache.c"
	}
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_object_unref (_data_->_async_result);
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->pixbuf);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->gfile);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->gravatar);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->ckey);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->id);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_state_ == 0) {
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 624 "gitg-avatar-cache.c"
	} else {
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 628 "gitg-avatar-cache.c"
	}
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_object_unref (_data_->_async_result);
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 634 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_read_avatar_from_file_data_free (gpointer _data) {
	GitgAvatarCacheReadAvatarFromFileData* _data_;
	_data_ = _data;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->id);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->file);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->cancellable);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->result);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->self);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_slice_free (GitgAvatarCacheReadAvatarFromFileData, _data_);
#line 653 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_read_avatar_from_file (GitgAvatarCache* self, const gchar* id, GFile* file, gint size, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgAvatarCacheReadAvatarFromFileData* _data_;
	GitgAvatarCache* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GFile* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	GCancellable* _tmp6_ = NULL;
	GCancellable* _tmp7_ = NULL;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = g_slice_new0 (GitgAvatarCacheReadAvatarFromFileData);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_avatar_cache_read_avatar_from_file);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_avatar_cache_read_avatar_from_file_data_free);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->self = _tmp0_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp1_ = id;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->id);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->id = _tmp2_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp3_ = file;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->file);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->file = _tmp4_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp5_ = size;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->size = _tmp5_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp6_ = cancellable;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->cancellable);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->cancellable = _tmp7_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_read_avatar_from_file_co (_data_);
#line 707 "gitg-avatar-cache.c"
}


static GdkPixbuf* gitg_avatar_cache_read_avatar_from_file_finish (GitgAvatarCache* self, GAsyncResult* _res_) {
	GdkPixbuf* result;
	GitgAvatarCacheReadAvatarFromFileData* _data_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	result = _data_->result;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->result = NULL;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return result;
#line 722 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_read_avatar_from_file_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgAvatarCacheReadAvatarFromFileData* _data_;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = _user_data_;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_source_object_ = source_object;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_res_ = _res_;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_read_avatar_from_file_co (_data_);
#line 736 "gitg-avatar-cache.c"
}


static gboolean gitg_avatar_cache_read_avatar_from_file_co (GitgAvatarCacheReadAvatarFromFileData* _data_) {
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	switch (_data_->_state_) {
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 0:
#line 745 "gitg-avatar-cache.c"
		goto _state_0;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 1:
#line 749 "gitg-avatar-cache.c"
		goto _state_1;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 2:
#line 753 "gitg-avatar-cache.c"
		goto _state_2;
		default:
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_assert_not_reached ();
#line 758 "gitg-avatar-cache.c"
	}
	_state_0:
	{
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp1_ = NULL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp1_ = _data_->file;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp2_ = NULL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp2_ = _data_->cancellable;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_state_ = 1;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		gitg_platform_support_http_get (_data_->_tmp1_, _data_->_tmp2_, gitg_avatar_cache_read_avatar_from_file_ready, _data_);
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 776 "gitg-avatar-cache.c"
		_state_1:
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp3_ = NULL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp3_ = gitg_platform_support_http_get_finish (_data_->_res_, &_data_->_inner_error_);
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp0_ = _data_->_tmp3_;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 786 "gitg-avatar-cache.c"
			goto __catch2_g_error;
		}
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp4_ = NULL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp4_ = _data_->_tmp0_;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp0_ = NULL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_object_unref0 (_data_->stream);
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->stream = _data_->_tmp4_;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_object_unref0 (_data_->_tmp0_);
#line 801 "gitg-avatar-cache.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_clear_error (&_data_->_inner_error_);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_inner_error_ = NULL;
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->result = NULL;
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_object_unref0 (_data_->stream);
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (_data_->_state_ == 0) {
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 818 "gitg-avatar-cache.c"
		} else {
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 822 "gitg-avatar-cache.c"
		}
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_object_unref (_data_->_async_result);
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 828 "gitg-avatar-cache.c"
	}
	__finally2:
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_g_object_unref0 (_data_->stream);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.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 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_clear_error (&_data_->_inner_error_);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 841 "gitg-avatar-cache.c"
	}
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp5_ = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp5_ = g_new0 (guint8, 4096);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer_length1 = 0;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_buffer_size_ = 0;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer = _data_->_tmp5_;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer_length1 = 4096;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_buffer_size_ = _data_->buffer_length1;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp6_ = NULL;
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp6_ = gdk_pixbuf_loader_new ();
#line 82 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->loader = _data_->_tmp6_;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp7_ = NULL;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp7_ = _data_->loader;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp8_ = 0;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp8_ = _data_->size;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp9_ = 0;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp9_ = _data_->size;
#line 84 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gdk_pixbuf_loader_set_size (_data_->_tmp7_, _data_->_tmp8_, _data_->_tmp9_);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp10_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp10_ = _data_->id;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp11_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp11_ = _data_->stream;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp12_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp12__length1 = 0;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp12_ = _data_->buffer;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp12__length1 = _data_->buffer_length1;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp13_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp13_ = _data_->loader;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp14_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp14_ = _data_->cancellable;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_state_ = 2;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_read_avatar (_data_->self, _data_->_tmp10_, _data_->_tmp11_, _data_->_tmp12_, _data_->_tmp12__length1, _data_->_tmp13_, _data_->_tmp14_, gitg_avatar_cache_read_avatar_from_file_ready, _data_);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 907 "gitg-avatar-cache.c"
	_state_2:
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp15_ = NULL;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp15_ = gitg_avatar_cache_read_avatar_finish (_data_->self, _data_->_res_);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->result = _data_->_tmp15_;
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->loader);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer = (g_free (_data_->buffer), NULL);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->stream);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_state_ == 0) {
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 925 "gitg-avatar-cache.c"
	} else {
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 929 "gitg-avatar-cache.c"
	}
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_object_unref (_data_->_async_result);
#line 86 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->loader);
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer = (g_free (_data_->buffer), NULL);
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->stream);
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_state_ == 0) {
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 945 "gitg-avatar-cache.c"
	} else {
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 949 "gitg-avatar-cache.c"
	}
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_object_unref (_data_->_async_result);
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 955 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_read_avatar_data_free (gpointer _data) {
	GitgAvatarCacheReadAvatarData* _data_;
	_data_ = _data;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->id);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->stream);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->loader);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->cancellable);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->result);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->self);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_slice_free (GitgAvatarCacheReadAvatarData, _data_);
#line 976 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_read_avatar (GitgAvatarCache* self, const gchar* id, GInputStream* stream, guint8* buffer, int buffer_length1, GdkPixbufLoader* loader, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgAvatarCacheReadAvatarData* _data_;
	GitgAvatarCache* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GInputStream* _tmp3_ = NULL;
	GInputStream* _tmp4_ = NULL;
	guint8* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	GdkPixbufLoader* _tmp6_ = NULL;
	GdkPixbufLoader* _tmp7_ = NULL;
	GCancellable* _tmp8_ = NULL;
	GCancellable* _tmp9_ = NULL;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = g_slice_new0 (GitgAvatarCacheReadAvatarData);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_avatar_cache_read_avatar);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_avatar_cache_read_avatar_data_free);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->self = _tmp0_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp1_ = id;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_free0 (_data_->id);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->id = _tmp2_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp3_ = stream;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->stream);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->stream = _tmp4_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp5_ = buffer;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp5__length1 = buffer_length1;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer = _tmp5_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->buffer_length1 = _tmp5__length1;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp6_ = loader;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp7_ = _g_object_ref0 (_tmp6_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->loader);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->loader = _tmp7_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp8_ = cancellable;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (_data_->cancellable);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->cancellable = _tmp9_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_read_avatar_co (_data_);
#line 1045 "gitg-avatar-cache.c"
}


static GdkPixbuf* gitg_avatar_cache_read_avatar_finish (GitgAvatarCache* self, GAsyncResult* _res_) {
	GdkPixbuf* result;
	GitgAvatarCacheReadAvatarData* _data_;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	result = _data_->result;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->result = NULL;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return result;
#line 1060 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_read_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgAvatarCacheReadAvatarData* _data_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_ = _user_data_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_source_object_ = source_object;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_res_ = _res_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_read_avatar_co (_data_);
#line 1074 "gitg-avatar-cache.c"
}


static gboolean gitg_avatar_cache_read_avatar_co (GitgAvatarCacheReadAvatarData* _data_) {
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	switch (_data_->_state_) {
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 0:
#line 1083 "gitg-avatar-cache.c"
		goto _state_0;
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 1:
#line 1087 "gitg-avatar-cache.c"
		goto _state_1;
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		case 2:
#line 1091 "gitg-avatar-cache.c"
		goto _state_2;
		default:
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_assert_not_reached ();
#line 1096 "gitg-avatar-cache.c"
	}
	_state_0:
	{
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp1_ = NULL;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp1_ = _data_->stream;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp2_ = NULL;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp2__length1 = 0;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp2_ = _data_->buffer;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp2__length1 = _data_->buffer_length1;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp3_ = NULL;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp3_ = _data_->cancellable;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_state_ = 1;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_input_stream_read_async (_data_->_tmp1_, _data_->_tmp2_, (gsize) _data_->_tmp2__length1, G_PRIORITY_LOW, _data_->_tmp3_, gitg_avatar_cache_read_avatar_ready, _data_);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 1122 "gitg-avatar-cache.c"
		_state_1:
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp4_ = 0L;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp4_ = g_input_stream_read_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp0_ = _data_->_tmp4_;
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1132 "gitg-avatar-cache.c"
			goto __catch3_g_error;
		}
#line 99 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->n = _data_->_tmp0_;
#line 1137 "gitg-avatar-cache.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_clear_error (&_data_->_inner_error_);
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_inner_error_ = NULL;
#line 101 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->result = NULL;
#line 101 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (_data_->_state_ == 0) {
#line 101 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1152 "gitg-avatar-cache.c"
		} else {
#line 101 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1156 "gitg-avatar-cache.c"
		}
#line 101 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_object_unref (_data_->_async_result);
#line 101 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 1162 "gitg-avatar-cache.c"
	}
	__finally3:
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.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 97 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_clear_error (&_data_->_inner_error_);
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 1173 "gitg-avatar-cache.c"
	}
#line 103 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp5_ = 0L;
#line 103 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_data_->_tmp5_ = _data_->n;
#line 103 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_tmp5_ != ((gssize) 0)) {
#line 1181 "gitg-avatar-cache.c"
		{
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp6_ = NULL;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp6_ = _data_->loader;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp7_ = NULL;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp7__length1 = 0;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp7_ = _data_->buffer;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp7__length1 = _data_->buffer_length1;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp8_ = 0L;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp8_ = _data_->n;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			gdk_pixbuf_loader_write (_data_->_tmp6_, _data_->_tmp7_ + 0, (gsize) (((gint) _data_->_tmp8_) - 0), &_data_->_inner_error_);
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1203 "gitg-avatar-cache.c"
				goto __catch4_g_error;
			}
		}
		goto __finally4;
		__catch4_g_error:
		{
#line 105 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_clear_error (&_data_->_inner_error_);
#line 105 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_inner_error_ = NULL;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->result = NULL;
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			if (_data_->_state_ == 0) {
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1220 "gitg-avatar-cache.c"
			} else {
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1224 "gitg-avatar-cache.c"
			}
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_object_unref (_data_->_async_result);
#line 109 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			return FALSE;
#line 1230 "gitg-avatar-cache.c"
		}
		__finally4:
#line 105 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 105 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.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 105 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_clear_error (&_data_->_inner_error_);
#line 105 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			return FALSE;
#line 1241 "gitg-avatar-cache.c"
		}
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp9_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp9_ = _data_->id;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp10_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp10_ = _data_->stream;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp11_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp11__length1 = 0;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp11_ = _data_->buffer;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp11__length1 = _data_->buffer_length1;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp12_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp12_ = _data_->loader;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp13_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp13_ = _data_->cancellable;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_state_ = 2;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		gitg_avatar_cache_read_avatar (_data_->self, _data_->_tmp9_, _data_->_tmp10_, _data_->_tmp11_, _data_->_tmp11__length1, _data_->_tmp12_, _data_->_tmp13_, gitg_avatar_cache_read_avatar_ready, _data_);
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 1273 "gitg-avatar-cache.c"
		_state_2:
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp14_ = NULL;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp14_ = gitg_avatar_cache_read_avatar_finish (_data_->self, _data_->_res_);
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->result = _data_->_tmp14_;
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (_data_->_state_ == 0) {
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1285 "gitg-avatar-cache.c"
		} else {
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1289 "gitg-avatar-cache.c"
		}
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_object_unref (_data_->_async_result);
#line 111 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 1295 "gitg-avatar-cache.c"
	} else {
		{
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp15_ = NULL;
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_tmp15_ = _data_->loader;
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			gdk_pixbuf_loader_close (_data_->_tmp15_, &_data_->_inner_error_);
#line 118 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1306 "gitg-avatar-cache.c"
				goto __catch5_g_error;
			}
		}
		goto __finally5;
		__catch5_g_error:
		{
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_clear_error (&_data_->_inner_error_);
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->_inner_error_ = NULL;
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			_data_->result = NULL;
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			if (_data_->_state_ == 0) {
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1323 "gitg-avatar-cache.c"
			} else {
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1327 "gitg-avatar-cache.c"
			}
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_object_unref (_data_->_async_result);
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			return FALSE;
#line 1333 "gitg-avatar-cache.c"
		}
		__finally5:
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.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 116 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_clear_error (&_data_->_inner_error_);
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			return FALSE;
#line 1344 "gitg-avatar-cache.c"
		}
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp16_ = NULL;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp16_ = _data_->loader;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp17_ = NULL;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp17_ = gdk_pixbuf_loader_get_pixbuf (_data_->_tmp16_);
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp18_ = NULL;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->_tmp18_ = _g_object_ref0 (_data_->_tmp17_);
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		_data_->result = _data_->_tmp18_;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		if (_data_->_state_ == 0) {
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1364 "gitg-avatar-cache.c"
		} else {
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1368 "gitg-avatar-cache.c"
		}
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_object_unref (_data_->_async_result);
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		return FALSE;
#line 1374 "gitg-avatar-cache.c"
	}
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	if (_data_->_state_ == 0) {
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1380 "gitg-avatar-cache.c"
	} else {
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1384 "gitg-avatar-cache.c"
	}
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_object_unref (_data_->_async_result);
#line 89 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return FALSE;
#line 1390 "gitg-avatar-cache.c"
}


static GObject * gitg_avatar_cache_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GitgAvatarCache * self;
	GeeHashMap* _tmp0_ = NULL;
#line 25 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	parent_class = G_OBJECT_CLASS (gitg_avatar_cache_parent_class);
#line 25 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 25 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_AVATAR_CACHE, GitgAvatarCache);
#line 27 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, gdk_pixbuf_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 27 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (self->priv->d_cache);
#line 27 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	self->priv->d_cache = _tmp0_;
#line 25 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	return obj;
#line 1413 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_class_init (GitgAvatarCacheClass * klass) {
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	gitg_avatar_cache_parent_class = g_type_class_peek_parent (klass);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	g_type_class_add_private (klass, sizeof (GitgAvatarCachePrivate));
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	G_OBJECT_CLASS (klass)->constructor = gitg_avatar_cache_constructor;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_avatar_cache_finalize;
#line 1426 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_instance_init (GitgAvatarCache * self) {
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	self->priv = GITG_AVATAR_CACHE_GET_PRIVATE (self);
#line 1433 "gitg-avatar-cache.c"
}


static void gitg_avatar_cache_finalize (GObject * obj) {
	GitgAvatarCache * self;
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_AVATAR_CACHE, GitgAvatarCache);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	_g_object_unref0 (self->priv->d_cache);
#line 20 "/home/jesse/dev/gitg/libgitg/gitg-avatar-cache.vala"
	G_OBJECT_CLASS (gitg_avatar_cache_parent_class)->finalize (obj);
#line 1445 "gitg-avatar-cache.c"
}


GType gitg_avatar_cache_get_type (void) {
	static volatile gsize gitg_avatar_cache_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_avatar_cache_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgAvatarCacheClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_avatar_cache_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgAvatarCache), 0, (GInstanceInitFunc) gitg_avatar_cache_instance_init, NULL };
		GType gitg_avatar_cache_type_id;
		gitg_avatar_cache_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgAvatarCache", &g_define_type_info, 0);
		g_once_init_leave (&gitg_avatar_cache_type_id__volatile, gitg_avatar_cache_type_id);
	}
	return gitg_avatar_cache_type_id__volatile;
}



