/* DuplicityInstance.c generated by valac 0.30.2, the Vala compiler
 * generated from DuplicityInstance.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*- */
/*
    This file is part of Déjà Dup.
    For copyright information, see AUTHORS.

    Déjà Dup 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 3 of the License, or
    (at your option) any later version.

    Déjà Dup 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 Déjà Dup.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include "deja.h"
#include <glib/gstdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <gio/gunixinputstream.h>
#include <sys/wait.h>


#define TYPE_DUPLICITY_INSTANCE (duplicity_instance_get_type ())
#define DUPLICITY_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUPLICITY_INSTANCE, DuplicityInstance))
#define DUPLICITY_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUPLICITY_INSTANCE, DuplicityInstanceClass))
#define IS_DUPLICITY_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUPLICITY_INSTANCE))
#define IS_DUPLICITY_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUPLICITY_INSTANCE))
#define DUPLICITY_INSTANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUPLICITY_INSTANCE, DuplicityInstanceClass))

typedef struct _DuplicityInstance DuplicityInstance;
typedef struct _DuplicityInstanceClass DuplicityInstanceClass;
typedef struct _DuplicityInstancePrivate DuplicityInstancePrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __g_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (var), NULL)))
typedef struct _DuplicityInstanceStartData DuplicityInstanceStartData;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _DuplicityInstanceStartInternalData DuplicityInstanceStartInternalData;
typedef struct _DuplicityInstanceReadLogLinesData DuplicityInstanceReadLogLinesData;
typedef struct _DuplicityInstanceReadLogData DuplicityInstanceReadLogData;

struct _DuplicityInstance {
	GObject parent_instance;
	DuplicityInstancePrivate * priv;
};

struct _DuplicityInstanceClass {
	GObjectClass parent_class;
};

struct _DuplicityInstancePrivate {
	gboolean _verbose;
	gchar* _forced_cache_dir;
	guint watch_id;
	GPid child_pid;
	gint* pipes;
	gint pipes_length1;
	gint _pipes_size_;
	GDataInputStream* reader;
	GFile* logfile;
	GFile* scriptfile;
	gboolean process_done;
	gint status;
	gboolean processed_a_message;
};

struct _DuplicityInstanceStartData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DuplicityInstance* self;
	GList* argv_in;
	GList* envp_in;
	gboolean as_root;
	GList* argv;
	GList* _tmp0_;
	GList* arg_collection;
	GList* arg_it;
	gchar* _tmp1_;
	gchar* arg;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GList* envp;
	GList* _tmp4_;
	GList* env_collection;
	GList* env_it;
	gchar* _tmp5_;
	gchar* env;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gboolean _tmp8_;
	GList* _tmp9_;
	GList* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	GError* e;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	GError* _tmp17_;
	const gchar* _tmp18_;
	GError * _inner_error_;
};

struct _DuplicityInstanceStartInternalData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DuplicityInstance* self;
	GList* argv_in;
	GList* envp_in;
	gboolean as_root;
	gboolean result;
	gchar* verbose_str;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_;
	gboolean _tmp6_;
	DejaDupFilteredSettings* settings;
	DejaDupFilteredSettings* _tmp7_;
	DejaDupFilteredSettings* _tmp8_;
	gboolean _tmp9_;
	gchar** myenv;
	gchar** _tmp10_;
	gchar** _tmp11_;
	gint myenv_length1;
	gint _myenv_size_;
	gint myenv_len;
	gchar** _tmp12_;
	gint _tmp12__length1;
	gint _tmp13_;
	const gchar* _tmp14_;
	gint _tmp15_;
	guint env_len;
	gint _tmp16_;
	GList* _tmp17_;
	guint _tmp18_;
	gchar** real_envp;
	guint _tmp19_;
	gchar** _tmp20_;
	gint real_envp_length1;
	gint _real_envp_size_;
	gint i;
	gboolean _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	gchar** _tmp25_;
	gint _tmp25__length1;
	gint _tmp26_;
	gchar** _tmp27_;
	gint _tmp27__length1;
	gint _tmp28_;
	const gchar* _tmp29_;
	gchar** _tmp30_;
	gint _tmp30__length1;
	gint _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	GList* _tmp36_;
	GList* env_collection;
	GList* env_it;
	gchar* _tmp37_;
	gchar* env;
	gchar** _tmp38_;
	gint _tmp38__length1;
	gint _tmp39_;
	const gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar** _tmp43_;
	gint _tmp43__length1;
	gint _tmp44_;
	gchar* _tmp45_;
	GList* argv;
	GList* _tmp46_;
	GList* arg_collection;
	GList* arg_it;
	gchar* _tmp47_;
	gchar* arg;
	const gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* cache_dir;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	gboolean _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	gboolean _tmp60_;
	const gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* tempdir;
	gchar* _tmp63_;
	const gchar* _tmp64_;
	gboolean _tmp65_;
	const gchar* _tmp66_;
	gchar* _tmp67_;
	gboolean _tmp68_;
	gint logfd;
	gchar* logname;
	gint _tmp69_;
	gchar* _tmp70_;
	gint _tmp71_;
	const gchar* _tmp72_;
	GFile* _tmp73_;
	GFile* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	gint* _tmp78_;
	gint _tmp78__length1;
	gint _tmp79_;
	gint* _tmp80_;
	gint _tmp80__length1;
	gint _tmp81_;
	gchar* _tmp82_;
	gchar* _tmp83_;
	gchar* user_cmd;
	GList* _tmp84_;
	GList* a_collection;
	GList* a_it;
	gchar* _tmp85_;
	gchar* a;
	const gchar* _tmp86_;
	const gchar* _tmp87_;
	const gchar* _tmp88_;
	gchar* _tmp89_;
	const gchar* _tmp90_;
	const gchar* _tmp91_;
	gchar* _tmp92_;
	gchar* _tmp93_;
	gchar* _tmp94_;
	gboolean _tmp95_;
	gboolean _tmp96_;
	gboolean _tmp97_;
	gchar* _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* scriptname;
	gint scriptfd;
	gchar* _tmp102_;
	gint _tmp103_;
	const gchar* _tmp104_;
	GFile* _tmp105_;
	gint _tmp106_;
	GString* args;
	GString* _tmp107_;
	GList* _tmp108_;
	GList* _vala1_env_collection;
	GList* _vala1_env_it;
	gchar* _tmp109_;
	gchar* _vala1_env;
	GString* _tmp110_;
	const gchar* _tmp111_;
	gchar* _tmp112_;
	gchar* _tmp113_;
	GList* _tmp114_;
	GList* _vala1_a_collection;
	GList* _vala1_a_it;
	gchar* _tmp115_;
	gchar* _vala1_a;
	const gchar* _tmp116_;
	GString* _tmp117_;
	gssize _tmp118_;
	GString* _tmp119_;
	const gchar* _tmp120_;
	gchar* _tmp121_;
	gchar* _tmp122_;
	GString* _tmp123_;
	const gchar* _tmp124_;
	gchar* _tmp125_;
	gchar* _tmp126_;
	gchar* _tmp127_;
	gchar* _tmp128_;
	const gchar* _tmp129_;
	GString* _tmp130_;
	const gchar* _tmp131_;
	const gchar* _tmp132_;
	gchar* _tmp133_;
	gchar* _tmp134_;
	gchar* _tmp135_;
	gchar** real_argv;
	GList* _tmp136_;
	guint _tmp137_;
	gchar** _tmp138_;
	gint real_argv_length1;
	gint _real_argv_size_;
	GList* _tmp139_;
	GList* _vala2_a_collection;
	GList* _vala2_a_it;
	gchar* _tmp140_;
	gchar* _vala2_a;
	gchar** _tmp141_;
	gint _tmp141__length1;
	gint _tmp142_;
	const gchar* _tmp143_;
	gchar* _tmp144_;
	gchar* _tmp145_;
	const gchar* _tmp146_;
	gchar* _tmp147_;
	gchar* _tmp148_;
	gchar* _tmp149_;
	gchar* _tmp150_;
	gchar* _tmp151_;
	gchar* _tmp152_;
	gchar** _tmp153_;
	gint _tmp153__length1;
	gchar** _tmp154_;
	gint _tmp154__length1;
	GPid _tmp155_;
	GPid _tmp156_;
	const gchar* _tmp157_;
	GPid _tmp158_;
	guint _tmp159_;
	gint* _tmp160_;
	gint _tmp160__length1;
	gint _tmp161_;
	gint* _tmp162_;
	gint _tmp162__length1;
	gint _tmp163_;
	GError * _inner_error_;
};

struct _DuplicityInstanceReadLogLinesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DuplicityInstance* self;
	GList* stanza;
	GDataInputStream* _tmp0_;
	gchar* line;
	GDataInputStream* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	const gchar* _tmp5_;
	gboolean _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	GList* _tmp10_;
	gboolean _tmp11_;
	GList* _tmp12_;
	GError* err;
	GError* _tmp13_;
	const gchar* _tmp14_;
	GFile* _tmp15_;
	GFile* _tmp16_;
	GError* e2;
	GError* _tmp17_;
	const gchar* _tmp18_;
	GError * _inner_error_;
};

struct _DuplicityInstanceReadLogData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	DuplicityInstance* self;
	GInputStream* stream;
	GFile* _tmp0_;
	GFileInputStream* _tmp1_;
	GFile* _tmp2_;
	GFileInputStream* _tmp3_;
	GFileInputStream* _tmp4_;
	gint* _tmp5_;
	gint _tmp5__length1;
	gint _tmp6_;
	GUnixInputStream* _tmp7_;
	GInputStream* _tmp8_;
	GDataInputStream* _tmp9_;
	GError* e;
	GError* _tmp10_;
	const gchar* _tmp11_;
	GError * _inner_error_;
};


static gpointer duplicity_instance_parent_class = NULL;
static GType duplicity_instance_type_id = 0;

GType duplicity_instance_get_type (void) G_GNUC_CONST;
GType duplicity_instance_register_type (GTypeModule * module);
#define DUPLICITY_INSTANCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DUPLICITY_INSTANCE, DuplicityInstancePrivate))
enum  {
	DUPLICITY_INSTANCE_DUMMY_PROPERTY,
	DUPLICITY_INSTANCE_VERBOSE,
	DUPLICITY_INSTANCE_FORCED_CACHE_DIR
};
gboolean duplicity_instance_is_started (DuplicityInstance* self);
static void duplicity_instance_kill_child (DuplicityInstance* self);
static void duplicity_instance_start_data_free (gpointer _data);
void duplicity_instance_start (DuplicityInstance* self, GList* argv_in, GList* envp_in, gboolean as_root, GAsyncReadyCallback _callback_, gpointer _user_data_);
void duplicity_instance_start_finish (DuplicityInstance* self, GAsyncResult* _res_);
static gboolean duplicity_instance_start_co (DuplicityInstanceStartData* _data_);
static void duplicity_instance_start_internal (DuplicityInstance* self, GList* argv_in, GList* envp_in, gboolean as_root, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean duplicity_instance_start_internal_finish (DuplicityInstance* self, GAsyncResult* _res_, GError** error);
static void duplicity_instance_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _g_free0_ (gpointer var);
static void _g_list_free__g_free0_ (GList* self);
static void duplicity_instance_start_internal_data_free (gpointer _data);
static gboolean duplicity_instance_start_internal_co (DuplicityInstanceStartInternalData* _data_);
static void duplicity_instance_set_verbose (DuplicityInstance* self, gboolean value);
const gchar* duplicity_instance_get_forced_cache_dir (DuplicityInstance* self);
static void duplicity_instance_start_internal_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda4_ (DuplicityInstance* self);
static void ___lambda4__gspawn_child_setup_func (gpointer self);
static void duplicity_instance_spawn_finished (DuplicityInstance* self, GPid pid, gint status);
static void _duplicity_instance_spawn_finished_gchild_watch_func (GPid pid, gint status, gpointer self);
static void duplicity_instance_read_log (DuplicityInstance* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void duplicity_instance_read_log_finish (DuplicityInstance* self, GAsyncResult* _res_);
void duplicity_instance_cancel (DuplicityInstance* self);
void duplicity_instance_pause (DuplicityInstance* self);
static void duplicity_instance_stop_child (DuplicityInstance* self);
void duplicity_instance_resume (DuplicityInstance* self);
static void duplicity_instance_cont_child (DuplicityInstance* self);
static void duplicity_instance_read_log_lines_data_free (gpointer _data);
static void duplicity_instance_read_log_lines (DuplicityInstance* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void duplicity_instance_read_log_lines_finish (DuplicityInstance* self, GAsyncResult* _res_);
static gboolean duplicity_instance_read_log_lines_co (DuplicityInstanceReadLogLinesData* _data_);
static void duplicity_instance_read_log_lines_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void duplicity_instance_send_done_for_status (DuplicityInstance* self);
static gboolean ______lambda5_ (DuplicityInstance* self);
static gboolean _______lambda5__gsource_func (gpointer self);
gboolean duplicity_instance_get_verbose (DuplicityInstance* self);
static void duplicity_instance_process_stanza (DuplicityInstance* self, GList* stanza);
static void duplicity_instance_read_log_data_free (gpointer _data);
static gboolean duplicity_instance_read_log_co (DuplicityInstanceReadLogData* _data_);
static void duplicity_instance_read_log_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gint duplicity_instance_num_suffix (const gchar* word, gchar ch, glong start);
static gchar* duplicity_instance_validated_string (const gchar* s);
static gchar* duplicity_instance_compress_string (const gchar* s_in);
static void duplicity_instance_split_line (const gchar* line, gchar*** split, int* split_length1);
static GList* duplicity_instance_grab_stanza_data (DuplicityInstance* self, GList* stanza);
static gchar* duplicity_instance_grab_stanza_text (DuplicityInstance* self, GList* stanza);
DuplicityInstance* duplicity_instance_new (void);
DuplicityInstance* duplicity_instance_construct (GType object_type);
void duplicity_instance_set_forced_cache_dir (DuplicityInstance* self, const gchar* value);
static void g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__BOXED_INT_POINTER_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static GObject * duplicity_instance_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void duplicity_instance_finalize (GObject* obj);
static void _vala_duplicity_instance_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_duplicity_instance_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
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 duplicity_instance_start_data_free (gpointer _data) {
	DuplicityInstanceStartData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DuplicityInstanceStartData, _data_);
}


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


void duplicity_instance_start (DuplicityInstance* self, GList* argv_in, GList* envp_in, gboolean as_root, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DuplicityInstanceStartData* _data_;
	DuplicityInstance* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	_data_ = g_slice_new0 (DuplicityInstanceStartData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, duplicity_instance_start);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, duplicity_instance_start_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = argv_in;
	_data_->argv_in = _tmp1_;
	_tmp2_ = envp_in;
	_data_->envp_in = _tmp2_;
	_tmp3_ = as_root;
	_data_->as_root = _tmp3_;
	duplicity_instance_start_co (_data_);
}


void duplicity_instance_start_finish (DuplicityInstance* self, GAsyncResult* _res_) {
	DuplicityInstanceStartData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void duplicity_instance_start_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DuplicityInstanceStartData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	duplicity_instance_start_co (_data_);
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static void _g_list_free__g_free0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_free0_, NULL);
	g_list_free (self);
}


static gboolean duplicity_instance_start_co (DuplicityInstanceStartData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->argv = NULL;
		_data_->_tmp0_ = NULL;
		_data_->_tmp0_ = _data_->argv_in;
		{
			_data_->arg_collection = _data_->_tmp0_;
			for (_data_->arg_it = _data_->arg_collection; _data_->arg_it != NULL; _data_->arg_it = _data_->arg_it->next) {
				_data_->_tmp1_ = NULL;
				_data_->_tmp1_ = g_strdup ((const gchar*) _data_->arg_it->data);
				_data_->arg = _data_->_tmp1_;
				{
					_data_->_tmp2_ = NULL;
					_data_->_tmp2_ = _data_->arg;
					_data_->_tmp3_ = NULL;
					_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
					_data_->argv = g_list_append (_data_->argv, _data_->_tmp3_);
					_g_free0 (_data_->arg);
				}
			}
		}
		_data_->envp = NULL;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->envp_in;
		{
			_data_->env_collection = _data_->_tmp4_;
			for (_data_->env_it = _data_->env_collection; _data_->env_it != NULL; _data_->env_it = _data_->env_it->next) {
				_data_->_tmp5_ = NULL;
				_data_->_tmp5_ = g_strdup ((const gchar*) _data_->env_it->data);
				_data_->env = _data_->_tmp5_;
				{
					_data_->_tmp6_ = NULL;
					_data_->_tmp6_ = _data_->env;
					_data_->_tmp7_ = NULL;
					_data_->_tmp7_ = g_strdup (_data_->_tmp6_);
					_data_->envp = g_list_append (_data_->envp, _data_->_tmp7_);
					_g_free0 (_data_->env);
				}
			}
		}
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = _data_->argv;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->envp;
		_data_->_tmp11_ = FALSE;
		_data_->_tmp11_ = _data_->as_root;
		_data_->_state_ = 1;
		duplicity_instance_start_internal (_data_->self, _data_->_tmp9_, _data_->_tmp10_, _data_->_tmp11_, duplicity_instance_start_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp12_ = FALSE;
		_data_->_tmp12_ = duplicity_instance_start_internal_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp8_ = _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			__g_list_free__g_free0_0 (_data_->envp);
			__g_list_free__g_free0_0 (_data_->argv);
			goto __catch1_g_error;
		}
		if (!_data_->_tmp8_) {
			g_signal_emit_by_name (_data_->self, "done", FALSE, FALSE);
		}
		__g_list_free__g_free0_0 (_data_->envp);
		__g_list_free__g_free0_0 (_data_->argv);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = g_strdup ("ERROR");
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = g_strdup ("1");
		_data_->_tmp15_ = NULL;
		_data_->_tmp15_ = g_new0 (gchar*, 2 + 1);
		_data_->_tmp15_[0] = _data_->_tmp13_;
		_data_->_tmp15_[1] = _data_->_tmp14_;
		_data_->_tmp16_ = NULL;
		_data_->_tmp16__length1 = 0;
		_data_->_tmp16_ = _data_->_tmp15_;
		_data_->_tmp16__length1 = 2;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = _data_->e;
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = _data_->_tmp17_->message;
		g_signal_emit_by_name (_data_->self, "message", _data_->_tmp16_, 2, NULL, _data_->_tmp18_);
		_data_->_tmp16_ = (_vala_array_free (_data_->_tmp16_, _data_->_tmp16__length1, (GDestroyNotify) g_free), NULL);
		g_signal_emit_by_name (_data_->self, "done", FALSE, FALSE);
		_g_error_free0 (_data_->e);
	}
	__finally1:
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		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);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void duplicity_instance_start_internal_data_free (gpointer _data) {
	DuplicityInstanceStartInternalData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DuplicityInstanceStartInternalData, _data_);
}


static void duplicity_instance_start_internal (DuplicityInstance* self, GList* argv_in, GList* envp_in, gboolean as_root, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DuplicityInstanceStartInternalData* _data_;
	DuplicityInstance* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	_data_ = g_slice_new0 (DuplicityInstanceStartInternalData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, duplicity_instance_start_internal);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, duplicity_instance_start_internal_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = argv_in;
	_data_->argv_in = _tmp1_;
	_tmp2_ = envp_in;
	_data_->envp_in = _tmp2_;
	_tmp3_ = as_root;
	_data_->as_root = _tmp3_;
	duplicity_instance_start_internal_co (_data_);
}


static gboolean duplicity_instance_start_internal_finish (DuplicityInstance* self, GAsyncResult* _res_, GError** error) {
	gboolean result;
	DuplicityInstanceStartInternalData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return FALSE;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void duplicity_instance_start_internal_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DuplicityInstanceStartInternalData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	duplicity_instance_start_internal_co (_data_);
}


static void __lambda4_ (DuplicityInstance* self) {
	setsid ();
}


static void ___lambda4__gspawn_child_setup_func (gpointer self) {
	__lambda4_ ((DuplicityInstance*) self);
}


static void _duplicity_instance_spawn_finished_gchild_watch_func (GPid pid, gint status, gpointer self) {
	duplicity_instance_spawn_finished ((DuplicityInstance*) self, pid, status);
}


static gboolean duplicity_instance_start_internal_co (DuplicityInstanceStartInternalData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = g_getenv ("DEJA_DUP_DEBUG");
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_strdup (_data_->_tmp0_);
	_data_->verbose_str = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->verbose_str;
	if (_data_->_tmp3_ != NULL) {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->verbose_str;
		_data_->_tmp5_ = 0;
		_data_->_tmp5_ = atoi (_data_->_tmp4_);
		_data_->_tmp2_ = _data_->_tmp5_ > 0;
	} else {
		_data_->_tmp2_ = FALSE;
	}
	if (_data_->_tmp2_) {
		duplicity_instance_set_verbose (_data_->self, TRUE);
	}
	_data_->_tmp6_ = FALSE;
	_data_->_tmp6_ = _data_->as_root;
	if (_data_->_tmp6_) {
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = deja_dup_get_settings (NULL);
		_data_->settings = _data_->_tmp7_;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->settings;
		_data_->_tmp9_ = FALSE;
		_data_->_tmp9_ = g_settings_get_boolean ((GSettings*) _data_->_tmp8_, DEJA_DUP_ROOT_PROMPT_KEY);
		if (!_data_->_tmp9_) {
			_data_->as_root = FALSE;
		}
		_g_object_unref0 (_data_->settings);
	}
	_data_->_tmp10_ = NULL;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = _data_->_tmp10_ = g_listenv ();
	_data_->myenv_length1 = 0;
	_data_->_myenv_size_ = 0;
	_data_->myenv = _data_->_tmp11_;
	_data_->myenv_length1 = _vala_array_length (_data_->_tmp10_);
	_data_->_myenv_size_ = _data_->myenv_length1;
	_data_->myenv_len = 0;
	while (TRUE) {
		_data_->_tmp12_ = NULL;
		_data_->_tmp12__length1 = 0;
		_data_->_tmp12_ = _data_->myenv;
		_data_->_tmp12__length1 = _data_->myenv_length1;
		_data_->_tmp13_ = 0;
		_data_->_tmp13_ = _data_->myenv_len;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = _data_->_tmp12_[_data_->_tmp13_];
		if (!(_data_->_tmp14_ != NULL)) {
			break;
		}
		_data_->_tmp15_ = 0;
		_data_->_tmp15_ = _data_->myenv_len;
		_data_->myenv_len = _data_->_tmp15_ + 1;
	}
	_data_->_tmp16_ = 0;
	_data_->_tmp16_ = _data_->myenv_len;
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = _data_->envp_in;
	_data_->_tmp18_ = 0U;
	_data_->_tmp18_ = g_list_length (_data_->_tmp17_);
	_data_->env_len = _data_->_tmp16_ + _data_->_tmp18_;
	_data_->_tmp19_ = 0U;
	_data_->_tmp19_ = _data_->env_len;
	_data_->_tmp20_ = NULL;
	_data_->_tmp20_ = g_new0 (gchar*, (_data_->_tmp19_ + 1) + 1);
	_data_->real_envp_length1 = 0;
	_data_->_real_envp_size_ = 0;
	_data_->real_envp = _data_->_tmp20_;
	_data_->real_envp_length1 = _data_->_tmp19_ + 1;
	_data_->_real_envp_size_ = _data_->real_envp_length1;
	_data_->i = 0;
	{
		_data_->_tmp21_ = TRUE;
		while (TRUE) {
			if (!_data_->_tmp21_) {
				_data_->_tmp22_ = 0;
				_data_->_tmp22_ = _data_->i;
				_data_->i = _data_->_tmp22_ + 1;
			}
			_data_->_tmp21_ = FALSE;
			_data_->_tmp23_ = 0;
			_data_->_tmp23_ = _data_->i;
			_data_->_tmp24_ = 0;
			_data_->_tmp24_ = _data_->myenv_len;
			if (!(_data_->_tmp23_ < _data_->_tmp24_)) {
				break;
			}
			_data_->_tmp25_ = NULL;
			_data_->_tmp25__length1 = 0;
			_data_->_tmp25_ = _data_->real_envp;
			_data_->_tmp25__length1 = _data_->real_envp_length1;
			_data_->_tmp26_ = 0;
			_data_->_tmp26_ = _data_->i;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27__length1 = 0;
			_data_->_tmp27_ = _data_->myenv;
			_data_->_tmp27__length1 = _data_->myenv_length1;
			_data_->_tmp28_ = 0;
			_data_->_tmp28_ = _data_->i;
			_data_->_tmp29_ = NULL;
			_data_->_tmp29_ = _data_->_tmp27_[_data_->_tmp28_];
			_data_->_tmp30_ = NULL;
			_data_->_tmp30__length1 = 0;
			_data_->_tmp30_ = _data_->myenv;
			_data_->_tmp30__length1 = _data_->myenv_length1;
			_data_->_tmp31_ = 0;
			_data_->_tmp31_ = _data_->i;
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = _data_->_tmp30_[_data_->_tmp31_];
			_data_->_tmp33_ = NULL;
			_data_->_tmp33_ = g_getenv (_data_->_tmp32_);
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = g_strdup_printf ("%s=%s", _data_->_tmp29_, _data_->_tmp33_);
			_g_free0 (_data_->_tmp25_[_data_->_tmp26_]);
			_data_->_tmp25_[_data_->_tmp26_] = _data_->_tmp34_;
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->_tmp25_[_data_->_tmp26_];
		}
	}
	_data_->_tmp36_ = NULL;
	_data_->_tmp36_ = _data_->envp_in;
	{
		_data_->env_collection = _data_->_tmp36_;
		for (_data_->env_it = _data_->env_collection; _data_->env_it != NULL; _data_->env_it = _data_->env_it->next) {
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = g_strdup ((const gchar*) _data_->env_it->data);
			_data_->env = _data_->_tmp37_;
			{
				_data_->_tmp38_ = NULL;
				_data_->_tmp38__length1 = 0;
				_data_->_tmp38_ = _data_->real_envp;
				_data_->_tmp38__length1 = _data_->real_envp_length1;
				_data_->_tmp39_ = 0;
				_data_->_tmp39_ = _data_->i;
				_data_->i = _data_->_tmp39_ + 1;
				_data_->_tmp40_ = NULL;
				_data_->_tmp40_ = _data_->env;
				_data_->_tmp41_ = NULL;
				_data_->_tmp41_ = g_strdup (_data_->_tmp40_);
				_g_free0 (_data_->_tmp38_[_data_->_tmp39_]);
				_data_->_tmp38_[_data_->_tmp39_] = _data_->_tmp41_;
				_data_->_tmp42_ = NULL;
				_data_->_tmp42_ = _data_->_tmp38_[_data_->_tmp39_];
				_g_free0 (_data_->env);
			}
		}
	}
	_data_->_tmp43_ = NULL;
	_data_->_tmp43__length1 = 0;
	_data_->_tmp43_ = _data_->real_envp;
	_data_->_tmp43__length1 = _data_->real_envp_length1;
	_data_->_tmp44_ = 0;
	_data_->_tmp44_ = _data_->i;
	_g_free0 (_data_->_tmp43_[_data_->_tmp44_]);
	_data_->_tmp43_[_data_->_tmp44_] = NULL;
	_data_->_tmp45_ = NULL;
	_data_->_tmp45_ = _data_->_tmp43_[_data_->_tmp44_];
	_data_->argv = NULL;
	_data_->_tmp46_ = NULL;
	_data_->_tmp46_ = _data_->argv_in;
	{
		_data_->arg_collection = _data_->_tmp46_;
		for (_data_->arg_it = _data_->arg_collection; _data_->arg_it != NULL; _data_->arg_it = _data_->arg_it->next) {
			_data_->_tmp47_ = NULL;
			_data_->_tmp47_ = g_strdup ((const gchar*) _data_->arg_it->data);
			_data_->arg = _data_->_tmp47_;
			{
				_data_->_tmp48_ = NULL;
				_data_->_tmp48_ = _data_->arg;
				_data_->_tmp49_ = NULL;
				_data_->_tmp49_ = g_strdup (_data_->_tmp48_);
				_data_->argv = g_list_append (_data_->argv, _data_->_tmp49_);
				_g_free0 (_data_->arg);
			}
		}
	}
	_data_->_tmp50_ = NULL;
	_data_->_tmp50_ = g_strdup ("--verbosity=9");
	_data_->argv = g_list_append (_data_->argv, _data_->_tmp50_);
	_data_->_tmp51_ = NULL;
	_data_->_tmp51_ = g_strdup ("--gpg-options=--no-use-agent");
	_data_->argv = g_list_append (_data_->argv, _data_->_tmp51_);
	_data_->_tmp52_ = NULL;
	_data_->_tmp52_ = _data_->self->priv->_forced_cache_dir;
	_data_->_tmp53_ = NULL;
	_data_->_tmp53_ = g_strdup (_data_->_tmp52_);
	_data_->cache_dir = _data_->_tmp53_;
	_data_->_tmp54_ = NULL;
	_data_->_tmp54_ = _data_->cache_dir;
	if (_data_->_tmp54_ == NULL) {
		_data_->_tmp55_ = NULL;
		_data_->_tmp55_ = g_get_user_cache_dir ();
		_data_->_tmp56_ = NULL;
		_data_->_tmp56_ = g_build_filename (_data_->_tmp55_, PACKAGE, NULL);
		_g_free0 (_data_->cache_dir);
		_data_->cache_dir = _data_->_tmp56_;
	}
	_data_->_tmp58_ = NULL;
	_data_->_tmp58_ = _data_->cache_dir;
	if (_data_->_tmp58_ != NULL) {
		_data_->_tmp59_ = NULL;
		_data_->_tmp59_ = _data_->cache_dir;
		_data_->_tmp60_ = FALSE;
		_data_->_tmp60_ = deja_dup_ensure_directory_exists (_data_->_tmp59_);
		_data_->_tmp57_ = _data_->_tmp60_;
	} else {
		_data_->_tmp57_ = FALSE;
	}
	if (_data_->_tmp57_) {
		_data_->_tmp61_ = NULL;
		_data_->_tmp61_ = _data_->cache_dir;
		_data_->_tmp62_ = NULL;
		_data_->_tmp62_ = g_strconcat ("--archive-dir=", _data_->_tmp61_, NULL);
		_data_->argv = g_list_append (_data_->argv, _data_->_tmp62_);
	}
	_data_->_state_ = 1;
	deja_dup_get_tempdir (duplicity_instance_start_internal_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp63_ = NULL;
	_data_->_tmp63_ = deja_dup_get_tempdir_finish (_data_->_res_);
	_data_->tempdir = _data_->_tmp63_;
	_data_->_tmp64_ = NULL;
	_data_->_tmp64_ = _data_->tempdir;
	_data_->_tmp65_ = FALSE;
	_data_->_tmp65_ = deja_dup_ensure_directory_exists (_data_->_tmp64_);
	if (_data_->_tmp65_) {
		_data_->_tmp66_ = NULL;
		_data_->_tmp66_ = _data_->tempdir;
		_data_->_tmp67_ = NULL;
		_data_->_tmp67_ = g_strdup_printf ("--tempdir=%s", _data_->_tmp66_);
		_data_->argv = g_list_append (_data_->argv, _data_->_tmp67_);
	}
	_data_->_tmp68_ = FALSE;
	_data_->_tmp68_ = _data_->as_root;
	if (_data_->_tmp68_) {
		_data_->logfd = 0;
		_data_->_tmp70_ = NULL;
		_data_->_tmp71_ = 0;
		_data_->_tmp71_ = g_file_open_tmp (PACKAGE "-XXXXXX", &_data_->_tmp70_, &_data_->_inner_error_);
		_g_free0 (_data_->logname);
		_data_->logname = _data_->_tmp70_;
		_data_->_tmp69_ = _data_->_tmp71_;
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->logname);
			_g_free0 (_data_->tempdir);
			_g_free0 (_data_->cache_dir);
			__g_list_free__g_free0_0 (_data_->argv);
			_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
			_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->verbose_str);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->logfd = _data_->_tmp69_;
		_data_->_tmp72_ = NULL;
		_data_->_tmp72_ = _data_->logname;
		_data_->_tmp73_ = NULL;
		_data_->_tmp73_ = g_file_new_for_path (_data_->_tmp72_);
		_g_object_unref0 (_data_->self->priv->logfile);
		_data_->self->priv->logfile = _data_->_tmp73_;
		_data_->_tmp74_ = NULL;
		_data_->_tmp74_ = _data_->self->priv->logfile;
		_data_->_tmp75_ = NULL;
		_data_->_tmp75_ = g_file_get_path (_data_->_tmp74_);
		_data_->_tmp76_ = NULL;
		_data_->_tmp76_ = _data_->_tmp75_;
		_data_->_tmp77_ = NULL;
		_data_->_tmp77_ = g_strdup_printf ("--log-file=%s", _data_->_tmp76_);
		_data_->argv = g_list_append (_data_->argv, _data_->_tmp77_);
		_g_free0 (_data_->_tmp76_);
		_g_free0 (_data_->logname);
	} else {
		_data_->_tmp78_ = NULL;
		_data_->_tmp78__length1 = 0;
		_data_->_tmp78_ = _data_->self->priv->pipes;
		_data_->_tmp78__length1 = _data_->self->priv->pipes_length1;
		_data_->_tmp79_ = 0;
		_data_->_tmp79_ = pipe (_data_->_tmp78_);
		if (_data_->_tmp79_ != 0) {
			_data_->result = FALSE;
			_g_free0 (_data_->tempdir);
			_g_free0 (_data_->cache_dir);
			__g_list_free__g_free0_0 (_data_->argv);
			_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
			_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->verbose_str);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp80_ = NULL;
		_data_->_tmp80__length1 = 0;
		_data_->_tmp80_ = _data_->self->priv->pipes;
		_data_->_tmp80__length1 = _data_->self->priv->pipes_length1;
		_data_->_tmp81_ = 0;
		_data_->_tmp81_ = _data_->_tmp80_[1];
		_data_->_tmp82_ = NULL;
		_data_->_tmp82_ = g_strdup_printf ("--log-fd=%d", _data_->_tmp81_);
		_data_->argv = g_list_append (_data_->argv, _data_->_tmp82_);
	}
	_data_->_tmp83_ = NULL;
	_data_->_tmp83_ = g_strdup ("duplicity");
	_data_->argv = g_list_prepend (_data_->argv, _data_->_tmp83_);
	_data_->user_cmd = NULL;
	_data_->_tmp84_ = NULL;
	_data_->_tmp84_ = _data_->argv;
	{
		_data_->a_collection = _data_->_tmp84_;
		for (_data_->a_it = _data_->a_collection; _data_->a_it != NULL; _data_->a_it = _data_->a_it->next) {
			_data_->_tmp85_ = NULL;
			_data_->_tmp85_ = g_strdup ((const gchar*) _data_->a_it->data);
			_data_->a = _data_->_tmp85_;
			{
				_data_->_tmp86_ = NULL;
				_data_->_tmp86_ = _data_->a;
				if (_data_->_tmp86_ == NULL) {
					_g_free0 (_data_->a);
					break;
				}
				_data_->_tmp87_ = NULL;
				_data_->_tmp87_ = _data_->user_cmd;
				if (_data_->_tmp87_ == NULL) {
					_data_->_tmp88_ = NULL;
					_data_->_tmp88_ = _data_->a;
					_data_->_tmp89_ = NULL;
					_data_->_tmp89_ = g_strdup (_data_->_tmp88_);
					_g_free0 (_data_->user_cmd);
					_data_->user_cmd = _data_->_tmp89_;
				} else {
					_data_->_tmp90_ = NULL;
					_data_->_tmp90_ = _data_->user_cmd;
					_data_->_tmp91_ = NULL;
					_data_->_tmp91_ = _data_->a;
					_data_->_tmp92_ = NULL;
					_data_->_tmp92_ = g_shell_quote (_data_->_tmp91_);
					_data_->_tmp93_ = NULL;
					_data_->_tmp93_ = _data_->_tmp92_;
					_data_->_tmp94_ = NULL;
					_data_->_tmp94_ = g_strdup_printf ("%s %s", _data_->_tmp90_, _data_->_tmp93_);
					_g_free0 (_data_->user_cmd);
					_data_->user_cmd = _data_->_tmp94_;
					_g_free0 (_data_->_tmp93_);
				}
				_g_free0 (_data_->a);
			}
		}
	}
	_data_->_tmp97_ = FALSE;
	_data_->_tmp97_ = _data_->as_root;
	if (_data_->_tmp97_) {
		_data_->_tmp98_ = NULL;
		_data_->_tmp98_ = g_find_program_in_path ("pkexec");
		_data_->_tmp99_ = NULL;
		_data_->_tmp99_ = _data_->_tmp98_;
		_data_->_tmp96_ = _data_->_tmp99_ != NULL;
		_g_free0 (_data_->_tmp99_);
	} else {
		_data_->_tmp96_ = FALSE;
	}
	if (_data_->_tmp96_) {
		_data_->_tmp100_ = NULL;
		_data_->_tmp100_ = g_find_program_in_path ("sh");
		_data_->_tmp101_ = NULL;
		_data_->_tmp101_ = _data_->_tmp100_;
		_data_->_tmp95_ = _data_->_tmp101_ != NULL;
		_g_free0 (_data_->_tmp101_);
	} else {
		_data_->_tmp95_ = FALSE;
	}
	if (_data_->_tmp95_) {
		_data_->_tmp102_ = NULL;
		_data_->_tmp103_ = 0;
		_data_->_tmp103_ = g_file_open_tmp (PACKAGE "-XXXXXX", &_data_->_tmp102_, &_data_->_inner_error_);
		_g_free0 (_data_->scriptname);
		_data_->scriptname = _data_->_tmp102_;
		_data_->scriptfd = _data_->_tmp103_;
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->scriptname);
			_g_free0 (_data_->user_cmd);
			_g_free0 (_data_->tempdir);
			_g_free0 (_data_->cache_dir);
			__g_list_free__g_free0_0 (_data_->argv);
			_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
			_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->verbose_str);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp104_ = NULL;
		_data_->_tmp104_ = _data_->scriptname;
		_data_->_tmp105_ = NULL;
		_data_->_tmp105_ = g_file_new_for_path (_data_->_tmp104_);
		_g_object_unref0 (_data_->self->priv->scriptfile);
		_data_->self->priv->scriptfile = _data_->_tmp105_;
		_data_->_tmp106_ = 0;
		_data_->_tmp106_ = _data_->scriptfd;
		close (_data_->_tmp106_);
		_data_->_tmp107_ = NULL;
		_data_->_tmp107_ = g_string_new ("");
		_data_->args = _data_->_tmp107_;
		_data_->_tmp108_ = NULL;
		_data_->_tmp108_ = _data_->envp_in;
		{
			_data_->_vala1_env_collection = _data_->_tmp108_;
			for (_data_->_vala1_env_it = _data_->_vala1_env_collection; _data_->_vala1_env_it != NULL; _data_->_vala1_env_it = _data_->_vala1_env_it->next) {
				_data_->_tmp109_ = NULL;
				_data_->_tmp109_ = g_strdup ((const gchar*) _data_->_vala1_env_it->data);
				_data_->_vala1_env = _data_->_tmp109_;
				{
					_data_->_tmp110_ = NULL;
					_data_->_tmp110_ = _data_->args;
					_data_->_tmp111_ = NULL;
					_data_->_tmp111_ = _data_->_vala1_env;
					_data_->_tmp112_ = NULL;
					_data_->_tmp112_ = g_strdup_printf ("export '%s'\n", _data_->_tmp111_);
					_data_->_tmp113_ = NULL;
					_data_->_tmp113_ = _data_->_tmp112_;
					g_string_append (_data_->_tmp110_, _data_->_tmp113_);
					_g_free0 (_data_->_tmp113_);
					_g_free0 (_data_->_vala1_env);
				}
			}
		}
		_data_->_tmp114_ = NULL;
		_data_->_tmp114_ = _data_->argv;
		{
			_data_->_vala1_a_collection = _data_->_tmp114_;
			for (_data_->_vala1_a_it = _data_->_vala1_a_collection; _data_->_vala1_a_it != NULL; _data_->_vala1_a_it = _data_->_vala1_a_it->next) {
				_data_->_tmp115_ = NULL;
				_data_->_tmp115_ = g_strdup ((const gchar*) _data_->_vala1_a_it->data);
				_data_->_vala1_a = _data_->_tmp115_;
				{
					_data_->_tmp116_ = NULL;
					_data_->_tmp116_ = _data_->_vala1_a;
					if (_data_->_tmp116_ == NULL) {
						_g_free0 (_data_->_vala1_a);
						break;
					}
					_data_->_tmp117_ = NULL;
					_data_->_tmp117_ = _data_->args;
					_data_->_tmp118_ = 0L;
					_data_->_tmp118_ = _data_->_tmp117_->len;
					if (_data_->_tmp118_ == ((gssize) 0)) {
						_data_->_tmp119_ = NULL;
						_data_->_tmp119_ = _data_->args;
						_data_->_tmp120_ = NULL;
						_data_->_tmp120_ = _data_->_vala1_a;
						_data_->_tmp121_ = NULL;
						_data_->_tmp121_ = g_shell_quote (_data_->_tmp120_);
						_data_->_tmp122_ = NULL;
						_data_->_tmp122_ = _data_->_tmp121_;
						g_string_append (_data_->_tmp119_, _data_->_tmp122_);
						_g_free0 (_data_->_tmp122_);
					} else {
						_data_->_tmp123_ = NULL;
						_data_->_tmp123_ = _data_->args;
						_data_->_tmp124_ = NULL;
						_data_->_tmp124_ = _data_->_vala1_a;
						_data_->_tmp125_ = NULL;
						_data_->_tmp125_ = g_shell_quote (_data_->_tmp124_);
						_data_->_tmp126_ = NULL;
						_data_->_tmp126_ = _data_->_tmp125_;
						_data_->_tmp127_ = NULL;
						_data_->_tmp127_ = g_strconcat (" ", _data_->_tmp126_, NULL);
						_data_->_tmp128_ = NULL;
						_data_->_tmp128_ = _data_->_tmp127_;
						g_string_append (_data_->_tmp123_, _data_->_tmp128_);
						_g_free0 (_data_->_tmp128_);
						_g_free0 (_data_->_tmp126_);
					}
					_g_free0 (_data_->_vala1_a);
				}
			}
		}
		_data_->_tmp129_ = NULL;
		_data_->_tmp129_ = _data_->scriptname;
		_data_->_tmp130_ = NULL;
		_data_->_tmp130_ = _data_->args;
		_data_->_tmp131_ = NULL;
		_data_->_tmp131_ = _data_->_tmp130_->str;
		g_file_set_contents (_data_->_tmp129_, _data_->_tmp131_, (gssize) -1, &_data_->_inner_error_);
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_string_free0 (_data_->args);
			_g_free0 (_data_->scriptname);
			_g_free0 (_data_->user_cmd);
			_g_free0 (_data_->tempdir);
			_g_free0 (_data_->cache_dir);
			__g_list_free__g_free0_0 (_data_->argv);
			_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
			_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (_data_->verbose_str);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		__g_list_free__g_free0_0 (_data_->argv);
		_data_->argv = NULL;
		_data_->_tmp132_ = NULL;
		_data_->_tmp132_ = _data_->scriptname;
		_data_->_tmp133_ = NULL;
		_data_->_tmp133_ = g_strdup (_data_->_tmp132_);
		_data_->argv = g_list_prepend (_data_->argv, _data_->_tmp133_);
		_data_->_tmp134_ = NULL;
		_data_->_tmp134_ = g_strdup ("sh");
		_data_->argv = g_list_prepend (_data_->argv, _data_->_tmp134_);
		_data_->_tmp135_ = NULL;
		_data_->_tmp135_ = g_strdup ("pkexec");
		_data_->argv = g_list_prepend (_data_->argv, _data_->_tmp135_);
		_g_string_free0 (_data_->args);
		_g_free0 (_data_->scriptname);
	}
	_data_->_tmp136_ = NULL;
	_data_->_tmp136_ = _data_->argv;
	_data_->_tmp137_ = 0U;
	_data_->_tmp137_ = g_list_length (_data_->_tmp136_);
	_data_->_tmp138_ = NULL;
	_data_->_tmp138_ = g_new0 (gchar*, _data_->_tmp137_ + 1);
	_data_->real_argv_length1 = 0;
	_data_->_real_argv_size_ = 0;
	_data_->real_argv = _data_->_tmp138_;
	_data_->real_argv_length1 = _data_->_tmp137_;
	_data_->_real_argv_size_ = _data_->real_argv_length1;
	_data_->i = 0;
	_data_->_tmp139_ = NULL;
	_data_->_tmp139_ = _data_->argv;
	{
		_data_->_vala2_a_collection = _data_->_tmp139_;
		for (_data_->_vala2_a_it = _data_->_vala2_a_collection; _data_->_vala2_a_it != NULL; _data_->_vala2_a_it = _data_->_vala2_a_it->next) {
			_data_->_tmp140_ = NULL;
			_data_->_tmp140_ = g_strdup ((const gchar*) _data_->_vala2_a_it->data);
			_data_->_vala2_a = _data_->_tmp140_;
			{
				_data_->_tmp141_ = NULL;
				_data_->_tmp141__length1 = 0;
				_data_->_tmp141_ = _data_->real_argv;
				_data_->_tmp141__length1 = _data_->real_argv_length1;
				_data_->_tmp142_ = 0;
				_data_->_tmp142_ = _data_->i;
				_data_->i = _data_->_tmp142_ + 1;
				_data_->_tmp143_ = NULL;
				_data_->_tmp143_ = _data_->_vala2_a;
				_data_->_tmp144_ = NULL;
				_data_->_tmp144_ = g_strdup (_data_->_tmp143_);
				_g_free0 (_data_->_tmp141_[_data_->_tmp142_]);
				_data_->_tmp141_[_data_->_tmp142_] = _data_->_tmp144_;
				_data_->_tmp145_ = NULL;
				_data_->_tmp145_ = _data_->_tmp141_[_data_->_tmp142_];
				_g_free0 (_data_->_vala2_a);
			}
		}
	}
	_data_->_tmp146_ = NULL;
	_data_->_tmp146_ = _data_->cache_dir;
	_data_->_tmp147_ = NULL;
	_data_->_tmp147_ = g_shell_quote (_data_->_tmp146_);
	_data_->_tmp148_ = NULL;
	_data_->_tmp148_ = _data_->_tmp147_;
	_data_->_tmp149_ = NULL;
	_data_->_tmp149_ = g_strconcat ("/bin/rm -f ", _data_->_tmp148_, NULL);
	_data_->_tmp150_ = NULL;
	_data_->_tmp150_ = _data_->_tmp149_;
	_data_->_tmp151_ = NULL;
	_data_->_tmp151_ = g_strconcat (_data_->_tmp150_, "/*/lockfile.lock", NULL);
	_data_->_tmp152_ = NULL;
	_data_->_tmp152_ = _data_->_tmp151_;
	system (_data_->_tmp152_);
	_g_free0 (_data_->_tmp152_);
	_g_free0 (_data_->_tmp150_);
	_g_free0 (_data_->_tmp148_);
	_data_->_tmp153_ = NULL;
	_data_->_tmp153__length1 = 0;
	_data_->_tmp153_ = _data_->real_argv;
	_data_->_tmp153__length1 = _data_->real_argv_length1;
	_data_->_tmp154_ = NULL;
	_data_->_tmp154__length1 = 0;
	_data_->_tmp154_ = _data_->real_envp;
	_data_->_tmp154__length1 = _data_->real_envp_length1;
	_data_->_tmp155_ = 0;
	g_spawn_async_with_pipes (NULL, _data_->_tmp153_, _data_->_tmp154_, (((G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD) | G_SPAWN_LEAVE_DESCRIPTORS_OPEN) | G_SPAWN_STDOUT_TO_DEV_NULL) | G_SPAWN_STDERR_TO_DEV_NULL, ___lambda4__gspawn_child_setup_func, _data_->self, &_data_->_tmp155_, NULL, NULL, NULL, &_data_->_inner_error_);
	_data_->self->priv->child_pid = _data_->_tmp155_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->real_argv = (_vala_array_free (_data_->real_argv, _data_->real_argv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data_->user_cmd);
		_g_free0 (_data_->tempdir);
		_g_free0 (_data_->cache_dir);
		__g_list_free__g_free0_0 (_data_->argv);
		_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
		_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (_data_->verbose_str);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp156_ = 0;
	_data_->_tmp156_ = _data_->self->priv->child_pid;
	_data_->_tmp157_ = NULL;
	_data_->_tmp157_ = _data_->user_cmd;
	g_debug ("DuplicityInstance.vala:197: Running the following duplicity (%i) comma" \
"nd: %s\n", (gint) _data_->_tmp156_, _data_->_tmp157_);
	_data_->_tmp158_ = 0;
	_data_->_tmp158_ = _data_->self->priv->child_pid;
	_data_->_tmp159_ = 0U;
	_data_->_tmp159_ = g_child_watch_add_full (G_PRIORITY_DEFAULT_IDLE, _data_->_tmp158_, _duplicity_instance_spawn_finished_gchild_watch_func, g_object_ref (_data_->self), g_object_unref);
	_data_->self->priv->watch_id = _data_->_tmp159_;
	_data_->_tmp160_ = NULL;
	_data_->_tmp160__length1 = 0;
	_data_->_tmp160_ = _data_->self->priv->pipes;
	_data_->_tmp160__length1 = _data_->self->priv->pipes_length1;
	_data_->_tmp161_ = 0;
	_data_->_tmp161_ = _data_->_tmp160_[1];
	if (_data_->_tmp161_ != -1) {
		_data_->_tmp162_ = NULL;
		_data_->_tmp162__length1 = 0;
		_data_->_tmp162_ = _data_->self->priv->pipes;
		_data_->_tmp162__length1 = _data_->self->priv->pipes_length1;
		_data_->_tmp163_ = 0;
		_data_->_tmp163_ = _data_->_tmp162_[1];
		close (_data_->_tmp163_);
	}
	_data_->_state_ = 2;
	duplicity_instance_read_log (_data_->self, duplicity_instance_start_internal_ready, _data_);
	return FALSE;
	_state_2:
	duplicity_instance_read_log_finish (_data_->self, _data_->_res_);
	_data_->result = TRUE;
	_data_->real_argv = (_vala_array_free (_data_->real_argv, _data_->real_argv_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_data_->user_cmd);
	_g_free0 (_data_->tempdir);
	_g_free0 (_data_->cache_dir);
	__g_list_free__g_free0_0 (_data_->argv);
	_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
	_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_data_->verbose_str);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_data_->real_argv = (_vala_array_free (_data_->real_argv, _data_->real_argv_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_data_->user_cmd);
	_g_free0 (_data_->tempdir);
	_g_free0 (_data_->cache_dir);
	__g_list_free__g_free0_0 (_data_->argv);
	_data_->real_envp = (_vala_array_free (_data_->real_envp, _data_->real_envp_length1, (GDestroyNotify) g_free), NULL);
	_data_->myenv = (_vala_array_free (_data_->myenv, _data_->myenv_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_data_->verbose_str);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


gboolean duplicity_instance_is_started (DuplicityInstance* self) {
	gboolean result = FALSE;
	GPid _tmp0_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->child_pid;
	result = ((gint) _tmp0_) > 0;
	return result;
}


void duplicity_instance_cancel (DuplicityInstance* self) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = duplicity_instance_is_started (self);
	if (_tmp0_) {
		duplicity_instance_kill_child (self);
	} else {
		g_signal_emit_by_name (self, "done", FALSE, TRUE);
	}
}


void duplicity_instance_pause (DuplicityInstance* self) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = duplicity_instance_is_started (self);
	if (_tmp0_) {
		duplicity_instance_stop_child (self);
	}
}


void duplicity_instance_resume (DuplicityInstance* self) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = duplicity_instance_is_started (self);
	if (_tmp0_) {
		duplicity_instance_cont_child (self);
	}
}


