/* tracker-resdump.c generated by valac 0.41.90.2-8c9f4-dirty, the Vala compiler
 * generated from tracker-resdump.vala, do not modify */

/*
 * Copyright (C) 2010, Nokia
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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 this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 */


#include <glib.h>
#include <glib-object.h>
#include "libtracker-sparql/tracker-sparql.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#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_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))


extern TrackerSparqlConnection* conn;
TrackerSparqlConnection* conn = NULL;
extern GHashTable* looked_up_iris;
GHashTable* looked_up_iris = NULL;

void usage (gchar** args,
            int args_length1);
gboolean dump_resource (const gchar* urn);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
gint _vala_main (gchar** args,
                 int args_length1);


void
usage (gchar** args,
       int args_length1)
{
	FILE* _tmp0_;
	const gchar* _tmp1_;
#line 26 "tracker-resdump.vala"
	_tmp0_ = stderr;
#line 26 "tracker-resdump.vala"
	_tmp1_ = args[0];
#line 26 "tracker-resdump.vala"
	fprintf (_tmp0_, "Usage: %s urn\n", _tmp1_);
#line 64 "tracker-resdump.c"
}


static void
_g_free0_ (gpointer var)
{
#line 42 "tracker-resdump.vala"
	var = (g_free (var), NULL);
#line 73 "tracker-resdump.c"
}


static inline void
_g_list_free__g_free0_ (GList* self)
{
#line 42 "tracker-resdump.vala"
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
#line 82 "tracker-resdump.c"
}


