/* archive-writer.c generated by valac 0.30.0.37-86f3c, the Vala compiler
 * generated from archive-writer.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/
/* A non-threadsafe wrapper for libarchives write archive*/

#include <glib.h>
#include <glib-object.h>
#include <archive.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <libcommon.h>
#include <archive_entry.h>
#include <glib/gstdio.h>
#include <stdio.h>
#include <sys/stat.h>


#define BOXES_TYPE_ARCHIVE_WRITER (boxes_archive_writer_get_type ())
#define BOXES_ARCHIVE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriter))
#define BOXES_ARCHIVE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriterClass))
#define BOXES_IS_ARCHIVE_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ARCHIVE_WRITER))
#define BOXES_IS_ARCHIVE_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_ARCHIVE_WRITER))
#define BOXES_ARCHIVE_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriterClass))

typedef struct _BoxesArchiveWriter BoxesArchiveWriter;
typedef struct _BoxesArchiveWriterClass BoxesArchiveWriterClass;
typedef struct _BoxesArchiveWriterPrivate BoxesArchiveWriterPrivate;
#define _archive_write_finish0(var) ((var == NULL) ? NULL : (var = (archive_write_finish (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block15Data Block15Data;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_ARCHIVE_READER (boxes_archive_reader_get_type ())
#define BOXES_ARCHIVE_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_ARCHIVE_READER, BoxesArchiveReader))
#define BOXES_ARCHIVE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_ARCHIVE_READER, BoxesArchiveReaderClass))
#define BOXES_IS_ARCHIVE_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_ARCHIVE_READER))
#define BOXES_IS_ARCHIVE_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_ARCHIVE_READER))
#define BOXES_ARCHIVE_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_ARCHIVE_READER, BoxesArchiveReaderClass))

typedef struct _BoxesArchiveReader BoxesArchiveReader;
typedef struct _BoxesArchiveReaderClass BoxesArchiveReaderClass;
typedef struct _Block16Data Block16Data;
typedef struct _BoxesArchiveReaderPrivate BoxesArchiveReaderPrivate;
typedef struct _Block17Data Block17Data;
typedef struct _Block18Data Block18Data;
#define _archive_entry_free0(var) ((var == NULL) ? NULL : (var = (archive_entry_free (var), NULL)))
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
typedef struct _Block19Data Block19Data;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _BoxesArchiveWriter {
	GObject parent_instance;
	BoxesArchiveWriterPrivate * priv;
	struct archive* archive;
};

struct _BoxesArchiveWriterClass {
	GObjectClass parent_class;
};

struct _BoxesArchiveWriterPrivate {
	GList* filters;
	int format;
};

struct _Block15Data {
	int _ref_count_;
	BoxesArchiveWriter* self;
	gchar* filename;
};

struct _Block16Data {
	int _ref_count_;
	BoxesArchiveWriter* self;
	gchar* filename;
};

struct _BoxesArchiveReader {
	GObject parent_instance;
	BoxesArchiveReaderPrivate * priv;
	struct archive* archive;
};

struct _BoxesArchiveReaderClass {
	GObjectClass parent_class;
};

struct _Block17Data {
	int _ref_count_;
	BoxesArchiveWriter* self;
	struct archive_entry* iterator;
};

struct _Block18Data {
	int _ref_count_;
	BoxesArchiveWriter* self;
	struct archive_entry* entry;
};

struct _Block19Data {
	int _ref_count_;
	BoxesArchiveWriter* self;
	int filter;
};


static gpointer boxes_archive_writer_parent_class = NULL;

GType boxes_archive_writer_get_type (void) G_GNUC_CONST;
#define BOXES_ARCHIVE_WRITER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriterPrivate))
enum  {
	BOXES_ARCHIVE_WRITER_DUMMY_PROPERTY
};
BoxesArchiveWriter* boxes_archive_writer_new (const gchar* filename, int format, GList* filters, GError** error);
BoxesArchiveWriter* boxes_archive_writer_construct (GType object_type, const gchar* filename, int format, GList* filters, GError** error);
static Block15Data* block15_data_ref (Block15Data* _data15_);
static void block15_data_unref (void * _userdata_);
static void boxes_archive_writer_prepare_archive (BoxesArchiveWriter* self, GError** error);
static int __lambda129_ (Block15Data* _data15_);
static int ___lambda129__boxes_libarchive_function (gpointer self);
GType boxes_archive_reader_get_type (void) G_GNUC_CONST;
BoxesArchiveWriter* boxes_archive_writer_new_from_archive_reader (BoxesArchiveReader* archive_reader, const gchar* filename, gboolean import_contents, GError** error);
BoxesArchiveWriter* boxes_archive_writer_construct_from_archive_reader (GType object_type, BoxesArchiveReader* archive_reader, const gchar* filename, gboolean import_contents, GError** error);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
static void boxes_archive_writer_copy_filters_from_read_archive (BoxesArchiveWriter* self, struct archive* read_archive);
static int __lambda130_ (Block16Data* _data16_);
static int ___lambda130__boxes_libarchive_function (gpointer self);
void boxes_archive_reader_reset (BoxesArchiveReader* self, GError** error);
void boxes_archive_writer_import_read_archive (BoxesArchiveWriter* self, BoxesArchiveReader* archive_reader, gchar** omit_files, int omit_files_length1, gboolean omit_hardlinked_files, GError** error);
static Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_data_unref (void * _userdata_);
static int ___lambda131_ (Block17Data* _data17_);
static int ____lambda131__boxes_libarchive_function (gpointer self);
static void boxes_archive_writer_insert_data (BoxesArchiveWriter* self, void* data, gint64 len, GError** error);
void boxes_archive_writer_insert_files (BoxesArchiveWriter* self, gchar** src_list, int src_list_length1, gchar** dest_list, int dest_list_length1, GError** error);
void boxes_archive_writer_insert_file (BoxesArchiveWriter* self, const gchar* src, const gchar* dest, GError** error);
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
static struct archive_entry* boxes_archive_writer_get_entry_for_file (BoxesArchiveWriter* self, const gchar* filename, const gchar* dest_name);
static int __lambda132_ (Block18Data* _data18_);
static int ___lambda132__boxes_libarchive_function (gpointer self);
static int __lambda127_ (BoxesArchiveWriter* self);
static int ___lambda127__boxes_libarchive_function (gpointer self);
static Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
static int _____lambda128_ (Block19Data* _data19_);
static int ______lambda128__boxes_libarchive_function (gpointer self);
static void boxes_archive_writer_finalize (GObject* obj);