static void duplicity_instance_kill_child (DuplicityInstance* self) {
	GPid _tmp0_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->child_pid;
	kill ((pid_t) _tmp0_, SIGKILL);
}


static void duplicity_instance_stop_child (DuplicityInstance* self) {
	GPid _tmp0_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->child_pid;
	kill ((pid_t) _tmp0_, SIGSTOP);
}


static void duplicity_instance_cont_child (DuplicityInstance* self) {
	GPid _tmp0_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->child_pid;
	kill ((pid_t) _tmp0_, SIGCONT);
}


static void duplicity_instance_read_log_lines_data_free (gpointer _data) {
	DuplicityInstanceReadLogLinesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DuplicityInstanceReadLogLinesData, _data_);
}


static void duplicity_instance_read_log_lines (DuplicityInstance* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DuplicityInstanceReadLogLinesData* _data_;
	DuplicityInstance* _tmp0_ = NULL;
	_data_ = g_slice_new0 (DuplicityInstanceReadLogLinesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, duplicity_instance_read_log_lines);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, duplicity_instance_read_log_lines_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	duplicity_instance_read_log_lines_co (_data_);
}


static void duplicity_instance_read_log_lines_finish (DuplicityInstance* self, GAsyncResult* _res_) {
	DuplicityInstanceReadLogLinesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void duplicity_instance_read_log_lines_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DuplicityInstanceReadLogLinesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	duplicity_instance_read_log_lines_co (_data_);
}


