/* preprocessor.c generated by valac 0.34.8, the Vala compiler
 * generated from preprocessor.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <libcommon.h>
#include <stdio.h>
#include <libxml/xmlreader.h>
#include <libxml/xmlwriter.h>
#include <glib/gstdio.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <gobject/gvaluecollector.h>


#define WIXL_TYPE_PREPROCESSOR (wixl_preprocessor_get_type ())
#define WIXL_PREPROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIXL_TYPE_PREPROCESSOR, WixlPreprocessor))
#define WIXL_PREPROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIXL_TYPE_PREPROCESSOR, WixlPreprocessorClass))
#define WIXL_IS_PREPROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIXL_TYPE_PREPROCESSOR))
#define WIXL_IS_PREPROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIXL_TYPE_PREPROCESSOR))
#define WIXL_PREPROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIXL_TYPE_PREPROCESSOR, WixlPreprocessorClass))

typedef struct _WixlPreprocessor WixlPreprocessor;
typedef struct _WixlPreprocessorClass WixlPreprocessorClass;
typedef struct _WixlPreprocessorPrivate WixlPreprocessorPrivate;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION (wixl_preprocessor_eval_condition_get_type ())
#define WIXL_PREPROCESSOR_EVAL_CONDITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, WixlPreprocessorEvalCondition))
#define WIXL_PREPROCESSOR_EVAL_CONDITION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, WixlPreprocessorEvalConditionClass))
#define WIXL_PREPROCESSOR_IS_EVAL_CONDITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION))
#define WIXL_PREPROCESSOR_IS_EVAL_CONDITION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION))
#define WIXL_PREPROCESSOR_EVAL_CONDITION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, WixlPreprocessorEvalConditionClass))

typedef struct _WixlPreprocessorEvalCondition WixlPreprocessorEvalCondition;
typedef struct _WixlPreprocessorEvalConditionClass WixlPreprocessorEvalConditionClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define WIXL_PREPROCESSOR_TYPE_LOCATION (wixl_preprocessor_location_get_type ())
#define WIXL_PREPROCESSOR_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIXL_PREPROCESSOR_TYPE_LOCATION, WixlPreprocessorLocation))
#define WIXL_PREPROCESSOR_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIXL_PREPROCESSOR_TYPE_LOCATION, WixlPreprocessorLocationClass))
#define WIXL_PREPROCESSOR_IS_LOCATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIXL_PREPROCESSOR_TYPE_LOCATION))
#define WIXL_PREPROCESSOR_IS_LOCATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIXL_PREPROCESSOR_TYPE_LOCATION))
#define WIXL_PREPROCESSOR_LOCATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIXL_PREPROCESSOR_TYPE_LOCATION, WixlPreprocessorLocationClass))

typedef struct _WixlPreprocessorLocation WixlPreprocessorLocation;
typedef struct _WixlPreprocessorLocationClass WixlPreprocessorLocationClass;

#define WIXL_PREPROCESSOR_TYPE_IF_CONTEXT (wixl_preprocessor_if_context_get_type ())
#define WIXL_PREPROCESSOR_IF_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIXL_PREPROCESSOR_TYPE_IF_CONTEXT, WixlPreprocessorIfContext))
#define WIXL_PREPROCESSOR_IF_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIXL_PREPROCESSOR_TYPE_IF_CONTEXT, WixlPreprocessorIfContextClass))
#define WIXL_PREPROCESSOR_IS_IF_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIXL_PREPROCESSOR_TYPE_IF_CONTEXT))
#define WIXL_PREPROCESSOR_IS_IF_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIXL_PREPROCESSOR_TYPE_IF_CONTEXT))
#define WIXL_PREPROCESSOR_IF_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIXL_PREPROCESSOR_TYPE_IF_CONTEXT, WixlPreprocessorIfContextClass))

typedef struct _WixlPreprocessorIfContext WixlPreprocessorIfContext;
typedef struct _WixlPreprocessorIfContextClass WixlPreprocessorIfContextClass;

#define WIXL_PREPROCESSOR_IF_CONTEXT_TYPE_STATE (wixl_preprocessor_if_context_state_get_type ())
typedef struct _WixlPreprocessorIfContextPrivate WixlPreprocessorIfContextPrivate;
#define __g_queue_free__wixl_preprocessor_if_context_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_queue_free__wixl_preprocessor_if_context_unref0_ (var), NULL)))
#define _wixl_preprocessor_if_context_unref0(var) ((var == NULL) ? NULL : (var = (wixl_preprocessor_if_context_unref (var), NULL)))
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _xmlFreeTextReader0(var) ((var == NULL) ? NULL : (var = (xmlFreeTextReader (var), NULL)))
typedef struct _WixlPreprocessorLocationPrivate WixlPreprocessorLocationPrivate;
#define _xmlFreeTextWriter0(var) ((var == NULL) ? NULL : (var = (xmlFreeTextWriter (var), NULL)))
#define _xmlFreeDoc0(var) ((var == NULL) ? NULL : (var = (xmlFreeDoc (var), NULL)))
typedef struct _WixlPreprocessorEvalConditionPrivate WixlPreprocessorEvalConditionPrivate;

#define WIXL_PREPROCESSOR_EVAL_CONDITION_TYPE_OP (wixl_preprocessor_eval_condition_op_get_type ())
#define _g_scanner_destroy0(var) ((var == NULL) ? NULL : (var = (g_scanner_destroy (var), NULL)))
typedef struct _WixlPreprocessorParamSpecIfContext WixlPreprocessorParamSpecIfContext;

struct _WixlPreprocessor {
	GObject parent_instance;
	WixlPreprocessorPrivate * priv;
};

struct _WixlPreprocessorClass {
	GObjectClass parent_class;
};

struct _WixlPreprocessorPrivate {
	GList* includedirs;
	GHashTable* variables;
	GHashTable* requires;
};

typedef enum  {
	WIXL_PREPROCESSOR_IF_CONTEXT_STATE_UNKNOWN,
	WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF,
	WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSE,
	WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSEIF
} WixlPreprocessorIfContextState;

struct _WixlPreprocessorIfContext {
	GTypeInstance parent_instance;
	volatile int ref_count;
	WixlPreprocessorIfContextPrivate * priv;
	gboolean never_true;
	gboolean enabled;
	WixlPreprocessorIfContextState state;
};

struct _WixlPreprocessorIfContextClass {
	GTypeClass parent_class;
	void (*finalize) (WixlPreprocessorIfContext *self);
};

struct _WixlPreprocessorLocation {
	GObject parent_instance;
	WixlPreprocessorLocationPrivate * priv;
	GFile* file;
	gint line;
};

struct _WixlPreprocessorLocationClass {
	GObjectClass parent_class;
};

struct _WixlPreprocessorEvalCondition {
	GObject parent_instance;
	WixlPreprocessorEvalConditionPrivate * priv;
};

struct _WixlPreprocessorEvalConditionClass {
	GObjectClass parent_class;
};

struct _WixlPreprocessorEvalConditionPrivate {
	GFile* file;
	WixlPreprocessor* preprocessor;
	GScanner* scanner;
};

typedef enum  {
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NONE,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EQUAL,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OPEN_VAR,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EQ,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EC,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NE,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LT,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LTE,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GT,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GTE,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_AND,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OR,
	WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NOT
} WixlPreprocessorEvalConditionOp;

struct _WixlPreprocessorIfContextPrivate {
	gboolean _is_true;
};

struct _WixlPreprocessorParamSpecIfContext {
	GParamSpec parent_instance;
};


static gpointer wixl_preprocessor_parent_class = NULL;
static gpointer wixl_preprocessor_eval_condition_parent_class = NULL;
static gpointer wixl_preprocessor_location_parent_class = NULL;
static gpointer wixl_preprocessor_if_context_parent_class = NULL;

GType wixl_preprocessor_get_type (void) G_GNUC_CONST;
#define WIXL_PREPROCESSOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), WIXL_TYPE_PREPROCESSOR, WixlPreprocessorPrivate))
enum  {
	WIXL_PREPROCESSOR_DUMMY_PROPERTY
};
static void _g_free0_ (gpointer var);
WixlPreprocessor* wixl_preprocessor_new (GHashTable* globals, GList* includedirs);
WixlPreprocessor* wixl_preprocessor_construct (GType object_type, GHashTable* globals, GList* includedirs);
void wixl_preprocessor_define_variable (WixlPreprocessor* self, const gchar* name, const gchar* value);
void wixl_preprocessor_undefine_variable (WixlPreprocessor* self, const gchar* name);
gchar* wixl_preprocessor_lookup_variable (WixlPreprocessor* self, const gchar* name);
gchar* wixl_preprocessor_eval_variable (WixlPreprocessor* self, const gchar* str, GFile* file, GError** error);
gchar* wixl_preprocessor_eval (WixlPreprocessor* self, const gchar* str, GFile* file, GError** error);
gboolean wixl_preprocessor_eval_condition (WixlPreprocessor* self, const gchar* str, GFile* file, GError** error);
static GType wixl_preprocessor_eval_condition_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static WixlPreprocessorEvalCondition* wixl_preprocessor_eval_condition_new (WixlPreprocessor* pp, GFile* file);
static WixlPreprocessorEvalCondition* wixl_preprocessor_eval_condition_construct (GType object_type, WixlPreprocessor* pp, GFile* file);
static gboolean wixl_preprocessor_eval_condition_eval (WixlPreprocessorEvalCondition* self, const gchar* str, GError** error);
static GType wixl_preprocessor_location_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void wixl_preprocessor_print (WixlPreprocessor* self, const gchar* prefix, WixlPreprocessorLocation* loc, const gchar* msg);
static gchar* wixl_preprocessor_location_to_string (WixlPreprocessorLocation* self);
static void wixl_preprocessor_preprocess_xml (WixlPreprocessor* self, xmlTextReader* reader, xmlTextWriter* writer, GFile* file, gboolean is_include, GError** error);
static gpointer wixl_preprocessor_if_context_ref (gpointer instance);
static void wixl_preprocessor_if_context_unref (gpointer instance);
static GParamSpec* wixl_preprocessor_param_spec_if_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void wixl_preprocessor_value_set_if_context (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void wixl_preprocessor_value_take_if_context (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer wixl_preprocessor_value_get_if_context (const GValue* value) G_GNUC_UNUSED;
static GType wixl_preprocessor_if_context_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType wixl_preprocessor_if_context_state_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static WixlPreprocessorIfContext* wixl_preprocessor_if_context_new (gboolean enabled, gboolean is_true, WixlPreprocessorIfContextState state);
static WixlPreprocessorIfContext* wixl_preprocessor_if_context_construct (GType object_type, gboolean enabled, gboolean is_true, WixlPreprocessorIfContextState state);
static WixlPreprocessorLocation* wixl_preprocessor_location_new (xmlTextReader* reader, GFile* file);
static WixlPreprocessorLocation* wixl_preprocessor_location_construct (GType object_type, xmlTextReader* reader, GFile* file);
static gboolean wixl_preprocessor_if_context_get_is_true (WixlPreprocessorIfContext* self);
static void _wixl_preprocessor_if_context_unref0_ (gpointer var);
static void _g_queue_free__wixl_preprocessor_if_context_unref0_ (GQueue* self);
static gboolean wixl_preprocessor_if_context_state_in_if (WixlPreprocessorIfContextState self);
static void wixl_preprocessor_if_context_set_is_true (WixlPreprocessorIfContext* self, gboolean value);
static void wixl_preprocessor_include (WixlPreprocessor* self, const gchar* name, WixlPreprocessorLocation* loc, xmlTextWriter* writer, gboolean is_req, GError** error);
static gboolean wixl_preprocessor_include_try (WixlPreprocessor* self, const gchar* filename, xmlTextWriter* writer, GError** error);
static void _vala_array_add4 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add5 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add6 (gchar*** array, int* length, int* size, gchar* value);
xmlDoc* wixl_preprocessor_preprocess (WixlPreprocessor* self, const gchar* data, GFile* file, GError** error);
static GObject * wixl_preprocessor_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
#define WIXL_PREPROCESSOR_EVAL_CONDITION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, WixlPreprocessorEvalConditionPrivate))
enum  {
	WIXL_PREPROCESSOR_EVAL_CONDITION_DUMMY_PROPERTY
};
static GType wixl_preprocessor_eval_condition_op_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gboolean wixl_preprocessor_eval_condition_to_bool (WixlPreprocessorEvalCondition* self, GValue* val);
static gboolean wixl_preprocessor_eval_condition_accept (WixlPreprocessorEvalCondition* self, gint type);
static gboolean wixl_preprocessor_eval_condition_expect (WixlPreprocessorEvalCondition* self, gint type, GError** error);
static gboolean wixl_preprocessor_eval_condition_accept_symbol (WixlPreprocessorEvalCondition* self, WixlPreprocessorEvalConditionOp symbol);
static void wixl_preprocessor_eval_condition_term (WixlPreprocessorEvalCondition* self, GValue* result, GError** error);
static gboolean wixl_preprocessor_eval_condition_expr (WixlPreprocessorEvalCondition* self, GError** error);
static gint wixl_preprocessor_eval_condition_to_int (WixlPreprocessorEvalCondition* self, GValue* val);
static gchar* wixl_preprocessor_eval_condition_to_string (WixlPreprocessorEvalCondition* self, GValue* val);
static gboolean wixl_preprocessor_eval_condition_cmp_term (WixlPreprocessorEvalCondition* self, GError** error);
static gboolean wixl_preprocessor_eval_condition_not_term (WixlPreprocessorEvalCondition* self, GError** error);
static GObject * wixl_preprocessor_eval_condition_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void wixl_preprocessor_eval_condition_finalize (GObject* obj);
enum  {
	WIXL_PREPROCESSOR_LOCATION_DUMMY_PROPERTY
};
static void wixl_preprocessor_location_finalize (GObject* obj);
#define WIXL_PREPROCESSOR_IF_CONTEXT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), WIXL_PREPROCESSOR_TYPE_IF_CONTEXT, WixlPreprocessorIfContextPrivate))
enum  {
	WIXL_PREPROCESSOR_IF_CONTEXT_DUMMY_PROPERTY
};
static void wixl_preprocessor_if_context_finalize (WixlPreprocessorIfContext* obj);
static void wixl_preprocessor_finalize (GObject* obj);
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 GRegex* _tmp_regex_0 = NULL;

static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


WixlPreprocessor* wixl_preprocessor_construct (GType object_type, GHashTable* globals, GList* includedirs) {
	WixlPreprocessor * self = NULL;
	gchar* name = NULL;
	gchar* value = NULL;
	GHashTableIter it = {0};
	GHashTable* _tmp0_ = NULL;
	GList* _tmp8_ = NULL;
	g_return_val_if_fail (globals != NULL, NULL);
	self = (WixlPreprocessor*) g_object_new (object_type, NULL);
	_tmp0_ = globals;
	g_hash_table_iter_init (&it, _tmp0_);
	while (TRUE) {
		gconstpointer _tmp1_ = NULL;
		gconstpointer _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		const gchar* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		_tmp3_ = g_hash_table_iter_next (&it, (gpointer*) (&_tmp1_), (gpointer*) (&_tmp2_));
		_g_free0 (name);
		_tmp4_ = g_strdup (_tmp1_);
		name = _tmp4_;
		_g_free0 (value);
		_tmp5_ = g_strdup (_tmp2_);
		value = _tmp5_;
		if (!_tmp3_) {
			break;
		}
		_tmp6_ = name;
		_tmp7_ = value;
		wixl_preprocessor_define_variable (self, _tmp6_, _tmp7_);
	}
	_tmp8_ = includedirs;
	self->priv->includedirs = _tmp8_;
	_g_free0 (value);
	_g_free0 (name);
	return self;
}


WixlPreprocessor* wixl_preprocessor_new (GHashTable* globals, GList* includedirs) {
	return wixl_preprocessor_construct (WIXL_TYPE_PREPROCESSOR, globals, includedirs);
}


void wixl_preprocessor_define_variable (WixlPreprocessor* self, const gchar* name, const gchar* value) {
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->priv->variables;
	_tmp1_ = name;
	_tmp2_ = g_strdup (_tmp1_);
	_tmp3_ = value;
	_tmp4_ = g_strdup (_tmp3_);
	g_hash_table_insert (_tmp0_, _tmp2_, _tmp4_);
}


void wixl_preprocessor_undefine_variable (WixlPreprocessor* self, const gchar* name) {
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->variables;
	_tmp1_ = name;
	g_hash_table_remove (_tmp0_, _tmp1_);
}


gchar* wixl_preprocessor_lookup_variable (WixlPreprocessor* self, const gchar* name) {
	gchar* result = NULL;
	GHashTable* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->priv->variables;
	_tmp1_ = name;
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
	_tmp3_ = g_strdup ((const gchar*) _tmp2_);
	result = _tmp3_;
	return result;
}


gchar* wixl_preprocessor_eval_variable (WixlPreprocessor* self, const gchar* str, GFile* file, GError** error) {
	gchar* result = NULL;
	gchar** var = NULL;
	const gchar* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gint var_length1 = 0;
	gint _var_size_ = 0;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	GQuark _tmp10_ = 0U;
	static GQuark _tmp9_label0 = 0;
	static GQuark _tmp9_label1 = 0;
	static GQuark _tmp9_label2 = 0;
	const gchar* _tmp28_ = NULL;
	GError* _tmp29_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = str;
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, ".", 2);
	var = _tmp2_;
	var_length1 = _vala_array_length (_tmp1_);
	_var_size_ = var_length1;
	_tmp3_ = var;
	_tmp3__length1 = var_length1;
	if (_tmp3__length1 != 2) {
		const gchar* _tmp4_ = NULL;
		GError* _tmp5_ = NULL;
		_tmp4_ = str;
		_tmp5_ = g_error_new (WIXL_ERROR, WIXL_ERROR_FAILED, "invalid variable %s", _tmp4_);
		_inner_error_ = _tmp5_;
		g_propagate_error (error, _inner_error_);
		var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
		return NULL;
	}
	_tmp6_ = var;
	_tmp6__length1 = var_length1;
	_tmp7_ = _tmp6_[0];
	_tmp8_ = _tmp7_;
	_tmp10_ = (NULL == _tmp8_) ? 0 : g_quark_from_string (_tmp8_);
	if (_tmp10_ == ((0 != _tmp9_label0) ? _tmp9_label0 : (_tmp9_label0 = g_quark_from_static_string ("var")))) {
		switch (0) {
			default:
			{
				gchar** _tmp11_ = NULL;
				gint _tmp11__length1 = 0;
				const gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				_tmp11_ = var;
				_tmp11__length1 = var_length1;
				_tmp12_ = _tmp11_[1];
				_tmp13_ = wixl_preprocessor_lookup_variable (self, _tmp12_);
				result = _tmp13_;
				var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
				return result;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label1) ? _tmp9_label1 : (_tmp9_label1 = g_quark_from_static_string ("env")))) {
		switch (0) {
			default:
			{
				gchar** _tmp14_ = NULL;
				gint _tmp14__length1 = 0;
				const gchar* _tmp15_ = NULL;
				const gchar* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				_tmp14_ = var;
				_tmp14__length1 = var_length1;
				_tmp15_ = _tmp14_[1];
				_tmp16_ = g_getenv (_tmp15_);
				_tmp17_ = g_strdup (_tmp16_);
				result = _tmp17_;
				var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
				return result;
			}
		}
	} else if (_tmp10_ == ((0 != _tmp9_label2) ? _tmp9_label2 : (_tmp9_label2 = g_quark_from_static_string ("sys")))) {
		switch (0) {
			default:
			{
				gchar** _tmp18_ = NULL;
				gint _tmp18__length1 = 0;
				const gchar* _tmp19_ = NULL;
				const gchar* _tmp20_ = NULL;
				GQuark _tmp22_ = 0U;
				static GQuark _tmp21_label0 = 0;
				static GQuark _tmp21_label1 = 0;
				static GQuark _tmp21_label2 = 0;
				_tmp18_ = var;
				_tmp18__length1 = var_length1;
				_tmp19_ = _tmp18_[1];
				_tmp20_ = _tmp19_;
				_tmp22_ = (NULL == _tmp20_) ? 0 : g_quark_from_string (_tmp20_);
				if (_tmp22_ == ((0 != _tmp21_label0) ? _tmp21_label0 : (_tmp21_label0 = g_quark_from_static_string ("CURRENTDIR")))) {
					switch (0) {
						default:
						{
							gchar* _tmp23_ = NULL;
							_tmp23_ = g_get_current_dir ();
							result = _tmp23_;
							var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
							return result;
						}
					}
				} else if (_tmp22_ == ((0 != _tmp21_label1) ? _tmp21_label1 : (_tmp21_label1 = g_quark_from_static_string ("SOURCEFILEDIR")))) {
					switch (0) {
						default:
						{
							GFile* _tmp24_ = NULL;
							gchar* _tmp25_ = NULL;
							_tmp24_ = file;
							_tmp25_ = g_file_get_basename (_tmp24_);
							result = _tmp25_;
							var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
							return result;
						}
					}
				} else if (_tmp22_ == ((0 != _tmp21_label2) ? _tmp21_label2 : (_tmp21_label2 = g_quark_from_static_string ("SOURCEFILEPATH")))) {
					switch (0) {
						default:
						{
							GFile* _tmp26_ = NULL;
							gchar* _tmp27_ = NULL;
							_tmp26_ = file;
							_tmp27_ = g_file_get_path (_tmp26_);
							result = _tmp27_;
							var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
							return result;
						}
					}
				}
				break;
			}
		}
	}
	_tmp28_ = str;
	_tmp29_ = g_error_new (WIXL_ERROR, WIXL_ERROR_FIXME, "unhandled variable type %s", _tmp28_);
	_inner_error_ = _tmp29_;
	g_propagate_error (error, _inner_error_);
	var = (_vala_array_free (var, var_length1, (GDestroyNotify) g_free), NULL);
	return NULL;
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = needle;
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_ = NULL;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	glong string_length = 0L;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	glong _tmp2_ = 0L;
	glong _tmp5_ = 0L;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_ = 0L;
	gboolean _tmp12_ = FALSE;
	glong _tmp13_ = 0L;
	glong _tmp16_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	gchar* _tmp21_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	_tmp2_ = start;
	if (_tmp2_ < ((glong) 0)) {
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		_tmp3_ = string_length;
		_tmp4_ = start;
		start = _tmp3_ + _tmp4_;
	}
	_tmp5_ = end;
	if (_tmp5_ < ((glong) 0)) {
		glong _tmp6_ = 0L;
		glong _tmp7_ = 0L;
		_tmp6_ = string_length;
		_tmp7_ = end;
		end = _tmp6_ + _tmp7_;
	}
	_tmp9_ = start;
	if (_tmp9_ >= ((glong) 0)) {
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
		_tmp10_ = start;
		_tmp11_ = string_length;
		_tmp8_ = _tmp10_ <= _tmp11_;
	} else {
		_tmp8_ = FALSE;
	}
	g_return_val_if_fail (_tmp8_, NULL);
	_tmp13_ = end;
	if (_tmp13_ >= ((glong) 0)) {
		glong _tmp14_ = 0L;
		glong _tmp15_ = 0L;
		_tmp14_ = end;
		_tmp15_ = string_length;
		_tmp12_ = _tmp14_ <= _tmp15_;
	} else {
		_tmp12_ = FALSE;
	}
	g_return_val_if_fail (_tmp12_, NULL);
	_tmp16_ = start;
	_tmp17_ = end;
	g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
	_tmp18_ = start;
	_tmp19_ = end;
	_tmp20_ = start;
	_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
	result = _tmp21_;
	return result;
}


gchar* wixl_preprocessor_eval (WixlPreprocessor* self, const gchar* str, GFile* file, GError** error) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_ = NULL;
	gint end = 0;
	gint pos = 0;
	const gchar* _tmp48_ = NULL;
	const gchar* _tmp49_ = NULL;
	gint _tmp50_ = 0;
	const gchar* _tmp51_ = NULL;
	gint _tmp52_ = 0;
	gint _tmp53_ = 0;
	gchar* _tmp54_ = NULL;
	gchar* _tmp55_ = NULL;
	gchar* _tmp56_ = NULL;
	gchar* _tmp57_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = g_strdup ("");
	_result_ = _tmp0_;
	end = 0;
	pos = 0;
	while (TRUE) {
		const gchar* _tmp1_ = NULL;
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _tmp14_ = 0;
		gchar* remainder = NULL;
		const gchar* _tmp15_ = NULL;
		gint _tmp16_ = 0;
		const gchar* _tmp17_ = NULL;
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		gchar* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		gboolean _tmp22_ = FALSE;
		_tmp1_ = str;
		_tmp2_ = end;
		_tmp3_ = string_index_of (_tmp1_, "$", _tmp2_);
		pos = _tmp3_;
		_tmp4_ = pos;
		if (!(_tmp4_ != -1)) {
			break;
		}
		_tmp5_ = end;
		_tmp6_ = pos;
		if (_tmp5_ < _tmp6_) {
			const gchar* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			gchar* _tmp11_ = NULL;
			gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			_tmp7_ = _result_;
			_tmp8_ = str;
			_tmp9_ = end;
			_tmp10_ = pos;
			_tmp11_ = string_slice (_tmp8_, (glong) _tmp9_, (glong) _tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = g_strconcat (_tmp7_, _tmp12_, NULL);
			_g_free0 (_result_);
			_result_ = _tmp13_;
			_g_free0 (_tmp12_);
		}
		_tmp14_ = pos;
		end = _tmp14_ + 1;
		_tmp15_ = str;
		_tmp16_ = end;
		_tmp17_ = str;
		_tmp18_ = strlen (_tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = string_slice (_tmp15_, (glong) _tmp16_, (glong) _tmp19_);
		remainder = _tmp20_;
		_tmp21_ = remainder;
		_tmp22_ = g_str_has_prefix (_tmp21_, "$");
		if (_tmp22_) {
			const gchar* _tmp23_ = NULL;
			gchar* _tmp24_ = NULL;
			_tmp23_ = _result_;
			_tmp24_ = g_strconcat (_tmp23_, "$", NULL);
			_g_free0 (_result_);
			_result_ = _tmp24_;
		} else {
			const gchar* _tmp25_ = NULL;
			gboolean _tmp26_ = FALSE;
			_tmp25_ = remainder;
			_tmp26_ = g_str_has_prefix (_tmp25_, "(");
			if (_tmp26_) {
				gint closing = 0;
				const gchar* _tmp27_ = NULL;
				gint _tmp28_ = 0;
				gint _tmp29_ = 0;
				gchar* substring = NULL;
				const gchar* _tmp31_ = NULL;
				gint _tmp32_ = 0;
				gchar* _tmp33_ = NULL;
				const gchar* _tmp34_ = NULL;
				gint _tmp35_ = 0;
				gchar* val = NULL;
				const gchar* _tmp37_ = NULL;
				GFile* _tmp38_ = NULL;
				gchar* _tmp39_ = NULL;
				const gchar* _tmp40_ = NULL;
				const gchar* _tmp43_ = NULL;
				const gchar* _tmp44_ = NULL;
				gchar* _tmp45_ = NULL;
				gint _tmp46_ = 0;
				gint _tmp47_ = 0;
				_tmp27_ = remainder;
				_tmp28_ = wixl_find_closing_paren (_tmp27_);
				closing = _tmp28_;
				_tmp29_ = closing;
				if (_tmp29_ == -1) {
					GError* _tmp30_ = NULL;
					_tmp30_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "no matching closing parenthesis");
					_inner_error_ = _tmp30_;
					g_propagate_error (error, _inner_error_);
					_g_free0 (remainder);
					_g_free0 (_result_);
					return NULL;
				}
				_tmp31_ = remainder;
				_tmp32_ = closing;
				_tmp33_ = string_slice (_tmp31_, (glong) 1, (glong) _tmp32_);
				substring = _tmp33_;
				_tmp34_ = substring;
				_tmp35_ = string_index_of (_tmp34_, "(", 0);
				if (_tmp35_ != -1) {
					GError* _tmp36_ = NULL;
					_tmp36_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FIXME, "unsupported function");
					_inner_error_ = _tmp36_;
					g_propagate_error (error, _inner_error_);
					_g_free0 (substring);
					_g_free0 (remainder);
					_g_free0 (_result_);
					return NULL;
				}
				_tmp37_ = substring;
				_tmp38_ = file;
				_tmp39_ = wixl_preprocessor_eval_variable (self, _tmp37_, _tmp38_, &_inner_error_);
				val = _tmp39_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_propagate_error (error, _inner_error_);
					_g_free0 (substring);
					_g_free0 (remainder);
					_g_free0 (_result_);
					return NULL;
				}
				_tmp40_ = val;
				if (_tmp40_ == NULL) {
					const gchar* _tmp41_ = NULL;
					GError* _tmp42_ = NULL;
					_tmp41_ = substring;
					_tmp42_ = g_error_new (WIXL_ERROR, WIXL_ERROR_FAILED, "Undefined variable %s", _tmp41_);
					_inner_error_ = _tmp42_;
					g_propagate_error (error, _inner_error_);
					_g_free0 (val);
					_g_free0 (substring);
					_g_free0 (remainder);
					_g_free0 (_result_);
					return NULL;
				}
				_tmp43_ = _result_;
				_tmp44_ = val;
				_tmp45_ = g_strconcat (_tmp43_, _tmp44_, NULL);
				_g_free0 (_result_);
				_result_ = _tmp45_;
				_tmp46_ = end;
				_tmp47_ = closing;
				end = _tmp46_ + (_tmp47_ + 1);
				_g_free0 (val);
				_g_free0 (substring);
			}
		}
		_g_free0 (remainder);
	}
	_tmp48_ = _result_;
	_tmp49_ = str;
	_tmp50_ = end;
	_tmp51_ = str;
	_tmp52_ = strlen (_tmp51_);
	_tmp53_ = _tmp52_;
	_tmp54_ = string_slice (_tmp49_, (glong) _tmp50_, (glong) _tmp53_);
	_tmp55_ = _tmp54_;
	_tmp56_ = g_strconcat (_tmp48_, _tmp55_, NULL);
	_tmp57_ = _tmp56_;
	_g_free0 (_tmp55_);
	result = _tmp57_;
	_g_free0 (_result_);
	return result;
}


gboolean wixl_preprocessor_eval_condition (WixlPreprocessor* self, const gchar* str, GFile* file, GError** error) {
	gboolean result = FALSE;
	WixlPreprocessorEvalCondition* evaluator = NULL;
	GFile* _tmp0_ = NULL;
	WixlPreprocessorEvalCondition* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (str != NULL, FALSE);
	_tmp0_ = file;
	_tmp1_ = wixl_preprocessor_eval_condition_new (self, _tmp0_);
	evaluator = _tmp1_;
	_tmp3_ = str;
	_tmp4_ = wixl_preprocessor_eval_condition_eval (evaluator, _tmp3_, &_inner_error_);
	_tmp2_ = _tmp4_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp5_ = FALSE;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (evaluator);
		return _tmp5_;
	}
	result = _tmp2_;
	_g_object_unref0 (evaluator);
	return result;
}


static void wixl_preprocessor_print (WixlPreprocessor* self, const gchar* prefix, WixlPreprocessorLocation* loc, const gchar* msg) {
	FILE* _tmp0_ = NULL;
	WixlPreprocessorLocation* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (prefix != NULL);
	g_return_if_fail (loc != NULL);
	g_return_if_fail (msg != NULL);
	_tmp0_ = stderr;
	_tmp1_ = loc;
	_tmp2_ = wixl_preprocessor_location_to_string (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_strconcat (_tmp3_, ": ", NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = prefix;
	_tmp7_ = g_strconcat (_tmp5_, _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strconcat (_tmp8_, ": ", NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = msg;
	_tmp12_ = g_strconcat (_tmp10_, _tmp11_, NULL);
	_tmp13_ = _tmp12_;
	_tmp14_ = g_strconcat (_tmp13_, "\n", NULL);
	_tmp15_ = _tmp14_;
	fprintf (_tmp0_, "%s", _tmp15_);
	_g_free0 (_tmp15_);
	_g_free0 (_tmp13_);
	_g_free0 (_tmp10_);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
}


static gpointer _wixl_preprocessor_if_context_ref0 (gpointer self) {
	return self ? wixl_preprocessor_if_context_ref (self) : NULL;
}


static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _result_ = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static void _wixl_preprocessor_if_context_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (wixl_preprocessor_if_context_unref (var), NULL));
}


static void _g_queue_free__wixl_preprocessor_if_context_unref0_ (GQueue* self) {
	g_queue_foreach (self, (GFunc) _wixl_preprocessor_if_context_unref0_, NULL);
	g_queue_free (self);
}


static inline GRegex* _thread_safe_regex_init (GRegex** re, const gchar * pattern, GRegexMatchFlags match_options) {
	if (g_once_init_enter ((volatile gsize*) re)) {
		GRegex* val = g_regex_new (pattern, match_options, 0, NULL);
		g_once_init_leave ((volatile gsize*) re, (gsize) val);
	}
	return *re;
}


static gpointer _g_regex_ref0 (gpointer self) {
	return self ? g_regex_ref (self) : NULL;
}


static void wixl_preprocessor_preprocess_xml (WixlPreprocessor* self, xmlTextReader* reader, xmlTextWriter* writer, GFile* file, gboolean is_include, GError** error) {
	WixlPreprocessorIfContext* context = NULL;
	WixlPreprocessorIfContext* _tmp0_ = NULL;
	GQueue* ifstack = NULL;
	GQueue* _tmp1_ = NULL;
	GQueue* _tmp205_ = NULL;
	gboolean _tmp206_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (reader != NULL);
	g_return_if_fail (writer != NULL);
	_tmp0_ = wixl_preprocessor_if_context_new (TRUE, TRUE, WIXL_PREPROCESSOR_IF_CONTEXT_STATE_UNKNOWN);
	context = _tmp0_;
	_tmp1_ = g_queue_new ();
	ifstack = _tmp1_;
	while (TRUE) {
		xmlTextReader* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		WixlPreprocessorLocation* loc = NULL;
		xmlTextReader* _tmp4_ = NULL;
		GFile* _tmp5_ = NULL;
		WixlPreprocessorLocation* _tmp6_ = NULL;
		gboolean handled = FALSE;
		xmlTextReader* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		gboolean _tmp85_ = FALSE;
		gboolean _tmp86_ = FALSE;
		gboolean _tmp87_ = FALSE;
		xmlTextReader* _tmp93_ = NULL;
		gint _tmp94_ = 0;
		_tmp2_ = reader;
		_tmp3_ = xmlTextReaderRead (_tmp2_);
		if (!(_tmp3_ > 0)) {
			break;
		}
		_tmp4_ = reader;
		_tmp5_ = file;
		_tmp6_ = wixl_preprocessor_location_new (_tmp4_, _tmp5_);
		loc = _tmp6_;
		handled = FALSE;
		_tmp7_ = reader;
		_tmp8_ = xmlTextReaderNodeType (_tmp7_);
		if (_tmp8_ == ((gint) XML_READER_TYPE_PROCESSING_INSTRUCTION)) {
			xmlTextReader* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			const gchar* _tmp11_ = NULL;
			GQuark _tmp13_ = 0U;
			static GQuark _tmp12_label0 = 0;
			static GQuark _tmp12_label1 = 0;
			static GQuark _tmp12_label2 = 0;
			static GQuark _tmp12_label3 = 0;
			static GQuark _tmp12_label4 = 0;
			handled = TRUE;
			_tmp9_ = reader;
			_tmp10_ = xmlTextReaderConstLocalName (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp13_ = (NULL == _tmp11_) ? 0 : g_quark_from_string (_tmp11_);
			if (_tmp13_ == ((0 != _tmp12_label0) ? _tmp12_label0 : (_tmp12_label0 = g_quark_from_static_string ("ifdef")))) {
				switch (0) {
					default:
					{
						GQueue* _tmp14_ = NULL;
						WixlPreprocessorIfContext* _tmp15_ = NULL;
						WixlPreprocessorIfContext* _tmp16_ = NULL;
						gchar* value = NULL;
						xmlTextReader* _tmp17_ = NULL;
						const gchar* _tmp18_ = NULL;
						gchar* _tmp19_ = NULL;
						gboolean _tmp20_ = FALSE;
						WixlPreprocessorIfContext* _tmp21_ = NULL;
						gboolean _tmp22_ = FALSE;
						gchar* _tmp26_ = NULL;
						const gchar* _tmp27_ = NULL;
						GFile* _tmp28_ = NULL;
						gchar* _tmp29_ = NULL;
						gchar* _tmp30_ = NULL;
						gchar* _tmp31_ = NULL;
						WixlPreprocessorIfContext* _tmp32_ = NULL;
						_tmp14_ = ifstack;
						_tmp15_ = context;
						_tmp16_ = _wixl_preprocessor_if_context_ref0 (_tmp15_);
						g_queue_push_head (_tmp14_, _tmp16_);
						_tmp17_ = reader;
						_tmp18_ = xmlTextReaderConstValue (_tmp17_);
						_tmp19_ = string_strip (_tmp18_);
						value = _tmp19_;
						_tmp21_ = context;
						_tmp22_ = _tmp21_->enabled;
						if (_tmp22_) {
							WixlPreprocessorIfContext* _tmp23_ = NULL;
							gboolean _tmp24_ = FALSE;
							gboolean _tmp25_ = FALSE;
							_tmp23_ = context;
							_tmp24_ = wixl_preprocessor_if_context_get_is_true (_tmp23_);
							_tmp25_ = _tmp24_;
							_tmp20_ = _tmp25_;
						} else {
							_tmp20_ = FALSE;
						}
						_tmp27_ = value;
						_tmp28_ = file;
						_tmp29_ = wixl_preprocessor_eval_variable (self, _tmp27_, _tmp28_, &_inner_error_);
						_tmp26_ = _tmp29_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							g_propagate_error (error, _inner_error_);
							_g_free0 (value);
							_g_object_unref0 (loc);
							__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
							_wixl_preprocessor_if_context_unref0 (context);
							return;
						}
						_tmp30_ = _tmp26_;
						_tmp26_ = NULL;
						_tmp31_ = _tmp30_;
						_tmp32_ = wixl_preprocessor_if_context_new (_tmp20_, _tmp31_ != NULL, WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF);
						_wixl_preprocessor_if_context_unref0 (context);
						context = _tmp32_;
						_g_free0 (_tmp31_);
						_g_free0 (_tmp26_);
						_g_free0 (value);
						break;
					}
				}
			} else if (_tmp13_ == ((0 != _tmp12_label1) ? _tmp12_label1 : (_tmp12_label1 = g_quark_from_static_string ("ifndef")))) {
				switch (0) {
					default:
					{
						GQueue* _tmp33_ = NULL;
						WixlPreprocessorIfContext* _tmp34_ = NULL;
						WixlPreprocessorIfContext* _tmp35_ = NULL;
						gchar* value = NULL;
						xmlTextReader* _tmp36_ = NULL;
						const gchar* _tmp37_ = NULL;
						gchar* _tmp38_ = NULL;
						gboolean _tmp39_ = FALSE;
						WixlPreprocessorIfContext* _tmp40_ = NULL;
						gboolean _tmp41_ = FALSE;
						gchar* _tmp45_ = NULL;
						const gchar* _tmp46_ = NULL;
						GFile* _tmp47_ = NULL;
						gchar* _tmp48_ = NULL;
						gchar* _tmp49_ = NULL;
						gchar* _tmp50_ = NULL;
						WixlPreprocessorIfContext* _tmp51_ = NULL;
						_tmp33_ = ifstack;
						_tmp34_ = context;
						_tmp35_ = _wixl_preprocessor_if_context_ref0 (_tmp34_);
						g_queue_push_head (_tmp33_, _tmp35_);
						_tmp36_ = reader;
						_tmp37_ = xmlTextReaderConstValue (_tmp36_);
						_tmp38_ = string_strip (_tmp37_);
						value = _tmp38_;
						_tmp40_ = context;
						_tmp41_ = _tmp40_->enabled;
						if (_tmp41_) {
							WixlPreprocessorIfContext* _tmp42_ = NULL;
							gboolean _tmp43_ = FALSE;
							gboolean _tmp44_ = FALSE;
							_tmp42_ = context;
							_tmp43_ = wixl_preprocessor_if_context_get_is_true (_tmp42_);
							_tmp44_ = _tmp43_;
							_tmp39_ = _tmp44_;
						} else {
							_tmp39_ = FALSE;
						}
						_tmp46_ = value;
						_tmp47_ = file;
						_tmp48_ = wixl_preprocessor_eval_variable (self, _tmp46_, _tmp47_, &_inner_error_);
						_tmp45_ = _tmp48_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							g_propagate_error (error, _inner_error_);
							_g_free0 (value);
							_g_object_unref0 (loc);
							__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
							_wixl_preprocessor_if_context_unref0 (context);
							return;
						}
						_tmp49_ = _tmp45_;
						_tmp45_ = NULL;
						_tmp50_ = _tmp49_;
						_tmp51_ = wixl_preprocessor_if_context_new (_tmp39_, _tmp50_ == NULL, WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF);
						_wixl_preprocessor_if_context_unref0 (context);
						context = _tmp51_;
						_g_free0 (_tmp50_);
						_g_free0 (_tmp45_);
						_g_free0 (value);
						break;
					}
				}
			} else if (_tmp13_ == ((0 != _tmp12_label2) ? _tmp12_label2 : (_tmp12_label2 = g_quark_from_static_string ("else")))) {
				switch (0) {
					default:
					{
						GQueue* _tmp52_ = NULL;
						gboolean _tmp53_ = FALSE;
						WixlPreprocessorIfContext* _tmp55_ = NULL;
						WixlPreprocessorIfContextState _tmp56_ = 0;
						gboolean _tmp57_ = FALSE;
						WixlPreprocessorIfContext* _tmp59_ = NULL;
						WixlPreprocessorIfContext* _tmp60_ = NULL;
						WixlPreprocessorIfContext* _tmp61_ = NULL;
						gboolean _tmp62_ = FALSE;
						_tmp52_ = ifstack;
						_tmp53_ = g_queue_is_empty (_tmp52_);
						if (_tmp53_) {
							GError* _tmp54_ = NULL;
							_tmp54_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "Unmatched else");
							_inner_error_ = _tmp54_;
							g_propagate_error (error, _inner_error_);
							_g_object_unref0 (loc);
							__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
							_wixl_preprocessor_if_context_unref0 (context);
							return;
						}
						_tmp55_ = context;
						_tmp56_ = _tmp55_->state;
						_tmp57_ = wixl_preprocessor_if_context_state_in_if (_tmp56_);
						if (!_tmp57_) {
							GError* _tmp58_ = NULL;
							_tmp58_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "Unmatched else");
							_inner_error_ = _tmp58_;
							g_propagate_error (error, _inner_error_);
							_g_object_unref0 (loc);
							__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
							_wixl_preprocessor_if_context_unref0 (context);
							return;
						}
						_tmp59_ = context;
						_tmp59_->state = WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSE;
						_tmp60_ = context;
						_tmp61_ = context;
						_tmp62_ = _tmp61_->never_true;
						wixl_preprocessor_if_context_set_is_true (_tmp60_, _tmp62_);
						break;
					}
				}
			} else if (_tmp13_ == ((0 != _tmp12_label3) ? _tmp12_label3 : (_tmp12_label3 = g_quark_from_static_string ("endif")))) {
				switch (0) {
					default:
					{
						GQueue* _tmp63_ = NULL;
						gboolean _tmp64_ = FALSE;
						GQueue* _tmp66_ = NULL;
						gpointer _tmp67_ = NULL;
						_tmp63_ = ifstack;
						_tmp64_ = g_queue_is_empty (_tmp63_);
						if (_tmp64_) {
							GError* _tmp65_ = NULL;
							_tmp65_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "Unmatched endif");
							_inner_error_ = _tmp65_;
							g_propagate_error (error, _inner_error_);
							_g_object_unref0 (loc);
							__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
							_wixl_preprocessor_if_context_unref0 (context);
							return;
						}
						_tmp66_ = ifstack;
						_tmp67_ = g_queue_pop_head (_tmp66_);
						_wixl_preprocessor_if_context_unref0 (context);
						context = (WixlPreprocessorIfContext*) _tmp67_;
						break;
					}
				}
			} else if (_tmp13_ == ((0 != _tmp12_label4) ? _tmp12_label4 : (_tmp12_label4 = g_quark_from_static_string ("if")))) {
				switch (0) {
					default:
					{
						GQueue* _tmp68_ = NULL;
						WixlPreprocessorIfContext* _tmp69_ = NULL;
						WixlPreprocessorIfContext* _tmp70_ = NULL;
						gchar* value = NULL;
						xmlTextReader* _tmp71_ = NULL;
						const gchar* _tmp72_ = NULL;
						gchar* _tmp73_ = NULL;
						gboolean _tmp74_ = FALSE;
						WixlPreprocessorIfContext* _tmp75_ = NULL;
						gboolean _tmp76_ = FALSE;
						gboolean _tmp80_ = FALSE;
						const gchar* _tmp81_ = NULL;
						GFile* _tmp82_ = NULL;
						gboolean _tmp83_ = FALSE;
						WixlPreprocessorIfContext* _tmp84_ = NULL;
						_tmp68_ = ifstack;
						_tmp69_ = context;
						_tmp70_ = _wixl_preprocessor_if_context_ref0 (_tmp69_);
						g_queue_push_head (_tmp68_, _tmp70_);
						_tmp71_ = reader;
						_tmp72_ = xmlTextReaderConstValue (_tmp71_);
						_tmp73_ = string_strip (_tmp72_);
						value = _tmp73_;
						_tmp75_ = context;
						_tmp76_ = _tmp75_->enabled;
						if (_tmp76_) {
							WixlPreprocessorIfContext* _tmp77_ = NULL;
							gboolean _tmp78_ = FALSE;
							gboolean _tmp79_ = FALSE;
							_tmp77_ = context;
							_tmp78_ = wixl_preprocessor_if_context_get_is_true (_tmp77_);
							_tmp79_ = _tmp78_;
							_tmp74_ = _tmp79_;
						} else {
							_tmp74_ = FALSE;
						}
						_tmp81_ = value;
						_tmp82_ = file;
						_tmp83_ = wixl_preprocessor_eval_condition (self, _tmp81_, _tmp82_, &_inner_error_);
						_tmp80_ = _tmp83_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							g_propagate_error (error, _inner_error_);
							_g_free0 (value);
							_g_object_unref0 (loc);
							__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
							_wixl_preprocessor_if_context_unref0 (context);
							return;
						}
						_tmp84_ = wixl_preprocessor_if_context_new (_tmp74_, _tmp80_, WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF);
						_wixl_preprocessor_if_context_unref0 (context);
						context = _tmp84_;
						_g_free0 (value);
						break;
					}
				}
			} else {
				switch (0) {
					default:
					{
						handled = FALSE;
						break;
					}
				}
			}
		}
		_tmp87_ = handled;
		if (_tmp87_) {
			_tmp86_ = TRUE;
		} else {
			WixlPreprocessorIfContext* _tmp88_ = NULL;
			gboolean _tmp89_ = FALSE;
			_tmp88_ = context;
			_tmp89_ = _tmp88_->enabled;
			_tmp86_ = !_tmp89_;
		}
		if (_tmp86_) {
			_tmp85_ = TRUE;
		} else {
			WixlPreprocessorIfContext* _tmp90_ = NULL;
			gboolean _tmp91_ = FALSE;
			gboolean _tmp92_ = FALSE;
			_tmp90_ = context;
			_tmp91_ = wixl_preprocessor_if_context_get_is_true (_tmp90_);
			_tmp92_ = _tmp91_;
			_tmp85_ = !_tmp92_;
		}
		if (_tmp85_) {
			_g_object_unref0 (loc);
			continue;
		}
		_tmp93_ = reader;
		_tmp94_ = xmlTextReaderNodeType (_tmp93_);
		switch (_tmp94_) {
			case XML_READER_TYPE_PROCESSING_INSTRUCTION:
			{
				xmlTextReader* _tmp95_ = NULL;
				const gchar* _tmp96_ = NULL;
				const gchar* _tmp97_ = NULL;
				GQuark _tmp99_ = 0U;
				static GQuark _tmp98_label0 = 0;
				static GQuark _tmp98_label1 = 0;
				static GQuark _tmp98_label2 = 0;
				static GQuark _tmp98_label3 = 0;
				static GQuark _tmp98_label4 = 0;
				static GQuark _tmp98_label5 = 0;
				_tmp95_ = reader;
				_tmp96_ = xmlTextReaderConstLocalName (_tmp95_);
				_tmp97_ = _tmp96_;
				_tmp99_ = (NULL == _tmp97_) ? 0 : g_quark_from_string (_tmp97_);
				if (_tmp99_ == ((0 != _tmp98_label0) ? _tmp98_label0 : (_tmp98_label0 = g_quark_from_static_string ("define")))) {
					switch (0) {
						default:
						{
							GMatchInfo* info = NULL;
							GRegex* r = NULL;
							GRegex* _tmp100_ = NULL;
							GRegex* _tmp101_ = NULL;
							xmlTextReader* _tmp102_ = NULL;
							const gchar* _tmp103_ = NULL;
							GMatchInfo* _tmp104_ = NULL;
							gboolean _tmp105_ = FALSE;
							_tmp100_ = _g_regex_ref0 (_thread_safe_regex_init (&_tmp_regex_0, "^\\s*(?P<name>.+?)\\s*=\\s*(?P<value>.+?)\\s*$", 0));
							r = _tmp100_;
							_tmp101_ = r;
							_tmp102_ = reader;
							_tmp103_ = xmlTextReaderConstValue (_tmp102_);
							_tmp105_ = g_regex_match (_tmp101_, _tmp103_, 0, &_tmp104_);
							_g_match_info_unref0 (info);
							info = _tmp104_;
							if (_tmp105_) {
								gchar* name = NULL;
								GMatchInfo* _tmp106_ = NULL;
								gchar* _tmp107_ = NULL;
								gchar* _tmp108_ = NULL;
								gchar* _tmp109_ = NULL;
								gchar* _tmp110_ = NULL;
								gchar* value = NULL;
								GMatchInfo* _tmp111_ = NULL;
								gchar* _tmp112_ = NULL;
								gchar* _tmp113_ = NULL;
								gchar* _tmp114_ = NULL;
								gchar* _tmp115_ = NULL;
								const gchar* _tmp116_ = NULL;
								const gchar* _tmp117_ = NULL;
								_tmp106_ = info;
								_tmp107_ = g_match_info_fetch_named (_tmp106_, "name");
								_tmp108_ = _tmp107_;
								_tmp109_ = wixl_remove_prefix ("var.", _tmp108_);
								_tmp110_ = _tmp109_;
								_g_free0 (_tmp108_);
								name = _tmp110_;
								_tmp111_ = info;
								_tmp112_ = g_match_info_fetch_named (_tmp111_, "value");
								_tmp113_ = _tmp112_;
								_tmp114_ = wixl_unquote (_tmp113_);
								_tmp115_ = _tmp114_;
								_g_free0 (_tmp113_);
								value = _tmp115_;
								_tmp116_ = name;
								_tmp117_ = value;
								wixl_preprocessor_define_variable (self, _tmp116_, _tmp117_);
								_g_free0 (value);
								_g_free0 (name);
							} else {
								GError* _tmp118_ = NULL;
								_tmp118_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "invalid define");
								_inner_error_ = _tmp118_;
								g_propagate_error (error, _inner_error_);
								_g_regex_unref0 (r);
								_g_match_info_unref0 (info);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_g_regex_unref0 (r);
							_g_match_info_unref0 (info);
							break;
						}
					}
				} else if (_tmp99_ == ((0 != _tmp98_label1) ? _tmp98_label1 : (_tmp98_label1 = g_quark_from_static_string ("undef")))) {
					switch (0) {
						default:
						{
							gchar* value = NULL;
							xmlTextReader* _tmp119_ = NULL;
							const gchar* _tmp120_ = NULL;
							gchar* _tmp121_ = NULL;
							const gchar* _tmp122_ = NULL;
							_tmp119_ = reader;
							_tmp120_ = xmlTextReaderConstValue (_tmp119_);
							_tmp121_ = string_strip (_tmp120_);
							value = _tmp121_;
							_tmp122_ = value;
							wixl_preprocessor_undefine_variable (self, _tmp122_);
							_g_free0 (value);
							break;
						}
					}
				} else if (_tmp99_ == ((0 != _tmp98_label2) ? _tmp98_label2 : (_tmp98_label2 = g_quark_from_static_string ("require")))) {
					switch (0) {
						default:
						{
							gchar* _tmp123_ = NULL;
							xmlTextReader* _tmp124_ = NULL;
							const gchar* _tmp125_ = NULL;
							GFile* _tmp126_ = NULL;
							gchar* _tmp127_ = NULL;
							gchar* value = NULL;
							gchar* _tmp128_ = NULL;
							gchar* _tmp129_ = NULL;
							gchar* _tmp130_ = NULL;
							gchar* _tmp131_ = NULL;
							const gchar* _tmp132_ = NULL;
							WixlPreprocessorLocation* _tmp133_ = NULL;
							xmlTextWriter* _tmp134_ = NULL;
							_tmp124_ = reader;
							_tmp125_ = xmlTextReaderConstValue (_tmp124_);
							_tmp126_ = file;
							_tmp127_ = wixl_preprocessor_eval (self, _tmp125_, _tmp126_, &_inner_error_);
							_tmp123_ = _tmp127_;
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_tmp128_ = _tmp123_;
							_tmp123_ = NULL;
							_tmp129_ = _tmp128_;
							_tmp130_ = string_strip (_tmp129_);
							_tmp131_ = _tmp130_;
							_g_free0 (_tmp129_);
							value = _tmp131_;
							_tmp132_ = value;
							_tmp133_ = loc;
							_tmp134_ = writer;
							wixl_preprocessor_include (self, _tmp132_, _tmp133_, _tmp134_, TRUE, &_inner_error_);
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_free0 (value);
								_g_free0 (_tmp123_);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_g_free0 (value);
							_g_free0 (_tmp123_);
							break;
						}
					}
				} else if (_tmp99_ == ((0 != _tmp98_label3) ? _tmp98_label3 : (_tmp98_label3 = g_quark_from_static_string ("include")))) {
					switch (0) {
						default:
						{
							gchar* _tmp135_ = NULL;
							xmlTextReader* _tmp136_ = NULL;
							const gchar* _tmp137_ = NULL;
							GFile* _tmp138_ = NULL;
							gchar* _tmp139_ = NULL;
							gchar* value = NULL;
							gchar* _tmp140_ = NULL;
							gchar* _tmp141_ = NULL;
							gchar* _tmp142_ = NULL;
							gchar* _tmp143_ = NULL;
							const gchar* _tmp144_ = NULL;
							WixlPreprocessorLocation* _tmp145_ = NULL;
							xmlTextWriter* _tmp146_ = NULL;
							_tmp136_ = reader;
							_tmp137_ = xmlTextReaderConstValue (_tmp136_);
							_tmp138_ = file;
							_tmp139_ = wixl_preprocessor_eval (self, _tmp137_, _tmp138_, &_inner_error_);
							_tmp135_ = _tmp139_;
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_tmp140_ = _tmp135_;
							_tmp135_ = NULL;
							_tmp141_ = _tmp140_;
							_tmp142_ = string_strip (_tmp141_);
							_tmp143_ = _tmp142_;
							_g_free0 (_tmp141_);
							value = _tmp143_;
							_tmp144_ = value;
							_tmp145_ = loc;
							_tmp146_ = writer;
							wixl_preprocessor_include (self, _tmp144_, _tmp145_, _tmp146_, FALSE, &_inner_error_);
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_free0 (value);
								_g_free0 (_tmp135_);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_g_free0 (value);
							_g_free0 (_tmp135_);
							break;
						}
					}
				} else if (_tmp99_ == ((0 != _tmp98_label4) ? _tmp98_label4 : (_tmp98_label4 = g_quark_from_static_string ("warning")))) {
					switch (0) {
						default:
						{
							gchar* _tmp147_ = NULL;
							xmlTextReader* _tmp148_ = NULL;
							const gchar* _tmp149_ = NULL;
							GFile* _tmp150_ = NULL;
							gchar* _tmp151_ = NULL;
							WixlPreprocessorLocation* _tmp152_ = NULL;
							_tmp148_ = reader;
							_tmp149_ = xmlTextReaderConstValue (_tmp148_);
							_tmp150_ = file;
							_tmp151_ = wixl_preprocessor_eval (self, _tmp149_, _tmp150_, &_inner_error_);
							_tmp147_ = _tmp151_;
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_tmp152_ = loc;
							wixl_preprocessor_print (self, "warning", _tmp152_, _tmp147_);
							_g_free0 (_tmp147_);
							break;
						}
					}
				} else if (_tmp99_ == ((0 != _tmp98_label5) ? _tmp98_label5 : (_tmp98_label5 = g_quark_from_static_string ("error")))) {
					switch (0) {
						default:
						{
							gchar* _tmp153_ = NULL;
							xmlTextReader* _tmp154_ = NULL;
							const gchar* _tmp155_ = NULL;
							GFile* _tmp156_ = NULL;
							gchar* _tmp157_ = NULL;
							WixlPreprocessorLocation* _tmp158_ = NULL;
							_tmp154_ = reader;
							_tmp155_ = xmlTextReaderConstValue (_tmp154_);
							_tmp156_ = file;
							_tmp157_ = wixl_preprocessor_eval (self, _tmp155_, _tmp156_, &_inner_error_);
							_tmp153_ = _tmp157_;
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_object_unref0 (loc);
								__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
								_wixl_preprocessor_if_context_unref0 (context);
								return;
							}
							_tmp158_ = loc;
							wixl_preprocessor_print (self, "error", _tmp158_, _tmp153_);
							exit (1);
							_g_free0 (_tmp153_);
							break;
						}
					}
				} else {
					switch (0) {
						default:
						{
							xmlTextReader* _tmp159_ = NULL;
							const gchar* _tmp160_ = NULL;
							_tmp159_ = reader;
							_tmp160_ = xmlTextReaderConstLocalName (_tmp159_);
							g_warning ("preprocessor.vala:455: unhandled preprocessor instruction %s", _tmp160_);
							break;
						}
					}
				}
				break;
			}
			case XML_READER_TYPE_ELEMENT:
			{
				gboolean empty = FALSE;
				xmlTextReader* _tmp161_ = NULL;
				gint _tmp162_ = 0;
				gboolean _tmp163_ = FALSE;
				gboolean _tmp164_ = FALSE;
				gboolean _tmp165_ = FALSE;
				xmlTextWriter* _tmp170_ = NULL;
				xmlTextReader* _tmp171_ = NULL;
				const gchar* _tmp172_ = NULL;
				gboolean _tmp183_ = FALSE;
				_tmp161_ = reader;
				_tmp162_ = xmlTextReaderIsEmptyElement (_tmp161_);
				empty = _tmp162_ > 0;
				_tmp165_ = is_include;
				if (_tmp165_) {
					xmlTextReader* _tmp166_ = NULL;
					gint _tmp167_ = 0;
					_tmp166_ = reader;
					_tmp167_ = xmlTextReaderDepth (_tmp166_);
					_tmp164_ = _tmp167_ == 0;
				} else {
					_tmp164_ = FALSE;
				}
				if (_tmp164_) {
					xmlTextReader* _tmp168_ = NULL;
					const gchar* _tmp169_ = NULL;
					_tmp168_ = reader;
					_tmp169_ = xmlTextReaderConstName (_tmp168_);
					_tmp163_ = g_strcmp0 (_tmp169_, "Include") == 0;
				} else {
					_tmp163_ = FALSE;
				}
				if (_tmp163_) {
					break;
				}
				_tmp170_ = writer;
				_tmp171_ = reader;
				_tmp172_ = xmlTextReaderConstName (_tmp171_);
				xmlTextWriterStartElement (_tmp170_, _tmp172_);
				while (TRUE) {
					xmlTextReader* _tmp173_ = NULL;
					gint _tmp174_ = 0;
					gchar* value = NULL;
					xmlTextReader* _tmp175_ = NULL;
					const gchar* _tmp176_ = NULL;
					GFile* _tmp177_ = NULL;
					gchar* _tmp178_ = NULL;
					xmlTextWriter* _tmp179_ = NULL;
					xmlTextReader* _tmp180_ = NULL;
					const gchar* _tmp181_ = NULL;
					const gchar* _tmp182_ = NULL;
					_tmp173_ = reader;
					_tmp174_ = xmlTextReaderMoveToNextAttribute (_tmp173_);
					if (!(_tmp174_ > 0)) {
						break;
					}
					_tmp175_ = reader;
					_tmp176_ = xmlTextReaderConstValue (_tmp175_);
					_tmp177_ = file;
					_tmp178_ = wixl_preprocessor_eval (self, _tmp176_, _tmp177_, &_inner_error_);
					value = _tmp178_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						g_propagate_error (error, _inner_error_);
						_g_object_unref0 (loc);
						__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
						_wixl_preprocessor_if_context_unref0 (context);
						return;
					}
					_tmp179_ = writer;
					_tmp180_ = reader;
					_tmp181_ = xmlTextReaderConstName (_tmp180_);
					_tmp182_ = value;
					xmlTextWriterWriteAttribute (_tmp179_, _tmp181_, _tmp182_);
					_g_free0 (value);
				}
				_tmp183_ = empty;
				if (_tmp183_) {
					xmlTextWriter* _tmp184_ = NULL;
					_tmp184_ = writer;
					xmlTextWriterEndElement (_tmp184_);
				}
				break;
			}
			case XML_READER_TYPE_END_ELEMENT:
			{
				gboolean _tmp185_ = FALSE;
				gboolean _tmp186_ = FALSE;
				gboolean _tmp187_ = FALSE;
				xmlTextWriter* _tmp192_ = NULL;
				_tmp187_ = is_include;
				if (_tmp187_) {
					xmlTextReader* _tmp188_ = NULL;
					gint _tmp189_ = 0;
					_tmp188_ = reader;
					_tmp189_ = xmlTextReaderDepth (_tmp188_);
					_tmp186_ = _tmp189_ == 0;
				} else {
					_tmp186_ = FALSE;
				}
				if (_tmp186_) {
					xmlTextReader* _tmp190_ = NULL;
					const gchar* _tmp191_ = NULL;
					_tmp190_ = reader;
					_tmp191_ = xmlTextReaderConstName (_tmp190_);
					_tmp185_ = g_strcmp0 (_tmp191_, "Include") == 0;
				} else {
					_tmp185_ = FALSE;
				}
				if (_tmp185_) {
					break;
				}
				_tmp192_ = writer;
				xmlTextWriterEndElement (_tmp192_);
				break;
			}
			case XML_READER_TYPE_TEXT:
			{
				gchar* _tmp193_ = NULL;
				xmlTextReader* _tmp194_ = NULL;
				const gchar* _tmp195_ = NULL;
				GFile* _tmp196_ = NULL;
				gchar* _tmp197_ = NULL;
				xmlTextWriter* _tmp198_ = NULL;
				_tmp194_ = reader;
				_tmp195_ = xmlTextReaderConstValue (_tmp194_);
				_tmp196_ = file;
				_tmp197_ = wixl_preprocessor_eval (self, _tmp195_, _tmp196_, &_inner_error_);
				_tmp193_ = _tmp197_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_propagate_error (error, _inner_error_);
					_g_object_unref0 (loc);
					__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
					_wixl_preprocessor_if_context_unref0 (context);
					return;
				}
				_tmp198_ = writer;
				xmlTextWriterWriteString (_tmp198_, _tmp193_);
				_g_free0 (_tmp193_);
				break;
			}
			case XML_READER_TYPE_CDATA:
			{
				gchar* _tmp199_ = NULL;
				xmlTextReader* _tmp200_ = NULL;
				const gchar* _tmp201_ = NULL;
				GFile* _tmp202_ = NULL;
				gchar* _tmp203_ = NULL;
				xmlTextWriter* _tmp204_ = NULL;
				_tmp200_ = reader;
				_tmp201_ = xmlTextReaderConstValue (_tmp200_);
				_tmp202_ = file;
				_tmp203_ = wixl_preprocessor_eval (self, _tmp201_, _tmp202_, &_inner_error_);
				_tmp199_ = _tmp203_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_propagate_error (error, _inner_error_);
					_g_object_unref0 (loc);
					__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
					_wixl_preprocessor_if_context_unref0 (context);
					return;
				}
				_tmp204_ = writer;
				xmlTextWriterWriteCDATA (_tmp204_, _tmp199_);
				_g_free0 (_tmp199_);
				break;
			}
			default:
			break;
		}
		_g_object_unref0 (loc);
	}
	_tmp205_ = ifstack;
	_tmp206_ = g_queue_is_empty (_tmp205_);
	if (!_tmp206_) {
		GError* _tmp207_ = NULL;
		_tmp207_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "Missing endif");
		_inner_error_ = _tmp207_;
		g_propagate_error (error, _inner_error_);
		__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
		_wixl_preprocessor_if_context_unref0 (context);
		return;
	}
	__g_queue_free__wixl_preprocessor_if_context_unref0_0 (ifstack);
	_wixl_preprocessor_if_context_unref0 (context);
}


static gboolean wixl_preprocessor_include_try (WixlPreprocessor* self, const gchar* filename, xmlTextWriter* writer, GError** error) {
	gboolean result = FALSE;
	gchar* data = NULL;
	GFile* file = NULL;
	const gchar* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	xmlTextReader* reader = NULL;
	const gchar* _tmp6_ = NULL;
	xmlTextReader* _tmp7_ = NULL;
	xmlTextReader* _tmp8_ = NULL;
	xmlTextWriter* _tmp9_ = NULL;
	GFile* _tmp10_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (filename != NULL, FALSE);
	g_return_val_if_fail (writer != NULL, FALSE);
	_tmp0_ = filename;
	_tmp1_ = g_file_new_for_path (_tmp0_);
	file = _tmp1_;
	{
		const gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		_tmp2_ = filename;
		g_file_get_contents (_tmp2_, &_tmp3_, NULL, &_inner_error_);
		_g_free0 (data);
		data = _tmp3_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp4_ = FALSE;
			if (_inner_error_->domain == G_FILE_ERROR) {
				goto __catch7_g_file_error;
			}
			_g_object_unref0 (file);
			_g_free0 (data);
			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);
			g_clear_error (&_inner_error_);
			return _tmp4_;
		}
	}
	goto __finally7;
	__catch7_g_file_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		result = FALSE;
		_g_error_free0 (_error_);
		_g_object_unref0 (file);
		_g_free0 (data);
		return result;
	}
	__finally7:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp5_ = FALSE;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (file);
		_g_free0 (data);
		return _tmp5_;
	}
	_tmp6_ = data;
	_tmp7_ = xmlReaderForDoc (_tmp6_, "", NULL, 0);
	reader = _tmp7_;
	_tmp8_ = reader;
	_tmp9_ = writer;
	_tmp10_ = file;
	wixl_preprocessor_preprocess_xml (self, _tmp8_, _tmp9_, _tmp10_, TRUE, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp11_ = FALSE;
		g_propagate_error (error, _inner_error_);
		_xmlFreeTextReader0 (reader);
		_g_object_unref0 (file);
		_g_free0 (data);
		return _tmp11_;
	}
	result = TRUE;
	_xmlFreeTextReader0 (reader);
	_g_object_unref0 (file);
	_g_free0 (data);
	return result;
}


static void _vala_array_add4 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _vala_array_add5 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add6 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void wixl_preprocessor_include (WixlPreprocessor* self, const gchar* name, WixlPreprocessorLocation* loc, xmlTextWriter* writer, gboolean is_req, GError** error) {
	gboolean success = FALSE;
	gboolean _tmp0_ = FALSE;
	gchar** dirs = NULL;
	gchar** _tmp6_ = NULL;
	gint dirs_length1 = 0;
	gint _dirs_size_ = 0;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	GList* _tmp10_ = NULL;
	gchar** _tmp18_ = NULL;
	gint _tmp18__length1 = 0;
	WixlPreprocessorLocation* _tmp19_ = NULL;
	GFile* _tmp20_ = NULL;
	GFile* _tmp21_ = NULL;
	GFile* _tmp22_ = NULL;
	const gchar* _tmp23_ = NULL;
	GFile* _tmp24_ = NULL;
	GFile* _tmp25_ = NULL;
	gchar* _tmp26_ = NULL;
	gchar** _tmp27_ = NULL;
	gint _tmp27__length1 = 0;
	gboolean _tmp34_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	g_return_if_fail (loc != NULL);
	g_return_if_fail (writer != NULL);
	success = FALSE;
	_tmp0_ = is_req;
	if (_tmp0_) {
		GHashTable* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		gboolean _tmp3_ = FALSE;
		GHashTable* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		_tmp1_ = self->priv->requires;
		_tmp2_ = name;
		_tmp3_ = g_hash_table_lookup_extended (_tmp1_, _tmp2_, NULL, NULL);
		if (_tmp3_) {
			return;
		}
		_tmp4_ = self->priv->requires;
		_tmp5_ = name;
		wixl_hash_table_add (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp4_, _tmp5_);
	}
	_tmp6_ = g_new0 (gchar*, 0 + 1);
	dirs = _tmp6_;
	dirs_length1 = 0;
	_dirs_size_ = dirs_length1;
	_tmp7_ = dirs;
	_tmp7__length1 = dirs_length1;
	_tmp8_ = name;
	_tmp9_ = g_strdup (_tmp8_);
	_vala_array_add4 (&dirs, &dirs_length1, &_dirs_size_, _tmp9_);
	_tmp10_ = self->priv->includedirs;
	{
		GList* dir_collection = NULL;
		GList* dir_it = NULL;
		dir_collection = _tmp10_;
		for (dir_it = dir_collection; dir_it != NULL; dir_it = dir_it->next) {
			GFile* _tmp11_ = NULL;
			GFile* dir = NULL;
			_tmp11_ = _g_object_ref0 ((GFile*) dir_it->data);
			dir = _tmp11_;
			{
				gchar** _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				GFile* _tmp13_ = NULL;
				const gchar* _tmp14_ = NULL;
				GFile* _tmp15_ = NULL;
				GFile* _tmp16_ = NULL;
				gchar* _tmp17_ = NULL;
				_tmp12_ = dirs;
				_tmp12__length1 = dirs_length1;
				_tmp13_ = dir;
				_tmp14_ = name;
				_tmp15_ = g_file_get_child (_tmp13_, _tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = g_file_get_path (_tmp16_);
				_vala_array_add5 (&dirs, &dirs_length1, &_dirs_size_, _tmp17_);
				_g_object_unref0 (_tmp16_);
				_g_object_unref0 (dir);
			}
		}
	}
	_tmp18_ = dirs;
	_tmp18__length1 = dirs_length1;
	_tmp19_ = loc;
	_tmp20_ = _tmp19_->file;
	_tmp21_ = g_file_get_parent (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = name;
	_tmp24_ = g_file_get_child (_tmp22_, _tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = g_file_get_path (_tmp25_);
	_vala_array_add6 (&dirs, &dirs_length1, &_dirs_size_, _tmp26_);
	_g_object_unref0 (_tmp25_);
	_g_object_unref0 (_tmp22_);
	_tmp27_ = dirs;
	_tmp27__length1 = dirs_length1;
	{
		gchar** inc_collection = NULL;
		gint inc_collection_length1 = 0;
		gint _inc_collection_size_ = 0;
		gint inc_it = 0;
		inc_collection = _tmp27_;
		inc_collection_length1 = _tmp27__length1;
		for (inc_it = 0; inc_it < _tmp27__length1; inc_it = inc_it + 1) {
			gchar* _tmp28_ = NULL;
			gchar* inc = NULL;
			_tmp28_ = g_strdup (inc_collection[inc_it]);
			inc = _tmp28_;
			{
				gboolean _tmp29_ = FALSE;
				const gchar* _tmp30_ = NULL;
				xmlTextWriter* _tmp31_ = NULL;
				gboolean _tmp32_ = FALSE;
				gboolean _tmp33_ = FALSE;
				_tmp30_ = inc;
				_tmp31_ = writer;
				_tmp32_ = wixl_preprocessor_include_try (self, _tmp30_, _tmp31_, &_inner_error_);
				_tmp29_ = _tmp32_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					g_propagate_error (error, _inner_error_);
					_g_free0 (inc);
					dirs = (_vala_array_free (dirs, dirs_length1, (GDestroyNotify) g_free), NULL);
					return;
				}
				success = _tmp29_;
				_tmp33_ = success;
				if (_tmp33_) {
					_g_free0 (inc);
					break;
				}
				_g_free0 (inc);
			}
		}
	}
	_tmp34_ = success;
	if (!_tmp34_) {
		WixlPreprocessorLocation* _tmp35_ = NULL;
		const gchar* _tmp36_ = NULL;
		gchar* _tmp37_ = NULL;
		gchar* _tmp38_ = NULL;
		_tmp35_ = loc;
		_tmp36_ = name;
		_tmp37_ = g_strdup_printf ("Failed to include %s", _tmp36_);
		_tmp38_ = _tmp37_;
		wixl_preprocessor_print (self, "error", _tmp35_, _tmp38_);
		_g_free0 (_tmp38_);
		exit (1);
	}
	dirs = (_vala_array_free (dirs, dirs_length1, (GDestroyNotify) g_free), NULL);
}


xmlDoc* wixl_preprocessor_preprocess (WixlPreprocessor* self, const gchar* data, GFile* file, GError** error) {
	xmlDoc* result = NULL;
	xmlDoc* doc = NULL;
	xmlTextWriter* writer = NULL;
	xmlTextWriter* _tmp0_ = NULL;
	xmlTextReader* reader = NULL;
	const gchar* _tmp1_ = NULL;
	xmlTextReader* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (data != NULL, NULL);
	_tmp0_ = xmlNewTextWriterDoc (&doc, FALSE);
	writer = _tmp0_;
	_tmp1_ = data;
	_tmp2_ = xmlReaderForDoc (_tmp1_, "", NULL, 0);
	reader = _tmp2_;
	xmlTextWriterStartDocument (writer, NULL, NULL, NULL);
	_tmp3_ = file;
	wixl_preprocessor_preprocess_xml (self, reader, writer, _tmp3_, FALSE, &_inner_error_);
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_propagate_error (error, _inner_error_);
		_xmlFreeTextReader0 (reader);
		_xmlFreeTextWriter0 (writer);
		_xmlFreeDoc0 (doc);
		return NULL;
	}
	xmlTextWriterEndDocument (writer);
	result = doc;
	_xmlFreeTextReader0 (reader);
	_xmlFreeTextWriter0 (writer);
	return result;
}


static GObject * wixl_preprocessor_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	WixlPreprocessor * self;
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	parent_class = G_OBJECT_CLASS (wixl_preprocessor_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIXL_TYPE_PREPROCESSOR, WixlPreprocessor);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, _g_free0_);
	_g_hash_table_unref0 (self->priv->variables);
	self->priv->variables = _tmp2_;
	return obj;
}


static GType wixl_preprocessor_eval_condition_op_get_type (void) {
	static volatile gsize wixl_preprocessor_eval_condition_op_type_id__volatile = 0;
	if (g_once_init_enter (&wixl_preprocessor_eval_condition_op_type_id__volatile)) {
		static const GEnumValue values[] = {{WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NONE, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NONE", "none"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EQUAL, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EQUAL", "equal"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OPEN_VAR, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OPEN_VAR", "open-var"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EQ, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EQ", "eq"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EC, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_EC", "ec"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NE, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NE", "ne"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LT, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LT", "lt"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LTE, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LTE", "lte"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GT, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GT", "gt"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GTE, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GTE", "gte"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_AND, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_AND", "and"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OR, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OR", "or"}, {WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NOT, "WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NOT", "not"}, {0, NULL, NULL}};
		GType wixl_preprocessor_eval_condition_op_type_id;
		wixl_preprocessor_eval_condition_op_type_id = g_enum_register_static ("WixlPreprocessorEvalConditionOp", values);
		g_once_init_leave (&wixl_preprocessor_eval_condition_op_type_id__volatile, wixl_preprocessor_eval_condition_op_type_id);
	}
	return wixl_preprocessor_eval_condition_op_type_id__volatile;
}


static WixlPreprocessorEvalCondition* wixl_preprocessor_eval_condition_construct (GType object_type, WixlPreprocessor* pp, GFile* file) {
	WixlPreprocessorEvalCondition * self = NULL;
	GFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	WixlPreprocessor* _tmp2_ = NULL;
	WixlPreprocessor* _tmp3_ = NULL;
	g_return_val_if_fail (pp != NULL, NULL);
	self = (WixlPreprocessorEvalCondition*) g_object_new (object_type, NULL);
	_tmp0_ = file;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->file);
	self->priv->file = _tmp1_;
	_tmp2_ = pp;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->preprocessor);
	self->priv->preprocessor = _tmp3_;
	return self;
}


static WixlPreprocessorEvalCondition* wixl_preprocessor_eval_condition_new (WixlPreprocessor* pp, GFile* file) {
	return wixl_preprocessor_eval_condition_construct (WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, pp, file);
}


static gboolean wixl_preprocessor_eval_condition_to_bool (WixlPreprocessorEvalCondition* self, GValue* val) {
	gboolean result = FALSE;
	GValue _result_ = {0};
	GValue _tmp0_ = {0};
	GValue _tmp1_ = {0};
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (val != NULL, FALSE);
	g_value_init (&_tmp0_, G_TYPE_BOOLEAN);
	g_value_set_boolean (&_tmp0_, FALSE);
	_result_ = _tmp0_;
	g_value_transform (val, &_result_);
	_tmp1_ = _result_;
	result = g_value_get_boolean (&_tmp1_);
	G_IS_VALUE (&_result_) ? (g_value_unset (&_result_), NULL) : NULL;
	return result;
}


static gboolean wixl_preprocessor_eval_condition_accept (WixlPreprocessorEvalCondition* self, gint type) {
	gboolean result = FALSE;
	gboolean accepted = FALSE;
	GScanner* _tmp0_ = NULL;
	GTokenType _tmp1_ = 0;
	gint _tmp2_ = 0;
	gboolean _tmp3_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->scanner;
	_tmp1_ = g_scanner_peek_next_token (_tmp0_);
	_tmp2_ = type;
	accepted = ((gint) _tmp1_) == _tmp2_;
	_tmp3_ = accepted;
	if (_tmp3_) {
		GScanner* _tmp4_ = NULL;
		_tmp4_ = self->priv->scanner;
		g_scanner_get_next_token (_tmp4_);
	}
	result = accepted;
	return result;
}


static gboolean wixl_preprocessor_eval_condition_expect (WixlPreprocessorEvalCondition* self, gint type, GError** error) {
	gboolean result = FALSE;
	gint _tmp0_ = 0;
	gboolean _tmp1_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = type;
	_tmp1_ = wixl_preprocessor_eval_condition_accept (self, _tmp0_);
	if (!_tmp1_) {
		gint _tmp2_ = 0;
		GError* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
		_tmp2_ = type;
		_tmp3_ = g_error_new (WIXL_ERROR, WIXL_ERROR_FAILED, "Expected token %d", _tmp2_);
		_inner_error_ = _tmp3_;
		g_propagate_error (error, _inner_error_);
		return _tmp4_;
	}
	result = TRUE;
	return result;
}


static gboolean wixl_preprocessor_eval_condition_accept_symbol (WixlPreprocessorEvalCondition* self, WixlPreprocessorEvalConditionOp symbol) {
	gboolean result = FALSE;
	gboolean accepted = FALSE;
	GScanner* _tmp0_ = NULL;
	GTokenType _tmp1_ = 0;
	gboolean _tmp6_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	accepted = FALSE;
	_tmp0_ = self->priv->scanner;
	_tmp1_ = g_scanner_peek_next_token (_tmp0_);
	if (_tmp1_ == G_TOKEN_SYMBOL) {
		GScanner* _tmp2_ = NULL;
		GTokenValue _tmp3_ = {0};
		void* _tmp4_ = NULL;
		WixlPreprocessorEvalConditionOp _tmp5_ = 0;
		_tmp2_ = self->priv->scanner;
		_tmp3_ = _tmp2_->next_value;
		_tmp4_ = _tmp3_.v_symbol;
		_tmp5_ = symbol;
		accepted = ((gint) _tmp4_) == ((gint) _tmp5_);
	}
	_tmp6_ = accepted;
	if (_tmp6_) {
		GScanner* _tmp7_ = NULL;
		_tmp7_ = self->priv->scanner;
		g_scanner_get_next_token (_tmp7_);
	}
	result = accepted;
	return result;
}


static void wixl_preprocessor_eval_condition_term (WixlPreprocessorEvalCondition* self, GValue* result, GError** error) {
	gboolean _tmp0_ = FALSE;
	GError* _tmp27_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_LEFT_PAREN);
	if (_tmp0_) {
		GValue val = {0};
		gboolean _tmp1_ = FALSE;
		GValue _tmp2_ = {0};
		_tmp1_ = wixl_preprocessor_eval_condition_expr (self, &_inner_error_);
		g_value_init (&_tmp2_, G_TYPE_BOOLEAN);
		g_value_set_boolean (&_tmp2_, _tmp1_);
		val = _tmp2_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			return;
		}
		wixl_preprocessor_eval_condition_expect (self, (gint) G_TOKEN_RIGHT_PAREN, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_propagate_error (error, _inner_error_);
			G_IS_VALUE (&val) ? (g_value_unset (&val), NULL) : NULL;
			return;
		}
		*result = val;
		return;
	} else {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_INT);
		if (_tmp3_) {
			GScanner* _tmp4_ = NULL;
			GTokenValue _tmp5_ = {0};
			gulong _tmp6_ = 0UL;
			GValue _tmp7_ = {0};
			_tmp4_ = self->priv->scanner;
			_tmp5_ = g_scanner_cur_value (_tmp4_);
			_tmp6_ = _tmp5_.v_int;
			g_value_init (&_tmp7_, G_TYPE_ULONG);
			g_value_set_ulong (&_tmp7_, _tmp6_);
			*result = _tmp7_;
			return;
		} else {
			gboolean _tmp8_ = FALSE;
			_tmp8_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_STRING);
			if (_tmp8_) {
				GScanner* _tmp9_ = NULL;
				GTokenValue _tmp10_ = {0};
				const gchar* _tmp11_ = NULL;
				GValue _tmp12_ = {0};
				_tmp9_ = self->priv->scanner;
				_tmp10_ = g_scanner_cur_value (_tmp9_);
				_tmp11_ = _tmp10_.v_string;
				g_value_init (&_tmp12_, G_TYPE_STRING);
				g_value_set_string (&_tmp12_, _tmp11_);
				*result = _tmp12_;
				return;
			} else {
				gboolean _tmp13_ = FALSE;
				_tmp13_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_IDENTIFIER);
				if (_tmp13_) {
					GScanner* _tmp14_ = NULL;
					GTokenValue _tmp15_ = {0};
					const gchar* _tmp16_ = NULL;
					GValue _tmp17_ = {0};
					_tmp14_ = self->priv->scanner;
					_tmp15_ = g_scanner_cur_value (_tmp14_);
					_tmp16_ = _tmp15_.v_identifier;
					g_value_init (&_tmp17_, G_TYPE_STRING);
					g_value_set_string (&_tmp17_, _tmp16_);
					*result = _tmp17_;
					return;
				} else {
					gboolean _tmp18_ = FALSE;
					_tmp18_ = wixl_preprocessor_eval_condition_accept (self, (gint) '$');
					if (_tmp18_) {
						gboolean _tmp19_ = FALSE;
						_tmp19_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_LEFT_PAREN);
						if (_tmp19_) {
							gchar* val = NULL;
							WixlPreprocessor* _tmp20_ = NULL;
							GScanner* _tmp21_ = NULL;
							GTokenValue _tmp22_ = {0};
							const gchar* _tmp23_ = NULL;
							GFile* _tmp24_ = NULL;
							gchar* _tmp25_ = NULL;
							GValue _tmp26_ = {0};
							wixl_preprocessor_eval_condition_expect (self, (gint) G_TOKEN_IDENTIFIER, &_inner_error_);
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								return;
							}
							_tmp20_ = self->priv->preprocessor;
							_tmp21_ = self->priv->scanner;
							_tmp22_ = g_scanner_cur_value (_tmp21_);
							_tmp23_ = _tmp22_.v_identifier;
							_tmp24_ = self->priv->file;
							_tmp25_ = wixl_preprocessor_eval_variable (_tmp20_, _tmp23_, _tmp24_, &_inner_error_);
							val = _tmp25_;
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								return;
							}
							wixl_preprocessor_eval_condition_expect (self, (gint) G_TOKEN_RIGHT_PAREN, &_inner_error_);
							if (G_UNLIKELY (_inner_error_ != NULL)) {
								g_propagate_error (error, _inner_error_);
								_g_free0 (val);
								return;
							}
							g_value_init (&_tmp26_, G_TYPE_STRING);
							g_value_take_string (&_tmp26_, val);
							*result = _tmp26_;
							return;
						}
					}
				}
			}
		}
	}
	_tmp27_ = g_error_new_literal (WIXL_ERROR, WIXL_ERROR_FAILED, "Invalid term");
	_inner_error_ = _tmp27_;
	g_propagate_error (error, _inner_error_);
	return;
}


static gint wixl_preprocessor_eval_condition_to_int (WixlPreprocessorEvalCondition* self, GValue* val) {
	gint result = 0;
	GValue _result_ = {0};
	GValue _tmp0_ = {0};
	gint _tmp1_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (val != NULL, 0);
	g_value_init (&_tmp0_, G_TYPE_INT);
	g_value_set_int (&_tmp0_, 0);
	_result_ = _tmp0_;
	g_value_transform (val, &_result_);
	_tmp1_ = g_value_get_int (&_result_);
	result = _tmp1_;
	G_IS_VALUE (&_result_) ? (g_value_unset (&_result_), NULL) : NULL;
	return result;
}


static gchar* wixl_preprocessor_eval_condition_to_string (WixlPreprocessorEvalCondition* self, GValue* val) {
	gchar* result = NULL;
	GValue _result_ = {0};
	GValue _tmp0_ = {0};
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (val != NULL, NULL);
	g_value_init (&_tmp0_, G_TYPE_STRING);
	g_value_set_string (&_tmp0_, "");
	_result_ = _tmp0_;
	g_value_transform (val, &_result_);
	_tmp1_ = g_value_get_string (&_result_);
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	G_IS_VALUE (&_result_) ? (g_value_unset (&_result_), NULL) : NULL;
	return result;
}


static gboolean wixl_preprocessor_eval_condition_cmp_term (WixlPreprocessorEvalCondition* self, GError** error) {
	gboolean result = FALSE;
	WixlPreprocessorEvalConditionOp op = 0;
	GValue left = {0};
	GValue _tmp0_ = {0};
	gboolean _tmp2_ = FALSE;
	WixlPreprocessorEvalConditionOp _tmp43_ = 0;
	GValue _tmp61_ = {0};
	gboolean _tmp62_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	op = WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NONE;
	wixl_preprocessor_eval_condition_term (self, &_tmp0_, &_inner_error_);
	left = _tmp0_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp1_ = FALSE;
		g_propagate_error (error, _inner_error_);
		return _tmp1_;
	}
	_tmp2_ = wixl_preprocessor_eval_condition_accept (self, (gint) '<');
	if (_tmp2_) {
		op = WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LT;
	} else {
		gboolean _tmp3_ = FALSE;
		_tmp3_ = wixl_preprocessor_eval_condition_accept (self, (gint) '>');
		if (_tmp3_) {
			op = WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GT;
		} else {
			gboolean _tmp4_ = FALSE;
			_tmp4_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_EQUAL_SIGN);
			if (_tmp4_) {
				GValue _tmp5_ = {0};
				GValue _tmp6_ = {0};
				GValue _tmp8_ = {0};
				gchar* _tmp9_ = NULL;
				gchar* _tmp10_ = NULL;
				gchar* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gboolean _tmp13_ = FALSE;
				wixl_preprocessor_eval_condition_term (self, &_tmp6_, &_inner_error_);
				_tmp5_ = _tmp6_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					gboolean _tmp7_ = FALSE;
					g_propagate_error (error, _inner_error_);
					G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
					return _tmp7_;
				}
				_tmp8_ = left;
				_tmp9_ = wixl_preprocessor_eval_condition_to_string (self, &_tmp8_);
				_tmp10_ = _tmp9_;
				_tmp11_ = wixl_preprocessor_eval_condition_to_string (self, &_tmp5_);
				_tmp12_ = _tmp11_;
				_tmp13_ = g_strcmp0 (_tmp10_, _tmp12_) == 0;
				_g_free0 (_tmp12_);
				_g_free0 (_tmp10_);
				result = _tmp13_;
				G_IS_VALUE (&_tmp5_) ? (g_value_unset (&_tmp5_), NULL) : NULL;
				G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
				return result;
			} else {
				gboolean _tmp14_ = FALSE;
				gboolean _tmp15_ = FALSE;
				_tmp15_ = wixl_preprocessor_eval_condition_accept (self, (gint) '!');
				if (_tmp15_) {
					gboolean _tmp16_ = FALSE;
					gboolean _tmp17_ = FALSE;
					_tmp17_ = wixl_preprocessor_eval_condition_expect (self, (gint) '=', &_inner_error_);
					_tmp16_ = _tmp17_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp18_ = FALSE;
						g_propagate_error (error, _inner_error_);
						G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
						return _tmp18_;
					}
					_tmp14_ = _tmp16_;
				} else {
					_tmp14_ = FALSE;
				}
				if (_tmp14_) {
					GValue _tmp19_ = {0};
					GValue _tmp20_ = {0};
					GValue _tmp22_ = {0};
					gchar* _tmp23_ = NULL;
					gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
					gchar* _tmp26_ = NULL;
					gboolean _tmp27_ = FALSE;
					wixl_preprocessor_eval_condition_term (self, &_tmp20_, &_inner_error_);
					_tmp19_ = _tmp20_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp21_ = FALSE;
						g_propagate_error (error, _inner_error_);
						G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
						return _tmp21_;
					}
					_tmp22_ = left;
					_tmp23_ = wixl_preprocessor_eval_condition_to_string (self, &_tmp22_);
					_tmp24_ = _tmp23_;
					_tmp25_ = wixl_preprocessor_eval_condition_to_string (self, &_tmp19_);
					_tmp26_ = _tmp25_;
					_tmp27_ = g_strcmp0 (_tmp24_, _tmp26_) != 0;
					_g_free0 (_tmp26_);
					_g_free0 (_tmp24_);
					result = _tmp27_;
					G_IS_VALUE (&_tmp19_) ? (g_value_unset (&_tmp19_), NULL) : NULL;
					G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
					return result;
				} else {
					gboolean _tmp28_ = FALSE;
					gboolean _tmp29_ = FALSE;
					_tmp29_ = wixl_preprocessor_eval_condition_accept (self, (gint) '~');
					if (_tmp29_) {
						gboolean _tmp30_ = FALSE;
						gboolean _tmp31_ = FALSE;
						_tmp31_ = wixl_preprocessor_eval_condition_expect (self, (gint) '=', &_inner_error_);
						_tmp30_ = _tmp31_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							gboolean _tmp32_ = FALSE;
							g_propagate_error (error, _inner_error_);
							G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
							return _tmp32_;
						}
						_tmp28_ = _tmp30_;
					} else {
						_tmp28_ = FALSE;
					}
					if (_tmp28_) {
						GValue _tmp33_ = {0};
						GValue _tmp34_ = {0};
						GValue _tmp36_ = {0};
						gchar* _tmp37_ = NULL;
						gchar* _tmp38_ = NULL;
						gchar* _tmp39_ = NULL;
						gchar* _tmp40_ = NULL;
						gint _tmp41_ = 0;
						gboolean _tmp42_ = FALSE;
						wixl_preprocessor_eval_condition_term (self, &_tmp34_, &_inner_error_);
						_tmp33_ = _tmp34_;
						if (G_UNLIKELY (_inner_error_ != NULL)) {
							gboolean _tmp35_ = FALSE;
							g_propagate_error (error, _inner_error_);
							G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
							return _tmp35_;
						}
						_tmp36_ = left;
						_tmp37_ = wixl_preprocessor_eval_condition_to_string (self, &_tmp36_);
						_tmp38_ = _tmp37_;
						_tmp39_ = wixl_preprocessor_eval_condition_to_string (self, &_tmp33_);
						_tmp40_ = _tmp39_;
						_tmp41_ = g_ascii_strcasecmp (_tmp38_, _tmp40_);
						_tmp42_ = _tmp41_ == 0;
						_g_free0 (_tmp40_);
						_g_free0 (_tmp38_);
						result = _tmp42_;
						G_IS_VALUE (&_tmp33_) ? (g_value_unset (&_tmp33_), NULL) : NULL;
						G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
						return result;
					}
				}
			}
		}
	}
	_tmp43_ = op;
	if (_tmp43_ != WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NONE) {
		gboolean eq = FALSE;
		gboolean _tmp44_ = FALSE;
		gint a = 0;
		GValue _tmp45_ = {0};
		gint _tmp46_ = 0;
		GValue _tmp47_ = {0};
		GValue _tmp48_ = {0};
		gint b = 0;
		gint _tmp50_ = 0;
		gboolean _tmp51_ = FALSE;
		gboolean _tmp52_ = FALSE;
		WixlPreprocessorEvalConditionOp _tmp55_ = 0;
		eq = FALSE;
		_tmp44_ = wixl_preprocessor_eval_condition_accept (self, (gint) '=');
		if (_tmp44_) {
			eq = TRUE;
		}
		_tmp45_ = left;
		_tmp46_ = wixl_preprocessor_eval_condition_to_int (self, &_tmp45_);
		a = _tmp46_;
		wixl_preprocessor_eval_condition_term (self, &_tmp48_, &_inner_error_);
		_tmp47_ = _tmp48_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp49_ = FALSE;
			g_propagate_error (error, _inner_error_);
			G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
			return _tmp49_;
		}
		_tmp50_ = wixl_preprocessor_eval_condition_to_int (self, &_tmp47_);
		b = _tmp50_;
		_tmp52_ = eq;
		if (_tmp52_) {
			gint _tmp53_ = 0;
			gint _tmp54_ = 0;
			_tmp53_ = a;
			_tmp54_ = b;
			_tmp51_ = _tmp53_ == _tmp54_;
		} else {
			_tmp51_ = FALSE;
		}
		if (_tmp51_) {
			result = TRUE;
			G_IS_VALUE (&_tmp47_) ? (g_value_unset (&_tmp47_), NULL) : NULL;
			G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
			return result;
		}
		_tmp55_ = op;
		if (_tmp55_ == WIXL_PREPROCESSOR_EVAL_CONDITION_OP_GT) {
			gint _tmp56_ = 0;
			gint _tmp57_ = 0;
			_tmp56_ = a;
			_tmp57_ = b;
			result = _tmp56_ > _tmp57_;
			G_IS_VALUE (&_tmp47_) ? (g_value_unset (&_tmp47_), NULL) : NULL;
			G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
			return result;
		} else {
			WixlPreprocessorEvalConditionOp _tmp58_ = 0;
			_tmp58_ = op;
			if (_tmp58_ == WIXL_PREPROCESSOR_EVAL_CONDITION_OP_LT) {
				gint _tmp59_ = 0;
				gint _tmp60_ = 0;
				_tmp59_ = a;
				_tmp60_ = b;
				result = _tmp59_ < _tmp60_;
				G_IS_VALUE (&_tmp47_) ? (g_value_unset (&_tmp47_), NULL) : NULL;
				G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
				return result;
			}
		}
		G_IS_VALUE (&_tmp47_) ? (g_value_unset (&_tmp47_), NULL) : NULL;
	}
	_tmp61_ = left;
	_tmp62_ = wixl_preprocessor_eval_condition_to_bool (self, &_tmp61_);
	result = _tmp62_;
	G_IS_VALUE (&left) ? (g_value_unset (&left), NULL) : NULL;
	return result;
}


static gboolean wixl_preprocessor_eval_condition_not_term (WixlPreprocessorEvalCondition* self, GError** error) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = wixl_preprocessor_eval_condition_accept_symbol (self, WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NOT);
	if (_tmp0_) {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		_tmp2_ = wixl_preprocessor_eval_condition_not_term (self, &_inner_error_);
		_tmp1_ = _tmp2_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp3_ = FALSE;
			g_propagate_error (error, _inner_error_);
			return _tmp3_;
		}
		result = !_tmp1_;
		return result;
	} else {
		gboolean _tmp4_ = FALSE;
		gboolean _tmp5_ = FALSE;
		_tmp5_ = wixl_preprocessor_eval_condition_cmp_term (self, &_inner_error_);
		_tmp4_ = _tmp5_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			gboolean _tmp6_ = FALSE;
			g_propagate_error (error, _inner_error_);
			return _tmp6_;
		}
		result = _tmp4_;
		return result;
	}
}


static gboolean wixl_preprocessor_eval_condition_expr (WixlPreprocessorEvalCondition* self, GError** error) {
	gboolean result = FALSE;
	gboolean handled = FALSE;
	gboolean _result_ = FALSE;
	gboolean _tmp0_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	handled = FALSE;
	_tmp0_ = wixl_preprocessor_eval_condition_not_term (self, &_inner_error_);
	_result_ = _tmp0_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp1_ = FALSE;
		g_propagate_error (error, _inner_error_);
		return _tmp1_;
	}
	{
		gboolean _tmp2_ = FALSE;
		_tmp2_ = TRUE;
		while (TRUE) {
			gboolean _tmp4_ = FALSE;
			if (!_tmp2_) {
				gboolean _tmp3_ = FALSE;
				_tmp3_ = handled;
				if (!_tmp3_) {
					break;
				}
			}
			_tmp2_ = FALSE;
			handled = TRUE;
			_tmp4_ = wixl_preprocessor_eval_condition_accept_symbol (self, WIXL_PREPROCESSOR_EVAL_CONDITION_OP_AND);
			if (_tmp4_) {
				gboolean _tmp5_ = FALSE;
				gboolean _tmp6_ = FALSE;
				gboolean _tmp7_ = FALSE;
				_tmp7_ = wixl_preprocessor_eval_condition_not_term (self, &_inner_error_);
				_tmp6_ = _tmp7_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					gboolean _tmp8_ = FALSE;
					g_propagate_error (error, _inner_error_);
					return _tmp8_;
				}
				if (_tmp6_) {
					gboolean _tmp9_ = FALSE;
					_tmp9_ = _result_;
					_tmp5_ = _tmp9_;
				} else {
					_tmp5_ = FALSE;
				}
				_result_ = _tmp5_;
			} else {
				gboolean _tmp10_ = FALSE;
				_tmp10_ = wixl_preprocessor_eval_condition_accept_symbol (self, WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OR);
				if (_tmp10_) {
					gboolean _tmp11_ = FALSE;
					gboolean _tmp12_ = FALSE;
					gboolean _tmp13_ = FALSE;
					_tmp13_ = wixl_preprocessor_eval_condition_not_term (self, &_inner_error_);
					_tmp12_ = _tmp13_;
					if (G_UNLIKELY (_inner_error_ != NULL)) {
						gboolean _tmp14_ = FALSE;
						g_propagate_error (error, _inner_error_);
						return _tmp14_;
					}
					if (_tmp12_) {
						_tmp11_ = TRUE;
					} else {
						gboolean _tmp15_ = FALSE;
						_tmp15_ = _result_;
						_tmp11_ = _tmp15_;
					}
					_result_ = _tmp11_;
				} else {
					handled = FALSE;
				}
			}
		}
	}
	result = _result_;
	return result;
}


static gboolean wixl_preprocessor_eval_condition_eval (WixlPreprocessorEvalCondition* self, const gchar* str, GError** error) {
	gboolean result = FALSE;
	GScanner* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gboolean _result_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp7_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (str != NULL, FALSE);
	_tmp0_ = self->priv->scanner;
	_tmp1_ = str;
	_tmp2_ = str;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	g_scanner_input_text (_tmp0_, _tmp1_, (guint) _tmp4_);
	_tmp5_ = wixl_preprocessor_eval_condition_expr (self, &_inner_error_);
	_result_ = _tmp5_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		gboolean _tmp6_ = FALSE;
		g_propagate_error (error, _inner_error_);
		return _tmp6_;
	}
	_tmp7_ = wixl_preprocessor_eval_condition_accept (self, (gint) G_TOKEN_EOF);
	if (!_tmp7_) {
		GScanner* _tmp8_ = NULL;
		GTokenType _tmp9_ = 0;
		_tmp8_ = self->priv->scanner;
		_tmp9_ = g_scanner_peek_next_token (_tmp8_);
		g_warning ("preprocessor.vala:262: condition invaluation incomplete, next token %d", (gint) _tmp9_);
	}
	result = _result_;
	return result;
}


static GObject * wixl_preprocessor_eval_condition_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	WixlPreprocessorEvalCondition * self;
	GScanner* _tmp0_ = NULL;
	GScanner* _tmp1_ = NULL;
	GScannerConfig* _tmp2_ = NULL;
	GScanner* _tmp3_ = NULL;
	GScannerConfig* _tmp4_ = NULL;
	GScanner* _tmp5_ = NULL;
	GScannerConfig* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GScanner* _tmp9_ = NULL;
	GScanner* _tmp10_ = NULL;
	GScanner* _tmp11_ = NULL;
	parent_class = G_OBJECT_CLASS (wixl_preprocessor_eval_condition_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, WixlPreprocessorEvalCondition);
	_tmp0_ = g_scanner_new (NULL);
	_g_scanner_destroy0 (self->priv->scanner);
	self->priv->scanner = _tmp0_;
	_tmp1_ = self->priv->scanner;
	_tmp2_ = _tmp1_->config;
	(*_tmp2_).scan_identifier_1char = TRUE;
	_tmp3_ = self->priv->scanner;
	_tmp4_ = _tmp3_->config;
	_tmp5_ = self->priv->scanner;
	_tmp6_ = _tmp5_->config;
	_tmp7_ = (*_tmp6_).cset_identifier_nth;
	_tmp8_ = g_strconcat ((const gchar*) _tmp7_, ".", NULL);
	(*_tmp4_).cset_identifier_nth = _tmp8_;
	_tmp9_ = self->priv->scanner;
	g_scanner_scope_add_symbol (_tmp9_, (guint) 0, "and", (void*) WIXL_PREPROCESSOR_EVAL_CONDITION_OP_AND);
	_tmp10_ = self->priv->scanner;
	g_scanner_scope_add_symbol (_tmp10_, (guint) 0, "or", (void*) WIXL_PREPROCESSOR_EVAL_CONDITION_OP_OR);
	_tmp11_ = self->priv->scanner;
	g_scanner_scope_add_symbol (_tmp11_, (guint) 0, "not", (void*) WIXL_PREPROCESSOR_EVAL_CONDITION_OP_NOT);
	return obj;
}


static void wixl_preprocessor_eval_condition_class_init (WixlPreprocessorEvalConditionClass * klass) {
	wixl_preprocessor_eval_condition_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (WixlPreprocessorEvalConditionPrivate));
	G_OBJECT_CLASS (klass)->constructor = wixl_preprocessor_eval_condition_constructor;
	G_OBJECT_CLASS (klass)->finalize = wixl_preprocessor_eval_condition_finalize;
}


static void wixl_preprocessor_eval_condition_instance_init (WixlPreprocessorEvalCondition * self) {
	self->priv = WIXL_PREPROCESSOR_EVAL_CONDITION_GET_PRIVATE (self);
}


static void wixl_preprocessor_eval_condition_finalize (GObject* obj) {
	WixlPreprocessorEvalCondition * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIXL_PREPROCESSOR_TYPE_EVAL_CONDITION, WixlPreprocessorEvalCondition);
	_g_object_unref0 (self->priv->file);
	_g_object_unref0 (self->priv->preprocessor);
	_g_scanner_destroy0 (self->priv->scanner);
	G_OBJECT_CLASS (wixl_preprocessor_eval_condition_parent_class)->finalize (obj);
}


static GType wixl_preprocessor_eval_condition_get_type (void) {
	static volatile gsize wixl_preprocessor_eval_condition_type_id__volatile = 0;
	if (g_once_init_enter (&wixl_preprocessor_eval_condition_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WixlPreprocessorEvalConditionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wixl_preprocessor_eval_condition_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WixlPreprocessorEvalCondition), 0, (GInstanceInitFunc) wixl_preprocessor_eval_condition_instance_init, NULL };
		GType wixl_preprocessor_eval_condition_type_id;
		wixl_preprocessor_eval_condition_type_id = g_type_register_static (G_TYPE_OBJECT, "WixlPreprocessorEvalCondition", &g_define_type_info, 0);
		g_once_init_leave (&wixl_preprocessor_eval_condition_type_id__volatile, wixl_preprocessor_eval_condition_type_id);
	}
	return wixl_preprocessor_eval_condition_type_id__volatile;
}


static WixlPreprocessorLocation* wixl_preprocessor_location_construct (GType object_type, xmlTextReader* reader, GFile* file) {
	WixlPreprocessorLocation * self = NULL;
	GFile* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	xmlNode* node = NULL;
	xmlTextReader* _tmp2_ = NULL;
	xmlNode* _tmp3_ = NULL;
	gushort _tmp4_ = 0U;
	g_return_val_if_fail (reader != NULL, NULL);
	g_return_val_if_fail (file != NULL, NULL);
	self = (WixlPreprocessorLocation*) g_object_new (object_type, NULL);
	_tmp0_ = file;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->file);
	self->file = _tmp1_;
	_tmp2_ = reader;
	_tmp3_ = xmlTextReaderCurrentNode (_tmp2_);
	node = _tmp3_;
	_tmp4_ = node->line;
	self->line = (gint) _tmp4_;
	return self;
}


static WixlPreprocessorLocation* wixl_preprocessor_location_new (xmlTextReader* reader, GFile* file) {
	return wixl_preprocessor_location_construct (WIXL_PREPROCESSOR_TYPE_LOCATION, reader, file);
}


static gchar* wixl_preprocessor_location_to_string (WixlPreprocessorLocation* self) {
	gchar* result = NULL;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->file;
	_tmp1_ = g_file_get_basename (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->line;
	_tmp4_ = g_strdup_printf ("%s:%d", _tmp2_, _tmp3_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp2_);
	result = _tmp5_;
	return result;
}


static void wixl_preprocessor_location_class_init (WixlPreprocessorLocationClass * klass) {
	wixl_preprocessor_location_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = wixl_preprocessor_location_finalize;
}


static void wixl_preprocessor_location_instance_init (WixlPreprocessorLocation * self) {
}


static void wixl_preprocessor_location_finalize (GObject* obj) {
	WixlPreprocessorLocation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIXL_PREPROCESSOR_TYPE_LOCATION, WixlPreprocessorLocation);
	_g_object_unref0 (self->file);
	G_OBJECT_CLASS (wixl_preprocessor_location_parent_class)->finalize (obj);
}


static GType wixl_preprocessor_location_get_type (void) {
	static volatile gsize wixl_preprocessor_location_type_id__volatile = 0;
	if (g_once_init_enter (&wixl_preprocessor_location_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WixlPreprocessorLocationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wixl_preprocessor_location_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WixlPreprocessorLocation), 0, (GInstanceInitFunc) wixl_preprocessor_location_instance_init, NULL };
		GType wixl_preprocessor_location_type_id;
		wixl_preprocessor_location_type_id = g_type_register_static (G_TYPE_OBJECT, "WixlPreprocessorLocation", &g_define_type_info, 0);
		g_once_init_leave (&wixl_preprocessor_location_type_id__volatile, wixl_preprocessor_location_type_id);
	}
	return wixl_preprocessor_location_type_id__volatile;
}


static gboolean wixl_preprocessor_if_context_state_in_if (WixlPreprocessorIfContextState self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	if (self == WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = self == WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSEIF;
	}
	result = _tmp0_;
	return result;
}


GType wixl_preprocessor_if_context_state_get_type (void) {
	static volatile gsize wixl_preprocessor_if_context_state_type_id__volatile = 0;
	if (g_once_init_enter (&wixl_preprocessor_if_context_state_type_id__volatile)) {
		static const GEnumValue values[] = {{WIXL_PREPROCESSOR_IF_CONTEXT_STATE_UNKNOWN, "WIXL_PREPROCESSOR_IF_CONTEXT_STATE_UNKNOWN", "unknown"}, {WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF, "WIXL_PREPROCESSOR_IF_CONTEXT_STATE_IF", "if"}, {WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSE, "WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSE", "else"}, {WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSEIF, "WIXL_PREPROCESSOR_IF_CONTEXT_STATE_ELSEIF", "elseif"}, {0, NULL, NULL}};
		GType wixl_preprocessor_if_context_state_type_id;
		wixl_preprocessor_if_context_state_type_id = g_enum_register_static ("WixlPreprocessorIfContextState", values);
		g_once_init_leave (&wixl_preprocessor_if_context_state_type_id__volatile, wixl_preprocessor_if_context_state_type_id);
	}
	return wixl_preprocessor_if_context_state_type_id__volatile;
}


static WixlPreprocessorIfContext* wixl_preprocessor_if_context_construct (GType object_type, gboolean enabled, gboolean is_true, WixlPreprocessorIfContextState state) {
	WixlPreprocessorIfContext* self = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	WixlPreprocessorIfContextState _tmp2_ = 0;
	self = (WixlPreprocessorIfContext*) g_type_create_instance (object_type);
	_tmp0_ = enabled;
	self->enabled = _tmp0_;
	_tmp1_ = is_true;
	wixl_preprocessor_if_context_set_is_true (self, _tmp1_);
	_tmp2_ = state;
	self->state = _tmp2_;
	return self;
}


static WixlPreprocessorIfContext* wixl_preprocessor_if_context_new (gboolean enabled, gboolean is_true, WixlPreprocessorIfContextState state) {
	return wixl_preprocessor_if_context_construct (WIXL_PREPROCESSOR_TYPE_IF_CONTEXT, enabled, is_true, state);
}


static gboolean wixl_preprocessor_if_context_get_is_true (WixlPreprocessorIfContext* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_is_true;
	result = _tmp0_;
	return result;
}


static void wixl_preprocessor_if_context_set_is_true (WixlPreprocessorIfContext* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	if (_tmp0_) {
		self->never_true = FALSE;
	}
	_tmp1_ = value;
	self->priv->_is_true = _tmp1_;
}


static void wixl_preprocessor_value_if_context_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void wixl_preprocessor_value_if_context_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		wixl_preprocessor_if_context_unref (value->data[0].v_pointer);
	}
}


static void wixl_preprocessor_value_if_context_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = wixl_preprocessor_if_context_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer wixl_preprocessor_value_if_context_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* wixl_preprocessor_value_if_context_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		WixlPreprocessorIfContext* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = wixl_preprocessor_if_context_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* wixl_preprocessor_value_if_context_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	WixlPreprocessorIfContext** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = wixl_preprocessor_if_context_ref (value->data[0].v_pointer);
	}
	return NULL;
}


static GParamSpec* wixl_preprocessor_param_spec_if_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	WixlPreprocessorParamSpecIfContext* spec;
	g_return_val_if_fail (g_type_is_a (object_type, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


static gpointer wixl_preprocessor_value_get_if_context (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT), NULL);
	return value->data[0].v_pointer;
}


static void wixl_preprocessor_value_set_if_context (GValue* value, gpointer v_object) {
	WixlPreprocessorIfContext* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		wixl_preprocessor_if_context_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		wixl_preprocessor_if_context_unref (old);
	}
}


static void wixl_preprocessor_value_take_if_context (GValue* value, gpointer v_object) {
	WixlPreprocessorIfContext* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		wixl_preprocessor_if_context_unref (old);
	}
}


static void wixl_preprocessor_if_context_class_init (WixlPreprocessorIfContextClass * klass) {
	wixl_preprocessor_if_context_parent_class = g_type_class_peek_parent (klass);
	((WixlPreprocessorIfContextClass *) klass)->finalize = wixl_preprocessor_if_context_finalize;
	g_type_class_add_private (klass, sizeof (WixlPreprocessorIfContextPrivate));
}


static void wixl_preprocessor_if_context_instance_init (WixlPreprocessorIfContext * self) {
	self->priv = WIXL_PREPROCESSOR_IF_CONTEXT_GET_PRIVATE (self);
	self->never_true = TRUE;
	self->ref_count = 1;
}


static void wixl_preprocessor_if_context_finalize (WixlPreprocessorIfContext* obj) {
	WixlPreprocessorIfContext * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIXL_PREPROCESSOR_TYPE_IF_CONTEXT, WixlPreprocessorIfContext);
	g_signal_handlers_destroy (self);
}


static GType wixl_preprocessor_if_context_get_type (void) {
	static volatile gsize wixl_preprocessor_if_context_type_id__volatile = 0;
	if (g_once_init_enter (&wixl_preprocessor_if_context_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { wixl_preprocessor_value_if_context_init, wixl_preprocessor_value_if_context_free_value, wixl_preprocessor_value_if_context_copy_value, wixl_preprocessor_value_if_context_peek_pointer, "p", wixl_preprocessor_value_if_context_collect_value, "p", wixl_preprocessor_value_if_context_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (WixlPreprocessorIfContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wixl_preprocessor_if_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WixlPreprocessorIfContext), 0, (GInstanceInitFunc) wixl_preprocessor_if_context_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType wixl_preprocessor_if_context_type_id;
		wixl_preprocessor_if_context_type_id = g_type_register_fundamental (g_type_fundamental_next (), "WixlPreprocessorIfContext", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&wixl_preprocessor_if_context_type_id__volatile, wixl_preprocessor_if_context_type_id);
	}
	return wixl_preprocessor_if_context_type_id__volatile;
}


static gpointer wixl_preprocessor_if_context_ref (gpointer instance) {
	WixlPreprocessorIfContext* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


static void wixl_preprocessor_if_context_unref (gpointer instance) {
	WixlPreprocessorIfContext* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		WIXL_PREPROCESSOR_IF_CONTEXT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static void wixl_preprocessor_class_init (WixlPreprocessorClass * klass) {
	wixl_preprocessor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (WixlPreprocessorPrivate));
	G_OBJECT_CLASS (klass)->constructor = wixl_preprocessor_constructor;
	G_OBJECT_CLASS (klass)->finalize = wixl_preprocessor_finalize;
}


static void wixl_preprocessor_instance_init (WixlPreprocessor * self) {
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	self->priv = WIXL_PREPROCESSOR_GET_PRIVATE (self);
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, NULL);
	self->priv->requires = _tmp2_;
}


static void wixl_preprocessor_finalize (GObject* obj) {
	WixlPreprocessor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIXL_TYPE_PREPROCESSOR, WixlPreprocessor);
	_g_hash_table_unref0 (self->priv->variables);
	_g_hash_table_unref0 (self->priv->requires);
	G_OBJECT_CLASS (wixl_preprocessor_parent_class)->finalize (obj);
}


GType wixl_preprocessor_get_type (void) {
	static volatile gsize wixl_preprocessor_type_id__volatile = 0;
	if (g_once_init_enter (&wixl_preprocessor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (WixlPreprocessorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) wixl_preprocessor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WixlPreprocessor), 0, (GInstanceInitFunc) wixl_preprocessor_instance_init, NULL };
		GType wixl_preprocessor_type_id;
		wixl_preprocessor_type_id = g_type_register_static (G_TYPE_OBJECT, "WixlPreprocessor", &g_define_type_info, 0);
		g_once_init_leave (&wixl_preprocessor_type_id__volatile, wixl_preprocessor_type_id);
	}
	return wixl_preprocessor_type_id__volatile;
}


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;
}



