/* test-insert-or-replace.c generated by valac 0.22.1, the Vala compiler
 * generated from test-insert-or-replace.vala, do not modify */


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

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))



#define insert_query_replace "\n" \
"DELETE { ?r nao:hasProperty ?property . }\n" \
"WHERE { \n" \
"	?r a nco:PhoneNumber;\n" \
"	   nco:phoneNumber \"02141730585%d\";\n" \
"	   nao:hasProperty ?property .\n" \
"}\n" \
"\n" \
"DELETE {\n" \
"	?r a nco:CarPhoneNumber, nco:BbsNumber, nco:PagerNumber,\n" \
"	     nco:VideoTelephoneNumber, nco:MessagingNumber, nco:VoicePhoneNum" \
"ber,\n" \
"	     nco:CellPhoneNumber, nco:FaxNumber, nco:ModemNumber .\n" \
"} WHERE {\n" \
"	?r a nco:PhoneNumber;\n" \
"	   nco:phoneNumber \"02141730585%d\" .\n" \
"}\n" \
"\n" \
"INSERT {\n" \
"	_:tel a nco:PhoneNumber ;\n" \
"	      nco:phoneNumber \"02141730585%d\" .\n" \
"} WHERE {\n" \
"	OPTIONAL {\n" \
"		?r a nco:PhoneNumber;\n" \
"		   nco:phoneNumber \"02141730585%d\" .\n" \
"	}\n" \
"	FILTER(!bound(?r)) .\n" \
"}\n" \
"\n" \
"INSERT OR REPLACE { <mailto:rhome0@example.com%d> a nco:EmailAddress ;" \
"\n" \
"		nco:emailAddress \"rhome0@example.com%d\" . }\n" \
"\n" \
"DELETE { <contact:r:%d> nco:hasAffiliation ?e . ?e a rdfs:Resource }\n" \
"WHERE { <contact:r:%d> a nco:PersonContact ; nco:hasAffiliation ?e }\n" \
"\n" \
"INSERT OR REPLACE {\n" \
"	_:af1 a nco:Affiliation ;\n" \
"	      rdfs:label \"Work\" ;\n" \
"	      nco:hasEmailAddress <mailto:rhome0@example.com%d> .\n" \
"\n" \
"	_:af2 a nco:Affiliation ;\n" \
"	      rdfs:label \"Other\" ;\n" \
"	      nco:hasPhoneNumber ?tel .\n" \
"\n" \
"	<contact:r:%d> a nco:PersonContact ;\n" \
"	               nco:nameGiven \"First %d\" ;\n" \
"	               nco:nameFamily \"Last %d\" ;\n" \
"	               nco:hasAffiliation _:af1 ;\n" \
"	               nco:hasAffiliation _:af2 ;\n" \
"	               nie:contentCreated \"2011-03-14T13:47:25\" ;\n" \
"	               nco:contactUID \"c1f1b12d-bc75-4d45-9a1f-b1efe934409f\"" \
" .\n" \
"} WHERE {\n" \
"	?tel nco:phoneNumber \"02141730585%d\"\n" \
"}"
#define insert_query_original "\n" \
"DELETE { ?r nao:hasProperty ?property . }\n" \
"WHERE { \n" \
"	?r a nco:PhoneNumber; nco:phoneNumber \"2141730585%d\";\n" \
"	   nao:hasProperty ?property .\n" \
"}\n" \
"\n" \
"DELETE {\n" \
"	?r a nco:CarPhoneNumber, nco:BbsNumber, nco:PagerNumber,\n" \
"	     nco:VideoTelephoneNumber, nco:MessagingNumber, nco:VoicePhoneNum" \
"ber,\n" \
"	     nco:CellPhoneNumber, nco:FaxNumber, nco:ModemNumber .\n" \
"} WHERE {\n" \
"	?r a nco:PhoneNumber;\n" \
"	   nco:phoneNumber \"2141730585%d\" .\n" \
"}\n" \
"\n" \
"INSERT {\n" \
"	_:tel a nco:PhoneNumber ;\n" \
"	      nco:phoneNumber \"2141730585%d\" .\n" \
"} WHERE {\n" \
"	OPTIONAL {\n" \
"		?r a nco:PhoneNumber;\n" \
"		   nco:phoneNumber \"2141730585%d\" .\n" \
"	}\n" \
"	FILTER(!bound(?r)) .\n" \
"}\n" \
"\n" \
"INSERT { <mailto:home0@example.com%d> a nco:EmailAddress ;\n" \
"			nco:emailAddress \"home0@example.com%d\" . }\n" \
"\n" \
"DELETE { <contact:o:%d> nco:hasAffiliation ?e . ?e a rdfs:Resource }\n" \
"WHERE { <contact:o:%d> a nco:PersonContact ; nco:hasAffiliation ?e }\n" \
"\n" \
"DELETE { GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9> {\n" \
"    <contact:o:%d> ?predicate ?object .\n" \
"} } WHERE { GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9> {\n" \
"    <contact:o:%d> ?predicate ?object .\n" \
"    FILTER(?predicate NOT IN (nco:contactLocalUID,nco:contactUID,rdf:t" \
"ype)) .\n" \
"} }\n" \
"\n" \
"INSERT { GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9> {\n" \
"	_:af1 a nco:Affiliation ;\n" \
"	      rdfs:label \"Work\" ;\n" \
"	      nco:hasEmailAddress <mailto:home0@example.com%d> .\n" \
"\n" \
"	_:af2 a nco:Affiliation ;\n" \
"	      rdfs:label \"Other\" ;\n" \
"	      nco:hasPhoneNumber ?tel .\n" \
"\n" \
"	<contact:o:%d> a nco:PersonContact ;\n" \
"	               nco:nameGiven \"First %d\" ;\n" \
"	               nco:nameFamily \"Last %d\" ;\n" \
"	               nco:hasAffiliation _:af1 ;\n" \
"	               nco:hasAffiliation _:af2 ;\n" \
"	               nie:contentCreated \"2011-03-14T13:47:25\" ;\n" \
"	               nco:contactUID \"c1f1b12d-bc75-4d45-9a1f-b1efe934409f\"" \
" .\n" \
"} } WHERE {\n" \
"	?tel nco:phoneNumber \"2141730585%d\"\n" \
"}"
gint _vala_main (gchar** args, int args_length1);


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GError * _inner_error_ = NULL;
	{
		guint i = 0U;
		guint y = 0U;
		GTimer* timer = NULL;
		GTimer* _tmp0_ = NULL;
		TrackerSparqlConnection* c = NULL;
		TrackerSparqlConnection* _tmp1_ = NULL;
		TrackerSparqlConnection* _tmp2_ = NULL;
		gchar** _tmp3_ = NULL;
		gint _tmp3__length1 = 0;
		gboolean _tmp7_ = FALSE;
		gchar** _tmp8_ = NULL;
		gint _tmp8__length1 = 0;
		gboolean _tmp11_ = FALSE;
		gboolean _tmp38_ = FALSE;
		gchar** _tmp39_ = NULL;
		gint _tmp39__length1 = 0;
		gboolean _tmp42_ = FALSE;
#line 122 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		y = (guint) 100;
#line 123 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp0_ = g_timer_new ();
#line 123 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		timer = _tmp0_;
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp2_ = tracker_sparql_connection_get (NULL, &_inner_error_);
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp1_ = _tmp2_;
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		if (_inner_error_ != NULL) {
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_g_object_unref0 (c);
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_g_timer_destroy0 (timer);
#line 61 "test-insert-or-replace.c"
			goto __catch0_g_error;
		}
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_g_object_unref0 (c);
#line 125 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		c = _tmp1_;
#line 127 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp3_ = args;
#line 127 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp3__length1 = args_length1;
#line 127 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		if (_tmp3__length1 == 3) {
#line 74 "test-insert-or-replace.c"
			gchar** _tmp4_ = NULL;
			gint _tmp4__length1 = 0;
			const gchar* _tmp5_ = NULL;
			gint _tmp6_ = 0;
#line 128 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp4_ = args;
#line 128 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp4__length1 = args_length1;
#line 128 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp5_ = _tmp4_[2];
#line 128 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp6_ = atoi (_tmp5_);
#line 128 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			y = (guint) _tmp6_;
#line 89 "test-insert-or-replace.c"
		}
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp8_ = args;
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp8__length1 = args_length1;
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		if (_tmp8__length1 == 1) {
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp7_ = TRUE;
#line 99 "test-insert-or-replace.c"
		} else {
			gchar** _tmp9_ = NULL;
			gint _tmp9__length1 = 0;
			const gchar* _tmp10_ = NULL;
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp9_ = args;
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp9__length1 = args_length1;
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp10_ = _tmp9_[1];
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp7_ = g_strcmp0 (_tmp10_, "replace") == 0;
#line 112 "test-insert-or-replace.c"
		}
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp11_ = _tmp7_;
#line 131 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		if (_tmp11_) {
#line 118 "test-insert-or-replace.c"
			GTimer* _tmp12_ = NULL;
			GTimer* _tmp34_ = NULL;
			guint _tmp35_ = 0U;
			GTimer* _tmp36_ = NULL;
			gdouble _tmp37_ = 0.0;