static gboolean ______lambda5_ (DuplicityInstance* self) {
	gboolean result = FALSE;
	duplicity_instance_read_log_lines (self, NULL, NULL);
	result = FALSE;
	return result;
}


static gboolean _______lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = ______lambda5_ ((DuplicityInstance*) self);
	return result;
}


static gboolean duplicity_instance_read_log_lines_co (DuplicityInstanceReadLogLinesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->stanza = NULL;
	while (TRUE) {
		_data_->_tmp0_ = NULL;
		_data_->_tmp0_ = _data_->self->priv->reader;
		if (!(_data_->_tmp0_ != NULL)) {
			break;
		}
		{
			_data_->_tmp1_ = NULL;
			_data_->_tmp1_ = _data_->self->priv->reader;
			_data_->_state_ = 1;
			g_data_input_stream_read_line_async (_data_->_tmp1_, G_PRIORITY_DEFAULT, NULL, duplicity_instance_read_log_lines_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp2_ = NULL;
			_data_->_tmp2_ = g_data_input_stream_read_line_finish (_data_->_tmp1_, _data_->_res_, NULL, &_data_->_inner_error_);
			_data_->line = _data_->_tmp2_;
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
				goto __catch2_g_error;
			}
			_data_->_tmp3_ = NULL;
			_data_->_tmp3_ = _data_->line;
			if (_data_->_tmp3_ == NULL) {
				_data_->_tmp4_ = FALSE;
				_data_->_tmp4_ = _data_->self->priv->process_done;
				if (_data_->_tmp4_) {
					duplicity_instance_send_done_for_status (_data_->self);
					_g_free0 (_data_->line);
					break;
				} else {
					g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, _______lambda5__gsource_func, g_object_ref (_data_->self), g_object_unref);
					_g_free0 (_data_->line);
					__g_list_free__g_free0_0 (_data_->stanza);
					if (_data_->_state_ == 0) {
						g_simple_async_result_complete_in_idle (_data_->_async_result);
					} else {
						g_simple_async_result_complete (_data_->_async_result);
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
			}
			_data_->_tmp5_ = NULL;
			_data_->_tmp5_ = _data_->line;
			if (g_strcmp0 (_data_->_tmp5_, "") != 0) {
				_data_->_tmp6_ = FALSE;
				_data_->_tmp6_ = _data_->self->priv->_verbose;
				if (_data_->_tmp6_) {
					_data_->_tmp7_ = NULL;
					_data_->_tmp7_ = _data_->line;
					g_print ("DUPLICITY: %s\n", _data_->_tmp7_);
				}
				_data_->_tmp8_ = NULL;
				_data_->_tmp8_ = _data_->line;
				_data_->_tmp9_ = NULL;
				_data_->_tmp9_ = g_strdup (_data_->_tmp8_);
				_data_->stanza = g_list_append (_data_->stanza, _data_->_tmp9_);
			} else {
				_data_->_tmp10_ = NULL;
				_data_->_tmp10_ = _data_->stanza;
				if (_data_->_tmp10_ != NULL) {
					_data_->_tmp11_ = FALSE;
					_data_->_tmp11_ = _data_->self->priv->_verbose;
					if (_data_->_tmp11_) {
						g_print ("\n");
					}
					_data_->_tmp12_ = NULL;
					_data_->_tmp12_ = _data_->stanza;
					duplicity_instance_process_stanza (_data_->self, _data_->_tmp12_);
					__g_list_free__g_free0_0 (_data_->stanza);
					_data_->stanza = NULL;
				}
			}
			_g_free0 (_data_->line);
		}
		goto __finally2;
		__catch2_g_error:
		{
			_data_->err = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = _data_->err;
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->_tmp13_->message;
			g_warning ("DuplicityInstance.vala:314: %s\n", _data_->_tmp14_);
			_g_error_free0 (_data_->err);
			break;
		}
		__finally2:
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			__g_list_free__g_free0_0 (_data_->stanza);
			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);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_g_object_unref0 (_data_->self->priv->reader);
	_data_->self->priv->reader = NULL;
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = _data_->self->priv->logfile;
	if (_data_->_tmp15_ != NULL) {
		{
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->self->priv->logfile;
			g_file_delete (_data_->_tmp16_, NULL, &_data_->_inner_error_);
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
				goto __catch3_g_error;
			}
		}
		goto __finally3;
		__catch3_g_error:
		{
			_data_->e2 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->e2;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = _data_->_tmp17_->message;
			g_warning ("DuplicityInstance.vala:324: %s\n", _data_->_tmp18_);
			_g_error_free0 (_data_->e2);
		}
		__finally3:
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			__g_list_free__g_free0_0 (_data_->stanza);
			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);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	g_object_unref ((GObject*) _data_->self);
	__g_list_free__g_free0_0 (_data_->stanza);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void duplicity_instance_read_log_data_free (gpointer _data) {
	DuplicityInstanceReadLogData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (DuplicityInstanceReadLogData, _data_);
}


static void duplicity_instance_read_log (DuplicityInstance* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	DuplicityInstanceReadLogData* _data_;
	DuplicityInstance* _tmp0_ = NULL;
	_data_ = g_slice_new0 (DuplicityInstanceReadLogData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, duplicity_instance_read_log);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, duplicity_instance_read_log_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	duplicity_instance_read_log_co (_data_);
}


static void duplicity_instance_read_log_finish (DuplicityInstance* self, GAsyncResult* _res_) {
	DuplicityInstanceReadLogData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void duplicity_instance_read_log_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	DuplicityInstanceReadLogData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	duplicity_instance_read_log_co (_data_);
}


static gboolean duplicity_instance_read_log_co (DuplicityInstanceReadLogData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = NULL;
		_data_->_tmp0_ = _data_->self->priv->logfile;
		if (_data_->_tmp0_ != NULL) {
			_data_->_tmp2_ = NULL;
			_data_->_tmp2_ = _data_->self->priv->logfile;
			_data_->_state_ = 1;
			g_file_read_async (_data_->_tmp2_, G_PRIORITY_DEFAULT, NULL, duplicity_instance_read_log_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp3_ = NULL;
			_data_->_tmp3_ = g_file_read_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
			_data_->_tmp1_ = _data_->_tmp3_;
			if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
				_g_object_unref0 (_data_->stream);
				goto __catch4_g_error;
			}
			_data_->_tmp4_ = NULL;
			_data_->_tmp4_ = _data_->_tmp1_;
			_data_->_tmp1_ = NULL;
			_g_object_unref0 (_data_->stream);
			_data_->stream = (GInputStream*) _data_->_tmp4_;
			_g_object_unref0 (_data_->_tmp1_);
		} else {
			_data_->_tmp5_ = NULL;
			_data_->_tmp5__length1 = 0;
			_data_->_tmp5_ = _data_->self->priv->pipes;
			_data_->_tmp5__length1 = _data_->self->priv->pipes_length1;
			_data_->_tmp6_ = 0;
			_data_->_tmp6_ = _data_->_tmp5_[0];
			_data_->_tmp7_ = NULL;
			_data_->_tmp7_ = (GUnixInputStream*) g_unix_input_stream_new (_data_->_tmp6_, TRUE);
			_g_object_unref0 (_data_->stream);
			_data_->stream = (GInputStream*) _data_->_tmp7_;
		}
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->stream;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = g_data_input_stream_new (_data_->_tmp8_);
		_g_object_unref0 (_data_->self->priv->reader);
		_data_->self->priv->reader = _data_->_tmp9_;
		_g_object_unref0 (_data_->stream);
	}
	goto __finally4;
	__catch4_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->e;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = _data_->_tmp10_->message;
		g_warning ("DuplicityInstance.vala:348: %s\n", _data_->_tmp11_);
		g_signal_emit_by_name (_data_->self, "done", FALSE, FALSE);
		_g_error_free0 (_data_->e);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally4:
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		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);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	g_object_ref ((GObject*) _data_->self);
	_data_->_state_ = 2;
	duplicity_instance_read_log_lines (_data_->self, duplicity_instance_read_log_ready, _data_);
	return FALSE;
	_state_2:
	duplicity_instance_read_log_lines_finish (_data_->self, _data_->_res_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


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


static gint duplicity_instance_num_suffix (const gchar* word, gchar ch, glong start) {
	gint result = 0;
	gint rv = 0;
	glong _tmp0_ = 0L;
	g_return_val_if_fail (word != NULL, 0);
	rv = 0;
	_tmp0_ = start;
	if (_tmp0_ < ((glong) 0)) {
		const gchar* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		_tmp1_ = word;
		_tmp2_ = strlen (_tmp1_);
		_tmp3_ = _tmp2_;
		start = ((glong) _tmp3_) - 1;
	}
	{
		glong i = 0L;
		glong _tmp4_ = 0L;
		_tmp4_ = start;
		i = _tmp4_;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				glong _tmp8_ = 0L;
				const gchar* _tmp9_ = NULL;
				glong _tmp10_ = 0L;
				gchar _tmp11_ = '\0';
				gchar _tmp12_ = '\0';
				if (!_tmp5_) {
					glong _tmp6_ = 0L;
					gint _tmp7_ = 0;
					_tmp6_ = i;
					i = _tmp6_ - 1;
					_tmp7_ = rv;
					rv = _tmp7_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp8_ = i;
				if (!(_tmp8_ >= ((glong) 0))) {
					break;
				}
				_tmp9_ = word;
				_tmp10_ = i;
				_tmp11_ = string_get (_tmp9_, _tmp10_);
				_tmp12_ = ch;
				if (_tmp11_ != _tmp12_) {
					break;
				}
			}
		}
	}
	result = rv;
	return result;
}