gboolean
dump_resource (const gchar* urn)
{
	gboolean result = FALSE;
	GList* iris_to_lookup = NULL;
	GHashTable* _tmp0_;
	gchar* _tmp1_;
	GError * _inner_error_ = NULL;
#line 31 "tracker-resdump.vala"
	g_return_val_if_fail (urn != NULL, FALSE);
#line 32 "tracker-resdump.vala"
	iris_to_lookup = NULL;
#line 34 "tracker-resdump.vala"
	_tmp0_ = looked_up_iris;
#line 34 "tracker-resdump.vala"
	_tmp1_ = g_strdup (urn);
#line 34 "tracker-resdump.vala"
	g_hash_table_add (_tmp0_, _tmp1_);
#line 104 "tracker-resdump.c"
	{
		TrackerSparqlCursor* cursor = NULL;
		TrackerSparqlConnection* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		TrackerSparqlCursor* _tmp5_;
		TrackerSparqlCursor* _tmp6_;
		GList* type_statements = NULL;
		GList* statements = NULL;
		GList* _tmp50_;
		GList* _tmp54_;
		GList* _tmp58_;
#line 37 "tracker-resdump.vala"
		_tmp2_ = conn;
#line 37 "tracker-resdump.vala"
		_tmp3_ = g_strdup_printf ("SELECT ?p rdfs:range(?p) ?o {<%s> ?p ?o}", urn);
#line 37 "tracker-resdump.vala"
		_tmp4_ = _tmp3_;
#line 37 "tracker-resdump.vala"
		_tmp5_ = tracker_sparql_connection_query (_tmp2_, _tmp4_, NULL, &_inner_error_);
#line 37 "tracker-resdump.vala"
		_tmp6_ = _tmp5_;
#line 37 "tracker-resdump.vala"
		_g_free0 (_tmp4_);
#line 37 "tracker-resdump.vala"
		cursor = _tmp6_;
#line 37 "tracker-resdump.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 133 "tracker-resdump.c"
			goto __catch0_g_error;
		}
#line 39 "tracker-resdump.vala"
		type_statements = NULL;
#line 40 "tracker-resdump.vala"
		statements = NULL;
#line 42 "tracker-resdump.vala"
		while (TRUE) {
#line 142 "tracker-resdump.c"
			gboolean _tmp7_ = FALSE;
			TrackerSparqlCursor* _tmp8_;
			TrackerSparqlCursor* _tmp9_;
			const gchar* _tmp10_;
			gchar* statement = NULL;
			TrackerSparqlCursor* _tmp11_;
			const gchar* _tmp12_;
			gchar* _tmp13_;
			TrackerSparqlCursor* _tmp14_;
			const gchar* _tmp15_;
			const gchar* _tmp16_;
			GQuark _tmp18_ = 0U;
#line 50 "tracker-resdump.vala"
			static GQuark _tmp17_label0 = 0;
#line 50 "tracker-resdump.vala"
			static GQuark _tmp17_label1 = 0;
#line 50 "tracker-resdump.vala"
			static GQuark _tmp17_label2 = 0;
#line 50 "tracker-resdump.vala"
			static GQuark _tmp17_label3 = 0;
#line 50 "tracker-resdump.vala"
			static GQuark _tmp17_label4 = 0;
#line 165 "tracker-resdump.c"
			TrackerSparqlCursor* _tmp44_;
			const gchar* _tmp45_;
#line 42 "tracker-resdump.vala"
			_tmp8_ = cursor;
#line 42 "tracker-resdump.vala"
			_tmp7_ = tracker_sparql_cursor_next (_tmp8_, NULL, &_inner_error_);
#line 42 "tracker-resdump.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 42 "tracker-resdump.vala"
				(statements == NULL) ? NULL : (statements = (_g_list_free__g_free0_ (statements), NULL));
#line 42 "tracker-resdump.vala"
				(type_statements == NULL) ? NULL : (type_statements = (_g_list_free__g_free0_ (type_statements), NULL));
#line 42 "tracker-resdump.vala"
				_g_object_unref0 (cursor);
#line 180 "tracker-resdump.c"
				goto __catch0_g_error;
			}
#line 42 "tracker-resdump.vala"
			if (!_tmp7_) {
#line 42 "tracker-resdump.vala"
				break;
#line 187 "tracker-resdump.c"
			}
#line 44 "tracker-resdump.vala"
			_tmp9_ = cursor;
#line 44 "tracker-resdump.vala"
			_tmp10_ = tracker_sparql_cursor_get_string (_tmp9_, 0, NULL);
#line 44 "tracker-resdump.vala"
			if (g_str_has_prefix (_tmp10_, "http://www.tracker-project.org/ontologies/tracker#")) {
#line 45 "tracker-resdump.vala"
				continue;
#line 197 "tracker-resdump.c"
			}
#line 48 "tracker-resdump.vala"
			_tmp11_ = cursor;
#line 48 "tracker-resdump.vala"
			_tmp12_ = tracker_sparql_cursor_get_string (_tmp11_, 0, NULL);
#line 48 "tracker-resdump.vala"
			_tmp13_ = g_strdup_printf ("<%s> <%s> ", urn, _tmp12_);
#line 48 "tracker-resdump.vala"
			statement = _tmp13_;
#line 50 "tracker-resdump.vala"
			_tmp14_ = cursor;
#line 50 "tracker-resdump.vala"
			_tmp15_ = tracker_sparql_cursor_get_string (_tmp14_, 1, NULL);
#line 50 "tracker-resdump.vala"
			_tmp16_ = _tmp15_;
#line 50 "tracker-resdump.vala"
			_tmp18_ = (NULL == _tmp16_) ? 0 : g_quark_from_string (_tmp16_);
#line 50 "tracker-resdump.vala"
			if ((_tmp18_ == ((0 != _tmp17_label0) ? _tmp17_label0 : (_tmp17_label0 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#string")))) || (_tmp18_ == ((0 != _tmp17_label1) ? _tmp17_label1 : (_tmp17_label1 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#dateTime"))))) {
#line 50 "tracker-resdump.vala"
				switch (0) {
#line 219 "tracker-resdump.c"
					default:
					{
						const gchar* _tmp19_;
						TrackerSparqlCursor* _tmp20_;
						const gchar* _tmp21_;
						gchar* _tmp22_;
						gchar* _tmp23_;
						gchar* _tmp24_;
						gchar* _tmp25_;
						gchar* _tmp26_;
#line 53 "tracker-resdump.vala"
						_tmp19_ = statement;
#line 53 "tracker-resdump.vala"
						_tmp20_ = cursor;
#line 53 "tracker-resdump.vala"
						_tmp21_ = tracker_sparql_cursor_get_string (_tmp20_, 2, NULL);
#line 53 "tracker-resdump.vala"
						_tmp22_ = tracker_sparql_escape_string (_tmp21_);
#line 53 "tracker-resdump.vala"
						_tmp23_ = _tmp22_;
#line 53 "tracker-resdump.vala"
						_tmp24_ = g_strdup_printf ("\"%s\"", _tmp23_);
#line 53 "tracker-resdump.vala"
						_tmp25_ = _tmp24_;
#line 53 "tracker-resdump.vala"
						_tmp26_ = g_strconcat (_tmp19_, _tmp25_, NULL);
#line 53 "tracker-resdump.vala"
						_g_free0 (statement);
#line 53 "tracker-resdump.vala"
						statement = _tmp26_;
#line 53 "tracker-resdump.vala"
						_g_free0 (_tmp25_);
#line 53 "tracker-resdump.vala"
						_g_free0 (_tmp23_);
#line 54 "tracker-resdump.vala"
						break;
#line 256 "tracker-resdump.c"
					}
				}
			} else if (((_tmp18_ == ((0 != _tmp17_label2) ? _tmp17_label2 : (_tmp17_label2 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#integer")))) || (_tmp18_ == ((0 != _tmp17_label3) ? _tmp17_label3 : (_tmp17_label3 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#double"))))) || (_tmp18_ == ((0 != _tmp17_label4) ? _tmp17_label4 : (_tmp17_label4 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#boolean"))))) {
#line 50 "tracker-resdump.vala"
				switch (0) {
#line 262 "tracker-resdump.c"
					default:
					{
						const gchar* _tmp27_;
						TrackerSparqlCursor* _tmp28_;
						const gchar* _tmp29_;
						gchar* _tmp30_;
						gchar* _tmp31_;
						gchar* _tmp32_;
#line 58 "tracker-resdump.vala"
						_tmp27_ = statement;
#line 58 "tracker-resdump.vala"
						_tmp28_ = cursor;
#line 58 "tracker-resdump.vala"
						_tmp29_ = tracker_sparql_cursor_get_string (_tmp28_, 2, NULL);
#line 58 "tracker-resdump.vala"
						_tmp30_ = g_strdup_printf ("%s", _tmp29_);
#line 58 "tracker-resdump.vala"
						_tmp31_ = _tmp30_;
#line 58 "tracker-resdump.vala"
						_tmp32_ = g_strconcat (_tmp27_, _tmp31_, NULL);
#line 58 "tracker-resdump.vala"
						_g_free0 (statement);
#line 58 "tracker-resdump.vala"
						statement = _tmp32_;
#line 58 "tracker-resdump.vala"
						_g_free0 (_tmp31_);
#line 59 "tracker-resdump.vala"
						break;
#line 291 "tracker-resdump.c"
					}
				}
			} else {
#line 50 "tracker-resdump.vala"
				switch (0) {
#line 297 "tracker-resdump.c"
					default:
					{
						const gchar* obj = NULL;
						TrackerSparqlCursor* _tmp33_;
						const gchar* _tmp34_;
						GHashTable* _tmp35_;
						const gchar* _tmp36_;
						const gchar* _tmp39_;
						const gchar* _tmp40_;
						gchar* _tmp41_;
						gchar* _tmp42_;
						gchar* _tmp43_;
#line 62 "tracker-resdump.vala"
						_tmp33_ = cursor;
#line 62 "tracker-resdump.vala"
						_tmp34_ = tracker_sparql_cursor_get_string (_tmp33_, 2, NULL);
#line 62 "tracker-resdump.vala"
						obj = _tmp34_;
#line 63 "tracker-resdump.vala"
						_tmp35_ = looked_up_iris;
#line 63 "tracker-resdump.vala"
						_tmp36_ = obj;
#line 63 "tracker-resdump.vala"
						if (!g_hash_table_contains (_tmp35_, _tmp36_)) {
#line 322 "tracker-resdump.c"
							const gchar* _tmp37_;
							gchar* _tmp38_;
#line 64 "tracker-resdump.vala"
							_tmp37_ = obj;
#line 64 "tracker-resdump.vala"
							_tmp38_ = g_strdup (_tmp37_);
#line 64 "tracker-resdump.vala"
							iris_to_lookup = g_list_append (iris_to_lookup, _tmp38_);
#line 331 "tracker-resdump.c"
						}
#line 66 "tracker-resdump.vala"
						_tmp39_ = statement;
#line 66 "tracker-resdump.vala"
						_tmp40_ = obj;
#line 66 "tracker-resdump.vala"
						_tmp41_ = g_strdup_printf ("<%s>", _tmp40_);
#line 66 "tracker-resdump.vala"
						_tmp42_ = _tmp41_;
#line 66 "tracker-resdump.vala"
						_tmp43_ = g_strconcat (_tmp39_, _tmp42_, NULL);
#line 66 "tracker-resdump.vala"
						_g_free0 (statement);
#line 66 "tracker-resdump.vala"
						statement = _tmp43_;
#line 66 "tracker-resdump.vala"
						_g_free0 (_tmp42_);
#line 67 "tracker-resdump.vala"
						break;
#line 351 "tracker-resdump.c"
					}
				}
			}
#line 70 "tracker-resdump.vala"
			_tmp44_ = cursor;
#line 70 "tracker-resdump.vala"
			_tmp45_ = tracker_sparql_cursor_get_string (_tmp44_, 0, NULL);
#line 70 "tracker-resdump.vala"
			if (g_strcmp0 (_tmp45_, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") == 0) {
#line 361 "tracker-resdump.c"
				const gchar* _tmp46_;
				gchar* _tmp47_;
#line 71 "tracker-resdump.vala"
				_tmp46_ = statement;
#line 71 "tracker-resdump.vala"
				_tmp47_ = g_strdup (_tmp46_);
#line 71 "tracker-resdump.vala"
				type_statements = g_list_append (type_statements, _tmp47_);
#line 370 "tracker-resdump.c"
			} else {
				const gchar* _tmp48_;
				gchar* _tmp49_;
#line 73 "tracker-resdump.vala"
				_tmp48_ = statement;
#line 73 "tracker-resdump.vala"
				_tmp49_ = g_strdup (_tmp48_);
#line 73 "tracker-resdump.vala"
				statements = g_list_append (statements, _tmp49_);
#line 380 "tracker-resdump.c"
			}
#line 42 "tracker-resdump.vala"
			_g_free0 (statement);
#line 384 "tracker-resdump.c"
		}
#line 77 "tracker-resdump.vala"
		_tmp50_ = type_statements;
#line 388 "tracker-resdump.c"
		{
			GList* s_collection = NULL;
			GList* s_it = NULL;
#line 77 "tracker-resdump.vala"
			s_collection = _tmp50_;
#line 77 "tracker-resdump.vala"
			for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
#line 396 "tracker-resdump.c"
				gchar* _tmp51_;
				gchar* s = NULL;
#line 77 "tracker-resdump.vala"
				_tmp51_ = g_strdup ((const gchar*) s_it->data);
#line 77 "tracker-resdump.vala"
				s = _tmp51_;
#line 403 "tracker-resdump.c"
				{
					FILE* _tmp52_;
					const gchar* _tmp53_;
#line 78 "tracker-resdump.vala"
					_tmp52_ = stdout;
#line 78 "tracker-resdump.vala"
					_tmp53_ = s;
#line 78 "tracker-resdump.vala"
					fprintf (_tmp52_, "%s .\n", _tmp53_);
#line 77 "tracker-resdump.vala"
					_g_free0 (s);
#line 415 "tracker-resdump.c"
				}
			}
		}
#line 81 "tracker-resdump.vala"
		_tmp54_ = statements;
#line 421 "tracker-resdump.c"
		{
			GList* s_collection = NULL;
			GList* s_it = NULL;
#line 81 "tracker-resdump.vala"
			s_collection = _tmp54_;
#line 81 "tracker-resdump.vala"
			for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
#line 429 "tracker-resdump.c"
				gchar* _tmp55_;
				gchar* s = NULL;
#line 81 "tracker-resdump.vala"
				_tmp55_ = g_strdup ((const gchar*) s_it->data);
#line 81 "tracker-resdump.vala"
				s = _tmp55_;
#line 436 "tracker-resdump.c"
				{
					FILE* _tmp56_;
					const gchar* _tmp57_;
#line 82 "tracker-resdump.vala"
					_tmp56_ = stdout;
#line 82 "tracker-resdump.vala"
					_tmp57_ = s;
#line 82 "tracker-resdump.vala"
					fprintf (_tmp56_, "%s .\n", _tmp57_);
#line 81 "tracker-resdump.vala"
					_g_free0 (s);
#line 448 "tracker-resdump.c"
				}
			}
		}
#line 85 "tracker-resdump.vala"
		_tmp58_ = iris_to_lookup;
#line 454 "tracker-resdump.c"
		{
			GList* s_collection = NULL;
			GList* s_it = NULL;
#line 85 "tracker-resdump.vala"
			s_collection = _tmp58_;
#line 85 "tracker-resdump.vala"
			for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
#line 462 "tracker-resdump.c"
				gchar* _tmp59_;
				gchar* s = NULL;
#line 85 "tracker-resdump.vala"
				_tmp59_ = g_strdup ((const gchar*) s_it->data);
#line 85 "tracker-resdump.vala"
				s = _tmp59_;
#line 469 "tracker-resdump.c"
				{
					const gchar* _tmp60_;
#line 86 "tracker-resdump.vala"
					_tmp60_ = s;
#line 86 "tracker-resdump.vala"
					if (!dump_resource (_tmp60_)) {
#line 87 "tracker-resdump.vala"
						result = FALSE;
#line 87 "tracker-resdump.vala"
						_g_free0 (s);
#line 87 "tracker-resdump.vala"
						(statements == NULL) ? NULL : (statements = (_g_list_free__g_free0_ (statements), NULL));
#line 87 "tracker-resdump.vala"
						(type_statements == NULL) ? NULL : (type_statements = (_g_list_free__g_free0_ (type_statements), NULL));
#line 87 "tracker-resdump.vala"
						_g_object_unref0 (cursor);
#line 87 "tracker-resdump.vala"
						(iris_to_lookup == NULL) ? NULL : (iris_to_lookup = (_g_list_free__g_free0_ (iris_to_lookup), NULL));
#line 87 "tracker-resdump.vala"
						return result;
#line 490 "tracker-resdump.c"
					}
#line 85 "tracker-resdump.vala"
					_g_free0 (s);
#line 494 "tracker-resdump.c"
				}
			}
		}
#line 36 "tracker-resdump.vala"
		(statements == NULL) ? NULL : (statements = (_g_list_free__g_free0_ (statements), NULL));
#line 36 "tracker-resdump.vala"
		(type_statements == NULL) ? NULL : (type_statements = (_g_list_free__g_free0_ (type_statements), NULL));
#line 36 "tracker-resdump.vala"
		_g_object_unref0 (cursor);
#line 504 "tracker-resdump.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp61_;
		const gchar* _tmp62_;
#line 36 "tracker-resdump.vala"
		e = _inner_error_;
#line 36 "tracker-resdump.vala"
		_inner_error_ = NULL;
#line 91 "tracker-resdump.vala"
		_tmp61_ = e;
#line 91 "tracker-resdump.vala"
		_tmp62_ = _tmp61_->message;
#line 91 "tracker-resdump.vala"
		g_critical ("tracker-resdump.vala:91: Couldn't query info for resource %s: %s", urn, _tmp62_);
#line 92 "tracker-resdump.vala"
		result = FALSE;
#line 92 "tracker-resdump.vala"
		_g_error_free0 (e);
#line 92 "tracker-resdump.vala"
		(iris_to_lookup == NULL) ? NULL : (iris_to_lookup = (_g_list_free__g_free0_ (iris_to_lookup), NULL));
#line 92 "tracker-resdump.vala"
		return result;
#line 530 "tracker-resdump.c"
	}
	__finally0:
#line 36 "tracker-resdump.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 535 "tracker-resdump.c"
		gboolean _tmp63_ = FALSE;
#line 36 "tracker-resdump.vala"
		(iris_to_lookup == NULL) ? NULL : (iris_to_lookup = (_g_list_free__g_free0_ (iris_to_lookup), NULL));
#line 36 "tracker-resdump.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 "tracker-resdump.vala"
		g_clear_error (&_inner_error_);
#line 36 "tracker-resdump.vala"
		return _tmp63_;
#line 545 "tracker-resdump.c"
	}
#line 95 "tracker-resdump.vala"
	result = TRUE;
#line 95 "tracker-resdump.vala"
	(iris_to_lookup == NULL) ? NULL : (iris_to_lookup = (_g_list_free__g_free0_ (iris_to_lookup), NULL));
#line 95 "tracker-resdump.vala"
	return result;
#line 553 "tracker-resdump.c"
}


gint
_vala_main (gchar** args,
            int args_length1)
{
	gint result = 0;
	GHashFunc _tmp6_;
	GEqualFunc _tmp7_;
	GHashTable* _tmp8_;
	const gchar* _tmp9_;
	GError * _inner_error_ = NULL;
#line 100 "tracker-resdump.vala"
	if (args_length1 != 2) {
#line 101 "tracker-resdump.vala"
		usage (args, args_length1);
#line 102 "tracker-resdump.vala"
		result = 1;
#line 102 "tracker-resdump.vala"
		return result;
#line 575 "tracker-resdump.c"
	}
	{
		TrackerSparqlConnection* _tmp0_ = NULL;
		TrackerSparqlConnection* _tmp1_;
		TrackerSparqlConnection* _tmp2_;
#line 106 "tracker-resdump.vala"
		_tmp1_ = tracker_sparql_connection_get (NULL, &_inner_error_);
#line 106 "tracker-resdump.vala"
		_tmp0_ = _tmp1_;
#line 106 "tracker-resdump.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 587 "tracker-resdump.c"
			goto __catch1_g_error;
		}
#line 106 "tracker-resdump.vala"
		_tmp2_ = _tmp0_;
#line 106 "tracker-resdump.vala"
		_tmp0_ = NULL;
#line 106 "tracker-resdump.vala"
		_g_object_unref0 (conn);
#line 106 "tracker-resdump.vala"
		conn = _tmp2_;
#line 105 "tracker-resdump.vala"
		_g_object_unref0 (_tmp0_);
#line 600 "tracker-resdump.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 105 "tracker-resdump.vala"
		e = _inner_error_;
#line 105 "tracker-resdump.vala"
		_inner_error_ = NULL;
#line 108 "tracker-resdump.vala"
		_tmp3_ = e;
#line 108 "tracker-resdump.vala"
		_tmp4_ = _tmp3_->message;
#line 108 "tracker-resdump.vala"
		g_critical ("tracker-resdump.vala:108: Couldn't connect to Tracker: %s", _tmp4_);
#line 109 "tracker-resdump.vala"
		result = 1;
#line 109 "tracker-resdump.vala"
		_g_error_free0 (e);
#line 109 "tracker-resdump.vala"
		return result;
#line 624 "tracker-resdump.c"
	}
	__finally1:
#line 105 "tracker-resdump.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 629 "tracker-resdump.c"
		gint _tmp5_ = -1;
#line 105 "tracker-resdump.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 105 "tracker-resdump.vala"
		g_clear_error (&_inner_error_);
#line 105 "tracker-resdump.vala"
		return _tmp5_;
#line 637 "tracker-resdump.c"
	}
#line 112 "tracker-resdump.vala"
	_tmp6_ = g_str_hash;
#line 112 "tracker-resdump.vala"
	_tmp7_ = g_str_equal;
#line 112 "tracker-resdump.vala"
	_tmp8_ = g_hash_table_new_full (_tmp6_, _tmp7_, NULL, _g_free0_);
#line 112 "tracker-resdump.vala"
	_g_hash_table_unref0 (looked_up_iris);
#line 112 "tracker-resdump.vala"
	looked_up_iris = _tmp8_;
#line 114 "tracker-resdump.vala"
	_tmp9_ = args[1];
#line 114 "tracker-resdump.vala"
	if (dump_resource (_tmp9_)) {
#line 115 "tracker-resdump.vala"
		result = 0;
#line 115 "tracker-resdump.vala"
		return result;
#line 657 "tracker-resdump.c"
	}
#line 118 "tracker-resdump.vala"
	result = 1;
#line 118 "tracker-resdump.vala"
	return result;
#line 663 "tracker-resdump.c"
}


int
main (int argc,
      char ** argv)
{
#line 98 "tracker-resdump.vala"
	return _vala_main (argv, argc);
#line 673 "tracker-resdump.c"
}



