/* tracker-sparql-pattern.c generated by valac 0.14.0, the Vala compiler
 * generated from tracker-sparql-pattern.vala, do not modify */

/*
 * Copyright (C) 2008-2010, Nokia
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser 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 <stdlib.h>
#include <string.h>
#include <libtracker-data/tracker-class.h>
#include <libtracker-sparql/tracker-sparql.h>
#include <libtracker-data/tracker-data-query.h>
#include <libtracker-data/tracker-data-update.h>
#include <libtracker-data/tracker-data-backup.h>
#include <libtracker-data/tracker-db-interface.h>
#include <libtracker-data/tracker-db-manager.h>
#include <libtracker-data/tracker-ontologies.h>
#include <libtracker-data/tracker-property.h>


#define TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE (tracker_sparql_predicate_variable_get_type ())
#define TRACKER_SPARQL_PREDICATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariable))
#define TRACKER_SPARQL_PREDICATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariableClass))
#define TRACKER_SPARQL_IS_PREDICATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE))
#define TRACKER_SPARQL_IS_PREDICATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE))
#define TRACKER_SPARQL_PREDICATE_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariableClass))

typedef struct _TrackerSparqlPredicateVariable TrackerSparqlPredicateVariable;
typedef struct _TrackerSparqlPredicateVariableClass TrackerSparqlPredicateVariableClass;
typedef struct _TrackerSparqlPredicateVariablePrivate TrackerSparqlPredicateVariablePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TRACKER_SPARQL_TYPE_QUERY (tracker_sparql_query_get_type ())
#define TRACKER_SPARQL_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQuery))
#define TRACKER_SPARQL_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryClass))
#define TRACKER_SPARQL_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_QUERY))
#define TRACKER_SPARQL_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_QUERY))
#define TRACKER_SPARQL_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryClass))

typedef struct _TrackerSparqlQuery TrackerSparqlQuery;
typedef struct _TrackerSparqlQueryClass TrackerSparqlQueryClass;
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

#define TRACKER_SPARQL_TYPE_DATA_BINDING (tracker_sparql_data_binding_get_type ())
#define TRACKER_SPARQL_DATA_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding))
#define TRACKER_SPARQL_DATA_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingClass))
#define TRACKER_SPARQL_IS_DATA_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING))
#define TRACKER_SPARQL_IS_DATA_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_DATA_BINDING))
#define TRACKER_SPARQL_DATA_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingClass))

typedef struct _TrackerSparqlDataBinding TrackerSparqlDataBinding;
typedef struct _TrackerSparqlDataBindingClass TrackerSparqlDataBindingClass;

#define TRACKER_SPARQL_TYPE_LITERAL_BINDING (tracker_sparql_literal_binding_get_type ())
#define TRACKER_SPARQL_LITERAL_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBinding))
#define TRACKER_SPARQL_LITERAL_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBindingClass))
#define TRACKER_SPARQL_IS_LITERAL_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING))
#define TRACKER_SPARQL_IS_LITERAL_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_LITERAL_BINDING))
#define TRACKER_SPARQL_LITERAL_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBindingClass))

typedef struct _TrackerSparqlLiteralBinding TrackerSparqlLiteralBinding;
typedef struct _TrackerSparqlLiteralBindingClass TrackerSparqlLiteralBindingClass;
typedef struct _TrackerSparqlDataBindingPrivate TrackerSparqlDataBindingPrivate;

#define TRACKER_SPARQL_TYPE_DATA_TABLE (tracker_sparql_data_table_get_type ())
#define TRACKER_SPARQL_DATA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTable))
#define TRACKER_SPARQL_DATA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTableClass))
#define TRACKER_SPARQL_IS_DATA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE))
#define TRACKER_SPARQL_IS_DATA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_DATA_TABLE))
#define TRACKER_SPARQL_DATA_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTableClass))

typedef struct _TrackerSparqlDataTable TrackerSparqlDataTable;
typedef struct _TrackerSparqlDataTableClass TrackerSparqlDataTableClass;
typedef struct _TrackerSparqlLiteralBindingPrivate TrackerSparqlLiteralBindingPrivate;
typedef struct _TrackerSparqlQueryPrivate TrackerSparqlQueryPrivate;

#define TRACKER_SPARQL_TYPE_EXPRESSION (tracker_sparql_expression_get_type ())
#define TRACKER_SPARQL_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpression))
#define TRACKER_SPARQL_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpressionClass))
#define TRACKER_SPARQL_IS_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_EXPRESSION))
#define TRACKER_SPARQL_IS_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_EXPRESSION))
#define TRACKER_SPARQL_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpressionClass))

typedef struct _TrackerSparqlExpression TrackerSparqlExpression;
typedef struct _TrackerSparqlExpressionClass TrackerSparqlExpressionClass;

#define TRACKER_SPARQL_TYPE_PATTERN (tracker_sparql_pattern_get_type ())
#define TRACKER_SPARQL_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPattern))
#define TRACKER_SPARQL_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternClass))
#define TRACKER_SPARQL_IS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_PATTERN))
#define TRACKER_SPARQL_IS_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_PATTERN))
#define TRACKER_SPARQL_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternClass))

typedef struct _TrackerSparqlPattern TrackerSparqlPattern;
typedef struct _TrackerSparqlPatternClass TrackerSparqlPatternClass;

#define TRACKER_SPARQL_TYPE_CONTEXT (tracker_sparql_context_get_type ())
#define TRACKER_SPARQL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContext))
#define TRACKER_SPARQL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContextClass))
#define TRACKER_SPARQL_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_CONTEXT))
#define TRACKER_SPARQL_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_CONTEXT))
#define TRACKER_SPARQL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContextClass))

typedef struct _TrackerSparqlContext TrackerSparqlContext;
typedef struct _TrackerSparqlContextClass TrackerSparqlContextClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TrackerSparqlPatternPrivate TrackerSparqlPatternPrivate;

#define TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT (tracker_sparql_pattern_triple_context_get_type ())
#define TRACKER_SPARQL_PATTERN_TRIPLE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT, TrackerSparqlPatternTripleContext))
#define TRACKER_SPARQL_PATTERN_TRIPLE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT, TrackerSparqlPatternTripleContextClass))
#define TRACKER_SPARQL_PATTERN_IS_TRIPLE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT))
#define TRACKER_SPARQL_PATTERN_IS_TRIPLE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT))
#define TRACKER_SPARQL_PATTERN_TRIPLE_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT, TrackerSparqlPatternTripleContextClass))

typedef struct _TrackerSparqlPatternTripleContext TrackerSparqlPatternTripleContext;
typedef struct _TrackerSparqlPatternTripleContextClass TrackerSparqlPatternTripleContextClass;
#define _tracker_sparql_context_unref0(var) ((var == NULL) ? NULL : (var = (tracker_sparql_context_unref (var), NULL)))

#define TRACKER_TYPE_SPARQL_TOKEN_TYPE (tracker_sparql_token_type_get_type ())

#define TRACKER_TYPE_SOURCE_LOCATION (tracker_source_location_get_type ())
typedef struct _TrackerSourceLocation TrackerSourceLocation;

#define TRACKER_SPARQL_TYPE_SELECT_CONTEXT (tracker_sparql_select_context_get_type ())
#define TRACKER_SPARQL_SELECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContext))
#define TRACKER_SPARQL_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContextClass))
#define TRACKER_SPARQL_IS_SELECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT))
#define TRACKER_SPARQL_IS_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_SELECT_CONTEXT))
#define TRACKER_SPARQL_SELECT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContextClass))

typedef struct _TrackerSparqlSelectContext TrackerSparqlSelectContext;
typedef struct _TrackerSparqlSelectContextClass TrackerSparqlSelectContextClass;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
typedef struct _TrackerSparqlContextPrivate TrackerSparqlContextPrivate;

#define TRACKER_SPARQL_TYPE_VARIABLE (tracker_sparql_variable_get_type ())
#define TRACKER_SPARQL_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable))
#define TRACKER_SPARQL_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariableClass))
#define TRACKER_SPARQL_IS_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE))
#define TRACKER_SPARQL_IS_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE))
#define TRACKER_SPARQL_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariableClass))

typedef struct _TrackerSparqlVariable TrackerSparqlVariable;
typedef struct _TrackerSparqlVariableClass TrackerSparqlVariableClass;

#define TRACKER_SPARQL_TYPE_VARIABLE_STATE (tracker_sparql_variable_state_get_type ())
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _TrackerSparqlVariablePrivate TrackerSparqlVariablePrivate;

#define TRACKER_SPARQL_TYPE_VARIABLE_BINDING (tracker_sparql_variable_binding_get_type ())
#define TRACKER_SPARQL_VARIABLE_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBinding))
#define TRACKER_SPARQL_VARIABLE_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBindingClass))
#define TRACKER_SPARQL_IS_VARIABLE_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING))
#define TRACKER_SPARQL_IS_VARIABLE_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING))
#define TRACKER_SPARQL_VARIABLE_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBindingClass))

typedef struct _TrackerSparqlVariableBinding TrackerSparqlVariableBinding;
typedef struct _TrackerSparqlVariableBindingClass TrackerSparqlVariableBindingClass;
typedef struct _TrackerSparqlSelectContextPrivate TrackerSparqlSelectContextPrivate;
typedef struct _TrackerSparqlPatternTripleContextPrivate TrackerSparqlPatternTripleContextPrivate;

#define TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST (tracker_sparql_variable_binding_list_get_type ())
#define TRACKER_SPARQL_VARIABLE_BINDING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingList))
#define TRACKER_SPARQL_VARIABLE_BINDING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingListClass))
#define TRACKER_SPARQL_IS_VARIABLE_BINDING_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST))
#define TRACKER_SPARQL_IS_VARIABLE_BINDING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST))
#define TRACKER_SPARQL_VARIABLE_BINDING_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingListClass))

typedef struct _TrackerSparqlVariableBindingList TrackerSparqlVariableBindingList;
typedef struct _TrackerSparqlVariableBindingListClass TrackerSparqlVariableBindingListClass;
typedef struct _TrackerSparqlDataTablePrivate TrackerSparqlDataTablePrivate;
typedef struct _TrackerSparqlVariableBindingListPrivate TrackerSparqlVariableBindingListPrivate;
typedef struct _TrackerSparqlVariableBindingPrivate TrackerSparqlVariableBindingPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

struct _TrackerSparqlPredicateVariable {
	GObject parent_instance;
	TrackerSparqlPredicateVariablePrivate * priv;
	gchar* subject;
	gchar* object;
	gboolean return_graph;
	TrackerClass* domain;
};

struct _TrackerSparqlPredicateVariableClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlDataBinding {
	GObject parent_instance;
	TrackerSparqlDataBindingPrivate * priv;
	TrackerPropertyType data_type;
	TrackerSparqlDataTable* table;
	gchar* sql_db_column_name;
};

struct _TrackerSparqlDataBindingClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlLiteralBinding {
	TrackerSparqlDataBinding parent_instance;
	TrackerSparqlLiteralBindingPrivate * priv;
	gboolean is_fts_match;
	gchar* literal;
};

struct _TrackerSparqlLiteralBindingClass {
	TrackerSparqlDataBindingClass parent_class;
};

struct _TrackerSparqlQuery {
	GObject parent_instance;
	TrackerSparqlQueryPrivate * priv;
	TrackerSparqlExpression* expression;
	TrackerSparqlPattern* pattern;
	GList* bindings;
	TrackerSparqlContext* context;
	gint last_var_index;
};

struct _TrackerSparqlQueryClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlPattern {
	GObject parent_instance;
	TrackerSparqlPatternPrivate * priv;
	gchar* current_graph;
};

struct _TrackerSparqlPatternClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlPatternPrivate {
	TrackerSparqlQuery* query;
	TrackerSparqlExpression* expression;
	gint counter;
	gint next_table_index;
	gboolean current_graph_is_var;
	gchar* current_subject;
	gboolean current_subject_is_var;
	gchar* current_predicate;
	gboolean current_predicate_is_var;
	TrackerSparqlPatternTripleContext* triple_context;
};

typedef enum  {
	TRACKER_SPARQL_TOKEN_TYPE_NONE,
	TRACKER_SPARQL_TOKEN_TYPE_A,
	TRACKER_SPARQL_TOKEN_TYPE_AS,
	TRACKER_SPARQL_TOKEN_TYPE_ASC,
	TRACKER_SPARQL_TOKEN_TYPE_ASK,
	TRACKER_SPARQL_TOKEN_TYPE_ATBASE,
	TRACKER_SPARQL_TOKEN_TYPE_ATPREFIX,
	TRACKER_SPARQL_TOKEN_TYPE_AVG,
	TRACKER_SPARQL_TOKEN_TYPE_BASE,
	TRACKER_SPARQL_TOKEN_TYPE_BLANK_NODE,
	TRACKER_SPARQL_TOKEN_TYPE_BOUND,
	TRACKER_SPARQL_TOKEN_TYPE_BY,
	TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE,
	TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACKET,
	TRACKER_SPARQL_TOKEN_TYPE_CLOSE_PARENS,
	TRACKER_SPARQL_TOKEN_TYPE_COALESCE,
	TRACKER_SPARQL_TOKEN_TYPE_COLON,
	TRACKER_SPARQL_TOKEN_TYPE_COMMA,
	TRACKER_SPARQL_TOKEN_TYPE_CONSTRUCT,
	TRACKER_SPARQL_TOKEN_TYPE_COUNT,
	TRACKER_SPARQL_TOKEN_TYPE_DATA,
	TRACKER_SPARQL_TOKEN_TYPE_DATATYPE,
	TRACKER_SPARQL_TOKEN_TYPE_DECIMAL,
	TRACKER_SPARQL_TOKEN_TYPE_DELETE,
	TRACKER_SPARQL_TOKEN_TYPE_DESC,
	TRACKER_SPARQL_TOKEN_TYPE_DESCRIBE,
	TRACKER_SPARQL_TOKEN_TYPE_DISTINCT,
	TRACKER_SPARQL_TOKEN_TYPE_DIV,
	TRACKER_SPARQL_TOKEN_TYPE_DOT,
	TRACKER_SPARQL_TOKEN_TYPE_DOUBLE,
	TRACKER_SPARQL_TOKEN_TYPE_DOUBLE_CIRCUMFLEX,
	TRACKER_SPARQL_TOKEN_TYPE_DROP,
	TRACKER_SPARQL_TOKEN_TYPE_EOF,
	TRACKER_SPARQL_TOKEN_TYPE_EXISTS,
	TRACKER_SPARQL_TOKEN_TYPE_FALSE,
	TRACKER_SPARQL_TOKEN_TYPE_FILTER,
	TRACKER_SPARQL_TOKEN_TYPE_FROM,
	TRACKER_SPARQL_TOKEN_TYPE_GRAPH,
	TRACKER_SPARQL_TOKEN_TYPE_GROUP,
	TRACKER_SPARQL_TOKEN_TYPE_GROUP_CONCAT,
	TRACKER_SPARQL_TOKEN_TYPE_HAVING,
	TRACKER_SPARQL_TOKEN_TYPE_IF,
	TRACKER_SPARQL_TOKEN_TYPE_INSERT,
	TRACKER_SPARQL_TOKEN_TYPE_INTEGER,
	TRACKER_SPARQL_TOKEN_TYPE_INTO,
	TRACKER_SPARQL_TOKEN_TYPE_IRI_REF,
	TRACKER_SPARQL_TOKEN_TYPE_ISBLANK,
	TRACKER_SPARQL_TOKEN_TYPE_ISIRI,
	TRACKER_SPARQL_TOKEN_TYPE_ISLITERAL,
	TRACKER_SPARQL_TOKEN_TYPE_ISURI,
	TRACKER_SPARQL_TOKEN_TYPE_LANG,
	TRACKER_SPARQL_TOKEN_TYPE_LANGMATCHES,
	TRACKER_SPARQL_TOKEN_TYPE_LIMIT,
	TRACKER_SPARQL_TOKEN_TYPE_MAX,
	TRACKER_SPARQL_TOKEN_TYPE_MIN,
	TRACKER_SPARQL_TOKEN_TYPE_MINUS,
	TRACKER_SPARQL_TOKEN_TYPE_NAMED,
	TRACKER_SPARQL_TOKEN_TYPE_NOT,
	TRACKER_SPARQL_TOKEN_TYPE_NULL,
	TRACKER_SPARQL_TOKEN_TYPE_OFFSET,
	TRACKER_SPARQL_TOKEN_TYPE_OP_AND,
	TRACKER_SPARQL_TOKEN_TYPE_OP_EQ,
	TRACKER_SPARQL_TOKEN_TYPE_OP_GE,
	TRACKER_SPARQL_TOKEN_TYPE_OP_GT,
	TRACKER_SPARQL_TOKEN_TYPE_OP_LE,
	TRACKER_SPARQL_TOKEN_TYPE_OP_LT,
	TRACKER_SPARQL_TOKEN_TYPE_OP_NE,
	TRACKER_SPARQL_TOKEN_TYPE_OP_NEG,
	TRACKER_SPARQL_TOKEN_TYPE_OP_OR,
	TRACKER_SPARQL_TOKEN_TYPE_OP_IN,
	TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE,
	TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACKET,
	TRACKER_SPARQL_TOKEN_TYPE_OPEN_PARENS,
	TRACKER_SPARQL_TOKEN_TYPE_OPTIONAL,
	TRACKER_SPARQL_TOKEN_TYPE_OR,
	TRACKER_SPARQL_TOKEN_TYPE_ORDER,
	TRACKER_SPARQL_TOKEN_TYPE_PLUS,
	TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX,
	TRACKER_SPARQL_TOKEN_TYPE_PREFIX,
	TRACKER_SPARQL_TOKEN_TYPE_REDUCED,
	TRACKER_SPARQL_TOKEN_TYPE_REGEX,
	TRACKER_SPARQL_TOKEN_TYPE_REPLACE,
	TRACKER_SPARQL_TOKEN_TYPE_SAMETERM,
	TRACKER_SPARQL_TOKEN_TYPE_SELECT,
	TRACKER_SPARQL_TOKEN_TYPE_SEMICOLON,
	TRACKER_SPARQL_TOKEN_TYPE_SILENT,
	TRACKER_SPARQL_TOKEN_TYPE_STAR,
	TRACKER_SPARQL_TOKEN_TYPE_STR,
	TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL1,
	TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL2,
	TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG1,
	TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG2,
	TRACKER_SPARQL_TOKEN_TYPE_SUM,
	TRACKER_SPARQL_TOKEN_TYPE_TRUE,
	TRACKER_SPARQL_TOKEN_TYPE_UNION,
	TRACKER_SPARQL_TOKEN_TYPE_VAR,
	TRACKER_SPARQL_TOKEN_TYPE_WHERE,
	TRACKER_SPARQL_TOKEN_TYPE_WITH
} TrackerSparqlTokenType;

struct _TrackerSourceLocation {
	gchar* pos;
	gint line;
	gint column;
};

struct _TrackerSparqlContext {
	GTypeInstance parent_instance;
	volatile int ref_count;
	TrackerSparqlContextPrivate * priv;
	TrackerSparqlQuery* query;
	TrackerSparqlContext* parent_context;
	GHashTable* var_set;
	GHashTable* var_map;
	GHashTable* select_var_set;
	GHashTable* predicate_variable_map;
	gboolean scalar_subquery;
};

struct _TrackerSparqlContextClass {
	GTypeClass parent_class;
	void (*finalize) (TrackerSparqlContext *self);
};

typedef enum  {
	TRACKER_SPARQL_VARIABLE_STATE_NONE,
	TRACKER_SPARQL_VARIABLE_STATE_BOUND,
	TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL
} TrackerSparqlVariableState;

struct _TrackerSparqlVariable {
	GObject parent_instance;
	TrackerSparqlVariablePrivate * priv;
	TrackerSparqlVariableBinding* binding;
};

struct _TrackerSparqlVariableClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlSelectContext {
	TrackerSparqlContext parent_instance;
	TrackerSparqlSelectContextPrivate * priv;
	TrackerPropertyType type;
	TrackerPropertyType* types;
	gint types_length1;
	gint _types_size_;
	gchar** variable_names;
	gint variable_names_length1;
	gint _variable_names_size_;
};

struct _TrackerSparqlSelectContextClass {
	TrackerSparqlContextClass parent_class;
};

struct _TrackerSparqlPatternTripleContext {
	TrackerSparqlContext parent_instance;
	TrackerSparqlPatternTripleContextPrivate * priv;
	GList* tables;
	GHashTable* table_map;
	GList* bindings;
	GList* variables;
	GHashTable* var_bindings;
};

struct _TrackerSparqlPatternTripleContextClass {
	TrackerSparqlContextClass parent_class;
};

struct _TrackerSparqlDataTable {
	GObject parent_instance;
	TrackerSparqlDataTablePrivate * priv;
	gchar* sql_db_tablename;
	gchar* sql_query_tablename;
	TrackerSparqlPredicateVariable* predicate_variable;
};

struct _TrackerSparqlDataTableClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlVariableBindingList {
	GObject parent_instance;
	TrackerSparqlVariableBindingListPrivate * priv;
	GList* list;
};

struct _TrackerSparqlVariableBindingListClass {
	GObjectClass parent_class;
};

struct _TrackerSparqlVariableBinding {
	TrackerSparqlDataBinding parent_instance;
	TrackerSparqlVariableBindingPrivate * priv;
	TrackerSparqlVariable* variable;
	gboolean maybe_null;
	gboolean in_simple_optional;
	TrackerClass* type;
};

struct _TrackerSparqlVariableBindingClass {
	TrackerSparqlDataBindingClass parent_class;
};


static gpointer tracker_sparql_predicate_variable_parent_class = NULL;
static gpointer tracker_sparql_pattern_parent_class = NULL;
static gpointer tracker_sparql_pattern_triple_context_parent_class = NULL;

GType tracker_sparql_predicate_variable_get_type (void) G_GNUC_CONST;
enum  {
	TRACKER_SPARQL_PREDICATE_VARIABLE_DUMMY_PROPERTY
};
GType tracker_sparql_query_get_type (void) G_GNUC_CONST;
gchar* tracker_sparql_predicate_variable_get_sql_query (TrackerSparqlPredicateVariable* self, TrackerSparqlQuery* query, GError** error);
void tracker_sparql_expression_append_expression_as_string (GString* sql, const gchar* expression, TrackerPropertyType type);
TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_new (void);
TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_construct (GType object_type);
GType tracker_sparql_data_binding_get_type (void) G_GNUC_CONST;
GType tracker_sparql_literal_binding_get_type (void) G_GNUC_CONST;
GType tracker_sparql_data_table_get_type (void) G_GNUC_CONST;
GType tracker_sparql_expression_get_type (void) G_GNUC_CONST;
GType tracker_sparql_pattern_get_type (void) G_GNUC_CONST;
gpointer tracker_sparql_context_ref (gpointer instance);
void tracker_sparql_context_unref (gpointer instance);
GParamSpec* tracker_sparql_param_spec_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void tracker_sparql_value_set_context (GValue* value, gpointer v_object);
void tracker_sparql_value_take_context (GValue* value, gpointer v_object);
gpointer tracker_sparql_value_get_context (const GValue* value);
GType tracker_sparql_context_get_type (void) G_GNUC_CONST;
GError* tracker_sparql_query_get_internal_error (TrackerSparqlQuery* self, const gchar* msg);
TrackerSparqlPredicateVariable* tracker_sparql_predicate_variable_new (void);
TrackerSparqlPredicateVariable* tracker_sparql_predicate_variable_construct (GType object_type);
static void tracker_sparql_predicate_variable_finalize (GObject* obj);
static GType tracker_sparql_pattern_triple_context_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define TRACKER_SPARQL_PATTERN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternPrivate))
enum  {
	TRACKER_SPARQL_PATTERN_DUMMY_PROPERTY
};
TrackerSparqlPattern* tracker_sparql_pattern_new (TrackerSparqlQuery* query);
TrackerSparqlPattern* tracker_sparql_pattern_construct (GType object_type, TrackerSparqlQuery* query);
static inline gboolean tracker_sparql_pattern_next (TrackerSparqlPattern* self, GError** error);
gboolean tracker_sparql_query_next (TrackerSparqlQuery* self, GError** error);
GType tracker_sparql_token_type_get_type (void) G_GNUC_CONST;
static inline TrackerSparqlTokenType tracker_sparql_pattern_current (TrackerSparqlPattern* self);
TrackerSparqlTokenType tracker_sparql_query_current (TrackerSparqlQuery* self);
static inline gboolean tracker_sparql_pattern_accept (TrackerSparqlPattern* self, TrackerSparqlTokenType type, GError** error);
gboolean tracker_sparql_query_accept (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error);
static GError* tracker_sparql_pattern_get_error (TrackerSparqlPattern* self, const gchar* msg);
GError* tracker_sparql_query_get_error (TrackerSparqlQuery* self, const gchar* msg);
static gboolean tracker_sparql_pattern_expect (TrackerSparqlPattern* self, TrackerSparqlTokenType type, GError** error);
gboolean tracker_sparql_query_expect (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error);
GType tracker_source_location_get_type (void) G_GNUC_CONST;
TrackerSourceLocation* tracker_source_location_dup (const TrackerSourceLocation* self);
void tracker_source_location_free (TrackerSourceLocation* self);
static void tracker_sparql_pattern_get_location (TrackerSparqlPattern* self, TrackerSourceLocation* result);
void tracker_sparql_query_get_location (TrackerSparqlQuery* self, TrackerSourceLocation* result);
static void tracker_sparql_pattern_set_location (TrackerSparqlPattern* self, TrackerSourceLocation* location);
void tracker_sparql_query_set_location (TrackerSparqlQuery* self, TrackerSourceLocation* location);
static gchar* tracker_sparql_pattern_get_last_string (TrackerSparqlPattern* self, gint strip);
gchar* tracker_sparql_query_get_last_string (TrackerSparqlQuery* self, gint strip);
GType tracker_sparql_select_context_get_type (void) G_GNUC_CONST;
TrackerSparqlSelectContext* tracker_sparql_pattern_translate_select (TrackerSparqlPattern* self, GString* sql, gboolean subquery, gboolean scalar_subquery, GError** error);
static TrackerSparqlContext* tracker_sparql_pattern_get_context (TrackerSparqlPattern* self);
TrackerSparqlSelectContext* tracker_sparql_select_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
TrackerSparqlSelectContext* tracker_sparql_select_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
TrackerSparqlSelectContext* tracker_sparql_select_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
TrackerSparqlSelectContext* tracker_sparql_select_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
static void tracker_sparql_pattern_set_context (TrackerSparqlPattern* self, TrackerSparqlContext* value);
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
void tracker_sparql_expression_skip_select_variables (TrackerSparqlExpression* self, GError** error);
TrackerSparqlContext* tracker_sparql_pattern_translate_group_graph_pattern (TrackerSparqlPattern* self, GString* sql, GError** error);
GType tracker_sparql_variable_get_type (void) G_GNUC_CONST;
GType tracker_sparql_variable_state_get_type (void) G_GNUC_CONST;
GType tracker_sparql_variable_binding_get_type (void) G_GNUC_CONST;
const gchar* tracker_sparql_variable_get_name (TrackerSparqlVariable* self);
const gchar* tracker_sparql_variable_get_sql_expression (TrackerSparqlVariable* self);
static void _vala_array_add3 (TrackerPropertyType** array, int* length, int* size, TrackerPropertyType value);
static void _vala_array_add4 (gchar*** array, int* length, int* size, gchar* value);
TrackerPropertyType tracker_sparql_expression_translate_select_expression (TrackerSparqlExpression* self, GString* sql, gboolean subquery, gint variable_index, GError** error);
static void _vala_array_add5 (TrackerPropertyType** array, int* length, int* size, TrackerPropertyType value);
TrackerPropertyType tracker_sparql_expression_translate_expression (TrackerSparqlExpression* self, GString* sql, GError** error);
TrackerPropertyType tracker_sparql_expression_translate_constraint (TrackerSparqlExpression* self, GString* sql, GError** error);
void tracker_sparql_expression_translate_order_condition (TrackerSparqlExpression* self, GString* sql, GError** error);
void tracker_sparql_pattern_translate_exists (TrackerSparqlPattern* self, GString* sql, GError** error);
gchar* tracker_sparql_pattern_parse_var_or_term (TrackerSparqlPattern* self, GString* sql, gboolean* is_var, GError** error);
gchar* tracker_sparql_query_resolve_prefixed_name (TrackerSparqlQuery* self, const gchar* prefix, const gchar* local_name, GError** error);
gchar* tracker_sparql_query_generate_bnodeid (TrackerSparqlQuery* self, const gchar* user_bnodeid);
gchar* tracker_sparql_expression_parse_string_literal (TrackerSparqlExpression* self, TrackerPropertyType* type, GError** error);
static void tracker_sparql_pattern_parse_property_list_not_empty (TrackerSparqlPattern* self, GString* sql, gboolean in_simple_optional, GError** error);
static void tracker_sparql_pattern_parse_object_list (TrackerSparqlPattern* self, GString* sql, gboolean in_simple_optional, GError** error);
static void tracker_sparql_pattern_parse_object (TrackerSparqlPattern* self, GString* sql, gboolean in_simple_optional, GError** error);
static void tracker_sparql_pattern_translate_filter (TrackerSparqlPattern* self, GString* sql, GError** error);
static void tracker_sparql_pattern_skip_filter (TrackerSparqlPattern* self, GError** error);
static void tracker_sparql_pattern_start_triples_block (TrackerSparqlPattern* self, GString* sql, GError** error);
static TrackerSparqlPatternTripleContext* tracker_sparql_pattern_triple_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
static TrackerSparqlPatternTripleContext* tracker_sparql_pattern_triple_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
static void tracker_sparql_pattern_end_triples_block (TrackerSparqlPattern* self, GString* sql, gboolean* first_where, gboolean in_group_graph_pattern, GError** error);
GType tracker_sparql_variable_binding_list_get_type (void) G_GNUC_CONST;
const gchar* tracker_sparql_data_binding_get_sql_expression (TrackerSparqlDataBinding* self);
static void tracker_sparql_pattern_parse_triples (TrackerSparqlPattern* self, GString* sql, glong group_graph_pattern_start, gboolean* in_triples_block, gboolean* first_where, gboolean* in_group_graph_pattern, gboolean found_simple_optional, GError** error);
static gboolean tracker_sparql_pattern_is_subclass (TrackerSparqlPattern* self, TrackerClass* class1, TrackerClass* class2);
static gboolean tracker_sparql_pattern_is_simple_optional (TrackerSparqlPattern* self);
TrackerSparqlVariable* tracker_sparql_context_get_variable (TrackerSparqlContext* self, const gchar* name);
guint tracker_sparql_variable_hash (TrackerSparqlVariable* variable);
static guint _tracker_sparql_variable_hash_ghash_func (gconstpointer key);
gboolean tracker_sparql_variable_equal (TrackerSparqlVariable* a, TrackerSparqlVariable* b);
static gboolean _tracker_sparql_variable_equal_gequal_func (gconstpointer a, gconstpointer b);
TrackerSparqlContext* tracker_sparql_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
TrackerSparqlContext* tracker_sparql_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
gchar* tracker_sparql_variable_get_extra_sql_expression (TrackerSparqlVariable* self, const gchar* suffix);
static void tracker_sparql_pattern_translate_group_or_union_graph_pattern (TrackerSparqlPattern* self, GString* sql, GError** error);
static void _vala_array_add6 (TrackerSourceLocation** array, int* length, int* size, const TrackerSourceLocation* value);
static void _vala_array_add7 (glong** array, int* length, int* size, glong value);
static void _vala_array_add8 (TrackerSparqlContext*** array, int* length, int* size, TrackerSparqlContext* value);
static void _vala_array_add9 (TrackerSparqlVariable*** array, int* length, int* size, TrackerSparqlVariable* value);
static TrackerSparqlVariableBindingList* tracker_sparql_pattern_get_variable_binding_list (TrackerSparqlPattern* self, TrackerSparqlVariable* variable);
TrackerSparqlVariableBinding* tracker_sparql_variable_binding_new (void);
TrackerSparqlVariableBinding* tracker_sparql_variable_binding_construct (GType object_type);
void tracker_sparql_data_binding_set_sql_expression (TrackerSparqlDataBinding* self, const gchar* value);
TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_new (void);
TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_construct (GType object_type);
void tracker_sparql_pattern_add_variable_binding (TrackerSparqlPattern* self, GString* sql, TrackerSparqlVariableBinding* binding, TrackerSparqlVariableState variable_state);
gchar* tracker_sparql_data_binding_get_extra_sql_expression (TrackerSparqlDataBinding* self, const gchar* suffix);
static TrackerSparqlDataTable* tracker_sparql_pattern_get_table (TrackerSparqlPattern* self, const gchar* subject, const gchar* db_table, gboolean share_table, gboolean* newtable);
TrackerSparqlDataTable* tracker_sparql_data_table_new (void);
TrackerSparqlDataTable* tracker_sparql_data_table_construct (GType object_type);
enum  {
	TRACKER_SPARQL_PATTERN_TRIPLE_CONTEXT_DUMMY_PROPERTY
};
static void tracker_sparql_pattern_triple_context_finalize (TrackerSparqlContext* obj);
static void tracker_sparql_pattern_finalize (GObject* obj);
static void _vala_tracker_sparql_pattern_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tracker_sparql_pattern_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static gpointer _g_object_ref0 (gpointer self) {
#line 39 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return self ? g_object_ref (self) : NULL;
#line 614 "tracker-sparql-pattern.c"
}


gchar* tracker_sparql_predicate_variable_get_sql_query (TrackerSparqlPredicateVariable* self, TrackerSparqlQuery* query, GError** error) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
#line 29 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 29 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (query != NULL, NULL);
#line 625 "tracker-sparql-pattern.c"
	{
		GString* _tmp0_;
		GString* sql;
		const gchar* _tmp1_;
		GString* _tmp153_;
		const gchar* _tmp154_;
		gchar* _tmp155_;
#line 31 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp0_ = g_string_new ("");
#line 31 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		sql = _tmp0_;
#line 33 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = self->subject;
#line 33 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp1_ != NULL) {
#line 641 "tracker-sparql-pattern.c"
			const gchar* _tmp2_;
			gint _tmp3_ = 0;
			gint subject_id;
			TrackerDBCursor* cursor;
			gint _tmp4_;
			gboolean first;
			TrackerDBCursor* _tmp14_;
			gboolean _tmp63_;
#line 35 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp2_ = self->subject;
#line 35 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp3_ = tracker_data_query_resource_id (_tmp2_);
#line 35 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			subject_id = _tmp3_;
#line 37 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			cursor = NULL;
#line 38 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp4_ = subject_id;
#line 38 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp4_ > 0) {
#line 662 "tracker-sparql-pattern.c"
				TrackerDBInterface* _tmp5_ = NULL;
				TrackerDBInterface* _tmp6_;
				TrackerDBInterface* iface;
				TrackerDBInterface* _tmp7_;
				TrackerDBStatement* _tmp8_ = NULL;
				TrackerDBStatement* stmt;
				TrackerDBStatement* _tmp9_;
				gint _tmp10_;
				TrackerDBStatement* _tmp11_;
				TrackerDBCursor* _tmp12_ = NULL;
				TrackerDBCursor* _tmp13_;
#line 39 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp5_ = tracker_db_manager_get_db_interface ();
#line 39 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp6_ = _g_object_ref0 (_tmp5_);
#line 39 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				iface = _tmp6_;
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp7_ = iface;
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp8_ = tracker_db_interface_create_statement (_tmp7_, TRACKER_DB_STATEMENT_CACHE_TYPE_SELECT, &_inner_error_, "SELECT (SELECT Uri FROM Resource WHERE ID = \"rdf:type\") " "FROM \"rdfs:Resource_rdf:type\" WHERE ID = ?");
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				stmt = _tmp8_;
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (iface);
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (cursor);
#line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (sql);
#line 694 "tracker-sparql-pattern.c"
					goto __catch0_g_error;
				}
#line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp9_ = stmt;
#line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp10_ = subject_id;
#line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_db_statement_bind_int (_tmp9_, 0, _tmp10_);
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp11_ = stmt;
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp12_ = tracker_db_statement_start_cursor (_tmp11_, &_inner_error_);
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp13_ = _tmp12_;
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (stmt);
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (iface);
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (cursor);
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (sql);
#line 719 "tracker-sparql-pattern.c"
					goto __catch0_g_error;
				}
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (cursor);
#line 44 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				cursor = _tmp13_;
#line 38 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (stmt);
#line 38 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (iface);
#line 730 "tracker-sparql-pattern.c"
			}
#line 47 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			first = TRUE;
#line 48 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = cursor;
#line 48 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp14_ != NULL) {
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				while (TRUE) {
#line 740 "tracker-sparql-pattern.c"
					TrackerDBCursor* _tmp15_;
					gboolean _tmp16_ = FALSE;
					gboolean _tmp17_;
					TrackerDBCursor* _tmp18_;
					const gchar* _tmp19_ = NULL;
					TrackerClass* _tmp20_ = NULL;
					TrackerClass* _tmp21_;
					TrackerClass* domain;
					gint _tmp22_ = 0;
					TrackerProperty** _tmp23_ = NULL;
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp15_ = cursor;
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp16_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _tmp15_, NULL, &_inner_error_);
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp17_ = _tmp16_;
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (cursor);
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (sql);
#line 763 "tracker-sparql-pattern.c"
						goto __catch0_g_error;
					}
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp17_) {
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						break;
#line 770 "tracker-sparql-pattern.c"
					}
#line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp18_ = cursor;
#line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp19_ = tracker_sparql_cursor_get_string ((TrackerSparqlCursor*) _tmp18_, 0, NULL);
#line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp20_ = tracker_ontologies_get_class_by_uri (_tmp19_);
#line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp21_ = _g_object_ref0 (_tmp20_);
#line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					domain = _tmp21_;
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp23_ = tracker_ontologies_get_properties (&_tmp22_);
#line 784 "tracker-sparql-pattern.c"
					{
						TrackerProperty** prop_collection = NULL;
						gint prop_collection_length1 = 0;
						gint _prop_collection_size_ = 0;
						gint prop_it = 0;
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						prop_collection = _tmp23_;
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						prop_collection_length1 = _tmp22_;
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						for (prop_it = 0; prop_it < _tmp22_; prop_it = prop_it + 1) {
#line 796 "tracker-sparql-pattern.c"
							TrackerProperty* _tmp24_;
							TrackerProperty* prop = NULL;
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp24_ = _g_object_ref0 (prop_collection[prop_it]);
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							prop = _tmp24_;
#line 803 "tracker-sparql-pattern.c"
							{
								TrackerProperty* _tmp25_;
								TrackerClass* _tmp26_;
								TrackerClass* _tmp27_;
								TrackerClass* _tmp28_;
#line 53 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp25_ = prop;
#line 53 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp26_ = tracker_property_get_domain (_tmp25_);
#line 53 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp27_ = _tmp26_;
#line 53 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp28_ = domain;
#line 53 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp27_ == _tmp28_) {
#line 819 "tracker-sparql-pattern.c"
									gboolean _tmp29_;
									GString* _tmp31_;
									TrackerProperty* _tmp32_;
									const gchar* _tmp33_;
									const gchar* _tmp34_;
									GString* _tmp35_;
									TrackerProperty* _tmp36_;
									const gchar* _tmp37_;
									const gchar* _tmp38_;
									gchar* _tmp39_ = NULL;
									gchar* _tmp40_;
									TrackerProperty* _tmp41_;
									TrackerPropertyType _tmp42_;
									TrackerPropertyType _tmp43_;
									GString* _tmp44_;
									gboolean _tmp45_;
									GString* _tmp50_;
									TrackerProperty* _tmp51_;
									const gchar* _tmp52_;
									const gchar* _tmp53_;
									GString* _tmp54_;
									TrackerSparqlLiteralBinding* _tmp55_;
									TrackerSparqlLiteralBinding* binding;
									TrackerSparqlLiteralBinding* _tmp56_;
									gint _tmp57_;
									gchar* _tmp58_ = NULL;
									TrackerSparqlLiteralBinding* _tmp59_;
									TrackerSparqlQuery* _tmp60_;
									TrackerSparqlLiteralBinding* _tmp61_;
									TrackerSparqlLiteralBinding* _tmp62_;
#line 54 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp29_ = first;
#line 54 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp29_) {
#line 55 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										first = FALSE;
#line 856 "tracker-sparql-pattern.c"
									} else {
										GString* _tmp30_;
#line 57 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp30_ = sql;
#line 57 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append (_tmp30_, " UNION ALL ");
#line 863 "tracker-sparql-pattern.c"
									}
#line 59 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp31_ = sql;
#line 59 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp32_ = prop;
#line 59 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp33_ = tracker_property_get_uri (_tmp32_);
#line 59 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp34_ = _tmp33_;
#line 59 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp31_, "SELECT ID, (SELECT ID FROM Resource WHERE Uri = '%s') AS \"predicate\"" \
", ", _tmp34_);
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp35_ = sql;
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp36_ = prop;
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp37_ = tracker_property_get_name (_tmp36_);
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp38_ = _tmp37_;
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp39_ = g_strdup_printf ("\"%s\"", _tmp38_);
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp40_ = _tmp39_;
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp41_ = prop;
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp42_ = tracker_property_get_data_type (_tmp41_);
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp43_ = _tmp42_;
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									tracker_sparql_expression_append_expression_as_string (_tmp35_, _tmp40_, _tmp43_);
#line 61 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp40_);
#line 63 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp44_ = sql;
#line 63 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp44_, " AS \"object\"");
#line 64 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp45_ = self->return_graph;
#line 64 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp45_) {
#line 905 "tracker-sparql-pattern.c"
										GString* _tmp46_;
										TrackerProperty* _tmp47_;
										const gchar* _tmp48_;
										const gchar* _tmp49_;
#line 65 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp46_ = sql;
#line 65 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp47_ = prop;
#line 65 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp48_ = tracker_property_get_name (_tmp47_);
#line 65 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp49_ = _tmp48_;
#line 65 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp46_, ", \"%s:graph\" AS \"graph\"", _tmp49_);
#line 920 "tracker-sparql-pattern.c"
									}
#line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp50_ = sql;
#line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp51_ = prop;
#line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp52_ = tracker_property_get_table_name (_tmp51_);
#line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp53_ = _tmp52_;
#line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp50_, " FROM \"%s\"", _tmp53_);
#line 69 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp54_ = sql;
#line 69 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp54_, " WHERE ID = ?");
#line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp55_ = tracker_sparql_literal_binding_new ();
#line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									binding = _tmp55_;
#line 72 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp56_ = binding;
#line 72 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp57_ = subject_id;
#line 72 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp58_ = g_strdup_printf ("%i", _tmp57_);
#line 72 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp56_->literal);
#line 72 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp56_->literal = _tmp58_;
#line 73 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp59_ = binding;
#line 73 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									((TrackerSparqlDataBinding*) _tmp59_)->data_type = TRACKER_PROPERTY_TYPE_INTEGER;
#line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp60_ = query;
#line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp61_ = binding;
#line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp62_ = _g_object_ref0 (_tmp61_);
#line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp60_->bindings = g_list_append (_tmp60_->bindings, _tmp62_);
#line 53 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_object_unref0 (binding);
#line 964 "tracker-sparql-pattern.c"
								}
#line 52 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_object_unref0 (prop);
#line 968 "tracker-sparql-pattern.c"
							}
						}
					}
#line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (domain);
#line 974 "tracker-sparql-pattern.c"
				}
			}
#line 80 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp63_ = first;
#line 80 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp63_) {
#line 981 "tracker-sparql-pattern.c"
				GString* _tmp64_;
#line 82 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp64_ = sql;
#line 82 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append (_tmp64_, "SELECT NULL AS ID, NULL AS \"predicate\", NULL AS \"object\", NULL AS " \
"\"graph\"");
#line 987 "tracker-sparql-pattern.c"
			}
#line 33 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (cursor);
#line 991 "tracker-sparql-pattern.c"
		} else {
			const gchar* _tmp65_;
#line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp65_ = self->object;
#line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp65_ != NULL) {
#line 998 "tracker-sparql-pattern.c"
				const gchar* _tmp66_;
				gint _tmp67_ = 0;
				gint object_id;
				TrackerDBInterface* _tmp68_ = NULL;
				TrackerDBInterface* _tmp69_;
				TrackerDBInterface* iface;
				TrackerDBInterface* _tmp70_;
				TrackerDBStatement* _tmp71_ = NULL;
				TrackerDBStatement* stmt;
				TrackerDBStatement* _tmp72_;
				gint _tmp73_;
				TrackerDBStatement* _tmp74_;
				TrackerDBCursor* _tmp75_ = NULL;
				TrackerDBCursor* cursor;
				gboolean first;
				TrackerDBCursor* _tmp76_;
				gboolean _tmp116_;
#line 86 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp66_ = self->object;
#line 86 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp67_ = tracker_data_query_resource_id (_tmp66_);
#line 86 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				object_id = _tmp67_;
#line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp68_ = tracker_db_manager_get_db_interface ();
#line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp69_ = _g_object_ref0 (_tmp68_);
#line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				iface = _tmp69_;
#line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp70_ = iface;
#line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp71_ = tracker_db_interface_create_statement (_tmp70_, TRACKER_DB_STATEMENT_CACHE_TYPE_SELECT, &_inner_error_, "SELECT (SELECT Uri FROM Resource WHERE ID = \"rdf:type\") " "FROM \"rdfs:Resource_rdf:type\" WHERE ID = ?");
#line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				stmt = _tmp71_;
#line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (iface);
#line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (sql);
#line 1040 "tracker-sparql-pattern.c"
					goto __catch0_g_error;
				}
#line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp72_ = stmt;
#line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp73_ = object_id;
#line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_db_statement_bind_int (_tmp72_, 0, _tmp73_);
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp74_ = stmt;
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp75_ = tracker_db_statement_start_cursor (_tmp74_, &_inner_error_);
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				cursor = _tmp75_;
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (stmt);
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (iface);
#line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (sql);
#line 1063 "tracker-sparql-pattern.c"
					goto __catch0_g_error;
				}
#line 95 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				first = TRUE;
#line 96 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp76_ = cursor;
#line 96 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp76_ != NULL) {
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					while (TRUE) {
#line 1074 "tracker-sparql-pattern.c"
						TrackerDBCursor* _tmp77_;
						gboolean _tmp78_ = FALSE;
						gboolean _tmp79_;
						TrackerDBCursor* _tmp80_;
						const gchar* _tmp81_ = NULL;
						TrackerClass* _tmp82_ = NULL;
						TrackerClass* _tmp83_;
						TrackerClass* range;
						gint _tmp84_ = 0;
						TrackerProperty** _tmp85_ = NULL;
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp77_ = cursor;
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp78_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _tmp77_, NULL, &_inner_error_);
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp79_ = _tmp78_;
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (cursor);
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (stmt);
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (iface);
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_string_free0 (sql);
#line 1101 "tracker-sparql-pattern.c"
							goto __catch0_g_error;
						}
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (!_tmp79_) {
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							break;
#line 1108 "tracker-sparql-pattern.c"
						}
#line 98 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp80_ = cursor;
#line 98 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp81_ = tracker_sparql_cursor_get_string ((TrackerSparqlCursor*) _tmp80_, 0, NULL);
#line 98 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp82_ = tracker_ontologies_get_class_by_uri (_tmp81_);
#line 98 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp83_ = _g_object_ref0 (_tmp82_);
#line 98 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						range = _tmp83_;
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp85_ = tracker_ontologies_get_properties (&_tmp84_);
#line 1122 "tracker-sparql-pattern.c"
						{
							TrackerProperty** prop_collection = NULL;
							gint prop_collection_length1 = 0;
							gint _prop_collection_size_ = 0;
							gint prop_it = 0;
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							prop_collection = _tmp85_;
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							prop_collection_length1 = _tmp84_;
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							for (prop_it = 0; prop_it < _tmp84_; prop_it = prop_it + 1) {
#line 1134 "tracker-sparql-pattern.c"
								TrackerProperty* _tmp86_;
								TrackerProperty* prop = NULL;
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp86_ = _g_object_ref0 (prop_collection[prop_it]);
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								prop = _tmp86_;
#line 1141 "tracker-sparql-pattern.c"
								{
									TrackerProperty* _tmp87_;
									TrackerClass* _tmp88_;
									TrackerClass* _tmp89_;
									TrackerClass* _tmp90_;
#line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp87_ = prop;
#line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp88_ = tracker_property_get_range (_tmp87_);
#line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp89_ = _tmp88_;
#line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp90_ = range;
#line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp89_ == _tmp90_) {
#line 1157 "tracker-sparql-pattern.c"
										gboolean _tmp91_;
										GString* _tmp93_;
										TrackerProperty* _tmp94_;
										const gchar* _tmp95_;
										const gchar* _tmp96_;
										GString* _tmp97_;
										TrackerProperty* _tmp98_;
										const gchar* _tmp99_;
										const gchar* _tmp100_;
										gchar* _tmp101_ = NULL;
										gchar* _tmp102_;
										TrackerProperty* _tmp103_;
										TrackerPropertyType _tmp104_;
										TrackerPropertyType _tmp105_;
										GString* _tmp106_;
										gboolean _tmp107_;
										GString* _tmp112_;
										TrackerProperty* _tmp113_;
										const gchar* _tmp114_;
										const gchar* _tmp115_;
#line 102 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp91_ = first;
#line 102 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										if (_tmp91_) {
#line 103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											first = FALSE;
#line 1184 "tracker-sparql-pattern.c"
										} else {
											GString* _tmp92_;
#line 105 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp92_ = sql;
#line 105 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											g_string_append (_tmp92_, " UNION ALL ");
#line 1191 "tracker-sparql-pattern.c"
										}
#line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp93_ = sql;
#line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp94_ = prop;
#line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp95_ = tracker_property_get_uri (_tmp94_);
#line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp96_ = _tmp95_;
#line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp93_, "SELECT ID, (SELECT ID FROM Resource WHERE Uri = '%s') AS \"predicate\"" \
", ", _tmp96_);
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp97_ = sql;
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp98_ = prop;
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp99_ = tracker_property_get_name (_tmp98_);
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp100_ = _tmp99_;
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp101_ = g_strdup_printf ("\"%s\"", _tmp100_);
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp102_ = _tmp101_;
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp103_ = prop;
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp104_ = tracker_property_get_data_type (_tmp103_);
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp105_ = _tmp104_;
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										tracker_sparql_expression_append_expression_as_string (_tmp97_, _tmp102_, _tmp105_);
#line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_free0 (_tmp102_);
#line 111 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp106_ = sql;
#line 111 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append (_tmp106_, " AS \"object\"");
#line 112 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp107_ = self->return_graph;
#line 112 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										if (_tmp107_) {
#line 1233 "tracker-sparql-pattern.c"
											GString* _tmp108_;
											TrackerProperty* _tmp109_;
											const gchar* _tmp110_;
											const gchar* _tmp111_;
#line 113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp108_ = sql;
#line 113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp109_ = prop;
#line 113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp110_ = tracker_property_get_name (_tmp109_);
#line 113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp111_ = _tmp110_;
#line 113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											g_string_append_printf (_tmp108_, ", \"%s:graph\" AS \"graph\"", _tmp111_);
#line 1248 "tracker-sparql-pattern.c"
										}
#line 115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp112_ = sql;
#line 115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp113_ = prop;
#line 115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp114_ = tracker_property_get_table_name (_tmp113_);
#line 115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp115_ = _tmp114_;
#line 115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp112_, " FROM \"%s\"", _tmp115_);
#line 1260 "tracker-sparql-pattern.c"
									}
#line 100 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_object_unref0 (prop);
#line 1264 "tracker-sparql-pattern.c"
								}
							}
						}
#line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (range);
#line 1270 "tracker-sparql-pattern.c"
					}
				}
#line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp116_ = first;
#line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp116_) {
#line 1277 "tracker-sparql-pattern.c"
					GString* _tmp117_;
#line 123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp117_ = sql;
#line 123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp117_, "SELECT NULL AS ID, NULL AS \"predicate\", NULL AS \"object\", NULL AS " \
"\"graph\"");
#line 1283 "tracker-sparql-pattern.c"
				}
#line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (cursor);
#line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (stmt);
#line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (iface);
#line 1291 "tracker-sparql-pattern.c"
			} else {
				TrackerClass* _tmp118_;
#line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp118_ = self->domain;
#line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp118_ != NULL) {
#line 1298 "tracker-sparql-pattern.c"
					gboolean first;
					gint _tmp119_ = 0;
					TrackerProperty** _tmp120_ = NULL;
#line 127 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					first = TRUE;
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp120_ = tracker_ontologies_get_properties (&_tmp119_);
#line 1306 "tracker-sparql-pattern.c"
					{
						TrackerProperty** prop_collection = NULL;
						gint prop_collection_length1 = 0;
						gint _prop_collection_size_ = 0;
						gint prop_it = 0;
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						prop_collection = _tmp120_;
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						prop_collection_length1 = _tmp119_;
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						for (prop_it = 0; prop_it < _tmp119_; prop_it = prop_it + 1) {
#line 1318 "tracker-sparql-pattern.c"
							TrackerProperty* _tmp121_;
							TrackerProperty* prop = NULL;
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp121_ = _g_object_ref0 (prop_collection[prop_it]);
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							prop = _tmp121_;
#line 1325 "tracker-sparql-pattern.c"
							{
								TrackerProperty* _tmp122_;
								TrackerClass* _tmp123_;
								TrackerClass* _tmp124_;
								TrackerClass* _tmp125_;
#line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp122_ = prop;
#line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp123_ = tracker_property_get_domain (_tmp122_);
#line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp124_ = _tmp123_;
#line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp125_ = self->domain;
#line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp124_ == _tmp125_) {
#line 1341 "tracker-sparql-pattern.c"
									gboolean _tmp126_;
									GString* _tmp128_;
									TrackerProperty* _tmp129_;
									const gchar* _tmp130_;
									const gchar* _tmp131_;
									GString* _tmp132_;
									TrackerProperty* _tmp133_;
									const gchar* _tmp134_;
									const gchar* _tmp135_;
									gchar* _tmp136_ = NULL;
									gchar* _tmp137_;
									TrackerProperty* _tmp138_;
									TrackerPropertyType _tmp139_;
									TrackerPropertyType _tmp140_;
									GString* _tmp141_;
									gboolean _tmp142_;
									GString* _tmp147_;
									TrackerProperty* _tmp148_;
									const gchar* _tmp149_;
									const gchar* _tmp150_;
#line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp126_ = first;
#line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp126_) {
#line 131 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										first = FALSE;
#line 1368 "tracker-sparql-pattern.c"
									} else {
										GString* _tmp127_;
#line 133 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp127_ = sql;
#line 133 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append (_tmp127_, " UNION ALL ");
#line 1375 "tracker-sparql-pattern.c"
									}
#line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp128_ = sql;
#line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp129_ = prop;
#line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp130_ = tracker_property_get_uri (_tmp129_);
#line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp131_ = _tmp130_;
#line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp128_, "SELECT ID, (SELECT ID FROM Resource WHERE Uri = '%s') AS \"predicate\"" \
", ", _tmp131_);
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp132_ = sql;
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp133_ = prop;
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp134_ = tracker_property_get_name (_tmp133_);
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp135_ = _tmp134_;
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp136_ = g_strdup_printf ("\"%s\"", _tmp135_);
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp137_ = _tmp136_;
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp138_ = prop;
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp139_ = tracker_property_get_data_type (_tmp138_);
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp140_ = _tmp139_;
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									tracker_sparql_expression_append_expression_as_string (_tmp132_, _tmp137_, _tmp140_);
#line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp137_);
#line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp141_ = sql;
#line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp141_, " AS \"object\"");
#line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp142_ = self->return_graph;
#line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp142_) {
#line 1417 "tracker-sparql-pattern.c"
										GString* _tmp143_;
										TrackerProperty* _tmp144_;
										const gchar* _tmp145_;
										const gchar* _tmp146_;
#line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp143_ = sql;
#line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp144_ = prop;
#line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp145_ = tracker_property_get_name (_tmp144_);
#line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp146_ = _tmp145_;
#line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp143_, ", \"%s:graph\" AS \"graph\"", _tmp146_);
#line 1432 "tracker-sparql-pattern.c"
									}
#line 143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp147_ = sql;
#line 143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp148_ = prop;
#line 143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp149_ = tracker_property_get_table_name (_tmp148_);
#line 143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp150_ = _tmp149_;
#line 143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp147_, " FROM \"%s\"", _tmp150_);
#line 1444 "tracker-sparql-pattern.c"
								}
#line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_object_unref0 (prop);
#line 1448 "tracker-sparql-pattern.c"
							}
						}
					}
				} else {
					TrackerSparqlQuery* _tmp151_;
					GError* _tmp152_ = NULL;
#line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp151_ = query;
#line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp152_ = tracker_sparql_query_get_internal_error (_tmp151_, "Unrestricted predicate variables not supported");
#line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_inner_error_ = _tmp152_;
#line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (sql);
#line 1463 "tracker-sparql-pattern.c"
					goto __catch0_g_error;
				}
			}
		}
#line 150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp153_ = sql;
#line 150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp154_ = _tmp153_->str;
#line 150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp155_ = g_strdup (_tmp154_);
#line 150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		result = _tmp155_;
#line 150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_string_free0 (sql);
#line 150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return result;
#line 1480 "tracker-sparql-pattern.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp156_;
		const gchar* _tmp157_;
		GError* _tmp158_;
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		e = _inner_error_;
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_inner_error_ = NULL;
#line 152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp156_ = e;
#line 152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp157_ = _tmp156_->message;
#line 152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp158_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _tmp157_);
#line 152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_inner_error_ = _tmp158_;
#line 152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_error_free0 (e);
#line 1503 "tracker-sparql-pattern.c"
		goto __finally0;
	}
	__finally0:
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_propagate_error (error, _inner_error_);
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return NULL;
#line 1513 "tracker-sparql-pattern.c"
	} else {
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_clear_error (&_inner_error_);
#line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return NULL;
#line 1521 "tracker-sparql-pattern.c"
	}
}


TrackerSparqlPredicateVariable* tracker_sparql_predicate_variable_construct (GType object_type) {
	TrackerSparqlPredicateVariable * self = NULL;
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self = (TrackerSparqlPredicateVariable*) g_object_new (object_type, NULL);
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return self;
#line 1532 "tracker-sparql-pattern.c"
}


TrackerSparqlPredicateVariable* tracker_sparql_predicate_variable_new (void) {
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return tracker_sparql_predicate_variable_construct (TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE);
#line 1539 "tracker-sparql-pattern.c"
}


static void tracker_sparql_predicate_variable_class_init (TrackerSparqlPredicateVariableClass * klass) {
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_predicate_variable_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_sparql_predicate_variable_finalize;
#line 1548 "tracker-sparql-pattern.c"
}


static void tracker_sparql_predicate_variable_instance_init (TrackerSparqlPredicateVariable * self) {
}


static void tracker_sparql_predicate_variable_finalize (GObject* obj) {
	TrackerSparqlPredicateVariable * self;
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self = TRACKER_SPARQL_PREDICATE_VARIABLE (obj);
#line 23 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (self->subject);
#line 24 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (self->object);
#line 27 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_object_unref0 (self->domain);
#line 22 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	G_OBJECT_CLASS (tracker_sparql_predicate_variable_parent_class)->finalize (obj);
#line 1568 "tracker-sparql-pattern.c"
}


GType tracker_sparql_predicate_variable_get_type (void) {
	static volatile gsize tracker_sparql_predicate_variable_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_sparql_predicate_variable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlPredicateVariableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_predicate_variable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlPredicateVariable), 0, (GInstanceInitFunc) tracker_sparql_predicate_variable_instance_init, NULL };
		GType tracker_sparql_predicate_variable_type_id;
		tracker_sparql_predicate_variable_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlPredicateVariable", &g_define_type_info, 0);
		g_once_init_leave (&tracker_sparql_predicate_variable_type_id__volatile, tracker_sparql_predicate_variable_type_id);
	}
	return tracker_sparql_predicate_variable_type_id__volatile;
}


TrackerSparqlPattern* tracker_sparql_pattern_construct (GType object_type, TrackerSparqlQuery* query) {
	TrackerSparqlPattern * self = NULL;
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlQuery* _tmp1_;
	TrackerSparqlExpression* _tmp2_;
#line 173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (query != NULL, NULL);
#line 173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self = (TrackerSparqlPattern*) g_object_new (object_type, NULL);
#line 174 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = query;
#line 174 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->priv->query = _tmp0_;
#line 175 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = query;
#line 175 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = _tmp1_->expression;
#line 175 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->priv->expression = _tmp2_;
#line 173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return self;
#line 1605 "tracker-sparql-pattern.c"
}


TrackerSparqlPattern* tracker_sparql_pattern_new (TrackerSparqlQuery* query) {
#line 173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return tracker_sparql_pattern_construct (TRACKER_SPARQL_TYPE_PATTERN, query);
#line 1612 "tracker-sparql-pattern.c"
}


static inline gboolean tracker_sparql_pattern_next (TrackerSparqlPattern* self, GError** error) {
	gboolean result = FALSE;
	TrackerSparqlQuery* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_;
	GError * _inner_error_ = NULL;
#line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = tracker_sparql_query_next (_tmp0_, &_inner_error_);
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = _tmp1_;
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 1638 "tracker-sparql-pattern.c"
		} else {
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 1646 "tracker-sparql-pattern.c"
		}
	}
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp2_;
#line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 1653 "tracker-sparql-pattern.c"
}


static inline TrackerSparqlTokenType tracker_sparql_pattern_current (TrackerSparqlPattern* self) {
	TrackerSparqlTokenType result = 0;
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlTokenType _tmp1_ = 0;
#line 187 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 188 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 188 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = tracker_sparql_query_current (_tmp0_);
#line 188 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp1_;
#line 188 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 1671 "tracker-sparql-pattern.c"
}


static inline gboolean tracker_sparql_pattern_accept (TrackerSparqlPattern* self, TrackerSparqlTokenType type, GError** error) {
	gboolean result = FALSE;
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlTokenType _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	GError * _inner_error_ = NULL;
#line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = type;
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = tracker_sparql_query_accept (_tmp0_, _tmp1_, &_inner_error_);
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = _tmp2_;
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 1700 "tracker-sparql-pattern.c"
		} else {
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 1708 "tracker-sparql-pattern.c"
		}
	}
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp3_;
#line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 1715 "tracker-sparql-pattern.c"
}


static GError* tracker_sparql_pattern_get_error (TrackerSparqlPattern* self, const gchar* msg) {
	GError* result = NULL;
	TrackerSparqlQuery* _tmp0_;
	const gchar* _tmp1_;
	GError* _tmp2_ = NULL;
#line 195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (msg != NULL, NULL);
#line 196 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 196 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = msg;
#line 196 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = tracker_sparql_query_get_error (_tmp0_, _tmp1_);
#line 196 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp2_;
#line 196 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 1738 "tracker-sparql-pattern.c"
}


static gboolean tracker_sparql_pattern_expect (TrackerSparqlPattern* self, TrackerSparqlTokenType type, GError** error) {
	gboolean result = FALSE;
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlTokenType _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	GError * _inner_error_ = NULL;
#line 199 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = type;
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = tracker_sparql_query_expect (_tmp0_, _tmp1_, &_inner_error_);
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = _tmp2_;
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 1767 "tracker-sparql-pattern.c"
		} else {
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 1775 "tracker-sparql-pattern.c"
		}
	}
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp3_;
#line 200 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 1782 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_get_location (TrackerSparqlPattern* self, TrackerSourceLocation* result) {
	TrackerSparqlQuery* _tmp0_;
	TrackerSourceLocation _tmp1_ = {0};
#line 203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_query_get_location (_tmp0_, &_tmp1_);
#line 204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	*result = _tmp1_;
#line 204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return;
#line 1799 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_set_location (TrackerSparqlPattern* self, TrackerSourceLocation* location) {
	TrackerSparqlQuery* _tmp0_;
	TrackerSourceLocation _tmp1_;
#line 207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (location != NULL);
#line 208 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 208 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = *location;
#line 208 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_query_set_location (_tmp0_, &_tmp1_);
#line 1816 "tracker-sparql-pattern.c"
}


static gchar* tracker_sparql_pattern_get_last_string (TrackerSparqlPattern* self, gint strip) {
	gchar* result = NULL;
	TrackerSparqlQuery* _tmp0_;
	gint _tmp1_;
	gchar* _tmp2_ = NULL;
#line 211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 212 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 212 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = strip;
#line 212 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = tracker_sparql_query_get_last_string (_tmp0_, _tmp1_);
#line 212 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp2_;
#line 212 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 1837 "tracker-sparql-pattern.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 1844 "tracker-sparql-pattern.c"
}


static void _g_list_free__g_object_unref0_ (GList* self) {
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_list_free (self);
#line 1853 "tracker-sparql-pattern.c"
}


static void _vala_array_add3 (TrackerPropertyType** array, int* length, int* size, TrackerPropertyType value) {
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (TrackerPropertyType, *array, *size);
#line 1864 "tracker-sparql-pattern.c"
	}
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = value;
#line 1868 "tracker-sparql-pattern.c"
}


static void _vala_array_add4 (gchar*** array, int* length, int* size, gchar* value) {
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 1879 "tracker-sparql-pattern.c"
	}
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = value;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[*length] = NULL;
#line 1885 "tracker-sparql-pattern.c"
}


static void _vala_array_add5 (TrackerPropertyType** array, int* length, int* size, TrackerPropertyType value) {
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (TrackerPropertyType, *array, *size);
#line 1896 "tracker-sparql-pattern.c"
	}
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = value;
#line 1900 "tracker-sparql-pattern.c"
}


TrackerSparqlSelectContext* tracker_sparql_pattern_translate_select (TrackerSparqlPattern* self, GString* sql, gboolean subquery, gboolean scalar_subquery, GError** error) {
	TrackerSparqlSelectContext* result = NULL;
	TrackerSparqlSelectContext* _result_ = NULL;
	gboolean _tmp0_;
	TrackerSparqlSelectContext* _tmp9_;
	TrackerPropertyType type;
	GString* _tmp10_;
	GString* pattern_sql;
	TrackerSparqlQuery* _tmp11_;
	GList* _tmp12_;
	GList* old_bindings;
	GString* _tmp13_;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_;
	TrackerSourceLocation _tmp19_ = {0};
	TrackerSourceLocation select_variables_location;
	TrackerSparqlExpression* _tmp20_;
	gboolean _tmp21_ = FALSE;
	gboolean _tmp22_;
	GString* _tmp23_;
	TrackerSparqlContext* _tmp24_ = NULL;
	TrackerSparqlContext* pattern;
	TrackerSparqlContext* _tmp25_;
	GHashTable* _tmp26_;
	GList* _tmp27_ = NULL;
	TrackerSourceLocation _tmp33_ = {0};
	TrackerSourceLocation after_where;
	TrackerSourceLocation _tmp34_;
	TrackerSparqlContext* _tmp35_;
	TrackerSparqlContext* _tmp36_;
	GHashTable* _tmp37_;
	GList* _tmp38_ = NULL;
	TrackerSparqlQuery* _tmp48_;
	GList* _tmp49_;
	GList* where_bindings;
	TrackerSparqlQuery* _tmp50_;
	GList* _tmp51_;
	gboolean first;
	gboolean _tmp52_ = FALSE;
	gboolean _tmp53_;
	GList* _tmp105_;
	gboolean _tmp110_;
	GString* _tmp112_;
	GString* _tmp113_;
	GString* _tmp114_;
	const gchar* _tmp115_;
	GString* _tmp116_;
	TrackerSourceLocation _tmp117_;
	gboolean _tmp118_ = FALSE;
	gboolean _tmp119_;
	gboolean _tmp151_ = FALSE;
	gboolean _tmp152_;
	gint limit;
	gint offset;
	gboolean _tmp173_ = FALSE;
	gboolean _tmp174_;
	gint _tmp193_;
	TrackerSparqlContext* _tmp223_;
	TrackerSparqlContext* _tmp224_;
	TrackerSparqlContext* _tmp225_;
	TrackerSparqlSelectContext* _tmp226_;
	TrackerPropertyType _tmp227_;
	GError * _inner_error_ = NULL;
#line 240 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 240 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (sql != NULL, NULL);
#line 242 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = scalar_subquery;
#line 242 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp0_) {
#line 1975 "tracker-sparql-pattern.c"
		TrackerSparqlQuery* _tmp1_;
		TrackerSparqlContext* _tmp2_;
		TrackerSparqlContext* _tmp3_;
		TrackerSparqlSelectContext* _tmp4_;
#line 243 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = self->priv->query;
#line 243 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = tracker_sparql_pattern_get_context (self);
#line 243 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = _tmp2_;
#line 243 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = tracker_sparql_select_context_new_subquery (_tmp1_, _tmp3_);
#line 243 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tracker_sparql_context_unref0 (_result_);
#line 243 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_result_ = _tmp4_;
#line 1992 "tracker-sparql-pattern.c"
	} else {
		TrackerSparqlQuery* _tmp5_;
		TrackerSparqlContext* _tmp6_;
		TrackerSparqlContext* _tmp7_;
		TrackerSparqlSelectContext* _tmp8_;
#line 245 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = self->priv->query;
#line 245 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = tracker_sparql_pattern_get_context (self);
#line 245 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp7_ = _tmp6_;
#line 245 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = tracker_sparql_select_context_new (_tmp5_, _tmp7_);
#line 245 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tracker_sparql_context_unref0 (_result_);
#line 245 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_result_ = _tmp8_;
#line 2010 "tracker-sparql-pattern.c"
	}
#line 247 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp9_ = _result_;
#line 247 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, (TrackerSparqlContext*) _tmp9_);
#line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	type = TRACKER_PROPERTY_TYPE_UNKNOWN;
#line 250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp10_ = g_string_new ("");
#line 250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	pattern_sql = _tmp10_;
#line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp11_ = self->priv->query;
#line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp12_ = _tmp11_->bindings;
#line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp11_->bindings = NULL;
#line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	old_bindings = _tmp12_;
#line 253 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp13_ = sql;
#line 253 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp13_, "SELECT ");
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_SELECT, &_inner_error_);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2050 "tracker-sparql-pattern.c"
		} else {
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2064 "tracker-sparql-pattern.c"
		}
	}
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp14_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DISTINCT, &_inner_error_);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp15_ = _tmp14_;
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2085 "tracker-sparql-pattern.c"
		} else {
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2099 "tracker-sparql-pattern.c"
		}
	}
#line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp15_) {
#line 2104 "tracker-sparql-pattern.c"
		GString* _tmp16_;
#line 258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp16_ = sql;
#line 258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp16_, "DISTINCT ");
#line 2110 "tracker-sparql-pattern.c"
	} else {
		gboolean _tmp17_ = FALSE;
		gboolean _tmp18_;
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_REDUCED, &_inner_error_);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp18_ = _tmp17_;
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 2132 "tracker-sparql-pattern.c"
			} else {
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 2146 "tracker-sparql-pattern.c"
			}
		}
#line 259 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp18_) {
#line 2151 "tracker-sparql-pattern.c"
		}
	}
#line 263 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_get_location (self, &_tmp19_);
#line 263 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	select_variables_location = _tmp19_;
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp20_ = self->priv->expression;
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_expression_skip_select_variables (_tmp20_, &_inner_error_);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2176 "tracker-sparql-pattern.c"
		} else {
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 264 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2190 "tracker-sparql-pattern.c"
		}
	}
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp21_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_FROM, &_inner_error_);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp22_ = _tmp21_;
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2211 "tracker-sparql-pattern.c"
		} else {
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2225 "tracker-sparql-pattern.c"
		}
	}
#line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp22_) {
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_NAMED, &_inner_error_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 2246 "tracker-sparql-pattern.c"
			} else {
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 2260 "tracker-sparql-pattern.c"
			}
		}
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, &_inner_error_);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 2279 "tracker-sparql-pattern.c"
			} else {
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 2293 "tracker-sparql-pattern.c"
			}
		}
	}
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_WHERE, &_inner_error_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2313 "tracker-sparql-pattern.c"
		} else {
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2327 "tracker-sparql-pattern.c"
		}
	}
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp23_ = pattern_sql;
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp24_ = tracker_sparql_pattern_translate_group_graph_pattern (self, _tmp23_, &_inner_error_);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	pattern = _tmp24_;
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2350 "tracker-sparql-pattern.c"
		} else {
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2364 "tracker-sparql-pattern.c"
		}
	}
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp25_ = pattern;
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp26_ = _tmp25_->var_set;
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp27_ = g_hash_table_get_keys (_tmp26_);
#line 2373 "tracker-sparql-pattern.c"
	{
		GList* key_collection = NULL;
		GList* key_it = NULL;
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		key_collection = _tmp27_;
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
#line 2381 "tracker-sparql-pattern.c"
			TrackerSparqlVariable* key = NULL;
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			key = (TrackerSparqlVariable*) key_it->data;
#line 2385 "tracker-sparql-pattern.c"
			{
				TrackerSparqlContext* _tmp28_;
				TrackerSparqlContext* _tmp29_;
				GHashTable* _tmp30_;
				TrackerSparqlVariable* _tmp31_;
				TrackerSparqlVariable* _tmp32_;
#line 275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp28_ = tracker_sparql_pattern_get_context (self);
#line 275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp29_ = _tmp28_;
#line 275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp30_ = _tmp29_->var_set;
#line 275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp31_ = key;
#line 275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp32_ = _g_object_ref0 (_tmp31_);
#line 275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_hash_table_insert (_tmp30_, _tmp32_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 2404 "tracker-sparql-pattern.c"
			}
		}
#line 274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_list_free0 (key_collection);
#line 2409 "tracker-sparql-pattern.c"
	}
#line 279 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_get_location (self, &_tmp33_);
#line 279 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	after_where = _tmp33_;
#line 280 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp34_ = select_variables_location;
#line 280 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_location (self, &_tmp34_);
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp35_ = tracker_sparql_pattern_get_context (self);
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp36_ = _tmp35_;
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp37_ = _tmp36_->var_set;
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp38_ = g_hash_table_get_keys (_tmp37_);
#line 2427 "tracker-sparql-pattern.c"
	{
		GList* variable_collection = NULL;
		GList* variable_it = NULL;
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		variable_collection = _tmp38_;
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (variable_it = variable_collection; variable_it != NULL; variable_it = variable_it->next) {
#line 2435 "tracker-sparql-pattern.c"
			TrackerSparqlVariable* variable = NULL;
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			variable = (TrackerSparqlVariable*) variable_it->data;
#line 2439 "tracker-sparql-pattern.c"
			{
				TrackerSparqlVariable* _tmp39_;
				TrackerSparqlVariableBinding* _tmp40_;
#line 284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp39_ = variable;
#line 284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp40_ = _tmp39_->binding;
#line 284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp40_ == NULL) {
#line 2449 "tracker-sparql-pattern.c"
					TrackerSparqlVariable* _tmp41_;
					const gchar* _tmp42_;
					const gchar* _tmp43_;
					gchar* _tmp44_ = NULL;
					gchar* _tmp45_;
					GError* _tmp46_ = NULL;
					GError* _tmp47_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp41_ = variable;
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp42_ = tracker_sparql_variable_get_name (_tmp41_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp43_ = _tmp42_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp44_ = g_strdup_printf ("use of undefined variable `%s'", _tmp43_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp45_ = _tmp44_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp46_ = tracker_sparql_pattern_get_error (self, _tmp45_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp47_ = _tmp46_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp45_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_inner_error_ = _tmp47_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_list_free0 (variable_collection);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 2491 "tracker-sparql-pattern.c"
					} else {
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_list_free0 (variable_collection);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 2509 "tracker-sparql-pattern.c"
					}
				}
			}
		}
#line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_list_free0 (variable_collection);
#line 2516 "tracker-sparql-pattern.c"
	}
#line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp48_ = self->priv->query;
#line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp49_ = _tmp48_->bindings;
#line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp48_->bindings = NULL;
#line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	where_bindings = _tmp49_;
#line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp50_ = self->priv->query;
#line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp51_ = old_bindings;
#line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	old_bindings = NULL;
#line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (_tmp50_->bindings);
#line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp50_->bindings = _tmp51_;
#line 292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	first = TRUE;
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp52_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_STAR, &_inner_error_);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp53_ = _tmp52_;
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2560 "tracker-sparql-pattern.c"
		} else {
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2578 "tracker-sparql-pattern.c"
		}
	}
#line 293 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp53_) {
#line 2583 "tracker-sparql-pattern.c"
		TrackerSparqlContext* _tmp54_;
		TrackerSparqlContext* _tmp55_;
		GHashTable* _tmp56_;
		GList* _tmp57_ = NULL;
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp54_ = tracker_sparql_pattern_get_context (self);
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp55_ = _tmp54_;
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp56_ = _tmp55_->var_set;
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp57_ = g_hash_table_get_keys (_tmp56_);
#line 2596 "tracker-sparql-pattern.c"
		{
			GList* variable_collection = NULL;
			GList* variable_it = NULL;
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			variable_collection = _tmp57_;
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			for (variable_it = variable_collection; variable_it != NULL; variable_it = variable_it->next) {
#line 2604 "tracker-sparql-pattern.c"
				TrackerSparqlVariable* variable = NULL;
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				variable = (TrackerSparqlVariable*) variable_it->data;
#line 2608 "tracker-sparql-pattern.c"
				{
					gboolean _tmp58_;
					gboolean _tmp60_;
					TrackerSparqlSelectContext* _tmp76_;
					TrackerSparqlSelectContext* _tmp77_;
					TrackerPropertyType* _tmp78_;
					gint _tmp78__length1;
					TrackerSparqlVariable* _tmp79_;
					TrackerSparqlVariableBinding* _tmp80_;
					TrackerPropertyType _tmp81_;
					TrackerSparqlSelectContext* _tmp82_;
					TrackerSparqlSelectContext* _tmp83_;
					gchar** _tmp84_;
					gint _tmp84__length1;
					TrackerSparqlVariable* _tmp85_;
					const gchar* _tmp86_;
					const gchar* _tmp87_;
					gchar* _tmp88_;
#line 295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp58_ = first;
#line 295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp58_) {
#line 2631 "tracker-sparql-pattern.c"
						GString* _tmp59_;
#line 296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp59_ = sql;
#line 296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp59_, ", ");
#line 2637 "tracker-sparql-pattern.c"
					} else {
#line 298 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						first = FALSE;
#line 2641 "tracker-sparql-pattern.c"
					}
#line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp60_ = subquery;
#line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp60_) {
#line 2647 "tracker-sparql-pattern.c"
						GString* _tmp61_;
						TrackerSparqlVariable* _tmp62_;
						const gchar* _tmp63_;
						const gchar* _tmp64_;
#line 302 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp61_ = sql;
#line 302 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp62_ = variable;
#line 302 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp63_ = tracker_sparql_variable_get_sql_expression (_tmp62_);
#line 302 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp64_ = _tmp63_;
#line 302 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp61_, _tmp64_);
#line 2662 "tracker-sparql-pattern.c"
					} else {
						GString* _tmp65_;
						TrackerSparqlVariable* _tmp66_;
						const gchar* _tmp67_;
						const gchar* _tmp68_;
						TrackerSparqlVariable* _tmp69_;
						TrackerSparqlVariableBinding* _tmp70_;
						TrackerPropertyType _tmp71_;
						GString* _tmp72_;
						TrackerSparqlVariable* _tmp73_;
						const gchar* _tmp74_;
						const gchar* _tmp75_;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp65_ = sql;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp66_ = variable;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp67_ = tracker_sparql_variable_get_sql_expression (_tmp66_);
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp68_ = _tmp67_;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp69_ = variable;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp70_ = _tmp69_->binding;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp71_ = ((TrackerSparqlDataBinding*) _tmp70_)->data_type;
#line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_expression_append_expression_as_string (_tmp65_, _tmp68_, _tmp71_);
#line 305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp72_ = sql;
#line 305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp73_ = variable;
#line 305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp74_ = tracker_sparql_variable_get_name (_tmp73_);
#line 305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp75_ = _tmp74_;
#line 305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append_printf (_tmp72_, " AS \"%s\"", _tmp75_);
#line 2701 "tracker-sparql-pattern.c"
					}
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp76_ = _result_;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp77_ = _result_;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp78_ = _tmp77_->types;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp78__length1 = _tmp77_->types_length1;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp79_ = variable;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp80_ = _tmp79_->binding;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp81_ = ((TrackerSparqlDataBinding*) _tmp80_)->data_type;
#line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_vala_array_add3 (&_tmp76_->types, &_tmp76_->types_length1, &_tmp76_->_types_size_, _tmp81_);
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp82_ = _result_;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp83_ = _result_;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp84_ = _tmp83_->variable_names;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp84__length1 = _tmp83_->variable_names_length1;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp85_ = variable;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp86_ = tracker_sparql_variable_get_name (_tmp85_);
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp87_ = _tmp86_;
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp88_ = g_strdup (_tmp87_);
#line 308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_vala_array_add4 (&_tmp82_->variable_names, &_tmp82_->variable_names_length1, &_tmp82_->_variable_names_size_, _tmp88_);
#line 2737 "tracker-sparql-pattern.c"
				}
			}
#line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_list_free0 (variable_collection);
#line 2742 "tracker-sparql-pattern.c"
		}
	} else {
		{
			gint i;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			i = 0;
#line 2749 "tracker-sparql-pattern.c"
			{
				gboolean _tmp89_;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp89_ = TRUE;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				while (TRUE) {
#line 2756 "tracker-sparql-pattern.c"
					gboolean _tmp90_;
					gint _tmp92_;
					TrackerSparqlExpression* _tmp94_;
					GString* _tmp95_;
					gboolean _tmp96_;
					gint _tmp97_;
					TrackerPropertyType _tmp98_ = 0;
					TrackerPropertyType _tmp99_;
					TrackerSparqlSelectContext* _tmp100_;
					TrackerSparqlSelectContext* _tmp101_;
					TrackerPropertyType* _tmp102_;
					gint _tmp102__length1;
					TrackerPropertyType _tmp103_;
					TrackerSparqlTokenType _tmp104_ = 0;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp90_ = _tmp89_;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp90_) {
#line 2775 "tracker-sparql-pattern.c"
						gint _tmp91_;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp91_ = i;
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						i = _tmp91_ + 1;
#line 2781 "tracker-sparql-pattern.c"
					}
#line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp89_ = FALSE;
#line 312 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					first = FALSE;
#line 314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp92_ = i;
#line 314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp92_ > 0) {
#line 2791 "tracker-sparql-pattern.c"
						GString* _tmp93_;
#line 315 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp93_ = sql;
#line 315 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp93_, ", ");
#line 2797 "tracker-sparql-pattern.c"
					}
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp94_ = self->priv->expression;
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp95_ = sql;
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp96_ = subquery;
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp97_ = i;
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp98_ = tracker_sparql_expression_translate_select_expression (_tmp94_, _tmp95_, _tmp96_, _tmp97_, &_inner_error_);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp99_ = _tmp98_;
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							__g_list_free__g_object_unref0_0 (where_bindings);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (pattern);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							__g_list_free__g_object_unref0_0 (old_bindings);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_string_free0 (pattern_sql);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 2829 "tracker-sparql-pattern.c"
						} else {
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							__g_list_free__g_object_unref0_0 (where_bindings);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (pattern);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							__g_list_free__g_object_unref0_0 (old_bindings);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_string_free0 (pattern_sql);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 2847 "tracker-sparql-pattern.c"
						}
					}
#line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					type = _tmp99_;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp100_ = _result_;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp101_ = _result_;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp102_ = _tmp101_->types;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp102__length1 = _tmp101_->types_length1;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp103_ = type;
#line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_vala_array_add5 (&_tmp100_->types, &_tmp100_->types_length1, &_tmp100_->_types_size_, _tmp103_);
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp104_ = tracker_sparql_pattern_current (self);
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					switch (_tmp104_) {
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_FROM:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_WHERE:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_GROUP:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_ORDER:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_LIMIT:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_OFFSET:
#line 321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						case TRACKER_SPARQL_TOKEN_TYPE_EOF:
#line 2884 "tracker-sparql-pattern.c"
						{
#line 330 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							break;
#line 2888 "tracker-sparql-pattern.c"
						}
						default:
						{
#line 332 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							continue;
#line 2894 "tracker-sparql-pattern.c"
						}
					}
#line 334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					break;
#line 2899 "tracker-sparql-pattern.c"
				}
			}
		}
	}
#line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp105_ = where_bindings;
#line 2906 "tracker-sparql-pattern.c"
	{
		GList* binding_collection = NULL;
		GList* binding_it = NULL;
#line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		binding_collection = _tmp105_;
#line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (binding_it = binding_collection; binding_it != NULL; binding_it = binding_it->next) {
#line 2914 "tracker-sparql-pattern.c"
			TrackerSparqlLiteralBinding* _tmp106_;
			TrackerSparqlLiteralBinding* binding = NULL;
#line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp106_ = _g_object_ref0 ((TrackerSparqlLiteralBinding*) binding_it->data);
#line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp106_;
#line 2921 "tracker-sparql-pattern.c"
			{
				TrackerSparqlQuery* _tmp107_;
				TrackerSparqlLiteralBinding* _tmp108_;
				TrackerSparqlLiteralBinding* _tmp109_;
#line 340 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp107_ = self->priv->query;
#line 340 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp108_ = binding;
#line 340 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp109_ = _g_object_ref0 (_tmp108_);
#line 340 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp107_->bindings = g_list_append (_tmp107_->bindings, _tmp109_);
#line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 2936 "tracker-sparql-pattern.c"
			}
		}
	}
#line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp110_ = first;
#line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp110_) {
#line 2944 "tracker-sparql-pattern.c"
		GString* _tmp111_;
#line 344 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp111_ = sql;
#line 344 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp111_, "NULL");
#line 2950 "tracker-sparql-pattern.c"
	}
#line 348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp112_ = sql;
#line 348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp112_, " FROM (");
#line 349 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp113_ = sql;
#line 349 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp114_ = pattern_sql;
#line 349 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp115_ = _tmp114_->str;
#line 349 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp113_, _tmp115_);
#line 350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp116_ = sql;
#line 350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp116_, ")");
#line 352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp117_ = after_where;
#line 352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_location (self, &_tmp117_);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp118_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_GROUP, &_inner_error_);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp119_ = _tmp118_;
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 2994 "tracker-sparql-pattern.c"
		} else {
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 3012 "tracker-sparql-pattern.c"
		}
	}
#line 354 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp119_) {
#line 3017 "tracker-sparql-pattern.c"
		GString* _tmp120_;
		gboolean first_group;
		gboolean _tmp146_ = FALSE;
		gboolean _tmp147_;
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_BY, &_inner_error_);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3042 "tracker-sparql-pattern.c"
			} else {
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3060 "tracker-sparql-pattern.c"
			}
		}
#line 356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp120_ = sql;
#line 356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp120_, " GROUP BY ");
#line 357 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		first_group = TRUE;
#line 3069 "tracker-sparql-pattern.c"
		{
			gboolean _tmp121_;
#line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp121_ = TRUE;
#line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			while (TRUE) {
#line 3076 "tracker-sparql-pattern.c"
				gboolean _tmp122_;
				gboolean _tmp142_;
				TrackerSparqlExpression* _tmp144_;
				GString* _tmp145_;
#line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp122_ = _tmp121_;
#line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp122_) {
#line 3085 "tracker-sparql-pattern.c"
					gboolean _tmp123_ = FALSE;
					gboolean _tmp124_ = FALSE;
					gboolean _tmp125_ = FALSE;
					gboolean _tmp126_ = FALSE;
					gboolean _tmp127_ = FALSE;
					gboolean _tmp128_ = FALSE;
					TrackerSparqlTokenType _tmp129_ = 0;
					gboolean _tmp131_;
					gboolean _tmp133_;
					gboolean _tmp135_;
					gboolean _tmp137_;
					gboolean _tmp139_;
					gboolean _tmp141_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp129_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp129_ != TRACKER_SPARQL_TOKEN_TYPE_HAVING) {
#line 3103 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp130_ = 0;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp130_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp128_ = _tmp130_ != TRACKER_SPARQL_TOKEN_TYPE_ORDER;
#line 3109 "tracker-sparql-pattern.c"
					} else {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp128_ = FALSE;
#line 3113 "tracker-sparql-pattern.c"
					}
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp131_ = _tmp128_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp131_) {
#line 3119 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp132_ = 0;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp132_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp127_ = _tmp132_ != TRACKER_SPARQL_TOKEN_TYPE_LIMIT;
#line 3125 "tracker-sparql-pattern.c"
					} else {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp127_ = FALSE;
#line 3129 "tracker-sparql-pattern.c"
					}
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp133_ = _tmp127_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp133_) {
#line 3135 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp134_ = 0;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp134_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp126_ = _tmp134_ != TRACKER_SPARQL_TOKEN_TYPE_OFFSET;
#line 3141 "tracker-sparql-pattern.c"
					} else {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp126_ = FALSE;
#line 3145 "tracker-sparql-pattern.c"
					}
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp135_ = _tmp126_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp135_) {
#line 3151 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp136_ = 0;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp136_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp125_ = _tmp136_ != TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE;
#line 3157 "tracker-sparql-pattern.c"
					} else {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp125_ = FALSE;
#line 3161 "tracker-sparql-pattern.c"
					}
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp137_ = _tmp125_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp137_) {
#line 3167 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp138_ = 0;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp138_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp124_ = _tmp138_ != TRACKER_SPARQL_TOKEN_TYPE_CLOSE_PARENS;
#line 3173 "tracker-sparql-pattern.c"
					} else {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp124_ = FALSE;
#line 3177 "tracker-sparql-pattern.c"
					}
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp139_ = _tmp124_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp139_) {
#line 3183 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp140_ = 0;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp140_ = tracker_sparql_pattern_current (self);
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp123_ = _tmp140_ != TRACKER_SPARQL_TOKEN_TYPE_EOF;
#line 3189 "tracker-sparql-pattern.c"
					} else {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp123_ = FALSE;
#line 3193 "tracker-sparql-pattern.c"
					}
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp141_ = _tmp123_;
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp141_) {
#line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						break;
#line 3201 "tracker-sparql-pattern.c"
					}
				}
#line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp121_ = FALSE;
#line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp142_ = first_group;
#line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp142_) {
#line 360 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					first_group = FALSE;
#line 3212 "tracker-sparql-pattern.c"
				} else {
					GString* _tmp143_;
#line 362 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp143_ = sql;
#line 362 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp143_, ", ");
#line 3219 "tracker-sparql-pattern.c"
				}
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp144_ = self->priv->expression;
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp145_ = sql;
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_expression_translate_expression (_tmp144_, _tmp145_, &_inner_error_);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (where_bindings);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 3245 "tracker-sparql-pattern.c"
					} else {
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (where_bindings);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 3263 "tracker-sparql-pattern.c"
					}
				}
			}
		}
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp146_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_HAVING, &_inner_error_);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp147_ = _tmp146_;
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3290 "tracker-sparql-pattern.c"
			} else {
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3308 "tracker-sparql-pattern.c"
			}
		}
#line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp147_) {
#line 3313 "tracker-sparql-pattern.c"
			GString* _tmp148_;
			TrackerSparqlExpression* _tmp149_;
			GString* _tmp150_;
#line 368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp148_ = sql;
#line 368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_string_append (_tmp148_, " HAVING ");
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp149_ = self->priv->expression;
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp150_ = sql;
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_expression_translate_constraint (_tmp149_, _tmp150_, &_inner_error_);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3345 "tracker-sparql-pattern.c"
				} else {
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 369 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3363 "tracker-sparql-pattern.c"
				}
			}
		}
	}
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp151_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_ORDER, &_inner_error_);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp152_ = _tmp151_;
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 3390 "tracker-sparql-pattern.c"
		} else {
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 3408 "tracker-sparql-pattern.c"
		}
	}
#line 373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp152_) {
#line 3413 "tracker-sparql-pattern.c"
		GString* _tmp153_;
		gboolean first_order;
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_BY, &_inner_error_);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3436 "tracker-sparql-pattern.c"
			} else {
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3454 "tracker-sparql-pattern.c"
			}
		}
#line 375 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp153_ = sql;
#line 375 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp153_, " ORDER BY ");
#line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		first_order = TRUE;
#line 3463 "tracker-sparql-pattern.c"
		{
			gboolean _tmp154_;
#line 377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp154_ = TRUE;
#line 377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			while (TRUE) {
#line 3470 "tracker-sparql-pattern.c"
				gboolean _tmp155_;
				gboolean _tmp169_;
				TrackerSparqlExpression* _tmp171_;
				GString* _tmp172_;
#line 377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp155_ = _tmp154_;
#line 377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp155_) {
#line 3479 "tracker-sparql-pattern.c"
					gboolean _tmp156_ = FALSE;
					gboolean _tmp157_ = FALSE;
					gboolean _tmp158_ = FALSE;
					gboolean _tmp159_ = FALSE;
					TrackerSparqlTokenType _tmp160_ = 0;
					gboolean _tmp162_;
					gboolean _tmp164_;
					gboolean _tmp166_;
					gboolean _tmp168_;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp160_ = tracker_sparql_pattern_current (self);
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp160_ != TRACKER_SPARQL_TOKEN_TYPE_LIMIT) {
#line 3493 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp161_ = 0;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp161_ = tracker_sparql_pattern_current (self);
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp159_ = _tmp161_ != TRACKER_SPARQL_TOKEN_TYPE_OFFSET;
#line 3499 "tracker-sparql-pattern.c"
					} else {
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp159_ = FALSE;
#line 3503 "tracker-sparql-pattern.c"
					}
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp162_ = _tmp159_;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp162_) {
#line 3509 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp163_ = 0;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp163_ = tracker_sparql_pattern_current (self);
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp158_ = _tmp163_ != TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE;
#line 3515 "tracker-sparql-pattern.c"
					} else {
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp158_ = FALSE;
#line 3519 "tracker-sparql-pattern.c"
					}
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp164_ = _tmp158_;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp164_) {
#line 3525 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp165_ = 0;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp165_ = tracker_sparql_pattern_current (self);
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp157_ = _tmp165_ != TRACKER_SPARQL_TOKEN_TYPE_CLOSE_PARENS;
#line 3531 "tracker-sparql-pattern.c"
					} else {
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp157_ = FALSE;
#line 3535 "tracker-sparql-pattern.c"
					}
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp166_ = _tmp157_;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp166_) {
#line 3541 "tracker-sparql-pattern.c"
						TrackerSparqlTokenType _tmp167_ = 0;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp167_ = tracker_sparql_pattern_current (self);
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp156_ = _tmp167_ != TRACKER_SPARQL_TOKEN_TYPE_EOF;
#line 3547 "tracker-sparql-pattern.c"
					} else {
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp156_ = FALSE;
#line 3551 "tracker-sparql-pattern.c"
					}
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp168_ = _tmp156_;
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp168_) {
#line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						break;
#line 3559 "tracker-sparql-pattern.c"
					}
				}
#line 377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp154_ = FALSE;
#line 378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp169_ = first_order;
#line 378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp169_) {
#line 379 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					first_order = FALSE;
#line 3570 "tracker-sparql-pattern.c"
				} else {
					GString* _tmp170_;
#line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp170_ = sql;
#line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp170_, ", ");
#line 3577 "tracker-sparql-pattern.c"
				}
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp171_ = self->priv->expression;
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp172_ = sql;
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_expression_translate_order_condition (_tmp171_, _tmp172_, &_inner_error_);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (where_bindings);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 3603 "tracker-sparql-pattern.c"
					} else {
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (where_bindings);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 3621 "tracker-sparql-pattern.c"
					}
				}
			}
		}
	}
#line 387 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	limit = -1;
#line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	offset = -1;
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp173_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_LIMIT, &_inner_error_);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp174_ = _tmp173_;
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 3653 "tracker-sparql-pattern.c"
		} else {
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (where_bindings);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (pattern);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			__g_list_free__g_object_unref0_0 (old_bindings);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_string_free0 (pattern_sql);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 3671 "tracker-sparql-pattern.c"
		}
	}
#line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp174_) {
#line 3676 "tracker-sparql-pattern.c"
		gchar* _tmp175_ = NULL;
		gchar* _tmp176_;
		gint _tmp177_ = 0;
		gboolean _tmp178_ = FALSE;
		gboolean _tmp179_;
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_INTEGER, &_inner_error_);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3702 "tracker-sparql-pattern.c"
			} else {
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3720 "tracker-sparql-pattern.c"
			}
		}
#line 392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp175_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp176_ = _tmp175_;
#line 392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp177_ = atoi (_tmp176_);
#line 392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		limit = _tmp177_;
#line 392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp176_);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp178_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OFFSET, &_inner_error_);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp179_ = _tmp178_;
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3755 "tracker-sparql-pattern.c"
			} else {
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3773 "tracker-sparql-pattern.c"
			}
		}
#line 393 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp179_) {
#line 3778 "tracker-sparql-pattern.c"
			gchar* _tmp180_ = NULL;
			gchar* _tmp181_;
			gint _tmp182_ = 0;
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_INTEGER, &_inner_error_);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3802 "tracker-sparql-pattern.c"
				} else {
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3820 "tracker-sparql-pattern.c"
				}
			}
#line 395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp180_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp181_ = _tmp180_;
#line 395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp182_ = atoi (_tmp181_);
#line 395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			offset = _tmp182_;
#line 395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp181_);
#line 3833 "tracker-sparql-pattern.c"
		}
	} else {
		gboolean _tmp183_ = FALSE;
		gboolean _tmp184_;
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp183_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OFFSET, &_inner_error_);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp184_ = _tmp183_;
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3860 "tracker-sparql-pattern.c"
			} else {
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (where_bindings);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (pattern);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				__g_list_free__g_object_unref0_0 (old_bindings);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (pattern_sql);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 3878 "tracker-sparql-pattern.c"
			}
		}
#line 397 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp184_) {
#line 3883 "tracker-sparql-pattern.c"
			gchar* _tmp185_ = NULL;
			gchar* _tmp186_;
			gint _tmp187_ = 0;
			gboolean _tmp188_ = FALSE;
			gboolean _tmp189_;
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_INTEGER, &_inner_error_);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3909 "tracker-sparql-pattern.c"
				} else {
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3927 "tracker-sparql-pattern.c"
				}
			}
#line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp185_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp186_ = _tmp185_;
#line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp187_ = atoi (_tmp186_);
#line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			offset = _tmp187_;
#line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp186_);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp188_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_LIMIT, &_inner_error_);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp189_ = _tmp188_;
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3962 "tracker-sparql-pattern.c"
				} else {
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (where_bindings);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (pattern);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					__g_list_free__g_object_unref0_0 (old_bindings);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (pattern_sql);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 3980 "tracker-sparql-pattern.c"
				}
			}
#line 400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp189_) {
#line 3985 "tracker-sparql-pattern.c"
				gchar* _tmp190_ = NULL;
				gchar* _tmp191_;
				gint _tmp192_ = 0;
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_INTEGER, &_inner_error_);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (where_bindings);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4009 "tracker-sparql-pattern.c"
					} else {
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (where_bindings);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						__g_list_free__g_object_unref0_0 (old_bindings);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (pattern_sql);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4027 "tracker-sparql-pattern.c"
					}
				}
#line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp190_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp191_ = _tmp190_;
#line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp192_ = atoi (_tmp191_);
#line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				limit = _tmp192_;
#line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp191_);
#line 4040 "tracker-sparql-pattern.c"
			}
		}
	}
#line 407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp193_ = limit;
#line 407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp193_ >= 0) {
#line 4048 "tracker-sparql-pattern.c"
		GString* _tmp194_;
		TrackerSparqlLiteralBinding* _tmp195_;
		TrackerSparqlLiteralBinding* binding;
		TrackerSparqlLiteralBinding* _tmp196_;
		gint _tmp197_;
		gchar* _tmp198_ = NULL;
		TrackerSparqlLiteralBinding* _tmp199_;
		TrackerSparqlQuery* _tmp200_;
		TrackerSparqlLiteralBinding* _tmp201_;
		TrackerSparqlLiteralBinding* _tmp202_;
		gint _tmp203_;
#line 408 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp194_ = sql;
#line 408 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp194_, " LIMIT ?");
#line 410 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp195_ = tracker_sparql_literal_binding_new ();
#line 410 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		binding = _tmp195_;
#line 411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp196_ = binding;
#line 411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp197_ = limit;
#line 411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp198_ = g_strdup_printf ("%i", _tmp197_);
#line 411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp196_->literal);
#line 411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp196_->literal = _tmp198_;
#line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp199_ = binding;
#line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		((TrackerSparqlDataBinding*) _tmp199_)->data_type = TRACKER_PROPERTY_TYPE_INTEGER;
#line 413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp200_ = self->priv->query;
#line 413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp201_ = binding;
#line 413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp202_ = _g_object_ref0 (_tmp201_);
#line 413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp200_->bindings = g_list_append (_tmp200_->bindings, _tmp202_);
#line 415 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp203_ = offset;
#line 415 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp203_ >= 0) {
#line 4094 "tracker-sparql-pattern.c"
			GString* _tmp204_;
			TrackerSparqlLiteralBinding* _tmp205_;
			TrackerSparqlLiteralBinding* _tmp206_;
			gint _tmp207_;
			gchar* _tmp208_ = NULL;
			TrackerSparqlLiteralBinding* _tmp209_;
			TrackerSparqlQuery* _tmp210_;
			TrackerSparqlLiteralBinding* _tmp211_;
			TrackerSparqlLiteralBinding* _tmp212_;
#line 416 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp204_ = sql;
#line 416 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_string_append (_tmp204_, " OFFSET ?");
#line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp205_ = tracker_sparql_literal_binding_new ();
#line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (binding);
#line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp205_;
#line 419 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp206_ = binding;
#line 419 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp207_ = offset;
#line 419 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp208_ = g_strdup_printf ("%i", _tmp207_);
#line 419 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp206_->literal);
#line 419 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp206_->literal = _tmp208_;
#line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp209_ = binding;
#line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp209_)->data_type = TRACKER_PROPERTY_TYPE_INTEGER;
#line 421 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp210_ = self->priv->query;
#line 421 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp211_ = binding;
#line 421 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp212_ = _g_object_ref0 (_tmp211_);
#line 421 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp210_->bindings = g_list_append (_tmp210_->bindings, _tmp212_);
#line 4136 "tracker-sparql-pattern.c"
		}
#line 407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (binding);
#line 4140 "tracker-sparql-pattern.c"
	} else {
		gint _tmp213_;
#line 423 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp213_ = offset;
#line 423 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp213_ >= 0) {
#line 4147 "tracker-sparql-pattern.c"
			GString* _tmp214_;
			TrackerSparqlLiteralBinding* _tmp215_;
			TrackerSparqlLiteralBinding* binding;
			TrackerSparqlLiteralBinding* _tmp216_;
			gint _tmp217_;
			gchar* _tmp218_ = NULL;
			TrackerSparqlLiteralBinding* _tmp219_;
			TrackerSparqlQuery* _tmp220_;
			TrackerSparqlLiteralBinding* _tmp221_;
			TrackerSparqlLiteralBinding* _tmp222_;
#line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp214_ = sql;
#line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_string_append (_tmp214_, " LIMIT -1 OFFSET ?");
#line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp215_ = tracker_sparql_literal_binding_new ();
#line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp215_;
#line 427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp216_ = binding;
#line 427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp217_ = offset;
#line 427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp218_ = g_strdup_printf ("%i", _tmp217_);
#line 427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp216_->literal);
#line 427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp216_->literal = _tmp218_;
#line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp219_ = binding;
#line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp219_)->data_type = TRACKER_PROPERTY_TYPE_INTEGER;
#line 429 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp220_ = self->priv->query;
#line 429 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp221_ = binding;
#line 429 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp222_ = _g_object_ref0 (_tmp221_);
#line 429 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp220_->bindings = g_list_append (_tmp220_->bindings, _tmp222_);
#line 423 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (binding);
#line 4190 "tracker-sparql-pattern.c"
		}
	}
#line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp223_ = tracker_sparql_pattern_get_context (self);
#line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp224_ = _tmp223_;
#line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp225_ = _tmp224_->parent_context;
#line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, _tmp225_);
#line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp226_ = _result_;
#line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp227_ = type;
#line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp226_->type = _tmp227_;
#line 436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _result_;
#line 436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (where_bindings);
#line 436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (pattern);
#line 436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (old_bindings);
#line 436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_string_free0 (pattern_sql);
#line 436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 4219 "tracker-sparql-pattern.c"
}


void tracker_sparql_pattern_translate_exists (TrackerSparqlPattern* self, GString* sql, GError** error) {
	gboolean _tmp0_ = FALSE;
	gboolean not;
	TrackerSparqlSelectContext* _result_ = NULL;
	TrackerSparqlQuery* _tmp1_;
	TrackerSparqlContext* _tmp2_;
	TrackerSparqlContext* _tmp3_;
	TrackerSparqlSelectContext* _tmp4_;
	TrackerSparqlSelectContext* _tmp5_;
	gboolean _tmp6_;
	GString* _tmp9_;
	TrackerSparqlContext* _tmp10_ = NULL;
	TrackerSparqlContext* pattern;
	TrackerSparqlContext* _tmp11_;
	GHashTable* _tmp12_;
	GList* _tmp13_ = NULL;
	TrackerSparqlContext* _tmp19_;
	TrackerSparqlContext* _tmp20_;
	GHashTable* _tmp21_;
	GList* _tmp22_ = NULL;
	GString* _tmp32_;
	TrackerSparqlContext* _tmp33_;
	TrackerSparqlContext* _tmp34_;
	TrackerSparqlContext* _tmp35_;
	GError * _inner_error_ = NULL;
#line 439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_NOT, &_inner_error_);
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	not = _tmp0_;
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 4264 "tracker-sparql-pattern.c"
		} else {
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 4272 "tracker-sparql-pattern.c"
		}
	}
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_EXISTS, &_inner_error_);
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 4285 "tracker-sparql-pattern.c"
		} else {
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 4293 "tracker-sparql-pattern.c"
		}
	}
#line 444 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = self->priv->query;
#line 444 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = tracker_sparql_pattern_get_context (self);
#line 444 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = _tmp2_;
#line 444 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = tracker_sparql_select_context_new_subquery (_tmp1_, _tmp3_);
#line 444 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (_result_);
#line 444 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_result_ = _tmp4_;
#line 445 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp5_ = _result_;
#line 445 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, (TrackerSparqlContext*) _tmp5_);
#line 447 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp6_ = not;
#line 447 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp6_) {
#line 4316 "tracker-sparql-pattern.c"
		GString* _tmp7_;
#line 449 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp7_ = sql;
#line 449 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp7_, "NOT EXISTS (");
#line 4322 "tracker-sparql-pattern.c"
	} else {
		GString* _tmp8_;
#line 452 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = sql;
#line 452 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp8_, "EXISTS (");
#line 4329 "tracker-sparql-pattern.c"
	}
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp9_ = sql;
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp10_ = tracker_sparql_pattern_translate_group_graph_pattern (self, _tmp9_, &_inner_error_);
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	pattern = _tmp10_;
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 4347 "tracker-sparql-pattern.c"
		} else {
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 455 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 4357 "tracker-sparql-pattern.c"
		}
	}
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp11_ = pattern;
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp12_ = _tmp11_->var_set;
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp13_ = g_hash_table_get_keys (_tmp12_);
#line 4366 "tracker-sparql-pattern.c"
	{
		GList* key_collection = NULL;
		GList* key_it = NULL;
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		key_collection = _tmp13_;
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
#line 4374 "tracker-sparql-pattern.c"
			TrackerSparqlVariable* key = NULL;
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			key = (TrackerSparqlVariable*) key_it->data;
#line 4378 "tracker-sparql-pattern.c"
			{
				TrackerSparqlContext* _tmp14_;
				TrackerSparqlContext* _tmp15_;
				GHashTable* _tmp16_;
				TrackerSparqlVariable* _tmp17_;
				TrackerSparqlVariable* _tmp18_;
#line 457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp14_ = tracker_sparql_pattern_get_context (self);
#line 457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp15_ = _tmp14_;
#line 457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp16_ = _tmp15_->var_set;
#line 457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp17_ = key;
#line 457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp18_ = _g_object_ref0 (_tmp17_);
#line 457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_hash_table_insert (_tmp16_, _tmp18_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 4397 "tracker-sparql-pattern.c"
			}
		}
#line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_list_free0 (key_collection);
#line 4402 "tracker-sparql-pattern.c"
	}
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp19_ = tracker_sparql_pattern_get_context (self);
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp20_ = _tmp19_;
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp21_ = _tmp20_->var_set;
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp22_ = g_hash_table_get_keys (_tmp21_);
#line 4412 "tracker-sparql-pattern.c"
	{
		GList* variable_collection = NULL;
		GList* variable_it = NULL;
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		variable_collection = _tmp22_;
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (variable_it = variable_collection; variable_it != NULL; variable_it = variable_it->next) {
#line 4420 "tracker-sparql-pattern.c"
			TrackerSparqlVariable* variable = NULL;
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			variable = (TrackerSparqlVariable*) variable_it->data;
#line 4424 "tracker-sparql-pattern.c"
			{
				TrackerSparqlVariable* _tmp23_;
				TrackerSparqlVariableBinding* _tmp24_;
#line 462 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp23_ = variable;
#line 462 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp24_ = _tmp23_->binding;
#line 462 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp24_ == NULL) {
#line 4434 "tracker-sparql-pattern.c"
					TrackerSparqlVariable* _tmp25_;
					const gchar* _tmp26_;
					const gchar* _tmp27_;
					gchar* _tmp28_ = NULL;
					gchar* _tmp29_;
					GError* _tmp30_ = NULL;
					GError* _tmp31_;
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp25_ = variable;
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp26_ = tracker_sparql_variable_get_name (_tmp25_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp27_ = _tmp26_;
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp28_ = g_strdup_printf ("use of undefined variable `%s'", _tmp27_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp29_ = _tmp28_;
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp30_ = tracker_sparql_pattern_get_error (self, _tmp29_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp31_ = _tmp30_;
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp29_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_inner_error_ = _tmp31_;
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_list_free0 (variable_collection);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 4472 "tracker-sparql-pattern.c"
					} else {
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_list_free0 (variable_collection);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (pattern);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 4486 "tracker-sparql-pattern.c"
					}
				}
			}
		}
#line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_list_free0 (variable_collection);
#line 4493 "tracker-sparql-pattern.c"
	}
#line 467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp32_ = sql;
#line 467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp32_, ")");
#line 469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp33_ = tracker_sparql_pattern_get_context (self);
#line 469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp34_ = _tmp33_;
#line 469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp35_ = _tmp34_->parent_context;
#line 469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, _tmp35_);
#line 439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (pattern);
#line 439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (_result_);
#line 4511 "tracker-sparql-pattern.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* end;
	gchar* _tmp3_;
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1302 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1302 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 4534 "tracker-sparql-pattern.c"
		glong _tmp4_;
#line 1303 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1303 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1303 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		return result;
#line 4542 "tracker-sparql-pattern.c"
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		return result;
#line 4554 "tracker-sparql-pattern.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	gboolean _tmp3_;
	glong _tmp9_;
	glong _tmp15_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	glong _tmp22_;
	gchar* _tmp23_ = NULL;
#line 1312 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 4579 "tracker-sparql-pattern.c"
		glong _tmp2_;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 4585 "tracker-sparql-pattern.c"
	} else {
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 4589 "tracker-sparql-pattern.c"
	}
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp3_ = _tmp0_;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp3_) {
#line 4595 "tracker-sparql-pattern.c"
		glong _tmp4_;
		glong _tmp5_;
		glong _tmp6_ = 0L;
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp4_ = offset;
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp5_ = len;
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		string_length = _tmp6_;
#line 4607 "tracker-sparql-pattern.c"
	} else {
		gint _tmp7_;
		gint _tmp8_;
#line 1318 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp7_ = strlen (self);
#line 1318 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp7_;
#line 1318 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp8_;
#line 4617 "tracker-sparql-pattern.c"
	}
#line 1321 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp9_ = offset;
#line 1321 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp9_ < ((glong) 0)) {
#line 4623 "tracker-sparql-pattern.c"
		glong _tmp10_;
		glong _tmp11_;
		glong _tmp12_;
#line 1322 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp10_ = string_length;
#line 1322 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1322 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		offset = _tmp10_ + _tmp11_;
#line 1323 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1323 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
#line 4637 "tracker-sparql-pattern.c"
	} else {
		glong _tmp13_;
		glong _tmp14_;
#line 1325 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp13_ = offset;
#line 1325 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp14_ = string_length;
#line 1325 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
#line 4647 "tracker-sparql-pattern.c"
	}
#line 1327 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp15_ = len;
#line 1327 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp15_ < ((glong) 0)) {
#line 4653 "tracker-sparql-pattern.c"
		glong _tmp16_;
		glong _tmp17_;
#line 1328 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp16_ = string_length;
#line 1328 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp17_ = offset;
#line 1328 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		len = _tmp16_ - _tmp17_;
#line 4662 "tracker-sparql-pattern.c"
	}
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp18_ = offset;
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp19_ = len;
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp20_ = string_length;
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp21_ = offset;
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp22_ = len;
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	result = _tmp23_;
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	return result;
#line 4682 "tracker-sparql-pattern.c"
}


gchar* tracker_sparql_pattern_parse_var_or_term (TrackerSparqlPattern* self, GString* sql, gboolean* is_var, GError** error) {
	gboolean _vala_is_var = FALSE;
	gchar* result = NULL;
	gchar* _tmp0_;
	gchar* _result_;
	TrackerSparqlTokenType _tmp1_ = 0;
	GError * _inner_error_ = NULL;
#line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = g_strdup ("");
#line 473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_result_ = _tmp0_;
#line 474 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_vala_is_var = FALSE;
#line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = tracker_sparql_pattern_current (self);
#line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp1_ == TRACKER_SPARQL_TOKEN_TYPE_VAR) {
#line 4705 "tracker-sparql-pattern.c"
		gchar* _tmp2_ = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_ = NULL;
#line 476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_vala_is_var = TRUE;
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_next (self, &_inner_error_);
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_result_);
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 4723 "tracker-sparql-pattern.c"
			} else {
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_result_);
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 4733 "tracker-sparql-pattern.c"
			}
		}
#line 478 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 478 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = _tmp2_;
#line 478 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = string_substring (_tmp3_, (glong) 1, (glong) (-1));
#line 478 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_result_);
#line 478 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_result_ = _tmp4_;
#line 478 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp3_);
#line 4748 "tracker-sparql-pattern.c"
	} else {
		TrackerSparqlTokenType _tmp5_ = 0;
#line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = tracker_sparql_pattern_current (self);
#line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp5_ == TRACKER_SPARQL_TOKEN_TYPE_IRI_REF) {
#line 4755 "tracker-sparql-pattern.c"
			gchar* _tmp6_ = NULL;
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_next (self, &_inner_error_);
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_result_);
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 4769 "tracker-sparql-pattern.c"
				} else {
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_result_);
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 4779 "tracker-sparql-pattern.c"
				}
			}
#line 481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_ = tracker_sparql_pattern_get_last_string (self, 1);
#line 481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_result_);
#line 481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_result_ = _tmp6_;
#line 4788 "tracker-sparql-pattern.c"
		} else {
			TrackerSparqlTokenType _tmp7_ = 0;
#line 482 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp7_ = tracker_sparql_pattern_current (self);
#line 482 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp7_ == TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX) {
#line 4795 "tracker-sparql-pattern.c"
				gchar* _tmp8_ = NULL;
				gchar* ns;
				TrackerSparqlQuery* _tmp9_;
				const gchar* _tmp10_;
				gchar* _tmp11_ = NULL;
				gchar* _tmp12_;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_;
				gchar* _tmp15_ = NULL;
				gchar* _tmp16_;
				gchar* _tmp17_;
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_next (self, &_inner_error_);
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4819 "tracker-sparql-pattern.c"
					} else {
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4829 "tracker-sparql-pattern.c"
					}
				}
#line 485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp8_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				ns = _tmp8_;
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (ns);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4850 "tracker-sparql-pattern.c"
					} else {
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (ns);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4862 "tracker-sparql-pattern.c"
					}
				}
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp9_ = self->priv->query;
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp10_ = ns;
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp11_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp12_ = _tmp11_;
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp13_ = string_substring (_tmp12_, (glong) 1, (glong) (-1));
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp14_ = _tmp13_;
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp15_ = tracker_sparql_query_resolve_prefixed_name (_tmp9_, _tmp10_, _tmp14_, &_inner_error_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp16_ = _tmp15_;
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp14_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp12_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp17_ = _tmp16_;
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (ns);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4899 "tracker-sparql-pattern.c"
					} else {
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (ns);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 4911 "tracker-sparql-pattern.c"
					}
				}
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_result_);
#line 487 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_result_ = _tmp17_;
#line 482 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (ns);
#line 4920 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlTokenType _tmp18_ = 0;
#line 488 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp18_ = tracker_sparql_pattern_current (self);
#line 488 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp18_ == TRACKER_SPARQL_TOKEN_TYPE_COLON) {
#line 4927 "tracker-sparql-pattern.c"
					TrackerSparqlQuery* _tmp19_;
					gchar* _tmp20_ = NULL;
					gchar* _tmp21_;
					gchar* _tmp22_ = NULL;
					gchar* _tmp23_;
					gchar* _tmp24_ = NULL;
					gchar* _tmp25_;
					gchar* _tmp26_;
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_next (self, &_inner_error_);
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 4948 "tracker-sparql-pattern.c"
						} else {
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 490 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 4958 "tracker-sparql-pattern.c"
						}
					}
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp19_ = self->priv->query;
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp20_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp21_ = _tmp20_;
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp22_ = string_substring (_tmp21_, (glong) 1, (glong) (-1));
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp23_ = _tmp22_;
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp24_ = tracker_sparql_query_resolve_prefixed_name (_tmp19_, "", _tmp23_, &_inner_error_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp25_ = _tmp24_;
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp23_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp21_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp26_ = _tmp25_;
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 4991 "tracker-sparql-pattern.c"
						} else {
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 5001 "tracker-sparql-pattern.c"
						}
					}
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_result_);
#line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_result_ = _tmp26_;
#line 5008 "tracker-sparql-pattern.c"
				} else {
					gboolean _tmp27_ = FALSE;
					gboolean _tmp28_;
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp27_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_BLANK_NODE, &_inner_error_);
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp28_ = _tmp27_;
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 5026 "tracker-sparql-pattern.c"
						} else {
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 5036 "tracker-sparql-pattern.c"
						}
					}
#line 492 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp28_) {
#line 5041 "tracker-sparql-pattern.c"
						TrackerSparqlQuery* _tmp29_;
						gchar* _tmp30_ = NULL;
						gchar* _tmp31_;
						gchar* _tmp32_ = NULL;
						gchar* _tmp33_;
						gchar* _tmp34_ = NULL;
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (_result_);
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 5060 "tracker-sparql-pattern.c"
							} else {
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (_result_);
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 5070 "tracker-sparql-pattern.c"
							}
						}
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp29_ = self->priv->query;
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp30_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp31_ = _tmp30_;
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp32_ = string_substring (_tmp31_, (glong) 1, (glong) (-1));
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp33_ = _tmp32_;
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp34_ = tracker_sparql_query_generate_bnodeid (_tmp29_, _tmp33_);
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_result_);
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_result_ = _tmp34_;
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_tmp33_);
#line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_tmp31_);
#line 5093 "tracker-sparql-pattern.c"
					} else {
						TrackerSparqlTokenType _tmp35_ = 0;
#line 496 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp35_ = tracker_sparql_pattern_current (self);
#line 496 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_tmp35_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL1) {
#line 5100 "tracker-sparql-pattern.c"
							TrackerSparqlExpression* _tmp36_;
							gchar* _tmp37_ = NULL;
							gchar* _tmp38_;
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp36_ = self->priv->expression;
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp37_ = tracker_sparql_expression_parse_string_literal (_tmp36_, NULL, &_inner_error_);
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp38_ = _tmp37_;
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_ != NULL) {
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_propagate_error (error, _inner_error_);
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_result_);
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									return NULL;
#line 5120 "tracker-sparql-pattern.c"
								} else {
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_result_);
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_clear_error (&_inner_error_);
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									return NULL;
#line 5130 "tracker-sparql-pattern.c"
								}
							}
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (_result_);
#line 497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_result_ = _tmp38_;
#line 5137 "tracker-sparql-pattern.c"
						} else {
							TrackerSparqlTokenType _tmp39_ = 0;
#line 498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp39_ = tracker_sparql_pattern_current (self);
#line 498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_tmp39_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL2) {
#line 5144 "tracker-sparql-pattern.c"
								TrackerSparqlExpression* _tmp40_;
								gchar* _tmp41_ = NULL;
								gchar* _tmp42_;
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp40_ = self->priv->expression;
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp41_ = tracker_sparql_expression_parse_string_literal (_tmp40_, NULL, &_inner_error_);
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp42_ = _tmp41_;
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_inner_error_ != NULL) {
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_propagate_error (error, _inner_error_);
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_free0 (_result_);
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										return NULL;
#line 5164 "tracker-sparql-pattern.c"
									} else {
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_free0 (_result_);
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_clear_error (&_inner_error_);
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										return NULL;
#line 5174 "tracker-sparql-pattern.c"
									}
								}
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (_result_);
#line 499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_result_ = _tmp42_;
#line 5181 "tracker-sparql-pattern.c"
							} else {
								TrackerSparqlTokenType _tmp43_ = 0;
#line 500 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp43_ = tracker_sparql_pattern_current (self);
#line 500 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp43_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG1) {
#line 5188 "tracker-sparql-pattern.c"
									TrackerSparqlExpression* _tmp44_;
									gchar* _tmp45_ = NULL;
									gchar* _tmp46_;
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp44_ = self->priv->expression;
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp45_ = tracker_sparql_expression_parse_string_literal (_tmp44_, NULL, &_inner_error_);
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp46_ = _tmp45_;
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_inner_error_ != NULL) {
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											g_propagate_error (error, _inner_error_);
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_result_);
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											return NULL;
#line 5208 "tracker-sparql-pattern.c"
										} else {
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_result_);
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											g_clear_error (&_inner_error_);
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											return NULL;
#line 5218 "tracker-sparql-pattern.c"
										}
									}
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_result_);
#line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_result_ = _tmp46_;
#line 5225 "tracker-sparql-pattern.c"
								} else {
									TrackerSparqlTokenType _tmp47_ = 0;
#line 502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp47_ = tracker_sparql_pattern_current (self);
#line 502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp47_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG2) {
#line 5232 "tracker-sparql-pattern.c"
										TrackerSparqlExpression* _tmp48_;
										gchar* _tmp49_ = NULL;
										gchar* _tmp50_;
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp48_ = self->priv->expression;
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp49_ = tracker_sparql_expression_parse_string_literal (_tmp48_, NULL, &_inner_error_);
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp50_ = _tmp49_;
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										if (_inner_error_ != NULL) {
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												g_propagate_error (error, _inner_error_);
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_g_free0 (_result_);
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												return NULL;
#line 5252 "tracker-sparql-pattern.c"
											} else {
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_g_free0 (_result_);
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												g_clear_error (&_inner_error_);
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												return NULL;
#line 5262 "tracker-sparql-pattern.c"
											}
										}
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_free0 (_result_);
#line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_result_ = _tmp50_;
#line 5269 "tracker-sparql-pattern.c"
									} else {
										TrackerSparqlTokenType _tmp51_ = 0;
#line 504 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp51_ = tracker_sparql_pattern_current (self);
#line 504 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										if (_tmp51_ == TRACKER_SPARQL_TOKEN_TYPE_INTEGER) {
#line 5276 "tracker-sparql-pattern.c"
											gchar* _tmp52_ = NULL;
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											tracker_sparql_pattern_next (self, &_inner_error_);
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											if (_inner_error_ != NULL) {
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													g_propagate_error (error, _inner_error_);
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_g_free0 (_result_);
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													return NULL;
#line 5290 "tracker-sparql-pattern.c"
												} else {
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_g_free0 (_result_);
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													g_clear_error (&_inner_error_);
#line 505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													return NULL;
#line 5300 "tracker-sparql-pattern.c"
												}
											}
#line 506 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp52_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 506 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_result_);
#line 506 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_result_ = _tmp52_;
#line 5309 "tracker-sparql-pattern.c"
										} else {
											TrackerSparqlTokenType _tmp53_ = 0;
#line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp53_ = tracker_sparql_pattern_current (self);
#line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											if (_tmp53_ == TRACKER_SPARQL_TOKEN_TYPE_DECIMAL) {
#line 5316 "tracker-sparql-pattern.c"
												gchar* _tmp54_ = NULL;
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												tracker_sparql_pattern_next (self, &_inner_error_);
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												if (_inner_error_ != NULL) {
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														g_propagate_error (error, _inner_error_);
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														_g_free0 (_result_);
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														return NULL;
#line 5330 "tracker-sparql-pattern.c"
													} else {
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														_g_free0 (_result_);
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														g_clear_error (&_inner_error_);
#line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														return NULL;
#line 5340 "tracker-sparql-pattern.c"
													}
												}
#line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_tmp54_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_g_free0 (_result_);
#line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_result_ = _tmp54_;
#line 5349 "tracker-sparql-pattern.c"
											} else {
												TrackerSparqlTokenType _tmp55_ = 0;
#line 510 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_tmp55_ = tracker_sparql_pattern_current (self);
#line 510 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												if (_tmp55_ == TRACKER_SPARQL_TOKEN_TYPE_DOUBLE) {
#line 5356 "tracker-sparql-pattern.c"
													gchar* _tmp56_ = NULL;
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													tracker_sparql_pattern_next (self, &_inner_error_);
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													if (_inner_error_ != NULL) {
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															g_propagate_error (error, _inner_error_);
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															_g_free0 (_result_);
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															return NULL;
#line 5370 "tracker-sparql-pattern.c"
														} else {
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															_g_free0 (_result_);
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															g_clear_error (&_inner_error_);
#line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															return NULL;
#line 5380 "tracker-sparql-pattern.c"
														}
													}
#line 512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_tmp56_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_g_free0 (_result_);
#line 512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_result_ = _tmp56_;
#line 5389 "tracker-sparql-pattern.c"
												} else {
													TrackerSparqlTokenType _tmp57_ = 0;
#line 513 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_tmp57_ = tracker_sparql_pattern_current (self);
#line 513 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													if (_tmp57_ == TRACKER_SPARQL_TOKEN_TYPE_TRUE) {
#line 5396 "tracker-sparql-pattern.c"
														gchar* _tmp58_;
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														tracker_sparql_pattern_next (self, &_inner_error_);
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														if (_inner_error_ != NULL) {
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																g_propagate_error (error, _inner_error_);
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_g_free0 (_result_);
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																return NULL;
#line 5410 "tracker-sparql-pattern.c"
															} else {
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_g_free0 (_result_);
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																g_clear_error (&_inner_error_);
#line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																return NULL;
#line 5420 "tracker-sparql-pattern.c"
															}
														}
#line 515 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														_tmp58_ = g_strdup ("true");
#line 515 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														_g_free0 (_result_);
#line 515 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														_result_ = _tmp58_;
#line 5429 "tracker-sparql-pattern.c"
													} else {
														TrackerSparqlTokenType _tmp59_ = 0;
#line 516 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														_tmp59_ = tracker_sparql_pattern_current (self);
#line 516 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
														if (_tmp59_ == TRACKER_SPARQL_TOKEN_TYPE_FALSE) {
#line 5436 "tracker-sparql-pattern.c"
															gchar* _tmp60_;
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															tracker_sparql_pattern_next (self, &_inner_error_);
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															if (_inner_error_ != NULL) {
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	g_propagate_error (error, _inner_error_);
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	_g_free0 (_result_);
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	return NULL;
#line 5450 "tracker-sparql-pattern.c"
																} else {
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	_g_free0 (_result_);
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	g_clear_error (&_inner_error_);
#line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	return NULL;
#line 5460 "tracker-sparql-pattern.c"
																}
															}
#line 518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															_tmp60_ = g_strdup ("false");
#line 518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															_g_free0 (_result_);
#line 518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															_result_ = _tmp60_;
#line 5469 "tracker-sparql-pattern.c"
														} else {
															TrackerSparqlTokenType _tmp61_ = 0;
#line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															_tmp61_ = tracker_sparql_pattern_current (self);
#line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
															if (_tmp61_ == TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACKET) {
#line 5476 "tracker-sparql-pattern.c"
																TrackerSparqlQuery* _tmp62_;
																gchar* _tmp63_ = NULL;
																const gchar* _tmp64_;
																gchar* _tmp65_;
																gchar* old_subject;
																gboolean _tmp66_;
																gboolean old_subject_is_var;
																const gchar* _tmp67_;
																gchar* _tmp68_;
																GString* _tmp69_;
																const gchar* _tmp70_;
																gchar* _tmp71_;
																gboolean _tmp72_;
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																tracker_sparql_pattern_next (self, &_inner_error_);
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																if (_inner_error_ != NULL) {
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		g_propagate_error (error, _inner_error_);
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (_result_);
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		return NULL;
#line 5502 "tracker-sparql-pattern.c"
																	} else {
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (_result_);
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		g_clear_error (&_inner_error_);
#line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		return NULL;
#line 5512 "tracker-sparql-pattern.c"
																	}
																}
#line 522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp62_ = self->priv->query;
#line 522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp63_ = tracker_sparql_query_generate_bnodeid (_tmp62_, NULL);
#line 522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_g_free0 (_result_);
#line 522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_result_ = _tmp63_;
#line 524 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp64_ = self->priv->current_subject;
#line 524 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp65_ = g_strdup (_tmp64_);
#line 524 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																old_subject = _tmp65_;
#line 525 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp66_ = self->priv->current_subject_is_var;
#line 525 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																old_subject_is_var = _tmp66_;
#line 527 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp67_ = _result_;
#line 527 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp68_ = g_strdup (_tmp67_);
#line 527 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_g_free0 (self->priv->current_subject);
#line 527 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																self->priv->current_subject = _tmp68_;
#line 528 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																self->priv->current_subject_is_var = TRUE;
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp69_ = sql;
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																tracker_sparql_pattern_parse_property_list_not_empty (self, _tmp69_, FALSE, &_inner_error_);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																if (_inner_error_ != NULL) {
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		g_propagate_error (error, _inner_error_);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (old_subject);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (_result_);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		return NULL;
#line 5559 "tracker-sparql-pattern.c"
																	} else {
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (old_subject);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (_result_);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		g_clear_error (&_inner_error_);
#line 529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		return NULL;
#line 5571 "tracker-sparql-pattern.c"
																	}
																}
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACKET, &_inner_error_);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																if (_inner_error_ != NULL) {
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		g_propagate_error (error, _inner_error_);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (old_subject);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (_result_);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		return NULL;
#line 5588 "tracker-sparql-pattern.c"
																	} else {
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (old_subject);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		_g_free0 (_result_);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		g_clear_error (&_inner_error_);
#line 530 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																		return NULL;
#line 5600 "tracker-sparql-pattern.c"
																	}
																}
#line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp70_ = old_subject;
#line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp71_ = g_strdup (_tmp70_);
#line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_g_free0 (self->priv->current_subject);
#line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																self->priv->current_subject = _tmp71_;
#line 533 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp72_ = old_subject_is_var;
#line 533 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																self->priv->current_subject_is_var = _tmp72_;
#line 535 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_vala_is_var = TRUE;
#line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_g_free0 (old_subject);
#line 5619 "tracker-sparql-pattern.c"
															} else {
																GError* _tmp73_ = NULL;
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_tmp73_ = tracker_sparql_pattern_get_error (self, "expected variable or term");
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																_inner_error_ = _tmp73_;
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	g_propagate_error (error, _inner_error_);
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	_g_free0 (_result_);
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	return NULL;
#line 5634 "tracker-sparql-pattern.c"
																} else {
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	_g_free0 (_result_);
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	g_clear_error (&_inner_error_);
#line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
																	return NULL;
#line 5644 "tracker-sparql-pattern.c"
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
#line 539 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _result_;
#line 539 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (is_var) {
#line 539 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*is_var = _vala_is_var;
#line 5667 "tracker-sparql-pattern.c"
	}
#line 539 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 5671 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_parse_object_list (TrackerSparqlPattern* self, GString* sql, gboolean in_simple_optional, GError** error) {
	GError * _inner_error_ = NULL;
#line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 543 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	while (TRUE) {
#line 5683 "tracker-sparql-pattern.c"
		GString* _tmp0_;
		gboolean _tmp1_;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_;
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp0_ = sql;
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = in_simple_optional;
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_parse_object (self, _tmp0_, _tmp1_, &_inner_error_);
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 5702 "tracker-sparql-pattern.c"
			} else {
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 5710 "tracker-sparql-pattern.c"
			}
		}
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_COMMA, &_inner_error_);
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = _tmp2_;
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 5725 "tracker-sparql-pattern.c"
			} else {
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 5733 "tracker-sparql-pattern.c"
			}
		}
#line 545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp3_) {
#line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			continue;
#line 5740 "tracker-sparql-pattern.c"
		}
#line 548 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		break;
#line 5744 "tracker-sparql-pattern.c"
	}
}


static void tracker_sparql_pattern_parse_property_list_not_empty (TrackerSparqlPattern* self, GString* sql, gboolean in_simple_optional, GError** error) {
	GError * _inner_error_ = NULL;
#line 552 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 552 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	while (TRUE) {
#line 5757 "tracker-sparql-pattern.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
		gchar* old_predicate;
		gboolean _tmp2_;
		gboolean old_predicate_is_var;
		TrackerSparqlTokenType _tmp3_ = 0;
		GString* _tmp32_;
		gboolean _tmp33_;
		const gchar* _tmp34_;
		gchar* _tmp35_;
		gboolean _tmp36_;
		gboolean _tmp37_ = FALSE;
		gboolean _tmp38_;
#line 554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp0_ = self->priv->current_predicate;
#line 554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		old_predicate = _tmp1_;
#line 555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = self->priv->current_predicate_is_var;
#line 555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		old_predicate_is_var = _tmp2_;
#line 557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (self->priv->current_predicate);
#line 557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->current_predicate = NULL;
#line 558 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->current_predicate_is_var = FALSE;
#line 559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = tracker_sparql_pattern_current (self);
#line 559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp3_ == TRACKER_SPARQL_TOKEN_TYPE_VAR) {
#line 5791 "tracker-sparql-pattern.c"
			gchar* _tmp4_ = NULL;
			gchar* _tmp5_;
			gchar* _tmp6_ = NULL;
#line 560 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			self->priv->current_predicate_is_var = TRUE;
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_next (self, &_inner_error_);
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (old_predicate);
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 5809 "tracker-sparql-pattern.c"
				} else {
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (old_predicate);
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 561 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 5819 "tracker-sparql-pattern.c"
				}
			}
#line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp4_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp5_ = _tmp4_;
#line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_ = string_substring (_tmp5_, (glong) 1, (glong) (-1));
#line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (self->priv->current_predicate);
#line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			self->priv->current_predicate = _tmp6_;
#line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp5_);
#line 5834 "tracker-sparql-pattern.c"
		} else {
			TrackerSparqlTokenType _tmp7_ = 0;
#line 563 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp7_ = tracker_sparql_pattern_current (self);
#line 563 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp7_ == TRACKER_SPARQL_TOKEN_TYPE_IRI_REF) {
#line 5841 "tracker-sparql-pattern.c"
				gchar* _tmp8_ = NULL;
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_next (self, &_inner_error_);
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (old_predicate);
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 5855 "tracker-sparql-pattern.c"
					} else {
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (old_predicate);
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 564 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 5865 "tracker-sparql-pattern.c"
					}
				}
#line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp8_ = tracker_sparql_pattern_get_last_string (self, 1);
#line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (self->priv->current_predicate);
#line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->current_predicate = _tmp8_;
#line 5874 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlTokenType _tmp9_ = 0;
#line 566 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp9_ = tracker_sparql_pattern_current (self);
#line 566 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp9_ == TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX) {
#line 5881 "tracker-sparql-pattern.c"
					gchar* _tmp10_ = NULL;
					gchar* ns;
					TrackerSparqlQuery* _tmp11_;
					const gchar* _tmp12_;
					gchar* _tmp13_ = NULL;
					gchar* _tmp14_;
					gchar* _tmp15_ = NULL;
					gchar* _tmp16_;
					gchar* _tmp17_ = NULL;
					gchar* _tmp18_;
					gchar* _tmp19_;
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_next (self, &_inner_error_);
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_predicate);
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 5905 "tracker-sparql-pattern.c"
						} else {
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_predicate);
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 5915 "tracker-sparql-pattern.c"
						}
					}
#line 568 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp10_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 568 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					ns = _tmp10_;
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (ns);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_predicate);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 5936 "tracker-sparql-pattern.c"
						} else {
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (ns);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_predicate);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 5948 "tracker-sparql-pattern.c"
						}
					}
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp11_ = self->priv->query;
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp12_ = ns;
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp13_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp14_ = _tmp13_;
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp15_ = string_substring (_tmp14_, (glong) 1, (glong) (-1));
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp16_ = _tmp15_;
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp17_ = tracker_sparql_query_resolve_prefixed_name (_tmp11_, _tmp12_, _tmp16_, &_inner_error_);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp18_ = _tmp17_;
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp16_);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp14_);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp19_ = _tmp18_;
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (ns);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_predicate);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 5985 "tracker-sparql-pattern.c"
						} else {
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (ns);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_predicate);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 5997 "tracker-sparql-pattern.c"
						}
					}
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (self->priv->current_predicate);
#line 570 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					self->priv->current_predicate = _tmp19_;
#line 566 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (ns);
#line 6006 "tracker-sparql-pattern.c"
				} else {
					TrackerSparqlTokenType _tmp20_ = 0;
#line 571 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp20_ = tracker_sparql_pattern_current (self);
#line 571 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp20_ == TRACKER_SPARQL_TOKEN_TYPE_COLON) {
#line 6013 "tracker-sparql-pattern.c"
						TrackerSparqlQuery* _tmp21_;
						gchar* _tmp22_ = NULL;
						gchar* _tmp23_;
						gchar* _tmp24_ = NULL;
						gchar* _tmp25_;
						gchar* _tmp26_ = NULL;
						gchar* _tmp27_;
						gchar* _tmp28_;
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_next (self, &_inner_error_);
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_predicate);
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return;
#line 6034 "tracker-sparql-pattern.c"
							} else {
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_predicate);
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return;
#line 6044 "tracker-sparql-pattern.c"
							}
						}
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp21_ = self->priv->query;
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp22_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp23_ = _tmp22_;
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp24_ = string_substring (_tmp23_, (glong) 1, (glong) (-1));
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp25_ = _tmp24_;
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp26_ = tracker_sparql_query_resolve_prefixed_name (_tmp21_, "", _tmp25_, &_inner_error_);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp27_ = _tmp26_;
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_tmp25_);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_tmp23_);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp28_ = _tmp27_;
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_predicate);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return;
#line 6077 "tracker-sparql-pattern.c"
							} else {
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_predicate);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return;
#line 6087 "tracker-sparql-pattern.c"
							}
						}
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (self->priv->current_predicate);
#line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						self->priv->current_predicate = _tmp28_;
#line 6094 "tracker-sparql-pattern.c"
					} else {
						TrackerSparqlTokenType _tmp29_ = 0;
#line 574 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp29_ = tracker_sparql_pattern_current (self);
#line 574 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_tmp29_ == TRACKER_SPARQL_TOKEN_TYPE_A) {
#line 6101 "tracker-sparql-pattern.c"
							gchar* _tmp30_;
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							tracker_sparql_pattern_next (self, &_inner_error_);
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_ != NULL) {
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_propagate_error (error, _inner_error_);
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (old_predicate);
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									return;
#line 6115 "tracker-sparql-pattern.c"
								} else {
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (old_predicate);
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_clear_error (&_inner_error_);
#line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									return;
#line 6125 "tracker-sparql-pattern.c"
								}
							}
#line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp30_ = g_strdup ("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
#line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (self->priv->current_predicate);
#line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							self->priv->current_predicate = _tmp30_;
#line 6134 "tracker-sparql-pattern.c"
						} else {
							GError* _tmp31_ = NULL;
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp31_ = tracker_sparql_pattern_get_error (self, "expected non-empty property list");
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_inner_error_ = _tmp31_;
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_predicate);
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return;
#line 6149 "tracker-sparql-pattern.c"
							} else {
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_predicate);
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 578 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return;
#line 6159 "tracker-sparql-pattern.c"
							}
						}
					}
				}
			}
		}
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp32_ = sql;
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp33_ = in_simple_optional;
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_parse_object_list (self, _tmp32_, _tmp33_, &_inner_error_);
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (old_predicate);
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 6182 "tracker-sparql-pattern.c"
			} else {
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (old_predicate);
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 6192 "tracker-sparql-pattern.c"
			}
		}
#line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp34_ = old_predicate;
#line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp35_ = g_strdup (_tmp34_);
#line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (self->priv->current_predicate);
#line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->current_predicate = _tmp35_;
#line 583 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp36_ = old_predicate_is_var;
#line 583 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->current_predicate_is_var = _tmp36_;
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp37_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_SEMICOLON, &_inner_error_);
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp38_ = _tmp37_;
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (old_predicate);
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 6221 "tracker-sparql-pattern.c"
			} else {
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (old_predicate);
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 6231 "tracker-sparql-pattern.c"
			}
		}
#line 585 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp38_) {
#line 6236 "tracker-sparql-pattern.c"
			TrackerSparqlTokenType _tmp39_ = 0;
#line 586 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp39_ = tracker_sparql_pattern_current (self);
#line 586 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp39_ == TRACKER_SPARQL_TOKEN_TYPE_DOT) {
#line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (old_predicate);
#line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				break;
#line 6246 "tracker-sparql-pattern.c"
			}
#line 590 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (old_predicate);
#line 590 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			continue;
#line 6252 "tracker-sparql-pattern.c"
		}
#line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (old_predicate);
#line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		break;
#line 6258 "tracker-sparql-pattern.c"
	}
}


static void tracker_sparql_pattern_translate_filter (TrackerSparqlPattern* self, GString* sql, GError** error) {
	TrackerSparqlExpression* _tmp0_;
	GString* _tmp1_;
	GError * _inner_error_ = NULL;
#line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_FILTER, &_inner_error_);
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6281 "tracker-sparql-pattern.c"
		} else {
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6289 "tracker-sparql-pattern.c"
		}
	}
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->expression;
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = sql;
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_expression_translate_constraint (_tmp0_, _tmp1_, &_inner_error_);
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6306 "tracker-sparql-pattern.c"
		} else {
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 598 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6314 "tracker-sparql-pattern.c"
		}
	}
}


static void tracker_sparql_pattern_skip_filter (TrackerSparqlPattern* self, GError** error) {
	TrackerSparqlTokenType _tmp0_ = 0;
	gint n_parens;
	GError * _inner_error_ = NULL;
#line 601 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_FILTER, &_inner_error_);
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6336 "tracker-sparql-pattern.c"
		} else {
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 602 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6344 "tracker-sparql-pattern.c"
		}
	}
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = tracker_sparql_pattern_current (self);
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	switch (_tmp0_) {
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_STR:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_LANG:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_LANGMATCHES:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_DATATYPE:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_BOUND:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_SAMETERM:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_ISIRI:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_ISURI:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_ISBLANK:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_ISLITERAL:
#line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		case TRACKER_SPARQL_TOKEN_TYPE_REGEX:
#line 6373 "tracker-sparql-pattern.c"
		{
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_next (self, &_inner_error_);
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 6385 "tracker-sparql-pattern.c"
				} else {
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 616 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 6393 "tracker-sparql-pattern.c"
				}
			}
#line 617 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			break;
#line 6398 "tracker-sparql-pattern.c"
		}
		default:
		{
#line 619 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			break;
#line 6404 "tracker-sparql-pattern.c"
		}
	}
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_PARENS, &_inner_error_);
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6417 "tracker-sparql-pattern.c"
		} else {
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 6425 "tracker-sparql-pattern.c"
		}
	}
#line 623 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	n_parens = 1;
#line 624 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	while (TRUE) {
#line 6432 "tracker-sparql-pattern.c"
		gint _tmp1_;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_;
#line 624 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = n_parens;
#line 624 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!(_tmp1_ > 0)) {
#line 624 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			break;
#line 6442 "tracker-sparql-pattern.c"
		}
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_PARENS, &_inner_error_);
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = _tmp2_;
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 6456 "tracker-sparql-pattern.c"
			} else {
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 6464 "tracker-sparql-pattern.c"
			}
		}
#line 625 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp3_) {
#line 6469 "tracker-sparql-pattern.c"
			gint _tmp4_;
#line 626 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp4_ = n_parens;
#line 626 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			n_parens = _tmp4_ + 1;
#line 6475 "tracker-sparql-pattern.c"
		} else {
			gboolean _tmp5_ = FALSE;
			gboolean _tmp6_;
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp5_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_PARENS, &_inner_error_);
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_ = _tmp5_;
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 6491 "tracker-sparql-pattern.c"
				} else {
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 6499 "tracker-sparql-pattern.c"
				}
			}
#line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp6_) {
#line 6504 "tracker-sparql-pattern.c"
				gint _tmp7_;
#line 628 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp7_ = n_parens;
#line 628 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				n_parens = _tmp7_ - 1;
#line 6510 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlTokenType _tmp8_ = 0;
#line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp8_ = tracker_sparql_pattern_current (self);
#line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp8_ == TRACKER_SPARQL_TOKEN_TYPE_EOF) {
#line 6517 "tracker-sparql-pattern.c"
					GError* _tmp9_ = NULL;
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp9_ = tracker_sparql_pattern_get_error (self, "unexpected end of query, expected )");
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_inner_error_ = _tmp9_;
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 6529 "tracker-sparql-pattern.c"
					} else {
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 630 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 6537 "tracker-sparql-pattern.c"
					}
				} else {
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_next (self, &_inner_error_);
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 6550 "tracker-sparql-pattern.c"
						} else {
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 6558 "tracker-sparql-pattern.c"
						}
					}
				}
			}
		}
	}
}


static void tracker_sparql_pattern_start_triples_block (TrackerSparqlPattern* self, GString* sql, GError** error) {
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlContext* _tmp1_;
	TrackerSparqlContext* _tmp2_;
	TrackerSparqlPatternTripleContext* _tmp3_;
	TrackerSparqlPatternTripleContext* _tmp4_;
	GString* _tmp5_;
#line 638 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 638 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = tracker_sparql_pattern_get_context (self);
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = _tmp1_;
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = tracker_sparql_pattern_triple_context_new (_tmp0_, _tmp2_);
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (self->priv->triple_context);
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->priv->triple_context = _tmp3_;
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = self->priv->triple_context;
#line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, (TrackerSparqlContext*) _tmp4_);
#line 641 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp5_ = sql;
#line 641 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp5_, "SELECT ");
#line 6599 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_end_triples_block (TrackerSparqlPattern* self, GString* sql, gboolean* first_where, gboolean in_group_graph_pattern, GError** error) {
	GString* _tmp0_;
	GString* _tmp1_;
	gssize _tmp2_;
	GString* _tmp3_;
	gboolean first;
	TrackerSparqlPatternTripleContext* _tmp4_;
	GList* _tmp5_;
	TrackerSparqlPatternTripleContext* _tmp24_;
	GList* _tmp25_;
	TrackerSparqlPatternTripleContext* _tmp84_;
	GList* _tmp85_;
	gboolean _tmp113_;
	TrackerSparqlContext* _tmp115_;
	TrackerSparqlContext* _tmp116_;
	GHashTable* _tmp117_;
	GList* _tmp118_ = NULL;
	TrackerSparqlContext* _tmp125_;
	TrackerSparqlContext* _tmp126_;
	TrackerSparqlContext* _tmp127_;
	GError * _inner_error_ = NULL;
#line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 646 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = sql;
#line 646 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = sql;
#line 646 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = _tmp1_->len;
#line 646 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_truncate (_tmp0_, (gsize) (_tmp2_ - 2));
#line 648 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = sql;
#line 648 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_string_append (_tmp3_, " FROM ");
#line 649 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	first = TRUE;
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = self->priv->triple_context;
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp5_ = _tmp4_->tables;
#line 6646 "tracker-sparql-pattern.c"
	{
		GList* table_collection = NULL;
		GList* table_it = NULL;
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		table_collection = _tmp5_;
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (table_it = table_collection; table_it != NULL; table_it = table_it->next) {
#line 6654 "tracker-sparql-pattern.c"
			TrackerSparqlDataTable* _tmp6_;
			TrackerSparqlDataTable* table = NULL;
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_ = _g_object_ref0 ((TrackerSparqlDataTable*) table_it->data);
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			table = _tmp6_;
#line 6661 "tracker-sparql-pattern.c"
			{
				gboolean _tmp7_;
				TrackerSparqlDataTable* _tmp9_;
				const gchar* _tmp10_;
				GString* _tmp21_;
				TrackerSparqlDataTable* _tmp22_;
				const gchar* _tmp23_;
#line 651 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp7_ = first;
#line 651 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp7_) {
#line 6673 "tracker-sparql-pattern.c"
					GString* _tmp8_;
#line 652 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp8_ = sql;
#line 652 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp8_, ", ");
#line 6679 "tracker-sparql-pattern.c"
				} else {
#line 654 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					first = FALSE;
#line 6683 "tracker-sparql-pattern.c"
				}
#line 656 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp9_ = table;
#line 656 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp10_ = _tmp9_->sql_db_tablename;
#line 656 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp10_ != NULL) {
#line 6691 "tracker-sparql-pattern.c"
					GString* _tmp11_;
					TrackerSparqlDataTable* _tmp12_;
					const gchar* _tmp13_;
#line 657 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp11_ = sql;
#line 657 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp12_ = table;
#line 657 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp13_ = _tmp12_->sql_db_tablename;
#line 657 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append_printf (_tmp11_, "\"%s\"", _tmp13_);
#line 6703 "tracker-sparql-pattern.c"
				} else {
					TrackerSparqlDataTable* _tmp14_;
					TrackerSparqlPredicateVariable* _tmp15_;
					TrackerSparqlQuery* _tmp16_;
					gchar* _tmp17_ = NULL;
					gchar* _tmp18_;
					GString* _tmp19_;
					gchar* _tmp20_;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp14_ = table;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp15_ = _tmp14_->predicate_variable;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp16_ = self->priv->query;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp17_ = tracker_sparql_predicate_variable_get_sql_query (_tmp15_, _tmp16_, &_inner_error_);
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp18_ = _tmp17_;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (table);
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 6732 "tracker-sparql-pattern.c"
						} else {
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (table);
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 6742 "tracker-sparql-pattern.c"
						}
					}
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp19_ = sql;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp20_ = _tmp18_;
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append_printf (_tmp19_, "(%s)", _tmp20_);
#line 659 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp20_);
#line 6753 "tracker-sparql-pattern.c"
				}
#line 661 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp21_ = sql;
#line 661 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp22_ = table;
#line 661 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp23_ = _tmp22_->sql_query_tablename;
#line 661 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append_printf (_tmp21_, " AS \"%s\"", _tmp23_);
#line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (table);
#line 6765 "tracker-sparql-pattern.c"
			}
		}
	}
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp24_ = self->priv->triple_context;
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp25_ = _tmp24_->variables;
#line 6773 "tracker-sparql-pattern.c"
	{
		GList* variable_collection = NULL;
		GList* variable_it = NULL;
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		variable_collection = _tmp25_;
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (variable_it = variable_collection; variable_it != NULL; variable_it = variable_it->next) {
#line 6781 "tracker-sparql-pattern.c"
			TrackerSparqlVariable* _tmp26_;
			TrackerSparqlVariable* variable = NULL;
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp26_ = _g_object_ref0 ((TrackerSparqlVariable*) variable_it->data);
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			variable = _tmp26_;
#line 6788 "tracker-sparql-pattern.c"
			{
				gboolean maybe_null;
				gboolean in_simple_optional;
				TrackerPropertyType last_type;
				gchar* last_name;
				TrackerSparqlPatternTripleContext* _tmp27_;
				GHashTable* _tmp28_;
				TrackerSparqlVariable* _tmp29_;
				gconstpointer _tmp30_ = NULL;
				GList* _tmp31_;
				gboolean _tmp73_ = FALSE;
				gboolean _tmp74_;
				gboolean _tmp76_;
#line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				maybe_null = TRUE;
#line 666 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				in_simple_optional = FALSE;
#line 667 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				last_type = TRACKER_PROPERTY_TYPE_UNKNOWN;
#line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				last_name = NULL;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp27_ = self->priv->triple_context;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp28_ = _tmp27_->var_bindings;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp29_ = variable;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp30_ = g_hash_table_lookup (_tmp28_, _tmp29_);
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp31_ = ((TrackerSparqlVariableBindingList*) _tmp30_)->list;
#line 6820 "tracker-sparql-pattern.c"
				{
					GList* binding_collection = NULL;
					GList* binding_it = NULL;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					binding_collection = _tmp31_;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					for (binding_it = binding_collection; binding_it != NULL; binding_it = binding_it->next) {
#line 6828 "tracker-sparql-pattern.c"
						TrackerSparqlVariableBinding* _tmp32_;
						TrackerSparqlVariableBinding* binding = NULL;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp32_ = _g_object_ref0 ((TrackerSparqlVariableBinding*) binding_it->data);
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						binding = _tmp32_;
#line 6835 "tracker-sparql-pattern.c"
						{
							gchar* name = NULL;
							TrackerSparqlVariableBinding* _tmp33_;
							TrackerSparqlDataTable* _tmp34_;
							TrackerSparqlVariableBinding* _tmp43_;
							TrackerPropertyType _tmp44_;
							TrackerPropertyType type;
							const gchar* _tmp45_;
							const gchar* _tmp66_;
							gchar* _tmp67_;
							TrackerPropertyType _tmp68_;
							TrackerSparqlVariableBinding* _tmp69_;
							gboolean _tmp70_;
							TrackerSparqlVariableBinding* _tmp71_;
							gboolean _tmp72_;
#line 671 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp33_ = binding;
#line 671 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp34_ = ((TrackerSparqlDataBinding*) _tmp33_)->table;
#line 671 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_tmp34_ != NULL) {
#line 6857 "tracker-sparql-pattern.c"
								TrackerSparqlVariableBinding* _tmp35_;
								const gchar* _tmp36_;
								const gchar* _tmp37_;
								gchar* _tmp38_;
#line 672 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp35_ = binding;
#line 672 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp36_ = tracker_sparql_data_binding_get_sql_expression ((TrackerSparqlDataBinding*) _tmp35_);
#line 672 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp37_ = _tmp36_;
#line 672 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp38_ = g_strdup (_tmp37_);
#line 672 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (name);
#line 672 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								name = _tmp38_;
#line 6874 "tracker-sparql-pattern.c"
							} else {
								TrackerSparqlVariable* _tmp39_;
								const gchar* _tmp40_;
								const gchar* _tmp41_;
								gchar* _tmp42_;
#line 676 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp39_ = variable;
#line 676 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp40_ = tracker_sparql_variable_get_sql_expression (_tmp39_);
#line 676 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp41_ = _tmp40_;
#line 676 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp42_ = g_strdup (_tmp41_);
#line 676 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (name);
#line 676 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								name = _tmp42_;
#line 6892 "tracker-sparql-pattern.c"
							}
#line 678 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp43_ = binding;
#line 678 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp44_ = ((TrackerSparqlDataBinding*) _tmp43_)->data_type;
#line 678 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							type = _tmp44_;
#line 679 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp45_ = last_name;
#line 679 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_tmp45_ != NULL) {
#line 6904 "tracker-sparql-pattern.c"
								gboolean _tmp46_;
								gboolean _tmp49_ = FALSE;
								TrackerPropertyType _tmp50_;
								gboolean _tmp52_;
								GString* _tmp57_;
								gboolean _tmp58_ = FALSE;
								TrackerPropertyType _tmp59_;
								gboolean _tmp61_;
#line 680 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp46_ = *first_where;
#line 680 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (!_tmp46_) {
#line 6917 "tracker-sparql-pattern.c"
									GString* _tmp47_;
#line 681 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp47_ = sql;
#line 681 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp47_, " AND ");
#line 6923 "tracker-sparql-pattern.c"
								} else {
									GString* _tmp48_;
#line 683 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp48_ = sql;
#line 683 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp48_, " WHERE ");
#line 684 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									*first_where = FALSE;
#line 6932 "tracker-sparql-pattern.c"
								}
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp50_ = last_type;
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp50_ == TRACKER_PROPERTY_TYPE_STRING) {
#line 6938 "tracker-sparql-pattern.c"
									TrackerPropertyType _tmp51_;
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp51_ = type;
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp49_ = _tmp51_ == TRACKER_PROPERTY_TYPE_RESOURCE;
#line 6944 "tracker-sparql-pattern.c"
								} else {
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp49_ = FALSE;
#line 6948 "tracker-sparql-pattern.c"
								}
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp52_ = _tmp49_;
#line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp52_) {
#line 6954 "tracker-sparql-pattern.c"
									GString* _tmp53_;
									const gchar* _tmp54_;
#line 688 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp53_ = sql;
#line 688 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp54_ = last_name;
#line 688 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp53_, "(SELECT ID FROM Resource WHERE Uri = %s)", _tmp54_);
#line 6963 "tracker-sparql-pattern.c"
								} else {
									GString* _tmp55_;
									const gchar* _tmp56_;
#line 690 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp55_ = sql;
#line 690 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp56_ = last_name;
#line 690 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp55_, _tmp56_);
#line 6973 "tracker-sparql-pattern.c"
								}
#line 693 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp57_ = sql;
#line 693 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_string_append (_tmp57_, " = ");
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp59_ = last_type;
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp59_ == TRACKER_PROPERTY_TYPE_RESOURCE) {
#line 6983 "tracker-sparql-pattern.c"
									TrackerPropertyType _tmp60_;
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp60_ = type;
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp58_ = _tmp60_ == TRACKER_PROPERTY_TYPE_STRING;
#line 6989 "tracker-sparql-pattern.c"
								} else {
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp58_ = FALSE;
#line 6993 "tracker-sparql-pattern.c"
								}
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp61_ = _tmp58_;
#line 695 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp61_) {
#line 6999 "tracker-sparql-pattern.c"
									GString* _tmp62_;
									const gchar* _tmp63_;
#line 696 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp62_ = sql;
#line 696 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp63_ = name;
#line 696 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp62_, "(SELECT ID FROM Resource WHERE Uri = %s)", _tmp63_);
#line 7008 "tracker-sparql-pattern.c"
								} else {
									GString* _tmp64_;
									const gchar* _tmp65_;
#line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp64_ = sql;
#line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp65_ = name;
#line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp64_, _tmp65_);
#line 7018 "tracker-sparql-pattern.c"
								}
							}
#line 701 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp66_ = name;
#line 701 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp67_ = g_strdup (_tmp66_);
#line 701 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (last_name);
#line 701 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							last_name = _tmp67_;
#line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp68_ = type;
#line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							last_type = _tmp68_;
#line 703 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp69_ = binding;
#line 703 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp70_ = _tmp69_->maybe_null;
#line 703 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (!_tmp70_) {
#line 704 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								maybe_null = FALSE;
#line 7041 "tracker-sparql-pattern.c"
							}
#line 706 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp71_ = binding;
#line 706 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp72_ = _tmp71_->in_simple_optional;
#line 706 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							in_simple_optional = _tmp72_;
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (name);
#line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (binding);
#line 7053 "tracker-sparql-pattern.c"
						}
					}
				}
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp74_ = maybe_null;
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp74_) {
#line 7061 "tracker-sparql-pattern.c"
					gboolean _tmp75_;
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp75_ = in_simple_optional;
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp73_ = !_tmp75_;
#line 7067 "tracker-sparql-pattern.c"
				} else {
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp73_ = FALSE;
#line 7071 "tracker-sparql-pattern.c"
				}
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp76_ = _tmp73_;
#line 709 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp76_) {
#line 7077 "tracker-sparql-pattern.c"
					gboolean _tmp77_;
					GString* _tmp80_;
					TrackerSparqlVariable* _tmp81_;
					const gchar* _tmp82_;
					const gchar* _tmp83_;
#line 712 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp77_ = *first_where;
#line 712 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp77_) {
#line 7087 "tracker-sparql-pattern.c"
						GString* _tmp78_;
#line 713 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp78_ = sql;
#line 713 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp78_, " AND ");
#line 7093 "tracker-sparql-pattern.c"
					} else {
						GString* _tmp79_;
#line 715 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp79_ = sql;
#line 715 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp79_, " WHERE ");
#line 716 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						*first_where = FALSE;
#line 7102 "tracker-sparql-pattern.c"
					}
#line 718 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp80_ = sql;
#line 718 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp81_ = variable;
#line 718 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp82_ = tracker_sparql_variable_get_sql_expression (_tmp81_);
#line 718 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp83_ = _tmp82_;
#line 718 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append_printf (_tmp80_, "%s IS NOT NULL", _tmp83_);
#line 7114 "tracker-sparql-pattern.c"
				}
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (last_name);
#line 664 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (variable);
#line 7120 "tracker-sparql-pattern.c"
			}
		}
	}
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp84_ = self->priv->triple_context;
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp85_ = _tmp84_->bindings;
#line 7128 "tracker-sparql-pattern.c"
	{
		GList* binding_collection = NULL;
		GList* binding_it = NULL;
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		binding_collection = _tmp85_;
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (binding_it = binding_collection; binding_it != NULL; binding_it = binding_it->next) {
#line 7136 "tracker-sparql-pattern.c"
			TrackerSparqlLiteralBinding* _tmp86_;
			TrackerSparqlLiteralBinding* binding = NULL;
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp86_ = _g_object_ref0 ((TrackerSparqlLiteralBinding*) binding_it->data);
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp86_;
#line 7143 "tracker-sparql-pattern.c"
			{
				gboolean _tmp87_;
				GString* _tmp90_;
				TrackerSparqlLiteralBinding* _tmp91_;
				const gchar* _tmp92_;
				const gchar* _tmp93_;
				TrackerSparqlLiteralBinding* _tmp94_;
				gboolean _tmp95_;
#line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp87_ = *first_where;
#line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp87_) {
#line 7156 "tracker-sparql-pattern.c"
					GString* _tmp88_;
#line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp88_ = sql;
#line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp88_, " AND ");
#line 7162 "tracker-sparql-pattern.c"
				} else {
					GString* _tmp89_;
#line 725 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp89_ = sql;
#line 725 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp89_, " WHERE ");
#line 726 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					*first_where = FALSE;
#line 7171 "tracker-sparql-pattern.c"
				}
#line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp90_ = sql;
#line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp91_ = binding;
#line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp92_ = tracker_sparql_data_binding_get_sql_expression ((TrackerSparqlDataBinding*) _tmp91_);
#line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp93_ = _tmp92_;
#line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append (_tmp90_, _tmp93_);
#line 729 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp94_ = binding;
#line 729 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp95_ = _tmp94_->is_fts_match;
#line 729 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp95_) {
#line 7189 "tracker-sparql-pattern.c"
					TrackerSparqlLiteralBinding* _tmp96_;
					const gchar* _tmp97_;
					gchar** _tmp98_;
					gchar** _tmp99_ = NULL;
					gchar** _tmp100_;
					gint _tmp100__length1;
					gchar* _tmp101_ = NULL;
					gchar* _tmp102_;
					gchar* escaped_literal;
					GString* _tmp103_;
					const gchar* _tmp104_;
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp96_ = binding;
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp97_ = _tmp96_->literal;
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp99_ = _tmp98_ = g_strsplit (_tmp97_, "'", 0);
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp100_ = _tmp99_;
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp100__length1 = _vala_array_length (_tmp98_);
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp101_ = g_strjoinv ("''", _tmp100_);
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp102_ = _tmp101_;
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp100_ = (_vala_array_free (_tmp100_, _tmp100__length1, (GDestroyNotify) g_free), NULL);
#line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					escaped_literal = _tmp102_;
#line 732 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp103_ = sql;
#line 732 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp104_ = escaped_literal;
#line 732 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append_printf (_tmp103_, " MATCH '%s'", _tmp104_);
#line 729 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (escaped_literal);
#line 7227 "tracker-sparql-pattern.c"
				} else {
					GString* _tmp105_;
					TrackerSparqlLiteralBinding* _tmp106_;
					TrackerPropertyType _tmp107_;
					TrackerSparqlQuery* _tmp110_;
					TrackerSparqlLiteralBinding* _tmp111_;
					TrackerSparqlLiteralBinding* _tmp112_;
#line 734 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp105_ = sql;
#line 734 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp105_, " = ");
#line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp106_ = binding;
#line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp107_ = ((TrackerSparqlDataBinding*) _tmp106_)->data_type;
#line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp107_ == TRACKER_PROPERTY_TYPE_RESOURCE) {
#line 7245 "tracker-sparql-pattern.c"
						GString* _tmp108_;
#line 736 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp108_ = sql;
#line 736 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp108_, "(SELECT ID FROM Resource WHERE Uri = ?)");
#line 7251 "tracker-sparql-pattern.c"
					} else {
						GString* _tmp109_;
#line 738 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp109_ = sql;
#line 738 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp109_, "?");
#line 7258 "tracker-sparql-pattern.c"
					}
#line 740 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp110_ = self->priv->query;
#line 740 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp111_ = binding;
#line 740 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp112_ = _g_object_ref0 (_tmp111_);
#line 740 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp110_->bindings = g_list_append (_tmp110_->bindings, _tmp112_);
#line 7268 "tracker-sparql-pattern.c"
				}
#line 721 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 7272 "tracker-sparql-pattern.c"
			}
		}
	}
#line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp113_ = in_group_graph_pattern;
#line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp113_) {
#line 7280 "tracker-sparql-pattern.c"
		GString* _tmp114_;
#line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp114_ = sql;
#line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp114_, ")");
#line 7286 "tracker-sparql-pattern.c"
	}
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp115_ = tracker_sparql_pattern_get_context (self);
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp116_ = _tmp115_;
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp117_ = _tmp116_->var_set;
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp118_ = g_hash_table_get_keys (_tmp117_);
#line 7296 "tracker-sparql-pattern.c"
	{
		GList* v_collection = NULL;
		GList* v_it = NULL;
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		v_collection = _tmp118_;
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (v_it = v_collection; v_it != NULL; v_it = v_it->next) {
#line 7304 "tracker-sparql-pattern.c"
			TrackerSparqlVariable* v = NULL;
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			v = (TrackerSparqlVariable*) v_it->data;
#line 7308 "tracker-sparql-pattern.c"
			{
				TrackerSparqlContext* _tmp119_;
				TrackerSparqlContext* _tmp120_;
				TrackerSparqlContext* _tmp121_;
				GHashTable* _tmp122_;
				TrackerSparqlVariable* _tmp123_;
				TrackerSparqlVariable* _tmp124_;
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp119_ = tracker_sparql_pattern_get_context (self);
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp120_ = _tmp119_;
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp121_ = _tmp120_->parent_context;
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp122_ = _tmp121_->var_set;
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp123_ = v;
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp124_ = _g_object_ref0 (_tmp123_);
#line 749 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_hash_table_insert (_tmp122_, _tmp124_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 7330 "tracker-sparql-pattern.c"
			}
		}
#line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_list_free0 (v_collection);
#line 7335 "tracker-sparql-pattern.c"
	}
#line 752 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (self->priv->triple_context);
#line 752 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->priv->triple_context = NULL;
#line 753 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp125_ = tracker_sparql_pattern_get_context (self);
#line 753 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp126_ = _tmp125_;
#line 753 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp127_ = _tmp126_->parent_context;
#line 753 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, _tmp127_);
#line 7349 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_parse_triples (TrackerSparqlPattern* self, GString* sql, glong group_graph_pattern_start, gboolean* in_triples_block, gboolean* first_where, gboolean* in_group_graph_pattern, gboolean found_simple_optional, GError** error) {
	GError * _inner_error_ = NULL;
#line 756 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 756 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 757 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	while (TRUE) {
#line 7361 "tracker-sparql-pattern.c"
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		TrackerSparqlTokenType _tmp4_ = 0;
		gboolean _tmp6_;
		gboolean _tmp8_;
		gboolean _tmp10_;
		gboolean _tmp12_;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		gboolean _tmp15_;
		gboolean _tmp17_;
		gboolean _tmp19_;
		gboolean _tmp22_;
		GString* _tmp28_;
		gboolean _tmp29_ = FALSE;
		gchar* _tmp30_ = NULL;
		gchar* _tmp31_;
		GString* _tmp32_;
		gboolean _tmp33_ = FALSE;
		gboolean _tmp34_;
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = tracker_sparql_pattern_current (self);
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp4_ != TRACKER_SPARQL_TOKEN_TYPE_VAR) {
#line 7388 "tracker-sparql-pattern.c"
			TrackerSparqlTokenType _tmp5_ = 0;
#line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp5_ = tracker_sparql_pattern_current (self);
#line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp3_ = _tmp5_ != TRACKER_SPARQL_TOKEN_TYPE_IRI_REF;
#line 7394 "tracker-sparql-pattern.c"
		} else {
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp3_ = FALSE;
#line 7398 "tracker-sparql-pattern.c"
		}
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = _tmp3_;
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp6_) {
#line 7404 "tracker-sparql-pattern.c"
			TrackerSparqlTokenType _tmp7_ = 0;
#line 760 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp7_ = tracker_sparql_pattern_current (self);
#line 760 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp2_ = _tmp7_ != TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX;
#line 7410 "tracker-sparql-pattern.c"
		} else {
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp2_ = FALSE;
#line 7414 "tracker-sparql-pattern.c"
		}
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = _tmp2_;
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp8_) {
#line 7420 "tracker-sparql-pattern.c"
			TrackerSparqlTokenType _tmp9_ = 0;
#line 761 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp9_ = tracker_sparql_pattern_current (self);
#line 761 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp1_ = _tmp9_ != TRACKER_SPARQL_TOKEN_TYPE_COLON;
#line 7426 "tracker-sparql-pattern.c"
		} else {
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp1_ = FALSE;
#line 7430 "tracker-sparql-pattern.c"
		}
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp10_ = _tmp1_;
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp10_) {
#line 7436 "tracker-sparql-pattern.c"
			TrackerSparqlTokenType _tmp11_ = 0;
#line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp11_ = tracker_sparql_pattern_current (self);
#line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp0_ = _tmp11_ != TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACKET;
#line 7442 "tracker-sparql-pattern.c"
		} else {
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp0_ = FALSE;
#line 7446 "tracker-sparql-pattern.c"
		}
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp12_ = _tmp0_;
#line 758 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp12_) {
#line 763 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			break;
#line 7454 "tracker-sparql-pattern.c"
		}
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp15_ = *in_triples_block;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp15_) {
#line 7460 "tracker-sparql-pattern.c"
			gboolean _tmp16_;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp16_ = *in_group_graph_pattern;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = !_tmp16_;
#line 7466 "tracker-sparql-pattern.c"
		} else {
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = FALSE;
#line 7470 "tracker-sparql-pattern.c"
		}
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17_ = _tmp14_;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp17_) {
#line 7476 "tracker-sparql-pattern.c"
			gboolean _tmp18_;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp18_ = found_simple_optional;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp13_ = _tmp18_;
#line 7482 "tracker-sparql-pattern.c"
		} else {
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp13_ = FALSE;
#line 7486 "tracker-sparql-pattern.c"
		}
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp19_ = _tmp13_;
#line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp19_) {
#line 7492 "tracker-sparql-pattern.c"
			GString* _tmp20_;
			gboolean _tmp21_;
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp20_ = sql;
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp21_ = *in_group_graph_pattern;
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_end_triples_block (self, _tmp20_, first_where, _tmp21_, &_inner_error_);
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 7509 "tracker-sparql-pattern.c"
				} else {
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 769 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 7517 "tracker-sparql-pattern.c"
				}
			}
#line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			*in_triples_block = FALSE;
#line 771 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			*in_group_graph_pattern = TRUE;
#line 7524 "tracker-sparql-pattern.c"
		}
#line 773 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp22_ = *in_triples_block;
#line 773 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp22_) {
#line 7530 "tracker-sparql-pattern.c"
			gboolean _tmp23_;
			GString* _tmp27_;
#line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp23_ = *in_group_graph_pattern;
#line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp23_) {
#line 7537 "tracker-sparql-pattern.c"
				GString* _tmp24_;
				glong _tmp25_;
				GString* _tmp26_;
#line 775 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp24_ = sql;
#line 775 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp25_ = group_graph_pattern_start;
#line 775 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_insert (_tmp24_, (gssize) _tmp25_, "SELECT * FROM (");
#line 776 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp26_ = sql;
#line 776 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append (_tmp26_, ") NATURAL INNER JOIN (");
#line 7551 "tracker-sparql-pattern.c"
			}
#line 778 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			*in_triples_block = TRUE;
#line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			*first_where = TRUE;
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp27_ = sql;
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_start_triples_block (self, _tmp27_, &_inner_error_);
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 7569 "tracker-sparql-pattern.c"
				} else {
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 7577 "tracker-sparql-pattern.c"
				}
			}
		}
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp28_ = sql;
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp30_ = tracker_sparql_pattern_parse_var_or_term (self, _tmp28_, &_tmp29_, &_inner_error_);
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->current_subject_is_var = _tmp29_;
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp31_ = _tmp30_;
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 7597 "tracker-sparql-pattern.c"
			} else {
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 7605 "tracker-sparql-pattern.c"
			}
		}
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (self->priv->current_subject);
#line 783 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->current_subject = _tmp31_;
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp32_ = sql;
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_parse_property_list_not_empty (self, _tmp32_, FALSE, &_inner_error_);
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 7624 "tracker-sparql-pattern.c"
			} else {
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 784 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 7632 "tracker-sparql-pattern.c"
			}
		}
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp33_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp34_ = _tmp33_;
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 7647 "tracker-sparql-pattern.c"
			} else {
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return;
#line 7655 "tracker-sparql-pattern.c"
			}
		}
#line 786 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp34_) {
#line 787 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			break;
#line 7662 "tracker-sparql-pattern.c"
		}
	}
}


static gboolean tracker_sparql_pattern_is_subclass (TrackerSparqlPattern* self, TrackerClass* class1, TrackerClass* class2) {
	gboolean result = FALSE;
	TrackerClass* _tmp0_;
	TrackerClass* _tmp1_;
	TrackerClass* _tmp2_;
	TrackerClass** _tmp3_;
	TrackerClass** _tmp4_ = NULL;
#line 792 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 792 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (class1 != NULL, FALSE);
#line 792 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (class2 != NULL, FALSE);
#line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = class1;
#line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = class2;
#line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp0_ == _tmp1_) {
#line 794 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		result = TRUE;
#line 794 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return result;
#line 7691 "tracker-sparql-pattern.c"
	}
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = class1;
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = _tmp3_ = tracker_class_get_super_classes (_tmp2_);
#line 7697 "tracker-sparql-pattern.c"
	{
		TrackerClass** superclass_collection = NULL;
		gint superclass_collection_length1 = 0;
		gint _superclass_collection_size_ = 0;
		gint superclass_it = 0;
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		superclass_collection = _tmp4_;
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		superclass_collection_length1 = _vala_array_length (_tmp3_);
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		for (superclass_it = 0; superclass_it < _vala_array_length (_tmp3_); superclass_it = superclass_it + 1) {
#line 7709 "tracker-sparql-pattern.c"
			TrackerClass* _tmp5_;
			TrackerClass* superclass = NULL;
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp5_ = _g_object_ref0 (superclass_collection[superclass_it]);
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			superclass = _tmp5_;
#line 7716 "tracker-sparql-pattern.c"
			{
				TrackerClass* _tmp6_;
				TrackerClass* _tmp7_;
				gboolean _tmp8_ = FALSE;
#line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp6_ = superclass;
#line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp7_ = class2;
#line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp8_ = tracker_sparql_pattern_is_subclass (self, _tmp6_, _tmp7_);
#line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp8_) {
#line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					result = TRUE;
#line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (superclass);
#line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return result;
#line 7735 "tracker-sparql-pattern.c"
				}
#line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (superclass);
#line 7739 "tracker-sparql-pattern.c"
			}
		}
	}
#line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = FALSE;
#line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 7747 "tracker-sparql-pattern.c"
}


static gboolean tracker_sparql_pattern_is_simple_optional (TrackerSparqlPattern* self) {
	gboolean result = FALSE;
	TrackerSourceLocation _tmp0_ = {0};
	TrackerSourceLocation optional_start;
	GError * _inner_error_ = NULL;
#line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 805 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_get_location (self, &_tmp0_);
#line 805 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	optional_start = _tmp0_;
#line 7762 "tracker-sparql-pattern.c"
	{
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_;
		TrackerSparqlContext* _tmp6_;
		TrackerSparqlContext* _tmp7_;
		gchar* _tmp8_ = NULL;
		gchar* _tmp9_;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_;
		TrackerSparqlVariable* _tmp12_ = NULL;
		TrackerSparqlVariable* _tmp13_;
		TrackerSparqlVariable* _tmp14_;
		TrackerSparqlVariable* left_variable;
		TrackerSparqlContext* _tmp15_;
		TrackerSparqlContext* _tmp16_;
		GHashTable* _tmp17_;
		TrackerSparqlVariable* _tmp18_;
		gconstpointer _tmp19_ = NULL;
		gint left_variable_state;
		gchar* predicate = NULL;
		gboolean _tmp20_ = FALSE;
		gboolean _tmp21_;
		const gchar* _tmp52_;
		TrackerProperty* _tmp53_ = NULL;
		TrackerProperty* _tmp54_;
		TrackerProperty* prop;
		TrackerProperty* _tmp55_;
		gboolean _tmp57_ = FALSE;
		gboolean _tmp58_;
		TrackerSparqlContext* _tmp61_;
		TrackerSparqlContext* _tmp62_;
		gchar* _tmp63_ = NULL;
		gchar* _tmp64_;
		gchar* _tmp65_ = NULL;
		gchar* _tmp66_;
		TrackerSparqlVariable* _tmp67_ = NULL;
		TrackerSparqlVariable* _tmp68_;
		TrackerSparqlVariable* _tmp69_;
		TrackerSparqlVariable* right_variable;
		TrackerSparqlContext* _tmp70_;
		TrackerSparqlContext* _tmp71_;
		GHashTable* _tmp72_;
		TrackerSparqlVariable* _tmp73_;
		gconstpointer _tmp74_ = NULL;
		gint right_variable_state;
		gboolean _tmp76_ = FALSE;
		gboolean _tmp77_;
		gboolean _tmp80_ = FALSE;
		gboolean _tmp81_ = FALSE;
		gint _tmp82_;
		gboolean _tmp86_;
		gboolean _tmp88_;
#line 817 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
#line 817 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 817 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 7821 "tracker-sparql-pattern.c"
				goto __catch1_tracker_sparql_error;
			}
			{
				TrackerSourceLocation _tmp1_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp1_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp1_);
#line 7830 "tracker-sparql-pattern.c"
			}
#line 817 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 817 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 817 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 7838 "tracker-sparql-pattern.c"
		}
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_VAR, &_inner_error_);
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = _tmp2_;
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 7848 "tracker-sparql-pattern.c"
				goto __catch1_tracker_sparql_error;
			}
			{
				TrackerSourceLocation _tmp4_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp4_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp4_);
#line 7857 "tracker-sparql-pattern.c"
			}
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 7865 "tracker-sparql-pattern.c"
		}
#line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp3_) {
#line 821 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			result = FALSE;
#line 7871 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp5_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp5_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp5_);
#line 7878 "tracker-sparql-pattern.c"
			}
#line 821 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return result;
#line 7882 "tracker-sparql-pattern.c"
		}
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = tracker_sparql_pattern_get_context (self);
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp7_ = _tmp6_;
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp9_ = _tmp8_;
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp10_ = string_substring (_tmp9_, (glong) 1, (glong) (-1));
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_ = _tmp10_;
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp12_ = tracker_sparql_context_get_variable (_tmp7_, _tmp11_);
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp13_ = _g_object_ref0 (_tmp12_);
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp14_ = _tmp13_;
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp11_);
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp9_);
#line 823 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		left_variable = _tmp14_;
#line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp15_ = tracker_sparql_pattern_get_context (self);
#line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp16_ = _tmp15_;
#line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17_ = _tmp16_->var_set;
#line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp18_ = left_variable;
#line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp19_ = g_hash_table_lookup (_tmp17_, _tmp18_);
#line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		left_variable_state = GPOINTER_TO_INT (_tmp19_);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp20_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, &_inner_error_);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp21_ = _tmp20_;
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 7932 "tracker-sparql-pattern.c"
				goto __catch1_tracker_sparql_error;
			}
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 7939 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp22_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp22_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp22_);
#line 7946 "tracker-sparql-pattern.c"
			}
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 7954 "tracker-sparql-pattern.c"
		}
#line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp21_) {
#line 7958 "tracker-sparql-pattern.c"
			gchar* _tmp23_ = NULL;
#line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp23_ = tracker_sparql_pattern_get_last_string (self, 1);
#line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			predicate = _tmp23_;
#line 7966 "tracker-sparql-pattern.c"
		} else {
			gboolean _tmp24_ = FALSE;
			gboolean _tmp25_;
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp24_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX, &_inner_error_);
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp25_ = _tmp24_;
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (predicate);
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (left_variable);
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 7982 "tracker-sparql-pattern.c"
					goto __catch1_tracker_sparql_error;
				}
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (predicate);
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (left_variable);
#line 7989 "tracker-sparql-pattern.c"
				{
					TrackerSourceLocation _tmp26_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp26_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_set_location (self, &_tmp26_);
#line 7996 "tracker-sparql-pattern.c"
				}
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return FALSE;
#line 8004 "tracker-sparql-pattern.c"
			}
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp25_) {
#line 8008 "tracker-sparql-pattern.c"
				gchar* _tmp27_ = NULL;
				gchar* ns;
				TrackerSparqlQuery* _tmp29_;
				const gchar* _tmp30_;
				gchar* _tmp31_ = NULL;
				gchar* _tmp32_;
				gchar* _tmp33_ = NULL;
				gchar* _tmp34_;
				gchar* _tmp35_ = NULL;
				gchar* _tmp36_;
				gchar* _tmp37_;
#line 831 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp27_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 831 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				ns = _tmp27_;
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (ns);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8036 "tracker-sparql-pattern.c"
						goto __catch1_tracker_sparql_error;
					}
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (ns);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 8045 "tracker-sparql-pattern.c"
					{
						TrackerSourceLocation _tmp28_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp28_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_set_location (self, &_tmp28_);
#line 8052 "tracker-sparql-pattern.c"
					}
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return FALSE;
#line 8060 "tracker-sparql-pattern.c"
				}
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp29_ = self->priv->query;
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp30_ = ns;
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp31_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp32_ = _tmp31_;
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp33_ = string_substring (_tmp32_, (glong) 1, (glong) (-1));
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp34_ = _tmp33_;
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp35_ = tracker_sparql_query_resolve_prefixed_name (_tmp29_, _tmp30_, _tmp34_, &_inner_error_);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp36_ = _tmp35_;
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp34_);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp32_);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp37_ = _tmp36_;
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (ns);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8094 "tracker-sparql-pattern.c"
						goto __catch1_tracker_sparql_error;
					}
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (ns);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 8103 "tracker-sparql-pattern.c"
					{
						TrackerSourceLocation _tmp38_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp38_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_set_location (self, &_tmp38_);
#line 8110 "tracker-sparql-pattern.c"
					}
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return FALSE;
#line 8118 "tracker-sparql-pattern.c"
				}
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (predicate);
#line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				predicate = _tmp37_;
#line 830 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (ns);
#line 8126 "tracker-sparql-pattern.c"
			} else {
				gboolean _tmp39_ = FALSE;
				gboolean _tmp40_;
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp39_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp40_ = _tmp39_;
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8142 "tracker-sparql-pattern.c"
						goto __catch1_tracker_sparql_error;
					}
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 8149 "tracker-sparql-pattern.c"
					{
						TrackerSourceLocation _tmp41_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp41_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_set_location (self, &_tmp41_);
#line 8156 "tracker-sparql-pattern.c"
					}
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return FALSE;
#line 8164 "tracker-sparql-pattern.c"
				}
#line 834 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp40_) {
#line 8168 "tracker-sparql-pattern.c"
					TrackerSparqlQuery* _tmp42_;
					gchar* _tmp43_ = NULL;
					gchar* _tmp44_;
					gchar* _tmp45_ = NULL;
					gchar* _tmp46_;
					gchar* _tmp47_ = NULL;
					gchar* _tmp48_;
					gchar* _tmp49_;
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp42_ = self->priv->query;
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp43_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp44_ = _tmp43_;
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp45_ = string_substring (_tmp44_, (glong) 1, (glong) (-1));
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp46_ = _tmp45_;
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp47_ = tracker_sparql_query_resolve_prefixed_name (_tmp42_, "", _tmp46_, &_inner_error_);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp48_ = _tmp47_;
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp46_);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp44_);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp49_ = _tmp48_;
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (predicate);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (left_variable);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8205 "tracker-sparql-pattern.c"
							goto __catch1_tracker_sparql_error;
						}
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (predicate);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (left_variable);
#line 8212 "tracker-sparql-pattern.c"
						{
							TrackerSourceLocation _tmp50_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp50_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							tracker_sparql_pattern_set_location (self, &_tmp50_);
#line 8219 "tracker-sparql-pattern.c"
						}
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return FALSE;
#line 8227 "tracker-sparql-pattern.c"
					}
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					predicate = _tmp49_;
#line 8233 "tracker-sparql-pattern.c"
				} else {
#line 837 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					result = FALSE;
#line 837 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (predicate);
#line 837 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (left_variable);
#line 8241 "tracker-sparql-pattern.c"
					{
						TrackerSourceLocation _tmp51_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp51_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_set_location (self, &_tmp51_);
#line 8248 "tracker-sparql-pattern.c"
					}
#line 837 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return result;
#line 8252 "tracker-sparql-pattern.c"
				}
			}
		}
#line 839 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp52_ = predicate;
#line 839 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp53_ = tracker_ontologies_get_property_by_uri (_tmp52_);
#line 839 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp54_ = _g_object_ref0 (_tmp53_);
#line 839 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		prop = _tmp54_;
#line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp55_ = prop;
#line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp55_ == NULL) {
#line 841 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			result = FALSE;
#line 841 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 841 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 841 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 8276 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp56_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp56_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp56_);
#line 8283 "tracker-sparql-pattern.c"
			}
#line 841 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return result;
#line 8287 "tracker-sparql-pattern.c"
		}
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp57_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_VAR, &_inner_error_);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp58_ = _tmp57_;
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8303 "tracker-sparql-pattern.c"
				goto __catch1_tracker_sparql_error;
			}
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 8312 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp59_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp59_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp59_);
#line 8319 "tracker-sparql-pattern.c"
			}
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 8327 "tracker-sparql-pattern.c"
		}
#line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp58_) {
#line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			result = FALSE;
#line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 8339 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp60_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp60_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp60_);
#line 8346 "tracker-sparql-pattern.c"
			}
#line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return result;
#line 8350 "tracker-sparql-pattern.c"
		}
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp61_ = tracker_sparql_pattern_get_context (self);
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp62_ = _tmp61_;
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp63_ = tracker_sparql_pattern_get_last_string (self, 0);
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp64_ = _tmp63_;
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp65_ = string_substring (_tmp64_, (glong) 1, (glong) (-1));
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp66_ = _tmp65_;
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp67_ = tracker_sparql_context_get_variable (_tmp62_, _tmp66_);
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp68_ = _g_object_ref0 (_tmp67_);
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp69_ = _tmp68_;
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp66_);
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp64_);
#line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		right_variable = _tmp69_;
#line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp70_ = tracker_sparql_pattern_get_context (self);
#line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp71_ = _tmp70_;
#line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp72_ = _tmp71_->var_set;
#line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp73_ = right_variable;
#line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp74_ = g_hash_table_lookup (_tmp72_, _tmp73_);
#line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		right_variable_state = GPOINTER_TO_INT (_tmp74_);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (right_variable);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8402 "tracker-sparql-pattern.c"
				goto __catch1_tracker_sparql_error;
			}
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (right_variable);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 8413 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp75_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp75_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp75_);
#line 8420 "tracker-sparql-pattern.c"
			}
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 8428 "tracker-sparql-pattern.c"
		}
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp76_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp77_ = _tmp76_;
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (right_variable);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 8446 "tracker-sparql-pattern.c"
				goto __catch1_tracker_sparql_error;
			}
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (right_variable);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 8457 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp78_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp78_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp78_);
#line 8464 "tracker-sparql-pattern.c"
			}
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return FALSE;
#line 8472 "tracker-sparql-pattern.c"
		}
#line 855 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp77_) {
#line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			result = FALSE;
#line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (right_variable);
#line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (prop);
#line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (predicate);
#line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (left_variable);
#line 8486 "tracker-sparql-pattern.c"
			{
				TrackerSourceLocation _tmp79_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp79_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_location (self, &_tmp79_);
#line 8493 "tracker-sparql-pattern.c"
			}
#line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return result;
#line 8497 "tracker-sparql-pattern.c"
		}
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp82_ = left_variable_state;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp82_ == ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND)) {
#line 8503 "tracker-sparql-pattern.c"
			TrackerProperty* _tmp83_;
			gboolean _tmp84_;
			gboolean _tmp85_;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp83_ = prop;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp84_ = tracker_property_get_multiple_values (_tmp83_);
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp85_ = _tmp84_;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp81_ = !_tmp85_;
#line 8515 "tracker-sparql-pattern.c"
		} else {
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp81_ = FALSE;
#line 8519 "tracker-sparql-pattern.c"
		}
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp86_ = _tmp81_;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp86_) {
#line 8525 "tracker-sparql-pattern.c"
			gint _tmp87_;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp87_ = right_variable_state;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp80_ = _tmp87_ == 0;
#line 8531 "tracker-sparql-pattern.c"
		} else {
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp80_ = FALSE;
#line 8535 "tracker-sparql-pattern.c"
		}
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp88_ = _tmp80_;
#line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp88_) {
#line 8541 "tracker-sparql-pattern.c"
			gboolean in_domain;
			TrackerSparqlPatternTripleContext* _tmp89_;
			GHashTable* _tmp90_;
			TrackerSparqlVariable* _tmp91_;
			gconstpointer _tmp92_ = NULL;
			GList* _tmp93_;
			gboolean _tmp105_;
#line 860 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			in_domain = FALSE;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp89_ = self->priv->triple_context;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp90_ = _tmp89_->var_bindings;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp91_ = left_variable;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp92_ = g_hash_table_lookup (_tmp90_, _tmp91_);
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp93_ = ((TrackerSparqlVariableBindingList*) _tmp92_)->list;
#line 8561 "tracker-sparql-pattern.c"
			{
				GList* binding_collection = NULL;
				GList* binding_it = NULL;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding_collection = _tmp93_;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				for (binding_it = binding_collection; binding_it != NULL; binding_it = binding_it->next) {
#line 8569 "tracker-sparql-pattern.c"
					TrackerSparqlVariableBinding* _tmp94_;
					TrackerSparqlVariableBinding* binding = NULL;
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp94_ = _g_object_ref0 ((TrackerSparqlVariableBinding*) binding_it->data);
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					binding = _tmp94_;
#line 8576 "tracker-sparql-pattern.c"
					{
						gboolean _tmp95_ = FALSE;
						TrackerSparqlVariableBinding* _tmp96_;
						TrackerClass* _tmp97_;
						gboolean _tmp104_;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp96_ = binding;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp97_ = _tmp96_->type;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_tmp97_ != NULL) {
#line 8588 "tracker-sparql-pattern.c"
							TrackerSparqlVariableBinding* _tmp98_;
							TrackerClass* _tmp99_;
							TrackerProperty* _tmp100_;
							TrackerClass* _tmp101_;
							TrackerClass* _tmp102_;
							gboolean _tmp103_ = FALSE;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp98_ = binding;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp99_ = _tmp98_->type;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp100_ = prop;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp101_ = tracker_property_get_domain (_tmp100_);
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp102_ = _tmp101_;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp103_ = tracker_sparql_pattern_is_subclass (self, _tmp99_, _tmp102_);
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp95_ = _tmp103_;
#line 8609 "tracker-sparql-pattern.c"
						} else {
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp95_ = FALSE;
#line 8613 "tracker-sparql-pattern.c"
						}
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp104_ = _tmp95_;
#line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_tmp104_) {
#line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							in_domain = TRUE;
#line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (binding);
#line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							break;
#line 8625 "tracker-sparql-pattern.c"
						}
#line 861 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (binding);
#line 8629 "tracker-sparql-pattern.c"
					}
				}
			}
#line 868 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp105_ = in_domain;
#line 868 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp105_) {
#line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				result = TRUE;
#line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (right_variable);
#line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (prop);
#line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (predicate);
#line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (left_variable);
#line 8647 "tracker-sparql-pattern.c"
				{
					TrackerSourceLocation _tmp106_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp106_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_set_location (self, &_tmp106_);
#line 8654 "tracker-sparql-pattern.c"
				}
#line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return result;
#line 8658 "tracker-sparql-pattern.c"
			}
		} else {
			gboolean _tmp107_ = FALSE;
			gboolean _tmp108_ = FALSE;
			gint _tmp109_;
			gboolean _tmp113_;
			gboolean _tmp115_;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp109_ = left_variable_state;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp109_ == 0) {
#line 8670 "tracker-sparql-pattern.c"
				TrackerProperty* _tmp110_;
				gboolean _tmp111_;
				gboolean _tmp112_;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp110_ = prop;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp111_ = tracker_property_get_is_inverse_functional_property (_tmp110_);
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp112_ = _tmp111_;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp108_ = _tmp112_;
#line 8682 "tracker-sparql-pattern.c"
			} else {
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp108_ = FALSE;
#line 8686 "tracker-sparql-pattern.c"
			}
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp113_ = _tmp108_;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp113_) {
#line 8692 "tracker-sparql-pattern.c"
				gint _tmp114_;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp114_ = right_variable_state;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp107_ = _tmp114_ == ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND);
#line 8698 "tracker-sparql-pattern.c"
			} else {
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp107_ = FALSE;
#line 8702 "tracker-sparql-pattern.c"
			}
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp115_ = _tmp107_;
#line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp115_) {
#line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				result = TRUE;
#line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (right_variable);
#line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (prop);
#line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (predicate);
#line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (left_variable);
#line 8718 "tracker-sparql-pattern.c"
				{
					TrackerSourceLocation _tmp116_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp116_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_set_location (self, &_tmp116_);
#line 8725 "tracker-sparql-pattern.c"
				}
#line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return result;
#line 8729 "tracker-sparql-pattern.c"
			}
		}
#line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		result = FALSE;
#line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (right_variable);
#line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (prop);
#line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (predicate);
#line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (left_variable);
#line 8742 "tracker-sparql-pattern.c"
		{
			TrackerSourceLocation _tmp117_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp117_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_set_location (self, &_tmp117_);
#line 8749 "tracker-sparql-pattern.c"
		}
#line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return result;
#line 8753 "tracker-sparql-pattern.c"
	}
	goto __finally1;
	__catch1_tracker_sparql_error:
	{
		GError* e = NULL;
#line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		e = _inner_error_;
#line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_inner_error_ = NULL;
#line 880 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		result = FALSE;
#line 880 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_error_free0 (e);
#line 8767 "tracker-sparql-pattern.c"
		{
			TrackerSourceLocation _tmp118_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp118_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_set_location (self, &_tmp118_);
#line 8774 "tracker-sparql-pattern.c"
		}
#line 880 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return result;
#line 8778 "tracker-sparql-pattern.c"
	}
	__finally1:
	{
		TrackerSourceLocation _tmp119_;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp119_ = optional_start;
#line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_set_location (self, &_tmp119_);
#line 8787 "tracker-sparql-pattern.c"
	}
#line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_clear_error (&_inner_error_);
#line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return FALSE;
#line 8795 "tracker-sparql-pattern.c"
}


static gpointer _g_hash_table_ref0 (gpointer self) {
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return self ? g_hash_table_ref (self) : NULL;
#line 8802 "tracker-sparql-pattern.c"
}


static guint _tracker_sparql_variable_hash_ghash_func (gconstpointer key) {
	guint result;
	result = tracker_sparql_variable_hash (key);
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 8811 "tracker-sparql-pattern.c"
}


static gboolean _tracker_sparql_variable_equal_gequal_func (gconstpointer a, gconstpointer b) {
	gboolean result;
	result = tracker_sparql_variable_equal (a, b);
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 8820 "tracker-sparql-pattern.c"
}


static void _vala_array_add6 (TrackerSourceLocation** array, int* length, int* size, const TrackerSourceLocation* value) {
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (TrackerSourceLocation, *array, *size);
#line 8831 "tracker-sparql-pattern.c"
	}
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = *value;
#line 8835 "tracker-sparql-pattern.c"
}


TrackerSparqlContext* tracker_sparql_pattern_translate_group_graph_pattern (TrackerSparqlPattern* self, GString* sql, GError** error) {
	TrackerSparqlContext* result = NULL;
	TrackerSparqlTokenType _tmp0_ = 0;
	TrackerSparqlQuery* _tmp17_;
	TrackerSparqlContext* _tmp18_;
	TrackerSparqlContext* _tmp19_;
	TrackerSparqlContext* _tmp20_;
	TrackerSparqlContext* _result_;
	TrackerSparqlContext* _tmp21_;
	TrackerSourceLocation* _tmp22_ = NULL;
	TrackerSourceLocation* filters;
	gint filters_length1;
	gint _filters_size_;
	gboolean in_triples_block;
	gboolean in_group_graph_pattern;
	gboolean first_where;
	gboolean found_simple_optional;
	GString* _tmp23_;
	gssize _tmp24_;
	glong group_graph_pattern_start;
	GString* _tmp25_;
	glong _tmp26_;
	gboolean _tmp27_;
	gboolean _tmp278_ = FALSE;
	gboolean _tmp279_;
	gboolean _tmp281_;
	gboolean _tmp286_;
	TrackerSourceLocation* _tmp287_;
	gint _tmp287__length1;
	TrackerSparqlContext* _tmp296_;
	TrackerSparqlContext* _tmp297_;
	TrackerSparqlContext* _tmp298_;
	GError * _inner_error_ = NULL;
#line 887 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 887 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (sql != NULL, NULL);
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 8886 "tracker-sparql-pattern.c"
		} else {
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 8894 "tracker-sparql-pattern.c"
		}
	}
#line 890 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = tracker_sparql_pattern_current (self);
#line 890 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp0_ == TRACKER_SPARQL_TOKEN_TYPE_SELECT) {
#line 8901 "tracker-sparql-pattern.c"
		GString* _tmp1_;
		TrackerSparqlSelectContext* _tmp2_ = NULL;
		TrackerSparqlSelectContext* _result_;
		TrackerSparqlSelectContext* _tmp3_;
		TrackerSparqlContext* _tmp4_;
		TrackerSparqlContext* _tmp5_;
		TrackerSparqlContext* _tmp6_;
		TrackerSparqlContext* _tmp7_;
		GHashTable* _tmp8_;
		GHashTable* _tmp9_;
		TrackerSparqlContext* _tmp10_;
		TrackerSparqlContext* _tmp11_;
		GDestroyNotify _tmp12_;
		GHashTable* _tmp13_;
		TrackerSparqlContext* _tmp14_;
		TrackerSparqlContext* _tmp15_;
		TrackerSparqlContext* _tmp16_;
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = sql;
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = tracker_sparql_pattern_translate_select (self, _tmp1_, TRUE, FALSE, &_inner_error_);
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_result_ = _tmp2_;
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 8933 "tracker-sparql-pattern.c"
			} else {
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 8941 "tracker-sparql-pattern.c"
			}
		}
#line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = _result_;
#line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_set_context (self, (TrackerSparqlContext*) _tmp3_);
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = tracker_sparql_pattern_get_context (self);
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = _tmp4_;
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = tracker_sparql_pattern_get_context (self);
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp7_ = _tmp6_;
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = _tmp7_->select_var_set;
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp9_ = _g_hash_table_ref0 (_tmp8_);
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_hash_table_unref0 (_tmp5_->var_set);
#line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_->var_set = _tmp9_;
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp10_ = tracker_sparql_pattern_get_context (self);
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_ = _tmp10_;
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp12_ = g_object_unref;
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp13_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp12_, NULL);
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_hash_table_unref0 (_tmp11_->select_var_set);
#line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_->select_var_set = _tmp13_;
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 8988 "tracker-sparql-pattern.c"
			} else {
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 8998 "tracker-sparql-pattern.c"
			}
		}
#line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp14_ = tracker_sparql_pattern_get_context (self);
#line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp15_ = _tmp14_;
#line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp16_ = _tmp15_->parent_context;
#line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_set_context (self, _tmp16_);
#line 901 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		result = (TrackerSparqlContext*) _result_;
#line 901 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		return result;
#line 9013 "tracker-sparql-pattern.c"
	}
#line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp17_ = self->priv->query;
#line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp18_ = tracker_sparql_pattern_get_context (self);
#line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp19_ = _tmp18_;
#line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp20_ = tracker_sparql_context_new (_tmp17_, _tmp19_);
#line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_result_ = _tmp20_;
#line 905 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp21_ = _result_;
#line 905 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, _tmp21_);
#line 907 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp22_ = g_new0 (TrackerSourceLocation, 0);
#line 907 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	filters = _tmp22_;
#line 907 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	filters_length1 = 0;
#line 907 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_filters_size_ = filters_length1;
#line 909 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	in_triples_block = FALSE;
#line 910 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	in_group_graph_pattern = FALSE;
#line 911 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	first_where = TRUE;
#line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	found_simple_optional = FALSE;
#line 913 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp23_ = sql;
#line 913 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp24_ = _tmp23_->len;
#line 913 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	group_graph_pattern_start = (glong) _tmp24_;
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp25_ = sql;
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp26_ = group_graph_pattern_start;
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp27_ = found_simple_optional;
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_parse_triples (self, _tmp25_, _tmp26_, &in_triples_block, &first_where, &in_group_graph_pattern, _tmp27_, &_inner_error_);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			filters = (g_free (filters), NULL);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 9071 "tracker-sparql-pattern.c"
		} else {
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			filters = (g_free (filters), NULL);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 9083 "tracker-sparql-pattern.c"
		}
	}
#line 918 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	while (TRUE) {
#line 9088 "tracker-sparql-pattern.c"
		gboolean _tmp28_ = FALSE;
		gboolean _tmp29_;
		GString* _tmp275_;
		glong _tmp276_;
		gboolean _tmp277_;
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp28_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OPTIONAL, &_inner_error_);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp29_ = _tmp28_;
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filters = (g_free (filters), NULL);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 9110 "tracker-sparql-pattern.c"
			} else {
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filters = (g_free (filters), NULL);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 9122 "tracker-sparql-pattern.c"
			}
		}
#line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp29_) {
#line 9127 "tracker-sparql-pattern.c"
			gboolean _tmp30_ = FALSE;
			gboolean _tmp31_;
			gboolean _tmp33_;
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp31_ = in_group_graph_pattern;
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (!_tmp31_) {
#line 9135 "tracker-sparql-pattern.c"
				gboolean _tmp32_ = FALSE;
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp32_ = tracker_sparql_pattern_is_simple_optional (self);
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp30_ = _tmp32_;
#line 9141 "tracker-sparql-pattern.c"
			} else {
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp30_ = FALSE;
#line 9145 "tracker-sparql-pattern.c"
			}
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp33_ = _tmp30_;
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp33_) {
#line 9151 "tracker-sparql-pattern.c"
				GString* _tmp34_;
				gboolean _tmp35_ = FALSE;
				gchar* _tmp36_ = NULL;
				gchar* _tmp37_;
				GString* _tmp38_;
#line 923 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				found_simple_optional = TRUE;
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9173 "tracker-sparql-pattern.c"
					} else {
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9185 "tracker-sparql-pattern.c"
					}
				}
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp34_ = sql;
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp36_ = tracker_sparql_pattern_parse_var_or_term (self, _tmp34_, &_tmp35_, &_inner_error_);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->current_subject_is_var = _tmp35_;
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp37_ = _tmp36_;
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9208 "tracker-sparql-pattern.c"
					} else {
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9220 "tracker-sparql-pattern.c"
					}
				}
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (self->priv->current_subject);
#line 926 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->current_subject = _tmp37_;
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp38_ = sql;
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_parse_property_list_not_empty (self, _tmp38_, TRUE, &_inner_error_);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9243 "tracker-sparql-pattern.c"
					} else {
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9255 "tracker-sparql-pattern.c"
					}
				}
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9272 "tracker-sparql-pattern.c"
					} else {
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9284 "tracker-sparql-pattern.c"
					}
				}
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9301 "tracker-sparql-pattern.c"
					} else {
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 930 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9313 "tracker-sparql-pattern.c"
					}
				}
			} else {
				gboolean _tmp39_ = FALSE;
				gboolean _tmp40_;
				gboolean _tmp42_;
				gboolean _tmp47_;
				GString* _tmp48_;
				GString* select;
				gint _tmp49_;
				gint _tmp50_;
				gint left_index;
				gint _tmp51_;
				gint _tmp52_;
				gint right_index;
				GString* _tmp53_;
				gint _tmp54_;
				GString* _tmp55_;
				TrackerSparqlContext* _tmp56_ = NULL;
				TrackerSparqlContext* _tmp57_;
				TrackerSparqlContext* _tmp58_;
				GString* _tmp59_;
				gint _tmp60_;
				gboolean first;
				gboolean first_common;
				TrackerSparqlContext* _tmp61_;
				TrackerSparqlContext* _tmp62_;
				GHashTable* _tmp63_;
				GList* _tmp64_ = NULL;
				TrackerSparqlContext* _tmp182_;
				TrackerSparqlContext* _tmp183_;
				TrackerSparqlContext* _tmp184_;
				GHashTable* _tmp185_;
				GList* _tmp186_ = NULL;
				gboolean _tmp212_;
				TrackerSparqlContext* _tmp214_;
				TrackerSparqlContext* _tmp215_;
				TrackerSparqlContext* _tmp216_;
				GString* _tmp217_;
				GString* _tmp218_;
				glong _tmp219_;
				GString* _tmp220_;
				const gchar* _tmp221_;
				GString* _tmp222_;
				glong _tmp223_;
				GString* _tmp224_;
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp40_ = in_triples_block;
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp40_) {
#line 9364 "tracker-sparql-pattern.c"
					gboolean _tmp41_;
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp41_ = in_group_graph_pattern;
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp39_ = !_tmp41_;
#line 9370 "tracker-sparql-pattern.c"
				} else {
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp39_ = FALSE;
#line 9374 "tracker-sparql-pattern.c"
				}
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp42_ = _tmp39_;
#line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp42_) {
#line 9380 "tracker-sparql-pattern.c"
					GString* _tmp43_;
#line 935 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp43_ = sql;
#line 935 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp43_, "SELECT 1");
#line 9386 "tracker-sparql-pattern.c"
				} else {
					gboolean _tmp44_;
#line 936 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp44_ = in_triples_block;
#line 936 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp44_) {
#line 9393 "tracker-sparql-pattern.c"
						GString* _tmp45_;
						gboolean _tmp46_;
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp45_ = sql;
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp46_ = in_group_graph_pattern;
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_end_triples_block (self, _tmp45_, &first_where, _tmp46_, &_inner_error_);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 9414 "tracker-sparql-pattern.c"
							} else {
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 9426 "tracker-sparql-pattern.c"
							}
						}
#line 938 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						in_triples_block = FALSE;
#line 9431 "tracker-sparql-pattern.c"
					}
				}
#line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp47_ = in_group_graph_pattern;
#line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp47_) {
#line 941 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					in_group_graph_pattern = TRUE;
#line 9440 "tracker-sparql-pattern.c"
				}
#line 944 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp48_ = g_string_new ("SELECT ");
#line 944 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				select = _tmp48_;
#line 946 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp49_ = self->priv->next_table_index;
#line 946 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->next_table_index = _tmp49_ + 1;
#line 946 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp50_ = self->priv->next_table_index;
#line 946 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				left_index = _tmp50_;
#line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp51_ = self->priv->next_table_index;
#line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->next_table_index = _tmp51_ + 1;
#line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp52_ = self->priv->next_table_index;
#line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				right_index = _tmp52_;
#line 949 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp53_ = sql;
#line 949 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp54_ = left_index;
#line 949 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append_printf (_tmp53_, ") AS t%d_g LEFT JOIN (", _tmp54_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp55_ = sql;
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp56_ = tracker_sparql_pattern_translate_group_graph_pattern (self, _tmp55_, &_inner_error_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp57_ = _tmp56_;
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (select);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9488 "tracker-sparql-pattern.c"
					} else {
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_string_free0 (select);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 9502 "tracker-sparql-pattern.c"
					}
				}
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp58_ = _tmp57_;
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_context (self, _tmp58_);
#line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_tmp58_);
#line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp59_ = sql;
#line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp60_ = right_index;
#line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append_printf (_tmp59_, ") AS t%d_g", _tmp60_);
#line 955 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				first = TRUE;
#line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				first_common = TRUE;
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp61_ = tracker_sparql_pattern_get_context (self);
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp62_ = _tmp61_;
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp63_ = _tmp62_->var_set;
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp64_ = g_hash_table_get_keys (_tmp63_);
#line 9529 "tracker-sparql-pattern.c"
				{
					GList* v_collection = NULL;
					GList* v_it = NULL;
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					v_collection = _tmp64_;
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					for (v_it = v_collection; v_it != NULL; v_it = v_it->next) {
#line 9537 "tracker-sparql-pattern.c"
						TrackerSparqlVariable* v = NULL;
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						v = (TrackerSparqlVariable*) v_it->data;
#line 9541 "tracker-sparql-pattern.c"
						{
							gboolean _tmp65_;
							TrackerSparqlContext* _tmp67_;
							TrackerSparqlContext* _tmp68_;
							TrackerSparqlContext* _tmp69_;
							GHashTable* _tmp70_;
							TrackerSparqlVariable* _tmp71_;
							gconstpointer _tmp72_ = NULL;
							gint old_state;
							gint _tmp73_;
#line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp65_ = first;
#line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_tmp65_) {
#line 959 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								first = FALSE;
#line 9558 "tracker-sparql-pattern.c"
							} else {
								GString* _tmp66_;
#line 961 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp66_ = select;
#line 961 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_string_append (_tmp66_, ", ");
#line 9565 "tracker-sparql-pattern.c"
							}
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp67_ = tracker_sparql_pattern_get_context (self);
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp68_ = _tmp67_;
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp69_ = _tmp68_->parent_context;
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp70_ = _tmp69_->var_set;
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp71_ = v;
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp72_ = g_hash_table_lookup (_tmp70_, _tmp71_);
#line 964 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							old_state = GPOINTER_TO_INT (_tmp72_);
#line 965 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp73_ = old_state;
#line 965 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_tmp73_ == 0) {
#line 9585 "tracker-sparql-pattern.c"
								TrackerSparqlContext* _tmp74_;
								TrackerSparqlContext* _tmp75_;
								TrackerSparqlContext* _tmp76_;
								GHashTable* _tmp77_;
								TrackerSparqlVariable* _tmp78_;
								TrackerSparqlVariable* _tmp79_;
								GString* _tmp80_;
								gint _tmp81_;
								TrackerSparqlVariable* _tmp82_;
								const gchar* _tmp83_;
								const gchar* _tmp84_;
								TrackerSparqlVariable* _tmp85_;
								TrackerSparqlVariableBinding* _tmp86_;
								TrackerPropertyType _tmp87_;
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp74_ = tracker_sparql_pattern_get_context (self);
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp75_ = _tmp74_;
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp76_ = _tmp75_->parent_context;
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp77_ = _tmp76_->var_set;
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp78_ = v;
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp79_ = _g_object_ref0 (_tmp78_);
#line 967 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_hash_table_insert (_tmp77_, _tmp79_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL));
#line 968 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp80_ = select;
#line 968 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp81_ = right_index;
#line 968 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp82_ = v;
#line 968 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp83_ = tracker_sparql_variable_get_sql_expression (_tmp82_);
#line 968 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp84_ = _tmp83_;
#line 968 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_string_append_printf (_tmp80_, "t%d_g.%s", _tmp81_, _tmp84_);
#line 970 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp85_ = v;
#line 970 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp86_ = _tmp85_->binding;
#line 970 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp87_ = ((TrackerSparqlDataBinding*) _tmp86_)->data_type;
#line 970 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp87_ == TRACKER_PROPERTY_TYPE_DATETIME) {
#line 9634 "tracker-sparql-pattern.c"
									GString* _tmp88_;
									gint _tmp89_;
									TrackerSparqlVariable* _tmp90_;
									gchar* _tmp91_ = NULL;
									gchar* _tmp92_;
									GString* _tmp93_;
									gint _tmp94_;
									TrackerSparqlVariable* _tmp95_;
									gchar* _tmp96_ = NULL;
									gchar* _tmp97_;
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp88_ = select;
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp89_ = right_index;
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp90_ = v;
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp91_ = tracker_sparql_variable_get_extra_sql_expression (_tmp90_, "localDate");
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp92_ = _tmp91_;
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp88_, ", t%d_g.%s", _tmp89_, _tmp92_);
#line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp92_);
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp93_ = select;
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp94_ = right_index;
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp95_ = v;
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp96_ = tracker_sparql_variable_get_extra_sql_expression (_tmp95_, "localTime");
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp97_ = _tmp96_;
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp93_, ", t%d_g.%s", _tmp94_, _tmp97_);
#line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp97_);
#line 9673 "tracker-sparql-pattern.c"
								}
							} else {
								gboolean _tmp98_;
								gint _tmp101_;
#line 975 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp98_ = first_common;
#line 975 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp98_) {
#line 9682 "tracker-sparql-pattern.c"
									GString* _tmp99_;
#line 976 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp99_ = sql;
#line 976 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp99_, " ON ");
#line 977 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									first_common = FALSE;
#line 9690 "tracker-sparql-pattern.c"
								} else {
									GString* _tmp100_;
#line 979 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp100_ = sql;
#line 979 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp100_, " AND ");
#line 9697 "tracker-sparql-pattern.c"
								}
#line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp101_ = old_state;
#line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp101_ == ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND)) {
#line 9703 "tracker-sparql-pattern.c"
									GString* _tmp102_;
									gint _tmp103_;
									TrackerSparqlVariable* _tmp104_;
									const gchar* _tmp105_;
									const gchar* _tmp106_;
									gint _tmp107_;
									TrackerSparqlVariable* _tmp108_;
									const gchar* _tmp109_;
									const gchar* _tmp110_;
									GString* _tmp111_;
									gint _tmp112_;
									TrackerSparqlVariable* _tmp113_;
									const gchar* _tmp114_;
									const gchar* _tmp115_;
									TrackerSparqlVariable* _tmp116_;
									TrackerSparqlVariableBinding* _tmp117_;
									TrackerPropertyType _tmp118_;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp102_ = sql;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp103_ = left_index;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp104_ = v;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp105_ = tracker_sparql_variable_get_sql_expression (_tmp104_);
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp106_ = _tmp105_;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp107_ = right_index;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp108_ = v;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp109_ = tracker_sparql_variable_get_sql_expression (_tmp108_);
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp110_ = _tmp109_;
#line 984 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp102_, "t%d_g.%s = t%d_g.%s", _tmp103_, _tmp106_, _tmp107_, _tmp110_);
#line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp111_ = select;
#line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp112_ = left_index;
#line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp113_ = v;
#line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp114_ = tracker_sparql_variable_get_sql_expression (_tmp113_);
#line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp115_ = _tmp114_;
#line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp111_, "t%d_g.%s", _tmp112_, _tmp115_);
#line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp116_ = v;
#line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp117_ = _tmp116_->binding;
#line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp118_ = ((TrackerSparqlDataBinding*) _tmp117_)->data_type;
#line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp118_ == TRACKER_PROPERTY_TYPE_DATETIME) {
#line 9761 "tracker-sparql-pattern.c"
										GString* _tmp119_;
										gint _tmp120_;
										TrackerSparqlVariable* _tmp121_;
										gchar* _tmp122_ = NULL;
										gchar* _tmp123_;
										GString* _tmp124_;
										gint _tmp125_;
										TrackerSparqlVariable* _tmp126_;
										gchar* _tmp127_ = NULL;
										gchar* _tmp128_;
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp119_ = select;
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp120_ = left_index;
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp121_ = v;
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp122_ = tracker_sparql_variable_get_extra_sql_expression (_tmp121_, "localDate");
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp123_ = _tmp122_;
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp119_, ", t%d_g.%s", _tmp120_, _tmp123_);
#line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_free0 (_tmp123_);
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp124_ = select;
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp125_ = left_index;
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp126_ = v;
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp127_ = tracker_sparql_variable_get_extra_sql_expression (_tmp126_, "localTime");
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp128_ = _tmp127_;
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp124_, ", t%d_g.%s", _tmp125_, _tmp128_);
#line 989 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_free0 (_tmp128_);
#line 9800 "tracker-sparql-pattern.c"
									}
								} else {
									gint _tmp129_;
#line 991 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp129_ = old_state;
#line 991 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp129_ == ((gint) TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL)) {
#line 9808 "tracker-sparql-pattern.c"
										GString* _tmp130_;
										gint _tmp131_;
										TrackerSparqlVariable* _tmp132_;
										const gchar* _tmp133_;
										const gchar* _tmp134_;
										gint _tmp135_;
										TrackerSparqlVariable* _tmp136_;
										const gchar* _tmp137_;
										const gchar* _tmp138_;
										gint _tmp139_;
										TrackerSparqlVariable* _tmp140_;
										const gchar* _tmp141_;
										const gchar* _tmp142_;
										GString* _tmp143_;
										gint _tmp144_;
										TrackerSparqlVariable* _tmp145_;
										const gchar* _tmp146_;
										const gchar* _tmp147_;
										gint _tmp148_;
										TrackerSparqlVariable* _tmp149_;
										const gchar* _tmp150_;
										const gchar* _tmp151_;
										TrackerSparqlVariable* _tmp152_;
										const gchar* _tmp153_;
										const gchar* _tmp154_;
										TrackerSparqlVariable* _tmp155_;
										TrackerSparqlVariableBinding* _tmp156_;
										TrackerPropertyType _tmp157_;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp130_ = sql;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp131_ = left_index;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp132_ = v;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp133_ = tracker_sparql_variable_get_sql_expression (_tmp132_);
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp134_ = _tmp133_;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp135_ = left_index;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp136_ = v;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp137_ = tracker_sparql_variable_get_sql_expression (_tmp136_);
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp138_ = _tmp137_;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp139_ = right_index;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp140_ = v;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp141_ = tracker_sparql_variable_get_sql_expression (_tmp140_);
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp142_ = _tmp141_;
#line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp130_, "(t%d_g.%s IS NULL OR t%d_g.%s = t%d_g.%s)", _tmp131_, _tmp134_, _tmp135_, _tmp138_, _tmp139_, _tmp142_);
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp143_ = select;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp144_ = left_index;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp145_ = v;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp146_ = tracker_sparql_variable_get_sql_expression (_tmp145_);
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp147_ = _tmp146_;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp148_ = right_index;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp149_ = v;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp150_ = tracker_sparql_variable_get_sql_expression (_tmp149_);
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp151_ = _tmp150_;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp152_ = v;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp153_ = tracker_sparql_variable_get_sql_expression (_tmp152_);
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp154_ = _tmp153_;
#line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										g_string_append_printf (_tmp143_, "COALESCE (t%d_g.%s, t%d_g.%s) AS %s", _tmp144_, _tmp147_, _tmp148_, _tmp151_, _tmp154_);
#line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp155_ = v;
#line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp156_ = _tmp155_->binding;
#line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_tmp157_ = ((TrackerSparqlDataBinding*) _tmp156_)->data_type;
#line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										if (_tmp157_ == TRACKER_PROPERTY_TYPE_DATETIME) {
#line 9899 "tracker-sparql-pattern.c"
											GString* _tmp158_;
											gint _tmp159_;
											TrackerSparqlVariable* _tmp160_;
											gchar* _tmp161_ = NULL;
											gchar* _tmp162_;
											gint _tmp163_;
											TrackerSparqlVariable* _tmp164_;
											gchar* _tmp165_ = NULL;
											gchar* _tmp166_;
											TrackerSparqlVariable* _tmp167_;
											gchar* _tmp168_ = NULL;
											gchar* _tmp169_;
											GString* _tmp170_;
											gint _tmp171_;
											TrackerSparqlVariable* _tmp172_;
											gchar* _tmp173_ = NULL;
											gchar* _tmp174_;
											gint _tmp175_;
											TrackerSparqlVariable* _tmp176_;
											gchar* _tmp177_ = NULL;
											gchar* _tmp178_;
											TrackerSparqlVariable* _tmp179_;
											gchar* _tmp180_ = NULL;
											gchar* _tmp181_;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp158_ = select;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp159_ = left_index;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp160_ = v;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp161_ = tracker_sparql_variable_get_extra_sql_expression (_tmp160_, "localDate");
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp162_ = _tmp161_;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp163_ = right_index;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp164_ = v;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp165_ = tracker_sparql_variable_get_extra_sql_expression (_tmp164_, "localDate");
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp166_ = _tmp165_;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp167_ = v;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp168_ = tracker_sparql_variable_get_extra_sql_expression (_tmp167_, "localDate");
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp169_ = _tmp168_;
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											g_string_append_printf (_tmp158_, ", COALESCE (t%d_g.%s, t%d_g.%s) AS %s", _tmp159_, _tmp162_, _tmp163_, _tmp166_, _tmp169_);
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_tmp169_);
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_tmp166_);
#line 997 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_tmp162_);
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp170_ = select;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp171_ = left_index;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp172_ = v;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp173_ = tracker_sparql_variable_get_extra_sql_expression (_tmp172_, "localTime");
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp174_ = _tmp173_;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp175_ = right_index;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp176_ = v;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp177_ = tracker_sparql_variable_get_extra_sql_expression (_tmp176_, "localTime");
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp178_ = _tmp177_;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp179_ = v;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp180_ = tracker_sparql_variable_get_extra_sql_expression (_tmp179_, "localTime");
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp181_ = _tmp180_;
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											g_string_append_printf (_tmp170_, ", COALESCE (t%d_g.%s, t%d_g.%s) AS %s", _tmp171_, _tmp174_, _tmp175_, _tmp178_, _tmp181_);
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_tmp181_);
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_tmp178_);
#line 998 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_g_free0 (_tmp174_);
#line 9988 "tracker-sparql-pattern.c"
										}
									}
								}
							}
						}
					}
#line 957 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_list_free0 (v_collection);
#line 9997 "tracker-sparql-pattern.c"
				}
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp182_ = tracker_sparql_pattern_get_context (self);
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp183_ = _tmp182_;
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp184_ = _tmp183_->parent_context;
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp185_ = _tmp184_->var_set;
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp186_ = g_hash_table_get_keys (_tmp185_);
#line 10009 "tracker-sparql-pattern.c"
				{
					GList* v_collection = NULL;
					GList* v_it = NULL;
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					v_collection = _tmp186_;
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					for (v_it = v_collection; v_it != NULL; v_it = v_it->next) {
#line 10017 "tracker-sparql-pattern.c"
						TrackerSparqlVariable* v = NULL;
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						v = (TrackerSparqlVariable*) v_it->data;
#line 10021 "tracker-sparql-pattern.c"
						{
							TrackerSparqlContext* _tmp187_;
							TrackerSparqlContext* _tmp188_;
							GHashTable* _tmp189_;
							TrackerSparqlVariable* _tmp190_;
							gconstpointer _tmp191_ = NULL;
#line 1004 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp187_ = tracker_sparql_pattern_get_context (self);
#line 1004 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp188_ = _tmp187_;
#line 1004 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp189_ = _tmp188_->var_set;
#line 1004 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp190_ = v;
#line 1004 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp191_ = g_hash_table_lookup (_tmp189_, _tmp190_);
#line 1004 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (GPOINTER_TO_INT (_tmp191_) == 0) {
#line 10040 "tracker-sparql-pattern.c"
								gboolean _tmp192_;
								GString* _tmp194_;
								gint _tmp195_;
								TrackerSparqlVariable* _tmp196_;
								const gchar* _tmp197_;
								const gchar* _tmp198_;
								TrackerSparqlVariable* _tmp199_;
								TrackerSparqlVariableBinding* _tmp200_;
								TrackerPropertyType _tmp201_;
#line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp192_ = first;
#line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp192_) {
#line 1007 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									first = FALSE;
#line 10056 "tracker-sparql-pattern.c"
								} else {
									GString* _tmp193_;
#line 1009 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp193_ = select;
#line 1009 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp193_, ", ");
#line 10063 "tracker-sparql-pattern.c"
								}
#line 1012 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp194_ = select;
#line 1012 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp195_ = left_index;
#line 1012 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp196_ = v;
#line 1012 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp197_ = tracker_sparql_variable_get_sql_expression (_tmp196_);
#line 1012 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp198_ = _tmp197_;
#line 1012 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_string_append_printf (_tmp194_, "t%d_g.%s", _tmp195_, _tmp198_);
#line 1014 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp199_ = v;
#line 1014 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp200_ = _tmp199_->binding;
#line 1014 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp201_ = ((TrackerSparqlDataBinding*) _tmp200_)->data_type;
#line 1014 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_tmp201_ == TRACKER_PROPERTY_TYPE_DATETIME) {
#line 10085 "tracker-sparql-pattern.c"
									GString* _tmp202_;
									gint _tmp203_;
									TrackerSparqlVariable* _tmp204_;
									gchar* _tmp205_ = NULL;
									gchar* _tmp206_;
									GString* _tmp207_;
									gint _tmp208_;
									TrackerSparqlVariable* _tmp209_;
									gchar* _tmp210_ = NULL;
									gchar* _tmp211_;
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp202_ = select;
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp203_ = left_index;
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp204_ = v;
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp205_ = tracker_sparql_variable_get_extra_sql_expression (_tmp204_, "localDate");
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp206_ = _tmp205_;
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp202_, ", t%d_g.%s", _tmp203_, _tmp206_);
#line 1015 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp206_);
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp207_ = select;
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp208_ = left_index;
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp209_ = v;
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp210_ = tracker_sparql_variable_get_extra_sql_expression (_tmp209_, "localTime");
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp211_ = _tmp210_;
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append_printf (_tmp207_, ", t%d_g.%s", _tmp208_, _tmp211_);
#line 1016 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_free0 (_tmp211_);
#line 10124 "tracker-sparql-pattern.c"
								}
							}
						}
					}
#line 1003 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_list_free0 (v_collection);
#line 10131 "tracker-sparql-pattern.c"
				}
#line 1020 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp212_ = first;
#line 1020 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp212_) {
#line 10137 "tracker-sparql-pattern.c"
					GString* _tmp213_;
#line 1022 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp213_ = select;
#line 1022 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp213_, "1");
#line 10143 "tracker-sparql-pattern.c"
				}
#line 1025 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp214_ = tracker_sparql_pattern_get_context (self);
#line 1025 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp215_ = _tmp214_;
#line 1025 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp216_ = _tmp215_->parent_context;
#line 1025 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_set_context (self, _tmp216_);
#line 1027 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp217_ = select;
#line 1027 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append (_tmp217_, " FROM (");
#line 1028 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp218_ = sql;
#line 1028 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp219_ = group_graph_pattern_start;
#line 1028 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp220_ = select;
#line 1028 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp221_ = _tmp220_->str;
#line 1028 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_insert (_tmp218_, (gssize) _tmp219_, _tmp221_);
#line 1032 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp222_ = sql;
#line 1032 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp223_ = group_graph_pattern_start;
#line 1032 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_insert (_tmp222_, (gssize) _tmp223_, "SELECT * FROM (");
#line 1033 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp224_ = sql;
#line 1033 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append (_tmp224_, ")");
#line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_string_free0 (select);
#line 10179 "tracker-sparql-pattern.c"
			}
		} else {
			gboolean _tmp225_ = FALSE;
			gboolean _tmp226_;
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp225_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_GRAPH, &_inner_error_);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp226_ = _tmp225_;
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					filters = (g_free (filters), NULL);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 10200 "tracker-sparql-pattern.c"
				} else {
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					filters = (g_free (filters), NULL);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 10212 "tracker-sparql-pattern.c"
				}
			}
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp226_) {
#line 10217 "tracker-sparql-pattern.c"
				const gchar* _tmp227_;
				gchar* _tmp228_;
				gchar* old_graph;
				gboolean _tmp229_;
				gboolean old_graph_is_var;
				GString* _tmp230_;
				gboolean _tmp231_ = FALSE;
				gchar* _tmp232_ = NULL;
				gchar* _tmp233_;
				gboolean _tmp234_ = FALSE;
				gboolean _tmp235_;
				gboolean _tmp237_;
				const gchar* _tmp251_;
				gchar* _tmp252_;
				gboolean _tmp253_;
#line 1036 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp227_ = self->current_graph;
#line 1036 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp228_ = g_strdup (_tmp227_);
#line 1036 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				old_graph = _tmp228_;
#line 1037 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp229_ = self->priv->current_graph_is_var;
#line 1037 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				old_graph_is_var = _tmp229_;
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp230_ = sql;
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp232_ = tracker_sparql_pattern_parse_var_or_term (self, _tmp230_, &_tmp231_, &_inner_error_);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->current_graph_is_var = _tmp231_;
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp233_ = _tmp232_;
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (old_graph);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 10265 "tracker-sparql-pattern.c"
					} else {
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (old_graph);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						filters = (g_free (filters), NULL);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tracker_sparql_context_unref0 (_result_);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return NULL;
#line 10279 "tracker-sparql-pattern.c"
					}
				}
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (self->current_graph);
#line 1038 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->current_graph = _tmp233_;
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp235_ = in_triples_block;
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp235_) {
#line 10290 "tracker-sparql-pattern.c"
					gboolean _tmp236_;
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp236_ = in_group_graph_pattern;
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp234_ = !_tmp236_;
#line 10296 "tracker-sparql-pattern.c"
				} else {
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp234_ = FALSE;
#line 10300 "tracker-sparql-pattern.c"
				}
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp237_ = _tmp234_;
#line 1040 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp237_) {
#line 10306 "tracker-sparql-pattern.c"
					GString* _tmp238_;
					glong _tmp239_;
					GString* _tmp240_;
					GString* _tmp241_;
#line 1041 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					in_group_graph_pattern = TRUE;
#line 1043 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp238_ = sql;
#line 1043 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp239_ = group_graph_pattern_start;
#line 1043 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_insert (_tmp238_, (gssize) _tmp239_, "SELECT * FROM (");
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp240_ = sql;
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_translate_group_or_union_graph_pattern (self, _tmp240_, &_inner_error_);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_graph);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							filters = (g_free (filters), NULL);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 10337 "tracker-sparql-pattern.c"
						} else {
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_graph);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							filters = (g_free (filters), NULL);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 1044 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 10351 "tracker-sparql-pattern.c"
						}
					}
#line 1045 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp241_ = sql;
#line 1045 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp241_, ")");
#line 10358 "tracker-sparql-pattern.c"
				} else {
					gboolean _tmp242_;
					gboolean _tmp245_;
					GString* _tmp246_;
					glong _tmp247_;
					GString* _tmp248_;
					GString* _tmp249_;
					GString* _tmp250_;
#line 1047 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp242_ = in_triples_block;
#line 1047 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp242_) {
#line 10371 "tracker-sparql-pattern.c"
						GString* _tmp243_;
						gboolean _tmp244_;
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp243_ = sql;
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp244_ = in_group_graph_pattern;
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_end_triples_block (self, _tmp243_, &first_where, _tmp244_, &_inner_error_);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_graph);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10394 "tracker-sparql-pattern.c"
							} else {
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_free0 (old_graph);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 1048 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10408 "tracker-sparql-pattern.c"
							}
						}
#line 1049 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						in_triples_block = FALSE;
#line 10413 "tracker-sparql-pattern.c"
					}
#line 1051 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp245_ = in_group_graph_pattern;
#line 1051 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp245_) {
#line 1052 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						in_group_graph_pattern = TRUE;
#line 10421 "tracker-sparql-pattern.c"
					}
#line 1055 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp246_ = sql;
#line 1055 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp247_ = group_graph_pattern_start;
#line 1055 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_insert (_tmp246_, (gssize) _tmp247_, "SELECT * FROM (");
#line 1056 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp248_ = sql;
#line 1056 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp248_, ") NATURAL INNER JOIN (");
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp249_ = sql;
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_translate_group_or_union_graph_pattern (self, _tmp249_, &_inner_error_);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_graph);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							filters = (g_free (filters), NULL);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 10451 "tracker-sparql-pattern.c"
						} else {
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (old_graph);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							filters = (g_free (filters), NULL);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 1057 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 10465 "tracker-sparql-pattern.c"
						}
					}
#line 1058 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp250_ = sql;
#line 1058 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp250_, ")");
#line 10472 "tracker-sparql-pattern.c"
				}
#line 1061 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp251_ = old_graph;
#line 1061 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp252_ = g_strdup (_tmp251_);
#line 1061 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (self->current_graph);
#line 1061 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->current_graph = _tmp252_;
#line 1062 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp253_ = old_graph_is_var;
#line 1062 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				self->priv->current_graph_is_var = _tmp253_;
#line 1035 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (old_graph);
#line 10488 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlTokenType _tmp254_ = 0;
#line 1063 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp254_ = tracker_sparql_pattern_current (self);
#line 1063 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp254_ == TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE) {
#line 10495 "tracker-sparql-pattern.c"
					gboolean _tmp255_ = FALSE;
					gboolean _tmp256_;
					gboolean _tmp258_;
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp256_ = in_triples_block;
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp256_) {
#line 10503 "tracker-sparql-pattern.c"
						gboolean _tmp257_;
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp257_ = in_group_graph_pattern;
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp255_ = !_tmp257_;
#line 10509 "tracker-sparql-pattern.c"
					} else {
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp255_ = FALSE;
#line 10513 "tracker-sparql-pattern.c"
					}
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp258_ = _tmp255_;
#line 1064 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp258_) {
#line 10519 "tracker-sparql-pattern.c"
						GString* _tmp259_;
						glong _tmp260_;
						GString* _tmp261_;
						GString* _tmp262_;
#line 1065 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						in_group_graph_pattern = TRUE;
#line 1067 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp259_ = sql;
#line 1067 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp260_ = group_graph_pattern_start;
#line 1067 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_insert (_tmp259_, (gssize) _tmp260_, "SELECT * FROM (");
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp261_ = sql;
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_translate_group_or_union_graph_pattern (self, _tmp261_, &_inner_error_);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10548 "tracker-sparql-pattern.c"
							} else {
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 1068 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10560 "tracker-sparql-pattern.c"
							}
						}
#line 1069 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp262_ = sql;
#line 1069 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp262_, ")");
#line 10567 "tracker-sparql-pattern.c"
					} else {
						gboolean _tmp263_;
						gboolean _tmp266_;
						GString* _tmp267_;
						glong _tmp268_;
						GString* _tmp269_;
						GString* _tmp270_;
						GString* _tmp271_;
#line 1071 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp263_ = in_triples_block;
#line 1071 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_tmp263_) {
#line 10580 "tracker-sparql-pattern.c"
							GString* _tmp264_;
							gboolean _tmp265_;
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp264_ = sql;
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp265_ = in_group_graph_pattern;
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							tracker_sparql_pattern_end_triples_block (self, _tmp264_, &first_where, _tmp265_, &_inner_error_);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_ != NULL) {
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_propagate_error (error, _inner_error_);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									filters = (g_free (filters), NULL);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tracker_sparql_context_unref0 (_result_);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									return NULL;
#line 10601 "tracker-sparql-pattern.c"
								} else {
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									filters = (g_free (filters), NULL);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tracker_sparql_context_unref0 (_result_);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_clear_error (&_inner_error_);
#line 1072 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									return NULL;
#line 10613 "tracker-sparql-pattern.c"
								}
							}
#line 1073 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							in_triples_block = FALSE;
#line 10618 "tracker-sparql-pattern.c"
						}
#line 1075 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp266_ = in_group_graph_pattern;
#line 1075 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (!_tmp266_) {
#line 1076 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							in_group_graph_pattern = TRUE;
#line 10626 "tracker-sparql-pattern.c"
						}
#line 1079 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp267_ = sql;
#line 1079 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp268_ = group_graph_pattern_start;
#line 1079 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_insert (_tmp267_, (gssize) _tmp268_, "SELECT * FROM (");
#line 1080 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp269_ = sql;
#line 1080 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp269_, ") NATURAL INNER JOIN (");
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp270_ = sql;
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_translate_group_or_union_graph_pattern (self, _tmp270_, &_inner_error_);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10654 "tracker-sparql-pattern.c"
							} else {
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 1081 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10666 "tracker-sparql-pattern.c"
							}
						}
#line 1082 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp271_ = sql;
#line 1082 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp271_, ")");
#line 10673 "tracker-sparql-pattern.c"
					}
				} else {
					TrackerSparqlTokenType _tmp272_ = 0;
#line 1084 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp272_ = tracker_sparql_pattern_current (self);
#line 1084 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp272_ == TRACKER_SPARQL_TOKEN_TYPE_FILTER) {
#line 10681 "tracker-sparql-pattern.c"
						TrackerSourceLocation* _tmp273_;
						gint _tmp273__length1;
						TrackerSourceLocation _tmp274_ = {0};
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp273_ = filters;
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp273__length1 = filters_length1;
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_get_location (self, &_tmp274_);
#line 1085 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_vala_array_add6 (&filters, &filters_length1, &_filters_size_, &_tmp274_);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						tracker_sparql_pattern_skip_filter (self, &_inner_error_);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_ != NULL) {
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_propagate_error (error, _inner_error_);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10707 "tracker-sparql-pattern.c"
							} else {
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								filters = (g_free (filters), NULL);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tracker_sparql_context_unref0 (_result_);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_clear_error (&_inner_error_);
#line 1086 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								return NULL;
#line 10719 "tracker-sparql-pattern.c"
							}
						}
					} else {
#line 1088 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						break;
#line 10725 "tracker-sparql-pattern.c"
					}
				}
			}
		}
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filters = (g_free (filters), NULL);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 10744 "tracker-sparql-pattern.c"
			} else {
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filters = (g_free (filters), NULL);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 1091 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 10756 "tracker-sparql-pattern.c"
			}
		}
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp275_ = sql;
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp276_ = group_graph_pattern_start;
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp277_ = found_simple_optional;
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_parse_triples (self, _tmp275_, _tmp276_, &in_triples_block, &first_where, &in_group_graph_pattern, _tmp277_, &_inner_error_);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_ != NULL) {
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_propagate_error (error, _inner_error_);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filters = (g_free (filters), NULL);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 10779 "tracker-sparql-pattern.c"
			} else {
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filters = (g_free (filters), NULL);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tracker_sparql_context_unref0 (_result_);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_clear_error (&_inner_error_);
#line 1094 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				return NULL;
#line 10791 "tracker-sparql-pattern.c"
			}
		}
	}
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			filters = (g_free (filters), NULL);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 10809 "tracker-sparql-pattern.c"
		} else {
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			filters = (g_free (filters), NULL);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (_result_);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 1097 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return NULL;
#line 10821 "tracker-sparql-pattern.c"
		}
	}
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp279_ = in_triples_block;
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (!_tmp279_) {
#line 10828 "tracker-sparql-pattern.c"
		gboolean _tmp280_;
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp280_ = in_group_graph_pattern;
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp278_ = !_tmp280_;
#line 10834 "tracker-sparql-pattern.c"
	} else {
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp278_ = FALSE;
#line 10838 "tracker-sparql-pattern.c"
	}
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp281_ = _tmp278_;
#line 1099 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp281_) {
#line 10844 "tracker-sparql-pattern.c"
		GString* _tmp282_;
#line 1101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp282_ = sql;
#line 1101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp282_, "SELECT 1");
#line 10850 "tracker-sparql-pattern.c"
	} else {
		gboolean _tmp283_;
#line 1102 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp283_ = in_triples_block;
#line 1102 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp283_) {
#line 10857 "tracker-sparql-pattern.c"
			GString* _tmp284_;
			gboolean _tmp285_;
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp284_ = sql;
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp285_ = in_group_graph_pattern;
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_end_triples_block (self, _tmp284_, &first_where, _tmp285_, &_inner_error_);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					filters = (g_free (filters), NULL);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 10878 "tracker-sparql-pattern.c"
				} else {
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					filters = (g_free (filters), NULL);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (_result_);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 1103 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return NULL;
#line 10890 "tracker-sparql-pattern.c"
				}
			}
#line 1104 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			in_triples_block = FALSE;
#line 10895 "tracker-sparql-pattern.c"
		}
	}
#line 1107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp286_ = in_group_graph_pattern;
#line 1107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp286_) {
#line 1108 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		first_where = TRUE;
#line 10904 "tracker-sparql-pattern.c"
	}
#line 1112 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp287_ = filters;
#line 1112 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp287__length1 = filters_length1;
#line 1112 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp287__length1 > 0) {
#line 10912 "tracker-sparql-pattern.c"
		TrackerSourceLocation _tmp288_ = {0};
		TrackerSourceLocation end;
		TrackerSourceLocation* _tmp289_;
		gint _tmp289__length1;
		TrackerSourceLocation _tmp295_;
#line 1113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_get_location (self, &_tmp288_);
#line 1113 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		end = _tmp288_;
#line 1115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp289_ = filters;
#line 1115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp289__length1 = filters_length1;
#line 10926 "tracker-sparql-pattern.c"
		{
			TrackerSourceLocation* filter_location_collection = NULL;
			gint filter_location_collection_length1 = 0;
			gint _filter_location_collection_size_ = 0;
			gint filter_location_it = 0;
#line 1115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			filter_location_collection = _tmp289_;
#line 1115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			filter_location_collection_length1 = _tmp289__length1;
#line 1115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			for (filter_location_it = 0; filter_location_it < _tmp289__length1; filter_location_it = filter_location_it + 1) {
#line 10938 "tracker-sparql-pattern.c"
				TrackerSourceLocation filter_location = {0};
#line 1115 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				filter_location = filter_location_collection[filter_location_it];
#line 10942 "tracker-sparql-pattern.c"
				{
					gboolean _tmp290_;
					TrackerSourceLocation _tmp293_;
					GString* _tmp294_;
#line 1116 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp290_ = first_where;
#line 1116 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp290_) {
#line 10951 "tracker-sparql-pattern.c"
						GString* _tmp291_;
#line 1117 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp291_ = sql;
#line 1117 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp291_, " AND ");
#line 10957 "tracker-sparql-pattern.c"
					} else {
						GString* _tmp292_;
#line 1119 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp292_ = sql;
#line 1119 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp292_, " WHERE ");
#line 1120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						first_where = FALSE;
#line 10966 "tracker-sparql-pattern.c"
					}
#line 1123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp293_ = filter_location;
#line 1123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_set_location (self, &_tmp293_);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp294_ = sql;
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					tracker_sparql_pattern_translate_filter (self, _tmp294_, &_inner_error_);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_ != NULL) {
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							filters = (g_free (filters), NULL);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 10988 "tracker-sparql-pattern.c"
						} else {
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							filters = (g_free (filters), NULL);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tracker_sparql_context_unref0 (_result_);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 1124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return NULL;
#line 11000 "tracker-sparql-pattern.c"
						}
					}
				}
			}
		}
#line 1127 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp295_ = end;
#line 1127 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_set_location (self, &_tmp295_);
#line 11010 "tracker-sparql-pattern.c"
	}
#line 1130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp296_ = tracker_sparql_pattern_get_context (self);
#line 1130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp297_ = _tmp296_;
#line 1130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp298_ = _tmp297_->parent_context;
#line 1130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_set_context (self, _tmp298_);
#line 1131 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _result_;
#line 1131 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	filters = (g_free (filters), NULL);
#line 1131 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 11026 "tracker-sparql-pattern.c"
}


static void _vala_array_add7 (glong** array, int* length, int* size, glong value) {
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (glong, *array, *size);
#line 11037 "tracker-sparql-pattern.c"
	}
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = value;
#line 11041 "tracker-sparql-pattern.c"
}


static void _vala_array_add8 (TrackerSparqlContext*** array, int* length, int* size, TrackerSparqlContext* value) {
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (TrackerSparqlContext*, *array, (*size) + 1);
#line 11052 "tracker-sparql-pattern.c"
	}
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = value;
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[*length] = NULL;
#line 11058 "tracker-sparql-pattern.c"
}


static gpointer _tracker_sparql_context_ref0 (gpointer self) {
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return self ? tracker_sparql_context_ref (self) : NULL;
#line 11065 "tracker-sparql-pattern.c"
}


static void _vala_array_add9 (TrackerSparqlVariable*** array, int* length, int* size, TrackerSparqlVariable* value) {
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if ((*length) == (*size)) {
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*array = g_renew (TrackerSparqlVariable*, *array, (*size) + 1);
#line 11076 "tracker-sparql-pattern.c"
	}
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[(*length)++] = value;
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	(*array)[*length] = NULL;
#line 11082 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_translate_group_or_union_graph_pattern (TrackerSparqlPattern* self, GString* sql, GError** error) {
	TrackerSparqlVariable** _tmp0_ = NULL;
	TrackerSparqlVariable** all_vars;
	gint all_vars_length1;
	gint _all_vars_size_;
	GDestroyNotify _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* all_var_set;
	TrackerSparqlContext** _tmp3_ = NULL;
	TrackerSparqlContext** contexts;
	gint contexts_length1;
	gint _contexts_size_;
	glong* _tmp4_ = NULL;
	glong* offsets;
	gint offsets_length1;
	gint _offsets_size_;
	TrackerSparqlContext** _tmp16_;
	gint _tmp16__length1;
	GError * _inner_error_ = NULL;
#line 1134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 1134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 1135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = g_new0 (TrackerSparqlVariable*, 0 + 1);
#line 1135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	all_vars = _tmp0_;
#line 1135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	all_vars_length1 = 0;
#line 1135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_all_vars_size_ = all_vars_length1;
#line 1136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = g_object_unref;
#line 1136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp1_, NULL);
#line 1136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	all_var_set = _tmp2_;
#line 1138 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = g_new0 (TrackerSparqlContext*, 0 + 1);
#line 1138 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	contexts = _tmp3_;
#line 1138 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	contexts_length1 = 0;
#line 1138 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_contexts_size_ = contexts_length1;
#line 1139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = g_new0 (glong, 0);
#line 1139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	offsets = _tmp4_;
#line 1139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	offsets_length1 = 0;
#line 1139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_offsets_size_ = offsets_length1;
#line 11139 "tracker-sparql-pattern.c"
	{
		gboolean _tmp5_;
#line 1141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = TRUE;
#line 1141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		while (TRUE) {
#line 11146 "tracker-sparql-pattern.c"
			gboolean _tmp6_;
			glong* _tmp9_;
			gint _tmp9__length1;
			GString* _tmp10_;
			gssize _tmp11_;
			GString* _tmp12_;
			TrackerSparqlContext* _tmp13_ = NULL;
			TrackerSparqlContext* _tmp14_;
			TrackerSparqlContext** _tmp15_;
			gint _tmp15__length1;
#line 1141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_ = _tmp5_;
#line 1141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (!_tmp6_) {
#line 11161 "tracker-sparql-pattern.c"
				gboolean _tmp7_ = FALSE;
				gboolean _tmp8_;
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp7_ = tracker_sparql_pattern_accept (self, TRACKER_SPARQL_TOKEN_TYPE_UNION, &_inner_error_);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp8_ = _tmp7_;
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_ != NULL) {
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						offsets = (g_free (offsets), NULL);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						contexts = (_vala_array_free (contexts, contexts_length1, (GDestroyNotify) tracker_sparql_context_unref), NULL);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_hash_table_unref0 (all_var_set);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						all_vars = (_vala_array_free (all_vars, all_vars_length1, (GDestroyNotify) g_object_unref), NULL);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 11184 "tracker-sparql-pattern.c"
					} else {
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						offsets = (g_free (offsets), NULL);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						contexts = (_vala_array_free (contexts, contexts_length1, (GDestroyNotify) tracker_sparql_context_unref), NULL);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_hash_table_unref0 (all_var_set);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						all_vars = (_vala_array_free (all_vars, all_vars_length1, (GDestroyNotify) g_object_unref), NULL);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 11200 "tracker-sparql-pattern.c"
					}
				}
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp8_) {
#line 1144 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					break;
#line 11207 "tracker-sparql-pattern.c"
				}
			}
#line 1141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp5_ = FALSE;
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp9_ = offsets;
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp9__length1 = offsets_length1;
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp10_ = sql;
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp11_ = _tmp10_->len;
#line 1142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_vala_array_add7 (&offsets, &offsets_length1, &_offsets_size_, (glong) _tmp11_);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp12_ = sql;
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp13_ = tracker_sparql_pattern_translate_group_graph_pattern (self, _tmp12_, &_inner_error_);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = _tmp13_;
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_inner_error_ != NULL) {
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					offsets = (g_free (offsets), NULL);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					contexts = (_vala_array_free (contexts, contexts_length1, (GDestroyNotify) tracker_sparql_context_unref), NULL);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_hash_table_unref0 (all_var_set);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					all_vars = (_vala_array_free (all_vars, all_vars_length1, (GDestroyNotify) g_object_unref), NULL);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 11244 "tracker-sparql-pattern.c"
				} else {
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					offsets = (g_free (offsets), NULL);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					contexts = (_vala_array_free (contexts, contexts_length1, (GDestroyNotify) tracker_sparql_context_unref), NULL);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_hash_table_unref0 (all_var_set);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					all_vars = (_vala_array_free (all_vars, all_vars_length1, (GDestroyNotify) g_object_unref), NULL);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 11260 "tracker-sparql-pattern.c"
				}
			}
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp15_ = contexts;
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp15__length1 = contexts_length1;
#line 1143 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_vala_array_add8 (&contexts, &contexts_length1, &_contexts_size_, _tmp14_);
#line 11269 "tracker-sparql-pattern.c"
		}
	}
#line 1146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp16_ = contexts;
#line 1146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp16__length1 = contexts_length1;
#line 1146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp16__length1 > 1) {
#line 11278 "tracker-sparql-pattern.c"
		TrackerSparqlContext** _tmp17_;
		gint _tmp17__length1;
		glong extra_offset;
		GString* _tmp72_;
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17_ = contexts;
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17__length1 = contexts_length1;
#line 11287 "tracker-sparql-pattern.c"
		{
			TrackerSparqlContext** sub_context_collection = NULL;
			gint sub_context_collection_length1 = 0;
			gint _sub_context_collection_size_ = 0;
			gint sub_context_it = 0;
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			sub_context_collection = _tmp17_;
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			sub_context_collection_length1 = _tmp17__length1;
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			for (sub_context_it = 0; sub_context_it < _tmp17__length1; sub_context_it = sub_context_it + 1) {
#line 11299 "tracker-sparql-pattern.c"
				TrackerSparqlContext* _tmp18_;
				TrackerSparqlContext* sub_context = NULL;
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp18_ = _tracker_sparql_context_ref0 (sub_context_collection[sub_context_it]);
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				sub_context = _tmp18_;
#line 11306 "tracker-sparql-pattern.c"
				{
					TrackerSparqlContext* _tmp19_;
					GHashTable* _tmp20_;
					GList* _tmp21_ = NULL;
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp19_ = sub_context;
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp20_ = _tmp19_->var_set;
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp21_ = g_hash_table_get_keys (_tmp20_);
#line 11317 "tracker-sparql-pattern.c"
					{
						GList* v_collection = NULL;
						GList* v_it = NULL;
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						v_collection = _tmp21_;
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						for (v_it = v_collection; v_it != NULL; v_it = v_it->next) {
#line 11325 "tracker-sparql-pattern.c"
							TrackerSparqlVariable* v = NULL;
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							v = (TrackerSparqlVariable*) v_it->data;
#line 11329 "tracker-sparql-pattern.c"
							{
								GHashTable* _tmp22_;
								TrackerSparqlVariable* _tmp23_;
								gconstpointer _tmp24_ = NULL;
#line 1152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp22_ = all_var_set;
#line 1152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp23_ = v;
#line 1152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp24_ = g_hash_table_lookup (_tmp22_, _tmp23_);
#line 1152 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (GPOINTER_TO_INT (_tmp24_) == 0) {
#line 11342 "tracker-sparql-pattern.c"
									TrackerSparqlVariable** _tmp25_;
									gint _tmp25__length1;
									TrackerSparqlVariable* _tmp26_;
									TrackerSparqlVariable* _tmp27_;
									GHashTable* _tmp28_;
									TrackerSparqlVariable* _tmp29_;
									TrackerSparqlVariable* _tmp30_;
									TrackerSparqlContext* _tmp31_;
									TrackerSparqlContext* _tmp32_;
									GHashTable* _tmp33_;
									TrackerSparqlVariable* _tmp34_;
									TrackerSparqlVariable* _tmp35_;
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp25_ = all_vars;
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp25__length1 = all_vars_length1;
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp26_ = v;
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp27_ = _g_object_ref0 (_tmp26_);
#line 1153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_vala_array_add9 (&all_vars, &all_vars_length1, &_all_vars_size_, _tmp27_);
#line 1154 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp28_ = all_var_set;
#line 1154 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp29_ = v;
#line 1154 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp30_ = _g_object_ref0 (_tmp29_);
#line 1154 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_hash_table_insert (_tmp28_, _tmp30_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 1155 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp31_ = tracker_sparql_pattern_get_context (self);
#line 1155 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp32_ = _tmp31_;
#line 1155 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp33_ = _tmp32_->var_set;
#line 1155 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp34_ = v;
#line 1155 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp35_ = _g_object_ref0 (_tmp34_);
#line 1155 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_hash_table_insert (_tmp33_, _tmp35_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 11385 "tracker-sparql-pattern.c"
								}
							}
						}
#line 1151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_list_free0 (v_collection);
#line 11391 "tracker-sparql-pattern.c"
					}
#line 1150 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tracker_sparql_context_unref0 (sub_context);
#line 11395 "tracker-sparql-pattern.c"
				}
			}
		}
#line 1160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		extra_offset = (glong) 0;
#line 11401 "tracker-sparql-pattern.c"
		{
			gint i;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			i = 0;
#line 11406 "tracker-sparql-pattern.c"
			{
				gboolean _tmp36_;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp36_ = TRUE;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				while (TRUE) {
#line 11413 "tracker-sparql-pattern.c"
					gboolean _tmp37_;
					gint _tmp39_;
					TrackerSparqlContext** _tmp40_;
					gint _tmp40__length1;
					GString* _tmp41_;
					GString* projection;
					gint _tmp42_;
					GString* _tmp44_;
					TrackerSparqlVariable** _tmp45_;
					gint _tmp45__length1;
					GString* _tmp58_;
					GString* _tmp59_;
					gssize _tmp60_;
					GString* _tmp61_;
					GString* _tmp62_;
					glong* _tmp63_;
					gint _tmp63__length1;
					gint _tmp64_;
					glong _tmp65_;
					glong _tmp66_;
					GString* _tmp67_;
					const gchar* _tmp68_;
					glong _tmp69_;
					GString* _tmp70_;
					gssize _tmp71_;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp37_ = _tmp36_;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!_tmp37_) {
#line 11443 "tracker-sparql-pattern.c"
						gint _tmp38_;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp38_ = i;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						i = _tmp38_ + 1;
#line 11449 "tracker-sparql-pattern.c"
					}
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp36_ = FALSE;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp39_ = i;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp40_ = contexts;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp40__length1 = contexts_length1;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (!(_tmp39_ < _tmp40__length1)) {
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						break;
#line 11463 "tracker-sparql-pattern.c"
					}
#line 1162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp41_ = g_string_new ("");
#line 1162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					projection = _tmp41_;
#line 1163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp42_ = i;
#line 1163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp42_ > 0) {
#line 11473 "tracker-sparql-pattern.c"
						GString* _tmp43_;
#line 1164 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp43_ = projection;
#line 1164 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_string_append (_tmp43_, ") UNION ALL ");
#line 11479 "tracker-sparql-pattern.c"
					}
#line 1166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp44_ = projection;
#line 1166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp44_, "SELECT ");
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp45_ = all_vars;
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp45__length1 = all_vars_length1;
#line 11489 "tracker-sparql-pattern.c"
					{
						TrackerSparqlVariable** v_collection = NULL;
						gint v_collection_length1 = 0;
						gint _v_collection_size_ = 0;
						gint v_it = 0;
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						v_collection = _tmp45_;
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						v_collection_length1 = _tmp45__length1;
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						for (v_it = 0; v_it < _tmp45__length1; v_it = v_it + 1) {
#line 11501 "tracker-sparql-pattern.c"
							TrackerSparqlVariable* _tmp46_;
							TrackerSparqlVariable* v = NULL;
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_tmp46_ = _g_object_ref0 (v_collection[v_it]);
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							v = _tmp46_;
#line 11508 "tracker-sparql-pattern.c"
							{
								TrackerSparqlContext** _tmp47_;
								gint _tmp47__length1;
								gint _tmp48_;
								TrackerSparqlContext* _tmp49_;
								GHashTable* _tmp50_;
								TrackerSparqlVariable* _tmp51_;
								gconstpointer _tmp52_ = NULL;
								GString* _tmp54_;
								TrackerSparqlVariable* _tmp55_;
								const gchar* _tmp56_;
								const gchar* _tmp57_;
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp47_ = contexts;
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp47__length1 = contexts_length1;
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp48_ = i;
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp49_ = _tmp47_[_tmp48_];
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp50_ = _tmp49_->var_set;
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp51_ = v;
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp52_ = g_hash_table_lookup (_tmp50_, _tmp51_);
#line 1168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								if (GPOINTER_TO_INT (_tmp52_) == 0) {
#line 11537 "tracker-sparql-pattern.c"
									GString* _tmp53_;
#line 1171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp53_ = projection;
#line 1171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									g_string_append (_tmp53_, "NULL AS ");
#line 11543 "tracker-sparql-pattern.c"
								}
#line 1173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp54_ = projection;
#line 1173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp55_ = v;
#line 1173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp56_ = tracker_sparql_variable_get_sql_expression (_tmp55_);
#line 1173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp57_ = _tmp56_;
#line 1173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								g_string_append_printf (_tmp54_, "%s, ", _tmp57_);
#line 1167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_g_object_unref0 (v);
#line 11557 "tracker-sparql-pattern.c"
							}
						}
					}
#line 1176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp58_ = projection;
#line 1176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp59_ = projection;
#line 1176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp60_ = _tmp59_->len;
#line 1176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_truncate (_tmp58_, (gsize) (_tmp60_ - 2));
#line 1177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp61_ = projection;
#line 1177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append (_tmp61_, " FROM (");
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp62_ = sql;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp63_ = offsets;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp63__length1 = offsets_length1;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp64_ = i;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp65_ = _tmp63_[_tmp64_];
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp66_ = extra_offset;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp67_ = projection;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp68_ = _tmp67_->str;
#line 1179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_insert (_tmp62_, (gssize) (_tmp65_ + _tmp66_), _tmp68_);
#line 1180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp69_ = extra_offset;
#line 1180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp70_ = projection;
#line 1180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp71_ = _tmp70_->len;
#line 1180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					extra_offset = _tmp69_ + _tmp71_;
#line 1161 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_string_free0 (projection);
#line 11601 "tracker-sparql-pattern.c"
				}
			}
		}
#line 1182 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp72_ = sql;
#line 1182 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp72_, ")");
#line 11609 "tracker-sparql-pattern.c"
	} else {
		TrackerSparqlContext** _tmp73_;
		gint _tmp73__length1;
		TrackerSparqlContext* _tmp74_;
		GHashTable* _tmp75_;
		GList* _tmp76_ = NULL;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp73_ = contexts;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp73__length1 = contexts_length1;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp74_ = _tmp73_[0];
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp75_ = _tmp74_->var_set;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp76_ = g_hash_table_get_keys (_tmp75_);
#line 11626 "tracker-sparql-pattern.c"
		{
			GList* key_collection = NULL;
			GList* key_it = NULL;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			key_collection = _tmp76_;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
#line 11634 "tracker-sparql-pattern.c"
				TrackerSparqlVariable* key = NULL;
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				key = (TrackerSparqlVariable*) key_it->data;
#line 11638 "tracker-sparql-pattern.c"
				{
					TrackerSparqlContext* _tmp77_;
					TrackerSparqlContext* _tmp78_;
					GHashTable* _tmp79_;
					TrackerSparqlVariable* _tmp80_;
					TrackerSparqlVariable* _tmp81_;
#line 1185 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp77_ = tracker_sparql_pattern_get_context (self);
#line 1185 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp78_ = _tmp77_;
#line 1185 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp79_ = _tmp78_->var_set;
#line 1185 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp80_ = key;
#line 1185 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp81_ = _g_object_ref0 (_tmp80_);
#line 1185 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_hash_table_insert (_tmp79_, _tmp81_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 11657 "tracker-sparql-pattern.c"
				}
			}
#line 1184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_list_free0 (key_collection);
#line 11662 "tracker-sparql-pattern.c"
		}
	}
#line 1134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	offsets = (g_free (offsets), NULL);
#line 1134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	contexts = (_vala_array_free (contexts, contexts_length1, (GDestroyNotify) tracker_sparql_context_unref), NULL);
#line 1134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_hash_table_unref0 (all_var_set);
#line 1134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	all_vars = (_vala_array_free (all_vars, all_vars_length1, (GDestroyNotify) g_object_unref), NULL);
#line 11673 "tracker-sparql-pattern.c"
}


static TrackerSparqlVariableBindingList* tracker_sparql_pattern_get_variable_binding_list (TrackerSparqlPattern* self, TrackerSparqlVariable* variable) {
	TrackerSparqlVariableBindingList* result = NULL;
	TrackerSparqlVariableBindingList* binding_list;
	TrackerSparqlPatternTripleContext* _tmp0_;
	gboolean _tmp6_ = FALSE;
	TrackerSparqlVariableBindingList* _tmp7_;
	gboolean _tmp10_;
#line 1190 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 1190 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (variable != NULL, NULL);
#line 1191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	binding_list = NULL;
#line 1192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->triple_context;
#line 1192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp0_ != NULL) {
#line 11694 "tracker-sparql-pattern.c"
		TrackerSparqlPatternTripleContext* _tmp1_;
		GHashTable* _tmp2_;
		TrackerSparqlVariable* _tmp3_;
		gconstpointer _tmp4_ = NULL;
		TrackerSparqlVariableBindingList* _tmp5_;
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp1_ = self->priv->triple_context;
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp2_ = _tmp1_->var_bindings;
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp3_ = variable;
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = g_hash_table_lookup (_tmp2_, _tmp3_);
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = _g_object_ref0 ((TrackerSparqlVariableBindingList*) _tmp4_);
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (binding_list);
#line 1193 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		binding_list = _tmp5_;
#line 11714 "tracker-sparql-pattern.c"
	}
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp7_ = binding_list;
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp7_ == NULL) {
#line 11720 "tracker-sparql-pattern.c"
		TrackerSparqlVariable* _tmp8_;
		TrackerSparqlVariableBinding* _tmp9_;
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = variable;
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp9_ = _tmp8_->binding;
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = _tmp9_ != NULL;
#line 11729 "tracker-sparql-pattern.c"
	} else {
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = FALSE;
#line 11733 "tracker-sparql-pattern.c"
	}
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp10_ = _tmp6_;
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp10_) {
#line 11739 "tracker-sparql-pattern.c"
		TrackerSparqlContext* _tmp11_;
		TrackerSparqlContext* _tmp12_;
		TrackerSparqlContext* _tmp13_;
		TrackerSparqlContext* current_context;
#line 1197 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_ = tracker_sparql_pattern_get_context (self);
#line 1197 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp12_ = _tmp11_;
#line 1197 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp13_ = _tracker_sparql_context_ref0 (_tmp12_);
#line 1197 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		current_context = _tmp13_;
#line 1198 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		while (TRUE) {
#line 11754 "tracker-sparql-pattern.c"
			TrackerSparqlContext* _tmp14_;
			gboolean _tmp15_ = FALSE;
			TrackerSparqlContext* _tmp16_;
			gboolean _tmp17_;
			gboolean _tmp23_;
			TrackerSparqlContext* _tmp64_;
			TrackerSparqlContext* _tmp65_;
			TrackerSparqlContext* _tmp66_;
#line 1198 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = current_context;
#line 1198 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (!(_tmp14_ != NULL)) {
#line 1198 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				break;
#line 11769 "tracker-sparql-pattern.c"
			}
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp16_ = current_context;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp17_ = _tmp16_->scalar_subquery;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp17_) {
#line 11777 "tracker-sparql-pattern.c"
				TrackerSparqlContext* _tmp18_;
				TrackerSparqlContext* _tmp19_;
				GHashTable* _tmp20_;
				TrackerSparqlVariable* _tmp21_;
				gconstpointer _tmp22_ = NULL;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp18_ = current_context;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp19_ = _tmp18_->parent_context;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp20_ = _tmp19_->var_set;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp21_ = variable;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp22_ = g_hash_table_lookup (_tmp20_, _tmp21_);
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp15_ = GPOINTER_TO_INT (_tmp22_) != 0;
#line 11795 "tracker-sparql-pattern.c"
			} else {
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp15_ = FALSE;
#line 11799 "tracker-sparql-pattern.c"
			}
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp23_ = _tmp15_;
#line 1201 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp23_) {
#line 11805 "tracker-sparql-pattern.c"
				TrackerSparqlVariableBinding* _tmp24_;
				TrackerSparqlVariableBinding* binding;
				TrackerSparqlVariableBinding* _tmp25_;
				TrackerSparqlVariable* _tmp26_;
				TrackerSparqlVariableBinding* _tmp27_;
				TrackerPropertyType _tmp28_;
				TrackerSparqlVariableBinding* _tmp29_;
				TrackerSparqlContext* _tmp30_;
				TrackerSparqlContext* _tmp31_;
				TrackerSparqlVariable* _tmp32_;
				const gchar* _tmp33_;
				const gchar* _tmp34_;
				TrackerSparqlVariable* _tmp35_ = NULL;
				TrackerSparqlVariableBinding* _tmp36_;
				TrackerSparqlVariable* _tmp37_;
				TrackerSparqlVariableBinding* _tmp38_;
				TrackerClass* _tmp39_;
				TrackerClass* _tmp40_;
				TrackerSparqlVariableBinding* _tmp41_;
				TrackerSparqlVariable* _tmp42_;
				const gchar* _tmp43_;
				const gchar* _tmp44_;
				TrackerSparqlVariableBindingList* _tmp45_;
				TrackerSparqlPatternTripleContext* _tmp46_;
				TrackerSparqlContext* _tmp56_;
				TrackerSparqlContext* _tmp57_;
				GHashTable* _tmp58_;
				TrackerSparqlVariable* _tmp59_;
				TrackerSparqlVariable* _tmp60_;
				TrackerSparqlVariableBindingList* _tmp61_;
				TrackerSparqlVariableBinding* _tmp62_;
				TrackerSparqlVariableBinding* _tmp63_;
#line 1203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp24_ = tracker_sparql_variable_binding_new ();
#line 1203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding = _tmp24_;
#line 1204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp25_ = binding;
#line 1204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp26_ = variable;
#line 1204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp27_ = _tmp26_->binding;
#line 1204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp28_ = ((TrackerSparqlDataBinding*) _tmp27_)->data_type;
#line 1204 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp25_)->data_type = _tmp28_;
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp29_ = binding;
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp30_ = tracker_sparql_pattern_get_context (self);
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp31_ = _tmp30_;
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp32_ = variable;
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp33_ = tracker_sparql_variable_get_name (_tmp32_);
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp34_ = _tmp33_;
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp35_ = tracker_sparql_context_get_variable (_tmp31_, _tmp34_);
#line 1205 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp29_->variable = _tmp35_;
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp36_ = binding;
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp37_ = variable;
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp38_ = _tmp37_->binding;
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp39_ = _tmp38_->type;
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp40_ = _g_object_ref0 (_tmp39_);
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (_tmp36_->type);
#line 1206 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp36_->type = _tmp40_;
#line 1207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp41_ = binding;
#line 1207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp42_ = variable;
#line 1207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp43_ = tracker_sparql_variable_get_sql_expression (_tmp42_);
#line 1207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp44_ = _tmp43_;
#line 1207 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_data_binding_set_sql_expression ((TrackerSparqlDataBinding*) _tmp41_, _tmp44_);
#line 1208 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp45_ = tracker_sparql_variable_binding_list_new ();
#line 1208 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding_list);
#line 1208 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding_list = _tmp45_;
#line 1209 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp46_ = self->priv->triple_context;
#line 1209 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp46_ != NULL) {
#line 11902 "tracker-sparql-pattern.c"
					TrackerSparqlPatternTripleContext* _tmp47_;
					TrackerSparqlVariable* _tmp48_;
					TrackerSparqlVariable* _tmp49_;
					TrackerSparqlPatternTripleContext* _tmp50_;
					GHashTable* _tmp51_;
					TrackerSparqlVariable* _tmp52_;
					TrackerSparqlVariable* _tmp53_;
					TrackerSparqlVariableBindingList* _tmp54_;
					TrackerSparqlVariableBindingList* _tmp55_;
#line 1210 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp47_ = self->priv->triple_context;
#line 1210 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp48_ = variable;
#line 1210 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp49_ = _g_object_ref0 (_tmp48_);
#line 1210 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp47_->variables = g_list_append (_tmp47_->variables, _tmp49_);
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp50_ = self->priv->triple_context;
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp51_ = _tmp50_->var_bindings;
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp52_ = variable;
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp53_ = _g_object_ref0 (_tmp52_);
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp54_ = binding_list;
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp55_ = _g_object_ref0 (_tmp54_);
#line 1211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_hash_table_insert (_tmp51_, _tmp53_, _tmp55_);
#line 11934 "tracker-sparql-pattern.c"
				}
#line 1214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp56_ = tracker_sparql_pattern_get_context (self);
#line 1214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp57_ = _tmp56_;
#line 1214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp58_ = _tmp57_->var_set;
#line 1214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp59_ = variable;
#line 1214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp60_ = _g_object_ref0 (_tmp59_);
#line 1214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_hash_table_insert (_tmp58_, _tmp60_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_BOUND));
#line 1215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp61_ = binding_list;
#line 1215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp62_ = binding;
#line 1215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp63_ = _g_object_ref0 (_tmp62_);
#line 1215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp61_->list = g_list_append (_tmp61_->list, _tmp63_);
#line 1216 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 1216 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				break;
#line 11960 "tracker-sparql-pattern.c"
			}
#line 1218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp64_ = current_context;
#line 1218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp65_ = _tmp64_->parent_context;
#line 1218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp66_ = _tracker_sparql_context_ref0 (_tmp65_);
#line 1218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tracker_sparql_context_unref0 (current_context);
#line 1218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			current_context = _tmp66_;
#line 11972 "tracker-sparql-pattern.c"
		}
#line 1195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tracker_sparql_context_unref0 (current_context);
#line 11976 "tracker-sparql-pattern.c"
	}
#line 1221 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = binding_list;
#line 1221 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 11982 "tracker-sparql-pattern.c"
}


void tracker_sparql_pattern_add_variable_binding (TrackerSparqlPattern* self, GString* sql, TrackerSparqlVariableBinding* binding, TrackerSparqlVariableState variable_state) {
	TrackerSparqlVariableBinding* _tmp0_;
	TrackerSparqlVariable* _tmp1_;
	TrackerSparqlVariableBindingList* _tmp2_ = NULL;
	TrackerSparqlVariableBindingList* binding_list;
	TrackerSparqlVariableBindingList* _tmp3_;
	TrackerSparqlVariableBindingList* _tmp50_;
	TrackerSparqlVariableBinding* _tmp51_;
	TrackerSparqlVariableBinding* _tmp52_;
	TrackerSparqlVariableBinding* _tmp53_;
	TrackerSparqlVariable* _tmp54_;
	TrackerSparqlVariableBinding* _tmp55_;
#line 1224 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 1224 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 1224 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (binding != NULL);
#line 1225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = binding;
#line 1225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = _tmp0_->variable;
#line 1225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = tracker_sparql_pattern_get_variable_binding_list (self, _tmp1_);
#line 1225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	binding_list = _tmp2_;
#line 1226 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = binding_list;
#line 1226 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp3_ == NULL) {
#line 12016 "tracker-sparql-pattern.c"
		TrackerSparqlVariableBindingList* _tmp4_;
		TrackerSparqlPatternTripleContext* _tmp5_;
		GString* _tmp17_;
		TrackerSparqlVariableBinding* _tmp18_;
		const gchar* _tmp19_;
		const gchar* _tmp20_;
		TrackerSparqlVariableBinding* _tmp21_;
		TrackerSparqlVariable* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		TrackerSparqlVariableBinding* _tmp25_;
		TrackerPropertyType _tmp26_;
		TrackerSparqlContext* _tmp43_;
		TrackerSparqlContext* _tmp44_;
		GHashTable* _tmp45_;
		TrackerSparqlVariableBinding* _tmp46_;
		TrackerSparqlVariable* _tmp47_;
		TrackerSparqlVariable* _tmp48_;
		TrackerSparqlVariableState _tmp49_;
#line 1227 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = tracker_sparql_variable_binding_list_new ();
#line 1227 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (binding_list);
#line 1227 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		binding_list = _tmp4_;
#line 1228 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = self->priv->triple_context;
#line 1228 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp5_ != NULL) {
#line 12046 "tracker-sparql-pattern.c"
			TrackerSparqlPatternTripleContext* _tmp6_;
			TrackerSparqlVariableBinding* _tmp7_;
			TrackerSparqlVariable* _tmp8_;
			TrackerSparqlVariable* _tmp9_;
			TrackerSparqlPatternTripleContext* _tmp10_;
			GHashTable* _tmp11_;
			TrackerSparqlVariableBinding* _tmp12_;
			TrackerSparqlVariable* _tmp13_;
			TrackerSparqlVariable* _tmp14_;
			TrackerSparqlVariableBindingList* _tmp15_;
			TrackerSparqlVariableBindingList* _tmp16_;
#line 1229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_ = self->priv->triple_context;
#line 1229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp7_ = binding;
#line 1229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp8_ = _tmp7_->variable;
#line 1229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp9_ = _g_object_ref0 (_tmp8_);
#line 1229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp6_->variables = g_list_append (_tmp6_->variables, _tmp9_);
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp10_ = self->priv->triple_context;
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp11_ = _tmp10_->var_bindings;
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp12_ = binding;
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp13_ = _tmp12_->variable;
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = _g_object_ref0 (_tmp13_);
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp15_ = binding_list;
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp16_ = _g_object_ref0 (_tmp15_);
#line 1230 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_hash_table_insert (_tmp11_, _tmp14_, _tmp16_);
#line 12084 "tracker-sparql-pattern.c"
		}
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17_ = sql;
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp18_ = binding;
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp19_ = tracker_sparql_data_binding_get_sql_expression ((TrackerSparqlDataBinding*) _tmp18_);
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp20_ = _tmp19_;
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp21_ = binding;
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp22_ = _tmp21_->variable;
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp23_ = tracker_sparql_variable_get_sql_expression (_tmp22_);
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp24_ = _tmp23_;
#line 1233 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append_printf (_tmp17_, "%s AS %s, ", _tmp20_, _tmp24_);
#line 1237 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp25_ = binding;
#line 1237 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp26_ = ((TrackerSparqlDataBinding*) _tmp25_)->data_type;
#line 1237 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp26_ == TRACKER_PROPERTY_TYPE_DATETIME) {
#line 12110 "tracker-sparql-pattern.c"
			GString* _tmp27_;
			TrackerSparqlVariableBinding* _tmp28_;
			gchar* _tmp29_ = NULL;
			gchar* _tmp30_;
			TrackerSparqlVariableBinding* _tmp31_;
			TrackerSparqlVariable* _tmp32_;
			gchar* _tmp33_ = NULL;
			gchar* _tmp34_;
			GString* _tmp35_;
			TrackerSparqlVariableBinding* _tmp36_;
			gchar* _tmp37_ = NULL;
			gchar* _tmp38_;
			TrackerSparqlVariableBinding* _tmp39_;
			TrackerSparqlVariable* _tmp40_;
			gchar* _tmp41_ = NULL;
			gchar* _tmp42_;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp27_ = sql;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp28_ = binding;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp29_ = tracker_sparql_data_binding_get_extra_sql_expression ((TrackerSparqlDataBinding*) _tmp28_, "localDate");
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp30_ = _tmp29_;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp31_ = binding;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp32_ = _tmp31_->variable;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp33_ = tracker_sparql_variable_get_extra_sql_expression (_tmp32_, "localDate");
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp34_ = _tmp33_;
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_string_append_printf (_tmp27_, "%s AS %s, ", _tmp30_, _tmp34_);
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp34_);
#line 1238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp30_);
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp35_ = sql;
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp36_ = binding;
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp37_ = tracker_sparql_data_binding_get_extra_sql_expression ((TrackerSparqlDataBinding*) _tmp36_, "localTime");
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp38_ = _tmp37_;
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp39_ = binding;
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp40_ = _tmp39_->variable;
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp41_ = tracker_sparql_variable_get_extra_sql_expression (_tmp40_, "localTime");
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp42_ = _tmp41_;
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_string_append_printf (_tmp35_, "%s AS %s, ", _tmp38_, _tmp42_);
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp42_);
#line 1241 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp38_);
#line 12171 "tracker-sparql-pattern.c"
		}
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp43_ = tracker_sparql_pattern_get_context (self);
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp44_ = _tmp43_;
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp45_ = _tmp44_->var_set;
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp46_ = binding;
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp47_ = _tmp46_->variable;
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp48_ = _g_object_ref0 (_tmp47_);
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp49_ = variable_state;
#line 1246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_hash_table_insert (_tmp45_, _tmp48_, GINT_TO_POINTER ((gint) _tmp49_));
#line 12189 "tracker-sparql-pattern.c"
	}
#line 1248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp50_ = binding_list;
#line 1248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp51_ = binding;
#line 1248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp52_ = _g_object_ref0 (_tmp51_);
#line 1248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp50_->list = g_list_append (_tmp50_->list, _tmp52_);
#line 1249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp53_ = binding;
#line 1249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp54_ = _tmp53_->variable;
#line 1249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp55_ = _tmp54_->binding;
#line 1249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp55_ == NULL) {
#line 12207 "tracker-sparql-pattern.c"
		TrackerSparqlVariableBinding* _tmp56_;
		TrackerSparqlVariable* _tmp57_;
		TrackerSparqlVariableBinding* _tmp58_;
		TrackerSparqlVariableBinding* _tmp59_;
#line 1250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp56_ = binding;
#line 1250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp57_ = _tmp56_->variable;
#line 1250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp58_ = binding;
#line 1250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp59_ = _g_object_ref0 (_tmp58_);
#line 1250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (_tmp57_->binding);
#line 1250 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp57_->binding = _tmp59_;
#line 12224 "tracker-sparql-pattern.c"
	}
#line 1224 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_object_unref0 (binding_list);
#line 12228 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_parse_object (TrackerSparqlPattern* self, GString* sql, gboolean in_simple_optional, GError** error) {
	GString* _tmp0_;
	gssize _tmp1_;
	glong begin_sql_len;
	gboolean object_is_var = FALSE;
	GString* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gchar* _tmp4_ = NULL;
	gchar* object;
	gchar* db_table;
	gboolean rdftype;
	gboolean share_table;
	gboolean is_fts_match;
	gboolean newtable = FALSE;
	TrackerSparqlDataTable* table = NULL;
	TrackerProperty* prop;
	TrackerClass* subject_type;
	gboolean _tmp5_;
	gboolean _tmp263_;
	gboolean _tmp298_;
	GString* _tmp440_;
	gssize _tmp441_;
	glong _tmp442_;
	GError * _inner_error_ = NULL;
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (sql != NULL);
#line 1255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = sql;
#line 1255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = _tmp0_->len;
#line 1255 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	begin_sql_len = (glong) _tmp1_;
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = sql;
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = tracker_sparql_pattern_parse_var_or_term (self, _tmp2_, &_tmp3_, &_inner_error_);
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	object_is_var = _tmp3_;
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	object = _tmp4_;
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_inner_error_ != NULL) {
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_propagate_error (error, _inner_error_);
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 12282 "tracker-sparql-pattern.c"
		} else {
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_clear_error (&_inner_error_);
#line 1258 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			return;
#line 12290 "tracker-sparql-pattern.c"
		}
	}
#line 1260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	db_table = NULL;
#line 1261 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	rdftype = FALSE;
#line 1262 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	share_table = TRUE;
#line 1263 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	is_fts_match = FALSE;
#line 1267 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	prop = NULL;
#line 1269 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	subject_type = NULL;
#line 1271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp5_ = self->priv->current_predicate_is_var;
#line 1271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (!_tmp5_) {
#line 12309 "tracker-sparql-pattern.c"
		const gchar* _tmp6_;
		TrackerProperty* _tmp7_ = NULL;
		TrackerProperty* _tmp8_;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
		const gchar* _tmp11_;
		gboolean _tmp13_;
		gboolean _tmp15_;
		const gchar* _tmp195_;
		const gchar* _tmp196_;
		gboolean _tmp197_;
		gboolean _tmp198_ = FALSE;
		TrackerSparqlDataTable* _tmp199_ = NULL;
#line 1272 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = self->priv->current_predicate;
#line 1272 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp7_ = tracker_ontologies_get_property_by_uri (_tmp6_);
#line 1272 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = _g_object_ref0 (_tmp7_);
#line 1272 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (prop);
#line 1272 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		prop = _tmp8_;
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_ = self->priv->current_predicate;
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (g_strcmp0 (_tmp11_, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") == 0) {
#line 12337 "tracker-sparql-pattern.c"
			gboolean _tmp12_;
#line 1275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp12_ = object_is_var;
#line 1275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp10_ = !_tmp12_;
#line 12343 "tracker-sparql-pattern.c"
		} else {
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp10_ = FALSE;
#line 12347 "tracker-sparql-pattern.c"
		}
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp13_ = _tmp10_;
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp13_) {
#line 12353 "tracker-sparql-pattern.c"
			const gchar* _tmp14_;
#line 1275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp14_ = self->current_graph;
#line 1275 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp9_ = _tmp14_ == NULL;
#line 12359 "tracker-sparql-pattern.c"
		} else {
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp9_ = FALSE;
#line 12363 "tracker-sparql-pattern.c"
		}
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp15_ = _tmp9_;
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp15_) {
#line 12369 "tracker-sparql-pattern.c"
			const gchar* _tmp16_;
			TrackerClass* _tmp17_ = NULL;
			TrackerClass* _tmp18_;
			TrackerClass* cl;
			TrackerClass* _tmp19_;
			TrackerClass* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			gchar* _tmp28_;
			TrackerClass* _tmp29_;
			TrackerClass* _tmp30_;
#line 1278 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			rdftype = TRUE;
#line 1279 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp16_ = object;
#line 1279 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp17_ = tracker_ontologies_get_class_by_uri (_tmp16_);
#line 1279 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp18_ = _g_object_ref0 (_tmp17_);
#line 1279 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			cl = _tmp18_;
#line 1280 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp19_ = cl;
#line 1280 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp19_ == NULL) {
#line 12395 "tracker-sparql-pattern.c"
				const gchar* _tmp20_;
				gchar* _tmp21_ = NULL;
				gchar* _tmp22_;
				GError* _tmp23_;
				GError* _tmp24_;
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp20_ = object;
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp21_ = g_strdup_printf ("Unknown class `%s'", _tmp20_);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp22_ = _tmp21_;
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp23_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_CLASS, _tmp22_);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp24_ = _tmp23_;
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp22_);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_inner_error_ = _tmp24_;
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_propagate_error (error, _inner_error_);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (cl);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (subject_type);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (prop);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (table);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (db_table);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (object);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 12433 "tracker-sparql-pattern.c"
				} else {
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (cl);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (subject_type);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (prop);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (table);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (db_table);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (object);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_clear_error (&_inner_error_);
#line 1281 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 12453 "tracker-sparql-pattern.c"
				}
			}
#line 1283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp25_ = cl;
#line 1283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp26_ = tracker_class_get_name (_tmp25_);
#line 1283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp27_ = _tmp26_;
#line 1283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp28_ = g_strdup (_tmp27_);
#line 1283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (db_table);
#line 1283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			db_table = _tmp28_;
#line 1284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp29_ = cl;
#line 1284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp30_ = _g_object_ref0 (_tmp29_);
#line 1284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (subject_type);
#line 1284 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			subject_type = _tmp30_;
#line 1274 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (cl);
#line 12478 "tracker-sparql-pattern.c"
		} else {
			TrackerProperty* _tmp31_;
#line 1285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp31_ = prop;
#line 1285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp31_ == NULL) {
#line 12485 "tracker-sparql-pattern.c"
				const gchar* _tmp32_;
#line 1286 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp32_ = self->priv->current_predicate;
#line 1286 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (g_strcmp0 (_tmp32_, "http://www.tracker-project.org/ontologies/fts#match") == 0) {
#line 12491 "tracker-sparql-pattern.c"
					gchar* _tmp33_;
#line 1288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp33_ = g_strdup ("fts");
#line 1288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (db_table);
#line 1288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					db_table = _tmp33_;
#line 1289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					share_table = FALSE;
#line 1290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					is_fts_match = TRUE;
#line 12503 "tracker-sparql-pattern.c"
				} else {
					const gchar* _tmp34_;
					gchar* _tmp35_ = NULL;
					gchar* _tmp36_;
					GError* _tmp37_;
					GError* _tmp38_;
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp34_ = self->priv->current_predicate;
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp35_ = g_strdup_printf ("Unknown property `%s'", _tmp34_);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp36_ = _tmp35_;
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp37_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_PROPERTY, _tmp36_);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp38_ = _tmp37_;
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (_tmp36_);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_inner_error_ = _tmp38_;
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_propagate_error (error, _inner_error_);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (subject_type);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (prop);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (table);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (db_table);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (object);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 12540 "tracker-sparql-pattern.c"
					} else {
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (subject_type);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (prop);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (table);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (db_table);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (object);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_clear_error (&_inner_error_);
#line 1292 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						return;
#line 12558 "tracker-sparql-pattern.c"
					}
				}
			} else {
				gboolean _tmp39_ = FALSE;
				gboolean _tmp40_ = FALSE;
				const gchar* _tmp41_;
				gboolean _tmp43_;
				gboolean _tmp45_;
				gboolean _tmp79_;
				const gchar* _tmp110_;
				TrackerProperty* _tmp115_;
				gboolean _tmp116_;
				gboolean _tmp117_;
				TrackerProperty* _tmp118_;
				TrackerClass* _tmp119_;
				TrackerClass* _tmp120_;
				TrackerClass* _tmp121_;
				gboolean _tmp122_ = FALSE;
				gboolean _tmp123_;
				gboolean _tmp132_;
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp41_ = self->priv->current_predicate;
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (g_strcmp0 (_tmp41_, "http://www.w3.org/2000/01/rdf-schema#domain") == 0) {
#line 12583 "tracker-sparql-pattern.c"
					gboolean _tmp42_;
#line 1296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp42_ = self->priv->current_subject_is_var;
#line 1296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp40_ = _tmp42_;
#line 12589 "tracker-sparql-pattern.c"
				} else {
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp40_ = FALSE;
#line 12593 "tracker-sparql-pattern.c"
				}
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp43_ = _tmp40_;
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp43_) {
#line 12599 "tracker-sparql-pattern.c"
					gboolean _tmp44_;
#line 1297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp44_ = object_is_var;
#line 1297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp39_ = !_tmp44_;
#line 12605 "tracker-sparql-pattern.c"
				} else {
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp39_ = FALSE;
#line 12609 "tracker-sparql-pattern.c"
				}
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp45_ = _tmp39_;
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp45_) {
#line 12615 "tracker-sparql-pattern.c"
					const gchar* _tmp46_;
					TrackerClass* _tmp47_ = NULL;
					TrackerClass* _tmp48_;
					TrackerClass* domain;
					TrackerClass* _tmp49_;
					TrackerSparqlContext* _tmp55_;
					TrackerSparqlContext* _tmp56_;
					GHashTable* _tmp57_;
					TrackerSparqlContext* _tmp58_;
					TrackerSparqlContext* _tmp59_;
					const gchar* _tmp60_;
					TrackerSparqlVariable* _tmp61_ = NULL;
					gconstpointer _tmp62_ = NULL;
					TrackerSparqlPredicateVariable* _tmp63_;
					TrackerSparqlPredicateVariable* pv;
					TrackerSparqlPredicateVariable* _tmp64_;
					TrackerSparqlPredicateVariable* _tmp76_;
					TrackerClass* _tmp77_;
					TrackerClass* _tmp78_;
#line 1299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp46_ = object;
#line 1299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp47_ = tracker_ontologies_get_class_by_uri (_tmp46_);
#line 1299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp48_ = _g_object_ref0 (_tmp47_);
#line 1299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					domain = _tmp48_;
#line 1300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp49_ = domain;
#line 1300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp49_ == NULL) {
#line 12647 "tracker-sparql-pattern.c"
						const gchar* _tmp50_;
						gchar* _tmp51_ = NULL;
						gchar* _tmp52_;
						GError* _tmp53_;
						GError* _tmp54_;
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp50_ = object;
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp51_ = g_strdup_printf ("Unknown class `%s'", _tmp50_);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp52_ = _tmp51_;
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp53_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_CLASS, _tmp52_);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp54_ = _tmp53_;
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_free0 (_tmp52_);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_inner_error_ = _tmp54_;
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_propagate_error (error, _inner_error_);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (domain);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (subject_type);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (prop);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (table);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (db_table);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (object);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 12685 "tracker-sparql-pattern.c"
						} else {
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (domain);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (subject_type);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (prop);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_object_unref0 (table);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (db_table);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							_g_free0 (object);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.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 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							g_clear_error (&_inner_error_);
#line 1301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							return;
#line 12705 "tracker-sparql-pattern.c"
						}
					}
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp55_ = tracker_sparql_pattern_get_context (self);
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp56_ = _tmp55_;
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp57_ = _tmp56_->predicate_variable_map;
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp58_ = tracker_sparql_pattern_get_context (self);
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp59_ = _tmp58_;
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp60_ = self->priv->current_subject;
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp61_ = tracker_sparql_context_get_variable (_tmp59_, _tmp60_);
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp62_ = g_hash_table_lookup (_tmp57_, _tmp61_);
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp63_ = _g_object_ref0 ((TrackerSparqlPredicateVariable*) _tmp62_);
#line 1303 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					pv = _tmp63_;
#line 1304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp64_ = pv;
#line 1304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp64_ == NULL) {
#line 12732 "tracker-sparql-pattern.c"
						TrackerSparqlPredicateVariable* _tmp65_;
						TrackerSparqlContext* _tmp66_;
						TrackerSparqlContext* _tmp67_;
						GHashTable* _tmp68_;
						TrackerSparqlContext* _tmp69_;
						TrackerSparqlContext* _tmp70_;
						const gchar* _tmp71_;
						TrackerSparqlVariable* _tmp72_ = NULL;
						TrackerSparqlVariable* _tmp73_;
						TrackerSparqlPredicateVariable* _tmp74_;
						TrackerSparqlPredicateVariable* _tmp75_;
#line 1305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp65_ = tracker_sparql_predicate_variable_new ();
#line 1305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_g_object_unref0 (pv);
#line 1305 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						pv = _tmp65_;
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp66_ = tracker_sparql_pattern_get_context (self);
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp67_ = _tmp66_;
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp68_ = _tmp67_->predicate_variable_map;
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp69_ = tracker_sparql_pattern_get_context (self);
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp70_ = _tmp69_;
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp71_ = self->priv->current_subject;
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp72_ = tracker_sparql_context_get_variable (_tmp70_, _tmp71_);
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp73_ = _g_object_ref0 (_tmp72_);
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp74_ = pv;
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp75_ = _g_object_ref0 (_tmp74_);
#line 1306 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						g_hash_table_insert (_tmp68_, _tmp73_, _tmp75_);
#line 12772 "tracker-sparql-pattern.c"
					}
#line 1308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp76_ = pv;
#line 1308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp77_ = domain;
#line 1308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp78_ = _g_object_ref0 (_tmp77_);
#line 1308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (_tmp76_->domain);
#line 1308 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp76_->domain = _tmp78_;
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (pv);
#line 1295 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (domain);
#line 12788 "tracker-sparql-pattern.c"
				}
#line 1311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp79_ = self->priv->current_subject_is_var;
#line 1311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp79_) {
#line 12794 "tracker-sparql-pattern.c"
					TrackerSparqlContext* _tmp80_;
					TrackerSparqlContext* _tmp81_;
					const gchar* _tmp82_;
					TrackerSparqlVariable* _tmp83_ = NULL;
					TrackerSparqlVariable* _tmp84_;
					TrackerSparqlVariable* v;
					TrackerSparqlPatternTripleContext* _tmp85_;
					GHashTable* _tmp86_;
					TrackerSparqlVariable* _tmp87_;
					gconstpointer _tmp88_ = NULL;
					TrackerSparqlVariableBindingList* _tmp89_;
					TrackerSparqlVariableBindingList* list;
					gboolean _tmp90_ = FALSE;
					TrackerSparqlVariableBindingList* _tmp91_;
					gboolean _tmp94_;
#line 1313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp80_ = tracker_sparql_pattern_get_context (self);
#line 1313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp81_ = _tmp80_;
#line 1313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp82_ = self->priv->current_subject;
#line 1313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp83_ = tracker_sparql_context_get_variable (_tmp81_, _tmp82_);
#line 1313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp84_ = _g_object_ref0 (_tmp83_);
#line 1313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					v = _tmp84_;
#line 1314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp85_ = self->priv->triple_context;
#line 1314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp86_ = _tmp85_->var_bindings;
#line 1314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp87_ = v;
#line 1314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp88_ = g_hash_table_lookup (_tmp86_, _tmp87_);
#line 1314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp89_ = _g_object_ref0 ((TrackerSparqlVariableBindingList*) _tmp88_);
#line 1314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					list = _tmp89_;
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp91_ = list;
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp91_ != NULL) {
#line 12838 "tracker-sparql-pattern.c"
						TrackerSparqlVariableBindingList* _tmp92_;
						GList* _tmp93_;
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp92_ = list;
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp93_ = _tmp92_->list;
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp90_ = _tmp93_ != NULL;
#line 12847 "tracker-sparql-pattern.c"
					} else {
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp90_ = FALSE;
#line 12851 "tracker-sparql-pattern.c"
					}
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp94_ = _tmp90_;
#line 1316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					if (_tmp94_) {
#line 12857 "tracker-sparql-pattern.c"
						gboolean stop;
						TrackerProperty* _tmp95_;
						TrackerClass** _tmp96_;
						TrackerClass** _tmp97_ = NULL;
#line 1317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						stop = FALSE;
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp95_ = prop;
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
						_tmp97_ = _tmp96_ = tracker_property_get_domain_indexes (_tmp95_);
#line 12868 "tracker-sparql-pattern.c"
						{
							TrackerClass** cl_collection = NULL;
							gint cl_collection_length1 = 0;
							gint _cl_collection_size_ = 0;
							gint cl_it = 0;
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							cl_collection = _tmp97_;
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							cl_collection_length1 = _vala_array_length (_tmp96_);
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
							for (cl_it = 0; cl_it < _vala_array_length (_tmp96_); cl_it = cl_it + 1) {
#line 12880 "tracker-sparql-pattern.c"
								TrackerClass* _tmp98_;
								TrackerClass* cl = NULL;
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								_tmp98_ = _g_object_ref0 (cl_collection[cl_it]);
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
								cl = _tmp98_;
#line 12887 "tracker-sparql-pattern.c"
								{
									TrackerSparqlVariableBindingList* _tmp99_;
									GList* _tmp100_;
									gboolean _tmp109_;
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp99_ = list;
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp100_ = _tmp99_->list;
#line 12896 "tracker-sparql-pattern.c"
									{
										GList* b_collection = NULL;
										GList* b_it = NULL;
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										b_collection = _tmp100_;
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										for (b_it = b_collection; b_it != NULL; b_it = b_it->next) {
#line 12904 "tracker-sparql-pattern.c"
											TrackerSparqlVariableBinding* _tmp101_;
											TrackerSparqlVariableBinding* b = NULL;
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											_tmp101_ = _g_object_ref0 ((TrackerSparqlVariableBinding*) b_it->data);
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
											b = _tmp101_;
#line 12911 "tracker-sparql-pattern.c"
											{
												TrackerSparqlVariableBinding* _tmp102_;
												TrackerClass* _tmp103_;
												TrackerClass* _tmp104_;
#line 1320 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_tmp102_ = b;
#line 1320 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_tmp103_ = _tmp102_->type;
#line 1320 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_tmp104_ = cl;
#line 1320 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												if (_tmp103_ == _tmp104_) {
#line 12924 "tracker-sparql-pattern.c"
													TrackerClass* _tmp105_;
													const gchar* _tmp106_;
													const gchar* _tmp107_;
													gchar* _tmp108_;
#line 1321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_tmp105_ = cl;
#line 1321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_tmp106_ = tracker_class_get_name (_tmp105_);
#line 1321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_tmp107_ = _tmp106_;
#line 1321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_tmp108_ = g_strdup (_tmp107_);
#line 1321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_g_free0 (db_table);
#line 1321 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													db_table = _tmp108_;
#line 1322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													stop = TRUE;
#line 1323 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													_g_object_unref0 (b);
#line 1323 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
													break;
#line 12947 "tracker-sparql-pattern.c"
												}
#line 1319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
												_g_object_unref0 (b);
#line 12951 "tracker-sparql-pattern.c"
											}
										}
									}
#line 1326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_tmp109_ = stop;
#line 1326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									if (_tmp109_) {
#line 1327 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										_g_object_unref0 (cl);
#line 1327 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
										break;
#line 12963 "tracker-sparql-pattern.c"
									}
#line 1318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
									_g_object_unref0 (cl);
#line 12967 "tracker-sparql-pattern.c"
								}
							}
						}
					}
#line 1311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (list);
#line 1311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (v);
#line 12976 "tracker-sparql-pattern.c"
				}
#line 1333 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp110_ = db_table;
#line 1333 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp110_ == NULL) {
#line 12982 "tracker-sparql-pattern.c"
					TrackerProperty* _tmp111_;
					const gchar* _tmp112_;
					const gchar* _tmp113_;
					gchar* _tmp114_;
#line 1334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp111_ = prop;
#line 1334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp112_ = tracker_property_get_table_name (_tmp111_);
#line 1334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp113_ = _tmp112_;
#line 1334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp114_ = g_strdup (_tmp113_);
#line 1334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (db_table);
#line 1334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					db_table = _tmp114_;
#line 12999 "tracker-sparql-pattern.c"
				}
#line 1336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp115_ = prop;
#line 1336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp116_ = tracker_property_get_multiple_values (_tmp115_);
#line 1336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp117_ = _tmp116_;
#line 1336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp117_) {
#line 1339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					share_table = FALSE;
#line 13011 "tracker-sparql-pattern.c"
				}
#line 1341 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp118_ = prop;
#line 1341 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp119_ = tracker_property_get_domain (_tmp118_);
#line 1341 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp120_ = _tmp119_;
#line 1341 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp121_ = _g_object_ref0 (_tmp120_);
#line 1341 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (subject_type);
#line 1341 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				subject_type = _tmp121_;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp123_ = in_simple_optional;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp123_) {
#line 13029 "tracker-sparql-pattern.c"
					TrackerSparqlContext* _tmp124_;
					TrackerSparqlContext* _tmp125_;
					GHashTable* _tmp126_;
					TrackerSparqlContext* _tmp127_;
					TrackerSparqlContext* _tmp128_;
					const gchar* _tmp129_;
					TrackerSparqlVariable* _tmp130_ = NULL;
					gconstpointer _tmp131_ = NULL;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp124_ = tracker_sparql_pattern_get_context (self);
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp125_ = _tmp124_;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp126_ = _tmp125_->var_set;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp127_ = tracker_sparql_pattern_get_context (self);
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp128_ = _tmp127_;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp129_ = self->priv->current_subject;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp130_ = tracker_sparql_context_get_variable (_tmp128_, _tmp129_);
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp131_ = g_hash_table_lookup (_tmp126_, _tmp130_);
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp122_ = GPOINTER_TO_INT (_tmp131_) == 0;
#line 13056 "tracker-sparql-pattern.c"
				} else {
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp122_ = FALSE;
#line 13060 "tracker-sparql-pattern.c"
				}
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp132_ = _tmp122_;
#line 1343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp132_) {
#line 13066 "tracker-sparql-pattern.c"
					TrackerSparqlVariableBinding* _tmp133_;
					TrackerSparqlVariableBinding* binding;
					TrackerSparqlVariableBinding* _tmp134_;
					TrackerSparqlVariableBinding* _tmp135_;
					TrackerSparqlContext* _tmp136_;
					TrackerSparqlContext* _tmp137_;
					const gchar* _tmp138_;
					TrackerSparqlVariable* _tmp139_ = NULL;
					TrackerSparqlPatternTripleContext* _tmp140_;
					GHashTable* _tmp141_;
					TrackerSparqlVariableBinding* _tmp142_;
					TrackerSparqlVariable* _tmp143_;
					gconstpointer _tmp144_ = NULL;
					TrackerSparqlVariableBindingList* _tmp145_;
					TrackerSparqlVariableBindingList* binding_list;
					TrackerSparqlPatternTripleContext* _tmp146_;
					TrackerSparqlVariableBinding* _tmp147_;
					TrackerSparqlVariable* _tmp148_;
					TrackerSparqlVariable* _tmp149_;
					TrackerSparqlPatternTripleContext* _tmp150_;
					GHashTable* _tmp151_;
					TrackerSparqlVariableBinding* _tmp152_;
					TrackerSparqlVariable* _tmp153_;
					TrackerSparqlVariable* _tmp154_;
					TrackerSparqlVariableBindingList* _tmp155_;
					TrackerSparqlVariableBindingList* _tmp156_;
					TrackerSparqlPatternTripleContext* _tmp157_;
					GHashTable* _tmp158_;
					TrackerSparqlContext* _tmp159_;
					TrackerSparqlContext* _tmp160_;
					const gchar* _tmp161_;
					TrackerSparqlVariable* _tmp162_ = NULL;
					gconstpointer _tmp163_ = NULL;
					GList* _tmp164_;
					gconstpointer _tmp165_;
					TrackerSparqlVariableBinding* _tmp166_;
					TrackerSparqlVariableBinding* object_binding;
					GString* _tmp167_;
					const gchar* _tmp168_;
					TrackerProperty* _tmp169_;
					const gchar* _tmp170_;
					const gchar* _tmp171_;
					TrackerSparqlVariableBinding* _tmp172_;
					const gchar* _tmp173_;
					const gchar* _tmp174_;
					TrackerSparqlVariableBinding* _tmp175_;
					TrackerSparqlVariable* _tmp176_;
					const gchar* _tmp177_;
					const gchar* _tmp178_;
					TrackerSparqlContext* _tmp179_;
					TrackerSparqlContext* _tmp180_;
					GHashTable* _tmp181_;
					TrackerSparqlVariableBinding* _tmp182_;
					TrackerSparqlVariable* _tmp183_;
					TrackerSparqlVariable* _tmp184_;
					TrackerSparqlVariableBindingList* _tmp185_;
					TrackerSparqlVariableBinding* _tmp186_;
					TrackerSparqlVariableBinding* _tmp187_;
					TrackerSparqlVariableBinding* _tmp188_;
					TrackerSparqlVariable* _tmp189_;
					TrackerSparqlVariableBinding* _tmp190_;
					TrackerSparqlVariableBinding* _tmp191_;
					TrackerSparqlVariable* _tmp192_;
					TrackerSparqlVariableBinding* _tmp193_;
					TrackerSparqlVariableBinding* _tmp194_;
#line 1346 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp133_ = tracker_sparql_variable_binding_new ();
#line 1346 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					binding = _tmp133_;
#line 1347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp134_ = binding;
#line 1347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp134_)->data_type = TRACKER_PROPERTY_TYPE_RESOURCE;
#line 1348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp135_ = binding;
#line 1348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp136_ = tracker_sparql_pattern_get_context (self);
#line 1348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp137_ = _tmp136_;
#line 1348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp138_ = self->priv->current_subject;
#line 1348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp139_ = tracker_sparql_context_get_variable (_tmp137_, _tmp138_);
#line 1348 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp135_->variable = _tmp139_;
#line 1350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp140_ = self->priv->triple_context;
#line 1350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp141_ = _tmp140_->var_bindings;
#line 1350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp142_ = binding;
#line 1350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp143_ = _tmp142_->variable;
#line 1350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp144_ = g_hash_table_lookup (_tmp141_, _tmp143_);
#line 1350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_assert (((TrackerSparqlVariableBindingList*) _tmp144_) == NULL);
#line 1351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp145_ = tracker_sparql_variable_binding_list_new ();
#line 1351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					binding_list = _tmp145_;
#line 1352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp146_ = self->priv->triple_context;
#line 1352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp147_ = binding;
#line 1352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp148_ = _tmp147_->variable;
#line 1352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp149_ = _g_object_ref0 (_tmp148_);
#line 1352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp146_->variables = g_list_append (_tmp146_->variables, _tmp149_);
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp150_ = self->priv->triple_context;
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp151_ = _tmp150_->var_bindings;
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp152_ = binding;
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp153_ = _tmp152_->variable;
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp154_ = _g_object_ref0 (_tmp153_);
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp155_ = binding_list;
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp156_ = _g_object_ref0 (_tmp155_);
#line 1353 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_hash_table_insert (_tmp151_, _tmp154_, _tmp156_);
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp157_ = self->priv->triple_context;
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp158_ = _tmp157_->var_bindings;
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp159_ = tracker_sparql_pattern_get_context (self);
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp160_ = _tmp159_;
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp161_ = object;
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp162_ = tracker_sparql_context_get_variable (_tmp160_, _tmp161_);
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp163_ = g_hash_table_lookup (_tmp158_, _tmp162_);
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp164_ = ((TrackerSparqlVariableBindingList*) _tmp163_)->list;
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp165_ = _tmp164_->data;
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp166_ = _g_object_ref0 ((TrackerSparqlVariableBinding*) _tmp165_);
#line 1356 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					object_binding = _tmp166_;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp167_ = sql;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp168_ = db_table;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp169_ = prop;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp170_ = tracker_property_get_name (_tmp169_);
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp171_ = _tmp170_;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp172_ = object_binding;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp173_ = tracker_sparql_data_binding_get_sql_expression ((TrackerSparqlDataBinding*) _tmp172_);
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp174_ = _tmp173_;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp175_ = binding;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp176_ = _tmp175_->variable;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp177_ = tracker_sparql_variable_get_sql_expression (_tmp176_);
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp178_ = _tmp177_;
#line 1358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_string_append_printf (_tmp167_, "(SELECT ID FROM \"%s\" WHERE \"%s\" = %s) AS %s, ", _tmp168_, _tmp171_, _tmp174_, _tmp178_);
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp179_ = tracker_sparql_pattern_get_context (self);
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp180_ = _tmp179_;
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp181_ = _tmp180_->var_set;
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp182_ = binding;
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp183_ = _tmp182_->variable;
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp184_ = _g_object_ref0 (_tmp183_);
#line 1364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_hash_table_insert (_tmp181_, _tmp184_, GINT_TO_POINTER ((gint) TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL));
#line 1365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp185_ = binding_list;
#line 1365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp186_ = binding;
#line 1365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp187_ = _g_object_ref0 (_tmp186_);
#line 1365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp185_->list = g_list_append (_tmp185_->list, _tmp187_);
#line 1367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp188_ = binding;
#line 1367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp189_ = _tmp188_->variable;
#line 1367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp190_ = _tmp189_->binding;
#line 1367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					g_assert (_tmp190_ == NULL);
#line 1368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp191_ = binding;
#line 1368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp192_ = _tmp191_->variable;
#line 1368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp193_ = binding;
#line 1368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp194_ = _g_object_ref0 (_tmp193_);
#line 1368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (_tmp192_->binding);
#line 1368 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp192_->binding = _tmp194_;
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (object_binding);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (binding_list);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (binding);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (subject_type);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (prop);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_object_unref0 (table);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (db_table);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (object);
#line 1370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					return;
#line 13302 "tracker-sparql-pattern.c"
				}
			}
		}
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp195_ = self->priv->current_subject;
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp196_ = db_table;
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp197_ = share_table;
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp199_ = tracker_sparql_pattern_get_table (self, _tmp195_, _tmp196_, _tmp197_, &_tmp198_);
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		newtable = _tmp198_;
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (table);
#line 1373 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		table = _tmp199_;
#line 13320 "tracker-sparql-pattern.c"
	} else {
		TrackerSparqlDataTable* _tmp200_;
		TrackerSparqlDataTable* _tmp201_;
		TrackerSparqlContext* _tmp202_;
		TrackerSparqlContext* _tmp203_;
		GHashTable* _tmp204_;
		TrackerSparqlContext* _tmp205_;
		TrackerSparqlContext* _tmp206_;
		const gchar* _tmp207_;
		TrackerSparqlVariable* _tmp208_ = NULL;
		gconstpointer _tmp209_ = NULL;
		TrackerSparqlPredicateVariable* _tmp210_;
		TrackerSparqlDataTable* _tmp211_;
		TrackerSparqlPredicateVariable* _tmp212_;
		gboolean _tmp226_;
		gboolean _tmp231_;
		const gchar* _tmp236_;
		TrackerSparqlDataTable* _tmp239_;
		const gchar* _tmp240_;
		gint _tmp241_;
		gint _tmp242_;
		gchar* _tmp243_ = NULL;
		gchar* _tmp244_;
		gchar* _tmp245_;
		TrackerSparqlPatternTripleContext* _tmp246_;
		TrackerSparqlDataTable* _tmp247_;
		TrackerSparqlDataTable* _tmp248_;
		TrackerSparqlVariableBinding* _tmp249_;
		TrackerSparqlVariableBinding* binding;
		TrackerSparqlVariableBinding* _tmp250_;
		TrackerSparqlVariableBinding* _tmp251_;
		TrackerSparqlContext* _tmp252_;
		TrackerSparqlContext* _tmp253_;
		const gchar* _tmp254_;
		TrackerSparqlVariable* _tmp255_ = NULL;
		TrackerSparqlVariableBinding* _tmp256_;
		TrackerSparqlDataTable* _tmp257_;
		TrackerSparqlDataTable* _tmp258_;
		TrackerSparqlVariableBinding* _tmp259_;
		gchar* _tmp260_;
		GString* _tmp261_;
		TrackerSparqlVariableBinding* _tmp262_;
#line 1376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		newtable = TRUE;
#line 1377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp200_ = tracker_sparql_data_table_new ();
#line 1377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (table);
#line 1377 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		table = _tmp200_;
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp201_ = table;
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp202_ = tracker_sparql_pattern_get_context (self);
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp203_ = _tmp202_;
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp204_ = _tmp203_->predicate_variable_map;
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp205_ = tracker_sparql_pattern_get_context (self);
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp206_ = _tmp205_;
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp207_ = self->priv->current_predicate;
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp208_ = tracker_sparql_context_get_variable (_tmp206_, _tmp207_);
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp209_ = g_hash_table_lookup (_tmp204_, _tmp208_);
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp210_ = _g_object_ref0 ((TrackerSparqlPredicateVariable*) _tmp209_);
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (_tmp201_->predicate_variable);
#line 1378 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp201_->predicate_variable = _tmp210_;
#line 1379 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp211_ = table;
#line 1379 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp212_ = _tmp211_->predicate_variable;
#line 1379 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp212_ == NULL) {
#line 13401 "tracker-sparql-pattern.c"
			TrackerSparqlDataTable* _tmp213_;
			TrackerSparqlPredicateVariable* _tmp214_;
			TrackerSparqlContext* _tmp215_;
			TrackerSparqlContext* _tmp216_;
			GHashTable* _tmp217_;
			TrackerSparqlContext* _tmp218_;
			TrackerSparqlContext* _tmp219_;
			const gchar* _tmp220_;
			TrackerSparqlVariable* _tmp221_ = NULL;
			TrackerSparqlVariable* _tmp222_;
			TrackerSparqlDataTable* _tmp223_;
			TrackerSparqlPredicateVariable* _tmp224_;
			TrackerSparqlPredicateVariable* _tmp225_;
#line 1380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp213_ = table;
#line 1380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp214_ = tracker_sparql_predicate_variable_new ();
#line 1380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (_tmp213_->predicate_variable);
#line 1380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp213_->predicate_variable = _tmp214_;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp215_ = tracker_sparql_pattern_get_context (self);
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp216_ = _tmp215_;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp217_ = _tmp216_->predicate_variable_map;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp218_ = tracker_sparql_pattern_get_context (self);
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp219_ = _tmp218_;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp220_ = self->priv->current_predicate;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp221_ = tracker_sparql_context_get_variable (_tmp219_, _tmp220_);
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp222_ = _g_object_ref0 (_tmp221_);
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp223_ = table;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp224_ = _tmp223_->predicate_variable;
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp225_ = _g_object_ref0 (_tmp224_);
#line 1381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			g_hash_table_insert (_tmp217_, _tmp222_, _tmp225_);
#line 13447 "tracker-sparql-pattern.c"
		}
#line 1383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp226_ = self->priv->current_subject_is_var;
#line 1383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp226_) {
#line 13453 "tracker-sparql-pattern.c"
			TrackerSparqlDataTable* _tmp227_;
			TrackerSparqlPredicateVariable* _tmp228_;
			const gchar* _tmp229_;
			gchar* _tmp230_;
#line 1385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp227_ = table;
#line 1385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp228_ = _tmp227_->predicate_variable;
#line 1385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp229_ = self->priv->current_subject;
#line 1385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp230_ = g_strdup (_tmp229_);
#line 1385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp228_->subject);
#line 1385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp228_->subject = _tmp230_;
#line 13470 "tracker-sparql-pattern.c"
		}
#line 1387 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp231_ = object_is_var;
#line 1387 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (!_tmp231_) {
#line 13476 "tracker-sparql-pattern.c"
			TrackerSparqlDataTable* _tmp232_;
			TrackerSparqlPredicateVariable* _tmp233_;
			const gchar* _tmp234_;
			gchar* _tmp235_;
#line 1389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp232_ = table;
#line 1389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp233_ = _tmp232_->predicate_variable;
#line 1389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp234_ = object;
#line 1389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp235_ = g_strdup (_tmp234_);
#line 1389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp233_->object);
#line 1389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp233_->object = _tmp235_;
#line 13493 "tracker-sparql-pattern.c"
		}
#line 1391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp236_ = self->current_graph;
#line 1391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp236_ != NULL) {
#line 13499 "tracker-sparql-pattern.c"
			TrackerSparqlDataTable* _tmp237_;
			TrackerSparqlPredicateVariable* _tmp238_;
#line 1392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp237_ = table;
#line 1392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp238_ = _tmp237_->predicate_variable;
#line 1392 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp238_->return_graph = TRUE;
#line 13508 "tracker-sparql-pattern.c"
		}
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp239_ = table;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp240_ = self->priv->current_predicate;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp241_ = self->priv->counter;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->counter = _tmp241_ + 1;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp242_ = self->priv->counter;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp243_ = g_strdup_printf ("%i", _tmp242_);
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp244_ = _tmp243_;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp245_ = g_strconcat (_tmp240_, _tmp244_, NULL);
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp239_->sql_query_tablename);
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp239_->sql_query_tablename = _tmp245_;
#line 1394 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp244_);
#line 1395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp246_ = self->priv->triple_context;
#line 1395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp247_ = table;
#line 1395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp248_ = _g_object_ref0 (_tmp247_);
#line 1395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp246_->tables = g_list_append (_tmp246_->tables, _tmp248_);
#line 1398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp249_ = tracker_sparql_variable_binding_new ();
#line 1398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		binding = _tmp249_;
#line 1399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp250_ = binding;
#line 1399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		((TrackerSparqlDataBinding*) _tmp250_)->data_type = TRACKER_PROPERTY_TYPE_RESOURCE;
#line 1400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp251_ = binding;
#line 1400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp252_ = tracker_sparql_pattern_get_context (self);
#line 1400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp253_ = _tmp252_;
#line 1400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp254_ = self->priv->current_predicate;
#line 1400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp255_ = tracker_sparql_context_get_variable (_tmp253_, _tmp254_);
#line 1400 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp251_->variable = _tmp255_;
#line 1401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp256_ = binding;
#line 1401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp257_ = table;
#line 1401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp258_ = _g_object_ref0 (_tmp257_);
#line 1401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp256_)->table);
#line 1401 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		((TrackerSparqlDataBinding*) _tmp256_)->table = _tmp258_;
#line 1402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp259_ = binding;
#line 1402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp260_ = g_strdup ("predicate");
#line 1402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (((TrackerSparqlDataBinding*) _tmp259_)->sql_db_column_name);
#line 1402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		((TrackerSparqlDataBinding*) _tmp259_)->sql_db_column_name = _tmp260_;
#line 1404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp261_ = sql;
#line 1404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp262_ = binding;
#line 1404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		tracker_sparql_pattern_add_variable_binding (self, _tmp261_, _tmp262_, TRACKER_SPARQL_VARIABLE_STATE_BOUND);
#line 1271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (binding);
#line 13586 "tracker-sparql-pattern.c"
	}
#line 1407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp263_ = newtable;
#line 1407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp263_) {
#line 13592 "tracker-sparql-pattern.c"
		gboolean _tmp264_;
#line 1408 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp264_ = self->priv->current_subject_is_var;
#line 1408 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp264_) {
#line 13598 "tracker-sparql-pattern.c"
			TrackerSparqlVariableBinding* _tmp265_;
			TrackerSparqlVariableBinding* binding;
			TrackerSparqlVariableBinding* _tmp266_;
			TrackerSparqlVariableBinding* _tmp267_;
			TrackerSparqlContext* _tmp268_;
			TrackerSparqlContext* _tmp269_;
			const gchar* _tmp270_;
			TrackerSparqlVariable* _tmp271_ = NULL;
			TrackerSparqlVariableBinding* _tmp272_;
			TrackerSparqlDataTable* _tmp273_;
			TrackerSparqlDataTable* _tmp274_;
			TrackerSparqlVariableBinding* _tmp275_;
			TrackerClass* _tmp276_;
			TrackerClass* _tmp277_;
			gboolean _tmp278_;
			GString* _tmp283_;
			TrackerSparqlVariableBinding* _tmp284_;
#line 1409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp265_ = tracker_sparql_variable_binding_new ();
#line 1409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp265_;
#line 1410 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp266_ = binding;
#line 1410 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp266_)->data_type = TRACKER_PROPERTY_TYPE_RESOURCE;
#line 1411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp267_ = binding;
#line 1411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp268_ = tracker_sparql_pattern_get_context (self);
#line 1411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp269_ = _tmp268_;
#line 1411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp270_ = self->priv->current_subject;
#line 1411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp271_ = tracker_sparql_context_get_variable (_tmp269_, _tmp270_);
#line 1411 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp267_->variable = _tmp271_;
#line 1412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp272_ = binding;
#line 1412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp273_ = table;
#line 1412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp274_ = _g_object_ref0 (_tmp273_);
#line 1412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp272_)->table);
#line 1412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp272_)->table = _tmp274_;
#line 1413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp275_ = binding;
#line 1413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp276_ = subject_type;
#line 1413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp277_ = _g_object_ref0 (_tmp276_);
#line 1413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (_tmp275_->type);
#line 1413 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp275_->type = _tmp277_;
#line 1414 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp278_ = is_fts_match;
#line 1414 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp278_) {
#line 13660 "tracker-sparql-pattern.c"
				TrackerSparqlVariableBinding* _tmp279_;
				gchar* _tmp280_;
#line 1415 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp279_ = binding;
#line 1415 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp280_ = g_strdup ("rowid");
#line 1415 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (((TrackerSparqlDataBinding*) _tmp279_)->sql_db_column_name);
#line 1415 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp279_)->sql_db_column_name = _tmp280_;
#line 13671 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlVariableBinding* _tmp281_;
				gchar* _tmp282_;
#line 1417 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp281_ = binding;
#line 1417 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp282_ = g_strdup ("ID");
#line 1417 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (((TrackerSparqlDataBinding*) _tmp281_)->sql_db_column_name);
#line 1417 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp281_)->sql_db_column_name = _tmp282_;
#line 13683 "tracker-sparql-pattern.c"
			}
#line 1420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp283_ = sql;
#line 1420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp284_ = binding;
#line 1420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_add_variable_binding (self, _tmp283_, _tmp284_, TRACKER_SPARQL_VARIABLE_STATE_BOUND);
#line 1408 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (binding);
#line 13693 "tracker-sparql-pattern.c"
		} else {
			TrackerSparqlLiteralBinding* _tmp285_;
			TrackerSparqlLiteralBinding* binding;
			TrackerSparqlLiteralBinding* _tmp286_;
			TrackerSparqlLiteralBinding* _tmp287_;
			const gchar* _tmp288_;
			gchar* _tmp289_;
			TrackerSparqlLiteralBinding* _tmp290_;
			TrackerSparqlDataTable* _tmp291_;
			TrackerSparqlDataTable* _tmp292_;
			TrackerSparqlLiteralBinding* _tmp293_;
			gchar* _tmp294_;
			TrackerSparqlPatternTripleContext* _tmp295_;
			TrackerSparqlLiteralBinding* _tmp296_;
			TrackerSparqlLiteralBinding* _tmp297_;
#line 1422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp285_ = tracker_sparql_literal_binding_new ();
#line 1422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp285_;
#line 1423 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp286_ = binding;
#line 1423 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp286_)->data_type = TRACKER_PROPERTY_TYPE_RESOURCE;
#line 1424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp287_ = binding;
#line 1424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp288_ = self->priv->current_subject;
#line 1424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp289_ = g_strdup (_tmp288_);
#line 1424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (_tmp287_->literal);
#line 1424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp287_->literal = _tmp289_;
#line 1426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp290_ = binding;
#line 1426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp291_ = table;
#line 1426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp292_ = _g_object_ref0 (_tmp291_);
#line 1426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp290_)->table);
#line 1426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp290_)->table = _tmp292_;
#line 1427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp293_ = binding;
#line 1427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp294_ = g_strdup ("ID");
#line 1427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_free0 (((TrackerSparqlDataBinding*) _tmp293_)->sql_db_column_name);
#line 1427 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp293_)->sql_db_column_name = _tmp294_;
#line 1428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp295_ = self->priv->triple_context;
#line 1428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp296_ = binding;
#line 1428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp297_ = _g_object_ref0 (_tmp296_);
#line 1428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp295_->bindings = g_list_append (_tmp295_->bindings, _tmp297_);
#line 1408 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (binding);
#line 13755 "tracker-sparql-pattern.c"
		}
	}
#line 1432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp298_ = rdftype;
#line 1432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (!_tmp298_) {
#line 13762 "tracker-sparql-pattern.c"
		gboolean _tmp299_;
		const gchar* _tmp394_;
#line 1433 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp299_ = object_is_var;
#line 1433 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp299_) {
#line 13769 "tracker-sparql-pattern.c"
			TrackerSparqlVariableBinding* _tmp300_;
			TrackerSparqlVariableBinding* binding;
			TrackerSparqlVariableBinding* _tmp301_;
			TrackerSparqlContext* _tmp302_;
			TrackerSparqlContext* _tmp303_;
			const gchar* _tmp304_;
			TrackerSparqlVariable* _tmp305_ = NULL;
			TrackerSparqlVariableBinding* _tmp306_;
			TrackerSparqlDataTable* _tmp307_;
			TrackerSparqlDataTable* _tmp308_;
			TrackerProperty* _tmp309_;
			TrackerSparqlVariableState state = 0;
			gboolean _tmp334_;
			GString* _tmp335_;
			TrackerSparqlVariableBinding* _tmp336_;
			TrackerSparqlVariableState _tmp337_;
#line 1434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp300_ = tracker_sparql_variable_binding_new ();
#line 1434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			binding = _tmp300_;
#line 1435 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp301_ = binding;
#line 1435 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp302_ = tracker_sparql_pattern_get_context (self);
#line 1435 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp303_ = _tmp302_;
#line 1435 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp304_ = object;
#line 1435 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp305_ = tracker_sparql_context_get_variable (_tmp303_, _tmp304_);
#line 1435 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp301_->variable = _tmp305_;
#line 1436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp306_ = binding;
#line 1436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp307_ = table;
#line 1436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp308_ = _g_object_ref0 (_tmp307_);
#line 1436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp306_)->table);
#line 1436 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			((TrackerSparqlDataBinding*) _tmp306_)->table = _tmp308_;
#line 1437 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp309_ = prop;
#line 1437 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp309_ != NULL) {
#line 13816 "tracker-sparql-pattern.c"
				TrackerSparqlVariableBinding* _tmp310_;
				TrackerProperty* _tmp311_;
				TrackerClass* _tmp312_;
				TrackerClass* _tmp313_;
				TrackerClass* _tmp314_;
				TrackerSparqlVariableBinding* _tmp315_;
				TrackerProperty* _tmp316_;
				TrackerPropertyType _tmp317_;
				TrackerPropertyType _tmp318_;
				TrackerSparqlVariableBinding* _tmp319_;
				TrackerProperty* _tmp320_;
				const gchar* _tmp321_;
				const gchar* _tmp322_;
				gchar* _tmp323_;
				TrackerProperty* _tmp324_;
				gboolean _tmp325_;
				gboolean _tmp326_;
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp310_ = binding;
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp311_ = prop;
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp312_ = tracker_property_get_range (_tmp311_);
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp313_ = _tmp312_;
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp314_ = _g_object_ref0 (_tmp313_);
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (_tmp310_->type);
#line 1439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp310_->type = _tmp314_;
#line 1441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp315_ = binding;
#line 1441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp316_ = prop;
#line 1441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp317_ = tracker_property_get_data_type (_tmp316_);
#line 1441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp318_ = _tmp317_;
#line 1441 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp315_)->data_type = _tmp318_;
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp319_ = binding;
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp320_ = prop;
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp321_ = tracker_property_get_name (_tmp320_);
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp322_ = _tmp321_;
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp323_ = g_strdup (_tmp322_);
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (((TrackerSparqlDataBinding*) _tmp319_)->sql_db_column_name);
#line 1442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp319_)->sql_db_column_name = _tmp323_;
#line 1443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp324_ = prop;
#line 1443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp325_ = tracker_property_get_multiple_values (_tmp324_);
#line 1443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp326_ = _tmp325_;
#line 1443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (!_tmp326_) {
#line 13880 "tracker-sparql-pattern.c"
					TrackerSparqlVariableBinding* _tmp327_;
					TrackerSparqlVariableBinding* _tmp328_;
					gboolean _tmp329_;
#line 1446 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp327_ = binding;
#line 1446 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp327_->maybe_null = TRUE;
#line 1447 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp328_ = binding;
#line 1447 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp329_ = in_simple_optional;
#line 1447 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp328_->in_simple_optional = _tmp329_;
#line 13894 "tracker-sparql-pattern.c"
				}
			} else {
				TrackerSparqlVariableBinding* _tmp330_;
				TrackerSparqlVariableBinding* _tmp331_;
				gchar* _tmp332_;
				TrackerSparqlVariableBinding* _tmp333_;
#line 1451 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp330_ = binding;
#line 1451 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp330_)->data_type = TRACKER_PROPERTY_TYPE_STRING;
#line 1452 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp331_ = binding;
#line 1452 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp332_ = g_strdup ("object");
#line 1452 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (((TrackerSparqlDataBinding*) _tmp331_)->sql_db_column_name);
#line 1452 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp331_)->sql_db_column_name = _tmp332_;
#line 1453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp333_ = binding;
#line 1453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp333_->maybe_null = TRUE;
#line 13917 "tracker-sparql-pattern.c"
			}
#line 1457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp334_ = in_simple_optional;
#line 1457 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp334_) {
#line 1458 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				state = TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL;
#line 13925 "tracker-sparql-pattern.c"
			} else {
#line 1460 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				state = TRACKER_SPARQL_VARIABLE_STATE_BOUND;
#line 13929 "tracker-sparql-pattern.c"
			}
#line 1463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp335_ = sql;
#line 1463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp336_ = binding;
#line 1463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp337_ = state;
#line 1463 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			tracker_sparql_pattern_add_variable_binding (self, _tmp335_, _tmp336_, _tmp337_);
#line 1433 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_g_object_unref0 (binding);
#line 13941 "tracker-sparql-pattern.c"
		} else {
			gboolean _tmp338_;
#line 1464 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp338_ = is_fts_match;
#line 1464 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp338_) {
#line 13948 "tracker-sparql-pattern.c"
				TrackerSparqlLiteralBinding* _tmp339_;
				TrackerSparqlLiteralBinding* binding;
				TrackerSparqlLiteralBinding* _tmp340_;
				TrackerSparqlLiteralBinding* _tmp341_;
				const gchar* _tmp342_;
				gchar* _tmp343_;
				TrackerSparqlLiteralBinding* _tmp344_;
				TrackerSparqlDataTable* _tmp345_;
				TrackerSparqlDataTable* _tmp346_;
				TrackerSparqlLiteralBinding* _tmp347_;
				gchar* _tmp348_;
				TrackerSparqlPatternTripleContext* _tmp349_;
				TrackerSparqlLiteralBinding* _tmp350_;
				TrackerSparqlLiteralBinding* _tmp351_;
				GString* _tmp352_;
				TrackerSparqlLiteralBinding* _tmp353_;
				TrackerSparqlDataTable* _tmp354_;
				const gchar* _tmp355_;
				TrackerSparqlContext* _tmp356_;
				TrackerSparqlContext* _tmp357_;
				const gchar* _tmp358_;
				TrackerSparqlVariable* _tmp359_ = NULL;
				const gchar* _tmp360_;
				const gchar* _tmp361_;
				GString* _tmp362_;
				TrackerSparqlLiteralBinding* _tmp363_;
				TrackerSparqlDataTable* _tmp364_;
				const gchar* _tmp365_;
				TrackerSparqlContext* _tmp366_;
				TrackerSparqlContext* _tmp367_;
				const gchar* _tmp368_;
				TrackerSparqlVariable* _tmp369_ = NULL;
				const gchar* _tmp370_;
				const gchar* _tmp371_;
#line 1465 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp339_ = tracker_sparql_literal_binding_new ();
#line 1465 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding = _tmp339_;
#line 1466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp340_ = binding;
#line 1466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp340_->is_fts_match = TRUE;
#line 1467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp341_ = binding;
#line 1467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp342_ = object;
#line 1467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp343_ = g_strdup (_tmp342_);
#line 1467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp341_->literal);
#line 1467 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp341_->literal = _tmp343_;
#line 1469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp344_ = binding;
#line 1469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp345_ = table;
#line 1469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp346_ = _g_object_ref0 (_tmp345_);
#line 1469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp344_)->table);
#line 1469 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp344_)->table = _tmp346_;
#line 1470 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp347_ = binding;
#line 1470 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp348_ = g_strdup ("fts");
#line 1470 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (((TrackerSparqlDataBinding*) _tmp347_)->sql_db_column_name);
#line 1470 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp347_)->sql_db_column_name = _tmp348_;
#line 1471 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp349_ = self->priv->triple_context;
#line 1471 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp350_ = binding;
#line 1471 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp351_ = _g_object_ref0 (_tmp350_);
#line 1471 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp349_->bindings = g_list_append (_tmp349_->bindings, _tmp351_);
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp352_ = sql;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp353_ = binding;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp354_ = ((TrackerSparqlDataBinding*) _tmp353_)->table;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp355_ = _tmp354_->sql_query_tablename;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp356_ = tracker_sparql_pattern_get_context (self);
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp357_ = _tmp356_;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp358_ = self->priv->current_subject;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp359_ = tracker_sparql_context_get_variable (_tmp357_, _tmp358_);
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp360_ = tracker_sparql_variable_get_name (_tmp359_);
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp361_ = _tmp360_;
#line 1473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append_printf (_tmp352_, "rank(\"%s\".\"fts\") AS \"%s_u_rank\", ", _tmp355_, _tmp361_);
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp362_ = sql;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp363_ = binding;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp364_ = ((TrackerSparqlDataBinding*) _tmp363_)->table;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp365_ = _tmp364_->sql_query_tablename;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp366_ = tracker_sparql_pattern_get_context (self);
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp367_ = _tmp366_;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp368_ = self->priv->current_subject;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp369_ = tracker_sparql_context_get_variable (_tmp367_, _tmp368_);
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp370_ = tracker_sparql_variable_get_name (_tmp369_);
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp371_ = _tmp370_;
#line 1476 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				g_string_append_printf (_tmp362_, "offsets(\"%s\".\"fts\") AS \"%s_u_offsets\", ", _tmp365_, _tmp371_);
#line 1464 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 14073 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlLiteralBinding* _tmp372_;
				TrackerSparqlLiteralBinding* binding;
				TrackerSparqlLiteralBinding* _tmp373_;
				const gchar* _tmp374_;
				gchar* _tmp375_;
				TrackerSparqlLiteralBinding* _tmp376_;
				TrackerSparqlDataTable* _tmp377_;
				TrackerSparqlDataTable* _tmp378_;
				TrackerProperty* _tmp379_;
				TrackerSparqlPatternTripleContext* _tmp391_;
				TrackerSparqlLiteralBinding* _tmp392_;
				TrackerSparqlLiteralBinding* _tmp393_;
#line 1480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp372_ = tracker_sparql_literal_binding_new ();
#line 1480 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding = _tmp372_;
#line 1481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp373_ = binding;
#line 1481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp374_ = object;
#line 1481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp375_ = g_strdup (_tmp374_);
#line 1481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp373_->literal);
#line 1481 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp373_->literal = _tmp375_;
#line 1483 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp376_ = binding;
#line 1483 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp377_ = table;
#line 1483 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp378_ = _g_object_ref0 (_tmp377_);
#line 1483 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp376_)->table);
#line 1483 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp376_)->table = _tmp378_;
#line 1484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp379_ = prop;
#line 1484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp379_ != NULL) {
#line 14115 "tracker-sparql-pattern.c"
					TrackerSparqlLiteralBinding* _tmp380_;
					TrackerProperty* _tmp381_;
					TrackerPropertyType _tmp382_;
					TrackerPropertyType _tmp383_;
					TrackerSparqlLiteralBinding* _tmp384_;
					TrackerProperty* _tmp385_;
					const gchar* _tmp386_;
					const gchar* _tmp387_;
					gchar* _tmp388_;
#line 1485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp380_ = binding;
#line 1485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp381_ = prop;
#line 1485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp382_ = tracker_property_get_data_type (_tmp381_);
#line 1485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp383_ = _tmp382_;
#line 1485 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp380_)->data_type = _tmp383_;
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp384_ = binding;
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp385_ = prop;
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp386_ = tracker_property_get_name (_tmp385_);
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp387_ = _tmp386_;
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp388_ = g_strdup (_tmp387_);
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (((TrackerSparqlDataBinding*) _tmp384_)->sql_db_column_name);
#line 1486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp384_)->sql_db_column_name = _tmp388_;
#line 14149 "tracker-sparql-pattern.c"
				} else {
					TrackerSparqlLiteralBinding* _tmp389_;
					gchar* _tmp390_;
#line 1489 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp389_ = binding;
#line 1489 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp390_ = g_strdup ("object");
#line 1489 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (((TrackerSparqlDataBinding*) _tmp389_)->sql_db_column_name);
#line 1489 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp389_)->sql_db_column_name = _tmp390_;
#line 14161 "tracker-sparql-pattern.c"
				}
#line 1491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp391_ = self->priv->triple_context;
#line 1491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp392_ = binding;
#line 1491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp393_ = _g_object_ref0 (_tmp392_);
#line 1491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp391_->bindings = g_list_append (_tmp391_->bindings, _tmp393_);
#line 1464 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 14173 "tracker-sparql-pattern.c"
			}
		}
#line 1494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp394_ = self->current_graph;
#line 1494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		if (_tmp394_ != NULL) {
#line 14180 "tracker-sparql-pattern.c"
			gboolean _tmp395_;
#line 1495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			_tmp395_ = self->priv->current_graph_is_var;
#line 1495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
			if (_tmp395_) {
#line 14186 "tracker-sparql-pattern.c"
				TrackerSparqlVariableBinding* _tmp396_;
				TrackerSparqlVariableBinding* binding;
				TrackerSparqlVariableBinding* _tmp397_;
				TrackerSparqlContext* _tmp398_;
				TrackerSparqlContext* _tmp399_;
				const gchar* _tmp400_;
				TrackerSparqlVariable* _tmp401_ = NULL;
				TrackerSparqlVariableBinding* _tmp402_;
				TrackerSparqlDataTable* _tmp403_;
				TrackerSparqlDataTable* _tmp404_;
				TrackerSparqlVariableBinding* _tmp405_;
				TrackerProperty* _tmp406_;
				TrackerSparqlVariableBinding* _tmp414_;
				TrackerSparqlVariableBinding* _tmp415_;
				gboolean _tmp416_;
				TrackerSparqlVariableState state = 0;
				gboolean _tmp417_;
				GString* _tmp418_;
				TrackerSparqlVariableBinding* _tmp419_;
				TrackerSparqlVariableState _tmp420_;
#line 1496 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp396_ = tracker_sparql_variable_binding_new ();
#line 1496 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding = _tmp396_;
#line 1497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp397_ = binding;
#line 1497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp398_ = tracker_sparql_pattern_get_context (self);
#line 1497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp399_ = _tmp398_;
#line 1497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp400_ = self->current_graph;
#line 1497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp401_ = tracker_sparql_context_get_variable (_tmp399_, _tmp400_);
#line 1497 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp397_->variable = _tmp401_;
#line 1498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp402_ = binding;
#line 1498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp403_ = table;
#line 1498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp404_ = _g_object_ref0 (_tmp403_);
#line 1498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp402_)->table);
#line 1498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp402_)->table = _tmp404_;
#line 1499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp405_ = binding;
#line 1499 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp405_)->data_type = TRACKER_PROPERTY_TYPE_RESOURCE;
#line 1501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp406_ = prop;
#line 1501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp406_ != NULL) {
#line 14241 "tracker-sparql-pattern.c"
					TrackerSparqlVariableBinding* _tmp407_;
					TrackerProperty* _tmp408_;
					const gchar* _tmp409_;
					const gchar* _tmp410_;
					gchar* _tmp411_;
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp407_ = binding;
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp408_ = prop;
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp409_ = tracker_property_get_name (_tmp408_);
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp410_ = _tmp409_;
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp411_ = g_strconcat (_tmp410_, ":graph", NULL);
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (((TrackerSparqlDataBinding*) _tmp407_)->sql_db_column_name);
#line 1502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp407_)->sql_db_column_name = _tmp411_;
#line 14261 "tracker-sparql-pattern.c"
				} else {
					TrackerSparqlVariableBinding* _tmp412_;
					gchar* _tmp413_;
#line 1505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp412_ = binding;
#line 1505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp413_ = g_strdup ("graph");
#line 1505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (((TrackerSparqlDataBinding*) _tmp412_)->sql_db_column_name);
#line 1505 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp412_)->sql_db_column_name = _tmp413_;
#line 14273 "tracker-sparql-pattern.c"
				}
#line 1508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp414_ = binding;
#line 1508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp414_->maybe_null = TRUE;
#line 1509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp415_ = binding;
#line 1509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp416_ = in_simple_optional;
#line 1509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp415_->in_simple_optional = _tmp416_;
#line 1512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp417_ = in_simple_optional;
#line 1512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp417_) {
#line 1513 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					state = TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL;
#line 14291 "tracker-sparql-pattern.c"
				} else {
#line 1515 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					state = TRACKER_SPARQL_VARIABLE_STATE_BOUND;
#line 14295 "tracker-sparql-pattern.c"
				}
#line 1518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp418_ = sql;
#line 1518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp419_ = binding;
#line 1518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp420_ = state;
#line 1518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				tracker_sparql_pattern_add_variable_binding (self, _tmp418_, _tmp419_, _tmp420_);
#line 1495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 14307 "tracker-sparql-pattern.c"
			} else {
				TrackerSparqlLiteralBinding* _tmp421_;
				TrackerSparqlLiteralBinding* binding;
				TrackerSparqlLiteralBinding* _tmp422_;
				const gchar* _tmp423_;
				gchar* _tmp424_;
				TrackerSparqlLiteralBinding* _tmp425_;
				TrackerSparqlDataTable* _tmp426_;
				TrackerSparqlDataTable* _tmp427_;
				TrackerSparqlLiteralBinding* _tmp428_;
				TrackerProperty* _tmp429_;
				TrackerSparqlPatternTripleContext* _tmp437_;
				TrackerSparqlLiteralBinding* _tmp438_;
				TrackerSparqlLiteralBinding* _tmp439_;
#line 1520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp421_ = tracker_sparql_literal_binding_new ();
#line 1520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				binding = _tmp421_;
#line 1521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp422_ = binding;
#line 1521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp423_ = self->current_graph;
#line 1521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp424_ = g_strdup (_tmp423_);
#line 1521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_free0 (_tmp422_->literal);
#line 1521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp422_->literal = _tmp424_;
#line 1522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp425_ = binding;
#line 1522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp426_ = table;
#line 1522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp427_ = _g_object_ref0 (_tmp426_);
#line 1522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (((TrackerSparqlDataBinding*) _tmp425_)->table);
#line 1522 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp425_)->table = _tmp427_;
#line 1523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp428_ = binding;
#line 1523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				((TrackerSparqlDataBinding*) _tmp428_)->data_type = TRACKER_PROPERTY_TYPE_RESOURCE;
#line 1525 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp429_ = prop;
#line 1525 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				if (_tmp429_ != NULL) {
#line 14354 "tracker-sparql-pattern.c"
					TrackerSparqlLiteralBinding* _tmp430_;
					TrackerProperty* _tmp431_;
					const gchar* _tmp432_;
					const gchar* _tmp433_;
					gchar* _tmp434_;
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp430_ = binding;
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp431_ = prop;
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp432_ = tracker_property_get_name (_tmp431_);
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp433_ = _tmp432_;
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp434_ = g_strconcat (_tmp433_, ":graph", NULL);
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (((TrackerSparqlDataBinding*) _tmp430_)->sql_db_column_name);
#line 1526 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp430_)->sql_db_column_name = _tmp434_;
#line 14374 "tracker-sparql-pattern.c"
				} else {
					TrackerSparqlLiteralBinding* _tmp435_;
					gchar* _tmp436_;
#line 1529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp435_ = binding;
#line 1529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_tmp436_ = g_strdup ("graph");
#line 1529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					_g_free0 (((TrackerSparqlDataBinding*) _tmp435_)->sql_db_column_name);
#line 1529 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
					((TrackerSparqlDataBinding*) _tmp435_)->sql_db_column_name = _tmp436_;
#line 14386 "tracker-sparql-pattern.c"
				}
#line 1532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp437_ = self->priv->triple_context;
#line 1532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp438_ = binding;
#line 1532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp439_ = _g_object_ref0 (_tmp438_);
#line 1532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_tmp437_->bindings = g_list_append (_tmp437_->bindings, _tmp439_);
#line 1495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
				_g_object_unref0 (binding);
#line 14398 "tracker-sparql-pattern.c"
			}
		}
	}
#line 1537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp440_ = sql;
#line 1537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp441_ = _tmp440_->len;
#line 1537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp442_ = begin_sql_len;
#line 1537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp441_ == ((gssize) _tmp442_)) {
#line 14410 "tracker-sparql-pattern.c"
		GString* _tmp443_;
#line 1540 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp443_ = sql;
#line 1540 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_string_append (_tmp443_, "1, ");
#line 14416 "tracker-sparql-pattern.c"
	}
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_object_unref0 (subject_type);
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_object_unref0 (prop);
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_object_unref0 (table);
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (db_table);
#line 1254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (object);
#line 14428 "tracker-sparql-pattern.c"
}


static TrackerSparqlDataTable* tracker_sparql_pattern_get_table (TrackerSparqlPattern* self, const gchar* subject, const gchar* db_table, gboolean share_table, gboolean* newtable) {
	gboolean _vala_newtable = FALSE;
	TrackerSparqlDataTable* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* tablestring;
	TrackerSparqlDataTable* table;
	gboolean _tmp3_;
	TrackerSparqlDataTable* _tmp9_;
#line 1544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 1544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (subject != NULL, NULL);
#line 1544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (db_table != NULL, NULL);
#line 1545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = subject;
#line 1545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = db_table;
#line 1545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = g_strdup_printf ("%s.%s", _tmp0_, _tmp1_);
#line 1545 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tablestring = _tmp2_;
#line 1546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	table = NULL;
#line 1547 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_vala_newtable = FALSE;
#line 1548 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = share_table;
#line 1548 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp3_) {
#line 14464 "tracker-sparql-pattern.c"
		TrackerSparqlPatternTripleContext* _tmp4_;
		GHashTable* _tmp5_;
		const gchar* _tmp6_;
		gconstpointer _tmp7_ = NULL;
		TrackerSparqlDataTable* _tmp8_;
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp4_ = self->priv->triple_context;
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp5_ = _tmp4_->table_map;
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp6_ = tablestring;
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp8_ = _g_object_ref0 ((TrackerSparqlDataTable*) _tmp7_);
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (table);
#line 1549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		table = _tmp8_;
#line 14484 "tracker-sparql-pattern.c"
	}
#line 1551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp9_ = table;
#line 1551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (_tmp9_ == NULL) {
#line 14490 "tracker-sparql-pattern.c"
		TrackerSparqlDataTable* _tmp10_;
		TrackerSparqlDataTable* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		TrackerSparqlDataTable* _tmp14_;
		const gchar* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_;
		gchar* _tmp20_;
		TrackerSparqlPatternTripleContext* _tmp21_;
		TrackerSparqlDataTable* _tmp22_;
		TrackerSparqlDataTable* _tmp23_;
		TrackerSparqlPatternTripleContext* _tmp24_;
		GHashTable* _tmp25_;
		const gchar* _tmp26_;
		gchar* _tmp27_;
		TrackerSparqlDataTable* _tmp28_;
		TrackerSparqlDataTable* _tmp29_;
#line 1552 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_vala_newtable = TRUE;
#line 1553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp10_ = tracker_sparql_data_table_new ();
#line 1553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_object_unref0 (table);
#line 1553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		table = _tmp10_;
#line 1554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_ = table;
#line 1554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp12_ = db_table;
#line 1554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp13_ = g_strdup (_tmp12_);
#line 1554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp11_->sql_db_tablename);
#line 1554 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp11_->sql_db_tablename = _tmp13_;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp14_ = table;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp15_ = db_table;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp16_ = self->priv->counter;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		self->priv->counter = _tmp16_ + 1;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp17_ = self->priv->counter;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp18_ = g_strdup_printf ("%i", _tmp17_);
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp19_ = _tmp18_;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp20_ = g_strconcat (_tmp15_, _tmp19_, NULL);
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp14_->sql_query_tablename);
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp14_->sql_query_tablename = _tmp20_;
#line 1555 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_g_free0 (_tmp19_);
#line 1556 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp21_ = self->priv->triple_context;
#line 1556 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp22_ = table;
#line 1556 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp23_ = _g_object_ref0 (_tmp22_);
#line 1556 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp21_->tables = g_list_append (_tmp21_->tables, _tmp23_);
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp24_ = self->priv->triple_context;
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp25_ = _tmp24_->table_map;
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp26_ = tablestring;
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp27_ = g_strdup (_tmp26_);
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp28_ = table;
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		_tmp29_ = _g_object_ref0 (_tmp28_);
#line 1557 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		g_hash_table_insert (_tmp25_, _tmp27_, _tmp29_);
#line 14573 "tracker-sparql-pattern.c"
	}
#line 1559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = table;
#line 1559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (tablestring);
#line 1559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	if (newtable) {
#line 1559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		*newtable = _vala_newtable;
#line 14583 "tracker-sparql-pattern.c"
	}
#line 1559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 14587 "tracker-sparql-pattern.c"
}


static TrackerSparqlContext* tracker_sparql_pattern_get_context (TrackerSparqlPattern* self) {
	TrackerSparqlContext* result;
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlContext* _tmp1_;
#line 179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = _tmp0_->context;
#line 179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	result = _tmp1_;
#line 179 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return result;
#line 14605 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_set_context (TrackerSparqlPattern* self, TrackerSparqlContext* value) {
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlContext* _tmp1_;
	TrackerSparqlContext* _tmp2_;
#line 180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_if_fail (self != NULL);
#line 180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = self->priv->query;
#line 180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = value;
#line 180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = _tracker_sparql_context_ref0 (_tmp1_);
#line 180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (_tmp0_->context);
#line 180 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_->context = _tmp2_;
#line 14625 "tracker-sparql-pattern.c"
}


static TrackerSparqlPatternTripleContext* tracker_sparql_pattern_triple_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
	TrackerSparqlPatternTripleContext* self = NULL;
	TrackerSparqlQuery* _tmp0_;
	TrackerSparqlContext* _tmp1_;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	GDestroyNotify _tmp4_;
	GDestroyNotify _tmp5_;
	GHashTable* _tmp6_;
	GDestroyNotify _tmp7_;
	GDestroyNotify _tmp8_;
	GHashTable* _tmp9_;
#line 225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (query != NULL, NULL);
#line 225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_return_val_if_fail (parent_context != NULL, NULL);
#line 226 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp0_ = query;
#line 226 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp1_ = parent_context;
#line 226 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self = (TrackerSparqlPatternTripleContext*) tracker_sparql_context_construct (object_type, _tmp0_, _tmp1_);
#line 228 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (self->tables);
#line 228 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->tables = NULL;
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp2_ = g_str_hash;
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp3_ = g_str_equal;
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp4_ = g_free;
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp5_ = g_object_unref;
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp6_ = g_hash_table_new_full (_tmp2_, _tmp3_, _tmp4_, _tmp5_);
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_hash_table_unref0 (self->table_map);
#line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->table_map = _tmp6_;
#line 231 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (self->variables);
#line 231 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->variables = NULL;
#line 232 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp7_ = g_object_unref;
#line 232 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp8_ = g_object_unref;
#line 232 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tmp9_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp7_, _tmp8_);
#line 232 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_hash_table_unref0 (self->var_bindings);
#line 232 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->var_bindings = _tmp9_;
#line 234 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (self->bindings);
#line 234 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->bindings = NULL;
#line 225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return self;
#line 14689 "tracker-sparql-pattern.c"
}


static TrackerSparqlPatternTripleContext* tracker_sparql_pattern_triple_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
#line 225 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	return tracker_sparql_pattern_triple_context_construct (TRACKER_SPARQL_PATTERN_TYPE_TRIPLE_CONTEXT, query, parent_context);
#line 14696 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_triple_context_class_init (TrackerSparqlPatternTripleContextClass * klass) {
#line 215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_triple_context_parent_class = g_type_class_peek_parent (klass);
#line 215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	TRACKER_SPARQL_CONTEXT_CLASS (klass)->finalize = tracker_sparql_pattern_triple_context_finalize;
#line 14705 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_triple_context_instance_init (TrackerSparqlPatternTripleContext * self) {
}


static void tracker_sparql_pattern_triple_context_finalize (TrackerSparqlContext* obj) {
	TrackerSparqlPatternTripleContext * self;
#line 215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self = TRACKER_SPARQL_PATTERN_TRIPLE_CONTEXT (obj);
#line 217 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (self->tables);
#line 218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_hash_table_unref0 (self->table_map);
#line 220 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (self->bindings);
#line 222 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	__g_list_free__g_object_unref0_0 (self->variables);
#line 223 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_hash_table_unref0 (self->var_bindings);
#line 215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	TRACKER_SPARQL_CONTEXT_CLASS (tracker_sparql_pattern_triple_context_parent_class)->finalize (obj);
#line 14729 "tracker-sparql-pattern.c"
}


static GType tracker_sparql_pattern_triple_context_get_type (void) {
	static volatile gsize tracker_sparql_pattern_triple_context_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_sparql_pattern_triple_context_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlPatternTripleContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_pattern_triple_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlPatternTripleContext), 0, (GInstanceInitFunc) tracker_sparql_pattern_triple_context_instance_init, NULL };
		GType tracker_sparql_pattern_triple_context_type_id;
		tracker_sparql_pattern_triple_context_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CONTEXT, "TrackerSparqlPatternTripleContext", &g_define_type_info, 0);
		g_once_init_leave (&tracker_sparql_pattern_triple_context_type_id__volatile, tracker_sparql_pattern_triple_context_type_id);
	}
	return tracker_sparql_pattern_triple_context_type_id__volatile;
}


static void tracker_sparql_pattern_class_init (TrackerSparqlPatternClass * klass) {
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	tracker_sparql_pattern_parent_class = g_type_class_peek_parent (klass);
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	g_type_class_add_private (klass, sizeof (TrackerSparqlPatternPrivate));
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_pattern_get_property;
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_pattern_set_property;
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_sparql_pattern_finalize;
#line 14756 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_instance_init (TrackerSparqlPattern * self) {
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self->priv = TRACKER_SPARQL_PATTERN_GET_PRIVATE (self);
#line 14763 "tracker-sparql-pattern.c"
}


static void tracker_sparql_pattern_finalize (GObject* obj) {
	TrackerSparqlPattern * self;
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	self = TRACKER_SPARQL_PATTERN (obj);
#line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (self->current_graph);
#line 168 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (self->priv->current_subject);
#line 170 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_g_free0 (self->priv->current_predicate);
#line 238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	_tracker_sparql_context_unref0 (self->priv->triple_context);
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	G_OBJECT_CLASS (tracker_sparql_pattern_parent_class)->finalize (obj);
#line 14781 "tracker-sparql-pattern.c"
}


GType tracker_sparql_pattern_get_type (void) {
	static volatile gsize tracker_sparql_pattern_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_sparql_pattern_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlPatternClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_pattern_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlPattern), 0, (GInstanceInitFunc) tracker_sparql_pattern_instance_init, NULL };
		GType tracker_sparql_pattern_type_id;
		tracker_sparql_pattern_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlPattern", &g_define_type_info, 0);
		g_once_init_leave (&tracker_sparql_pattern_type_id__volatile, tracker_sparql_pattern_type_id);
	}
	return tracker_sparql_pattern_type_id__volatile;
}


static void _vala_tracker_sparql_pattern_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TrackerSparqlPattern * self;
	self = TRACKER_SPARQL_PATTERN (object);
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	switch (property_id) {
#line 14802 "tracker-sparql-pattern.c"
		default:
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		break;
#line 14808 "tracker-sparql-pattern.c"
	}
}


static void _vala_tracker_sparql_pattern_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TrackerSparqlPattern * self;
	self = TRACKER_SPARQL_PATTERN (object);
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
	switch (property_id) {
#line 14818 "tracker-sparql-pattern.c"
		default:
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 158 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-pattern.vala"
		break;
#line 14824 "tracker-sparql-pattern.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