static gchar* duplicity_instance_validated_string (const gchar* s) {
	gchar* result = NULL;
	GString* rv = NULL;
	GString* _tmp0_ = NULL;
	const gchar* p = NULL;
	const gchar* _tmp1_ = NULL;
	GString* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	g_return_val_if_fail (s != NULL, NULL);
	_tmp0_ = g_string_new ("");
	rv = _tmp0_;
	_tmp1_ = s;
	p = _tmp1_;
	while (TRUE) {
		const gchar* _tmp2_ = NULL;
		gchar _tmp3_ = '\0';
		gunichar ch = 0U;
		const gchar* _tmp4_ = NULL;
		gunichar _tmp5_ = 0U;
		gboolean _tmp6_ = FALSE;
		gunichar _tmp7_ = 0U;
		_tmp2_ = p;
		_tmp3_ = string_get (_tmp2_, (glong) 0);
		if (!(((gint) _tmp3_) != 0)) {
			break;
		}
		_tmp4_ = p;
		_tmp5_ = g_utf8_get_char_validated (_tmp4_, (gssize) -1);
		ch = _tmp5_;
		_tmp7_ = ch;
		if (_tmp7_ == ((gunichar) -1)) {
			_tmp6_ = TRUE;
		} else {
			gunichar _tmp8_ = 0U;
			_tmp8_ = ch;
			_tmp6_ = _tmp8_ == ((gunichar) -2);
		}
		if (_tmp6_) {
			GString* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			_tmp9_ = rv;
			g_string_append (_tmp9_, "�");
			_tmp10_ = p;
			p = (const gchar*) (((gchar*) _tmp10_) + 1);
		} else {
			GString* _tmp11_ = NULL;
			gunichar _tmp12_ = 0U;
			const gchar* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			_tmp11_ = rv;
			_tmp12_ = ch;
			g_string_append_unichar (_tmp11_, _tmp12_);
			_tmp13_ = p;
			_tmp14_ = g_utf8_next_char (_tmp13_);
			p = _tmp14_;
		}
	}
	_tmp15_ = rv;
	_tmp16_ = _tmp15_->str;
	_tmp17_ = g_strdup (_tmp16_);
	result = _tmp17_;
	_g_string_free0 (rv);
	return result;
}