#line 132 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp12_ = timer;
#line 132 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			g_timer_start (_tmp12_);
#line 128 "test-insert-or-replace.c"
			{
				gboolean _tmp13_ = FALSE;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
				i = (guint) 0;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
				_tmp13_ = TRUE;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
				while (TRUE) {
#line 137 "test-insert-or-replace.c"
					gboolean _tmp14_ = FALSE;
					guint _tmp16_ = 0U;
					guint _tmp17_ = 0U;
					TrackerSparqlConnection* _tmp18_ = NULL;
					guint _tmp19_ = 0U;
					guint _tmp20_ = 0U;
					guint _tmp21_ = 0U;
					guint _tmp22_ = 0U;
					guint _tmp23_ = 0U;
					guint _tmp24_ = 0U;
					guint _tmp25_ = 0U;
					guint _tmp26_ = 0U;
					guint _tmp27_ = 0U;
					guint _tmp28_ = 0U;
					guint _tmp29_ = 0U;
					guint _tmp30_ = 0U;
					guint _tmp31_ = 0U;
					gchar* _tmp32_ = NULL;
					gchar* _tmp33_ = NULL;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp14_ = _tmp13_;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					if (!_tmp14_) {
#line 161 "test-insert-or-replace.c"
						guint _tmp15_ = 0U;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						_tmp15_ = i;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						i = _tmp15_ + 1;
#line 167 "test-insert-or-replace.c"
					}
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp13_ = FALSE;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp16_ = i;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp17_ = y;
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					if (!(_tmp16_ < _tmp17_)) {
#line 133 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						break;
#line 179 "test-insert-or-replace.c"
					}
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp18_ = c;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp19_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp20_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp21_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp22_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp23_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp24_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp25_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp26_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp27_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp28_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp29_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp30_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp31_ = i;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp32_ = g_strdup_printf (insert_query_replace, _tmp19_, _tmp20_, _tmp21_, _tmp22_, _tmp23_, _tmp24_, _tmp25_, _tmp26_, _tmp27_, _tmp28_, _tmp29_, _tmp30_, _tmp31_);
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp33_ = _tmp32_;
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					tracker_sparql_connection_update (_tmp18_, _tmp33_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_g_free0 (_tmp33_);
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					if (_inner_error_ != NULL) {
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						_g_object_unref0 (c);
#line 134 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						_g_timer_destroy0 (timer);
#line 223 "test-insert-or-replace.c"
						goto __catch0_g_error;
					}
				}
			}
#line 136 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp34_ = timer;
#line 136 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			g_timer_stop (_tmp34_);
#line 138 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp35_ = y;
#line 138 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp36_ = timer;
#line 138 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp37_ = g_timer_elapsed (_tmp36_, NULL);
#line 138 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			g_print ("REPLACE  : %u contacts: %f\n", _tmp35_, _tmp37_);
#line 240 "test-insert-or-replace.c"
		}
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp39_ = args;
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp39__length1 = args_length1;
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		if (_tmp39__length1 == 1) {
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp38_ = TRUE;
#line 250 "test-insert-or-replace.c"
		} else {
			gchar** _tmp40_ = NULL;
			gint _tmp40__length1 = 0;
			const gchar* _tmp41_ = NULL;
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp40_ = args;
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp40__length1 = args_length1;
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp41_ = _tmp40_[1];
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp38_ = g_strcmp0 (_tmp41_, "original") == 0;
#line 263 "test-insert-or-replace.c"
		}
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp42_ = _tmp38_;
#line 142 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		if (_tmp42_) {
#line 269 "test-insert-or-replace.c"
			GTimer* _tmp43_ = NULL;
			GTimer* _tmp67_ = NULL;
			guint _tmp68_ = 0U;
			GTimer* _tmp69_ = NULL;
			gdouble _tmp70_ = 0.0;
