/* tracker-resdump.c generated by valac 0.38.1, 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_list_free__g_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_free0_ (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_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
#line 26 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp0_ = stderr;
#line 26 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp1_ = args;
#line 26 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp1__length1 = args_length1;
#line 26 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp2_ = _tmp1_[0];
#line 26 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	fprintf (_tmp0_, "Usage: %s urn\n", _tmp2_);
#line 65 "tracker-resdump.c"
}


static void _g_free0_ (gpointer var) {
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	var = (g_free (var), NULL);
#line 72 "tracker-resdump.c"
}


static inline void _g_list_free__g_free0_ (GList* self) {
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
#line 79 "tracker-resdump.c"
}


gboolean dump_resource (const gchar* urn) {
	gboolean result = FALSE;
	GList* iris_to_lookup = NULL;
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GError * _inner_error_ = NULL;
#line 31 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	g_return_val_if_fail (urn != NULL, FALSE);
#line 32 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	iris_to_lookup = NULL;
#line 34 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp0_ = looked_up_iris;
#line 34 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp1_ = urn;
#line 34 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 34 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	g_hash_table_add (_tmp0_, _tmp2_);
#line 102 "tracker-resdump.c"
	{
		TrackerSparqlCursor* cursor = NULL;
		TrackerSparqlConnection* _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		TrackerSparqlCursor* _tmp7_;
		TrackerSparqlCursor* _tmp8_;
		GList* type_statements = NULL;
		GList* statements = NULL;
		GList* _tmp56_;
		GList* _tmp60_;
		GList* _tmp64_;
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp3_ = conn;
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp4_ = urn;
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp5_ = g_strdup_printf ("SELECT ?p rdfs:range(?p) ?o {<%s> ?p ?o}", _tmp4_);
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp6_ = _tmp5_;
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp7_ = tracker_sparql_connection_query (_tmp3_, _tmp6_, NULL, &_inner_error_);
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp8_ = _tmp7_;
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_g_free0 (_tmp6_);
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		cursor = _tmp8_;
#line 37 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 134 "tracker-resdump.c"
			goto __catch0_g_error;
		}
#line 39 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		type_statements = NULL;
#line 40 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		statements = NULL;
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		while (TRUE) {
#line 143 "tracker-resdump.c"
			gboolean _tmp9_ = FALSE;
			TrackerSparqlCursor* _tmp10_;
			gboolean _tmp11_;
			TrackerSparqlCursor* _tmp12_;
			const gchar* _tmp13_;
			gboolean _tmp14_;
			gchar* statement = NULL;
			const gchar* _tmp15_;
			TrackerSparqlCursor* _tmp16_;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			TrackerSparqlCursor* _tmp19_;
			const gchar* _tmp20_;
			const gchar* _tmp21_;
			GQuark _tmp23_ = 0U;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			static GQuark _tmp22_label0 = 0;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			static GQuark _tmp22_label1 = 0;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			static GQuark _tmp22_label2 = 0;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			static GQuark _tmp22_label3 = 0;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			static GQuark _tmp22_label4 = 0;
#line 169 "tracker-resdump.c"
			TrackerSparqlCursor* _tmp50_;
			const gchar* _tmp51_;
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp10_ = cursor;
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp11_ = tracker_sparql_cursor_next (_tmp10_, NULL, &_inner_error_);
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp9_ = _tmp11_;
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				__g_list_free__g_free0_0 (statements);
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				__g_list_free__g_free0_0 (type_statements);
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_g_object_unref0 (cursor);
#line 186 "tracker-resdump.c"
				goto __catch0_g_error;
			}
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			if (!_tmp9_) {
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				break;
#line 193 "tracker-resdump.c"
			}
#line 44 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp12_ = cursor;
#line 44 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp13_ = tracker_sparql_cursor_get_string (_tmp12_, 0, NULL);
#line 44 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp14_ = g_str_has_prefix (_tmp13_, "http://www.tracker-project.org/ontologies/tracker#");
#line 44 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			if (_tmp14_) {
#line 45 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				continue;
#line 205 "tracker-resdump.c"
			}
#line 48 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp15_ = urn;
#line 48 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp16_ = cursor;
#line 48 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp17_ = tracker_sparql_cursor_get_string (_tmp16_, 0, NULL);
#line 48 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp18_ = g_strdup_printf ("<%s> <%s> ", _tmp15_, _tmp17_);
#line 48 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			statement = _tmp18_;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp19_ = cursor;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp20_ = tracker_sparql_cursor_get_string (_tmp19_, 1, NULL);
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp21_ = _tmp20_;
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp23_ = (NULL == _tmp21_) ? 0 : g_quark_from_string (_tmp21_);
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			if ((_tmp23_ == ((0 != _tmp22_label0) ? _tmp22_label0 : (_tmp22_label0 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#string")))) || (_tmp23_ == ((0 != _tmp22_label1) ? _tmp22_label1 : (_tmp22_label1 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#dateTime"))))) {
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				switch (0) {
#line 229 "tracker-resdump.c"
					default:
					{
						const gchar* _tmp24_;
						TrackerSparqlCursor* _tmp25_;
						const gchar* _tmp26_;
						gchar* _tmp27_;
						gchar* _tmp28_;
						gchar* _tmp29_;
						gchar* _tmp30_;
						gchar* _tmp31_;
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp24_ = statement;
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp25_ = cursor;
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp26_ = tracker_sparql_cursor_get_string (_tmp25_, 2, NULL);
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp27_ = tracker_sparql_escape_string (_tmp26_);
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp28_ = _tmp27_;
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp29_ = g_strdup_printf ("\"%s\"", _tmp28_);
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp30_ = _tmp29_;
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp31_ = g_strconcat (_tmp24_, _tmp30_, NULL);
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (statement);
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						statement = _tmp31_;
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (_tmp30_);
#line 53 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (_tmp28_);
#line 54 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						break;
#line 266 "tracker-resdump.c"
					}
				}
			} else if (((_tmp23_ == ((0 != _tmp22_label2) ? _tmp22_label2 : (_tmp22_label2 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#integer")))) || (_tmp23_ == ((0 != _tmp22_label3) ? _tmp22_label3 : (_tmp22_label3 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#double"))))) || (_tmp23_ == ((0 != _tmp22_label4) ? _tmp22_label4 : (_tmp22_label4 = g_quark_from_static_string ("http://www.w3.org/2001/XMLSchema#boolean"))))) {
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				switch (0) {
#line 272 "tracker-resdump.c"
					default:
					{
						const gchar* _tmp32_;
						TrackerSparqlCursor* _tmp33_;
						const gchar* _tmp34_;
						gchar* _tmp35_;
						gchar* _tmp36_;
						gchar* _tmp37_;
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp32_ = statement;
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp33_ = cursor;
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp34_ = tracker_sparql_cursor_get_string (_tmp33_, 2, NULL);
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp35_ = g_strdup_printf ("%s", _tmp34_);
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp36_ = _tmp35_;
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp37_ = g_strconcat (_tmp32_, _tmp36_, NULL);
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (statement);
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						statement = _tmp37_;
#line 58 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (_tmp36_);
#line 59 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						break;
#line 301 "tracker-resdump.c"
					}
				}
			} else {
#line 50 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				switch (0) {
#line 307 "tracker-resdump.c"
					default:
					{
						const gchar* obj = NULL;
						TrackerSparqlCursor* _tmp38_;
						const gchar* _tmp39_;
						GHashTable* _tmp40_;
						const gchar* _tmp41_;
						gboolean _tmp42_;
						const gchar* _tmp45_;
						const gchar* _tmp46_;
						gchar* _tmp47_;
						gchar* _tmp48_;
						gchar* _tmp49_;
#line 62 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp38_ = cursor;
#line 62 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp39_ = tracker_sparql_cursor_get_string (_tmp38_, 2, NULL);
#line 62 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						obj = _tmp39_;
#line 63 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp40_ = looked_up_iris;
#line 63 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp41_ = obj;
#line 63 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp42_ = g_hash_table_contains (_tmp40_, _tmp41_);
#line 63 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						if (!_tmp42_) {
#line 335 "tracker-resdump.c"
							const gchar* _tmp43_;
							gchar* _tmp44_;
#line 64 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
							_tmp43_ = obj;
#line 64 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
							_tmp44_ = g_strdup (_tmp43_);
#line 64 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
							iris_to_lookup = g_list_append (iris_to_lookup, _tmp44_);
#line 344 "tracker-resdump.c"
						}
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp45_ = statement;
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp46_ = obj;
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp47_ = g_strdup_printf ("<%s>", _tmp46_);
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp48_ = _tmp47_;
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_tmp49_ = g_strconcat (_tmp45_, _tmp48_, NULL);
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (statement);
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						statement = _tmp49_;
#line 66 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (_tmp48_);
#line 67 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						break;
#line 364 "tracker-resdump.c"
					}
				}
			}
#line 70 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp50_ = cursor;
#line 70 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_tmp51_ = tracker_sparql_cursor_get_string (_tmp50_, 0, NULL);
#line 70 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			if (g_strcmp0 (_tmp51_, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") == 0) {
#line 374 "tracker-resdump.c"
				const gchar* _tmp52_;
				gchar* _tmp53_;
#line 71 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp52_ = statement;
#line 71 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp53_ = g_strdup (_tmp52_);
#line 71 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				type_statements = g_list_append (type_statements, _tmp53_);
#line 383 "tracker-resdump.c"
			} else {
				const gchar* _tmp54_;
				gchar* _tmp55_;
#line 73 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp54_ = statement;
#line 73 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp55_ = g_strdup (_tmp54_);
#line 73 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				statements = g_list_append (statements, _tmp55_);
#line 393 "tracker-resdump.c"
			}
#line 42 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			_g_free0 (statement);
#line 397 "tracker-resdump.c"
		}
#line 77 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp56_ = type_statements;
#line 401 "tracker-resdump.c"
		{
			GList* s_collection = NULL;
			GList* s_it = NULL;
#line 77 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			s_collection = _tmp56_;
#line 77 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
#line 409 "tracker-resdump.c"
				gchar* _tmp57_;
				gchar* s = NULL;
#line 77 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp57_ = g_strdup ((const gchar*) s_it->data);
#line 77 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				s = _tmp57_;
#line 416 "tracker-resdump.c"
				{
					FILE* _tmp58_;
					const gchar* _tmp59_;
#line 78 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_tmp58_ = stdout;
#line 78 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_tmp59_ = s;
#line 78 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					fprintf (_tmp58_, "%s .\n", _tmp59_);
#line 77 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_g_free0 (s);
#line 428 "tracker-resdump.c"
				}
			}
		}
#line 81 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp60_ = statements;
#line 434 "tracker-resdump.c"
		{
			GList* s_collection = NULL;
			GList* s_it = NULL;
#line 81 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			s_collection = _tmp60_;
#line 81 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
#line 442 "tracker-resdump.c"
				gchar* _tmp61_;
				gchar* s = NULL;
#line 81 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp61_ = g_strdup ((const gchar*) s_it->data);
#line 81 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				s = _tmp61_;
#line 449 "tracker-resdump.c"
				{
					FILE* _tmp62_;
					const gchar* _tmp63_;
#line 82 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_tmp62_ = stdout;
#line 82 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_tmp63_ = s;
#line 82 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					fprintf (_tmp62_, "%s .\n", _tmp63_);
#line 81 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_g_free0 (s);
#line 461 "tracker-resdump.c"
				}
			}
		}
#line 85 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp64_ = iris_to_lookup;
#line 467 "tracker-resdump.c"
		{
			GList* s_collection = NULL;
			GList* s_it = NULL;
#line 85 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			s_collection = _tmp64_;
#line 85 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
			for (s_it = s_collection; s_it != NULL; s_it = s_it->next) {
#line 475 "tracker-resdump.c"
				gchar* _tmp65_;
				gchar* s = NULL;
#line 85 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				_tmp65_ = g_strdup ((const gchar*) s_it->data);
#line 85 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
				s = _tmp65_;
#line 482 "tracker-resdump.c"
				{
					const gchar* _tmp66_;
					gboolean _tmp67_;
#line 86 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_tmp66_ = s;
#line 86 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_tmp67_ = dump_resource (_tmp66_);
#line 86 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					if (!_tmp67_) {
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						result = FALSE;
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_free0 (s);
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						__g_list_free__g_free0_0 (statements);
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						__g_list_free__g_free0_0 (type_statements);
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						_g_object_unref0 (cursor);
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						__g_list_free__g_free0_0 (iris_to_lookup);
#line 87 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
						return result;
#line 506 "tracker-resdump.c"
					}
#line 85 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
					_g_free0 (s);
#line 510 "tracker-resdump.c"
				}
			}
		}
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		__g_list_free__g_free0_0 (statements);
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		__g_list_free__g_free0_0 (type_statements);
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_g_object_unref0 (cursor);
#line 520 "tracker-resdump.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp68_;
		GError* _tmp69_;
		const gchar* _tmp70_;
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		e = _inner_error_;
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_inner_error_ = NULL;
#line 91 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp68_ = urn;
#line 91 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp69_ = e;
#line 91 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp70_ = _tmp69_->message;
#line 91 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		g_critical ("tracker-resdump.vala:91: Couldn't query info for resource %s: %s", _tmp68_, _tmp70_);
#line 92 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		result = FALSE;
#line 92 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_g_error_free0 (e);
#line 92 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		__g_list_free__g_free0_0 (iris_to_lookup);
#line 92 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		return result;
#line 549 "tracker-resdump.c"
	}
	__finally0:
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 554 "tracker-resdump.c"
		gboolean _tmp71_ = FALSE;
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		__g_list_free__g_free0_0 (iris_to_lookup);
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/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 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		g_clear_error (&_inner_error_);
#line 36 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		return _tmp71_;
#line 564 "tracker-resdump.c"
	}
#line 95 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	result = TRUE;
#line 95 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	__g_list_free__g_free0_0 (iris_to_lookup);
#line 95 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	return result;
#line 572 "tracker-resdump.c"
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	gchar** _tmp0_;
	gint _tmp0__length1;
	GHashFunc _tmp8_;
	GEqualFunc _tmp9_;
	GHashTable* _tmp10_;
	gchar** _tmp11_;
	gint _tmp11__length1;
	const gchar* _tmp12_;
	gboolean _tmp13_;
	GError * _inner_error_ = NULL;
#line 100 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp0_ = args;
#line 100 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp0__length1 = args_length1;
#line 100 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	if (_tmp0__length1 != 2) {
#line 594 "tracker-resdump.c"
		gchar** _tmp1_;
		gint _tmp1__length1;
#line 101 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp1_ = args;
#line 101 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp1__length1 = args_length1;
#line 101 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		usage (_tmp1_, _tmp1__length1);
#line 102 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		result = 1;
#line 102 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		return result;
#line 607 "tracker-resdump.c"
	}
	{
		TrackerSparqlConnection* _tmp2_ = NULL;
		TrackerSparqlConnection* _tmp3_;
		TrackerSparqlConnection* _tmp4_;
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp3_ = tracker_sparql_connection_get (NULL, &_inner_error_);
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp2_ = _tmp3_;
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 619 "tracker-resdump.c"
			goto __catch1_g_error;
		}
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp4_ = _tmp2_;
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp2_ = NULL;
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_g_object_unref0 (conn);
#line 106 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		conn = _tmp4_;
#line 105 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_g_object_unref0 (_tmp2_);
#line 632 "tracker-resdump.c"
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
#line 105 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		e = _inner_error_;
#line 105 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_inner_error_ = NULL;
#line 108 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp5_ = e;
#line 108 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_tmp6_ = _tmp5_->message;
#line 108 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		g_critical ("tracker-resdump.vala:108: Couldn't connect to Tracker: %s", _tmp6_);
#line 109 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		result = 1;
#line 109 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		_g_error_free0 (e);
#line 109 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		return result;
#line 656 "tracker-resdump.c"
	}
	__finally1:
#line 105 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 661 "tracker-resdump.c"
		gint _tmp7_ = 0;
#line 105 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/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 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		g_clear_error (&_inner_error_);
#line 105 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		return _tmp7_;
#line 669 "tracker-resdump.c"
	}
#line 112 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp8_ = g_str_hash;
#line 112 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp9_ = g_str_equal;
#line 112 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp10_ = g_hash_table_new_full (_tmp8_, _tmp9_, NULL, _g_free0_);
#line 112 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_g_hash_table_unref0 (looked_up_iris);
#line 112 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	looked_up_iris = _tmp10_;
#line 114 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp11_ = args;
#line 114 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp11__length1 = args_length1;
#line 114 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp12_ = _tmp11_[1];
#line 114 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	_tmp13_ = dump_resource (_tmp12_);
#line 114 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	if (_tmp13_) {
#line 115 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		result = 0;
#line 115 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
		return result;
#line 695 "tracker-resdump.c"
	}
#line 118 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	result = 1;
#line 118 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	return result;
#line 701 "tracker-resdump.c"
}


int main (int argc, char ** argv) {
#line 98 "/home/carlos/Source/gnome/tracker/utils/tracker-resdump/tracker-resdump.vala"
	return _vala_main (argv, argc);
#line 708 "tracker-resdump.c"
}