static gchar* duplicity_instance_compress_string (const gchar* s_in) {
	gchar* result = NULL;
	GString* rv = NULL;
	const gchar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	GString* _tmp3_ = NULL;
	gchar* s = NULL;
	const gchar* _tmp4_ = NULL;
	gint s_length1 = 0;
	gint _s_size_ = 0;
	gint i = 0;
	GString* _tmp97_ = NULL;
	const gchar* _tmp98_ = NULL;
	gchar* _tmp99_ = NULL;
	g_return_val_if_fail (s_in != NULL, NULL);
	_tmp0_ = s_in;
	_tmp1_ = strlen (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_string_sized_new ((gsize) _tmp2_);
	rv = _tmp3_;
	_tmp4_ = s_in;
	s = (gchar*) _tmp4_;
	s_length1 = -1;
	_s_size_ = s_length1;
	i = 0;
	while (TRUE) {
		gchar* _tmp5_ = NULL;
		gint _tmp5__length1 = 0;
		gint _tmp6_ = 0;
		gchar _tmp7_ = '\0';
		gboolean _tmp8_ = FALSE;
		gchar* _tmp9_ = NULL;
		gint _tmp9__length1 = 0;
		gint _tmp10_ = 0;
		gchar _tmp11_ = '\0';
		_tmp5_ = s;
		_tmp5__length1 = s_length1;
		_tmp6_ = i;
		_tmp7_ = _tmp5_[_tmp6_];
		if (!(((gint) _tmp7_) != 0)) {
			break;
		}
		_tmp9_ = s;
		_tmp9__length1 = s_length1;
		_tmp10_ = i;
		_tmp11_ = _tmp9_[_tmp10_];
		if (_tmp11_ == '\\') {
			gchar* _tmp12_ = NULL;
			gint _tmp12__length1 = 0;
			gint _tmp13_ = 0;
			gchar _tmp14_ = '\0';
			_tmp12_ = s;
			_tmp12__length1 = s_length1;
			_tmp13_ = i;
			_tmp14_ = _tmp12_[_tmp13_ + 1];
			_tmp8_ = ((gint) _tmp14_) != 0;
		} else {
			_tmp8_ = FALSE;
		}
		if (_tmp8_) {
			gboolean bare_escape = FALSE;
			gchar* _tmp15_ = NULL;
			gint _tmp15__length1 = 0;
			gint _tmp16_ = 0;
			gchar _tmp17_ = '\0';
			gboolean _tmp87_ = FALSE;
			bare_escape = FALSE;
			_tmp15_ = s;
			_tmp15__length1 = s_length1;
			_tmp16_ = i;
			_tmp17_ = _tmp15_[_tmp16_ + 1];
			switch (_tmp17_) {
				case 'b':
				{
					GString* _tmp18_ = NULL;
					gint _tmp19_ = 0;
					_tmp18_ = rv;
					g_string_append_c (_tmp18_, '\b');
					_tmp19_ = i;
					i = _tmp19_ + 2;
					break;
				}
				case 'f':
				{
					GString* _tmp20_ = NULL;
					gint _tmp21_ = 0;
					_tmp20_ = rv;
					g_string_append_c (_tmp20_, '\f');
					_tmp21_ = i;
					i = _tmp21_ + 2;
					break;
				}
				case 't':
				{
					GString* _tmp22_ = NULL;
					gint _tmp23_ = 0;
					_tmp22_ = rv;
					g_string_append_c (_tmp22_, '\t');
					_tmp23_ = i;
					i = _tmp23_ + 2;
					break;
				}
				case 'n':
				{
					GString* _tmp24_ = NULL;
					gint _tmp25_ = 0;
					_tmp24_ = rv;
					g_string_append_c (_tmp24_, '\n');
					_tmp25_ = i;
					i = _tmp25_ + 2;
					break;
				}
				case 'r':
				{
					GString* _tmp26_ = NULL;
					gint _tmp27_ = 0;
					_tmp26_ = rv;
					g_string_append_c (_tmp26_, '\r');
					_tmp27_ = i;
					i = _tmp27_ + 2;
					break;
				}
				case 'v':
				{
					GString* _tmp28_ = NULL;
					gint _tmp29_ = 0;
					_tmp28_ = rv;
					g_string_append_c (_tmp28_, '\xb');
					_tmp29_ = i;
					i = _tmp29_ + 2;
					break;
				}
				case 'a':
				{
					GString* _tmp30_ = NULL;
					gint _tmp31_ = 0;
					_tmp30_ = rv;
					g_string_append_c (_tmp30_, '\x7');
					_tmp31_ = i;
					i = _tmp31_ + 2;
					break;
				}
				case 'x':
				{
					gboolean _tmp32_ = FALSE;
					gchar* _tmp33_ = NULL;
					gint _tmp33__length1 = 0;
					gint _tmp34_ = 0;
					gchar _tmp35_ = '\0';
					_tmp33_ = s;
					_tmp33__length1 = s_length1;
					_tmp34_ = i;
					_tmp35_ = _tmp33_[_tmp34_ + 2];
					if (((gint) _tmp35_) != 0) {
						gchar* _tmp36_ = NULL;
						gint _tmp36__length1 = 0;
						gint _tmp37_ = 0;
						gchar _tmp38_ = '\0';
						_tmp36_ = s;
						_tmp36__length1 = s_length1;
						_tmp37_ = i;
						_tmp38_ = _tmp36_[_tmp37_ + 3];
						_tmp32_ = ((gint) _tmp38_) != 0;
					} else {
						_tmp32_ = FALSE;
					}
					if (_tmp32_) {
						gchar* tmpstr = NULL;
						gchar* _tmp39_ = NULL;
						gint tmpstr_length1 = 0;
						gint _tmpstr_size_ = 0;
						gchar* _tmp40_ = NULL;
						gint _tmp40__length1 = 0;
						gchar* _tmp41_ = NULL;
						gint _tmp41__length1 = 0;
						gint _tmp42_ = 0;
						gchar _tmp43_ = '\0';
						gchar _tmp44_ = '\0';
						gchar* _tmp45_ = NULL;
						gint _tmp45__length1 = 0;
						gchar* _tmp46_ = NULL;
						gint _tmp46__length1 = 0;
						gint _tmp47_ = 0;
						gchar _tmp48_ = '\0';
						gchar _tmp49_ = '\0';
						gulong val = 0UL;
						gchar* _tmp50_ = NULL;
						gint _tmp50__length1 = 0;
						gulong _tmp51_ = 0UL;
						GString* _tmp52_ = NULL;
						gulong _tmp53_ = 0UL;
						gint _tmp54_ = 0;
						_tmp39_ = g_new0 (gchar, 3);
						tmpstr = _tmp39_;
						tmpstr_length1 = 3;
						_tmpstr_size_ = tmpstr_length1;
						_tmp40_ = tmpstr;
						_tmp40__length1 = tmpstr_length1;
						_tmp41_ = s;
						_tmp41__length1 = s_length1;
						_tmp42_ = i;
						_tmp43_ = _tmp41_[_tmp42_ + 2];
						_tmp40_[0] = _tmp43_;
						_tmp44_ = _tmp40_[0];
						_tmp45_ = tmpstr;
						_tmp45__length1 = tmpstr_length1;
						_tmp46_ = s;
						_tmp46__length1 = s_length1;
						_tmp47_ = i;
						_tmp48_ = _tmp46_[_tmp47_ + 3];
						_tmp45_[1] = _tmp48_;
						_tmp49_ = _tmp45_[1];
						_tmp50_ = tmpstr;
						_tmp50__length1 = tmpstr_length1;
						_tmp51_ = strtoul ((const gchar*) _tmp50_, NULL, 16);
						val = _tmp51_;
						_tmp52_ = rv;
						_tmp53_ = val;
						g_string_append_unichar (_tmp52_, (gunichar) _tmp53_);
						_tmp54_ = i;
						i = _tmp54_ + 4;
						tmpstr = (g_free (tmpstr), NULL);
					} else {
						bare_escape = TRUE;
					}
					break;
				}
				case '0':
				case '1':
				case '2':
				case '3':
				case '4':
				case '5':
				case '6':
				case '7':
				{
					gboolean _tmp55_ = FALSE;
					gboolean _tmp56_ = FALSE;
					gchar* _tmp57_ = NULL;
					gint _tmp57__length1 = 0;
					gint _tmp58_ = 0;
					gchar _tmp59_ = '\0';
					_tmp57_ = s;
					_tmp57__length1 = s_length1;
					_tmp58_ = i;
					_tmp59_ = _tmp57_[_tmp58_ + 2];
					if (((gint) _tmp59_) != 0) {
						gchar* _tmp60_ = NULL;
						gint _tmp60__length1 = 0;
						gint _tmp61_ = 0;
						gchar _tmp62_ = '\0';
						_tmp60_ = s;
						_tmp60__length1 = s_length1;
						_tmp61_ = i;
						_tmp62_ = _tmp60_[_tmp61_ + 3];
						_tmp56_ = ((gint) _tmp62_) != 0;
					} else {
						_tmp56_ = FALSE;
					}
					if (_tmp56_) {
						gchar* _tmp63_ = NULL;
						gint _tmp63__length1 = 0;
						gint _tmp64_ = 0;
						gchar _tmp65_ = '\0';
						_tmp63_ = s;
						_tmp63__length1 = s_length1;
						_tmp64_ = i;
						_tmp65_ = _tmp63_[_tmp64_ + 4];
						_tmp55_ = ((gint) _tmp65_) != 0;
					} else {
						_tmp55_ = FALSE;
					}
					if (_tmp55_) {
						gchar* tmpstr = NULL;
						gchar* _tmp66_ = NULL;
						gint tmpstr_length1 = 0;
						gint _tmpstr_size_ = 0;
						gchar* _tmp67_ = NULL;
						gint _tmp67__length1 = 0;
						gchar* _tmp68_ = NULL;
						gint _tmp68__length1 = 0;
						gint _tmp69_ = 0;
						gchar _tmp70_ = '\0';
						gchar _tmp71_ = '\0';
						gchar* _tmp72_ = NULL;
						gint _tmp72__length1 = 0;
						gchar* _tmp73_ = NULL;
						gint _tmp73__length1 = 0;
						gint _tmp74_ = 0;
						gchar _tmp75_ = '\0';
						gchar _tmp76_ = '\0';
						gchar* _tmp77_ = NULL;
						gint _tmp77__length1 = 0;
						gchar* _tmp78_ = NULL;
						gint _tmp78__length1 = 0;
						gint _tmp79_ = 0;
						gchar _tmp80_ = '\0';
						gchar _tmp81_ = '\0';
						gulong val = 0UL;
						gchar* _tmp82_ = NULL;
						gint _tmp82__length1 = 0;
						gulong _tmp83_ = 0UL;
						GString* _tmp84_ = NULL;
						gulong _tmp85_ = 0UL;
						gint _tmp86_ = 0;
						_tmp66_ = g_new0 (gchar, 4);
						tmpstr = _tmp66_;
						tmpstr_length1 = 4;
						_tmpstr_size_ = tmpstr_length1;
						_tmp67_ = tmpstr;
						_tmp67__length1 = tmpstr_length1;
						_tmp68_ = s;
						_tmp68__length1 = s_length1;
						_tmp69_ = i;
						_tmp70_ = _tmp68_[_tmp69_ + 2];
						_tmp67_[0] = _tmp70_;
						_tmp71_ = _tmp67_[0];
						_tmp72_ = tmpstr;
						_tmp72__length1 = tmpstr_length1;
						_tmp73_ = s;
						_tmp73__length1 = s_length1;
						_tmp74_ = i;
						_tmp75_ = _tmp73_[_tmp74_ + 3];
						_tmp72_[1] = _tmp75_;
						_tmp76_ = _tmp72_[1];
						_tmp77_ = tmpstr;
						_tmp77__length1 = tmpstr_length1;
						_tmp78_ = s;
						_tmp78__length1 = s_length1;
						_tmp79_ = i;
						_tmp80_ = _tmp78_[_tmp79_ + 4];
						_tmp77_[2] = _tmp80_;
						_tmp81_ = _tmp77_[2];
						_tmp82_ = tmpstr;
						_tmp82__length1 = tmpstr_length1;
						_tmp83_ = strtoul ((const gchar*) _tmp82_, NULL, 8);
						val = _tmp83_;
						_tmp84_ = rv;
						_tmp85_ = val;
						g_string_append_unichar (_tmp84_, (gunichar) _tmp85_);
						_tmp86_ = i;
						i = _tmp86_ + 5;
						tmpstr = (g_free (tmpstr), NULL);
					} else {
						bare_escape = TRUE;
					}
					break;
				}
				default:
				{
					bare_escape = TRUE;
					break;
				}
			}
			_tmp87_ = bare_escape;
			if (_tmp87_) {
				GString* _tmp88_ = NULL;
				gchar* _tmp89_ = NULL;
				gint _tmp89__length1 = 0;
				gint _tmp90_ = 0;
				gchar _tmp91_ = '\0';
				gint _tmp92_ = 0;
				_tmp88_ = rv;
				_tmp89_ = s;
				_tmp89__length1 = s_length1;
				_tmp90_ = i;
				_tmp91_ = _tmp89_[_tmp90_ + 1];
				g_string_append_c (_tmp88_, _tmp91_);
				_tmp92_ = i;
				i = _tmp92_ + 2;
			}
		} else {
			GString* _tmp93_ = NULL;
			gchar* _tmp94_ = NULL;
			gint _tmp94__length1 = 0;
			gint _tmp95_ = 0;
			gchar _tmp96_ = '\0';
			_tmp93_ = rv;
			_tmp94_ = s;
			_tmp94__length1 = s_length1;
			_tmp95_ = i;
			i = _tmp95_ + 1;
			_tmp96_ = _tmp94_[_tmp95_];
			g_string_append_c (_tmp93_, _tmp96_);
		}
	}
	_tmp97_ = rv;
	_tmp98_ = _tmp97_->str;
	_tmp99_ = g_strdup (_tmp98_);
	result = _tmp99_;
	_g_string_free0 (rv);
	return result;
}


static gchar* string_chomp (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strchomp (_tmp1_);
	result = _result_;
	return result;
}


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;
	_tmp0_ = str;
	_tmp1_ = maxlen;
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
	end = _tmp2_;
	_tmp3_ = end;
	if (_tmp3_ == NULL) {
		glong _tmp4_ = 0L;
		_tmp4_ = maxlen;
		result = _tmp4_;
		return result;
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		_tmp5_ = end;
		_tmp6_ = str;
		result = (glong) (_tmp5_ - _tmp6_);
		return result;
	}
}


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;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = offset;
	if (_tmp1_ >= ((glong) 0)) {
		glong _tmp2_ = 0L;
		_tmp2_ = len;
		_tmp0_ = _tmp2_ >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
		_tmp3_ = offset;
		_tmp4_ = len;
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
		string_length = _tmp5_;
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		_tmp6_ = strlen (self);
		_tmp7_ = _tmp6_;
		string_length = (glong) _tmp7_;
	}
	_tmp8_ = offset;
	if (_tmp8_ < ((glong) 0)) {
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
		_tmp9_ = string_length;
		_tmp10_ = offset;
		offset = _tmp9_ + _tmp10_;
		_tmp11_ = offset;
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
		_tmp12_ = offset;
		_tmp13_ = string_length;
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
	}
	_tmp14_ = len;
	if (_tmp14_ < ((glong) 0)) {
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
		_tmp15_ = string_length;
		_tmp16_ = offset;
		len = _tmp15_ - _tmp16_;
	}
	_tmp17_ = offset;
	_tmp18_ = len;
	_tmp19_ = string_length;
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
	_tmp20_ = offset;
	_tmp21_ = len;
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
	result = _tmp22_;
	return result;
}