static Block15Data* block15_data_ref (Block15Data* _data15_) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_atomic_int_inc (&_data15_->_ref_count_);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return _data15_;
#line 164 "archive-writer.c"
}


static void block15_data_unref (void * _userdata_) {
	Block15Data* _data15_;
	_data15_ = (Block15Data*) _userdata_;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (g_atomic_int_dec_and_test (&_data15_->_ref_count_)) {
#line 173 "archive-writer.c"
		BoxesArchiveWriter* self;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		self = _data15_->self;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_free0 (_data15_->filename);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_object_unref0 (self);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		g_slice_free (Block15Data, _data15_);
#line 183 "archive-writer.c"
	}
}


static int __lambda129_ (Block15Data* _data15_) {
	BoxesArchiveWriter* self;
	int result = 0;
	struct archive* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	int _tmp2_ = 0;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = _data15_->self;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = _data15_->filename;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_open_filename (_tmp0_, _tmp1_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _tmp2_;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 206 "archive-writer.c"
}


static int ___lambda129__boxes_libarchive_function (gpointer self) {
	int result;
	result = __lambda129_ (self);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 215 "archive-writer.c"
}


BoxesArchiveWriter* boxes_archive_writer_construct (GType object_type, const gchar* filename, int format, GList* filters, GError** error) {
	BoxesArchiveWriter * self = NULL;
	Block15Data* _data15_;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	struct archive* _tmp2_ = NULL;
	int _tmp3_ = 0;
	GList* _tmp4_ = NULL;
	GList* _tmp5_ = NULL;
	struct archive* _tmp6_ = NULL;
	GError * _inner_error_ = NULL;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data15_ = g_slice_new0 (Block15Data);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data15_->_ref_count_ = 1;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = filename;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_g_free0 (_data15_->filename);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data15_->filename = _tmp1_;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = (BoxesArchiveWriter*) g_object_new (object_type, NULL);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data15_->self = g_object_ref (self);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_new ();
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_archive_write_finish0 (self->archive);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->archive = _tmp2_;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp3_ = format;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->priv->format = _tmp3_;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp4_ = filters;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp5_ = g_list_copy (_tmp4_);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_g_list_free0 (self->priv->filters);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->priv->filters = _tmp5_;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_writer_prepare_archive (self, &_inner_error_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block15_data_unref (_data15_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data15_ = NULL;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 282 "archive-writer.c"
		} else {
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block15_data_unref (_data15_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data15_ = NULL;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 294 "archive-writer.c"
		}
	}
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp6_ = self->archive;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_execute_libarchive_function (_tmp6_, ___lambda129__boxes_libarchive_function, _data15_, (guint) 1, &_inner_error_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block15_data_unref (_data15_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data15_ = NULL;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 315 "archive-writer.c"
		} else {
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block15_data_unref (_data15_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data15_ = NULL;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 327 "archive-writer.c"
		}
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	block15_data_unref (_data15_);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data15_ = NULL;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return self;
#line 336 "archive-writer.c"
}


BoxesArchiveWriter* boxes_archive_writer_new (const gchar* filename, int format, GList* filters, GError** error) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return boxes_archive_writer_construct (BOXES_TYPE_ARCHIVE_WRITER, filename, format, filters, error);
#line 343 "archive-writer.c"
}


static Block16Data* block16_data_ref (Block16Data* _data16_) {
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_atomic_int_inc (&_data16_->_ref_count_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return _data16_;
#line 352 "archive-writer.c"
}


static void block16_data_unref (void * _userdata_) {
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
#line 361 "archive-writer.c"
		BoxesArchiveWriter* self;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		self = _data16_->self;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_free0 (_data16_->filename);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_object_unref0 (self);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		g_slice_free (Block16Data, _data16_);
#line 371 "archive-writer.c"
	}
}


static int __lambda130_ (Block16Data* _data16_) {
	BoxesArchiveWriter* self;
	int result = 0;
	struct archive* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	int _tmp2_ = 0;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = _data16_->self;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = _data16_->filename;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_open_filename (_tmp0_, _tmp1_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _tmp2_;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 394 "archive-writer.c"
}


static int ___lambda130__boxes_libarchive_function (gpointer self) {
	int result;
	result = __lambda130_ (self);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 403 "archive-writer.c"
}


BoxesArchiveWriter* boxes_archive_writer_construct_from_archive_reader (GType object_type, BoxesArchiveReader* archive_reader, const gchar* filename, gboolean import_contents, GError** error) {
	BoxesArchiveWriter * self = NULL;
	Block16Data* _data16_;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	struct archive_entry* iterator = NULL;
	struct archive* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	BoxesArchiveReader* _tmp4_ = NULL;
	struct archive* _tmp5_ = NULL;
	struct archive_entry* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	BoxesArchiveReader* _tmp12_ = NULL;
	struct archive* _tmp13_ = NULL;
	int _tmp14_ = 0;
	BoxesArchiveReader* _tmp15_ = NULL;
	struct archive* _tmp16_ = NULL;
	struct archive* _tmp17_ = NULL;
	BoxesArchiveReader* _tmp18_ = NULL;
	gboolean _tmp19_ = FALSE;
	GError * _inner_error_ = NULL;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_val_if_fail (archive_reader != NULL, NULL);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data16_ = g_slice_new0 (Block16Data);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data16_->_ref_count_ = 1;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = filename;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_g_free0 (_data16_->filename);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data16_->filename = _tmp1_;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = (BoxesArchiveWriter*) g_object_new (object_type, NULL);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data16_->self = g_object_ref (self);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_new ();
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_archive_write_finish0 (self->archive);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->archive = _tmp2_;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp4_ = archive_reader;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp5_ = _tmp4_->archive;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp7_ = boxes_get_next_header (_tmp5_, &_tmp6_, (guint) 1, &_inner_error_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	iterator = _tmp6_;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp3_ = _tmp7_;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 478 "archive-writer.c"
		} else {
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 490 "archive-writer.c"
		}
	}
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (!_tmp3_) {
#line 495 "archive-writer.c"
		gchar* msg = NULL;
		gchar* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		GError* _tmp11_ = NULL;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp8_ = g_strdup ("Error creating write archive for archive '%s'. It is probably empty.");
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		msg = _tmp8_;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp9_ = msg;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp10_ = _data16_->filename;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp11_ = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, _tmp9_, _tmp10_);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_inner_error_ = _tmp11_;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_free0 (msg);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 527 "archive-writer.c"
		} else {
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_free0 (msg);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 541 "archive-writer.c"
		}
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_free0 (msg);
#line 545 "archive-writer.c"
	}
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp12_ = archive_reader;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp13_ = _tmp12_->archive;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp14_ = archive_format (_tmp13_);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->priv->format = _tmp14_;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp15_ = archive_reader;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp16_ = _tmp15_->archive;
#line 34 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_writer_copy_filters_from_read_archive (self, _tmp16_);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_writer_prepare_archive (self, &_inner_error_);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 577 "archive-writer.c"
		} else {
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 589 "archive-writer.c"
		}
	}
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp17_ = self->archive;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_execute_libarchive_function (_tmp17_, ___lambda130__boxes_libarchive_function, _data16_, (guint) 1, &_inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 610 "archive-writer.c"
		} else {
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 36 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 622 "archive-writer.c"
		}
	}
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp18_ = archive_reader;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_reader_reset (_tmp18_, &_inner_error_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_g_object_unref0 (self);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 643 "archive-writer.c"
		} else {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block16_data_unref (_data16_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data16_ = NULL;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return NULL;
#line 655 "archive-writer.c"
		}
	}
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp19_ = import_contents;
#line 40 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (_tmp19_) {
#line 662 "archive-writer.c"
		BoxesArchiveReader* _tmp20_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp20_ = archive_reader;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		boxes_archive_writer_import_read_archive (self, _tmp20_, NULL, 0, FALSE, &_inner_error_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (_inner_error_->domain == G_IO_ERROR) {
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_propagate_error (error, _inner_error_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				block16_data_unref (_data16_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_data16_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_g_object_unref0 (self);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				return NULL;
#line 682 "archive-writer.c"
			} else {
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				block16_data_unref (_data16_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_data16_ = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_clear_error (&_inner_error_);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				return NULL;
#line 694 "archive-writer.c"
			}
		}
	}
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	block16_data_unref (_data16_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data16_ = NULL;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return self;
#line 704 "archive-writer.c"
}


BoxesArchiveWriter* boxes_archive_writer_new_from_archive_reader (BoxesArchiveReader* archive_reader, const gchar* filename, gboolean import_contents, GError** error) {
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return boxes_archive_writer_construct_from_archive_reader (BOXES_TYPE_ARCHIVE_WRITER, archive_reader, filename, import_contents, error);
#line 711 "archive-writer.c"
}


static Block17Data* block17_data_ref (Block17Data* _data17_) {
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_atomic_int_inc (&_data17_->_ref_count_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return _data17_;
#line 720 "archive-writer.c"
}


static void block17_data_unref (void * _userdata_) {
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
#line 729 "archive-writer.c"
		BoxesArchiveWriter* self;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		self = _data17_->self;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_object_unref0 (self);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		g_slice_free (Block17Data, _data17_);
#line 737 "archive-writer.c"
	}
}


static int ___lambda131_ (Block17Data* _data17_) {
	BoxesArchiveWriter* self;
	int result = 0;
	struct archive* _tmp0_ = NULL;
	struct archive_entry* _tmp1_ = NULL;
	int _tmp2_ = 0;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = _data17_->self;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = _data17_->iterator;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_header (_tmp0_, _tmp1_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _tmp2_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 760 "archive-writer.c"
}


static int ____lambda131__boxes_libarchive_function (gpointer self) {
	int result;
	result = ___lambda131_ (self);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 769 "archive-writer.c"
}


void boxes_archive_writer_import_read_archive (BoxesArchiveWriter* self, BoxesArchiveReader* archive_reader, gchar** omit_files, int omit_files_length1, gboolean omit_hardlinked_files, GError** error) {
	Block17Data* _data17_;
	BoxesArchiveReader* _tmp32_ = NULL;
	GError * _inner_error_ = NULL;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (self != NULL);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (archive_reader != NULL);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data17_ = g_slice_new0 (Block17Data);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data17_->_ref_count_ = 1;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data17_->self = g_object_ref (self);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	while (TRUE) {
#line 789 "archive-writer.c"
		gboolean _tmp0_ = FALSE;
		BoxesArchiveReader* _tmp1_ = NULL;
		struct archive* _tmp2_ = NULL;
		struct archive_entry* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
		gboolean omit = FALSE;
		gchar** _tmp5_ = NULL;
		gint _tmp5__length1 = 0;
		gboolean _tmp10_ = FALSE;
		gint64 len = 0LL;
		struct archive_entry* _tmp20_ = NULL;
		gint64 _tmp21_ = 0LL;
		struct archive* _tmp22_ = NULL;
		gint64 _tmp23_ = 0LL;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp1_ = archive_reader;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp2_ = _tmp1_->archive;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp4_ = boxes_get_next_header (_tmp2_, &_tmp3_, (guint) 1, &_inner_error_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_data17_->iterator = _tmp3_;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp0_ = _tmp4_;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (_inner_error_->domain == G_IO_ERROR) {
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_propagate_error (error, _inner_error_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				block17_data_unref (_data17_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_data17_ = NULL;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				return;
#line 826 "archive-writer.c"
			} else {
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				block17_data_unref (_data17_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_data17_ = NULL;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_clear_error (&_inner_error_);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				return;
#line 838 "archive-writer.c"
			}
		}
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (!_tmp0_) {
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			break;
#line 845 "archive-writer.c"
		}
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		omit = FALSE;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp5_ = omit_files;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp5__length1 = omit_files_length1;
#line 853 "archive-writer.c"
		{
			gchar** file_collection = NULL;
			gint file_collection_length1 = 0;
			gint _file_collection_size_ = 0;
			gint file_it = 0;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			file_collection = _tmp5_;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			file_collection_length1 = _tmp5__length1;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			for (file_it = 0; file_it < _tmp5__length1; file_it = file_it + 1) {
#line 865 "archive-writer.c"
				gchar* _tmp6_ = NULL;
				gchar* file = NULL;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp6_ = g_strdup (file_collection[file_it]);
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				file = _tmp6_;
#line 872 "archive-writer.c"
				{
					const gchar* _tmp7_ = NULL;
					struct archive_entry* _tmp8_ = NULL;
					const gchar* _tmp9_ = NULL;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_tmp7_ = file;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_tmp8_ = _data17_->iterator;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_tmp9_ = archive_entry_pathname (_tmp8_);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					if (g_strcmp0 (_tmp7_, _tmp9_) == 0) {
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						omit = TRUE;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						_g_free0 (file);
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						break;
#line 891 "archive-writer.c"
					}
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_g_free0 (file);
#line 895 "archive-writer.c"
				}
			}
		}
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp10_ = omit;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_tmp10_) {
#line 903 "archive-writer.c"
			gboolean _tmp11_ = FALSE;
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp13_ = omit_hardlinked_files;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (_tmp13_) {
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp12_ = TRUE;
#line 913 "archive-writer.c"
			} else {
				struct archive_entry* _tmp14_ = NULL;
				guint _tmp15_ = 0U;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp14_ = _data17_->iterator;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp15_ = archive_entry_nlink (_tmp14_);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp12_ = _tmp15_ == ((guint) 1);
#line 923 "archive-writer.c"
			}
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (_tmp12_) {
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp11_ = TRUE;
#line 929 "archive-writer.c"
			} else {
				struct archive_entry* _tmp16_ = NULL;
				const gchar* _tmp17_ = NULL;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp16_ = _data17_->iterator;
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp17_ = archive_entry_hardlink (_tmp16_);
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp11_ = _tmp17_ != NULL;
#line 939 "archive-writer.c"
			}
#line 63 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (_tmp11_) {
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				continue;
#line 945 "archive-writer.c"
			} else {
				struct archive_entry* _tmp18_ = NULL;
				const gchar* _tmp19_ = NULL;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp18_ = _data17_->iterator;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp19_ = archive_entry_pathname (_tmp18_);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_warning ("archive-writer.vala:68: File '%s' cannot be omitted since a hardlink p" \
"oints to it.", _tmp19_);
#line 955 "archive-writer.c"
			}
		}
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp20_ = _data17_->iterator;
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp21_ = archive_entry_size (_tmp20_);
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		len = _tmp21_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp22_ = self->archive;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		boxes_execute_libarchive_function (_tmp22_, ____lambda131__boxes_libarchive_function, _data17_, (guint) 1, &_inner_error_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (_inner_error_->domain == G_IO_ERROR) {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_propagate_error (error, _inner_error_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				block17_data_unref (_data17_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_data17_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				return;
#line 980 "archive-writer.c"
			} else {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				block17_data_unref (_data17_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_data17_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				g_clear_error (&_inner_error_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				return;
#line 992 "archive-writer.c"
			}
		}
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp23_ = len;
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_tmp23_ > ((gint64) 0)) {
#line 999 "archive-writer.c"
			guint8* buf = NULL;
			gint64 _tmp24_ = 0LL;
			guint8* _tmp25_ = NULL;
			gint buf_length1 = 0;
			gint _buf_size_ = 0;
			guint8* _tmp26_ = NULL;
			gint _tmp26__length1 = 0;
			BoxesArchiveReader* _tmp27_ = NULL;
			struct archive* _tmp28_ = NULL;
			guint8* _tmp29_ = NULL;
			gint _tmp29__length1 = 0;
			gint64 _tmp30_ = 0LL;
			gssize _tmp31_ = 0L;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp24_ = len;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp25_ = g_new0 (guint8, _tmp24_);
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf = _tmp25_;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf_length1 = _tmp24_;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_buf_size_ = buf_length1;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp26_ = buf;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp26__length1 = buf_length1;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp27_ = archive_reader;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp28_ = _tmp27_->archive;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp29_ = buf;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp29__length1 = buf_length1;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp30_ = len;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp31_ = archive_read_data (_tmp28_, _tmp29_, (gsize) _tmp30_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			boxes_archive_writer_insert_data (self, _tmp26_, (gint64) _tmp31_, &_inner_error_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				if (_inner_error_->domain == G_IO_ERROR) {
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					g_propagate_error (error, _inner_error_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					buf = (g_free (buf), NULL);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					block17_data_unref (_data17_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data17_ = NULL;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					return;
#line 1055 "archive-writer.c"
				} else {
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					buf = (g_free (buf), NULL);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					block17_data_unref (_data17_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data17_ = NULL;
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					g_clear_error (&_inner_error_);
#line 75 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					return;
#line 1069 "archive-writer.c"
				}
			}
#line 73 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf = (g_free (buf), NULL);
#line 1074 "archive-writer.c"
		}
	}
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp32_ = archive_reader;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_reader_reset (_tmp32_, &_inner_error_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block17_data_unref (_data17_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data17_ = NULL;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1093 "archive-writer.c"
		} else {
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block17_data_unref (_data17_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data17_ = NULL;
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 79 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1105 "archive-writer.c"
		}
	}
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	block17_data_unref (_data17_);
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data17_ = NULL;
#line 1112 "archive-writer.c"
}


void boxes_archive_writer_insert_files (BoxesArchiveWriter* self, gchar** src_list, int src_list_length1, gchar** dest_list, int dest_list_length1, GError** error) {
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	GError * _inner_error_ = NULL;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (self != NULL);
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = src_list;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0__length1 = src_list_length1;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = dest_list;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1__length1 = dest_list_length1;
#line 83 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_vala_return_if_fail (_tmp0__length1 == _tmp1__length1, "src_list.length == dest_list.length");
#line 1134 "archive-writer.c"
	{
		guint i = 0U;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		i = (guint) 0;
#line 1139 "archive-writer.c"
		{
			gboolean _tmp2_ = FALSE;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp2_ = TRUE;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			while (TRUE) {
#line 1146 "archive-writer.c"
				guint _tmp4_ = 0U;
				gchar** _tmp5_ = NULL;
				gint _tmp5__length1 = 0;
				gchar** _tmp6_ = NULL;
				gint _tmp6__length1 = 0;
				guint _tmp7_ = 0U;
				const gchar* _tmp8_ = NULL;
				gchar** _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				guint _tmp10_ = 0U;
				const gchar* _tmp11_ = NULL;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				if (!_tmp2_) {
#line 1160 "archive-writer.c"
					guint _tmp3_ = 0U;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_tmp3_ = i;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					i = _tmp3_ + 1;
#line 1166 "archive-writer.c"
				}
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp2_ = FALSE;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp4_ = i;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp5_ = src_list;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp5__length1 = src_list_length1;
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				if (!(_tmp4_ < ((guint) _tmp5__length1))) {
#line 87 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					break;
#line 1180 "archive-writer.c"
				}
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp6_ = src_list;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp6__length1 = src_list_length1;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp7_ = i;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp8_ = _tmp6_[_tmp7_];
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp9_ = dest_list;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp9__length1 = dest_list_length1;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp10_ = i;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp11_ = _tmp9_[_tmp10_];
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				boxes_archive_writer_insert_file (self, _tmp8_, _tmp11_, &_inner_error_);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					if (_inner_error_->domain == G_IO_ERROR) {
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						g_propagate_error (error, _inner_error_);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						return;
#line 1208 "archive-writer.c"
					} else {
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						g_clear_error (&_inner_error_);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						return;
#line 1216 "archive-writer.c"
					}
				}
			}
		}
	}
}


static Block18Data* block18_data_ref (Block18Data* _data18_) {
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_atomic_int_inc (&_data18_->_ref_count_);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return _data18_;
#line 1230 "archive-writer.c"
}


static void block18_data_unref (void * _userdata_) {
	Block18Data* _data18_;
	_data18_ = (Block18Data*) _userdata_;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (g_atomic_int_dec_and_test (&_data18_->_ref_count_)) {
#line 1239 "archive-writer.c"
		BoxesArchiveWriter* self;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		self = _data18_->self;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_archive_entry_free0 (_data18_->entry);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_object_unref0 (self);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		g_slice_free (Block18Data, _data18_);
#line 1249 "archive-writer.c"
	}
}


static int __lambda132_ (Block18Data* _data18_) {
	BoxesArchiveWriter* self;
	int result = 0;
	struct archive* _tmp0_ = NULL;
	struct archive_entry* _tmp1_ = NULL;
	int _tmp2_ = 0;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = _data18_->self;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = _data18_->entry;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_header (_tmp0_, _tmp1_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _tmp2_;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1272 "archive-writer.c"
}


static int ___lambda132__boxes_libarchive_function (gpointer self) {
	int result;
	result = __lambda132_ (self);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1281 "archive-writer.c"
}


void boxes_archive_writer_insert_file (BoxesArchiveWriter* self, const gchar* src, const gchar* dest, GError** error) {
	Block18Data* _data18_;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	struct archive_entry* _tmp9_ = NULL;
	gint64 len = 0LL;
	struct archive_entry* _tmp10_ = NULL;
	gint64 _tmp11_ = 0LL;
	guint8* buf = NULL;
	gint64 _tmp12_ = 0LL;
	guint8* _tmp13_ = NULL;
	gint buf_length1 = 0;
	gint _buf_size_ = 0;
	FILE* filestream = NULL;
	const gchar* _tmp14_ = NULL;
	FILE* _tmp15_ = NULL;
	FILE* _tmp16_ = NULL;
	guint8* _tmp17_ = NULL;
	gint _tmp17__length1 = 0;
	gint64 _tmp18_ = 0LL;
	struct archive* _tmp19_ = NULL;
	guint8* _tmp20_ = NULL;
	gint _tmp20__length1 = 0;
	gint64 _tmp21_ = 0LL;
	GError * _inner_error_ = NULL;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (self != NULL);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (src != NULL);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (dest != NULL);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data18_ = g_slice_new0 (Block18Data);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data18_->_ref_count_ = 1;
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data18_->self = g_object_ref (self);
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = src;
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = g_file_test (_tmp0_, G_FILE_TEST_EXISTS);
#line 93 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (!_tmp1_) {
#line 1332 "archive-writer.c"
		const gchar* _tmp2_ = NULL;
		GError* _tmp3_ = NULL;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp2_ = src;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp3_ = g_error_new (G_IO_ERROR, G_IO_ERROR_NOT_FOUND, "Source file '%s' cannot be injected. File not found.", _tmp2_);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_inner_error_ = _tmp3_;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1351 "archive-writer.c"
		} else {
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 94 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1363 "archive-writer.c"
		}
	}
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp4_ = src;
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp5_ = g_file_test (_tmp4_, G_FILE_TEST_IS_SYMLINK);
#line 96 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (_tmp5_) {
#line 1372 "archive-writer.c"
		GError* _tmp6_ = NULL;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp6_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Inserting symlinks is currently not supported.");
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_inner_error_ = _tmp6_;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1388 "archive-writer.c"
		} else {
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 97 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1400 "archive-writer.c"
		}
	}
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp7_ = src;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp8_ = dest;
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp9_ = boxes_archive_writer_get_entry_for_file (self, _tmp7_, _tmp8_);
#line 99 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data18_->entry = _tmp9_;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp10_ = _data18_->entry;
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp11_ = archive_entry_size (_tmp10_);
#line 100 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	len = _tmp11_;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp12_ = len;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp13_ = g_new0 (guint8, _tmp12_);
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	buf = _tmp13_;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	buf_length1 = _tmp12_;
#line 101 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_buf_size_ = buf_length1;
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp14_ = src;
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp15_ = g_fopen (_tmp14_, "r");
#line 104 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	filestream = _tmp15_;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp16_ = filestream;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp17_ = buf;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp17__length1 = buf_length1;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp18_ = len;
#line 105 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	fread ((guint8*) _tmp17_, (gsize) _tmp18_, (_tmp17__length1 * sizeof (guint8)) / sizeof (guint8), _tmp16_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp19_ = self->archive;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_execute_libarchive_function (_tmp19_, ___lambda132__boxes_libarchive_function, _data18_, (guint) 1, &_inner_error_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_fclose0 (filestream);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf = (g_free (buf), NULL);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1463 "archive-writer.c"
		} else {
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_fclose0 (filestream);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf = (g_free (buf), NULL);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 106 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1479 "archive-writer.c"
		}
	}
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp20_ = buf;
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp20__length1 = buf_length1;
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp21_ = len;
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_writer_insert_data (self, (guint8*) _tmp20_, _tmp21_, &_inner_error_);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_fclose0 (filestream);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf = (g_free (buf), NULL);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1506 "archive-writer.c"
		} else {
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_fclose0 (filestream);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			buf = (g_free (buf), NULL);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			block18_data_unref (_data18_);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_data18_ = NULL;
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 107 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1522 "archive-writer.c"
		}
	}
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_fclose0 (filestream);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	buf = (g_free (buf), NULL);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	block18_data_unref (_data18_);
#line 92 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_data18_ = NULL;
#line 1533 "archive-writer.c"
}


static int __lambda127_ (BoxesArchiveWriter* self) {
	int result = 0;
	struct archive* _tmp0_ = NULL;
	int _tmp1_ = 0;
	int _tmp2_ = 0;
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = self->priv->format;
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_set_format (_tmp0_, _tmp1_);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _tmp2_;
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1552 "archive-writer.c"
}


static int ___lambda127__boxes_libarchive_function (gpointer self) {
	int result;
	result = __lambda127_ ((BoxesArchiveWriter*) self);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1561 "archive-writer.c"
}


static Block19Data* block19_data_ref (Block19Data* _data19_) {
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_atomic_int_inc (&_data19_->_ref_count_);
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return _data19_;
#line 1570 "archive-writer.c"
}


static void block19_data_unref (void * _userdata_) {
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
#line 1579 "archive-writer.c"
		BoxesArchiveWriter* self;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		self = _data19_->self;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_g_object_unref0 (self);
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		g_slice_free (Block19Data, _data19_);
#line 1587 "archive-writer.c"
	}
}


static int _____lambda128_ (Block19Data* _data19_) {
	BoxesArchiveWriter* self;
	int result = 0;
	struct archive* _tmp0_ = NULL;
	int _tmp1_ = 0;
	int _tmp2_ = 0;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = _data19_->self;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = _data19_->filter;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = archive_write_add_filter (_tmp0_, _tmp1_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _tmp2_;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1610 "archive-writer.c"
}


static int ______lambda128__boxes_libarchive_function (gpointer self) {
	int result;
	result = _____lambda128_ (self);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1619 "archive-writer.c"
}


static void boxes_archive_writer_prepare_archive (BoxesArchiveWriter* self, GError** error) {
	struct archive* _tmp0_ = NULL;
	GList* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 110 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (self != NULL);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_execute_libarchive_function (_tmp0_, ___lambda127__boxes_libarchive_function, self, (guint) 1, &_inner_error_);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1641 "archive-writer.c"
		} else {
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 111 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1649 "archive-writer.c"
		}
	}
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = self->priv->filters;
#line 113 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (_tmp1_ != NULL) {
#line 1656 "archive-writer.c"
		GList* _tmp2_ = NULL;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp2_ = self->priv->filters;
#line 1660 "archive-writer.c"
		{
			GList* filter_collection = NULL;
			GList* filter_it = NULL;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			filter_collection = _tmp2_;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			for (filter_it = filter_collection; filter_it != NULL; filter_it = filter_it->next) {
#line 1668 "archive-writer.c"
				int filter = 0;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				filter = (int) ((gintptr) filter_it->data);
#line 1672 "archive-writer.c"
				{
					Block19Data* _data19_;
					struct archive* _tmp3_ = NULL;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data19_ = g_slice_new0 (Block19Data);
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data19_->_ref_count_ = 1;
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data19_->self = g_object_ref (self);
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data19_->filter = filter;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_tmp3_ = self->archive;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					boxes_execute_libarchive_function (_tmp3_, ______lambda128__boxes_libarchive_function, _data19_, (guint) 1, &_inner_error_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
						if (_inner_error_->domain == G_IO_ERROR) {
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							g_propagate_error (error, _inner_error_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							block19_data_unref (_data19_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							_data19_ = NULL;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							return;
#line 1700 "archive-writer.c"
						} else {
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							block19_data_unref (_data19_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							_data19_ = NULL;
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							g_clear_error (&_inner_error_);
#line 115 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
							return;
#line 1712 "archive-writer.c"
						}
					}
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					block19_data_unref (_data19_);
#line 114 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_data19_ = NULL;
#line 1719 "archive-writer.c"
				}
			}
		}
	}
}


static void boxes_archive_writer_copy_filters_from_read_archive (BoxesArchiveWriter* self, struct archive* read_archive) {
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (self != NULL);
#line 119 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (read_archive != NULL);
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_g_list_free0 (self->priv->filters);
#line 120 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->priv->filters = NULL;
#line 1736 "archive-writer.c"
	{
		gint i = 0;
		struct archive* _tmp0_ = NULL;
		gint _tmp1_ = 0;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp0_ = read_archive;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp1_ = archive_filter_count (_tmp0_);
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		i = _tmp1_ - 1;
#line 1747 "archive-writer.c"
		{
			gboolean _tmp2_ = FALSE;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			_tmp2_ = TRUE;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			while (TRUE) {
#line 1754 "archive-writer.c"
				gint _tmp4_ = 0;
				struct archive* _tmp5_ = NULL;
				gint _tmp6_ = 0;
				int _tmp7_ = 0;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				if (!_tmp2_) {
#line 1761 "archive-writer.c"
					gint _tmp3_ = 0;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					_tmp3_ = i;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					i = _tmp3_ - 1;
#line 1767 "archive-writer.c"
				}
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp2_ = FALSE;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp4_ = i;
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				if (!(_tmp4_ > 0)) {
#line 121 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
					break;
#line 1777 "archive-writer.c"
				}
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp5_ = read_archive;
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp6_ = i;
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				_tmp7_ = archive_filter_code (_tmp5_, _tmp6_ - 1);
#line 122 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
				self->priv->filters = g_list_append (self->priv->filters, (gpointer) ((gintptr) _tmp7_));
#line 1787 "archive-writer.c"
			}
		}
	}
}


static void boxes_archive_writer_insert_data (BoxesArchiveWriter* self, void* data, gint64 len, GError** error) {
	struct archive* _tmp0_ = NULL;
	void* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
	gssize _tmp3_ = 0L;
	gint64 _tmp4_ = 0LL;
	GError * _inner_error_ = NULL;
#line 125 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_if_fail (self != NULL);
#line 126 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = self->archive;
#line 126 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = data;
#line 126 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp2_ = len;
#line 126 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp3_ = archive_write_data (_tmp0_, _tmp1_, (gsize) _tmp2_);
#line 126 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp4_ = len;
#line 126 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	if (((gint64) _tmp3_) != _tmp4_) {
#line 1815 "archive-writer.c"
		struct archive* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		GError* _tmp7_ = NULL;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp5_ = self->archive;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp6_ = archive_error_string (_tmp5_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_tmp7_ = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "Failed writing data to archive. Message: '%s'.", _tmp6_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		_inner_error_ = _tmp7_;
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
		if (_inner_error_->domain == G_IO_ERROR) {
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_propagate_error (error, _inner_error_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1833 "archive-writer.c"
		} else {
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			g_clear_error (&_inner_error_);
#line 127 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
			return;
#line 1841 "archive-writer.c"
		}
	}
}


static struct archive_entry* boxes_archive_writer_get_entry_for_file (BoxesArchiveWriter* self, const gchar* filename, const gchar* dest_name) {
	struct archive_entry* result = NULL;
	struct stat st = {0};
	struct archive_entry* _result_ = NULL;
	struct archive_entry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	struct stat _tmp2_ = {0};
	struct stat _tmp3_ = {0};
	const gchar* _tmp4_ = NULL;
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_val_if_fail (filename != NULL, NULL);
#line 131 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_return_val_if_fail (dest_name != NULL, NULL);
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp0_ = archive_entry_new ();
#line 133 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_result_ = _tmp0_;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp1_ = filename;
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	stat (_tmp1_, &_tmp2_);
#line 135 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	st = _tmp2_;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp3_ = st;
#line 137 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	archive_entry_copy_stat (_result_, &_tmp3_);
#line 138 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_tmp4_ = dest_name;
#line 138 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	archive_entry_set_pathname (_result_, _tmp4_);
#line 140 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	result = _result_;
#line 140 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	return result;
#line 1884 "archive-writer.c"
}


static void boxes_archive_writer_class_init (BoxesArchiveWriterClass * klass) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	boxes_archive_writer_parent_class = g_type_class_peek_parent (klass);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	g_type_class_add_private (klass, sizeof (BoxesArchiveWriterPrivate));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_archive_writer_finalize;
#line 1895 "archive-writer.c"
}


static void boxes_archive_writer_instance_init (BoxesArchiveWriter * self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self->priv = BOXES_ARCHIVE_WRITER_GET_PRIVATE (self);
#line 1902 "archive-writer.c"
}


static void boxes_archive_writer_finalize (GObject* obj) {
	BoxesArchiveWriter * self;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_ARCHIVE_WRITER, BoxesArchiveWriter);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_archive_write_finish0 (self->archive);
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	_g_list_free0 (self->priv->filters);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/archive-writer.vala"
	G_OBJECT_CLASS (boxes_archive_writer_parent_class)->finalize (obj);
#line 1916 "archive-writer.c"
}


GType boxes_archive_writer_get_type (void) {
	static volatile gsize boxes_archive_writer_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_archive_writer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesArchiveWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_archive_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesArchiveWriter), 0, (GInstanceInitFunc) boxes_archive_writer_instance_init, NULL };
		GType boxes_archive_writer_type_id;
		boxes_archive_writer_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesArchiveWriter", &g_define_type_info, 0);
		g_once_init_leave (&boxes_archive_writer_type_id__volatile, boxes_archive_writer_type_id);
	}
	return boxes_archive_writer_type_id__volatile;
}



