/* gitg-remote-manager.c generated by valac 0.27.1.26-9b1a5-dirty, the Vala compiler
 * generated from gitg-remote-manager.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2012 - 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 "libgitg-ext/libgitg-ext.h"
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include "libgitg/libgitg.h"
#include <gtk/gtk.h>
#include <libgit2-glib/ggit.h>
#include <stdio.h>


#define GITG_TYPE_REMOTE_MANAGER (gitg_remote_manager_get_type ())
#define GITG_REMOTE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REMOTE_MANAGER, GitgRemoteManager))
#define GITG_REMOTE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REMOTE_MANAGER, GitgRemoteManagerClass))
#define GITG_IS_REMOTE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REMOTE_MANAGER))
#define GITG_IS_REMOTE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REMOTE_MANAGER))
#define GITG_REMOTE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REMOTE_MANAGER, GitgRemoteManagerClass))

typedef struct _GitgRemoteManager GitgRemoteManager;
typedef struct _GitgRemoteManagerClass GitgRemoteManagerClass;
typedef struct _GitgRemoteManagerPrivate GitgRemoteManagerPrivate;

#define GITG_REMOTE_MANAGER_TYPE_INSTEAD_OF (gitg_remote_manager_instead_of_get_type ())
typedef struct _GitgRemoteManagerInsteadOf GitgRemoteManagerInsteadOf;

#define GITG_TYPE_WINDOW (gitg_window_get_type ())
#define GITG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_WINDOW, GitgWindow))
#define GITG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_WINDOW, GitgWindowClass))
#define GITG_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_WINDOW))
#define GITG_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_WINDOW))
#define GITG_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_WINDOW, GitgWindowClass))

typedef struct _GitgWindow GitgWindow;
typedef struct _GitgWindowClass GitgWindowClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define GITG_REMOTE_MANAGER_TYPE_CALLBACKS (gitg_remote_manager_callbacks_get_type ())
#define GITG_REMOTE_MANAGER_CALLBACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_REMOTE_MANAGER_TYPE_CALLBACKS, GitgRemoteManagerCallbacks))
#define GITG_REMOTE_MANAGER_CALLBACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_REMOTE_MANAGER_TYPE_CALLBACKS, GitgRemoteManagerCallbacksClass))
#define GITG_REMOTE_MANAGER_IS_CALLBACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_REMOTE_MANAGER_TYPE_CALLBACKS))
#define GITG_REMOTE_MANAGER_IS_CALLBACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_REMOTE_MANAGER_TYPE_CALLBACKS))
#define GITG_REMOTE_MANAGER_CALLBACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_REMOTE_MANAGER_TYPE_CALLBACKS, GitgRemoteManagerCallbacksClass))

typedef struct _GitgRemoteManagerCallbacks GitgRemoteManagerCallbacks;
typedef struct _GitgRemoteManagerCallbacksClass GitgRemoteManagerCallbacksClass;
typedef struct _GitgRemoteManagerCallbacksPrivate GitgRemoteManagerCallbacksPrivate;
#define _gitg_credentials_manager_unref0(var) ((var == NULL) ? NULL : (var = (gitg_credentials_manager_unref (var), NULL)))

struct _GitgRemoteManager {
	GObject parent_instance;
	GitgRemoteManagerPrivate * priv;
};

struct _GitgRemoteManagerClass {
	GObjectClass parent_class;
};

struct _GitgRemoteManagerInsteadOf {
	gchar* prefix;
	gchar* replacement;
};

struct _GitgRemoteManagerPrivate {
	GeeHashMap* d_remotes;
	GitgRemoteManagerInsteadOf* d_insteadof;
	gint d_insteadof_length1;
	gint _d_insteadof_size_;
	GitgWindow* d_window;
};

struct _GitgRemoteManagerCallbacks {
	GgitRemoteCallbacks parent_instance;
	GitgRemoteManagerCallbacksPrivate * priv;
};

struct _GitgRemoteManagerCallbacksClass {
	GgitRemoteCallbacksClass parent_class;
};

struct _GitgRemoteManagerCallbacksPrivate {
	GitgCredentialsManager* d_credentials;
};


static gpointer gitg_remote_manager_parent_class = NULL;
static gpointer gitg_remote_manager_callbacks_parent_class = NULL;
static GitgExtRemoteLookupIface* gitg_remote_manager_gitg_ext_remote_lookup_parent_iface = NULL;

GType gitg_remote_manager_get_type (void) G_GNUC_CONST;
static GType gitg_remote_manager_instead_of_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GitgRemoteManagerInsteadOf* gitg_remote_manager_instead_of_dup (const GitgRemoteManagerInsteadOf* self);
static void gitg_remote_manager_instead_of_free (GitgRemoteManagerInsteadOf* self);
static void gitg_remote_manager_instead_of_copy (const GitgRemoteManagerInsteadOf* self, GitgRemoteManagerInsteadOf* dest);
static void gitg_remote_manager_instead_of_destroy (GitgRemoteManagerInsteadOf* self);
GType gitg_window_get_type (void) G_GNUC_CONST;
#define GITG_REMOTE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_REMOTE_MANAGER, GitgRemoteManagerPrivate))
enum  {
	GITG_REMOTE_MANAGER_DUMMY_PROPERTY
};
static void _vala_GitgRemoteManagerInsteadOf_array_free (GitgRemoteManagerInsteadOf* array, gint array_length);
GitgRemoteManager* gitg_remote_manager_new (GitgWindow* window);
GitgRemoteManager* gitg_remote_manager_construct (GType object_type, GitgWindow* window);
static void gitg_remote_manager_extract_insteadof (GitgRemoteManager* self);
static gint ___lambda71_ (GitgRemoteManager* self, GMatchInfo* info, const gchar* value);
static void _vala_array_add10 (GitgRemoteManagerInsteadOf** array, int* length, int* size, const GitgRemoteManagerInsteadOf* value);
static gint ____lambda71__ggit_config_match_callback (GMatchInfo* match_info, const gchar* value, gpointer self);
static GitgRemote* gitg_remote_manager_real_lookup (GitgExtRemoteLookup* base, const gchar* name);
static GitgRemoteManagerCallbacks* gitg_remote_manager_callbacks_new (GitgRemote* remote, GtkWindow* window);
static GitgRemoteManagerCallbacks* gitg_remote_manager_callbacks_construct (GType object_type, GitgRemote* remote, GtkWindow* window);
static GType gitg_remote_manager_callbacks_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define GITG_REMOTE_MANAGER_CALLBACKS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_REMOTE_MANAGER_TYPE_CALLBACKS, GitgRemoteManagerCallbacksPrivate))
enum  {
	GITG_REMOTE_MANAGER_CALLBACKS_DUMMY_PROPERTY
};
static GgitCred* gitg_remote_manager_callbacks_real_credentials (GgitRemoteCallbacks* base, const gchar* url, const gchar* username, GgitCredtype allowed_types, GError** error);
static void gitg_remote_manager_callbacks_finalize (GObject* obj);
static void gitg_remote_manager_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);
static gint _vala_array_length (gpointer array);


static void _vala_GitgRemoteManagerInsteadOf_array_free (GitgRemoteManagerInsteadOf* array, gint array_length) {
#line 49 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (array != NULL) {
#line 153 "gitg-remote-manager.c"
		int i;
#line 49 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 49 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
			gitg_remote_manager_instead_of_destroy (&array[i]);
#line 159 "gitg-remote-manager.c"
		}
	}
#line 49 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_free (array);
#line 164 "gitg-remote-manager.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 54 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return self ? g_object_ref (self) : NULL;
#line 171 "gitg-remote-manager.c"
}


GitgRemoteManager* gitg_remote_manager_construct (GType object_type, GitgWindow* window) {
	GitgRemoteManager * self = NULL;
	GitgWindow* _tmp0_ = NULL;
	GitgWindow* _tmp1_ = NULL;
	GeeHashMap* _tmp2_ = NULL;
#line 52 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (window != NULL, NULL);
#line 52 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self = (GitgRemoteManager*) g_object_new (object_type, NULL);
#line 54 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = window;
#line 54 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 54 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (self->priv->d_window);
#line 54 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_window = _tmp1_;
#line 55 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GITG_TYPE_REMOTE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 55 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (self->priv->d_remotes);
#line 55 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_remotes = _tmp2_;
#line 57 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gitg_remote_manager_extract_insteadof (self);
#line 52 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return self;
#line 202 "gitg-remote-manager.c"
}


GitgRemoteManager* gitg_remote_manager_new (GitgWindow* window) {
#line 52 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return gitg_remote_manager_construct (GITG_TYPE_REMOTE_MANAGER, window);
#line 209 "gitg-remote-manager.c"
}


static void _vala_array_add10 (GitgRemoteManagerInsteadOf** array, int* length, int* size, const GitgRemoteManagerInsteadOf* value) {
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if ((*length) == (*size)) {
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		*array = g_renew (GitgRemoteManagerInsteadOf, *array, *size);
#line 220 "gitg-remote-manager.c"
	}
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	(*array)[(*length)++] = *value;
#line 224 "gitg-remote-manager.c"
}


static gint ___lambda71_ (GitgRemoteManager* self, GMatchInfo* info, const gchar* value) {
	gint result = 0;
	GitgRemoteManagerInsteadOf* _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GMatchInfo* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GitgRemoteManagerInsteadOf _tmp5_ = {0};
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (info != NULL, 0);
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (value != NULL, 0);
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = self->priv->d_insteadof;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0__length1 = self->priv->d_insteadof_length1;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = value;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp3_ = info;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp4_ = g_match_info_fetch (_tmp3_, 1);
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	memset (&_tmp5_, 0, sizeof (GitgRemoteManagerInsteadOf));
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 (_tmp5_.prefix);
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp5_.prefix = _tmp2_;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 (_tmp5_.replacement);
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp5_.replacement = _tmp4_;
#line 92 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_vala_array_add10 (&self->priv->d_insteadof, &self->priv->d_insteadof_length1, &self->priv->_d_insteadof_size_, &_tmp5_);
#line 97 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	result = 0;
#line 97 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return result;
#line 269 "gitg-remote-manager.c"
}


static gint ____lambda71__ggit_config_match_callback (GMatchInfo* match_info, const gchar* value, gpointer self) {
	gint result;
	result = ___lambda71_ ((GitgRemoteManager*) self, match_info, value);
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return result;
#line 278 "gitg-remote-manager.c"
}


static void gitg_remote_manager_extract_insteadof (GitgRemoteManager* self) {
	GitgRemoteManagerInsteadOf* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	GitgWindow* _tmp2_ = NULL;
	GitgRepository* _tmp3_ = NULL;
	GitgRepository* _tmp4_ = NULL;
	GitgRepository* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	GgitConfig* config = NULL;
	GRegex* r = NULL;
	GError * _inner_error_ = NULL;
#line 60 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_if_fail (self != NULL);
#line 62 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = g_new0 (GitgRemoteManagerInsteadOf, 10);
#line 62 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_insteadof = (_vala_GitgRemoteManagerInsteadOf_array_free (self->priv->d_insteadof, self->priv->d_insteadof_length1), NULL);
#line 62 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_insteadof = _tmp0_;
#line 62 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_insteadof_length1 = 10;
#line 62 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->_d_insteadof_size_ = self->priv->d_insteadof_length1;
#line 63 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_insteadof_length1 = 0;
#line 63 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = self->priv->d_insteadof_length1;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = self->priv->d_window;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp3_ = gitg_ext_application_get_repository ((GitgExtApplication*) _tmp2_);
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp4_ = _tmp3_;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp5_ = _tmp4_;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp6_ = _tmp5_ == NULL;
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (_tmp5_);
#line 65 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (_tmp6_) {
#line 67 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return;
#line 325 "gitg-remote-manager.c"
	}
	{
		GgitConfig* _tmp7_ = NULL;
		GitgWindow* _tmp8_ = NULL;
		GitgRepository* _tmp9_ = NULL;
		GitgRepository* _tmp10_ = NULL;
		GitgRepository* _tmp11_ = NULL;
		GgitConfig* _tmp12_ = NULL;
		GgitConfig* _tmp13_ = NULL;
		GgitConfig* _tmp14_ = NULL;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp8_ = self->priv->d_window;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp9_ = gitg_ext_application_get_repository ((GitgExtApplication*) _tmp8_);
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp10_ = _tmp9_;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp11_ = _tmp10_;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp12_ = ggit_repository_get_config ((GgitRepository*) _tmp11_, &_inner_error_);
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp13_ = _tmp12_;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (_tmp11_);
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp7_ = _tmp13_;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 354 "gitg-remote-manager.c"
			goto __catch55_g_error;
		}
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp14_ = _tmp7_;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp7_ = NULL;
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (config);
#line 74 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		config = _tmp14_;
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (_tmp7_);
#line 367 "gitg-remote-manager.c"
	}
	goto __finally55;
	__catch55_g_error:
	{
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_inner_error_ = NULL;
#line 75 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (config);
#line 75 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return;
#line 380 "gitg-remote-manager.c"
	}
	__finally55:
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (config);
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 72 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return;
#line 393 "gitg-remote-manager.c"
	}
	{
		GRegex* _tmp15_ = NULL;
		GRegex* _tmp16_ = NULL;
		GRegex* _tmp17_ = NULL;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp16_ = g_regex_new ("url\\.(.*)\\.insteadof", 0, 0, &_inner_error_);
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp15_ = _tmp16_;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 405 "gitg-remote-manager.c"
			goto __catch56_g_error;
		}
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp17_ = _tmp15_;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp15_ = NULL;
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_regex_unref0 (r);
#line 81 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		r = _tmp17_;
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_regex_unref0 (_tmp15_);
#line 418 "gitg-remote-manager.c"
	}
	goto __finally56;
	__catch56_g_error:
	{
		GError* e = NULL;
		FILE* _tmp18_ = NULL;
		GError* _tmp19_ = NULL;
		const gchar* _tmp20_ = NULL;
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		e = _inner_error_;
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_inner_error_ = NULL;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp18_ = stderr;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp19_ = e;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp20_ = _tmp19_->message;
#line 85 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		fprintf (_tmp18_, "Failed to compile regex: %s\n", _tmp20_);
#line 86 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_error_free0 (e);
#line 86 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_regex_unref0 (r);
#line 86 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (config);
#line 86 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return;
#line 447 "gitg-remote-manager.c"
	}
	__finally56:
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_regex_unref0 (r);
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (config);
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 79 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return;
#line 462 "gitg-remote-manager.c"
	}
	{
		GgitConfig* _tmp21_ = NULL;
		GRegex* _tmp22_ = NULL;
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp21_ = config;
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp22_ = r;
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		ggit_config_match_foreach (_tmp21_, _tmp22_, ____lambda71__ggit_config_match_callback, self, &_inner_error_);
#line 91 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 475 "gitg-remote-manager.c"
			goto __catch57_g_error;
		}
	}
	goto __finally57;
	__catch57_g_error:
	{
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_inner_error_ = NULL;
#line 486 "gitg-remote-manager.c"
	}
	__finally57:
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_regex_unref0 (r);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (config);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 89 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return;
#line 501 "gitg-remote-manager.c"
	}
#line 60 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_regex_unref0 (r);
#line 60 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (config);
#line 507 "gitg-remote-manager.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1197 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1197 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1197 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1197 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1198 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1198 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 530 "gitg-remote-manager.c"
		glong _tmp4_ = 0L;
#line 1199 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1199 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1199 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		return result;
#line 538 "gitg-remote-manager.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1201 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1201 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1201 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1201 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		return result;
#line 550 "gitg-remote-manager.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
#line 1208 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1210 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1210 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 574 "gitg-remote-manager.c"
		glong _tmp2_ = 0L;
#line 1210 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1210 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 580 "gitg-remote-manager.c"
	} else {
#line 1210 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 584 "gitg-remote-manager.c"
	}
#line 1210 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 588 "gitg-remote-manager.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1212 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1212 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1212 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1212 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 600 "gitg-remote-manager.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1214 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1214 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1214 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 610 "gitg-remote-manager.c"
	}
#line 1217 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1217 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 616 "gitg-remote-manager.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1218 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1218 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1218 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1219 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1219 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 630 "gitg-remote-manager.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1221 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1221 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1221 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 640 "gitg-remote-manager.c"
	}
#line 1223 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1223 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 646 "gitg-remote-manager.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1224 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1224 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1224 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 655 "gitg-remote-manager.c"
	}
#line 1226 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1226 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1226 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1226 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1227 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1227 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1227 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1227 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1227 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	return result;
#line 675 "gitg-remote-manager.c"
}


static GitgRemote* gitg_remote_manager_real_lookup (GitgExtRemoteLookup* base, const gchar* name) {
	GitgRemoteManager * self;
	GitgRemote* result = NULL;
	GitgWindow* _tmp0_ = NULL;
	GitgRepository* _tmp1_ = NULL;
	GitgRepository* _tmp2_ = NULL;
	GitgRepository* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	GeeHashMap* _tmp5_ = NULL;
	GeeHashMap* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gboolean _tmp9_ = FALSE;
	GitgRemote* remote = NULL;
	gchar* url = NULL;
	GitgRemote* _tmp23_ = NULL;
	const gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	GitgRemoteManagerInsteadOf* _tmp26_ = NULL;
	gint _tmp26__length1 = 0;
	GitgRemote* _tmp78_ = NULL;
	GitgRemote* _tmp79_ = NULL;
	GitgWindow* _tmp80_ = NULL;
	GitgRemoteManagerCallbacks* _tmp81_ = NULL;
	GitgRemoteManagerCallbacks* _tmp82_ = NULL;
	GeeHashMap* _tmp83_ = NULL;
	const gchar* _tmp84_ = NULL;
	GitgRemote* _tmp85_ = NULL;
	GError * _inner_error_ = NULL;
#line 102 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self = (GitgRemoteManager*) base;
#line 102 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = self->priv->d_window;
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = gitg_ext_application_get_repository ((GitgExtApplication*) _tmp0_);
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = _tmp1_;
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp3_ = _tmp2_;
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp4_ = _tmp3_ == NULL;
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (_tmp3_);
#line 104 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (_tmp4_) {
#line 106 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		result = NULL;
#line 106 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return result;
#line 729 "gitg-remote-manager.c"
	}
#line 109 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp5_ = self->priv->d_remotes;
#line 109 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (_tmp5_ == NULL) {
#line 735 "gitg-remote-manager.c"
		GeeHashMap* _tmp6_ = NULL;
#line 111 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp6_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GITG_TYPE_REMOTE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 111 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (self->priv->d_remotes);
#line 111 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		self->priv->d_remotes = _tmp6_;
#line 743 "gitg-remote-manager.c"
	}
#line 114 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp7_ = self->priv->d_remotes;
#line 114 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp8_ = name;
#line 114 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp9_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp7_, _tmp8_);
#line 114 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (_tmp9_) {
#line 753 "gitg-remote-manager.c"
		GeeHashMap* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		gpointer _tmp12_ = NULL;
#line 116 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp10_ = self->priv->d_remotes;
#line 116 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp11_ = name;
#line 116 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp10_, _tmp11_);
#line 116 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		result = (GitgRemote*) _tmp12_;
#line 116 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return result;
#line 767 "gitg-remote-manager.c"
	}
	{
		GgitRemote* _tmp13_ = NULL;
		GitgWindow* _tmp14_ = NULL;
		GitgRepository* _tmp15_ = NULL;
		GitgRepository* _tmp16_ = NULL;
		GitgRepository* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
		GgitRemote* _tmp19_ = NULL;
		GgitRemote* _tmp20_ = NULL;
		GgitRemote* _tmp21_ = NULL;
		GitgRemote* _tmp22_ = NULL;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp14_ = self->priv->d_window;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp15_ = gitg_ext_application_get_repository ((GitgExtApplication*) _tmp14_);
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp16_ = _tmp15_;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp17_ = _tmp16_;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp18_ = name;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp19_ = ggit_repository_lookup_remote ((GgitRepository*) _tmp17_, _tmp18_, &_inner_error_);
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp20_ = _tmp19_;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (_tmp17_);
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp13_ = _tmp20_;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 800 "gitg-remote-manager.c"
			goto __catch58_g_error;
		}
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp21_ = _tmp13_;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp13_ = NULL;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_tmp22_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, GITG_TYPE_REMOTE) ? ((GitgRemote*) _tmp21_) : NULL;
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		if (_tmp22_ == NULL) {
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
			_g_object_unref0 (_tmp21_);
#line 813 "gitg-remote-manager.c"
		}
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (remote);
#line 123 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		remote = _tmp22_;
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (_tmp13_);
#line 821 "gitg-remote-manager.c"
	}
	goto __finally58;
	__catch58_g_error:
	{
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_inner_error_ = NULL;
#line 124 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		result = NULL;
#line 124 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (remote);
#line 124 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return result;
#line 836 "gitg-remote-manager.c"
	}
	__finally58:
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		_g_object_unref0 (remote);
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_clear_error (&_inner_error_);
#line 121 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return NULL;
#line 849 "gitg-remote-manager.c"
	}
#line 126 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp23_ = remote;
#line 126 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp24_ = ggit_remote_get_url ((GgitRemote*) _tmp23_);
#line 126 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp25_ = g_strdup (_tmp24_);
#line 126 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	url = _tmp25_;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp26_ = self->priv->d_insteadof;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp26__length1 = self->priv->d_insteadof_length1;
#line 863 "gitg-remote-manager.c"
	{
		GitgRemoteManagerInsteadOf* io_collection = NULL;
		gint io_collection_length1 = 0;
		gint _io_collection_size_ = 0;
		gint io_it = 0;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		io_collection = _tmp26_;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		io_collection_length1 = _tmp26__length1;
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		for (io_it = 0; io_it < _tmp26__length1; io_it = io_it + 1) {
#line 875 "gitg-remote-manager.c"
			GitgRemoteManagerInsteadOf _tmp27_ = {0};
			GitgRemoteManagerInsteadOf io = {0};
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
			gitg_remote_manager_instead_of_copy (&io_collection[io_it], &_tmp27_);
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
			io = _tmp27_;
#line 882 "gitg-remote-manager.c"
			{
				const gchar* _tmp28_ = NULL;
				GitgRemoteManagerInsteadOf _tmp29_ = {0};
				const gchar* _tmp30_ = NULL;
				gboolean _tmp31_ = FALSE;
#line 130 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
				_tmp28_ = url;
#line 130 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
				_tmp29_ = io;
#line 130 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
				_tmp30_ = _tmp29_.prefix;
#line 130 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
				_tmp31_ = g_str_has_prefix (_tmp28_, _tmp30_);
#line 130 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
				if (_tmp31_) {
#line 898 "gitg-remote-manager.c"
					GitgRemoteManagerInsteadOf _tmp32_ = {0};
					const gchar* _tmp33_ = NULL;
					const gchar* _tmp34_ = NULL;
					GitgRemoteManagerInsteadOf _tmp35_ = {0};
					const gchar* _tmp36_ = NULL;
					gint _tmp37_ = 0;
					gint _tmp38_ = 0;
					gchar* _tmp39_ = NULL;
					gchar* _tmp40_ = NULL;
					gchar* _tmp41_ = NULL;
					gchar** fetch_specs = NULL;
					gint fetch_specs_length1 = 0;
					gint _fetch_specs_size_ = 0;
					gchar** push_specs = NULL;
					gint push_specs_length1 = 0;
					gint _push_specs_size_ = 0;
					gchar* defspec = NULL;
					const gchar* _tmp52_ = NULL;
					gchar* _tmp53_ = NULL;
					gchar* _tmp54_ = NULL;
					gchar* _tmp55_ = NULL;
					gchar* _tmp56_ = NULL;
					GitgRemote* tmp = NULL;
					GitgRemote* _tmp71_ = NULL;
					GitgRemote* _tmp76_ = NULL;
					GitgRemote* _tmp77_ = NULL;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp32_ = io;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp33_ = _tmp32_.replacement;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp34_ = url;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp35_ = io;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp36_ = _tmp35_.prefix;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp37_ = strlen (_tmp36_);
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp38_ = _tmp37_;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp39_ = string_substring (_tmp34_, (glong) _tmp38_, (glong) (-1));
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp40_ = _tmp39_;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp41_ = g_strconcat (_tmp33_, _tmp40_, NULL);
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_g_free0 (url);
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					url = _tmp41_;
#line 132 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_g_free0 (_tmp40_);
#line 951 "gitg-remote-manager.c"
					{
						gchar** _tmp42_ = NULL;
						GitgRemote* _tmp43_ = NULL;
						gchar** _tmp44_ = NULL;
						gchar** _tmp45_ = NULL;
						gint _tmp42__length1 = 0;
						gint __tmp42__size_ = 0;
						gchar** _tmp46_ = NULL;
						gint _tmp46__length1 = 0;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp43_ = remote;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp45_ = _tmp44_ = ggit_remote_get_fetch_specs ((GgitRemote*) _tmp43_, &_inner_error_);
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp42_ = _tmp45_;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp42__length1 = _vala_array_length (_tmp44_);
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						__tmp42__size_ = _tmp42__length1;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 973 "gitg-remote-manager.c"
							goto __catch59_g_error;
						}
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp46_ = _tmp42_;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp46__length1 = _tmp42__length1;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp42_ = NULL;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp42__length1 = 0;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = _tmp46_;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs_length1 = _tmp46__length1;
#line 139 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_fetch_specs_size_ = fetch_specs_length1;
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp42_ = (_vala_array_free (_tmp42_, _tmp42__length1, (GDestroyNotify) g_free), NULL);
#line 994 "gitg-remote-manager.c"
					}
					goto __finally59;
					__catch59_g_error:
					{
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_inner_error_ = NULL;
#line 140 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 140 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 140 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 140 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						break;
#line 1011 "gitg-remote-manager.c"
					}
					__finally59:
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (url);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (remote);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 137 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						return NULL;
#line 1032 "gitg-remote-manager.c"
					}
					{
						gchar** _tmp47_ = NULL;
						GitgRemote* _tmp48_ = NULL;
						gchar** _tmp49_ = NULL;
						gchar** _tmp50_ = NULL;
						gint _tmp47__length1 = 0;
						gint __tmp47__size_ = 0;
						gchar** _tmp51_ = NULL;
						gint _tmp51__length1 = 0;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp48_ = remote;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp50_ = _tmp49_ = ggit_remote_get_push_specs ((GgitRemote*) _tmp48_, &_inner_error_);
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp47_ = _tmp50_;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp47__length1 = _vala_array_length (_tmp49_);
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						__tmp47__size_ = _tmp47__length1;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1055 "gitg-remote-manager.c"
							goto __catch60_g_error;
						}
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp51_ = _tmp47_;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp51__length1 = _tmp47__length1;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp47_ = NULL;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp47__length1 = 0;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = _tmp51_;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs_length1 = _tmp51__length1;
#line 144 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_push_specs_size_ = push_specs_length1;
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp47_ = (_vala_array_free (_tmp47_, _tmp47__length1, (GDestroyNotify) g_free), NULL);
#line 1076 "gitg-remote-manager.c"
					}
					goto __finally60;
					__catch60_g_error:
					{
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_inner_error_ = NULL;
#line 145 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 145 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 145 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 145 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						break;
#line 1093 "gitg-remote-manager.c"
					}
					__finally60:
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (url);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (remote);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 142 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						return NULL;
#line 1114 "gitg-remote-manager.c"
					}
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp52_ = name;
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp53_ = g_strconcat ("+refs/heads/*:refs/remotes/", _tmp52_, NULL);
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp54_ = _tmp53_;
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp55_ = g_strconcat (_tmp54_, "/*", NULL);
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp56_ = _tmp55_;
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_g_free0 (_tmp54_);
#line 147 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					defspec = _tmp56_;
#line 148 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					tmp = NULL;
#line 1132 "gitg-remote-manager.c"
					{
						GgitRemote* _tmp57_ = NULL;
						GitgWindow* _tmp58_ = NULL;
						GitgRepository* _tmp59_ = NULL;
						GitgRepository* _tmp60_ = NULL;
						GitgRepository* _tmp61_ = NULL;
						const gchar* _tmp62_ = NULL;
						const gchar* _tmp63_ = NULL;
						GgitRemote* _tmp64_ = NULL;
						GgitRemote* _tmp65_ = NULL;
						GgitRemote* _tmp66_ = NULL;
						GitgRemote* _tmp67_ = NULL;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp58_ = self->priv->d_window;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp59_ = gitg_ext_application_get_repository ((GitgExtApplication*) _tmp58_);
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp60_ = _tmp59_;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp61_ = _tmp60_;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp62_ = url;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp63_ = defspec;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp64_ = ggit_remote_new_anonymous ((GgitRepository*) _tmp61_, _tmp62_, _tmp63_, &_inner_error_);
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp65_ = _tmp64_;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (_tmp61_);
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp57_ = _tmp65_;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1167 "gitg-remote-manager.c"
							goto __catch61_g_error;
						}
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp66_ = _tmp57_;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp57_ = NULL;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp67_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp66_, GITG_TYPE_REMOTE) ? ((GitgRemote*) _tmp66_) : NULL;
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						if (_tmp67_ == NULL) {
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
							_g_object_unref0 (_tmp66_);
#line 1180 "gitg-remote-manager.c"
						}
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 152 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						tmp = _tmp67_;
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (_tmp57_);
#line 1188 "gitg-remote-manager.c"
					}
					goto __finally61;
					__catch61_g_error:
					{
						GError* e = NULL;
						FILE* _tmp68_ = NULL;
						GError* _tmp69_ = NULL;
						const gchar* _tmp70_ = NULL;
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						e = _inner_error_;
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_inner_error_ = NULL;
#line 156 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp68_ = stderr;
#line 156 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp69_ = e;
#line 156 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp70_ = _tmp69_->message;
#line 156 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fprintf (_tmp68_, "Failed to create remote: %s\n", _tmp70_);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_error_free0 (e);
#line 1211 "gitg-remote-manager.c"
					}
					__finally61:
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (defspec);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (url);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (remote);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 150 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						return NULL;
#line 1236 "gitg-remote-manager.c"
					}
#line 159 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp71_ = tmp;
#line 159 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					if (_tmp71_ == NULL) {
#line 161 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 161 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (defspec);
#line 161 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 161 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 161 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 161 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						break;
#line 1254 "gitg-remote-manager.c"
					}
					{
						GitgRemote* _tmp72_ = NULL;
						gchar** _tmp73_ = NULL;
						gint _tmp73__length1 = 0;
#line 166 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp72_ = tmp;
#line 166 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp73_ = fetch_specs;
#line 166 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp73__length1 = fetch_specs_length1;
#line 166 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						ggit_remote_set_fetch_specs ((GgitRemote*) _tmp72_, _tmp73_, &_inner_error_);
#line 166 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1270 "gitg-remote-manager.c"
							goto __catch62_g_error;
						}
					}
					goto __finally62;
					__catch62_g_error:
					{
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_inner_error_ = NULL;
#line 167 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 167 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (defspec);
#line 167 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 167 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 167 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 167 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						break;
#line 1293 "gitg-remote-manager.c"
					}
					__finally62:
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (defspec);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (url);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (remote);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 164 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						return NULL;
#line 1318 "gitg-remote-manager.c"
					}
					{
						GitgRemote* _tmp74_ = NULL;
						gchar** _tmp75_ = NULL;
						gint _tmp75__length1 = 0;
#line 171 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp74_ = tmp;
#line 171 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp75_ = push_specs;
#line 171 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_tmp75__length1 = push_specs_length1;
#line 171 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						ggit_remote_set_push_specs ((GgitRemote*) _tmp74_, _tmp75_, &_inner_error_);
#line 171 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1334 "gitg-remote-manager.c"
							goto __catch63_g_error;
						}
					}
					goto __finally63;
					__catch63_g_error:
					{
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_inner_error_ = NULL;
#line 172 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 172 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (defspec);
#line 172 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 172 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 172 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 172 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						break;
#line 1357 "gitg-remote-manager.c"
					}
					__finally63:
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (tmp);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (defspec);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						gitg_remote_manager_instead_of_destroy (&io);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_free0 (url);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						_g_object_unref0 (remote);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.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 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						g_clear_error (&_inner_error_);
#line 169 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
						return NULL;
#line 1382 "gitg-remote-manager.c"
					}
#line 174 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp76_ = tmp;
#line 174 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_tmp77_ = _g_object_ref0 (_tmp76_);
#line 174 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_g_object_unref0 (remote);
#line 174 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					remote = _tmp77_;
#line 175 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_g_object_unref0 (tmp);
#line 175 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					_g_free0 (defspec);
#line 175 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					push_specs = (_vala_array_free (push_specs, push_specs_length1, (GDestroyNotify) g_free), NULL);
#line 175 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					fetch_specs = (_vala_array_free (fetch_specs, fetch_specs_length1, (GDestroyNotify) g_free), NULL);
#line 175 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					gitg_remote_manager_instead_of_destroy (&io);
#line 175 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
					break;
#line 1404 "gitg-remote-manager.c"
				}
#line 128 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
				gitg_remote_manager_instead_of_destroy (&io);
#line 1408 "gitg-remote-manager.c"
			}
		}
	}
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp78_ = remote;
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp79_ = remote;
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp80_ = self->priv->d_window;
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp81_ = gitg_remote_manager_callbacks_new (_tmp79_, (GtkWindow*) _tmp80_);
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp82_ = _tmp81_;
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	ggit_remote_set_callbacks ((GgitRemote*) _tmp78_, (GgitRemoteCallbacks*) _tmp82_);
#line 179 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (_tmp82_);
#line 181 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp83_ = self->priv->d_remotes;
#line 181 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp84_ = name;
#line 181 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp85_ = remote;
#line 181 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp83_, _tmp84_, _tmp85_);
#line 182 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	result = remote;
#line 182 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 (url);
#line 182 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return result;
#line 1440 "gitg-remote-manager.c"
}


static GitgRemoteManagerCallbacks* gitg_remote_manager_callbacks_construct (GType object_type, GitgRemote* remote, GtkWindow* window) {
	GitgRemoteManagerCallbacks * self = NULL;
	GitgRemote* _tmp0_ = NULL;
	GtkWindow* _tmp1_ = NULL;
	GitgCredentialsManager* _tmp2_ = NULL;
#line 29 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (remote != NULL, NULL);
#line 29 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (window != NULL, NULL);
#line 29 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self = (GitgRemoteManagerCallbacks*) g_object_new (object_type, NULL);
#line 31 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = remote;
#line 31 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = window;
#line 31 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = gitg_credentials_manager_new (_tmp0_, _tmp1_);
#line 31 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_gitg_credentials_manager_unref0 (self->priv->d_credentials);
#line 31 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_credentials = _tmp2_;
#line 29 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return self;
#line 1467 "gitg-remote-manager.c"
}


static GitgRemoteManagerCallbacks* gitg_remote_manager_callbacks_new (GitgRemote* remote, GtkWindow* window) {
#line 29 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return gitg_remote_manager_callbacks_construct (GITG_REMOTE_MANAGER_TYPE_CALLBACKS, remote, window);
#line 1474 "gitg-remote-manager.c"
}


static GgitCred* gitg_remote_manager_callbacks_real_credentials (GgitRemoteCallbacks* base, const gchar* url, const gchar* username, GgitCredtype allowed_types, GError** error) {
	GitgRemoteManagerCallbacks * self;
	GgitCred* result = NULL;
	GgitCred* _tmp0_ = NULL;
	GitgCredentialsManager* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GgitCredtype _tmp4_ = 0;
	GgitCred* _tmp5_ = NULL;
	GgitCred* _tmp6_ = NULL;
	GError * _inner_error_ = NULL;
#line 34 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self = (GitgRemoteManagerCallbacks*) base;
#line 34 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_return_val_if_fail (url != NULL, NULL);
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = self->priv->d_credentials;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = url;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp3_ = username;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp4_ = allowed_types;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp5_ = gitg_credentials_manager_credentials (_tmp1_, _tmp2_, _tmp3_, _tmp4_, &_inner_error_);
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = _tmp5_;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		g_propagate_error (error, _inner_error_);
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
		return NULL;
#line 1511 "gitg-remote-manager.c"
	}
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp6_ = _tmp0_;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = NULL;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	result = _tmp6_;
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (_tmp0_);
#line 38 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return result;
#line 1523 "gitg-remote-manager.c"
}


static void gitg_remote_manager_callbacks_class_init (GitgRemoteManagerCallbacksClass * klass) {
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gitg_remote_manager_callbacks_parent_class = g_type_class_peek_parent (klass);
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_type_class_add_private (klass, sizeof (GitgRemoteManagerCallbacksPrivate));
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	((GgitRemoteCallbacksClass *) klass)->credentials = gitg_remote_manager_callbacks_real_credentials;
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_remote_manager_callbacks_finalize;
#line 1536 "gitg-remote-manager.c"
}


static void gitg_remote_manager_callbacks_instance_init (GitgRemoteManagerCallbacks * self) {
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv = GITG_REMOTE_MANAGER_CALLBACKS_GET_PRIVATE (self);
#line 1543 "gitg-remote-manager.c"
}


static void gitg_remote_manager_callbacks_finalize (GObject* obj) {
	GitgRemoteManagerCallbacks * self;
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_REMOTE_MANAGER_TYPE_CALLBACKS, GitgRemoteManagerCallbacks);
#line 27 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_gitg_credentials_manager_unref0 (self->priv->d_credentials);
#line 25 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	G_OBJECT_CLASS (gitg_remote_manager_callbacks_parent_class)->finalize (obj);
#line 1555 "gitg-remote-manager.c"
}


static GType gitg_remote_manager_callbacks_get_type (void) {
	static volatile gsize gitg_remote_manager_callbacks_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_remote_manager_callbacks_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgRemoteManagerCallbacksClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_remote_manager_callbacks_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgRemoteManagerCallbacks), 0, (GInstanceInitFunc) gitg_remote_manager_callbacks_instance_init, NULL };
		GType gitg_remote_manager_callbacks_type_id;
		gitg_remote_manager_callbacks_type_id = g_type_register_static (ggit_remote_callbacks_get_type (), "GitgRemoteManagerCallbacks", &g_define_type_info, 0);
		g_once_init_leave (&gitg_remote_manager_callbacks_type_id__volatile, gitg_remote_manager_callbacks_type_id);
	}
	return gitg_remote_manager_callbacks_type_id__volatile;
}


static void gitg_remote_manager_instead_of_copy (const GitgRemoteManagerInsteadOf* self, GitgRemoteManagerInsteadOf* dest) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp0_ = (*self).prefix;
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 ((*dest).prefix);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	(*dest).prefix = _tmp1_;
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp2_ = (*self).replacement;
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 ((*dest).replacement);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	(*dest).replacement = _tmp3_;
#line 1592 "gitg-remote-manager.c"
}


static void gitg_remote_manager_instead_of_destroy (GitgRemoteManagerInsteadOf* self) {
#line 44 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 ((*self).prefix);
#line 45 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_free0 ((*self).replacement);
#line 1601 "gitg-remote-manager.c"
}


static GitgRemoteManagerInsteadOf* gitg_remote_manager_instead_of_dup (const GitgRemoteManagerInsteadOf* self) {
	GitgRemoteManagerInsteadOf* dup;
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	dup = g_new0 (GitgRemoteManagerInsteadOf, 1);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gitg_remote_manager_instead_of_copy (self, dup);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	return dup;
#line 1613 "gitg-remote-manager.c"
}


static void gitg_remote_manager_instead_of_free (GitgRemoteManagerInsteadOf* self) {
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gitg_remote_manager_instead_of_destroy (self);
#line 42 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_free (self);
#line 1622 "gitg-remote-manager.c"
}


static GType gitg_remote_manager_instead_of_get_type (void) {
	static volatile gsize gitg_remote_manager_instead_of_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_remote_manager_instead_of_type_id__volatile)) {
		GType gitg_remote_manager_instead_of_type_id;
		gitg_remote_manager_instead_of_type_id = g_boxed_type_register_static ("GitgRemoteManagerInsteadOf", (GBoxedCopyFunc) gitg_remote_manager_instead_of_dup, (GBoxedFreeFunc) gitg_remote_manager_instead_of_free);
		g_once_init_leave (&gitg_remote_manager_instead_of_type_id__volatile, gitg_remote_manager_instead_of_type_id);
	}
	return gitg_remote_manager_instead_of_type_id__volatile;
}


static void gitg_remote_manager_class_init (GitgRemoteManagerClass * klass) {
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gitg_remote_manager_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	g_type_class_add_private (klass, sizeof (GitgRemoteManagerPrivate));
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_remote_manager_finalize;
#line 1644 "gitg-remote-manager.c"
}


static void gitg_remote_manager_gitg_ext_remote_lookup_interface_init (GitgExtRemoteLookupIface * iface) {
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	gitg_remote_manager_gitg_ext_remote_lookup_parent_iface = g_type_interface_peek_parent (iface);
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	iface->lookup = (GitgRemote* (*)(GitgExtRemoteLookup*, const gchar*)) gitg_remote_manager_real_lookup;
#line 1653 "gitg-remote-manager.c"
}


static void gitg_remote_manager_instance_init (GitgRemoteManager * self) {
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv = GITG_REMOTE_MANAGER_GET_PRIVATE (self);
#line 1660 "gitg-remote-manager.c"
}


static void gitg_remote_manager_finalize (GObject* obj) {
	GitgRemoteManager * self;
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_REMOTE_MANAGER, GitgRemoteManager);
#line 48 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (self->priv->d_remotes);
#line 49 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	self->priv->d_insteadof = (_vala_GitgRemoteManagerInsteadOf_array_free (self->priv->d_insteadof, self->priv->d_insteadof_length1), NULL);
#line 50 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	_g_object_unref0 (self->priv->d_window);
#line 23 "/home/garrett/hacking/gnome/gitg/gitg/gitg-remote-manager.vala"
	G_OBJECT_CLASS (gitg_remote_manager_parent_class)->finalize (obj);
#line 1676 "gitg-remote-manager.c"
}


GType gitg_remote_manager_get_type (void) {
	static volatile gsize gitg_remote_manager_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_remote_manager_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgRemoteManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_remote_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgRemoteManager), 0, (GInstanceInitFunc) gitg_remote_manager_instance_init, NULL };
		static const GInterfaceInfo gitg_ext_remote_lookup_info = { (GInterfaceInitFunc) gitg_remote_manager_gitg_ext_remote_lookup_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gitg_remote_manager_type_id;
		gitg_remote_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgRemoteManager", &g_define_type_info, 0);
		g_type_add_interface_static (gitg_remote_manager_type_id, GITG_EXT_TYPE_REMOTE_LOOKUP, &gitg_ext_remote_lookup_info);
		g_once_init_leave (&gitg_remote_manager_type_id__volatile, gitg_remote_manager_type_id);
	}
	return gitg_remote_manager_type_id__volatile;
}


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


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


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