static void duplicity_instance_split_line (const gchar* line, gchar*** split, int* split_length1) {
	gchar** _vala_split = NULL;
	int _vala_split_length1 = 0;
	gchar** firstsplit = NULL;
	const gchar* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint firstsplit_length1 = 0;
	gint _firstsplit_size_ = 0;
	GList* splitlist = NULL;
	gint i = 0;
	gboolean in_group = FALSE;
	gchar* group_word = NULL;
	gchar* _tmp3_ = NULL;
	GList* _tmp57_ = NULL;
	guint _tmp58_ = 0U;
	gchar** _tmp59_ = NULL;
	GList* _tmp60_ = NULL;
	g_return_if_fail (line != NULL);
	_tmp0_ = line;
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, " ", 0);
	firstsplit = _tmp2_;
	firstsplit_length1 = _vala_array_length (_tmp1_);
	_firstsplit_size_ = firstsplit_length1;
	splitlist = NULL;
	in_group = FALSE;
	_tmp3_ = g_strdup ("");
	group_word = _tmp3_;
	{
		gboolean _tmp4_ = FALSE;
		i = 0;
		_tmp4_ = TRUE;
		while (TRUE) {
			gchar** _tmp6_ = NULL;
			gint _tmp6__length1 = 0;
			gint _tmp7_ = 0;
			const gchar* _tmp8_ = NULL;
			gchar* word = NULL;
			gchar** _tmp9_ = NULL;
			gint _tmp9__length1 = 0;
			gint _tmp10_ = 0;
			const gchar* _tmp11_ = NULL;
			gchar* _tmp12_ = NULL;
			gchar** _tmp13_ = NULL;
			gint _tmp13__length1 = 0;
			gint _tmp14_ = 0;
			const gchar* _tmp15_ = NULL;
			gboolean _tmp18_ = FALSE;
			gboolean _tmp19_ = FALSE;
			gboolean _tmp22_ = FALSE;
			if (!_tmp4_) {
				gint _tmp5_ = 0;
				_tmp5_ = i;
				i = _tmp5_ + 1;
			}
			_tmp4_ = FALSE;
			_tmp6_ = firstsplit;
			_tmp6__length1 = firstsplit_length1;
			_tmp7_ = i;
			_tmp8_ = _tmp6_[_tmp7_];
			if (!(_tmp8_ != NULL)) {
				break;
			}
			_tmp9_ = firstsplit;
			_tmp9__length1 = firstsplit_length1;
			_tmp10_ = i;
			_tmp11_ = _tmp9_[_tmp10_];
			_tmp12_ = g_strdup (_tmp11_);
			word = _tmp12_;
			_tmp13_ = firstsplit;
			_tmp13__length1 = firstsplit_length1;
			_tmp14_ = i;
			_tmp15_ = _tmp13_[_tmp14_ + 1];
			if (_tmp15_ == NULL) {
				const gchar* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				_tmp16_ = word;
				_tmp17_ = string_chomp (_tmp16_);
				_g_free0 (word);
				word = _tmp17_;
			}
			_tmp19_ = in_group;
			if (!_tmp19_) {
				const gchar* _tmp20_ = NULL;
				gboolean _tmp21_ = FALSE;
				_tmp20_ = word;
				_tmp21_ = g_str_has_prefix (_tmp20_, "\'");
				_tmp18_ = _tmp21_;
			} else {
				_tmp18_ = FALSE;
			}
			if (_tmp18_) {
				in_group = TRUE;
			}
			_tmp22_ = in_group;
			if (_tmp22_) {
				gboolean _tmp23_ = FALSE;
				const gchar* _tmp24_ = NULL;
				gboolean _tmp25_ = FALSE;
				const gchar* _tmp38_ = NULL;
				gchar* _tmp39_ = NULL;
				const gchar* _tmp40_ = NULL;
				gboolean _tmp48_ = FALSE;
				_tmp24_ = word;
				_tmp25_ = g_str_has_suffix (_tmp24_, "\'");
				if (_tmp25_) {
					const gchar* _tmp26_ = NULL;
					const gchar* _tmp27_ = NULL;
					gint _tmp28_ = 0;
					gint _tmp29_ = 0;
					gint _tmp30_ = 0;
					_tmp26_ = word;
					_tmp27_ = word;
					_tmp28_ = strlen (_tmp27_);
					_tmp29_ = _tmp28_;
					_tmp30_ = duplicity_instance_num_suffix (_tmp26_, '\\', ((glong) _tmp29_) - 2);
					_tmp23_ = (_tmp30_ % 2) == 0;
				} else {
					_tmp23_ = FALSE;
				}
				if (_tmp23_) {
					in_group = FALSE;
				} else {
					const gchar* _tmp31_ = NULL;
					gint _tmp32_ = 0;
					_tmp31_ = word;
					_tmp32_ = duplicity_instance_num_suffix (_tmp31_, '\\', (glong) -1);
					if ((_tmp32_ % 2) == 1) {
						const gchar* _tmp33_ = NULL;
						const gchar* _tmp34_ = NULL;
						gint _tmp35_ = 0;
						gint _tmp36_ = 0;
						gchar* _tmp37_ = NULL;
						_tmp33_ = word;
						_tmp34_ = word;
						_tmp35_ = strlen (_tmp34_);
						_tmp36_ = _tmp35_;
						_tmp37_ = string_substring (_tmp33_, (glong) 0, (glong) (_tmp36_ - 2));
						_g_free0 (word);
						word = _tmp37_;
					}
				}
				_tmp38_ = word;
				_tmp39_ = duplicity_instance_compress_string (_tmp38_);
				_g_free0 (word);
				word = _tmp39_;
				_tmp40_ = group_word;
				if (g_strcmp0 (_tmp40_, "") == 0) {
					const gchar* _tmp41_ = NULL;
					gchar* _tmp42_ = NULL;
					_tmp41_ = word;
					_tmp42_ = g_strdup (_tmp41_);
					_g_free0 (group_word);
					group_word = _tmp42_;
				} else {
					const gchar* _tmp43_ = NULL;
					const gchar* _tmp44_ = NULL;
					gchar* _tmp45_ = NULL;
					gchar* _tmp46_ = NULL;
					gchar* _tmp47_ = NULL;
					_tmp43_ = group_word;
					_tmp44_ = word;
					_tmp45_ = g_strconcat (" ", _tmp44_, NULL);
					_tmp46_ = _tmp45_;
					_tmp47_ = g_strconcat (_tmp43_, _tmp46_, NULL);
					_g_free0 (group_word);
					group_word = _tmp47_;
					_g_free0 (_tmp46_);
				}
				_tmp48_ = in_group;
				if (!_tmp48_) {
					const gchar* _tmp49_ = NULL;
					const gchar* _tmp50_ = NULL;
					gint _tmp51_ = 0;
					gint _tmp52_ = 0;
					gchar* _tmp53_ = NULL;
					gchar* _tmp54_ = NULL;
					_tmp49_ = group_word;
					_tmp50_ = group_word;
					_tmp51_ = strlen (_tmp50_);
					_tmp52_ = _tmp51_;
					_tmp53_ = string_substring (_tmp49_, (glong) 1, (glong) (_tmp52_ - 2));
					splitlist = g_list_append (splitlist, _tmp53_);
					_tmp54_ = g_strdup ("");
					_g_free0 (group_word);
					group_word = _tmp54_;
				}
			} else {
				const gchar* _tmp55_ = NULL;
				gchar* _tmp56_ = NULL;
				_tmp55_ = word;
				_tmp56_ = g_strdup (_tmp55_);
				splitlist = g_list_append (splitlist, _tmp56_);
			}
			_g_free0 (word);
		}
	}
	_tmp57_ = splitlist;
	_tmp58_ = g_list_length (_tmp57_);
	_tmp59_ = g_new0 (gchar*, _tmp58_ + 1);
	_vala_split = (_vala_array_free (_vala_split, _vala_split_length1, (GDestroyNotify) g_free), NULL);
	_vala_split = _tmp59_;
	_vala_split_length1 = _tmp58_;
	i = 0;
	_tmp60_ = splitlist;
	{
		GList* s_collection = NULL;
		GList* s_it = NULL;
		s_collection = _tmp60_;
		for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
			gchar* _tmp61_ = NULL;
			gchar* s = NULL;
			_tmp61_ = g_strdup ((const gchar*) s_it->data);
			s = _tmp61_;
			{
				gchar** _tmp62_ = NULL;
				gint _tmp62__length1 = 0;
				gint _tmp63_ = 0;
				const gchar* _tmp64_ = NULL;
				gchar* _tmp65_ = NULL;
				gchar* _tmp66_ = NULL;
				_tmp62_ = _vala_split;
				_tmp62__length1 = _vala_split_length1;
				_tmp63_ = i;
				i = _tmp63_ + 1;
				_tmp64_ = s;
				_tmp65_ = g_strdup (_tmp64_);
				_g_free0 (_tmp62_[_tmp63_]);
				_tmp62_[_tmp63_] = _tmp65_;
				_tmp66_ = _tmp62_[_tmp63_];
				_g_free0 (s);
			}
		}
	}
	_g_free0 (group_word);
	__g_list_free__g_free0_0 (splitlist);
	firstsplit = (_vala_array_free (firstsplit, firstsplit_length1, (GDestroyNotify) g_free), NULL);
	if (split) {
		*split = _vala_split;
	} else {
		_vala_split = (_vala_array_free (_vala_split, _vala_split_length1, (GDestroyNotify) g_free), NULL);
	}
	if (split_length1) {
		*split_length1 = _vala_split_length1;
	}
}