#line 143 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp43_ = timer;
#line 143 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			g_timer_start (_tmp43_);
#line 279 "test-insert-or-replace.c"
			{
				gboolean _tmp44_ = FALSE;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
				i = (guint) 0;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
				_tmp44_ = TRUE;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
				while (TRUE) {
#line 288 "test-insert-or-replace.c"
					gboolean _tmp45_ = FALSE;
					guint _tmp47_ = 0U;
					guint _tmp48_ = 0U;
					TrackerSparqlConnection* _tmp49_ = NULL;
					guint _tmp50_ = 0U;
					guint _tmp51_ = 0U;
					guint _tmp52_ = 0U;
					guint _tmp53_ = 0U;
					guint _tmp54_ = 0U;
					guint _tmp55_ = 0U;
					guint _tmp56_ = 0U;
					guint _tmp57_ = 0U;
					guint _tmp58_ = 0U;
					guint _tmp59_ = 0U;
					guint _tmp60_ = 0U;
					guint _tmp61_ = 0U;
					guint _tmp62_ = 0U;
					guint _tmp63_ = 0U;
					guint _tmp64_ = 0U;
					gchar* _tmp65_ = NULL;
					gchar* _tmp66_ = NULL;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp45_ = _tmp44_;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					if (!_tmp45_) {
#line 314 "test-insert-or-replace.c"
						guint _tmp46_ = 0U;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						_tmp46_ = i;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						i = _tmp46_ + 1;
#line 320 "test-insert-or-replace.c"
					}
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp44_ = FALSE;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp47_ = i;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp48_ = y;
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					if (!(_tmp47_ < _tmp48_)) {
#line 144 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						break;
#line 332 "test-insert-or-replace.c"
					}
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp49_ = c;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp50_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp51_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp52_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp53_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp54_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp55_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp56_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp57_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp58_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp59_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp60_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp61_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp62_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp63_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp64_ = i;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp65_ = g_strdup_printf (insert_query_original, _tmp50_, _tmp51_, _tmp52_, _tmp53_, _tmp54_, _tmp55_, _tmp56_, _tmp57_, _tmp58_, _tmp59_, _tmp60_, _tmp61_, _tmp62_, _tmp63_, _tmp64_);
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_tmp66_ = _tmp65_;
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					tracker_sparql_connection_update (_tmp49_, _tmp66_, G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					_g_free0 (_tmp66_);
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
					if (_inner_error_ != NULL) {
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						_g_object_unref0 (c);
#line 145 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
						_g_timer_destroy0 (timer);
#line 380 "test-insert-or-replace.c"
						goto __catch0_g_error;
					}
				}
			}
#line 147 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp67_ = timer;
#line 147 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			g_timer_stop (_tmp67_);
#line 149 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp68_ = y;
#line 149 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp69_ = timer;
#line 149 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			_tmp70_ = g_timer_elapsed (_tmp69_, NULL);
#line 149 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
			g_print ("ORIGINAL : %u contacts: %f\n", _tmp68_, _tmp70_);
#line 397 "test-insert-or-replace.c"
		}
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_g_object_unref0 (c);
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_g_timer_destroy0 (timer);
#line 403 "test-insert-or-replace.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp71_ = NULL;
		const gchar* _tmp72_ = NULL;
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		e = _inner_error_;
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_inner_error_ = NULL;
#line 152 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp71_ = e;
#line 152 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_tmp72_ = _tmp71_->message;
#line 152 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		g_critical ("test-insert-or-replace.vala:152: %s", _tmp72_);
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		_g_error_free0 (e);
#line 423 "test-insert-or-replace.c"
	}
	__finally0:
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
	if (_inner_error_ != NULL) {
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		g_clear_error (&_inner_error_);
#line 121 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
		return 0;
#line 434 "test-insert-or-replace.c"
	}
#line 155 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
	result = 0;
#line 155 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
	return result;
#line 440 "test-insert-or-replace.c"
}


int main (int argc, char ** argv) {
#line 120 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
	g_type_init ();
#line 120 "/home/martyn/Source/checkout/gnome/tracker/tests/functional-tests/ipc/test-insert-or-replace.vala"
	return _vala_main (argv, argc);
#line 449 "test-insert-or-replace.c"
}