static void duplicity_instance_process_stanza (DuplicityInstance* self, GList* stanza) {
	gchar** control_line = NULL;
	gint control_line_length1 = 0;
	gint _control_line_size_ = 0;
	GList* _tmp0_ = NULL;
	gconstpointer _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint _tmp3_ = 0;
	GList* data = NULL;
	GList* _tmp4_ = NULL;
	GList* _tmp5_ = NULL;
	gchar* text = NULL;
	GList* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = stanza;
	_tmp1_ = _tmp0_->data;
	duplicity_instance_split_line ((const gchar*) _tmp1_, &_tmp2_, &_tmp3_);
	control_line = (_vala_array_free (control_line, control_line_length1, (GDestroyNotify) g_free), NULL);
	control_line = _tmp2_;
	control_line_length1 = _tmp3_;
	_control_line_size_ = control_line_length1;
	_tmp4_ = stanza;
	_tmp5_ = duplicity_instance_grab_stanza_data (self, _tmp4_);
	data = _tmp5_;
	_tmp6_ = stanza;
	_tmp7_ = duplicity_instance_grab_stanza_text (self, _tmp6_);
	text = _tmp7_;
	self->priv->processed_a_message = TRUE;
	g_signal_emit_by_name (self, "message", control_line, control_line_length1, data, text);
	_g_free0 (text);
	__g_list_free__g_free0_0 (data);
	control_line = (_vala_array_free (control_line, control_line_length1, (GDestroyNotify) g_free), NULL);
}


static GList* duplicity_instance_grab_stanza_data (DuplicityInstance* self, GList* stanza) {
	GList* result = NULL;
	GList* list = NULL;
	GList* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GList* _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	list = NULL;
	_tmp0_ = stanza;
	_tmp1_ = _tmp0_->next;
	stanza = _tmp1_;
	_tmp2_ = stanza;
	{
		GList* line_collection = NULL;
		GList* line_it = NULL;
		line_collection = _tmp2_;
		for (line_it = line_collection; line_it != NULL; line_it = line_it->next) {
			gchar* _tmp3_ = NULL;
			gchar* line = NULL;
			_tmp3_ = g_strdup ((const gchar*) line_it->data);
			line = _tmp3_;
			{
				const gchar* _tmp4_ = NULL;
				gboolean _tmp5_ = FALSE;
				_tmp4_ = line;
				_tmp5_ = g_str_has_prefix (_tmp4_, ". ");
				if (!_tmp5_) {
					const gchar* _tmp6_ = NULL;
					gchar* _tmp7_ = NULL;
					gchar* _tmp8_ = NULL;
					gchar* _tmp9_ = NULL;
					_tmp6_ = line;
					_tmp7_ = string_chomp (_tmp6_);
					_tmp8_ = _tmp7_;
					_tmp9_ = duplicity_instance_validated_string (_tmp8_);
					list = g_list_append (list, _tmp9_);
					_g_free0 (_tmp8_);
				}
				_g_free0 (line);
			}
		}
	}
	result = list;
	return result;
}


static gchar* duplicity_instance_grab_stanza_text (DuplicityInstance* self, GList* stanza) {
	gchar* result = NULL;
	gchar* text = NULL;
	gchar* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	const gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	text = _tmp0_;
	_tmp1_ = stanza;
	{
		GList* line_collection = NULL;
		GList* line_it = NULL;
		line_collection = _tmp1_;
		for (line_it = line_collection; line_it != NULL; line_it = line_it->next) {
			gchar* _tmp2_ = NULL;
			gchar* line = NULL;
			_tmp2_ = g_strdup ((const gchar*) line_it->data);
			line = _tmp2_;
			{
				const gchar* _tmp3_ = NULL;
				gboolean _tmp4_ = FALSE;
				_tmp3_ = line;
				_tmp4_ = g_str_has_prefix (_tmp3_, ". ");
				if (_tmp4_) {
					gchar** split = NULL;
					const gchar* _tmp5_ = NULL;
					gchar** _tmp6_ = NULL;
					gchar** _tmp7_ = NULL;
					gint split_length1 = 0;
					gint _split_size_ = 0;
					const gchar* _tmp8_ = NULL;
					gchar** _tmp9_ = NULL;
					gint _tmp9__length1 = 0;
					const gchar* _tmp10_ = NULL;
					gchar* _tmp11_ = NULL;
					gchar* _tmp12_ = NULL;
					gchar* _tmp13_ = NULL;
					_tmp5_ = line;
					_tmp7_ = _tmp6_ = g_strsplit (_tmp5_, ". ", 2);
					split = _tmp7_;
					split_length1 = _vala_array_length (_tmp6_);
					_split_size_ = split_length1;
					_tmp8_ = text;
					_tmp9_ = split;
					_tmp9__length1 = split_length1;
					_tmp10_ = _tmp9_[1];
					_tmp11_ = duplicity_instance_validated_string (_tmp10_);
					_tmp12_ = _tmp11_;
					_tmp13_ = g_strdup_printf ("%s%s\n", _tmp8_, _tmp12_);
					_g_free0 (text);
					text = _tmp13_;
					_g_free0 (_tmp12_);
					split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
				}
				_g_free0 (line);
			}
		}
	}
	_tmp14_ = text;
	_tmp15_ = string_chomp (_tmp14_);
	result = _tmp15_;
	_g_free0 (text);
	return result;
}


static void duplicity_instance_spawn_finished (DuplicityInstance* self, GPid pid, gint status) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gboolean _tmp2_ = FALSE;
	GPid _tmp8_ = 0;
	GDataInputStream* _tmp9_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = status;
	self->priv->status = _tmp0_;
	_tmp1_ = status;
	_tmp2_ = WIFEXITED (_tmp1_);
	if (_tmp2_) {
		gint exitval = 0;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		GPid _tmp5_ = 0;
		gint _tmp6_ = 0;
		_tmp3_ = status;
		_tmp4_ = WEXITSTATUS (_tmp3_);
		exitval = _tmp4_;
		_tmp5_ = pid;
		_tmp6_ = exitval;
		g_debug ("DuplicityInstance.vala:570: duplicity (%i) exited with value %i\n", (gint) _tmp5_, _tmp6_);
	} else {
		GPid _tmp7_ = 0;
		_tmp7_ = pid;
		g_debug ("DuplicityInstance.vala:573: duplicity (%i) process killed\n", (gint) _tmp7_);
	}
	self->priv->watch_id = (guint) 0;
	_tmp8_ = pid;
	g_spawn_close_pid (_tmp8_);
	self->priv->process_done = TRUE;
	_tmp9_ = self->priv->reader;
	if (_tmp9_ == NULL) {
		duplicity_instance_send_done_for_status (self);
	}
}


static void duplicity_instance_send_done_for_status (DuplicityInstance* self) {
	gboolean _tmp0_ = FALSE;
	gint _tmp1_ = 0;
	gboolean _tmp2_ = FALSE;
	gboolean success = FALSE;
	gboolean cancelled = FALSE;
	gint _tmp5_ = 0;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gint _tmp9_ = 0;
	gboolean _tmp10_ = FALSE;
	gint _tmp17_ = 0;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp21_ = FALSE;
	gboolean _tmp22_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->status;
	_tmp2_ = WIFEXITED (_tmp1_);
	if (_tmp2_) {
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		_tmp3_ = self->priv->status;
		_tmp4_ = WEXITSTATUS (_tmp3_);
		_tmp0_ = _tmp4_ == 0;
	} else {
		_tmp0_ = FALSE;
	}
	success = _tmp0_;
	_tmp5_ = self->priv->status;
	_tmp6_ = WIFEXITED (_tmp5_);
	cancelled = !_tmp6_;
	_tmp9_ = self->priv->status;
	_tmp10_ = WIFEXITED (_tmp9_);
	if (_tmp10_) {
		gboolean _tmp11_ = FALSE;
		_tmp11_ = self->priv->processed_a_message;
		_tmp8_ = !_tmp11_;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		gboolean _tmp12_ = FALSE;
		gint _tmp13_ = 0;
		gint _tmp14_ = 0;
		_tmp13_ = self->priv->status;
		_tmp14_ = WEXITSTATUS (_tmp13_);
		if (_tmp14_ == 126) {
			_tmp12_ = TRUE;
		} else {
			gint _tmp15_ = 0;
			gint _tmp16_ = 0;
			_tmp15_ = self->priv->status;
			_tmp16_ = WEXITSTATUS (_tmp15_);
			_tmp12_ = _tmp16_ == 127;
		}
		_tmp7_ = _tmp12_;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		cancelled = TRUE;
	}
	_tmp17_ = self->priv->status;
	_tmp18_ = WIFEXITED (_tmp17_);
	if (_tmp18_) {
		gint _tmp19_ = 0;
		gint _tmp20_ = 0;
		_tmp19_ = self->priv->status;
		_tmp20_ = WEXITSTATUS (_tmp19_);
		g_signal_emit_by_name (self, "exited", _tmp20_);
	}
	self->priv->child_pid = (GPid) 0;
	_tmp21_ = success;
	_tmp22_ = cancelled;
	g_signal_emit_by_name (self, "done", _tmp21_, _tmp22_);
}


DuplicityInstance* duplicity_instance_construct (GType object_type) {
	DuplicityInstance * self = NULL;
	self = (DuplicityInstance*) g_object_new (object_type, NULL);
	return self;
}


DuplicityInstance* duplicity_instance_new (void) {
	return duplicity_instance_construct (TYPE_DUPLICITY_INSTANCE);
}


gboolean duplicity_instance_get_verbose (DuplicityInstance* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_verbose;
	result = _tmp0_;
	return result;
}


static void duplicity_instance_set_verbose (DuplicityInstance* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_verbose = _tmp0_;
	g_object_notify ((GObject *) self, "verbose");
}


const gchar* duplicity_instance_get_forced_cache_dir (DuplicityInstance* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_forced_cache_dir;
	result = _tmp0_;
	return result;
}


void duplicity_instance_set_forced_cache_dir (DuplicityInstance* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_forced_cache_dir);
	self->priv->_forced_cache_dir = _tmp1_;
	g_object_notify ((GObject *) self, "forced-cache-dir");
}


static void g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__BOOLEAN_BOOLEAN) (gpointer data1, gboolean arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__BOOLEAN_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__BOOLEAN_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_boolean (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}


static void g_cclosure_user_marshal_VOID__BOXED_INT_POINTER_STRING (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef void (*GMarshalFunc_VOID__BOXED_INT_POINTER_STRING) (gpointer data1, gpointer arg_1, gint arg_2, gpointer arg_3, const char* arg_4, gpointer data2);
	register GMarshalFunc_VOID__BOXED_INT_POINTER_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__BOXED_INT_POINTER_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_boxed (param_values + 1), g_value_get_int (param_values + 2), g_value_get_pointer (param_values + 3), g_value_get_string (param_values + 4), data2);
}


static GObject * duplicity_instance_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	DuplicityInstance * self;
	gint* _tmp0_ = NULL;
	gint* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	parent_class = G_OBJECT_CLASS (duplicity_instance_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DUPLICITY_INSTANCE, DuplicityInstance);
	_tmp0_ = g_new0 (gint, 2);
	self->priv->pipes = (g_free (self->priv->pipes), NULL);
	self->priv->pipes = _tmp0_;
	self->priv->pipes_length1 = 2;
	self->priv->_pipes_size_ = self->priv->pipes_length1;
	_tmp1_ = self->priv->pipes;
	_tmp1__length1 = self->priv->pipes_length1;
	_tmp2_ = self->priv->pipes;
	_tmp2__length1 = self->priv->pipes_length1;
	_tmp2_[1] = -1;
	_tmp3_ = _tmp2_[1];
	_tmp1_[0] = _tmp3_;
	_tmp4_ = _tmp1_[0];
	return obj;
}


static void duplicity_instance_class_init (DuplicityInstanceClass * klass) {
	duplicity_instance_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (DuplicityInstancePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_duplicity_instance_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_duplicity_instance_set_property;
	G_OBJECT_CLASS (klass)->constructor = duplicity_instance_constructor;
	G_OBJECT_CLASS (klass)->finalize = duplicity_instance_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DUPLICITY_INSTANCE_VERBOSE, g_param_spec_boolean ("verbose", "verbose", "verbose", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DUPLICITY_INSTANCE_FORCED_CACHE_DIR, g_param_spec_string ("forced-cache-dir", "forced-cache-dir", "forced-cache-dir", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_signal_new ("done", TYPE_DUPLICITY_INSTANCE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOOLEAN_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
	g_signal_new ("exited", TYPE_DUPLICITY_INSTANCE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
	g_signal_new ("message", TYPE_DUPLICITY_INSTANCE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__BOXED_INT_POINTER_STRING, G_TYPE_NONE, 4, G_TYPE_STRV, G_TYPE_INT, G_TYPE_POINTER, G_TYPE_STRING);
}


static void duplicity_instance_instance_init (DuplicityInstance * self) {
	self->priv = DUPLICITY_INSTANCE_GET_PRIVATE (self);
	self->priv->_verbose = FALSE;
	self->priv->_forced_cache_dir = NULL;
}


static void duplicity_instance_finalize (GObject* obj) {
	DuplicityInstance * self;
	guint _tmp0_ = 0U;
	gboolean _tmp2_ = FALSE;
	GError * _inner_error_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DUPLICITY_INSTANCE, DuplicityInstance);
	_tmp0_ = self->priv->watch_id;
	if (_tmp0_ != ((guint) 0)) {
		guint _tmp1_ = 0U;
		_tmp1_ = self->priv->watch_id;
		g_source_remove (_tmp1_);
	}
	_tmp2_ = duplicity_instance_is_started (self);
	if (_tmp2_) {
		GPid _tmp3_ = 0;
		_tmp3_ = self->priv->child_pid;
		g_debug ("DuplicityInstance.vala:253: duplicity (%i) process killed\n", (gint) _tmp3_);
		duplicity_instance_kill_child (self);
	}
	{
		GFile* _tmp4_ = NULL;
		_tmp4_ = self->priv->scriptfile;
		if (_tmp4_ != NULL) {
			GFile* _tmp5_ = NULL;
			_tmp5_ = self->priv->scriptfile;
			g_file_delete (_tmp5_, NULL, &_inner_error_);
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				goto __catch0_g_error;
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_warning ("DuplicityInstance.vala:261: %s\n", _tmp7_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		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);
		g_clear_error (&_inner_error_);
	}
	_g_free0 (self->priv->_forced_cache_dir);
	self->priv->pipes = (g_free (self->priv->pipes), NULL);
	_g_object_unref0 (self->priv->reader);
	_g_object_unref0 (self->priv->logfile);
	_g_object_unref0 (self->priv->scriptfile);
	G_OBJECT_CLASS (duplicity_instance_parent_class)->finalize (obj);
}


GType duplicity_instance_get_type (void) {
	return duplicity_instance_type_id;
}


GType duplicity_instance_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (DuplicityInstanceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) duplicity_instance_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DuplicityInstance), 0, (GInstanceInitFunc) duplicity_instance_instance_init, NULL };
	duplicity_instance_type_id = g_type_module_register_type (module, G_TYPE_OBJECT, "DuplicityInstance", &g_define_type_info, 0);
	return duplicity_instance_type_id;
}


static void _vala_duplicity_instance_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	DuplicityInstance * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DUPLICITY_INSTANCE, DuplicityInstance);
	switch (property_id) {
		case DUPLICITY_INSTANCE_VERBOSE:
		g_value_set_boolean (value, duplicity_instance_get_verbose (self));
		break;
		case DUPLICITY_INSTANCE_FORCED_CACHE_DIR:
		g_value_set_string (value, duplicity_instance_get_forced_cache_dir (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_duplicity_instance_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	DuplicityInstance * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_DUPLICITY_INSTANCE, DuplicityInstance);
	switch (property_id) {
		case DUPLICITY_INSTANCE_VERBOSE:
		duplicity_instance_set_verbose (self, g_value_get_boolean (value));
		break;
		case DUPLICITY_INSTANCE_FORCED_CACHE_DIR:
		duplicity_instance_set_forced_cache_dir (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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;
}



