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

/* valagirparser.vala
 *
 * Copyright (C) 2008-2012  Jürg Billeter
 * Copyright (C) 2011-2014  Luca Bruno
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Jürg Billeter <j@bitron.ch>
 * 	Luca Bruno <lucabru@src.gnome.org>
 */

#include <glib.h>
#include <glib-object.h>
#include "vala.h"
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <glib/gstdio.h>
#include <gobject/gvaluecollector.h>


#define VALA_GIR_PARSER_TYPE_NODE (vala_gir_parser_node_get_type ())
#define VALA_GIR_PARSER_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNode))
#define VALA_GIR_PARSER_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNodeClass))
#define VALA_GIR_PARSER_IS_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_NODE))
#define VALA_GIR_PARSER_IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_NODE))
#define VALA_GIR_PARSER_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNodeClass))

typedef struct _ValaGirParserNode ValaGirParserNode;
typedef struct _ValaGirParserNodeClass ValaGirParserNodeClass;

#define VALA_GIR_PARSER_TYPE_METADATA (vala_gir_parser_metadata_get_type ())
#define VALA_GIR_PARSER_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadata))
#define VALA_GIR_PARSER_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadataClass))
#define VALA_GIR_PARSER_IS_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METADATA))
#define VALA_GIR_PARSER_IS_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METADATA))
#define VALA_GIR_PARSER_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadataClass))

typedef struct _ValaGirParserMetadata ValaGirParserMetadata;
typedef struct _ValaGirParserMetadataClass ValaGirParserMetadataClass;

#define VALA_GIR_PARSER_TYPE_ARGUMENT_TYPE (vala_gir_parser_argument_type_get_type ())
#define _g_free0(var) (var = (g_free (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 _g_type_class_unref0(var) ((var == NULL) ? NULL : (var = (g_type_class_unref (var), NULL)))
#define _vala_markup_reader_unref0(var) ((var == NULL) ? NULL : (var = (vala_markup_reader_unref (var), NULL)))
#define _vala_code_context_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_context_unref (var), NULL)))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_source_file_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_file_unref (var), NULL)))
#define _vala_gir_parser_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_node_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _vala_gir_parser_metadata_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_metadata_unref (var), NULL)))
#define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
typedef struct _ValaGirParserNodePrivate ValaGirParserNodePrivate;

#define VALA_GIR_PARSER_TYPE_PARAMETER_INFO (vala_gir_parser_parameter_info_get_type ())
#define VALA_GIR_PARSER_PARAMETER_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfo))
#define VALA_GIR_PARSER_PARAMETER_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfoClass))
#define VALA_GIR_PARSER_IS_PARAMETER_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_PARAMETER_INFO))
#define VALA_GIR_PARSER_IS_PARAMETER_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_PARAMETER_INFO))
#define VALA_GIR_PARSER_PARAMETER_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfoClass))

typedef struct _ValaGirParserParameterInfo ValaGirParserParameterInfo;
typedef struct _ValaGirParserParameterInfoClass ValaGirParserParameterInfoClass;
#define _vala_source_reference_unref0(var) ((var == NULL) ? NULL : (var = (vala_source_reference_unref (var), NULL)))
#define _vala_iterator_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterator_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_match_info_unref0(var) ((var == NULL) ? NULL : (var = (g_match_info_unref (var), NULL)))
typedef struct _ValaGirParserParameterInfoPrivate ValaGirParserParameterInfoPrivate;

#define VALA_GIR_PARSER_TYPE_METADATA_PARSER (vala_gir_parser_metadata_parser_get_type ())
#define VALA_GIR_PARSER_METADATA_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParser))
#define VALA_GIR_PARSER_METADATA_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParserClass))
#define VALA_GIR_PARSER_IS_METADATA_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METADATA_PARSER))
#define VALA_GIR_PARSER_IS_METADATA_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METADATA_PARSER))
#define VALA_GIR_PARSER_METADATA_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParserClass))

typedef struct _ValaGirParserMetadataParser ValaGirParserMetadataParser;
typedef struct _ValaGirParserMetadataParserClass ValaGirParserMetadataParserClass;
#define _vala_gir_parser_metadata_parser_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_metadata_parser_unref (var), NULL)))
#define __g_list_free__vala_code_node_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__vala_code_node_unref0_ (var), NULL)))
#define _vala_comment_unref0(var) ((var == NULL) ? NULL : (var = (vala_comment_unref (var), NULL)))
#define _vala_gir_parser_parameter_info_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_parameter_info_unref (var), NULL)))
typedef struct _ValaGirParserMetadataPrivate ValaGirParserMetadataPrivate;

#define VALA_GIR_PARSER_TYPE_ARGUMENT (vala_gir_parser_argument_get_type ())
#define VALA_GIR_PARSER_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgument))
#define VALA_GIR_PARSER_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgumentClass))
#define VALA_GIR_PARSER_IS_ARGUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_ARGUMENT))
#define VALA_GIR_PARSER_IS_ARGUMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_ARGUMENT))
#define VALA_GIR_PARSER_ARGUMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgumentClass))

typedef struct _ValaGirParserArgument ValaGirParserArgument;
typedef struct _ValaGirParserArgumentClass ValaGirParserArgumentClass;
typedef struct _ValaGirParserArgumentPrivate ValaGirParserArgumentPrivate;
#define _vala_gir_parser_argument_unref0(var) ((var == NULL) ? NULL : (var = (vala_gir_parser_argument_unref (var), NULL)))
typedef struct _ValaGirParserParamSpecArgument ValaGirParserParamSpecArgument;

#define VALA_GIR_PARSER_TYPE_METADATA_SET (vala_gir_parser_metadata_set_get_type ())
#define VALA_GIR_PARSER_METADATA_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_GIR_PARSER_TYPE_METADATA_SET, ValaGirParserMetadataSet))
#define VALA_GIR_PARSER_METADATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_GIR_PARSER_TYPE_METADATA_SET, ValaGirParserMetadataSetClass))
#define VALA_GIR_PARSER_IS_METADATA_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_GIR_PARSER_TYPE_METADATA_SET))
#define VALA_GIR_PARSER_IS_METADATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_GIR_PARSER_TYPE_METADATA_SET))
#define VALA_GIR_PARSER_METADATA_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_GIR_PARSER_TYPE_METADATA_SET, ValaGirParserMetadataSetClass))

typedef struct _ValaGirParserMetadataSet ValaGirParserMetadataSet;
typedef struct _ValaGirParserMetadataSetClass ValaGirParserMetadataSetClass;
typedef struct _ValaGirParserMetadataSetPrivate ValaGirParserMetadataSetPrivate;
#define _g_pattern_spec_free0(var) ((var == NULL) ? NULL : (var = (g_pattern_spec_free (var), NULL)))
typedef struct _ValaGirParserParamSpecMetadata ValaGirParserParamSpecMetadata;
typedef struct _ValaGirParserMetadataParserPrivate ValaGirParserMetadataParserPrivate;
#define _vala_scanner_unref0(var) ((var == NULL) ? NULL : (var = (vala_scanner_unref (var), NULL)))
typedef struct _ValaGirParserParamSpecMetadataParser ValaGirParserParamSpecMetadataParser;
typedef struct _ValaGirParserParamSpecNode ValaGirParserParamSpecNode;
typedef struct _ValaGirParserParamSpecParameterInfo ValaGirParserParamSpecParameterInfo;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _ValaGirParserPrivate {
	ValaMarkupReader* reader;
	ValaCodeContext* context;
	ValaNamespace* glib_ns;
	ValaSourceFile* current_source_file;
	ValaGirParserNode* root;
	ValaArrayList* metadata_roots;
	ValaSourceLocation begin;
	ValaSourceLocation end;
	ValaMarkupTokenType current_token;
	gchar** cheader_filenames;
	gint cheader_filenames_length1;
	gint _cheader_filenames_size_;
	ValaArrayList* metadata_stack;
	ValaGirParserMetadata* metadata;
	ValaArrayList* tree_stack;
	ValaGirParserNode* current;
	ValaGirParserNode* old_current;
	ValaSet* provided_namespaces;
	ValaHashMap* unresolved_symbols_map;
	ValaArrayList* unresolved_gir_symbols;
	ValaArrayList* unresolved_type_arguments;
};

typedef enum  {
	VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP,
	VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN,
	VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS,
	VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME,
	VALA_GIR_PARSER_ARGUMENT_TYPE_NAME,
	VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED,
	VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED,
	VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED,
	VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_SINCE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY,
	VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX,
	VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_NULL_TERMINATED,
	VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_OUT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_REF,
	VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME,
	VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL,
	VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS,
	VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT,
	VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD,
	VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL,
	VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROY,
	VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX,
	VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX,
	VALA_GIR_PARSER_ARGUMENT_TYPE_ERRORDOMAIN,
	VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROYS_INSTANCE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_NAME,
	VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_INSTANCE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_SYMBOL_TYPE,
	VALA_GIR_PARSER_ARGUMENT_TYPE_INSTANCE_IDX,
	VALA_GIR_PARSER_ARGUMENT_TYPE_EXPERIMENTAL,
	VALA_GIR_PARSER_ARGUMENT_TYPE_FLOATING,
	VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ID,
	VALA_GIR_PARSER_ARGUMENT_TYPE_RETURN_VOID,
	VALA_GIR_PARSER_ARGUMENT_TYPE_RETURNS_MODIFIED_POINTER,
	VALA_GIR_PARSER_ARGUMENT_TYPE_DELEGATE_TARGET_CNAME,
	VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_VFUNC_NAME,
	VALA_GIR_PARSER_ARGUMENT_TYPE_CNAME
} ValaGirParserArgumentType;

struct _ValaGirParserNode {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaGirParserNodePrivate * priv;
	ValaGirParserNode* parent;
	gchar* element_type;
	gchar* name;
	ValaMap* girdata;
	ValaGirParserMetadata* metadata;
	ValaSourceReference* source_reference;
	ValaArrayList* members;
	ValaHashMap* scope;
	ValaGirComment* comment;
	ValaSymbol* symbol;
	gboolean new_symbol;
	gboolean merged;
	gboolean processed;
	gint return_array_length_idx;
	ValaList* parameters;
	ValaArrayList* array_length_parameters;
	ValaArrayList* closure_parameters;
	ValaArrayList* destroy_parameters;
	ValaUnresolvedSymbol* gtype_struct_for;
	ValaDataType* base_type;
	gint array_length_idx;
	gboolean deprecated;
	guint64 deprecated_version;
	gchar* deprecated_since;
	gchar* deprecated_replacement;
};

struct _ValaGirParserNodeClass {
	GTypeClass parent_class;
	void (*finalize) (ValaGirParserNode *self);
};

struct _ValaGirParserParameterInfo {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaGirParserParameterInfoPrivate * priv;
	ValaParameter* param;
	gfloat vala_idx;
	gint array_length_idx;
	gint closure_idx;
	gint destroy_idx;
	gboolean keep;
	gboolean is_async;
};

struct _ValaGirParserParameterInfoClass {
	GTypeClass parent_class;
	void (*finalize) (ValaGirParserParameterInfo *self);
};

struct _ValaGirParserMetadata {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaGirParserMetadataPrivate * priv;
	GPatternSpec* pattern_spec;
	gchar* selector;
	ValaSourceReference* source_reference;
	gboolean used;
	ValaMap* args;
	ValaArrayList* children;
};

struct _ValaGirParserMetadataClass {
	GTypeClass parent_class;
	void (*finalize) (ValaGirParserMetadata *self);
};

struct _ValaGirParserArgument {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaGirParserArgumentPrivate * priv;
	ValaExpression* expression;
	ValaSourceReference* source_reference;
	gboolean used;
};

struct _ValaGirParserArgumentClass {
	GTypeClass parent_class;
	void (*finalize) (ValaGirParserArgument *self);
};

struct _ValaGirParserParamSpecArgument {
	GParamSpec parent_instance;
};

struct _ValaGirParserMetadataSet {
	ValaGirParserMetadata parent_instance;
	ValaGirParserMetadataSetPrivate * priv;
};

struct _ValaGirParserMetadataSetClass {
	ValaGirParserMetadataClass parent_class;
};

struct _ValaGirParserParamSpecMetadata {
	GParamSpec parent_instance;
};

struct _ValaGirParserMetadataParser {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaGirParserMetadataParserPrivate * priv;
};

struct _ValaGirParserMetadataParserClass {
	GTypeClass parent_class;
	void (*finalize) (ValaGirParserMetadataParser *self);
};

struct _ValaGirParserMetadataParserPrivate {
	ValaGirParserMetadata* tree;
	ValaScanner* scanner;
	ValaSourceLocation begin;
	ValaSourceLocation end;
	ValaSourceLocation old_end;
	ValaTokenType current;
	ValaGirParserMetadata* parent_metadata;
};

struct _ValaGirParserParamSpecMetadataParser {
	GParamSpec parent_instance;
};

struct _ValaGirParserParamSpecNode {
	GParamSpec parent_instance;
};

struct _ValaGirParserParamSpecParameterInfo {
	GParamSpec parent_instance;
};


static gpointer vala_gir_parser_parent_class = NULL;
static GRegex* vala_gir_parser_type_from_string_regex;
static GRegex* vala_gir_parser_type_from_string_regex = NULL;
static ValaArrayList* vala_gir_parser_node_new_namespaces;
static gpointer vala_gir_parser_argument_parent_class = NULL;
static gpointer vala_gir_parser_metadata_set_parent_class = NULL;
static gpointer vala_gir_parser_metadata_parent_class = NULL;
static ValaGirParserMetadata* vala_gir_parser_metadata__empty;
static ValaGirParserMetadata* vala_gir_parser_metadata__empty = NULL;
static gpointer vala_gir_parser_metadata_parser_parent_class = NULL;
static gpointer vala_gir_parser_node_parent_class = NULL;
static ValaArrayList* vala_gir_parser_node_new_namespaces = NULL;
static gpointer vala_gir_parser_parameter_info_parent_class = NULL;

static gpointer vala_gir_parser_node_ref (gpointer instance);
static void vala_gir_parser_node_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_node (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_node (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_node_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gpointer vala_gir_parser_metadata_ref (gpointer instance);
static void vala_gir_parser_metadata_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_metadata (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_metadata (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_metadata (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_metadata_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define VALA_GIR_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_GIR_PARSER, ValaGirParserPrivate))
static GType vala_gir_parser_argument_type_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ValaGirParserArgumentType* vala_gir_parser_argument_type_from_string (const gchar* name);
static ValaGirParserArgumentType* _vala_gir_parser_argument_type_dup (ValaGirParserArgumentType* self);
static guint vala_gir_parser_unresolved_symbol_hash (ValaUnresolvedSymbol* sym);
static guint _vala_gir_parser_unresolved_symbol_hash_ghash_func (gconstpointer key);
static gboolean vala_gir_parser_unresolved_symbol_equal (ValaUnresolvedSymbol* sym1, ValaUnresolvedSymbol* sym2);
static gboolean _vala_gir_parser_unresolved_symbol_equal_gequal_func (gconstpointer a, gconstpointer b);
#define VALA_GIR_PARSER_GIR_VERSION "1.2"
static ValaGirParserNode* vala_gir_parser_node_new (const gchar* name);
static ValaGirParserNode* vala_gir_parser_node_construct (GType object_type, const gchar* name);
static gpointer vala_gir_parser_parameter_info_ref (gpointer instance);
static void vala_gir_parser_parameter_info_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_parameter_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_parameter_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_parameter_info (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_parameter_info (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_parameter_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void vala_gir_parser_map_vala_to_gir (ValaGirParser* self);
static void vala_gir_parser_resolve_gir_symbols (ValaGirParser* self);
static void vala_gir_parser_create_new_namespaces (ValaGirParser* self);
static void vala_gir_parser_resolve_type_arguments (ValaGirParser* self);
static void vala_gir_parser_node_process (ValaGirParserNode* self, ValaGirParser* parser);
static void vala_gir_parser_report_unused_metadata (ValaGirParser* self, ValaGirParserMetadata* metadata);
static void vala_gir_parser_set_symbol_mapping (ValaGirParser* self, ValaUnresolvedSymbol* map_from, ValaSymbol* map_to);
static void vala_gir_parser_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file);
static ValaGirParserMetadata* vala_gir_parser_metadata_get_empty (void);
static void vala_gir_parser_next (ValaGirParser* self);
static void vala_gir_parser_parse_repository (ValaGirParser* self);
static void vala_gir_parser_start_element (ValaGirParser* self, const gchar* name);
static ValaSourceReference* vala_gir_parser_get_current_src (ValaGirParser* self);
static void vala_gir_parser_end_element (ValaGirParser* self, const gchar* name);
static void vala_gir_parser_skip_element (ValaGirParser* self);
static void vala_gir_parser_add_symbol_to_container (ValaSymbol* container, ValaSymbol* sym);
static gboolean vala_gir_parser_is_container (ValaSymbol* sym);
static ValaUnresolvedSymbol* vala_gir_parser_parse_symbol_from_string (ValaGirParser* self, const gchar* symbol_string, ValaSourceReference* source_reference);
static void vala_gir_parser_assume_parameter_names (ValaGirParser* self, ValaSignal* sig, ValaSymbol* sym, gboolean skip_first);
static ValaGirParserNode* vala_gir_parser_find_invoker (ValaGirParser* self, ValaGirParserNode* node);
static ValaGirParserMetadata* vala_gir_parser_get_current_metadata (ValaGirParser* self);
static ValaGirParserMetadata* vala_gir_parser_metadata_match_child (ValaGirParserMetadata* self, const gchar* name, const gchar* selector);
static gboolean vala_gir_parser_push_metadata (ValaGirParser* self);
static gboolean vala_gir_parser_metadata_has_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key);
static gboolean vala_gir_parser_metadata_get_bool (ValaGirParserMetadata* self, ValaGirParserArgumentType arg, gboolean default_value);
static void vala_gir_parser_pop_metadata (ValaGirParser* self);
static gboolean vala_gir_parser_parse_type_arguments_from_string (ValaGirParser* self, ValaDataType* parent_type, const gchar* type_arguments, ValaSourceReference* source_reference);
static ValaDataType* vala_gir_parser_parse_type_from_string (ValaGirParser* self, const gchar* type_string, gboolean owned_by_default, ValaSourceReference* source_reference);
static gchar* vala_gir_parser_element_get_string (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type);
static gchar* vala_gir_parser_metadata_get_string (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
static ValaDataType* vala_gir_parser_element_get_type (ValaGirParser* self, ValaDataType* orig_type, gboolean owned_by_default, gboolean* no_array_length, gboolean* array_null_terminated, gboolean* changed);
static ValaSourceReference* vala_gir_parser_metadata_get_source_reference (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
static gchar* vala_gir_parser_element_get_name (ValaGirParser* self, const gchar* gir_name);
static gchar* vala_gir_parser_element_get_type_id (ValaGirParser* self);
static void vala_gir_parser_set_array_ccode (ValaGirParser* self, ValaSymbol* sym, ValaGirParserParameterInfo* info);
static ValaGirParserNode* vala_gir_parser_node_lookup (ValaGirParserNode* self, const gchar* name, gboolean create_namespace, ValaSourceReference* source_reference);
static gchar* vala_gir_parser_node_get_cname (ValaGirParserNode* self);
static void vala_gir_parser_set_type_id_ccode (ValaGirParser* self, ValaSymbol* sym);
static void vala_gir_parser_parse_namespace (ValaGirParser* self);
static void vala_gir_parser_parse_include (ValaGirParser* self);
static gchar* vala_gir_parser_parse_package (ValaGirParser* self);
static void vala_gir_parser_parse_c_include (ValaGirParser* self);
static void _vala_array_add1 (gchar** * array, int* length, int* size, gchar* value);
static ValaGirParserNode* vala_gir_parser_resolve_node (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym, gboolean create_namespace);
static ValaSymbol* vala_gir_parser_resolve_symbol (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym);
static void vala_gir_parser_push_node (ValaGirParser* self, const gchar* name, gboolean merge);
static void vala_gir_parser_node_add_member (ValaGirParserNode* self, ValaGirParserNode* node);
static gchar* vala_gir_parser_node_get_gir_name (ValaGirParserNode* self);
static ValaUnresolvedSymbol* vala_gir_parser_node_get_unresolved_symbol (ValaGirParserNode* self);
static void vala_gir_parser_pop_node (ValaGirParser* self);
static gpointer vala_gir_parser_metadata_parser_ref (gpointer instance);
static void vala_gir_parser_metadata_parser_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_metadata_parser (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_metadata_parser (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_metadata_parser (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_metadata_parser (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_metadata_parser_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_new (void);
static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_construct (GType object_type);
static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_metadata (ValaGirParserMetadataParser* self, ValaSourceFile* metadata_file);
static void _vala_code_node_unref0_ (gpointer var);
static inline void _g_list_free__vala_code_node_unref0_ (GList* self);
static void vala_gir_parser_parse_alias (ValaGirParser* self);
static void vala_gir_parser_parse_error_domain (ValaGirParser* self);
static void vala_gir_parser_parse_enumeration (ValaGirParser* self, const gchar* element_name, gboolean error_domain);
static void vala_gir_parser_parse_bitfield (ValaGirParser* self);
static void vala_gir_parser_parse_method (ValaGirParser* self, const gchar* element_name);
static void vala_gir_parser_parse_callback (ValaGirParser* self);
static void vala_gir_parser_parse_record (ValaGirParser* self);
static void vala_gir_parser_parse_boxed (ValaGirParser* self, const gchar* element_name);
static void vala_gir_parser_parse_class (ValaGirParser* self);
static void vala_gir_parser_parse_interface (ValaGirParser* self);
static void vala_gir_parser_parse_union (ValaGirParser* self);
static void vala_gir_parser_parse_constant (ValaGirParser* self);
static ValaGirComment* vala_gir_parser_parse_symbol_doc (ValaGirParser* self);
static ValaDataType* vala_gir_parser_parse_type (ValaGirParser* self, gchar* * ctype, gint* array_length_idx, gboolean transfer_elements, gboolean* no_array_length, gboolean* array_null_terminated);
static void vala_gir_parser_calculate_common_prefix (ValaGirParser* self, gchar* * common_prefix, const gchar* cname);
static ValaComment* vala_gir_parser_parse_doc (ValaGirParser* self);
static void vala_gir_parser_parse_error_member (ValaGirParser* self);
static void vala_gir_parser_parse_enumeration_member (ValaGirParser* self);
static ValaExpression* vala_gir_parser_metadata_get_expression (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
static ValaDataType* vala_gir_parser_parse_return_value (ValaGirParser* self, gchar* * ctype, gint* array_length_idx, gboolean* no_array_length, gboolean* array_null_terminated, ValaComment* * comment);
static ValaParameter* vala_gir_parser_parse_parameter (ValaGirParser* self, gint* array_length_idx, gint* closure_idx, gint* destroy_idx, gchar* * scope, ValaComment* * comment, const gchar* default_name);
static gint vala_gir_parser_metadata_get_integer (ValaGirParserMetadata* self, ValaGirParserArgumentType arg);
static ValaDataType* vala_gir_parser_parse_type_from_gir_name (ValaGirParser* self, const gchar* type_name, gboolean* no_array_length, gboolean* array_null_terminated, const gchar* ctype);
static void vala_gir_parser_parse_field (ValaGirParser* self);
static void vala_gir_parser_parse_constructor (ValaGirParser* self);
static ValaProperty* vala_gir_parser_parse_property (ValaGirParser* self);
static void vala_gir_parser_parse_signal (ValaGirParser* self);
static void vala_gir_parser_parse_function (ValaGirParser* self, const gchar* element_name);
G_GNUC_INTERNAL void vala_gir_comment_add_content_for_parameter (ValaGirComment* self, const gchar* name, ValaComment* comment);
static ValaGirParserParameterInfo* vala_gir_parser_parameter_info_new (ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx, gboolean is_async);
static ValaGirParserParameterInfo* vala_gir_parser_parameter_info_construct (GType object_type, ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx, gboolean is_async);
static gpointer vala_gir_parser_argument_ref (gpointer instance);
static void vala_gir_parser_argument_unref (gpointer instance);
static GParamSpec* vala_gir_parser_param_spec_argument (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) G_GNUC_UNUSED;
static void vala_gir_parser_value_set_argument (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static void vala_gir_parser_value_take_argument (GValue* value, gpointer v_object) G_GNUC_UNUSED;
static gpointer vala_gir_parser_value_get_argument (const GValue* value) G_GNUC_UNUSED;
static GType vala_gir_parser_argument_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void vala_gir_parser_process_interface (ValaGirParser* self, ValaGirParserNode* iface_node);
static void vala_gir_parser_process_alias (ValaGirParser* self, ValaGirParserNode* alias);
static void vala_gir_parser_process_callable (ValaGirParser* self, ValaGirParserNode* node);
static void vala_gir_parser_find_parent (ValaGirParser* self, const gchar* cname, ValaGirParserNode* current, ValaGirParserNode* * best, gint* match);
static gchar* vala_gir_parser_node_get_lower_case_cprefix (ValaGirParserNode* self);
static gboolean vala_gir_parser_same_gir (ValaGirParser* self, ValaSymbol* gir_component, ValaSymbol* sym);
static void vala_gir_parser_process_namespace_method (ValaGirParser* self, ValaGirParserNode* ns, ValaGirParserNode* node);
static void vala_gir_parser_node_remove_member (ValaGirParserNode* self, ValaGirParserNode* node);
static void vala_gir_parser_process_virtual_method_field (ValaGirParser* self, ValaGirParserNode* node, ValaDelegate* d, ValaUnresolvedSymbol* gtype_struct_for);
static gchar* vala_gir_parser_node_to_string (ValaGirParserNode* self);
static ValaArrayList* vala_gir_parser_node_lookup_all (ValaGirParserNode* self, const gchar* name);
static void vala_gir_parser_process_async_method (ValaGirParser* self, ValaGirParserNode* node);
static gchar* vala_gir_parser_node_get_finish_cname (ValaGirParserNode* self);
static ValaGirParserNode* vala_gir_parser_base_interface_property (ValaGirParser* self, ValaGirParserNode* prop_node);
static ValaGirParserArgument* vala_gir_parser_argument_new (ValaExpression* expression, ValaSourceReference* source_reference);
static ValaGirParserArgument* vala_gir_parser_argument_construct (GType object_type, ValaExpression* expression, ValaSourceReference* source_reference);
static void vala_gir_parser_argument_finalize (ValaGirParserArgument * obj);
static GType vala_gir_parser_metadata_set_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_new (const gchar* selector);
static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_construct (GType object_type, const gchar* selector);
static ValaGirParserMetadata* vala_gir_parser_metadata_new (const gchar* pattern, const gchar* selector, ValaSourceReference* source_reference);
static ValaGirParserMetadata* vala_gir_parser_metadata_construct (GType object_type, const gchar* pattern, const gchar* selector, ValaSourceReference* source_reference);
static void vala_gir_parser_metadata_set_add_sibling (ValaGirParserMetadataSet* self, ValaGirParserMetadata* metadata);
static void vala_gir_parser_metadata_add_child (ValaGirParserMetadata* self, ValaGirParserMetadata* metadata);
static void vala_gir_parser_metadata_add_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key, ValaGirParserArgument* value);
static void vala_gir_parser_metadata_finalize (ValaGirParserMetadata * obj);
#define VALA_GIR_PARSER_METADATA_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParserPrivate))
static ValaSourceReference* vala_gir_parser_metadata_parser_get_current_src (ValaGirParserMetadataParser* self);
static ValaSourceReference* vala_gir_parser_metadata_parser_get_src (ValaGirParserMetadataParser* self, ValaSourceLocation* begin, ValaSourceLocation* end);
static ValaTokenType vala_gir_parser_metadata_parser_next (ValaGirParserMetadataParser* self);
static gboolean vala_gir_parser_metadata_parser_parse_rule (ValaGirParserMetadataParser* self);
static gboolean vala_gir_parser_metadata_parser_has_space (ValaGirParserMetadataParser* self);
static gboolean vala_gir_parser_metadata_parser_has_newline (ValaGirParserMetadataParser* self);
static gchar* vala_gir_parser_metadata_parser_get_string (ValaGirParserMetadataParser* self, ValaSourceLocation* begin, ValaSourceLocation* end);
static gchar* vala_gir_parser_metadata_parser_parse_identifier (ValaGirParserMetadataParser* self, gboolean is_glob);
static gchar* vala_gir_parser_metadata_parser_parse_selector (ValaGirParserMetadataParser* self);
static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_pattern (ValaGirParserMetadataParser* self);
static ValaExpression* vala_gir_parser_metadata_parser_parse_expression (ValaGirParserMetadataParser* self);
static gboolean vala_gir_parser_metadata_parser_parse_args (ValaGirParserMetadataParser* self, ValaGirParserMetadata* metadata);
static void vala_gir_parser_metadata_parser_finalize (ValaGirParserMetadataParser * obj);
static gchar* vala_gir_parser_node_get_full_name (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_default_gir_name (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_default_lower_case_cprefix (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_lower_case_csuffix (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_default_lower_case_csuffix (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_cprefix (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_default_cname (ValaGirParserNode* self);
static gchar* vala_gir_parser_node_get_cheader_filename (ValaGirParserNode* self);
static guint64 vala_gir_parser_node_parse_version_string (const gchar* version);
static void vala_gir_parser_node_finalize (ValaGirParserNode * obj);
static void vala_gir_parser_parameter_info_finalize (ValaGirParserParameterInfo * obj);
static void vala_gir_parser_finalize (ValaCodeVisitor * 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 gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		const gchar* _tmp2_;
		_tmp2_ = old;
		_tmp1_ = (*((gchar*) _tmp2_)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = old;
		_tmp4_ = replacement;
		_tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup (self);
		result = _tmp5_;
		return result;
	}
	{
		GRegex* regex = NULL;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GRegex* _tmp9_;
		GRegex* _tmp10_;
		gchar* _tmp11_ = NULL;
		GRegex* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp6_ = old;
		_tmp7_ = g_regex_escape_string (_tmp6_, -1);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_);
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp8_);
		regex = _tmp10_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch4_g_regex_error;
			}
			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 NULL;
		}
		_tmp12_ = regex;
		_tmp13_ = replacement;
		_tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_);
		_tmp11_ = _tmp14_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch4_g_regex_error;
			}
			_g_regex_unref0 (regex);
			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 NULL;
		}
		_tmp15_ = _tmp11_;
		_tmp11_ = NULL;
		result = _tmp15_;
		_g_free0 (_tmp11_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally4;
	__catch4_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally4:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
}


static ValaGirParserArgumentType* _vala_gir_parser_argument_type_dup (ValaGirParserArgumentType* self) {
	ValaGirParserArgumentType* dup;
	dup = g_new0 (ValaGirParserArgumentType, 1);
	memcpy (dup, self, sizeof (ValaGirParserArgumentType));
	return dup;
}


static gpointer __vala_gir_parser_argument_type_dup0 (gpointer self) {
	return self ? _vala_gir_parser_argument_type_dup (self) : NULL;
}


static ValaGirParserArgumentType* vala_gir_parser_argument_type_from_string (const gchar* name) {
	ValaGirParserArgumentType* result = NULL;
	GEnumClass* enum_class = NULL;
	GTypeClass* _tmp0_;
	gchar* nick = NULL;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GEnumValue* enum_value = NULL;
	GEnumClass* _tmp3_;
	const gchar* _tmp4_;
	GEnumValue* _tmp5_;
	GEnumValue* _tmp6_;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = g_type_class_ref (VALA_GIR_PARSER_TYPE_ARGUMENT_TYPE);
	enum_class = (GEnumClass*) _tmp0_;
	_tmp1_ = name;
	_tmp2_ = string_replace (_tmp1_, "_", "-");
	nick = _tmp2_;
	_tmp3_ = enum_class;
	_tmp4_ = nick;
	_tmp5_ = g_enum_get_value_by_nick (_tmp3_, _tmp4_);
	enum_value = _tmp5_;
	_tmp6_ = enum_value;
	if (_tmp6_ != NULL) {
		ValaGirParserArgumentType value = 0;
		GEnumValue* _tmp7_;
		gint _tmp8_;
		ValaGirParserArgumentType* _tmp9_;
		_tmp7_ = enum_value;
		_tmp8_ = (*_tmp7_).value;
		value = (ValaGirParserArgumentType) _tmp8_;
		_tmp9_ = __vala_gir_parser_argument_type_dup0 (&value);
		result = _tmp9_;
		_g_free0 (nick);
		_g_type_class_unref0 (enum_class);
		return result;
	}
	result = NULL;
	_g_free0 (nick);
	_g_type_class_unref0 (enum_class);
	return result;
}


static GType vala_gir_parser_argument_type_get_type (void) {
	static volatile gsize vala_gir_parser_argument_type_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_argument_type_type_id__volatile)) {
		static const GEnumValue values[] = {{VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP, "VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP", "skip"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN, "VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN", "hidden"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE, "VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE", "type"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS, "VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS", "type-arguments"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME", "cheader-filename"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_NAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_NAME", "name"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED, "VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED", "owned"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED, "VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED", "unowned"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT, "VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT", "parent"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE, "VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE", "nullable"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED, "VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED", "deprecated"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT, "VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT", "replacement"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE, "VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE", "deprecated-since"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_SINCE, "VALA_GIR_PARSER_ARGUMENT_TYPE_SINCE", "since"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY", "array"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX", "array-length-idx"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_NULL_TERMINATED, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_NULL_TERMINATED", "array-null-terminated"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT, "VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT", "default"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_OUT, "VALA_GIR_PARSER_ARGUMENT_TYPE_OUT", "out"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_REF, "VALA_GIR_PARSER_ARGUMENT_TYPE_REF", "ref"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME", "vfunc-name"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL, "VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL", "virtual"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT, "VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT", "abstract"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE, "VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE", "scope"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT, "VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT", "struct"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS, "VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS", "throws"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT, "VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT", "printf-format"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD, "VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD", "array-length-field"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL, "VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL", "sentinel"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE, "VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE", "closure"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROY, "VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROY", "destroy"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX, "VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX", "cprefix"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX, "VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX", "lower-case-cprefix"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_ERRORDOMAIN, "VALA_GIR_PARSER_ARGUMENT_TYPE_ERRORDOMAIN", "errordomain"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROYS_INSTANCE, "VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROYS_INSTANCE", "destroys-instance"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE, "VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE", "base-type"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_NAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_NAME", "finish-name"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_INSTANCE, "VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_INSTANCE", "finish-instance"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_SYMBOL_TYPE, "VALA_GIR_PARSER_ARGUMENT_TYPE_SYMBOL_TYPE", "symbol-type"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_INSTANCE_IDX, "VALA_GIR_PARSER_ARGUMENT_TYPE_INSTANCE_IDX", "instance-idx"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_EXPERIMENTAL, "VALA_GIR_PARSER_ARGUMENT_TYPE_EXPERIMENTAL", "experimental"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_FLOATING, "VALA_GIR_PARSER_ARGUMENT_TYPE_FLOATING", "floating"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ID, "VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ID", "type-id"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_RETURN_VOID, "VALA_GIR_PARSER_ARGUMENT_TYPE_RETURN_VOID", "return-void"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_RETURNS_MODIFIED_POINTER, "VALA_GIR_PARSER_ARGUMENT_TYPE_RETURNS_MODIFIED_POINTER", "returns-modified-pointer"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_DELEGATE_TARGET_CNAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_DELEGATE_TARGET_CNAME", "delegate-target-cname"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_VFUNC_NAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_VFUNC_NAME", "finish-vfunc-name"}, {VALA_GIR_PARSER_ARGUMENT_TYPE_CNAME, "VALA_GIR_PARSER_ARGUMENT_TYPE_CNAME", "cname"}, {0, NULL, NULL}};
		GType vala_gir_parser_argument_type_type_id;
		vala_gir_parser_argument_type_type_id = g_enum_register_static ("ValaGirParserArgumentType", values);
		g_once_init_leave (&vala_gir_parser_argument_type_type_id__volatile, vala_gir_parser_argument_type_type_id);
	}
	return vala_gir_parser_argument_type_type_id__volatile;
}


static guint _vala_gir_parser_unresolved_symbol_hash_ghash_func (gconstpointer key) {
	guint result;
	result = vala_gir_parser_unresolved_symbol_hash ((ValaUnresolvedSymbol*) key);
	return result;
}


static gboolean _vala_gir_parser_unresolved_symbol_equal_gequal_func (gconstpointer a, gconstpointer b) {
	gboolean result;
	result = vala_gir_parser_unresolved_symbol_equal ((ValaUnresolvedSymbol*) a, (ValaUnresolvedSymbol*) b);
	return result;
}


/**
 * Parses all .gir source files in the specified code
 * context and builds a code tree.
 *
 * @param context a code context
 */
static gpointer _vala_code_context_ref0 (gpointer self) {
	return self ? vala_code_context_ref (self) : NULL;
}


static gpointer _vala_code_node_ref0 (gpointer self) {
	return self ? vala_code_node_ref (self) : NULL;
}


static gpointer _vala_gir_parser_node_ref0 (gpointer self) {
	return self ? vala_gir_parser_node_ref (self) : NULL;
}


static gpointer _vala_iterable_ref0 (gpointer self) {
	return self ? vala_iterable_ref (self) : NULL;
}


void vala_gir_parser_parse (ValaGirParser* self, ValaCodeContext* context) {
	ValaCodeContext* _tmp0_;
	ValaCodeContext* _tmp1_;
	ValaCodeContext* _tmp2_;
	ValaNamespace* _tmp3_;
	ValaNamespace* _tmp4_;
	ValaScope* _tmp5_;
	ValaScope* _tmp6_;
	ValaSymbol* _tmp7_;
	ValaNamespace* _tmp8_;
	ValaGirParserNode* _tmp9_;
	ValaGirParserNode* _tmp10_;
	ValaCodeContext* _tmp11_;
	ValaNamespace* _tmp12_;
	ValaNamespace* _tmp13_;
	ValaSymbol* _tmp14_;
	GEqualFunc _tmp15_;
	ValaArrayList* _tmp16_;
	ValaGirParserNode* _tmp17_;
	ValaGirParserNode* _tmp18_;
	ValaCodeContext* _tmp19_;
	ValaGirParserNode* _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (context != NULL);
	_tmp0_ = context;
	_tmp1_ = _vala_code_context_ref0 (_tmp0_);
	_vala_code_context_unref0 (self->priv->context);
	self->priv->context = _tmp1_;
	_tmp2_ = context;
	_tmp3_ = vala_code_context_get_root (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_symbol_get_scope ((ValaSymbol*) _tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_scope_lookup (_tmp6_, "GLib");
	_tmp8_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, VALA_TYPE_NAMESPACE) ? ((ValaNamespace*) _tmp7_) : NULL;
	if (_tmp8_ == NULL) {
		_vala_code_node_unref0 (_tmp7_);
	}
	_vala_code_node_unref0 (self->priv->glib_ns);
	self->priv->glib_ns = _tmp8_;
	_tmp9_ = vala_gir_parser_node_new (NULL);
	_vala_gir_parser_node_unref0 (self->priv->root);
	self->priv->root = _tmp9_;
	_tmp10_ = self->priv->root;
	_tmp11_ = context;
	_tmp12_ = vala_code_context_get_root (_tmp11_);
	_tmp13_ = _tmp12_;
	_tmp14_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp13_);
	_vala_code_node_unref0 (_tmp10_->symbol);
	_tmp10_->symbol = _tmp14_;
	_tmp15_ = g_direct_equal;
	_tmp16_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, (GDestroyNotify) vala_gir_parser_node_unref, _tmp15_);
	_vala_iterable_unref0 (self->priv->tree_stack);
	self->priv->tree_stack = _tmp16_;
	_tmp17_ = self->priv->root;
	_tmp18_ = _vala_gir_parser_node_ref0 (_tmp17_);
	_vala_gir_parser_node_unref0 (self->priv->current);
	self->priv->current = _tmp18_;
	vala_gir_parser_map_vala_to_gir (self);
	_tmp19_ = context;
	vala_code_context_accept (_tmp19_, (ValaCodeVisitor*) self);
	vala_gir_parser_resolve_gir_symbols (self);
	vala_gir_parser_create_new_namespaces (self);
	vala_gir_parser_resolve_type_arguments (self);
	_tmp20_ = self->priv->root;
	vala_gir_parser_node_process (_tmp20_, self);
	{
		ValaArrayList* _metadata_list = NULL;
		ValaArrayList* _tmp21_;
		ValaArrayList* _tmp22_;
		gint _metadata_size = 0;
		ValaArrayList* _tmp23_;
		gint _tmp24_;
		gint _tmp25_;
		gint _metadata_index = 0;
		_tmp21_ = self->priv->metadata_roots;
		_tmp22_ = _vala_iterable_ref0 (_tmp21_);
		_metadata_list = _tmp22_;
		_tmp23_ = _metadata_list;
		_tmp24_ = vala_collection_get_size ((ValaCollection*) _tmp23_);
		_tmp25_ = _tmp24_;
		_metadata_size = _tmp25_;
		_metadata_index = -1;
		while (TRUE) {
			gint _tmp26_;
			gint _tmp27_;
			gint _tmp28_;
			ValaGirParserMetadata* metadata = NULL;
			ValaArrayList* _tmp29_;
			gint _tmp30_;
			gpointer _tmp31_;
			ValaGirParserMetadata* _tmp32_;
			_tmp26_ = _metadata_index;
			_metadata_index = _tmp26_ + 1;
			_tmp27_ = _metadata_index;
			_tmp28_ = _metadata_size;
			if (!(_tmp27_ < _tmp28_)) {
				break;
			}
			_tmp29_ = _metadata_list;
			_tmp30_ = _metadata_index;
			_tmp31_ = vala_list_get ((ValaList*) _tmp29_, _tmp30_);
			metadata = (ValaGirParserMetadata*) _tmp31_;
			_tmp32_ = metadata;
			vala_gir_parser_report_unused_metadata (self, _tmp32_);
			_vala_gir_parser_metadata_unref0 (metadata);
		}
		_vala_iterable_unref0 (_metadata_list);
	}
}


static void vala_gir_parser_map_vala_to_gir (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	{
		ValaList* _source_file_list = NULL;
		ValaCodeContext* _tmp0_;
		ValaList* _tmp1_;
		gint _source_file_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _source_file_index = 0;
		_tmp0_ = self->priv->context;
		_tmp1_ = vala_code_context_get_source_files (_tmp0_);
		_source_file_list = _tmp1_;
		_tmp2_ = _source_file_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_source_file_size = _tmp4_;
		_source_file_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaSourceFile* source_file = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gchar* gir_namespace = NULL;
			ValaSourceFile* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			gchar* _tmp14_;
			gchar* gir_version = NULL;
			ValaSourceFile* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			gchar* _tmp18_;
			ValaNamespace* ns = NULL;
			const gchar* _tmp19_;
			const gchar* _tmp39_;
			ValaSet* _tmp40_;
			const gchar* _tmp41_;
			const gchar* _tmp42_;
			gchar* _tmp43_;
			gchar* _tmp44_;
			ValaUnresolvedSymbol* gir_symbol = NULL;
			const gchar* _tmp45_;
			ValaUnresolvedSymbol* _tmp46_;
			const gchar* _tmp47_;
			ValaNamespace* _tmp48_;
			const gchar* _tmp49_;
			const gchar* _tmp50_;
			_tmp5_ = _source_file_index;
			_source_file_index = _tmp5_ + 1;
			_tmp6_ = _source_file_index;
			_tmp7_ = _source_file_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _source_file_list;
			_tmp9_ = _source_file_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			source_file = (ValaSourceFile*) _tmp10_;
			_tmp11_ = source_file;
			_tmp12_ = vala_source_file_get_gir_namespace (_tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = g_strdup (_tmp13_);
			gir_namespace = _tmp14_;
			_tmp15_ = source_file;
			_tmp16_ = vala_source_file_get_gir_version (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = g_strdup (_tmp17_);
			gir_version = _tmp18_;
			ns = NULL;
			_tmp19_ = gir_namespace;
			if (_tmp19_ == NULL) {
				{
					ValaList* _node_list = NULL;
					ValaSourceFile* _tmp20_;
					ValaList* _tmp21_;
					gint _node_size = 0;
					ValaList* _tmp22_;
					gint _tmp23_;
					gint _tmp24_;
					gint _node_index = 0;
					_tmp20_ = source_file;
					_tmp21_ = vala_source_file_get_nodes (_tmp20_);
					_node_list = _tmp21_;
					_tmp22_ = _node_list;
					_tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_);
					_tmp24_ = _tmp23_;
					_node_size = _tmp24_;
					_node_index = -1;
					while (TRUE) {
						gint _tmp25_;
						gint _tmp26_;
						gint _tmp27_;
						ValaCodeNode* node = NULL;
						ValaList* _tmp28_;
						gint _tmp29_;
						gpointer _tmp30_;
						ValaCodeNode* _tmp31_;
						_tmp25_ = _node_index;
						_node_index = _tmp25_ + 1;
						_tmp26_ = _node_index;
						_tmp27_ = _node_size;
						if (!(_tmp26_ < _tmp27_)) {
							break;
						}
						_tmp28_ = _node_list;
						_tmp29_ = _node_index;
						_tmp30_ = vala_list_get (_tmp28_, _tmp29_);
						node = (ValaCodeNode*) _tmp30_;
						_tmp31_ = node;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, VALA_TYPE_NAMESPACE)) {
							ValaCodeNode* _tmp32_;
							ValaNamespace* _tmp33_;
							ValaNamespace* _tmp34_;
							gchar* _tmp35_;
							const gchar* _tmp36_;
							_tmp32_ = node;
							_tmp33_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, VALA_TYPE_NAMESPACE, ValaNamespace));
							_vala_code_node_unref0 (ns);
							ns = _tmp33_;
							_tmp34_ = ns;
							_tmp35_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp34_, "CCode", "gir_namespace", NULL);
							_g_free0 (gir_namespace);
							gir_namespace = _tmp35_;
							_tmp36_ = gir_namespace;
							if (_tmp36_ != NULL) {
								ValaNamespace* _tmp37_;
								gchar* _tmp38_;
								_tmp37_ = ns;
								_tmp38_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp37_, "CCode", "gir_version", NULL);
								_g_free0 (gir_version);
								gir_version = _tmp38_;
								_vala_code_node_unref0 (node);
								break;
							}
						}
						_vala_code_node_unref0 (node);
					}
					_vala_iterable_unref0 (_node_list);
				}
			}
			_tmp39_ = gir_namespace;
			if (_tmp39_ == NULL) {
				_vala_code_node_unref0 (ns);
				_g_free0 (gir_version);
				_g_free0 (gir_namespace);
				_vala_source_file_unref0 (source_file);
				continue;
			}
			_tmp40_ = self->priv->provided_namespaces;
			_tmp41_ = gir_namespace;
			_tmp42_ = gir_version;
			_tmp43_ = g_strdup_printf ("%s-%s", _tmp41_, _tmp42_);
			_tmp44_ = _tmp43_;
			vala_collection_add ((ValaCollection*) _tmp40_, _tmp44_);
			_g_free0 (_tmp44_);
			_tmp45_ = gir_namespace;
			_tmp46_ = vala_unresolved_symbol_new (NULL, _tmp45_, NULL);
			gir_symbol = _tmp46_;
			_tmp47_ = gir_namespace;
			_tmp48_ = ns;
			_tmp49_ = vala_symbol_get_name ((ValaSymbol*) _tmp48_);
			_tmp50_ = _tmp49_;
			if (g_strcmp0 (_tmp47_, _tmp50_) != 0) {
				ValaUnresolvedSymbol* _tmp51_;
				ValaNamespace* _tmp52_;
				_tmp51_ = gir_symbol;
				_tmp52_ = ns;
				vala_gir_parser_set_symbol_mapping (self, _tmp51_, (ValaSymbol*) _tmp52_);
			}
			{
				ValaList* _node_list = NULL;
				ValaSourceFile* _tmp53_;
				ValaList* _tmp54_;
				gint _node_size = 0;
				ValaList* _tmp55_;
				gint _tmp56_;
				gint _tmp57_;
				gint _node_index = 0;
				_tmp53_ = source_file;
				_tmp54_ = vala_source_file_get_nodes (_tmp53_);
				_node_list = _tmp54_;
				_tmp55_ = _node_list;
				_tmp56_ = vala_collection_get_size ((ValaCollection*) _tmp55_);
				_tmp57_ = _tmp56_;
				_node_size = _tmp57_;
				_node_index = -1;
				while (TRUE) {
					gint _tmp58_;
					gint _tmp59_;
					gint _tmp60_;
					ValaCodeNode* node = NULL;
					ValaList* _tmp61_;
					gint _tmp62_;
					gpointer _tmp63_;
					ValaCodeNode* _tmp64_;
					gboolean _tmp65_;
					_tmp58_ = _node_index;
					_node_index = _tmp58_ + 1;
					_tmp59_ = _node_index;
					_tmp60_ = _node_size;
					if (!(_tmp59_ < _tmp60_)) {
						break;
					}
					_tmp61_ = _node_list;
					_tmp62_ = _node_index;
					_tmp63_ = vala_list_get (_tmp61_, _tmp62_);
					node = (ValaCodeNode*) _tmp63_;
					_tmp64_ = node;
					_tmp65_ = vala_code_node_has_attribute_argument (_tmp64_, "GIR", "name");
					if (_tmp65_) {
						ValaUnresolvedSymbol* map_from = NULL;
						ValaUnresolvedSymbol* _tmp66_;
						ValaCodeNode* _tmp67_;
						gchar* _tmp68_;
						gchar* _tmp69_;
						ValaUnresolvedSymbol* _tmp70_;
						ValaUnresolvedSymbol* _tmp71_;
						ValaUnresolvedSymbol* _tmp72_;
						ValaCodeNode* _tmp73_;
						_tmp66_ = gir_symbol;
						_tmp67_ = node;
						_tmp68_ = vala_code_node_get_attribute_string (_tmp67_, "GIR", "name", NULL);
						_tmp69_ = _tmp68_;
						_tmp70_ = vala_unresolved_symbol_new (_tmp66_, _tmp69_, NULL);
						_tmp71_ = _tmp70_;
						_g_free0 (_tmp69_);
						map_from = _tmp71_;
						_tmp72_ = map_from;
						_tmp73_ = node;
						vala_gir_parser_set_symbol_mapping (self, _tmp72_, G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, VALA_TYPE_SYMBOL, ValaSymbol));
						_vala_code_node_unref0 (map_from);
					}
					_vala_code_node_unref0 (node);
				}
				_vala_iterable_unref0 (_node_list);
			}
			_vala_code_node_unref0 (gir_symbol);
			_vala_code_node_unref0 (ns);
			_g_free0 (gir_version);
			_g_free0 (gir_namespace);
			_vala_source_file_unref0 (source_file);
		}
		_vala_iterable_unref0 (_source_file_list);
	}
}


static void vala_gir_parser_real_visit_source_file (ValaCodeVisitor* base, ValaSourceFile* source_file) {
	ValaGirParser * self;
	ValaSourceFile* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gboolean _tmp3_;
	self = (ValaGirParser*) base;
	g_return_if_fail (source_file != NULL);
	_tmp0_ = source_file;
	_tmp1_ = vala_source_file_get_filename (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_str_has_suffix (_tmp2_, ".gir");
	if (_tmp3_) {
		ValaSourceFile* _tmp4_;
		_tmp4_ = source_file;
		vala_gir_parser_parse_file (self, _tmp4_);
	}
}


static gpointer _vala_gir_parser_metadata_ref0 (gpointer self) {
	return self ? vala_gir_parser_metadata_ref (self) : NULL;
}


static gpointer _vala_source_file_ref0 (gpointer self) {
	return self ? vala_source_file_ref (self) : NULL;
}


void vala_gir_parser_parse_file (ValaGirParser* self, ValaSourceFile* source_file) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	ValaGirParserMetadata* _tmp3_;
	ValaGirParserMetadata* _tmp4_;
	ValaSourceFile* _tmp5_;
	ValaSourceFile* _tmp6_;
	ValaSourceFile* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	ValaMarkupReader* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (source_file != NULL);
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_METADATA, (GBoxedCopyFunc) vala_gir_parser_metadata_ref, (GDestroyNotify) vala_gir_parser_metadata_unref, _tmp0_);
	_vala_iterable_unref0 (self->priv->metadata_stack);
	self->priv->metadata_stack = _tmp1_;
	_tmp2_ = vala_gir_parser_metadata_get_empty ();
	_tmp3_ = _tmp2_;
	_tmp4_ = _vala_gir_parser_metadata_ref0 (_tmp3_);
	_vala_gir_parser_metadata_unref0 (self->priv->metadata);
	self->priv->metadata = _tmp4_;
	self->priv->cheader_filenames = (_vala_array_free (self->priv->cheader_filenames, self->priv->cheader_filenames_length1, (GDestroyNotify) g_free), NULL);
	self->priv->cheader_filenames = NULL;
	self->priv->cheader_filenames_length1 = 0;
	self->priv->_cheader_filenames_size_ = self->priv->cheader_filenames_length1;
	_tmp5_ = source_file;
	_tmp6_ = _vala_source_file_ref0 (_tmp5_);
	_vala_source_file_unref0 (self->priv->current_source_file);
	self->priv->current_source_file = _tmp6_;
	_tmp7_ = source_file;
	_tmp8_ = vala_source_file_get_filename (_tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_markup_reader_new (_tmp9_);
	_vala_markup_reader_unref0 (self->priv->reader);
	self->priv->reader = _tmp10_;
	vala_gir_parser_next (self);
	vala_gir_parser_next (self);
	vala_gir_parser_next (self);
	vala_gir_parser_parse_repository (self);
	_vala_markup_reader_unref0 (self->priv->reader);
	self->priv->reader = NULL;
	_vala_source_file_unref0 (self->priv->current_source_file);
	self->priv->current_source_file = NULL;
}


static void vala_gir_parser_next (ValaGirParser* self) {
	ValaMarkupReader* _tmp0_;
	ValaSourceLocation _tmp1_ = {0};
	ValaSourceLocation _tmp2_ = {0};
	ValaMarkupTokenType _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->reader;
	_tmp3_ = vala_markup_reader_read_token (_tmp0_, &_tmp1_, &_tmp2_);
	self->priv->begin = _tmp1_;
	self->priv->end = _tmp2_;
	self->priv->current_token = _tmp3_;
}


static void vala_gir_parser_start_element (ValaGirParser* self, const gchar* name) {
	gboolean _tmp0_ = FALSE;
	ValaMarkupTokenType _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp1_ = self->priv->current_token;
	if (_tmp1_ != VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
		_tmp0_ = TRUE;
	} else {
		ValaMarkupReader* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp2_ = self->priv->reader;
		_tmp3_ = vala_markup_reader_get_name (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = name;
		_tmp0_ = g_strcmp0 (_tmp4_, _tmp5_) != 0;
	}
	if (_tmp0_) {
		ValaSourceReference* _tmp6_;
		ValaSourceReference* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp6_ = vala_gir_parser_get_current_src (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = name;
		_tmp9_ = g_strdup_printf ("expected start element of `%s'", _tmp8_);
		_tmp10_ = _tmp9_;
		vala_report_error (_tmp7_, _tmp10_);
		_g_free0 (_tmp10_);
		_vala_source_reference_unref0 (_tmp7_);
	}
}


static void vala_gir_parser_end_element (ValaGirParser* self, const gchar* name) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		ValaMarkupTokenType _tmp1_;
		ValaSourceReference* _tmp6_;
		ValaSourceReference* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp1_ = self->priv->current_token;
		if (_tmp1_ != VALA_MARKUP_TOKEN_TYPE_END_ELEMENT) {
			_tmp0_ = TRUE;
		} else {
			ValaMarkupReader* _tmp2_;
			const gchar* _tmp3_;
			const gchar* _tmp4_;
			const gchar* _tmp5_;
			_tmp2_ = self->priv->reader;
			_tmp3_ = vala_markup_reader_get_name (_tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = name;
			_tmp0_ = g_strcmp0 (_tmp4_, _tmp5_) != 0;
		}
		if (!_tmp0_) {
			break;
		}
		_tmp6_ = vala_gir_parser_get_current_src (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = name;
		_tmp9_ = g_strdup_printf ("expected end element of `%s'", _tmp8_);
		_tmp10_ = _tmp9_;
		vala_report_warning (_tmp7_, _tmp10_);
		_g_free0 (_tmp10_);
		_vala_source_reference_unref0 (_tmp7_);
		vala_gir_parser_skip_element (self);
	}
	vala_gir_parser_next (self);
}


static ValaSourceReference* vala_gir_parser_get_current_src (ValaGirParser* self) {
	ValaSourceReference* result = NULL;
	ValaSourceFile* _tmp0_;
	ValaSourceLocation _tmp1_;
	ValaSourceLocation _tmp2_;
	ValaSourceReference* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->current_source_file;
	_tmp1_ = self->priv->begin;
	_tmp2_ = self->priv->end;
	_tmp3_ = vala_source_reference_new (_tmp0_, &_tmp1_, &_tmp2_);
	result = _tmp3_;
	return result;
}


static void vala_gir_parser_add_symbol_to_container (ValaSymbol* container, ValaSymbol* sym) {
	ValaSymbol* _tmp0_;
	g_return_if_fail (container != NULL);
	g_return_if_fail (sym != NULL);
	_tmp0_ = container;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_CLASS)) {
		ValaClass* cl = NULL;
		ValaSymbol* _tmp1_;
		ValaSymbol* _tmp2_;
		_tmp1_ = container;
		cl = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_CLASS, ValaClass);
		_tmp2_ = sym;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_CLASS)) {
			ValaClass* _tmp3_;
			ValaSymbol* _tmp4_;
			_tmp3_ = cl;
			_tmp4_ = sym;
			vala_symbol_add_class ((ValaSymbol*) _tmp3_, G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, VALA_TYPE_CLASS, ValaClass));
		} else {
			ValaSymbol* _tmp5_;
			_tmp5_ = sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, VALA_TYPE_CONSTANT)) {
				ValaClass* _tmp6_;
				ValaSymbol* _tmp7_;
				_tmp6_ = cl;
				_tmp7_ = sym;
				vala_symbol_add_constant ((ValaSymbol*) _tmp6_, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALA_TYPE_CONSTANT, ValaConstant));
			} else {
				ValaSymbol* _tmp8_;
				_tmp8_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, VALA_TYPE_ENUM)) {
					ValaClass* _tmp9_;
					ValaSymbol* _tmp10_;
					_tmp9_ = cl;
					_tmp10_ = sym;
					vala_symbol_add_enum ((ValaSymbol*) _tmp9_, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, VALA_TYPE_ENUM, ValaEnum));
				} else {
					ValaSymbol* _tmp11_;
					_tmp11_ = sym;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, VALA_TYPE_FIELD)) {
						ValaClass* _tmp12_;
						ValaSymbol* _tmp13_;
						_tmp12_ = cl;
						_tmp13_ = sym;
						vala_symbol_add_field ((ValaSymbol*) _tmp12_, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALA_TYPE_FIELD, ValaField));
					} else {
						ValaSymbol* _tmp14_;
						_tmp14_ = sym;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, VALA_TYPE_METHOD)) {
							ValaClass* _tmp15_;
							ValaSymbol* _tmp16_;
							_tmp15_ = cl;
							_tmp16_ = sym;
							vala_symbol_add_method ((ValaSymbol*) _tmp15_, G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, VALA_TYPE_METHOD, ValaMethod));
						} else {
							ValaSymbol* _tmp17_;
							_tmp17_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, VALA_TYPE_PROPERTY)) {
								ValaClass* _tmp18_;
								ValaSymbol* _tmp19_;
								_tmp18_ = cl;
								_tmp19_ = sym;
								vala_symbol_add_property ((ValaSymbol*) _tmp18_, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, VALA_TYPE_PROPERTY, ValaProperty));
							} else {
								ValaSymbol* _tmp20_;
								_tmp20_ = sym;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp20_, VALA_TYPE_SIGNAL)) {
									ValaClass* _tmp21_;
									ValaSymbol* _tmp22_;
									_tmp21_ = cl;
									_tmp22_ = sym;
									vala_symbol_add_signal ((ValaSymbol*) _tmp21_, G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, VALA_TYPE_SIGNAL, ValaSignal));
								} else {
									ValaSymbol* _tmp23_;
									_tmp23_ = sym;
									if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp23_, VALA_TYPE_STRUCT)) {
										ValaClass* _tmp24_;
										ValaSymbol* _tmp25_;
										_tmp24_ = cl;
										_tmp25_ = sym;
										vala_symbol_add_struct ((ValaSymbol*) _tmp24_, G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, VALA_TYPE_STRUCT, ValaStruct));
									}
								}
							}
						}
					}
				}
			}
		}
	} else {
		ValaSymbol* _tmp26_;
		_tmp26_ = container;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, VALA_TYPE_ENUM)) {
			ValaEnum* en = NULL;
			ValaSymbol* _tmp27_;
			ValaSymbol* _tmp28_;
			_tmp27_ = container;
			en = G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, VALA_TYPE_ENUM, ValaEnum);
			_tmp28_ = sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp28_, VALA_TYPE_ENUM_VALUE)) {
				ValaEnum* _tmp29_;
				ValaSymbol* _tmp30_;
				_tmp29_ = en;
				_tmp30_ = sym;
				vala_enum_add_value (_tmp29_, G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, VALA_TYPE_ENUM_VALUE, ValaEnumValue));
			} else {
				ValaSymbol* _tmp31_;
				_tmp31_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, VALA_TYPE_CONSTANT)) {
					ValaEnum* _tmp32_;
					ValaSymbol* _tmp33_;
					_tmp32_ = en;
					_tmp33_ = sym;
					vala_symbol_add_constant ((ValaSymbol*) _tmp32_, G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, VALA_TYPE_CONSTANT, ValaConstant));
				} else {
					ValaSymbol* _tmp34_;
					_tmp34_ = sym;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, VALA_TYPE_METHOD)) {
						ValaEnum* _tmp35_;
						ValaSymbol* _tmp36_;
						_tmp35_ = en;
						_tmp36_ = sym;
						vala_symbol_add_method ((ValaSymbol*) _tmp35_, G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, VALA_TYPE_METHOD, ValaMethod));
					}
				}
			}
		} else {
			ValaSymbol* _tmp37_;
			_tmp37_ = container;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp37_, VALA_TYPE_INTERFACE)) {
				ValaInterface* iface = NULL;
				ValaSymbol* _tmp38_;
				ValaSymbol* _tmp39_;
				_tmp38_ = container;
				iface = G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, VALA_TYPE_INTERFACE, ValaInterface);
				_tmp39_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp39_, VALA_TYPE_CLASS)) {
					ValaInterface* _tmp40_;
					ValaSymbol* _tmp41_;
					_tmp40_ = iface;
					_tmp41_ = sym;
					vala_symbol_add_class ((ValaSymbol*) _tmp40_, G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, VALA_TYPE_CLASS, ValaClass));
				} else {
					ValaSymbol* _tmp42_;
					_tmp42_ = sym;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp42_, VALA_TYPE_CONSTANT)) {
						ValaInterface* _tmp43_;
						ValaSymbol* _tmp44_;
						_tmp43_ = iface;
						_tmp44_ = sym;
						vala_symbol_add_constant ((ValaSymbol*) _tmp43_, G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, VALA_TYPE_CONSTANT, ValaConstant));
					} else {
						ValaSymbol* _tmp45_;
						_tmp45_ = sym;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp45_, VALA_TYPE_ENUM)) {
							ValaInterface* _tmp46_;
							ValaSymbol* _tmp47_;
							_tmp46_ = iface;
							_tmp47_ = sym;
							vala_symbol_add_enum ((ValaSymbol*) _tmp46_, G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, VALA_TYPE_ENUM, ValaEnum));
						} else {
							ValaSymbol* _tmp48_;
							_tmp48_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, VALA_TYPE_FIELD)) {
								ValaInterface* _tmp49_;
								ValaSymbol* _tmp50_;
								_tmp49_ = iface;
								_tmp50_ = sym;
								vala_symbol_add_field ((ValaSymbol*) _tmp49_, G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, VALA_TYPE_FIELD, ValaField));
							} else {
								ValaSymbol* _tmp51_;
								_tmp51_ = sym;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp51_, VALA_TYPE_METHOD)) {
									ValaInterface* _tmp52_;
									ValaSymbol* _tmp53_;
									_tmp52_ = iface;
									_tmp53_ = sym;
									vala_symbol_add_method ((ValaSymbol*) _tmp52_, G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, VALA_TYPE_METHOD, ValaMethod));
								} else {
									ValaSymbol* _tmp54_;
									_tmp54_ = sym;
									if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp54_, VALA_TYPE_PROPERTY)) {
										ValaInterface* _tmp55_;
										ValaSymbol* _tmp56_;
										_tmp55_ = iface;
										_tmp56_ = sym;
										vala_symbol_add_property ((ValaSymbol*) _tmp55_, G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, VALA_TYPE_PROPERTY, ValaProperty));
									} else {
										ValaSymbol* _tmp57_;
										_tmp57_ = sym;
										if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, VALA_TYPE_SIGNAL)) {
											ValaInterface* _tmp58_;
											ValaSymbol* _tmp59_;
											_tmp58_ = iface;
											_tmp59_ = sym;
											vala_symbol_add_signal ((ValaSymbol*) _tmp58_, G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, VALA_TYPE_SIGNAL, ValaSignal));
										} else {
											ValaSymbol* _tmp60_;
											_tmp60_ = sym;
											if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp60_, VALA_TYPE_STRUCT)) {
												ValaInterface* _tmp61_;
												ValaSymbol* _tmp62_;
												_tmp61_ = iface;
												_tmp62_ = sym;
												vala_symbol_add_struct ((ValaSymbol*) _tmp61_, G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, VALA_TYPE_STRUCT, ValaStruct));
											}
										}
									}
								}
							}
						}
					}
				}
			} else {
				ValaSymbol* _tmp63_;
				_tmp63_ = container;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp63_, VALA_TYPE_NAMESPACE)) {
					ValaNamespace* ns = NULL;
					ValaSymbol* _tmp64_;
					ValaSymbol* _tmp65_;
					_tmp64_ = container;
					ns = G_TYPE_CHECK_INSTANCE_CAST (_tmp64_, VALA_TYPE_NAMESPACE, ValaNamespace);
					_tmp65_ = sym;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp65_, VALA_TYPE_NAMESPACE)) {
						ValaNamespace* _tmp66_;
						ValaSymbol* _tmp67_;
						_tmp66_ = ns;
						_tmp67_ = sym;
						vala_symbol_add_namespace ((ValaSymbol*) _tmp66_, G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, VALA_TYPE_NAMESPACE, ValaNamespace));
					} else {
						ValaSymbol* _tmp68_;
						_tmp68_ = sym;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp68_, VALA_TYPE_CLASS)) {
							ValaNamespace* _tmp69_;
							ValaSymbol* _tmp70_;
							_tmp69_ = ns;
							_tmp70_ = sym;
							vala_symbol_add_class ((ValaSymbol*) _tmp69_, G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, VALA_TYPE_CLASS, ValaClass));
						} else {
							ValaSymbol* _tmp71_;
							_tmp71_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp71_, VALA_TYPE_CONSTANT)) {
								ValaNamespace* _tmp72_;
								ValaSymbol* _tmp73_;
								_tmp72_ = ns;
								_tmp73_ = sym;
								vala_symbol_add_constant ((ValaSymbol*) _tmp72_, G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, VALA_TYPE_CONSTANT, ValaConstant));
							} else {
								ValaSymbol* _tmp74_;
								_tmp74_ = sym;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp74_, VALA_TYPE_DELEGATE)) {
									ValaNamespace* _tmp75_;
									ValaSymbol* _tmp76_;
									_tmp75_ = ns;
									_tmp76_ = sym;
									vala_symbol_add_delegate ((ValaSymbol*) _tmp75_, G_TYPE_CHECK_INSTANCE_CAST (_tmp76_, VALA_TYPE_DELEGATE, ValaDelegate));
								} else {
									ValaSymbol* _tmp77_;
									_tmp77_ = sym;
									if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp77_, VALA_TYPE_ENUM)) {
										ValaNamespace* _tmp78_;
										ValaSymbol* _tmp79_;
										_tmp78_ = ns;
										_tmp79_ = sym;
										vala_symbol_add_enum ((ValaSymbol*) _tmp78_, G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, VALA_TYPE_ENUM, ValaEnum));
									} else {
										ValaSymbol* _tmp80_;
										_tmp80_ = sym;
										if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp80_, VALA_TYPE_ERROR_DOMAIN)) {
											ValaNamespace* _tmp81_;
											ValaSymbol* _tmp82_;
											_tmp81_ = ns;
											_tmp82_ = sym;
											vala_symbol_add_error_domain ((ValaSymbol*) _tmp81_, G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, VALA_TYPE_ERROR_DOMAIN, ValaErrorDomain));
										} else {
											ValaSymbol* _tmp83_;
											_tmp83_ = sym;
											if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp83_, VALA_TYPE_FIELD)) {
												ValaNamespace* _tmp84_;
												ValaSymbol* _tmp85_;
												_tmp84_ = ns;
												_tmp85_ = sym;
												vala_symbol_add_field ((ValaSymbol*) _tmp84_, G_TYPE_CHECK_INSTANCE_CAST (_tmp85_, VALA_TYPE_FIELD, ValaField));
											} else {
												ValaSymbol* _tmp86_;
												_tmp86_ = sym;
												if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp86_, VALA_TYPE_INTERFACE)) {
													ValaNamespace* _tmp87_;
													ValaSymbol* _tmp88_;
													_tmp87_ = ns;
													_tmp88_ = sym;
													vala_symbol_add_interface ((ValaSymbol*) _tmp87_, G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, VALA_TYPE_INTERFACE, ValaInterface));
												} else {
													ValaSymbol* _tmp89_;
													_tmp89_ = sym;
													if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp89_, VALA_TYPE_METHOD)) {
														ValaNamespace* _tmp90_;
														ValaSymbol* _tmp91_;
														_tmp90_ = ns;
														_tmp91_ = sym;
														vala_symbol_add_method ((ValaSymbol*) _tmp90_, G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, VALA_TYPE_METHOD, ValaMethod));
													} else {
														ValaSymbol* _tmp92_;
														_tmp92_ = sym;
														if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp92_, VALA_TYPE_STRUCT)) {
															ValaNamespace* _tmp93_;
															ValaSymbol* _tmp94_;
															_tmp93_ = ns;
															_tmp94_ = sym;
															vala_symbol_add_struct ((ValaSymbol*) _tmp93_, G_TYPE_CHECK_INSTANCE_CAST (_tmp94_, VALA_TYPE_STRUCT, ValaStruct));
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				} else {
					ValaSymbol* _tmp95_;
					_tmp95_ = container;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp95_, VALA_TYPE_STRUCT)) {
						ValaStruct* st = NULL;
						ValaSymbol* _tmp96_;
						ValaSymbol* _tmp97_;
						_tmp96_ = container;
						st = G_TYPE_CHECK_INSTANCE_CAST (_tmp96_, VALA_TYPE_STRUCT, ValaStruct);
						_tmp97_ = sym;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp97_, VALA_TYPE_CONSTANT)) {
							ValaStruct* _tmp98_;
							ValaSymbol* _tmp99_;
							_tmp98_ = st;
							_tmp99_ = sym;
							vala_symbol_add_constant ((ValaSymbol*) _tmp98_, G_TYPE_CHECK_INSTANCE_CAST (_tmp99_, VALA_TYPE_CONSTANT, ValaConstant));
						} else {
							ValaSymbol* _tmp100_;
							_tmp100_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp100_, VALA_TYPE_FIELD)) {
								ValaStruct* _tmp101_;
								ValaSymbol* _tmp102_;
								_tmp101_ = st;
								_tmp102_ = sym;
								vala_symbol_add_field ((ValaSymbol*) _tmp101_, G_TYPE_CHECK_INSTANCE_CAST (_tmp102_, VALA_TYPE_FIELD, ValaField));
							} else {
								ValaSymbol* _tmp103_;
								_tmp103_ = sym;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp103_, VALA_TYPE_METHOD)) {
									ValaStruct* _tmp104_;
									ValaSymbol* _tmp105_;
									_tmp104_ = st;
									_tmp105_ = sym;
									vala_symbol_add_method ((ValaSymbol*) _tmp104_, G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, VALA_TYPE_METHOD, ValaMethod));
								} else {
									ValaSymbol* _tmp106_;
									_tmp106_ = sym;
									if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp106_, VALA_TYPE_PROPERTY)) {
										ValaStruct* _tmp107_;
										ValaSymbol* _tmp108_;
										_tmp107_ = st;
										_tmp108_ = sym;
										vala_symbol_add_property ((ValaSymbol*) _tmp107_, G_TYPE_CHECK_INSTANCE_CAST (_tmp108_, VALA_TYPE_PROPERTY, ValaProperty));
									}
								}
							}
						}
					} else {
						ValaSymbol* _tmp109_;
						_tmp109_ = container;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp109_, VALA_TYPE_ERROR_DOMAIN)) {
							ValaErrorDomain* ed = NULL;
							ValaSymbol* _tmp110_;
							ValaSymbol* _tmp111_;
							_tmp110_ = container;
							ed = G_TYPE_CHECK_INSTANCE_CAST (_tmp110_, VALA_TYPE_ERROR_DOMAIN, ValaErrorDomain);
							_tmp111_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp111_, VALA_TYPE_ERROR_CODE)) {
								ValaErrorDomain* _tmp112_;
								ValaSymbol* _tmp113_;
								_tmp112_ = ed;
								_tmp113_ = sym;
								vala_error_domain_add_code (_tmp112_, G_TYPE_CHECK_INSTANCE_CAST (_tmp113_, VALA_TYPE_ERROR_CODE, ValaErrorCode));
							} else {
								ValaSymbol* _tmp114_;
								_tmp114_ = sym;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp114_, VALA_TYPE_METHOD)) {
									ValaErrorDomain* _tmp115_;
									ValaSymbol* _tmp116_;
									_tmp115_ = ed;
									_tmp116_ = sym;
									vala_symbol_add_method ((ValaSymbol*) _tmp115_, G_TYPE_CHECK_INSTANCE_CAST (_tmp116_, VALA_TYPE_METHOD, ValaMethod));
								}
							}
						} else {
							ValaSymbol* _tmp117_;
							ValaSourceReference* _tmp118_;
							ValaSourceReference* _tmp119_;
							ValaSymbol* _tmp120_;
							const gchar* _tmp121_;
							const gchar* _tmp122_;
							ValaSymbol* _tmp123_;
							const gchar* _tmp124_;
							const gchar* _tmp125_;
							gchar* _tmp126_;
							gchar* _tmp127_;
							_tmp117_ = sym;
							_tmp118_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp117_);
							_tmp119_ = _tmp118_;
							_tmp120_ = sym;
							_tmp121_ = vala_symbol_get_name (_tmp120_);
							_tmp122_ = _tmp121_;
							_tmp123_ = container;
							_tmp124_ = vala_symbol_get_name (_tmp123_);
							_tmp125_ = _tmp124_;
							_tmp126_ = g_strdup_printf ("impossible to add `%s' to container `%s'", _tmp122_, _tmp125_);
							_tmp127_ = _tmp126_;
							vala_report_error (_tmp119_, _tmp127_);
							_g_free0 (_tmp127_);
						}
					}
				}
			}
		}
	}
}


static gboolean vala_gir_parser_is_container (ValaSymbol* sym) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	ValaSymbol* _tmp4_;
	g_return_val_if_fail (sym != NULL, FALSE);
	_tmp4_ = sym;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
		_tmp3_ = TRUE;
	} else {
		ValaSymbol* _tmp5_;
		_tmp5_ = sym;
		_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, VALA_TYPE_STRUCT);
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		ValaSymbol* _tmp6_;
		_tmp6_ = sym;
		_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, VALA_TYPE_NAMESPACE);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		ValaSymbol* _tmp7_;
		_tmp7_ = sym;
		_tmp1_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, VALA_TYPE_ERROR_DOMAIN);
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ValaSymbol* _tmp8_;
		_tmp8_ = sym;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, VALA_TYPE_ENUM);
	}
	result = _tmp0_;
	return result;
}


static ValaUnresolvedSymbol* vala_gir_parser_parse_symbol_from_string (ValaGirParser* self, const gchar* symbol_string, ValaSourceReference* source_reference) {
	ValaUnresolvedSymbol* result = NULL;
	ValaUnresolvedSymbol* sym = NULL;
	const gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	ValaUnresolvedSymbol* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (symbol_string != NULL, NULL);
	sym = NULL;
	_tmp0_ = symbol_string;
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, ".", 0);
	{
		gchar** s_collection = NULL;
		gint s_collection_length1 = 0;
		gint _s_collection_size_ = 0;
		gint s_it = 0;
		s_collection = _tmp2_;
		s_collection_length1 = _vala_array_length (_tmp1_);
		for (s_it = 0; s_it < _vala_array_length (_tmp1_); s_it = s_it + 1) {
			const gchar* s = NULL;
			s = s_collection[s_it];
			{
				ValaUnresolvedSymbol* _tmp3_;
				const gchar* _tmp4_;
				ValaSourceReference* _tmp5_;
				ValaUnresolvedSymbol* _tmp6_;
				_tmp3_ = sym;
				_tmp4_ = s;
				_tmp5_ = source_reference;
				_tmp6_ = vala_unresolved_symbol_new (_tmp3_, _tmp4_, _tmp5_);
				_vala_code_node_unref0 (sym);
				sym = _tmp6_;
			}
		}
		s_collection = (_vala_array_free (s_collection, s_collection_length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp7_ = sym;
	if (_tmp7_ == NULL) {
		ValaSourceReference* _tmp8_;
		_tmp8_ = source_reference;
		vala_report_error (_tmp8_, "a symbol must be specified");
	}
	result = sym;
	return result;
}


static void vala_gir_parser_set_symbol_mapping (ValaGirParser* self, ValaUnresolvedSymbol* map_from, ValaSymbol* map_to) {
	ValaUnresolvedSymbol* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (map_from != NULL);
	g_return_if_fail (map_to != NULL);
	_tmp0_ = map_from;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, VALA_TYPE_UNRESOLVED_SYMBOL)) {
		ValaHashMap* _tmp1_;
		ValaUnresolvedSymbol* _tmp2_;
		ValaSymbol* _tmp3_;
		_tmp1_ = self->priv->unresolved_symbols_map;
		_tmp2_ = map_from;
		_tmp3_ = map_to;
		vala_map_set ((ValaMap*) _tmp1_, G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, VALA_TYPE_UNRESOLVED_SYMBOL, ValaUnresolvedSymbol), _tmp3_);
	}
}


static void vala_gir_parser_assume_parameter_names (ValaGirParser* self, ValaSignal* sig, ValaSymbol* sym, gboolean skip_first) {
	ValaIterator* iter = NULL;
	ValaSymbol* _tmp0_;
	ValaList* _tmp1_;
	ValaList* _tmp2_;
	ValaIterator* _tmp3_;
	ValaIterator* _tmp4_;
	gboolean first = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sig != NULL);
	g_return_if_fail (sym != NULL);
	_tmp0_ = sym;
	_tmp1_ = vala_callable_get_parameters (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, VALA_TYPE_CALLABLE, ValaCallable));
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_iterable_iterator ((ValaIterable*) _tmp2_);
	_tmp4_ = _tmp3_;
	_vala_iterable_unref0 (_tmp2_);
	iter = _tmp4_;
	first = TRUE;
	{
		ValaList* _param_list = NULL;
		ValaSignal* _tmp5_;
		ValaList* _tmp6_;
		gint _param_size = 0;
		ValaList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _param_index = 0;
		_tmp5_ = sig;
		_tmp6_ = vala_callable_get_parameters ((ValaCallable*) _tmp5_);
		_param_list = _tmp6_;
		_tmp7_ = _param_list;
		_tmp8_ = vala_collection_get_size ((ValaCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_param_size = _tmp9_;
		_param_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			ValaParameter* param = NULL;
			ValaList* _tmp13_;
			gint _tmp14_;
			gpointer _tmp15_;
			ValaIterator* _tmp16_;
			gboolean _tmp17_;
			gboolean _tmp18_ = FALSE;
			gboolean _tmp19_;
			ValaParameter* _tmp23_;
			ValaIterator* _tmp24_;
			gpointer _tmp25_;
			ValaParameter* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
			_tmp10_ = _param_index;
			_param_index = _tmp10_ + 1;
			_tmp11_ = _param_index;
			_tmp12_ = _param_size;
			if (!(_tmp11_ < _tmp12_)) {
				break;
			}
			_tmp13_ = _param_list;
			_tmp14_ = _param_index;
			_tmp15_ = vala_list_get (_tmp13_, _tmp14_);
			param = (ValaParameter*) _tmp15_;
			_tmp16_ = iter;
			_tmp17_ = vala_iterator_next (_tmp16_);
			if (!_tmp17_) {
				_vala_code_node_unref0 (param);
				break;
			}
			_tmp19_ = skip_first;
			if (_tmp19_) {
				gboolean _tmp20_;
				_tmp20_ = first;
				_tmp18_ = _tmp20_;
			} else {
				_tmp18_ = FALSE;
			}
			if (_tmp18_) {
				ValaIterator* _tmp21_;
				gboolean _tmp22_;
				_tmp21_ = iter;
				_tmp22_ = vala_iterator_next (_tmp21_);
				if (!_tmp22_) {
					_vala_code_node_unref0 (param);
					break;
				}
				first = FALSE;
			}
			_tmp23_ = param;
			_tmp24_ = iter;
			_tmp25_ = vala_iterator_get (_tmp24_);
			_tmp26_ = (ValaParameter*) _tmp25_;
			_tmp27_ = vala_symbol_get_name ((ValaSymbol*) _tmp26_);
			_tmp28_ = _tmp27_;
			vala_symbol_set_name ((ValaSymbol*) _tmp23_, _tmp28_);
			_vala_code_node_unref0 (_tmp26_);
			_vala_code_node_unref0 (param);
		}
		_vala_iterable_unref0 (_param_list);
	}
	_vala_iterator_unref0 (iter);
}


static ValaGirParserNode* vala_gir_parser_find_invoker (ValaGirParser* self, ValaGirParserNode* node) {
	ValaGirParserNode* result = NULL;
	ValaMethod* m = NULL;
	ValaGirParserNode* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaMethod* _tmp2_;
	gchar* prefix = NULL;
	ValaMethod* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = node;
	_tmp1_ = _tmp0_->symbol;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_METHOD, ValaMethod));
	m = _tmp2_;
	_tmp3_ = m;
	_tmp4_ = vala_symbol_get_name ((ValaSymbol*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strdup_printf ("%s_", _tmp5_);
	prefix = _tmp6_;
	{
		ValaArrayList* _n_list = NULL;
		ValaGirParserNode* _tmp7_;
		ValaGirParserNode* _tmp8_;
		ValaArrayList* _tmp9_;
		ValaArrayList* _tmp10_;
		gint _n_size = 0;
		ValaArrayList* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gint _n_index = 0;
		_tmp7_ = node;
		_tmp8_ = _tmp7_->parent;
		_tmp9_ = _tmp8_->members;
		_tmp10_ = _vala_iterable_ref0 (_tmp9_);
		_n_list = _tmp10_;
		_tmp11_ = _n_list;
		_tmp12_ = vala_collection_get_size ((ValaCollection*) _tmp11_);
		_tmp13_ = _tmp12_;
		_n_size = _tmp13_;
		_n_index = -1;
		while (TRUE) {
			gint _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			ValaGirParserNode* n = NULL;
			ValaArrayList* _tmp17_;
			gint _tmp18_;
			gpointer _tmp19_;
			ValaGirParserNode* _tmp20_;
			const gchar* _tmp21_;
			const gchar* _tmp22_;
			gboolean _tmp23_;
			ValaMethod* invoker = NULL;
			ValaGirParserNode* _tmp24_;
			ValaSymbol* _tmp25_;
			ValaMethod* _tmp26_;
			gboolean _tmp27_ = FALSE;
			ValaMethod* _tmp28_;
			ValaIterator* iter = NULL;
			ValaMethod* _tmp39_;
			ValaList* _tmp40_;
			ValaList* _tmp41_;
			ValaIterator* _tmp42_;
			ValaIterator* _tmp43_;
			ValaMethod* _tmp66_;
			_tmp14_ = _n_index;
			_n_index = _tmp14_ + 1;
			_tmp15_ = _n_index;
			_tmp16_ = _n_size;
			if (!(_tmp15_ < _tmp16_)) {
				break;
			}
			_tmp17_ = _n_list;
			_tmp18_ = _n_index;
			_tmp19_ = vala_list_get ((ValaList*) _tmp17_, _tmp18_);
			n = (ValaGirParserNode*) _tmp19_;
			_tmp20_ = n;
			_tmp21_ = _tmp20_->name;
			_tmp22_ = prefix;
			_tmp23_ = g_str_has_prefix (_tmp21_, _tmp22_);
			if (!_tmp23_) {
				_vala_gir_parser_node_unref0 (n);
				continue;
			}
			_tmp24_ = n;
			_tmp25_ = _tmp24_->symbol;
			_tmp26_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, VALA_TYPE_METHOD) ? ((ValaMethod*) _tmp25_) : NULL);
			invoker = _tmp26_;
			_tmp28_ = invoker;
			if (_tmp28_ == NULL) {
				_tmp27_ = TRUE;
			} else {
				ValaMethod* _tmp29_;
				ValaList* _tmp30_;
				ValaList* _tmp31_;
				gint _tmp32_;
				gint _tmp33_;
				ValaMethod* _tmp34_;
				ValaList* _tmp35_;
				ValaList* _tmp36_;
				gint _tmp37_;
				gint _tmp38_;
				_tmp29_ = m;
				_tmp30_ = vala_callable_get_parameters ((ValaCallable*) _tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = vala_collection_get_size ((ValaCollection*) _tmp31_);
				_tmp33_ = _tmp32_;
				_tmp34_ = invoker;
				_tmp35_ = vala_callable_get_parameters ((ValaCallable*) _tmp34_);
				_tmp36_ = _tmp35_;
				_tmp37_ = vala_collection_get_size ((ValaCollection*) _tmp36_);
				_tmp38_ = _tmp37_;
				_tmp27_ = _tmp33_ != _tmp38_;
				_vala_iterable_unref0 (_tmp36_);
				_vala_iterable_unref0 (_tmp31_);
			}
			if (_tmp27_) {
				_vala_code_node_unref0 (invoker);
				_vala_gir_parser_node_unref0 (n);
				continue;
			}
			_tmp39_ = invoker;
			_tmp40_ = vala_callable_get_parameters ((ValaCallable*) _tmp39_);
			_tmp41_ = _tmp40_;
			_tmp42_ = vala_iterable_iterator ((ValaIterable*) _tmp41_);
			_tmp43_ = _tmp42_;
			_vala_iterable_unref0 (_tmp41_);
			iter = _tmp43_;
			{
				ValaList* _param_list = NULL;
				ValaMethod* _tmp44_;
				ValaList* _tmp45_;
				gint _param_size = 0;
				ValaList* _tmp46_;
				gint _tmp47_;
				gint _tmp48_;
				gint _param_index = 0;
				_tmp44_ = m;
				_tmp45_ = vala_callable_get_parameters ((ValaCallable*) _tmp44_);
				_param_list = _tmp45_;
				_tmp46_ = _param_list;
				_tmp47_ = vala_collection_get_size ((ValaCollection*) _tmp46_);
				_tmp48_ = _tmp47_;
				_param_size = _tmp48_;
				_param_index = -1;
				while (TRUE) {
					gint _tmp49_;
					gint _tmp50_;
					gint _tmp51_;
					ValaParameter* param = NULL;
					ValaList* _tmp52_;
					gint _tmp53_;
					gpointer _tmp54_;
					ValaIterator* _tmp55_;
					gboolean _tmp56_;
					ValaParameter* _tmp57_;
					const gchar* _tmp58_;
					const gchar* _tmp59_;
					ValaIterator* _tmp60_;
					gpointer _tmp61_;
					ValaParameter* _tmp62_;
					const gchar* _tmp63_;
					const gchar* _tmp64_;
					gboolean _tmp65_;
					_tmp49_ = _param_index;
					_param_index = _tmp49_ + 1;
					_tmp50_ = _param_index;
					_tmp51_ = _param_size;
					if (!(_tmp50_ < _tmp51_)) {
						break;
					}
					_tmp52_ = _param_list;
					_tmp53_ = _param_index;
					_tmp54_ = vala_list_get (_tmp52_, _tmp53_);
					param = (ValaParameter*) _tmp54_;
					_tmp55_ = iter;
					_tmp56_ = vala_iterator_next (_tmp55_);
					_vala_assert (_tmp56_, "iter.next ()");
					_tmp57_ = param;
					_tmp58_ = vala_symbol_get_name ((ValaSymbol*) _tmp57_);
					_tmp59_ = _tmp58_;
					_tmp60_ = iter;
					_tmp61_ = vala_iterator_get (_tmp60_);
					_tmp62_ = (ValaParameter*) _tmp61_;
					_tmp63_ = vala_symbol_get_name ((ValaSymbol*) _tmp62_);
					_tmp64_ = _tmp63_;
					_tmp65_ = g_strcmp0 (_tmp59_, _tmp64_) != 0;
					_vala_code_node_unref0 (_tmp62_);
					if (_tmp65_) {
						_vala_code_node_unref0 (invoker);
						invoker = NULL;
						_vala_code_node_unref0 (param);
						break;
					}
					_vala_code_node_unref0 (param);
				}
				_vala_iterable_unref0 (_param_list);
			}
			_tmp66_ = invoker;
			if (_tmp66_ != NULL) {
				result = n;
				_vala_iterator_unref0 (iter);
				_vala_code_node_unref0 (invoker);
				_vala_iterable_unref0 (_n_list);
				_g_free0 (prefix);
				_vala_code_node_unref0 (m);
				return result;
			}
			_vala_iterator_unref0 (iter);
			_vala_code_node_unref0 (invoker);
			_vala_gir_parser_node_unref0 (n);
		}
		_vala_iterable_unref0 (_n_list);
	}
	result = NULL;
	_g_free0 (prefix);
	_vala_code_node_unref0 (m);
	return result;
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	_tmp0_ = str;
	_tmp1_ = maxlen;
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
	end = _tmp2_;
	_tmp3_ = end;
	if (_tmp3_ == NULL) {
		glong _tmp4_;
		_tmp4_ = maxlen;
		result = _tmp4_;
		return result;
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = end;
		_tmp6_ = str;
		result = (glong) (_tmp5_ - _tmp6_);
		return result;
	}
}


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


static ValaGirParserMetadata* vala_gir_parser_get_current_metadata (ValaGirParser* self) {
	ValaGirParserMetadata* result = NULL;
	gchar* selector = NULL;
	ValaMarkupReader* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* child_name = NULL;
	ValaMarkupReader* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	const gchar* _tmp13_;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	gboolean _tmp22_;
	ValaGirParserMetadata* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	ValaGirParserMetadata* _tmp30_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	selector = _tmp3_;
	_tmp4_ = self->priv->reader;
	_tmp5_ = vala_markup_reader_get_attribute (_tmp4_, "name");
	child_name = _tmp5_;
	_tmp6_ = child_name;
	if (_tmp6_ == NULL) {
		ValaMarkupReader* _tmp7_;
		gchar* _tmp8_;
		_tmp7_ = self->priv->reader;
		_tmp8_ = vala_markup_reader_get_attribute (_tmp7_, "glib:name");
		_g_free0 (child_name);
		child_name = _tmp8_;
	}
	_tmp10_ = selector;
	if (g_strcmp0 (_tmp10_, "union") == 0) {
		const gchar* _tmp11_;
		_tmp11_ = child_name;
		_tmp9_ = _tmp11_ == NULL;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		gchar* _tmp12_;
		_tmp12_ = g_strdup ("union");
		_g_free0 (child_name);
		child_name = _tmp12_;
	}
	_tmp13_ = child_name;
	if (_tmp13_ == NULL) {
		ValaGirParserMetadata* _tmp14_;
		ValaGirParserMetadata* _tmp15_;
		ValaGirParserMetadata* _tmp16_;
		_tmp14_ = vala_gir_parser_metadata_get_empty ();
		_tmp15_ = _tmp14_;
		_tmp16_ = _vala_gir_parser_metadata_ref0 (_tmp15_);
		result = _tmp16_;
		_g_free0 (child_name);
		_g_free0 (selector);
		return result;
	}
	_tmp17_ = selector;
	_tmp18_ = string_replace (_tmp17_, "-", "_");
	_g_free0 (selector);
	selector = _tmp18_;
	_tmp19_ = child_name;
	_tmp20_ = string_replace (_tmp19_, "-", "_");
	_g_free0 (child_name);
	child_name = _tmp20_;
	_tmp21_ = selector;
	_tmp22_ = g_str_has_prefix (_tmp21_, "glib:");
	if (_tmp22_) {
		const gchar* _tmp23_;
		gint _tmp24_;
		gint _tmp25_;
		gchar* _tmp26_;
		_tmp23_ = selector;
		_tmp24_ = strlen ("glib:");
		_tmp25_ = _tmp24_;
		_tmp26_ = string_substring (_tmp23_, (glong) _tmp25_, (glong) -1);
		_g_free0 (selector);
		selector = _tmp26_;
	}
	_tmp27_ = self->priv->metadata;
	_tmp28_ = child_name;
	_tmp29_ = selector;
	_tmp30_ = vala_gir_parser_metadata_match_child (_tmp27_, _tmp28_, _tmp29_);
	result = _tmp30_;
	_g_free0 (child_name);
	_g_free0 (selector);
	return result;
}


static gboolean vala_gir_parser_push_metadata (ValaGirParser* self) {
	gboolean result = FALSE;
	ValaGirParserMetadata* new_metadata = NULL;
	ValaGirParserMetadata* _tmp0_;
	ValaGirParserMetadata* _tmp1_;
	gboolean _tmp2_;
	ValaArrayList* _tmp13_;
	ValaGirParserMetadata* _tmp14_;
	ValaGirParserMetadata* _tmp15_;
	ValaGirParserMetadata* _tmp16_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = vala_gir_parser_get_current_metadata (self);
	new_metadata = _tmp0_;
	_tmp1_ = new_metadata;
	_tmp2_ = vala_gir_parser_metadata_has_argument (_tmp1_, VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP);
	if (_tmp2_) {
		ValaGirParserMetadata* _tmp3_;
		gboolean _tmp4_;
		_tmp3_ = new_metadata;
		_tmp4_ = vala_gir_parser_metadata_get_bool (_tmp3_, VALA_GIR_PARSER_ARGUMENT_TYPE_SKIP, FALSE);
		if (_tmp4_) {
			result = FALSE;
			_vala_gir_parser_metadata_unref0 (new_metadata);
			return result;
		}
	} else {
		gboolean _tmp5_ = FALSE;
		ValaMarkupReader* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gboolean _tmp9_;
		_tmp6_ = self->priv->reader;
		_tmp7_ = vala_markup_reader_get_attribute (_tmp6_, "introspectable");
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strcmp0 (_tmp8_, "0") == 0;
		_g_free0 (_tmp8_);
		if (_tmp9_) {
			_tmp5_ = TRUE;
		} else {
			ValaMarkupReader* _tmp10_;
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp10_ = self->priv->reader;
			_tmp11_ = vala_markup_reader_get_attribute (_tmp10_, "private");
			_tmp12_ = _tmp11_;
			_tmp5_ = g_strcmp0 (_tmp12_, "1") == 0;
			_g_free0 (_tmp12_);
		}
		if (_tmp5_) {
			result = FALSE;
			_vala_gir_parser_metadata_unref0 (new_metadata);
			return result;
		}
	}
	_tmp13_ = self->priv->metadata_stack;
	_tmp14_ = self->priv->metadata;
	vala_collection_add ((ValaCollection*) _tmp13_, _tmp14_);
	_tmp15_ = new_metadata;
	_tmp16_ = _vala_gir_parser_metadata_ref0 (_tmp15_);
	_vala_gir_parser_metadata_unref0 (self->priv->metadata);
	self->priv->metadata = _tmp16_;
	result = TRUE;
	_vala_gir_parser_metadata_unref0 (new_metadata);
	return result;
}


static void vala_gir_parser_pop_metadata (ValaGirParser* self) {
	ValaArrayList* _tmp0_;
	ValaArrayList* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gpointer _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->metadata_stack;
	_tmp1_ = self->priv->metadata_stack;
	_tmp2_ = vala_collection_get_size ((ValaCollection*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_list_remove_at ((ValaList*) _tmp0_, _tmp3_ - 1);
	_vala_gir_parser_metadata_unref0 (self->priv->metadata);
	self->priv->metadata = (ValaGirParserMetadata*) _tmp4_;
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_;
	gchar _tmp1_;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = index;
	_tmp1_ = ((gchar*) self)[_tmp0_];
	result = _tmp1_;
	return result;
}


static gboolean vala_gir_parser_parse_type_arguments_from_string (ValaGirParser* self, ValaDataType* parent_type, const gchar* type_arguments, ValaSourceReference* source_reference) {
	gboolean result = FALSE;
	gint type_arguments_length = 0;
	const gchar* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GString* current = NULL;
	gint _tmp3_;
	GString* _tmp4_;
	gint depth = 0;
	ValaDataType* dt = NULL;
	GString* _tmp53_;
	const gchar* _tmp54_;
	ValaSourceReference* _tmp55_;
	ValaDataType* _tmp56_;
	ValaDataType* _tmp57_;
	ValaDataType* _tmp58_;
	ValaDataType* _tmp59_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (parent_type != NULL, FALSE);
	g_return_val_if_fail (type_arguments != NULL, FALSE);
	_tmp0_ = type_arguments;
	_tmp1_ = strlen (_tmp0_);
	_tmp2_ = _tmp1_;
	type_arguments_length = (gint) _tmp2_;
	_tmp3_ = type_arguments_length;
	_tmp4_ = g_string_sized_new ((gsize) _tmp3_);
	current = _tmp4_;
	depth = 0;
	{
		gint c = 0;
		c = 0;
		{
			gboolean _tmp5_ = FALSE;
			_tmp5_ = TRUE;
			while (TRUE) {
				gint _tmp7_;
				gint _tmp8_;
				gboolean _tmp9_ = FALSE;
				const gchar* _tmp10_;
				gint _tmp11_;
				gchar _tmp12_;
				if (!_tmp5_) {
					gint _tmp6_;
					_tmp6_ = c;
					c = _tmp6_ + 1;
				}
				_tmp5_ = FALSE;
				_tmp7_ = c;
				_tmp8_ = type_arguments_length;
				if (!(_tmp7_ < _tmp8_)) {
					break;
				}
				_tmp10_ = type_arguments;
				_tmp11_ = c;
				_tmp12_ = string_get (_tmp10_, (glong) _tmp11_);
				if (_tmp12_ == '<') {
					_tmp9_ = TRUE;
				} else {
					const gchar* _tmp13_;
					gint _tmp14_;
					gchar _tmp15_;
					_tmp13_ = type_arguments;
					_tmp14_ = c;
					_tmp15_ = string_get (_tmp13_, (glong) _tmp14_);
					_tmp9_ = _tmp15_ == '[';
				}
				if (_tmp9_) {
					gint _tmp16_;
					GString* _tmp17_;
					const gchar* _tmp18_;
					gint _tmp19_;
					gchar _tmp20_;
					_tmp16_ = depth;
					depth = _tmp16_ + 1;
					_tmp17_ = current;
					_tmp18_ = type_arguments;
					_tmp19_ = c;
					_tmp20_ = string_get (_tmp18_, (glong) _tmp19_);
					g_string_append_unichar (_tmp17_, (gunichar) _tmp20_);
				} else {
					gboolean _tmp21_ = FALSE;
					const gchar* _tmp22_;
					gint _tmp23_;
					gchar _tmp24_;
					_tmp22_ = type_arguments;
					_tmp23_ = c;
					_tmp24_ = string_get (_tmp22_, (glong) _tmp23_);
					if (_tmp24_ == '>') {
						_tmp21_ = TRUE;
					} else {
						const gchar* _tmp25_;
						gint _tmp26_;
						gchar _tmp27_;
						_tmp25_ = type_arguments;
						_tmp26_ = c;
						_tmp27_ = string_get (_tmp25_, (glong) _tmp26_);
						_tmp21_ = _tmp27_ == ']';
					}
					if (_tmp21_) {
						gint _tmp28_;
						GString* _tmp29_;
						const gchar* _tmp30_;
						gint _tmp31_;
						gchar _tmp32_;
						_tmp28_ = depth;
						depth = _tmp28_ - 1;
						_tmp29_ = current;
						_tmp30_ = type_arguments;
						_tmp31_ = c;
						_tmp32_ = string_get (_tmp30_, (glong) _tmp31_);
						g_string_append_unichar (_tmp29_, (gunichar) _tmp32_);
					} else {
						const gchar* _tmp33_;
						gint _tmp34_;
						gchar _tmp35_;
						_tmp33_ = type_arguments;
						_tmp34_ = c;
						_tmp35_ = string_get (_tmp33_, (glong) _tmp34_);
						if (_tmp35_ == ',') {
							gint _tmp36_;
							_tmp36_ = depth;
							if (_tmp36_ == 0) {
								ValaDataType* dt = NULL;
								GString* _tmp37_;
								const gchar* _tmp38_;
								ValaSourceReference* _tmp39_;
								ValaDataType* _tmp40_;
								ValaDataType* _tmp41_;
								ValaDataType* _tmp42_;
								ValaDataType* _tmp43_;
								GString* _tmp44_;
								_tmp37_ = current;
								_tmp38_ = _tmp37_->str;
								_tmp39_ = source_reference;
								_tmp40_ = vala_gir_parser_parse_type_from_string (self, _tmp38_, TRUE, _tmp39_);
								dt = _tmp40_;
								_tmp41_ = dt;
								if (_tmp41_ == NULL) {
									result = FALSE;
									_vala_code_node_unref0 (dt);
									_g_string_free0 (current);
									return result;
								}
								_tmp42_ = parent_type;
								_tmp43_ = dt;
								vala_data_type_add_type_argument (_tmp42_, _tmp43_);
								_tmp44_ = current;
								g_string_truncate (_tmp44_, (gsize) 0);
								_vala_code_node_unref0 (dt);
							} else {
								GString* _tmp45_;
								const gchar* _tmp46_;
								gint _tmp47_;
								gchar _tmp48_;
								_tmp45_ = current;
								_tmp46_ = type_arguments;
								_tmp47_ = c;
								_tmp48_ = string_get (_tmp46_, (glong) _tmp47_);
								g_string_append_unichar (_tmp45_, (gunichar) _tmp48_);
							}
						} else {
							GString* _tmp49_;
							const gchar* _tmp50_;
							gint _tmp51_;
							gchar _tmp52_;
							_tmp49_ = current;
							_tmp50_ = type_arguments;
							_tmp51_ = c;
							_tmp52_ = string_get (_tmp50_, (glong) _tmp51_);
							g_string_append_unichar (_tmp49_, (gunichar) _tmp52_);
						}
					}
				}
			}
		}
	}
	_tmp53_ = current;
	_tmp54_ = _tmp53_->str;
	_tmp55_ = source_reference;
	_tmp56_ = vala_gir_parser_parse_type_from_string (self, _tmp54_, TRUE, _tmp55_);
	dt = _tmp56_;
	_tmp57_ = dt;
	if (_tmp57_ == NULL) {
		result = FALSE;
		_vala_code_node_unref0 (dt);
		_g_string_free0 (current);
		return result;
	}
	_tmp58_ = parent_type;
	_tmp59_ = dt;
	vala_data_type_add_type_argument (_tmp58_, _tmp59_);
	result = TRUE;
	_vala_code_node_unref0 (dt);
	_g_string_free0 (current);
	return result;
}


static ValaDataType* vala_gir_parser_parse_type_from_string (ValaGirParser* self, const gchar* type_string, gboolean owned_by_default, ValaSourceReference* source_reference) {
	ValaDataType* result = NULL;
	GRegex* _tmp0_;
	GMatchInfo* match = NULL;
	GRegex* _tmp5_;
	const gchar* _tmp6_;
	GMatchInfo* _tmp7_ = NULL;
	gboolean _tmp8_;
	ValaDataType* type = NULL;
	gchar* ownership_data = NULL;
	GMatchInfo* _tmp10_;
	gchar* _tmp11_;
	gchar* type_name = NULL;
	GMatchInfo* _tmp12_;
	gchar* _tmp13_;
	gchar* type_arguments_data = NULL;
	GMatchInfo* _tmp14_;
	gchar* _tmp15_;
	gchar* pointers_data = NULL;
	GMatchInfo* _tmp16_;
	gchar* _tmp17_;
	gchar* array_data = NULL;
	GMatchInfo* _tmp18_;
	gchar* _tmp19_;
	gchar* nullable_data = NULL;
	GMatchInfo* _tmp20_;
	gchar* _tmp21_;
	gboolean _tmp22_ = FALSE;
	const gchar* _tmp23_;
	gboolean nullable = FALSE;
	gboolean _tmp27_ = FALSE;
	const gchar* _tmp28_;
	gboolean value_owned = FALSE;
	gboolean _tmp45_;
	const gchar* _tmp46_;
	ValaUnresolvedSymbol* sym = NULL;
	const gchar* _tmp52_;
	ValaSourceReference* _tmp53_;
	ValaUnresolvedSymbol* _tmp54_;
	ValaUnresolvedSymbol* _tmp55_;
	ValaUnresolvedSymbol* _tmp56_;
	ValaSourceReference* _tmp57_;
	ValaUnresolvedType* _tmp58_;
	gboolean _tmp59_ = FALSE;
	const gchar* _tmp60_;
	const gchar* _tmp68_;
	gboolean _tmp77_ = FALSE;
	const gchar* _tmp78_;
	ValaDataType* _tmp89_;
	gboolean _tmp90_;
	ValaDataType* _tmp91_;
	gboolean _tmp92_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (type_string != NULL, NULL);
	_tmp0_ = vala_gir_parser_type_from_string_regex;
	if (_tmp0_ == NULL) {
		{
			GRegex* _tmp1_ = NULL;
			GRegex* _tmp2_;
			GRegex* _tmp3_;
			_tmp2_ = g_regex_new ("^(?:(owned|unowned|weak) +)?([0-9a-zA-Z_\\.]+)(?:<(.+)>)?(\\*+)?(\\[,*" \
"\\])?(\\?)?$", (G_REGEX_ANCHORED | G_REGEX_DOLLAR_ENDONLY) | G_REGEX_OPTIMIZE, 0, &_inner_error_);
			_tmp1_ = _tmp2_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				if (_inner_error_->domain == G_REGEX_ERROR) {
					goto __catch5_g_regex_error;
				}
				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 NULL;
			}
			_tmp3_ = _tmp1_;
			_tmp1_ = NULL;
			_g_regex_unref0 (vala_gir_parser_type_from_string_regex);
			vala_gir_parser_type_from_string_regex = _tmp3_;
			_g_regex_unref0 (_tmp1_);
		}
		goto __finally5;
		__catch5_g_regex_error:
		{
			GError* e = NULL;
			const gchar* _tmp4_;
			e = _inner_error_;
			_inner_error_ = NULL;
			_tmp4_ = e->message;
			g_error ("valagirparser.vala:1675: Unable to compile regex: %s", _tmp4_);
			_g_error_free0 (e);
		}
		__finally5:
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	_tmp5_ = vala_gir_parser_type_from_string_regex;
	_tmp6_ = type_string;
	_tmp8_ = g_regex_match (_tmp5_, _tmp6_, 0, &_tmp7_);
	_g_match_info_unref0 (match);
	match = _tmp7_;
	if (!_tmp8_) {
		ValaSourceReference* _tmp9_;
		_tmp9_ = source_reference;
		vala_report_error (_tmp9_, "unable to parse type");
		result = NULL;
		_g_match_info_unref0 (match);
		return result;
	}
	type = NULL;
	_tmp10_ = match;
	_tmp11_ = g_match_info_fetch (_tmp10_, 1);
	ownership_data = _tmp11_;
	_tmp12_ = match;
	_tmp13_ = g_match_info_fetch (_tmp12_, 2);
	type_name = _tmp13_;
	_tmp14_ = match;
	_tmp15_ = g_match_info_fetch (_tmp14_, 3);
	type_arguments_data = _tmp15_;
	_tmp16_ = match;
	_tmp17_ = g_match_info_fetch (_tmp16_, 4);
	pointers_data = _tmp17_;
	_tmp18_ = match;
	_tmp19_ = g_match_info_fetch (_tmp18_, 5);
	array_data = _tmp19_;
	_tmp20_ = match;
	_tmp21_ = g_match_info_fetch (_tmp20_, 6);
	nullable_data = _tmp21_;
	_tmp23_ = nullable_data;
	if (_tmp23_ != NULL) {
		const gchar* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		_tmp24_ = nullable_data;
		_tmp25_ = strlen (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp22_ = _tmp26_ > 0;
	} else {
		_tmp22_ = FALSE;
	}
	nullable = _tmp22_;
	_tmp28_ = ownership_data;
	if (_tmp28_ == NULL) {
		const gchar* _tmp29_;
		_tmp29_ = type_name;
		_tmp27_ = g_strcmp0 (_tmp29_, "void") == 0;
	} else {
		_tmp27_ = FALSE;
	}
	if (_tmp27_) {
		gboolean _tmp30_ = FALSE;
		const gchar* _tmp31_;
		_tmp31_ = array_data;
		if (_tmp31_ == NULL) {
			gboolean _tmp32_;
			_tmp32_ = nullable;
			_tmp30_ = !_tmp32_;
		} else {
			_tmp30_ = FALSE;
		}
		if (_tmp30_) {
			ValaSourceReference* _tmp33_;
			ValaVoidType* _tmp34_;
			const gchar* _tmp35_;
			_tmp33_ = source_reference;
			_tmp34_ = vala_void_type_new (_tmp33_);
			_vala_code_node_unref0 (type);
			type = (ValaDataType*) _tmp34_;
			_tmp35_ = pointers_data;
			if (_tmp35_ != NULL) {
				{
					gint i = 0;
					i = 0;
					{
						gboolean _tmp36_ = FALSE;
						_tmp36_ = TRUE;
						while (TRUE) {
							gint _tmp38_;
							const gchar* _tmp39_;
							gint _tmp40_;
							gint _tmp41_;
							ValaDataType* _tmp42_;
							ValaPointerType* _tmp43_;
							if (!_tmp36_) {
								gint _tmp37_;
								_tmp37_ = i;
								i = _tmp37_ + 1;
							}
							_tmp36_ = FALSE;
							_tmp38_ = i;
							_tmp39_ = pointers_data;
							_tmp40_ = strlen (_tmp39_);
							_tmp41_ = _tmp40_;
							if (!(_tmp38_ < _tmp41_)) {
								break;
							}
							_tmp42_ = type;
							_tmp43_ = vala_pointer_type_new (_tmp42_, NULL);
							_vala_code_node_unref0 (type);
							type = (ValaDataType*) _tmp43_;
						}
					}
				}
			}
			result = type;
			_g_free0 (nullable_data);
			_g_free0 (array_data);
			_g_free0 (pointers_data);
			_g_free0 (type_arguments_data);
			_g_free0 (type_name);
			_g_free0 (ownership_data);
			_g_match_info_unref0 (match);
			return result;
		} else {
			ValaSourceReference* _tmp44_;
			_tmp44_ = source_reference;
			vala_report_error (_tmp44_, "invalid void type");
			result = NULL;
			_g_free0 (nullable_data);
			_g_free0 (array_data);
			_g_free0 (pointers_data);
			_g_free0 (type_arguments_data);
			_g_free0 (type_name);
			_g_free0 (ownership_data);
			_vala_code_node_unref0 (type);
			_g_match_info_unref0 (match);
			return result;
		}
	}
	_tmp45_ = owned_by_default;
	value_owned = _tmp45_;
	_tmp46_ = ownership_data;
	if (g_strcmp0 (_tmp46_, "owned") == 0) {
		gboolean _tmp47_;
		_tmp47_ = owned_by_default;
		if (_tmp47_) {
			ValaSourceReference* _tmp48_;
			_tmp48_ = source_reference;
			vala_report_error (_tmp48_, "unexpected `owned' keyword");
		} else {
			value_owned = TRUE;
		}
	} else {
		const gchar* _tmp49_;
		_tmp49_ = ownership_data;
		if (g_strcmp0 (_tmp49_, "unowned") == 0) {
			gboolean _tmp50_;
			_tmp50_ = owned_by_default;
			if (_tmp50_) {
				value_owned = FALSE;
			} else {
				ValaSourceReference* _tmp51_;
				_tmp51_ = source_reference;
				vala_report_error (_tmp51_, "unexpected `unowned' keyword");
				result = NULL;
				_g_free0 (nullable_data);
				_g_free0 (array_data);
				_g_free0 (pointers_data);
				_g_free0 (type_arguments_data);
				_g_free0 (type_name);
				_g_free0 (ownership_data);
				_vala_code_node_unref0 (type);
				_g_match_info_unref0 (match);
				return result;
			}
		}
	}
	_tmp52_ = type_name;
	_tmp53_ = source_reference;
	_tmp54_ = vala_gir_parser_parse_symbol_from_string (self, _tmp52_, _tmp53_);
	sym = _tmp54_;
	_tmp55_ = sym;
	if (_tmp55_ == NULL) {
		result = NULL;
		_vala_code_node_unref0 (sym);
		_g_free0 (nullable_data);
		_g_free0 (array_data);
		_g_free0 (pointers_data);
		_g_free0 (type_arguments_data);
		_g_free0 (type_name);
		_g_free0 (ownership_data);
		_vala_code_node_unref0 (type);
		_g_match_info_unref0 (match);
		return result;
	}
	_tmp56_ = sym;
	_tmp57_ = source_reference;
	_tmp58_ = vala_unresolved_type_new_from_symbol (_tmp56_, _tmp57_);
	_vala_code_node_unref0 (type);
	type = (ValaDataType*) _tmp58_;
	_tmp60_ = type_arguments_data;
	if (_tmp60_ != NULL) {
		const gchar* _tmp61_;
		gint _tmp62_;
		gint _tmp63_;
		_tmp61_ = type_arguments_data;
		_tmp62_ = strlen (_tmp61_);
		_tmp63_ = _tmp62_;
		_tmp59_ = _tmp63_ > 0;
	} else {
		_tmp59_ = FALSE;
	}
	if (_tmp59_) {
		ValaDataType* _tmp64_;
		const gchar* _tmp65_;
		ValaSourceReference* _tmp66_;
		gboolean _tmp67_;
		_tmp64_ = type;
		_tmp65_ = type_arguments_data;
		_tmp66_ = source_reference;
		_tmp67_ = vala_gir_parser_parse_type_arguments_from_string (self, _tmp64_, _tmp65_, _tmp66_);
		if (!_tmp67_) {
			result = NULL;
			_vala_code_node_unref0 (sym);
			_g_free0 (nullable_data);
			_g_free0 (array_data);
			_g_free0 (pointers_data);
			_g_free0 (type_arguments_data);
			_g_free0 (type_name);
			_g_free0 (ownership_data);
			_vala_code_node_unref0 (type);
			_g_match_info_unref0 (match);
			return result;
		}
	}
	_tmp68_ = pointers_data;
	if (_tmp68_ != NULL) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp69_ = FALSE;
				_tmp69_ = TRUE;
				while (TRUE) {
					gint _tmp71_;
					const gchar* _tmp72_;
					gint _tmp73_;
					gint _tmp74_;
					ValaDataType* _tmp75_;
					ValaPointerType* _tmp76_;
					if (!_tmp69_) {
						gint _tmp70_;
						_tmp70_ = i;
						i = _tmp70_ + 1;
					}
					_tmp69_ = FALSE;
					_tmp71_ = i;
					_tmp72_ = pointers_data;
					_tmp73_ = strlen (_tmp72_);
					_tmp74_ = _tmp73_;
					if (!(_tmp71_ < _tmp74_)) {
						break;
					}
					_tmp75_ = type;
					_tmp76_ = vala_pointer_type_new (_tmp75_, NULL);
					_vala_code_node_unref0 (type);
					type = (ValaDataType*) _tmp76_;
				}
			}
		}
	}
	_tmp78_ = array_data;
	if (_tmp78_ != NULL) {
		const gchar* _tmp79_;
		gint _tmp80_;
		gint _tmp81_;
		_tmp79_ = array_data;
		_tmp80_ = strlen (_tmp79_);
		_tmp81_ = _tmp80_;
		_tmp77_ = _tmp81_ != 0;
	} else {
		_tmp77_ = FALSE;
	}
	if (_tmp77_) {
		ValaDataType* _tmp82_;
		ValaDataType* _tmp83_;
		const gchar* _tmp84_;
		gint _tmp85_;
		gint _tmp86_;
		ValaSourceReference* _tmp87_;
		ValaArrayType* _tmp88_;
		_tmp82_ = type;
		vala_data_type_set_value_owned (_tmp82_, TRUE);
		_tmp83_ = type;
		_tmp84_ = array_data;
		_tmp85_ = strlen (_tmp84_);
		_tmp86_ = _tmp85_;
		_tmp87_ = source_reference;
		_tmp88_ = vala_array_type_new (_tmp83_, ((gint) _tmp86_) - 1, _tmp87_);
		_vala_code_node_unref0 (type);
		type = (ValaDataType*) _tmp88_;
	}
	_tmp89_ = type;
	_tmp90_ = nullable;
	vala_data_type_set_nullable (_tmp89_, _tmp90_);
	_tmp91_ = type;
	_tmp92_ = value_owned;
	vala_data_type_set_value_owned (_tmp91_, _tmp92_);
	result = type;
	_vala_code_node_unref0 (sym);
	_g_free0 (nullable_data);
	_g_free0 (array_data);
	_g_free0 (pointers_data);
	_g_free0 (type_arguments_data);
	_g_free0 (type_name);
	_g_free0 (ownership_data);
	_g_match_info_unref0 (match);
	return result;
}


static gchar* vala_gir_parser_element_get_string (ValaGirParser* self, const gchar* attribute_name, ValaGirParserArgumentType arg_type) {
	gchar* result = NULL;
	ValaGirParserMetadata* _tmp0_;
	ValaGirParserArgumentType _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (attribute_name != NULL, NULL);
	_tmp0_ = self->priv->metadata;
	_tmp1_ = arg_type;
	_tmp2_ = vala_gir_parser_metadata_has_argument (_tmp0_, _tmp1_);
	if (_tmp2_) {
		ValaGirParserMetadata* _tmp3_;
		ValaGirParserArgumentType _tmp4_;
		gchar* _tmp5_;
		_tmp3_ = self->priv->metadata;
		_tmp4_ = arg_type;
		_tmp5_ = vala_gir_parser_metadata_get_string (_tmp3_, _tmp4_);
		result = _tmp5_;
		return result;
	} else {
		ValaMarkupReader* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		_tmp6_ = self->priv->reader;
		_tmp7_ = attribute_name;
		_tmp8_ = vala_markup_reader_get_attribute (_tmp6_, _tmp7_);
		result = _tmp8_;
		return result;
	}
}


static ValaDataType* vala_gir_parser_element_get_type (ValaGirParser* self, ValaDataType* orig_type, gboolean owned_by_default, gboolean* no_array_length, gboolean* array_null_terminated, gboolean* changed) {
	gboolean _vala_changed = FALSE;
	ValaDataType* result = NULL;
	ValaDataType* type = NULL;
	ValaDataType* _tmp0_;
	ValaDataType* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	gboolean _tmp3_;
	ValaDataType* _tmp52_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (orig_type != NULL, NULL);
	_vala_changed = FALSE;
	_tmp0_ = orig_type;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	type = _tmp1_;
	_tmp2_ = self->priv->metadata;
	_tmp3_ = vala_gir_parser_metadata_has_argument (_tmp2_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE);
	if (_tmp3_) {
		ValaGirParserMetadata* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gboolean _tmp7_;
		ValaGirParserMetadata* _tmp8_;
		ValaSourceReference* _tmp9_;
		ValaSourceReference* _tmp10_;
		ValaDataType* _tmp11_;
		_tmp4_ = self->priv->metadata;
		_tmp5_ = vala_gir_parser_metadata_get_string (_tmp4_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE);
		_tmp6_ = _tmp5_;
		_tmp7_ = owned_by_default;
		_tmp8_ = self->priv->metadata;
		_tmp9_ = vala_gir_parser_metadata_get_source_reference (_tmp8_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE);
		_tmp10_ = _tmp9_;
		_tmp11_ = vala_gir_parser_parse_type_from_string (self, _tmp6_, _tmp7_, _tmp10_);
		_vala_code_node_unref0 (type);
		type = _tmp11_;
		_vala_source_reference_unref0 (_tmp10_);
		_g_free0 (_tmp6_);
		_vala_changed = TRUE;
	} else {
		ValaDataType* _tmp12_;
		_tmp12_ = type;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp12_, VALA_TYPE_VOID_TYPE)) {
			ValaGirParserMetadata* _tmp13_;
			gboolean _tmp14_;
			gboolean _tmp23_ = FALSE;
			ValaDataType* _tmp24_;
			gboolean _tmp33_;
			ValaDataType* _tmp46_;
			ValaGirParserMetadata* _tmp47_;
			ValaDataType* _tmp48_;
			gboolean _tmp49_;
			gboolean _tmp50_;
			gboolean _tmp51_;
			_tmp13_ = self->priv->metadata;
			_tmp14_ = vala_gir_parser_metadata_has_argument (_tmp13_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
			if (_tmp14_) {
				ValaDataType* _tmp15_;
				ValaDataType* _tmp16_;
				ValaGirParserMetadata* _tmp17_;
				gchar* _tmp18_;
				gchar* _tmp19_;
				ValaGirParserMetadata* _tmp20_;
				ValaSourceReference* _tmp21_;
				ValaSourceReference* _tmp22_;
				_tmp15_ = type;
				vala_data_type_remove_all_type_arguments (_tmp15_);
				_tmp16_ = type;
				_tmp17_ = self->priv->metadata;
				_tmp18_ = vala_gir_parser_metadata_get_string (_tmp17_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
				_tmp19_ = _tmp18_;
				_tmp20_ = self->priv->metadata;
				_tmp21_ = vala_gir_parser_metadata_get_source_reference (_tmp20_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ARGUMENTS);
				_tmp22_ = _tmp21_;
				vala_gir_parser_parse_type_arguments_from_string (self, _tmp16_, _tmp19_, _tmp22_);
				_vala_source_reference_unref0 (_tmp22_);
				_g_free0 (_tmp19_);
			}
			_tmp24_ = type;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, VALA_TYPE_ARRAY_TYPE)) {
				ValaGirParserMetadata* _tmp25_;
				gboolean _tmp26_;
				_tmp25_ = self->priv->metadata;
				_tmp26_ = vala_gir_parser_metadata_get_bool (_tmp25_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY, FALSE);
				_tmp23_ = _tmp26_;
			} else {
				_tmp23_ = FALSE;
			}
			if (_tmp23_) {
				ValaDataType* _tmp27_;
				ValaDataType* _tmp28_;
				ValaDataType* _tmp29_;
				ValaSourceReference* _tmp30_;
				ValaSourceReference* _tmp31_;
				ValaArrayType* _tmp32_;
				_tmp27_ = type;
				vala_data_type_set_value_owned (_tmp27_, TRUE);
				_tmp28_ = type;
				_tmp29_ = type;
				_tmp30_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = vala_array_type_new (_tmp28_, 1, _tmp31_);
				_vala_code_node_unref0 (type);
				type = (ValaDataType*) _tmp32_;
				_vala_changed = TRUE;
			}
			_tmp33_ = owned_by_default;
			if (_tmp33_) {
				ValaDataType* _tmp34_;
				ValaGirParserMetadata* _tmp35_;
				ValaDataType* _tmp36_;
				gboolean _tmp37_;
				gboolean _tmp38_;
				gboolean _tmp39_;
				_tmp34_ = type;
				_tmp35_ = self->priv->metadata;
				_tmp36_ = type;
				_tmp37_ = vala_data_type_get_value_owned (_tmp36_);
				_tmp38_ = _tmp37_;
				_tmp39_ = vala_gir_parser_metadata_get_bool (_tmp35_, VALA_GIR_PARSER_ARGUMENT_TYPE_UNOWNED, !_tmp38_);
				vala_data_type_set_value_owned (_tmp34_, !_tmp39_);
			} else {
				ValaDataType* _tmp40_;
				ValaGirParserMetadata* _tmp41_;
				ValaDataType* _tmp42_;
				gboolean _tmp43_;
				gboolean _tmp44_;
				gboolean _tmp45_;
				_tmp40_ = type;
				_tmp41_ = self->priv->metadata;
				_tmp42_ = type;
				_tmp43_ = vala_data_type_get_value_owned (_tmp42_);
				_tmp44_ = _tmp43_;
				_tmp45_ = vala_gir_parser_metadata_get_bool (_tmp41_, VALA_GIR_PARSER_ARGUMENT_TYPE_OWNED, _tmp44_);
				vala_data_type_set_value_owned (_tmp40_, _tmp45_);
			}
			_tmp46_ = type;
			_tmp47_ = self->priv->metadata;
			_tmp48_ = type;
			_tmp49_ = vala_data_type_get_nullable (_tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = vala_gir_parser_metadata_get_bool (_tmp47_, VALA_GIR_PARSER_ARGUMENT_TYPE_NULLABLE, _tmp50_);
			vala_data_type_set_nullable (_tmp46_, _tmp51_);
		}
	}
	_tmp52_ = type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp52_, VALA_TYPE_ARRAY_TYPE)) {
		ValaDataType* _tmp53_;
		ValaGirParserMetadata* _tmp54_;
		gboolean _tmp55_;
		gboolean _tmp56_;
		_tmp53_ = orig_type;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp53_, VALA_TYPE_ARRAY_TYPE)) {
			*no_array_length = TRUE;
		}
		_tmp54_ = self->priv->metadata;
		_tmp55_ = *array_null_terminated;
		_tmp56_ = vala_gir_parser_metadata_get_bool (_tmp54_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_NULL_TERMINATED, _tmp55_);
		*array_null_terminated = _tmp56_;
	}
	result = type;
	if (changed) {
		*changed = _vala_changed;
	}
	return result;
}


static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_;
	gunichar _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = start_index;
	_tmp1_ = c;
	_tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_);
	_result_ = _tmp2_;
	_tmp3_ = _result_;
	if (_tmp3_ != NULL) {
		gchar* _tmp4_;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static gchar* vala_gir_parser_element_get_name (ValaGirParser* self, const gchar* gir_name) {
	gchar* result = NULL;
	gchar* name = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* pattern = NULL;
	ValaGirParserMetadata* _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gir_name;
	_tmp1_ = g_strdup (_tmp0_);
	name = _tmp1_;
	_tmp2_ = name;
	if (_tmp2_ == NULL) {
		ValaMarkupReader* _tmp3_;
		gchar* _tmp4_;
		_tmp3_ = self->priv->reader;
		_tmp4_ = vala_markup_reader_get_attribute (_tmp3_, "name");
		_g_free0 (name);
		name = _tmp4_;
	}
	_tmp5_ = self->priv->metadata;
	_tmp6_ = vala_gir_parser_metadata_get_string (_tmp5_, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
	pattern = _tmp6_;
	_tmp7_ = pattern;
	if (_tmp7_ != NULL) {
		const gchar* _tmp8_;
		gint _tmp9_;
		_tmp8_ = pattern;
		_tmp9_ = string_index_of_char (_tmp8_, (gunichar) '(', 0);
		if (_tmp9_ < 0) {
			const gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp10_ = pattern;
			_tmp11_ = g_strdup (_tmp10_);
			_g_free0 (name);
			name = _tmp11_;
		} else {
			{
				gchar* replacement = NULL;
				gchar* _tmp12_;
				gchar** split = NULL;
				const gchar* _tmp13_;
				gchar** _tmp14_;
				gchar** _tmp15_;
				gint split_length1;
				gint _split_size_;
				gchar** _tmp16_;
				gint _tmp16__length1;
				GRegex* regex = NULL;
				const gchar* _tmp23_;
				GRegex* _tmp24_;
				gchar* _tmp25_ = NULL;
				GRegex* _tmp26_;
				const gchar* _tmp27_;
				const gchar* _tmp28_;
				gchar* _tmp29_;
				gchar* _tmp30_;
				_tmp12_ = g_strdup ("\\1");
				replacement = _tmp12_;
				_tmp13_ = pattern;
				_tmp15_ = _tmp14_ = g_strsplit (_tmp13_, "/", 0);
				split = _tmp15_;
				split_length1 = _vala_array_length (_tmp14_);
				_split_size_ = split_length1;
				_tmp16_ = split;
				_tmp16__length1 = split_length1;
				if (_tmp16__length1 > 1) {
					gchar** _tmp17_;
					gint _tmp17__length1;
					const gchar* _tmp18_;
					gchar* _tmp19_;
					gchar** _tmp20_;
					gint _tmp20__length1;
					const gchar* _tmp21_;
					gchar* _tmp22_;
					_tmp17_ = split;
					_tmp17__length1 = split_length1;
					_tmp18_ = _tmp17_[0];
					_tmp19_ = g_strdup (_tmp18_);
					_g_free0 (pattern);
					pattern = _tmp19_;
					_tmp20_ = split;
					_tmp20__length1 = split_length1;
					_tmp21_ = _tmp20_[1];
					_tmp22_ = g_strdup (_tmp21_);
					_g_free0 (replacement);
					replacement = _tmp22_;
				}
				_tmp23_ = pattern;
				_tmp24_ = g_regex_new (_tmp23_, G_REGEX_ANCHORED, G_REGEX_MATCH_ANCHORED, &_inner_error_);
				regex = _tmp24_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (replacement);
					goto __catch6_g_error;
				}
				_tmp26_ = regex;
				_tmp27_ = name;
				_tmp28_ = replacement;
				_tmp29_ = g_regex_replace (_tmp26_, _tmp27_, (gssize) -1, 0, _tmp28_, 0, &_inner_error_);
				_tmp25_ = _tmp29_;
				if (G_UNLIKELY (_inner_error_ != NULL)) {
					_g_regex_unref0 (regex);
					split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
					_g_free0 (replacement);
					goto __catch6_g_error;
				}
				_tmp30_ = _tmp25_;
				_tmp25_ = NULL;
				_g_free0 (name);
				name = _tmp30_;
				_g_free0 (_tmp25_);
				_g_regex_unref0 (regex);
				split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (replacement);
			}
			goto __finally6;
			__catch6_g_error:
			{
				GError* e = NULL;
				const gchar* _tmp31_;
				gchar* _tmp32_;
				e = _inner_error_;
				_inner_error_ = NULL;
				_tmp31_ = pattern;
				_tmp32_ = g_strdup (_tmp31_);
				_g_free0 (name);
				name = _tmp32_;
				_g_error_free0 (e);
			}
			__finally6:
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_free0 (pattern);
				_g_free0 (name);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
				g_clear_error (&_inner_error_);
				return NULL;
			}
		}
	} else {
		gboolean _tmp33_ = FALSE;
		const gchar* _tmp34_;
		_tmp34_ = name;
		if (_tmp34_ != NULL) {
			const gchar* _tmp35_;
			gboolean _tmp36_;
			_tmp35_ = name;
			_tmp36_ = g_str_has_suffix (_tmp35_, "Enum");
			_tmp33_ = _tmp36_;
		} else {
			_tmp33_ = FALSE;
		}
		if (_tmp33_) {
			const gchar* _tmp37_;
			const gchar* _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			gint _tmp41_;
			gint _tmp42_;
			gchar* _tmp43_;
			_tmp37_ = name;
			_tmp38_ = name;
			_tmp39_ = strlen (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = strlen ("Enum");
			_tmp42_ = _tmp41_;
			_tmp43_ = string_substring (_tmp37_, (glong) 0, (glong) (_tmp40_ - _tmp42_));
			_g_free0 (name);
			name = _tmp43_;
		}
	}
	result = name;
	_g_free0 (pattern);
	return result;
}


static gchar* vala_gir_parser_element_get_type_id (ValaGirParser* self) {
	gchar* result = NULL;
	gchar* type_id = NULL;
	ValaGirParserMetadata* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	ValaMarkupReader* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->metadata;
	_tmp1_ = vala_gir_parser_metadata_get_string (_tmp0_, VALA_GIR_PARSER_ARGUMENT_TYPE_TYPE_ID);
	type_id = _tmp1_;
	_tmp2_ = type_id;
	if (_tmp2_ != NULL) {
		result = type_id;
		return result;
	}
	_tmp3_ = self->priv->reader;
	_tmp4_ = vala_markup_reader_get_attribute (_tmp3_, "glib:get-type");
	_g_free0 (type_id);
	type_id = _tmp4_;
	_tmp5_ = type_id;
	if (_tmp5_ != NULL) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = type_id;
		_tmp7_ = g_strconcat (_tmp6_, " ()", NULL);
		_g_free0 (type_id);
		type_id = _tmp7_;
	}
	result = type_id;
	return result;
}


static void vala_gir_parser_set_array_ccode (ValaGirParser* self, ValaSymbol* sym, ValaGirParserParameterInfo* info) {
	ValaSymbol* _tmp0_;
	ValaGirParserParameterInfo* _tmp1_;
	gfloat _tmp2_;
	ValaSymbol* _tmp3_;
	gchar* type_name = NULL;
	ValaGirParserParameterInfo* _tmp9_;
	ValaParameter* _tmp10_;
	ValaDataType* _tmp11_;
	ValaDataType* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sym != NULL);
	g_return_if_fail (info != NULL);
	_tmp0_ = sym;
	_tmp1_ = info;
	_tmp2_ = _tmp1_->vala_idx;
	vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp0_, "CCode", "array_length_pos", (gdouble) _tmp2_, NULL);
	_tmp3_ = sym;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, VALA_TYPE_PARAMETER)) {
		ValaSymbol* _tmp4_;
		ValaGirParserParameterInfo* _tmp5_;
		ValaParameter* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp4_ = sym;
		_tmp5_ = info;
		_tmp6_ = _tmp5_->param;
		_tmp7_ = vala_symbol_get_name ((ValaSymbol*) _tmp6_);
		_tmp8_ = _tmp7_;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp4_, "CCode", "array_length_cname", _tmp8_, NULL);
	}
	_tmp9_ = info;
	_tmp10_ = _tmp9_->param;
	_tmp11_ = vala_variable_get_variable_type ((ValaVariable*) _tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = vala_data_type_to_qualified_string (_tmp12_, NULL);
	type_name = _tmp13_;
	_tmp14_ = type_name;
	if (g_strcmp0 (_tmp14_, "int") != 0) {
		ValaGirParserNode* st = NULL;
		ValaGirParserNode* _tmp15_;
		const gchar* _tmp16_;
		ValaGirParserNode* _tmp17_;
		ValaGirParserNode* _tmp18_;
		_tmp15_ = self->priv->root;
		_tmp16_ = type_name;
		_tmp17_ = vala_gir_parser_node_lookup (_tmp15_, _tmp16_, FALSE, NULL);
		st = _tmp17_;
		_tmp18_ = st;
		if (_tmp18_ != NULL) {
			ValaSymbol* _tmp19_;
			_tmp19_ = sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp19_, VALA_TYPE_METHOD)) {
				ValaMethod* m = NULL;
				ValaSymbol* _tmp20_;
				ValaMethod* _tmp21_;
				ValaMethod* _tmp22_;
				ValaGirParserNode* _tmp23_;
				gchar* _tmp24_;
				gchar* _tmp25_;
				_tmp20_ = sym;
				_tmp21_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, VALA_TYPE_METHOD, ValaMethod));
				m = _tmp21_;
				_tmp22_ = m;
				_tmp23_ = st;
				_tmp24_ = vala_gir_parser_node_get_cname (_tmp23_);
				_tmp25_ = _tmp24_;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp22_, "CCode", "array_length_type", _tmp25_, NULL);
				_g_free0 (_tmp25_);
				_vala_code_node_unref0 (m);
			} else {
				ValaParameter* param = NULL;
				ValaSymbol* _tmp26_;
				ValaParameter* _tmp27_;
				ValaParameter* _tmp28_;
				ValaGirParserNode* _tmp29_;
				gchar* _tmp30_;
				gchar* _tmp31_;
				_tmp26_ = sym;
				_tmp27_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, VALA_TYPE_PARAMETER, ValaParameter));
				param = _tmp27_;
				_tmp28_ = param;
				_tmp29_ = st;
				_tmp30_ = vala_gir_parser_node_get_cname (_tmp29_);
				_tmp31_ = _tmp30_;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp28_, "CCode", "array_length_type", _tmp31_, NULL);
				_g_free0 (_tmp31_);
				_vala_code_node_unref0 (param);
			}
		}
		_vala_gir_parser_node_unref0 (st);
	}
	_g_free0 (type_name);
}


static void vala_gir_parser_set_type_id_ccode (ValaGirParser* self, ValaSymbol* sym) {
	gboolean _tmp0_ = FALSE;
	ValaSymbol* _tmp1_;
	gboolean _tmp2_;
	gchar* type_id = NULL;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sym != NULL);
	_tmp1_ = sym;
	_tmp2_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp1_, "CCode", "has_type_id");
	if (_tmp2_) {
		_tmp0_ = TRUE;
	} else {
		ValaSymbol* _tmp3_;
		gboolean _tmp4_;
		_tmp3_ = sym;
		_tmp4_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp3_, "CCode", "type_id");
		_tmp0_ = _tmp4_;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = vala_gir_parser_element_get_type_id (self);
	type_id = _tmp5_;
	_tmp6_ = type_id;
	if (_tmp6_ == NULL) {
		ValaSymbol* _tmp7_;
		_tmp7_ = sym;
		vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp7_, "CCode", "has_type_id", FALSE, NULL);
	} else {
		ValaSymbol* _tmp8_;
		const gchar* _tmp9_;
		_tmp8_ = sym;
		_tmp9_ = type_id;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp8_, "CCode", "type_id", _tmp9_, NULL);
	}
	_g_free0 (type_id);
}


static void vala_gir_parser_parse_repository (ValaGirParser* self) {
	ValaMarkupReader* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "repository");
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_attribute (_tmp0_, "version");
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strcmp0 (_tmp2_, VALA_GIR_PARSER_GIR_VERSION) != 0;
	_g_free0 (_tmp2_);
	if (_tmp3_) {
		ValaSourceReference* _tmp4_;
		ValaSourceReference* _tmp5_;
		ValaMarkupReader* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp4_ = vala_gir_parser_get_current_src (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = self->priv->reader;
		_tmp7_ = vala_markup_reader_get_attribute (_tmp6_, "version");
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strdup_printf ("unsupported GIR version %s (supported: %s)", _tmp8_, VALA_GIR_PARSER_GIR_VERSION);
		_tmp10_ = _tmp9_;
		vala_report_error (_tmp5_, _tmp10_);
		_g_free0 (_tmp10_);
		_g_free0 (_tmp8_);
		_vala_source_reference_unref0 (_tmp5_);
		return;
	}
	vala_gir_parser_next (self);
	while (TRUE) {
		ValaMarkupTokenType _tmp11_;
		ValaMarkupReader* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		_tmp11_ = self->priv->current_token;
		if (!(_tmp11_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp12_ = self->priv->reader;
		_tmp13_ = vala_markup_reader_get_name (_tmp12_);
		_tmp14_ = _tmp13_;
		if (g_strcmp0 (_tmp14_, "namespace") == 0) {
			vala_gir_parser_parse_namespace (self);
		} else {
			ValaMarkupReader* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_tmp15_ = self->priv->reader;
			_tmp16_ = vala_markup_reader_get_name (_tmp15_);
			_tmp17_ = _tmp16_;
			if (g_strcmp0 (_tmp17_, "include") == 0) {
				vala_gir_parser_parse_include (self);
			} else {
				ValaMarkupReader* _tmp18_;
				const gchar* _tmp19_;
				const gchar* _tmp20_;
				_tmp18_ = self->priv->reader;
				_tmp19_ = vala_markup_reader_get_name (_tmp18_);
				_tmp20_ = _tmp19_;
				if (g_strcmp0 (_tmp20_, "package") == 0) {
					gchar* pkg = NULL;
					gchar* _tmp21_;
					ValaSourceFile* _tmp22_;
					const gchar* _tmp23_;
					ValaCodeContext* _tmp24_;
					const gchar* _tmp25_;
					gboolean _tmp26_;
					_tmp21_ = vala_gir_parser_parse_package (self);
					pkg = _tmp21_;
					_tmp22_ = self->priv->current_source_file;
					_tmp23_ = pkg;
					vala_source_file_set_package_name (_tmp22_, _tmp23_);
					_tmp24_ = self->priv->context;
					_tmp25_ = pkg;
					_tmp26_ = vala_code_context_has_package (_tmp24_, _tmp25_);
					if (_tmp26_) {
						ValaSourceFile* _tmp27_;
						gboolean _tmp28_;
						gboolean _tmp29_;
						_tmp27_ = self->priv->current_source_file;
						_tmp28_ = vala_source_file_get_explicit (_tmp27_);
						_tmp29_ = _tmp28_;
						if (!_tmp29_) {
							_g_free0 (pkg);
							return;
						}
					} else {
						ValaCodeContext* _tmp30_;
						const gchar* _tmp31_;
						_tmp30_ = self->priv->context;
						_tmp31_ = pkg;
						vala_code_context_add_package (_tmp30_, _tmp31_);
					}
					_g_free0 (pkg);
				} else {
					ValaMarkupReader* _tmp32_;
					const gchar* _tmp33_;
					const gchar* _tmp34_;
					_tmp32_ = self->priv->reader;
					_tmp33_ = vala_markup_reader_get_name (_tmp32_);
					_tmp34_ = _tmp33_;
					if (g_strcmp0 (_tmp34_, "c:include") == 0) {
						vala_gir_parser_parse_c_include (self);
					} else {
						ValaSourceReference* _tmp35_;
						ValaSourceReference* _tmp36_;
						ValaMarkupReader* _tmp37_;
						const gchar* _tmp38_;
						const gchar* _tmp39_;
						gchar* _tmp40_;
						gchar* _tmp41_;
						_tmp35_ = vala_gir_parser_get_current_src (self);
						_tmp36_ = _tmp35_;
						_tmp37_ = self->priv->reader;
						_tmp38_ = vala_markup_reader_get_name (_tmp37_);
						_tmp39_ = _tmp38_;
						_tmp40_ = g_strdup_printf ("unknown child element `%s' in `repository'", _tmp39_);
						_tmp41_ = _tmp40_;
						vala_report_error (_tmp36_, _tmp41_);
						_g_free0 (_tmp41_);
						_vala_source_reference_unref0 (_tmp36_);
						vala_gir_parser_skip_element (self);
					}
				}
			}
		}
	}
	vala_gir_parser_end_element (self, "repository");
}


static void vala_gir_parser_parse_include (ValaGirParser* self) {
	gchar* pkg = NULL;
	ValaMarkupReader* _tmp0_;
	gchar* _tmp1_;
	gchar* version = NULL;
	ValaMarkupReader* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	ValaCodeContext* _tmp8_;
	const gchar* _tmp9_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "include");
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_attribute (_tmp0_, "name");
	pkg = _tmp1_;
	_tmp2_ = self->priv->reader;
	_tmp3_ = vala_markup_reader_get_attribute (_tmp2_, "version");
	version = _tmp3_;
	_tmp4_ = version;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp5_ = pkg;
		_tmp6_ = version;
		_tmp7_ = g_strdup_printf ("%s-%s", _tmp5_, _tmp6_);
		_g_free0 (pkg);
		pkg = _tmp7_;
	}
	_tmp8_ = self->priv->context;
	_tmp9_ = pkg;
	vala_code_context_add_external_package (_tmp8_, _tmp9_);
	vala_gir_parser_next (self);
	vala_gir_parser_end_element (self, "include");
	_g_free0 (version);
	_g_free0 (pkg);
}


static gchar* vala_gir_parser_parse_package (ValaGirParser* self) {
	gchar* result = NULL;
	gchar* pkg = NULL;
	ValaMarkupReader* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	vala_gir_parser_start_element (self, "package");
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_attribute (_tmp0_, "name");
	pkg = _tmp1_;
	vala_gir_parser_next (self);
	vala_gir_parser_end_element (self, "package");
	result = pkg;
	return result;
}


static void _vala_array_add1 (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_gir_parser_parse_c_include (ValaGirParser* self) {
	gchar** _tmp0_;
	gint _tmp0__length1;
	ValaMarkupReader* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "c:include");
	_tmp0_ = self->priv->cheader_filenames;
	_tmp0__length1 = self->priv->cheader_filenames_length1;
	_tmp1_ = self->priv->reader;
	_tmp2_ = vala_markup_reader_get_attribute (_tmp1_, "name");
	_vala_array_add1 (&self->priv->cheader_filenames, &self->priv->cheader_filenames_length1, &self->priv->_cheader_filenames_size_, _tmp2_);
	vala_gir_parser_next (self);
	vala_gir_parser_end_element (self, "c:include");
}


static void vala_gir_parser_skip_element (ValaGirParser* self) {
	gint level = 0;
	g_return_if_fail (self != NULL);
	vala_gir_parser_next (self);
	level = 1;
	while (TRUE) {
		gint _tmp0_;
		ValaMarkupTokenType _tmp1_;
		_tmp0_ = level;
		if (!(_tmp0_ > 0)) {
			break;
		}
		_tmp1_ = self->priv->current_token;
		if (_tmp1_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
			gint _tmp2_;
			_tmp2_ = level;
			level = _tmp2_ + 1;
		} else {
			ValaMarkupTokenType _tmp3_;
			_tmp3_ = self->priv->current_token;
			if (_tmp3_ == VALA_MARKUP_TOKEN_TYPE_END_ELEMENT) {
				gint _tmp4_;
				_tmp4_ = level;
				level = _tmp4_ - 1;
			} else {
				ValaMarkupTokenType _tmp5_;
				_tmp5_ = self->priv->current_token;
				if (_tmp5_ == VALA_MARKUP_TOKEN_TYPE_EOF) {
					ValaSourceReference* _tmp6_;
					ValaSourceReference* _tmp7_;
					_tmp6_ = vala_gir_parser_get_current_src (self);
					_tmp7_ = _tmp6_;
					vala_report_error (_tmp7_, "unexpected end of file");
					_vala_source_reference_unref0 (_tmp7_);
					break;
				}
			}
		}
		vala_gir_parser_next (self);
	}
}


static ValaGirParserNode* vala_gir_parser_resolve_node (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym, gboolean create_namespace) {
	ValaGirParserNode* result = NULL;
	ValaUnresolvedSymbol* _tmp0_;
	ValaUnresolvedSymbol* _tmp1_;
	ValaUnresolvedSymbol* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parent_scope != NULL, NULL);
	g_return_val_if_fail (unresolved_sym != NULL, NULL);
	_tmp0_ = unresolved_sym;
	_tmp1_ = vala_unresolved_symbol_get_inner (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == NULL) {
		ValaGirParserNode* scope = NULL;
		ValaGirParserNode* _tmp3_;
		ValaGirParserNode* _tmp4_;
		_tmp3_ = parent_scope;
		_tmp4_ = _vala_gir_parser_node_ref0 (_tmp3_);
		scope = _tmp4_;
		while (TRUE) {
			ValaGirParserNode* _tmp5_;
			ValaGirParserNode* node = NULL;
			ValaGirParserNode* _tmp6_;
			ValaUnresolvedSymbol* _tmp7_;
			const gchar* _tmp8_;
			const gchar* _tmp9_;
			gboolean _tmp10_;
			ValaUnresolvedSymbol* _tmp11_;
			ValaSourceReference* _tmp12_;
			ValaSourceReference* _tmp13_;
			ValaGirParserNode* _tmp14_;
			ValaGirParserNode* _tmp15_;
			ValaGirParserNode* _tmp16_;
			ValaGirParserNode* _tmp17_;
			ValaGirParserNode* _tmp18_;
			_tmp5_ = scope;
			if (!(_tmp5_ != NULL)) {
				break;
			}
			_tmp6_ = scope;
			_tmp7_ = unresolved_sym;
			_tmp8_ = vala_symbol_get_name ((ValaSymbol*) _tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = create_namespace;
			_tmp11_ = unresolved_sym;
			_tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = vala_gir_parser_node_lookup (_tmp6_, _tmp9_, _tmp10_, _tmp13_);
			node = _tmp14_;
			_tmp15_ = node;
			if (_tmp15_ != NULL) {
				result = node;
				_vala_gir_parser_node_unref0 (scope);
				return result;
			}
			_tmp16_ = scope;
			_tmp17_ = _tmp16_->parent;
			_tmp18_ = _vala_gir_parser_node_ref0 (_tmp17_);
			_vala_gir_parser_node_unref0 (scope);
			scope = _tmp18_;
			_vala_gir_parser_node_unref0 (node);
		}
		_vala_gir_parser_node_unref0 (scope);
	} else {
		ValaGirParserNode* inner = NULL;
		ValaGirParserNode* _tmp19_;
		ValaUnresolvedSymbol* _tmp20_;
		ValaUnresolvedSymbol* _tmp21_;
		ValaUnresolvedSymbol* _tmp22_;
		gboolean _tmp23_;
		ValaGirParserNode* _tmp24_;
		ValaGirParserNode* _tmp25_;
		_tmp19_ = parent_scope;
		_tmp20_ = unresolved_sym;
		_tmp21_ = vala_unresolved_symbol_get_inner (_tmp20_);
		_tmp22_ = _tmp21_;
		_tmp23_ = create_namespace;
		_tmp24_ = vala_gir_parser_resolve_node (self, _tmp19_, _tmp22_, _tmp23_);
		inner = _tmp24_;
		_tmp25_ = inner;
		if (_tmp25_ != NULL) {
			ValaGirParserNode* _tmp26_;
			ValaUnresolvedSymbol* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			gboolean _tmp30_;
			ValaUnresolvedSymbol* _tmp31_;
			ValaSourceReference* _tmp32_;
			ValaSourceReference* _tmp33_;
			ValaGirParserNode* _tmp34_;
			_tmp26_ = inner;
			_tmp27_ = unresolved_sym;
			_tmp28_ = vala_symbol_get_name ((ValaSymbol*) _tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = create_namespace;
			_tmp31_ = unresolved_sym;
			_tmp32_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = vala_gir_parser_node_lookup (_tmp26_, _tmp29_, _tmp30_, _tmp33_);
			result = _tmp34_;
			_vala_gir_parser_node_unref0 (inner);
			return result;
		}
		_vala_gir_parser_node_unref0 (inner);
	}
	result = NULL;
	return result;
}


static ValaSymbol* vala_gir_parser_resolve_symbol (ValaGirParser* self, ValaGirParserNode* parent_scope, ValaUnresolvedSymbol* unresolved_sym) {
	ValaSymbol* result = NULL;
	ValaGirParserNode* node = NULL;
	ValaGirParserNode* _tmp0_;
	ValaUnresolvedSymbol* _tmp1_;
	ValaGirParserNode* _tmp2_;
	ValaGirParserNode* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (parent_scope != NULL, NULL);
	g_return_val_if_fail (unresolved_sym != NULL, NULL);
	_tmp0_ = parent_scope;
	_tmp1_ = unresolved_sym;
	_tmp2_ = vala_gir_parser_resolve_node (self, _tmp0_, _tmp1_, FALSE);
	node = _tmp2_;
	_tmp3_ = node;
	if (_tmp3_ != NULL) {
		ValaGirParserNode* _tmp4_;
		ValaSymbol* _tmp5_;
		ValaSymbol* _tmp6_;
		_tmp4_ = node;
		_tmp5_ = _tmp4_->symbol;
		_tmp6_ = _vala_code_node_ref0 (_tmp5_);
		result = _tmp6_;
		_vala_gir_parser_node_unref0 (node);
		return result;
	}
	result = NULL;
	_vala_gir_parser_node_unref0 (node);
	return result;
}


static void vala_gir_parser_push_node (ValaGirParser* self, const gchar* name, gboolean merge) {
	ValaGirParserNode* parent = NULL;
	ValaGirParserNode* _tmp0_;
	ValaGirParserNode* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	gboolean _tmp3_;
	ValaGirParserNode* node = NULL;
	ValaGirParserNode* _tmp15_;
	const gchar* _tmp16_;
	ValaGirParserNode* _tmp17_;
	gboolean _tmp18_ = FALSE;
	ValaGirParserNode* _tmp19_;
	ValaGirParserNode* _tmp31_;
	ValaMarkupReader* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	ValaGirParserNode* _tmp36_;
	ValaMarkupReader* _tmp37_;
	ValaMap* _tmp38_;
	ValaGirParserNode* _tmp39_;
	ValaGirParserMetadata* _tmp40_;
	ValaGirParserMetadata* _tmp41_;
	ValaGirParserNode* _tmp42_;
	ValaSourceReference* _tmp43_;
	gchar* gir_name = NULL;
	ValaGirParserNode* _tmp44_;
	gchar* _tmp45_;
	gboolean _tmp46_ = FALSE;
	ValaGirParserNode* _tmp47_;
	ValaGirParserNode* _tmp48_;
	ValaArrayList* _tmp57_;
	ValaGirParserNode* _tmp58_;
	ValaGirParserNode* _tmp59_;
	ValaGirParserNode* _tmp60_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->current;
	_tmp1_ = _vala_gir_parser_node_ref0 (_tmp0_);
	parent = _tmp1_;
	_tmp2_ = self->priv->metadata;
	_tmp3_ = vala_gir_parser_metadata_has_argument (_tmp2_, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
	if (_tmp3_) {
		ValaUnresolvedSymbol* target = NULL;
		ValaGirParserMetadata* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		ValaGirParserMetadata* _tmp7_;
		ValaSourceReference* _tmp8_;
		ValaSourceReference* _tmp9_;
		ValaUnresolvedSymbol* _tmp10_;
		ValaUnresolvedSymbol* _tmp11_;
		ValaGirParserNode* _tmp12_;
		ValaUnresolvedSymbol* _tmp13_;
		ValaGirParserNode* _tmp14_;
		_tmp4_ = self->priv->metadata;
		_tmp5_ = vala_gir_parser_metadata_get_string (_tmp4_, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->metadata;
		_tmp8_ = vala_gir_parser_metadata_get_source_reference (_tmp7_, VALA_GIR_PARSER_ARGUMENT_TYPE_PARENT);
		_tmp9_ = _tmp8_;
		_tmp10_ = vala_gir_parser_parse_symbol_from_string (self, _tmp6_, _tmp9_);
		_tmp11_ = _tmp10_;
		_vala_source_reference_unref0 (_tmp9_);
		_g_free0 (_tmp6_);
		target = _tmp11_;
		_tmp12_ = self->priv->root;
		_tmp13_ = target;
		_tmp14_ = vala_gir_parser_resolve_node (self, _tmp12_, _tmp13_, TRUE);
		_vala_gir_parser_node_unref0 (parent);
		parent = _tmp14_;
		_vala_code_node_unref0 (target);
	}
	_tmp15_ = parent;
	_tmp16_ = name;
	_tmp17_ = vala_gir_parser_node_lookup (_tmp15_, _tmp16_, FALSE, NULL);
	node = _tmp17_;
	_tmp19_ = node;
	if (_tmp19_ == NULL) {
		_tmp18_ = TRUE;
	} else {
		gboolean _tmp20_ = FALSE;
		ValaGirParserNode* _tmp21_;
		ValaSymbol* _tmp22_;
		_tmp21_ = node;
		_tmp22_ = _tmp21_->symbol;
		if (_tmp22_ != NULL) {
			gboolean _tmp23_;
			_tmp23_ = merge;
			_tmp20_ = !_tmp23_;
		} else {
			_tmp20_ = FALSE;
		}
		_tmp18_ = _tmp20_;
	}
	if (_tmp18_) {
		const gchar* _tmp24_;
		ValaGirParserNode* _tmp25_;
		ValaGirParserNode* _tmp26_;
		ValaGirParserNode* _tmp27_;
		ValaGirParserNode* _tmp28_;
		_tmp24_ = name;
		_tmp25_ = vala_gir_parser_node_new (_tmp24_);
		_vala_gir_parser_node_unref0 (node);
		node = _tmp25_;
		_tmp26_ = node;
		_tmp26_->new_symbol = TRUE;
		_tmp27_ = parent;
		_tmp28_ = node;
		vala_gir_parser_node_add_member (_tmp27_, _tmp28_);
	} else {
		ValaArrayList* _tmp29_;
		ValaGirParserNode* _tmp30_;
		_tmp29_ = vala_gir_parser_node_new_namespaces;
		_tmp30_ = node;
		vala_collection_remove ((ValaCollection*) _tmp29_, _tmp30_);
	}
	_tmp31_ = node;
	_tmp32_ = self->priv->reader;
	_tmp33_ = vala_markup_reader_get_name (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = g_strdup (_tmp34_);
	_g_free0 (_tmp31_->element_type);
	_tmp31_->element_type = _tmp35_;
	_tmp36_ = node;
	_tmp37_ = self->priv->reader;
	_tmp38_ = vala_markup_reader_get_attributes (_tmp37_);
	_vala_map_unref0 (_tmp36_->girdata);
	_tmp36_->girdata = _tmp38_;
	_tmp39_ = node;
	_tmp40_ = self->priv->metadata;
	_tmp41_ = _vala_gir_parser_metadata_ref0 (_tmp40_);
	_vala_gir_parser_metadata_unref0 (_tmp39_->metadata);
	_tmp39_->metadata = _tmp41_;
	_tmp42_ = node;
	_tmp43_ = vala_gir_parser_get_current_src (self);
	_vala_source_reference_unref0 (_tmp42_->source_reference);
	_tmp42_->source_reference = _tmp43_;
	_tmp44_ = node;
	_tmp45_ = vala_gir_parser_node_get_gir_name (_tmp44_);
	gir_name = _tmp45_;
	_tmp47_ = parent;
	_tmp48_ = self->priv->current;
	if (_tmp47_ != _tmp48_) {
		_tmp46_ = TRUE;
	} else {
		const gchar* _tmp49_;
		const gchar* _tmp50_;
		_tmp49_ = gir_name;
		_tmp50_ = name;
		_tmp46_ = g_strcmp0 (_tmp49_, _tmp50_) != 0;
	}
	if (_tmp46_) {
		const gchar* _tmp51_;
		ValaUnresolvedSymbol* _tmp52_;
		ValaUnresolvedSymbol* _tmp53_;
		ValaGirParserNode* _tmp54_;
		ValaUnresolvedSymbol* _tmp55_;
		ValaUnresolvedSymbol* _tmp56_;
		_tmp51_ = gir_name;
		_tmp52_ = vala_unresolved_symbol_new (NULL, _tmp51_, NULL);
		_tmp53_ = _tmp52_;
		_tmp54_ = node;
		_tmp55_ = vala_gir_parser_node_get_unresolved_symbol (_tmp54_);
		_tmp56_ = _tmp55_;
		vala_gir_parser_set_symbol_mapping (self, _tmp53_, (ValaSymbol*) _tmp56_);
		_vala_code_node_unref0 (_tmp56_);
		_vala_code_node_unref0 (_tmp53_);
	}
	_tmp57_ = self->priv->tree_stack;
	_tmp58_ = self->priv->current;
	vala_collection_add ((ValaCollection*) _tmp57_, _tmp58_);
	_tmp59_ = node;
	_tmp60_ = _vala_gir_parser_node_ref0 (_tmp59_);
	_vala_gir_parser_node_unref0 (self->priv->current);
	self->priv->current = _tmp60_;
	_g_free0 (gir_name);
	_vala_gir_parser_node_unref0 (node);
	_vala_gir_parser_node_unref0 (parent);
}


static void vala_gir_parser_pop_node (ValaGirParser* self) {
	ValaGirParserNode* _tmp0_;
	ValaGirParserNode* _tmp1_;
	ValaArrayList* _tmp2_;
	ValaArrayList* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gpointer _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->current;
	_tmp1_ = _vala_gir_parser_node_ref0 (_tmp0_);
	_vala_gir_parser_node_unref0 (self->priv->old_current);
	self->priv->old_current = _tmp1_;
	_tmp2_ = self->priv->tree_stack;
	_tmp3_ = self->priv->tree_stack;
	_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = vala_list_remove_at ((ValaList*) _tmp2_, _tmp5_ - 1);
	_vala_gir_parser_node_unref0 (self->priv->current);
	self->priv->current = (ValaGirParserNode*) _tmp6_;
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	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_;
		_tmp4_ = _result_;
		result = (gint) (_tmp4_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static void _vala_code_node_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL));
}


static inline void _g_list_free__vala_code_node_unref0_ (GList* self) {
	g_list_free_full (self, (GDestroyNotify) _vala_code_node_unref0_);
}


static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gchar** _tmp2_;
	gint _tmp2__length1;
	_tmp0_ = separator;
	if (_tmp0_ == NULL) {
		separator = "";
	}
	_tmp2_ = str_array;
	_tmp2__length1 = str_array_length1;
	if (_tmp2_ != NULL) {
		gboolean _tmp3_ = FALSE;
		gchar** _tmp4_;
		gint _tmp4__length1;
		_tmp4_ = str_array;
		_tmp4__length1 = str_array_length1;
		if (_tmp4__length1 > 0) {
			_tmp3_ = TRUE;
		} else {
			gboolean _tmp5_ = FALSE;
			gchar** _tmp6_;
			gint _tmp6__length1;
			_tmp6_ = str_array;
			_tmp6__length1 = str_array_length1;
			if (_tmp6__length1 == -1) {
				gchar** _tmp7_;
				gint _tmp7__length1;
				const gchar* _tmp8_;
				_tmp7_ = str_array;
				_tmp7__length1 = str_array_length1;
				_tmp8_ = _tmp7_[0];
				_tmp5_ = _tmp8_ != NULL;
			} else {
				_tmp5_ = FALSE;
			}
			_tmp3_ = _tmp5_;
		}
		_tmp1_ = _tmp3_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp31_;
		gint _tmp33_;
		gint _tmp34_;
		gsize _tmp35_;
		const gchar* _tmp36_;
		gint _tmp37_;
		gint _tmp38_;
		gint _tmp39_;
		const gchar* res = NULL;
		gsize _tmp40_;
		void* _tmp41_;
		void* ptr = NULL;
		const gchar* _tmp42_;
		gchar** _tmp43_;
		gint _tmp43__length1;
		const gchar* _tmp44_;
		void* _tmp45_;
		const gchar* _tmp62_;
		len = (gsize) 1;
		{
			gboolean _tmp9_ = FALSE;
			i = 0;
			_tmp9_ = TRUE;
			while (TRUE) {
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar** _tmp13_;
				gint _tmp13__length1;
				gint _tmp21_ = 0;
				gchar** _tmp22_;
				gint _tmp22__length1;
				gint _tmp23_;
				const gchar* _tmp24_;
				gsize _tmp30_;
				if (!_tmp9_) {
					gint _tmp10_;
					_tmp10_ = i;
					i = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp13_ = str_array;
				_tmp13__length1 = str_array_length1;
				if (_tmp13__length1 != -1) {
					gint _tmp14_;
					gchar** _tmp15_;
					gint _tmp15__length1;
					_tmp14_ = i;
					_tmp15_ = str_array;
					_tmp15__length1 = str_array_length1;
					_tmp12_ = _tmp14_ < _tmp15__length1;
				} else {
					_tmp12_ = FALSE;
				}
				if (_tmp12_) {
					_tmp11_ = TRUE;
				} else {
					gboolean _tmp16_ = FALSE;
					gchar** _tmp17_;
					gint _tmp17__length1;
					_tmp17_ = str_array;
					_tmp17__length1 = str_array_length1;
					if (_tmp17__length1 == -1) {
						gchar** _tmp18_;
						gint _tmp18__length1;
						gint _tmp19_;
						const gchar* _tmp20_;
						_tmp18_ = str_array;
						_tmp18__length1 = str_array_length1;
						_tmp19_ = i;
						_tmp20_ = _tmp18_[_tmp19_];
						_tmp16_ = _tmp20_ != NULL;
					} else {
						_tmp16_ = FALSE;
					}
					_tmp11_ = _tmp16_;
				}
				if (!_tmp11_) {
					break;
				}
				_tmp22_ = str_array;
				_tmp22__length1 = str_array_length1;
				_tmp23_ = i;
				_tmp24_ = _tmp22_[_tmp23_];
				if (_tmp24_ != NULL) {
					gchar** _tmp25_;
					gint _tmp25__length1;
					gint _tmp26_;
					const gchar* _tmp27_;
					gint _tmp28_;
					gint _tmp29_;
					_tmp25_ = str_array;
					_tmp25__length1 = str_array_length1;
					_tmp26_ = i;
					_tmp27_ = _tmp25_[_tmp26_];
					_tmp28_ = strlen ((const gchar*) _tmp27_);
					_tmp29_ = _tmp28_;
					_tmp21_ = _tmp29_;
				} else {
					_tmp21_ = 0;
				}
				_tmp30_ = len;
				len = _tmp30_ + _tmp21_;
			}
		}
		_tmp31_ = i;
		if (_tmp31_ == 0) {
			gchar* _tmp32_;
			_tmp32_ = g_strdup ("");
			result = _tmp32_;
			return result;
		}
		_tmp33_ = i;
		str_array_length1 = _tmp33_;
		_tmp34_ = str_array_length1;
		_tmp35_ = len;
		_tmp36_ = separator;
		_tmp37_ = strlen ((const gchar*) _tmp36_);
		_tmp38_ = _tmp37_;
		_tmp39_ = i;
		len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1));
		_tmp40_ = len;
		_tmp41_ = g_malloc (_tmp40_);
		res = _tmp41_;
		_tmp42_ = res;
		_tmp43_ = str_array;
		_tmp43__length1 = str_array_length1;
		_tmp44_ = _tmp43_[0];
		_tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_);
		ptr = _tmp45_;
		{
			gboolean _tmp46_ = FALSE;
			i = 1;
			_tmp46_ = TRUE;
			while (TRUE) {
				gint _tmp48_;
				gchar** _tmp49_;
				gint _tmp49__length1;
				void* _tmp50_;
				const gchar* _tmp51_;
				void* _tmp52_;
				const gchar* _tmp53_ = NULL;
				gchar** _tmp54_;
				gint _tmp54__length1;
				gint _tmp55_;
				const gchar* _tmp56_;
				void* _tmp60_;
				void* _tmp61_;
				if (!_tmp46_) {
					gint _tmp47_;
					_tmp47_ = i;
					i = _tmp47_ + 1;
				}
				_tmp46_ = FALSE;
				_tmp48_ = i;
				_tmp49_ = str_array;
				_tmp49__length1 = str_array_length1;
				if (!(_tmp48_ < _tmp49__length1)) {
					break;
				}
				_tmp50_ = ptr;
				_tmp51_ = separator;
				_tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_);
				ptr = _tmp52_;
				_tmp54_ = str_array;
				_tmp54__length1 = str_array_length1;
				_tmp55_ = i;
				_tmp56_ = _tmp54_[_tmp55_];
				if (_tmp56_ != NULL) {
					gchar** _tmp57_;
					gint _tmp57__length1;
					gint _tmp58_;
					const gchar* _tmp59_;
					_tmp57_ = str_array;
					_tmp57__length1 = str_array_length1;
					_tmp58_ = i;
					_tmp59_ = _tmp57_[_tmp58_];
					_tmp53_ = (const gchar*) _tmp59_;
				} else {
					_tmp53_ = "";
				}
				_tmp60_ = ptr;
				_tmp61_ = g_stpcpy (_tmp60_, _tmp53_);
				ptr = _tmp61_;
			}
		}
		_tmp62_ = res;
		res = NULL;
		result = (gchar*) _tmp62_;
		return result;
	} else {
		gchar* _tmp63_;
		_tmp63_ = g_strdup ("");
		result = _tmp63_;
		return result;
	}
}


static void vala_gir_parser_parse_namespace (ValaGirParser* self) {
	gchar* cprefix = NULL;
	ValaMarkupReader* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* lower_case_cprefix = NULL;
	ValaMarkupReader* _tmp9_;
	gchar* _tmp10_;
	gchar* vala_namespace = NULL;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* gir_namespace = NULL;
	ValaMarkupReader* _tmp13_;
	gchar* _tmp14_;
	gchar* gir_version = NULL;
	ValaMarkupReader* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	ValaSet* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gboolean _tmp29_;
	gboolean _tmp30_;
	gchar* metadata_filename = NULL;
	ValaCodeContext* _tmp31_;
	ValaSourceFile* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gchar* _tmp35_;
	gboolean _tmp36_ = FALSE;
	const gchar* _tmp37_;
	ValaGirParserMetadata* ns_metadata = NULL;
	ValaGirParserMetadata* _tmp54_;
	const gchar* _tmp55_;
	ValaGirParserMetadata* _tmp56_;
	ValaGirParserMetadata* _tmp57_;
	gboolean _tmp58_;
	const gchar* _tmp61_;
	ValaSourceFile* _tmp64_;
	const gchar* _tmp65_;
	ValaSourceFile* _tmp66_;
	const gchar* _tmp67_;
	ValaNamespace* ns = NULL;
	const gchar* _tmp68_;
	ValaGirParserNode* _tmp69_;
	gboolean _tmp70_;
	ValaGirParserNode* _tmp85_;
	ValaGirParserMetadata* _tmp86_;
	ValaGirParserMetadata* _tmp87_;
	ValaGirParserMetadata* _tmp88_;
	gboolean _tmp89_;
	ValaGirParserMetadata* _tmp92_;
	gboolean _tmp93_;
	ValaNamespace* _tmp99_;
	const gchar* _tmp100_;
	ValaNamespace* _tmp101_;
	const gchar* _tmp102_;
	const gchar* _tmp103_;
	const gchar* _tmp113_;
	gchar** _tmp116_;
	gint _tmp116__length1;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "namespace");
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_attribute (_tmp0_, "c:identifier-prefixes");
	cprefix = _tmp1_;
	_tmp2_ = cprefix;
	if (_tmp2_ != NULL) {
		gint idx = 0;
		const gchar* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		_tmp3_ = cprefix;
		_tmp4_ = string_index_of (_tmp3_, ",", 0);
		idx = _tmp4_;
		_tmp5_ = idx;
		if (_tmp5_ != -1) {
			const gchar* _tmp6_;
			gint _tmp7_;
			gchar* _tmp8_;
			_tmp6_ = cprefix;
			_tmp7_ = idx;
			_tmp8_ = string_substring (_tmp6_, (glong) 0, (glong) _tmp7_);
			_g_free0 (cprefix);
			cprefix = _tmp8_;
		}
	}
	_tmp9_ = self->priv->reader;
	_tmp10_ = vala_markup_reader_get_attribute (_tmp9_, "c:symbol-prefixes");
	lower_case_cprefix = _tmp10_;
	_tmp11_ = cprefix;
	_tmp12_ = g_strdup (_tmp11_);
	vala_namespace = _tmp12_;
	_tmp13_ = self->priv->reader;
	_tmp14_ = vala_markup_reader_get_attribute (_tmp13_, "name");
	gir_namespace = _tmp14_;
	_tmp15_ = self->priv->reader;
	_tmp16_ = vala_markup_reader_get_attribute (_tmp15_, "version");
	gir_version = _tmp16_;
	_tmp17_ = lower_case_cprefix;
	if (_tmp17_ != NULL) {
		gint idx = 0;
		const gchar* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		_tmp18_ = lower_case_cprefix;
		_tmp19_ = string_index_of (_tmp18_, ",", 0);
		idx = _tmp19_;
		_tmp20_ = idx;
		if (_tmp20_ != -1) {
			const gchar* _tmp21_;
			gint _tmp22_;
			gchar* _tmp23_;
			_tmp21_ = lower_case_cprefix;
			_tmp22_ = idx;
			_tmp23_ = string_substring (_tmp21_, (glong) 0, (glong) _tmp22_);
			_g_free0 (lower_case_cprefix);
			lower_case_cprefix = _tmp23_;
		}
	}
	_tmp24_ = self->priv->provided_namespaces;
	_tmp25_ = gir_namespace;
	_tmp26_ = gir_version;
	_tmp27_ = g_strdup_printf ("%s-%s", _tmp25_, _tmp26_);
	_tmp28_ = _tmp27_;
	_tmp29_ = vala_collection_contains ((ValaCollection*) _tmp24_, _tmp28_);
	_tmp30_ = _tmp29_;
	_g_free0 (_tmp28_);
	if (_tmp30_) {
		vala_gir_parser_skip_element (self);
		_g_free0 (gir_version);
		_g_free0 (gir_namespace);
		_g_free0 (vala_namespace);
		_g_free0 (lower_case_cprefix);
		_g_free0 (cprefix);
		return;
	}
	_tmp31_ = self->priv->context;
	_tmp32_ = self->priv->current_source_file;
	_tmp33_ = vala_source_file_get_filename (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = vala_code_context_get_metadata_path (_tmp31_, _tmp34_);
	metadata_filename = _tmp35_;
	_tmp37_ = metadata_filename;
	if (_tmp37_ != NULL) {
		const gchar* _tmp38_;
		gboolean _tmp39_;
		_tmp38_ = metadata_filename;
		_tmp39_ = g_file_test (_tmp38_, G_FILE_TEST_EXISTS);
		_tmp36_ = _tmp39_;
	} else {
		_tmp36_ = FALSE;
	}
	if (_tmp36_) {
		ValaGirParserMetadataParser* metadata_parser = NULL;
		ValaGirParserMetadataParser* _tmp40_;
		ValaSourceFile* metadata_file = NULL;
		ValaCodeContext* _tmp41_;
		ValaSourceFile* _tmp42_;
		ValaSourceFileType _tmp43_;
		ValaSourceFileType _tmp44_;
		const gchar* _tmp45_;
		ValaSourceFile* _tmp46_;
		ValaCodeContext* _tmp47_;
		ValaSourceFile* _tmp48_;
		ValaGirParserMetadataParser* _tmp49_;
		ValaSourceFile* _tmp50_;
		ValaGirParserMetadata* _tmp51_;
		ValaArrayList* _tmp52_;
		ValaGirParserMetadata* _tmp53_;
		_tmp40_ = vala_gir_parser_metadata_parser_new ();
		metadata_parser = _tmp40_;
		_tmp41_ = self->priv->context;
		_tmp42_ = self->priv->current_source_file;
		_tmp43_ = vala_source_file_get_file_type (_tmp42_);
		_tmp44_ = _tmp43_;
		_tmp45_ = metadata_filename;
		_tmp46_ = vala_source_file_new (_tmp41_, _tmp44_, _tmp45_, NULL, FALSE);
		metadata_file = _tmp46_;
		_tmp47_ = self->priv->context;
		_tmp48_ = metadata_file;
		vala_code_context_add_source_file (_tmp47_, _tmp48_);
		_tmp49_ = metadata_parser;
		_tmp50_ = metadata_file;
		_tmp51_ = vala_gir_parser_metadata_parser_parse_metadata (_tmp49_, _tmp50_);
		_vala_gir_parser_metadata_unref0 (self->priv->metadata);
		self->priv->metadata = _tmp51_;
		_tmp52_ = self->priv->metadata_roots;
		_tmp53_ = self->priv->metadata;
		vala_collection_add ((ValaCollection*) _tmp52_, _tmp53_);
		_vala_source_file_unref0 (metadata_file);
		_vala_gir_parser_metadata_parser_unref0 (metadata_parser);
	}
	_tmp54_ = self->priv->metadata;
	_tmp55_ = gir_namespace;
	_tmp56_ = vala_gir_parser_metadata_match_child (_tmp54_, _tmp55_, NULL);
	ns_metadata = _tmp56_;
	_tmp57_ = ns_metadata;
	_tmp58_ = vala_gir_parser_metadata_has_argument (_tmp57_, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
	if (_tmp58_) {
		ValaGirParserMetadata* _tmp59_;
		gchar* _tmp60_;
		_tmp59_ = ns_metadata;
		_tmp60_ = vala_gir_parser_metadata_get_string (_tmp59_, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
		_g_free0 (vala_namespace);
		vala_namespace = _tmp60_;
	}
	_tmp61_ = vala_namespace;
	if (_tmp61_ == NULL) {
		const gchar* _tmp62_;
		gchar* _tmp63_;
		_tmp62_ = gir_namespace;
		_tmp63_ = g_strdup (_tmp62_);
		_g_free0 (vala_namespace);
		vala_namespace = _tmp63_;
	}
	_tmp64_ = self->priv->current_source_file;
	_tmp65_ = gir_namespace;
	vala_source_file_set_gir_namespace (_tmp64_, _tmp65_);
	_tmp66_ = self->priv->current_source_file;
	_tmp67_ = gir_version;
	vala_source_file_set_gir_version (_tmp66_, _tmp67_);
	_tmp68_ = vala_namespace;
	vala_gir_parser_push_node (self, _tmp68_, TRUE);
	_tmp69_ = self->priv->current;
	_tmp70_ = _tmp69_->new_symbol;
	if (_tmp70_) {
		const gchar* _tmp71_;
		ValaGirParserNode* _tmp72_;
		ValaSourceReference* _tmp73_;
		ValaNamespace* _tmp74_;
		ValaGirParserNode* _tmp75_;
		ValaNamespace* _tmp76_;
		ValaSymbol* _tmp77_;
		_tmp71_ = vala_namespace;
		_tmp72_ = self->priv->current;
		_tmp73_ = _tmp72_->source_reference;
		_tmp74_ = vala_namespace_new (_tmp71_, _tmp73_);
		_vala_code_node_unref0 (ns);
		ns = _tmp74_;
		_tmp75_ = self->priv->current;
		_tmp76_ = ns;
		_tmp77_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp76_);
		_vala_code_node_unref0 (_tmp75_->symbol);
		_tmp75_->symbol = _tmp77_;
	} else {
		ValaGirParserNode* _tmp78_;
		ValaSymbol* _tmp79_;
		ValaNamespace* _tmp80_;
		ValaNamespace* _tmp81_;
		ValaNamespace* _tmp82_;
		ValaGirParserNode* _tmp83_;
		ValaSourceReference* _tmp84_;
		_tmp78_ = self->priv->current;
		_tmp79_ = _tmp78_->symbol;
		_tmp80_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, VALA_TYPE_NAMESPACE, ValaNamespace));
		_vala_code_node_unref0 (ns);
		ns = _tmp80_;
		_tmp81_ = ns;
		__g_list_free__vala_code_node_unref0_0 (((ValaCodeNode*) _tmp81_)->attributes);
		((ValaCodeNode*) _tmp81_)->attributes = NULL;
		_tmp82_ = ns;
		_tmp83_ = self->priv->current;
		_tmp84_ = _tmp83_->source_reference;
		vala_code_node_set_source_reference ((ValaCodeNode*) _tmp82_, _tmp84_);
	}
	_tmp85_ = self->priv->current;
	_tmp86_ = ns_metadata;
	_tmp87_ = _vala_gir_parser_metadata_ref0 (_tmp86_);
	_vala_gir_parser_metadata_unref0 (_tmp85_->metadata);
	_tmp85_->metadata = _tmp87_;
	_tmp88_ = ns_metadata;
	_tmp89_ = vala_gir_parser_metadata_has_argument (_tmp88_, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
	if (_tmp89_) {
		ValaGirParserMetadata* _tmp90_;
		gchar* _tmp91_;
		_tmp90_ = ns_metadata;
		_tmp91_ = vala_gir_parser_metadata_get_string (_tmp90_, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
		_g_free0 (cprefix);
		cprefix = _tmp91_;
	}
	_tmp92_ = ns_metadata;
	_tmp93_ = vala_gir_parser_metadata_has_argument (_tmp92_, VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX);
	if (_tmp93_) {
		ValaGirParserMetadata* _tmp94_;
		gchar* _tmp95_;
		_tmp94_ = ns_metadata;
		_tmp95_ = vala_gir_parser_metadata_get_string (_tmp94_, VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX);
		_g_free0 (lower_case_cprefix);
		lower_case_cprefix = _tmp95_;
	} else {
		const gchar* _tmp96_;
		_tmp96_ = lower_case_cprefix;
		if (_tmp96_ != NULL) {
			const gchar* _tmp97_;
			gchar* _tmp98_;
			_tmp97_ = lower_case_cprefix;
			_tmp98_ = g_strconcat (_tmp97_, "_", NULL);
			_g_free0 (lower_case_cprefix);
			lower_case_cprefix = _tmp98_;
		}
	}
	_tmp99_ = ns;
	_tmp100_ = gir_namespace;
	vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp99_, "CCode", "gir_namespace", _tmp100_, NULL);
	_tmp101_ = ns;
	_tmp102_ = gir_version;
	vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp101_, "CCode", "gir_version", _tmp102_, NULL);
	_tmp103_ = cprefix;
	if (_tmp103_ != NULL) {
		ValaNamespace* _tmp104_;
		const gchar* _tmp105_;
		const gchar* _tmp106_;
		_tmp104_ = ns;
		_tmp105_ = cprefix;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp104_, "CCode", "cprefix", _tmp105_, NULL);
		_tmp106_ = lower_case_cprefix;
		if (_tmp106_ == NULL) {
			ValaNamespace* _tmp107_;
			const gchar* _tmp108_;
			gchar* _tmp109_;
			gchar* _tmp110_;
			gchar* _tmp111_;
			gchar* _tmp112_;
			_tmp107_ = ns;
			_tmp108_ = cprefix;
			_tmp109_ = vala_symbol_camel_case_to_lower_case (_tmp108_);
			_tmp110_ = _tmp109_;
			_tmp111_ = g_strconcat (_tmp110_, "_", NULL);
			_tmp112_ = _tmp111_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp107_, "CCode", "lower_case_cprefix", _tmp112_, NULL);
			_g_free0 (_tmp112_);
			_g_free0 (_tmp110_);
		}
	}
	_tmp113_ = lower_case_cprefix;
	if (_tmp113_ != NULL) {
		ValaNamespace* _tmp114_;
		const gchar* _tmp115_;
		_tmp114_ = ns;
		_tmp115_ = lower_case_cprefix;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp114_, "CCode", "lower_case_cprefix", _tmp115_, NULL);
	}
	_tmp116_ = self->priv->cheader_filenames;
	_tmp116__length1 = self->priv->cheader_filenames_length1;
	if (_tmp116_ != NULL) {
		ValaNamespace* _tmp117_;
		gchar** _tmp118_;
		gint _tmp118__length1;
		gchar* _tmp119_;
		gchar* _tmp120_;
		_tmp117_ = ns;
		_tmp118_ = self->priv->cheader_filenames;
		_tmp118__length1 = self->priv->cheader_filenames_length1;
		_tmp119_ = _vala_g_strjoinv (",", _tmp118_, _tmp118__length1);
		_tmp120_ = _tmp119_;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp117_, "CCode", "cheader_filename", _tmp120_, NULL);
		_g_free0 (_tmp120_);
	}
	vala_gir_parser_next (self);
	while (TRUE) {
		ValaMarkupTokenType _tmp121_;
		gboolean _tmp122_;
		ValaMarkupReader* _tmp123_;
		const gchar* _tmp124_;
		const gchar* _tmp125_;
		_tmp121_ = self->priv->current_token;
		if (!(_tmp121_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp122_ = vala_gir_parser_push_metadata (self);
		if (!_tmp122_) {
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp123_ = self->priv->reader;
		_tmp124_ = vala_markup_reader_get_name (_tmp123_);
		_tmp125_ = _tmp124_;
		if (g_strcmp0 (_tmp125_, "alias") == 0) {
			vala_gir_parser_parse_alias (self);
		} else {
			ValaMarkupReader* _tmp126_;
			const gchar* _tmp127_;
			const gchar* _tmp128_;
			_tmp126_ = self->priv->reader;
			_tmp127_ = vala_markup_reader_get_name (_tmp126_);
			_tmp128_ = _tmp127_;
			if (g_strcmp0 (_tmp128_, "enumeration") == 0) {
				ValaGirParserMetadata* _tmp129_;
				gboolean _tmp130_;
				_tmp129_ = self->priv->metadata;
				_tmp130_ = vala_gir_parser_metadata_has_argument (_tmp129_, VALA_GIR_PARSER_ARGUMENT_TYPE_ERRORDOMAIN);
				if (_tmp130_) {
					ValaGirParserMetadata* _tmp131_;
					gboolean _tmp132_;
					_tmp131_ = self->priv->metadata;
					_tmp132_ = vala_gir_parser_metadata_get_bool (_tmp131_, VALA_GIR_PARSER_ARGUMENT_TYPE_ERRORDOMAIN, FALSE);
					if (_tmp132_) {
						vala_gir_parser_parse_error_domain (self);
					} else {
						vala_gir_parser_parse_enumeration (self, "enumeration", FALSE);
					}
				} else {
					gboolean _tmp133_ = FALSE;
					ValaMarkupReader* _tmp134_;
					gchar* _tmp135_;
					gchar* _tmp136_;
					gboolean _tmp137_;
					_tmp134_ = self->priv->reader;
					_tmp135_ = vala_markup_reader_get_attribute (_tmp134_, "glib:error-quark");
					_tmp136_ = _tmp135_;
					_tmp137_ = _tmp136_ != NULL;
					_g_free0 (_tmp136_);
					if (_tmp137_) {
						_tmp133_ = TRUE;
					} else {
						ValaMarkupReader* _tmp138_;
						gchar* _tmp139_;
						gchar* _tmp140_;
						_tmp138_ = self->priv->reader;
						_tmp139_ = vala_markup_reader_get_attribute (_tmp138_, "glib:error-domain");
						_tmp140_ = _tmp139_;
						_tmp133_ = _tmp140_ != NULL;
						_g_free0 (_tmp140_);
					}
					if (_tmp133_) {
						vala_gir_parser_parse_error_domain (self);
					} else {
						vala_gir_parser_parse_enumeration (self, "enumeration", FALSE);
					}
				}
			} else {
				ValaMarkupReader* _tmp141_;
				const gchar* _tmp142_;
				const gchar* _tmp143_;
				_tmp141_ = self->priv->reader;
				_tmp142_ = vala_markup_reader_get_name (_tmp141_);
				_tmp143_ = _tmp142_;
				if (g_strcmp0 (_tmp143_, "bitfield") == 0) {
					vala_gir_parser_parse_bitfield (self);
				} else {
					ValaMarkupReader* _tmp144_;
					const gchar* _tmp145_;
					const gchar* _tmp146_;
					_tmp144_ = self->priv->reader;
					_tmp145_ = vala_markup_reader_get_name (_tmp144_);
					_tmp146_ = _tmp145_;
					if (g_strcmp0 (_tmp146_, "function") == 0) {
						vala_gir_parser_parse_method (self, "function");
					} else {
						ValaMarkupReader* _tmp147_;
						const gchar* _tmp148_;
						const gchar* _tmp149_;
						_tmp147_ = self->priv->reader;
						_tmp148_ = vala_markup_reader_get_name (_tmp147_);
						_tmp149_ = _tmp148_;
						if (g_strcmp0 (_tmp149_, "callback") == 0) {
							vala_gir_parser_parse_callback (self);
						} else {
							ValaMarkupReader* _tmp150_;
							const gchar* _tmp151_;
							const gchar* _tmp152_;
							_tmp150_ = self->priv->reader;
							_tmp151_ = vala_markup_reader_get_name (_tmp150_);
							_tmp152_ = _tmp151_;
							if (g_strcmp0 (_tmp152_, "record") == 0) {
								ValaGirParserMetadata* _tmp153_;
								gboolean _tmp154_;
								_tmp153_ = self->priv->metadata;
								_tmp154_ = vala_gir_parser_metadata_has_argument (_tmp153_, VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT);
								if (_tmp154_) {
									ValaGirParserMetadata* _tmp155_;
									gboolean _tmp156_;
									_tmp155_ = self->priv->metadata;
									_tmp156_ = vala_gir_parser_metadata_get_bool (_tmp155_, VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT, FALSE);
									if (_tmp156_) {
										vala_gir_parser_parse_record (self);
									} else {
										vala_gir_parser_parse_boxed (self, "record");
									}
								} else {
									gchar* _tmp157_;
									gchar* _tmp158_;
									gboolean _tmp159_;
									_tmp157_ = vala_gir_parser_element_get_type_id (self);
									_tmp158_ = _tmp157_;
									_tmp159_ = _tmp158_ != NULL;
									_g_free0 (_tmp158_);
									if (_tmp159_) {
										vala_gir_parser_parse_boxed (self, "record");
									} else {
										ValaMarkupReader* _tmp160_;
										gchar* _tmp161_;
										gchar* _tmp162_;
										gboolean _tmp163_;
										gboolean _tmp164_;
										_tmp160_ = self->priv->reader;
										_tmp161_ = vala_markup_reader_get_attribute (_tmp160_, "name");
										_tmp162_ = _tmp161_;
										_tmp163_ = g_str_has_suffix (_tmp162_, "Private");
										_tmp164_ = !_tmp163_;
										_g_free0 (_tmp162_);
										if (_tmp164_) {
											gboolean _tmp165_ = FALSE;
											ValaMarkupReader* _tmp166_;
											gchar* _tmp167_;
											gchar* _tmp168_;
											gboolean _tmp169_;
											_tmp166_ = self->priv->reader;
											_tmp167_ = vala_markup_reader_get_attribute (_tmp166_, "glib:is-gtype-struct-for");
											_tmp168_ = _tmp167_;
											_tmp169_ = _tmp168_ == NULL;
											_g_free0 (_tmp168_);
											if (_tmp169_) {
												ValaMarkupReader* _tmp170_;
												gchar* _tmp171_;
												gchar* _tmp172_;
												_tmp170_ = self->priv->reader;
												_tmp171_ = vala_markup_reader_get_attribute (_tmp170_, "disguised");
												_tmp172_ = _tmp171_;
												_tmp165_ = g_strcmp0 (_tmp172_, "1") == 0;
												_g_free0 (_tmp172_);
											} else {
												_tmp165_ = FALSE;
											}
											if (_tmp165_) {
												vala_gir_parser_parse_boxed (self, "record");
											} else {
												vala_gir_parser_parse_record (self);
											}
										} else {
											vala_gir_parser_skip_element (self);
										}
									}
								}
							} else {
								ValaMarkupReader* _tmp173_;
								const gchar* _tmp174_;
								const gchar* _tmp175_;
								_tmp173_ = self->priv->reader;
								_tmp174_ = vala_markup_reader_get_name (_tmp173_);
								_tmp175_ = _tmp174_;
								if (g_strcmp0 (_tmp175_, "class") == 0) {
									vala_gir_parser_parse_class (self);
								} else {
									ValaMarkupReader* _tmp176_;
									const gchar* _tmp177_;
									const gchar* _tmp178_;
									_tmp176_ = self->priv->reader;
									_tmp177_ = vala_markup_reader_get_name (_tmp176_);
									_tmp178_ = _tmp177_;
									if (g_strcmp0 (_tmp178_, "interface") == 0) {
										vala_gir_parser_parse_interface (self);
									} else {
										ValaMarkupReader* _tmp179_;
										const gchar* _tmp180_;
										const gchar* _tmp181_;
										_tmp179_ = self->priv->reader;
										_tmp180_ = vala_markup_reader_get_name (_tmp179_);
										_tmp181_ = _tmp180_;
										if (g_strcmp0 (_tmp181_, "glib:boxed") == 0) {
											vala_gir_parser_parse_boxed (self, "glib:boxed");
										} else {
											ValaMarkupReader* _tmp182_;
											const gchar* _tmp183_;
											const gchar* _tmp184_;
											_tmp182_ = self->priv->reader;
											_tmp183_ = vala_markup_reader_get_name (_tmp182_);
											_tmp184_ = _tmp183_;
											if (g_strcmp0 (_tmp184_, "union") == 0) {
												gboolean _tmp185_ = FALSE;
												gchar* _tmp186_;
												gchar* _tmp187_;
												gboolean _tmp188_;
												_tmp186_ = vala_gir_parser_element_get_type_id (self);
												_tmp187_ = _tmp186_;
												_tmp188_ = _tmp187_ != NULL;
												_g_free0 (_tmp187_);
												if (_tmp188_) {
													ValaGirParserMetadata* _tmp189_;
													gboolean _tmp190_;
													_tmp189_ = self->priv->metadata;
													_tmp190_ = vala_gir_parser_metadata_get_bool (_tmp189_, VALA_GIR_PARSER_ARGUMENT_TYPE_STRUCT, FALSE);
													_tmp185_ = !_tmp190_;
												} else {
													_tmp185_ = FALSE;
												}
												if (_tmp185_) {
													vala_gir_parser_parse_boxed (self, "union");
												} else {
													vala_gir_parser_parse_union (self);
												}
											} else {
												ValaMarkupReader* _tmp191_;
												const gchar* _tmp192_;
												const gchar* _tmp193_;
												_tmp191_ = self->priv->reader;
												_tmp192_ = vala_markup_reader_get_name (_tmp191_);
												_tmp193_ = _tmp192_;
												if (g_strcmp0 (_tmp193_, "constant") == 0) {
													vala_gir_parser_parse_constant (self);
												} else {
													ValaSourceReference* _tmp194_;
													ValaSourceReference* _tmp195_;
													ValaMarkupReader* _tmp196_;
													const gchar* _tmp197_;
													const gchar* _tmp198_;
													gchar* _tmp199_;
													gchar* _tmp200_;
													_tmp194_ = vala_gir_parser_get_current_src (self);
													_tmp195_ = _tmp194_;
													_tmp196_ = self->priv->reader;
													_tmp197_ = vala_markup_reader_get_name (_tmp196_);
													_tmp198_ = _tmp197_;
													_tmp199_ = g_strdup_printf ("unknown child element `%s' in `namespace'", _tmp198_);
													_tmp200_ = _tmp199_;
													vala_report_error (_tmp195_, _tmp200_);
													_g_free0 (_tmp200_);
													_vala_source_reference_unref0 (_tmp195_);
													vala_gir_parser_skip_element (self);
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "namespace");
	_vala_code_node_unref0 (ns);
	_vala_gir_parser_metadata_unref0 (ns_metadata);
	_g_free0 (metadata_filename);
	_g_free0 (gir_version);
	_g_free0 (gir_namespace);
	_g_free0 (vala_namespace);
	_g_free0 (lower_case_cprefix);
	_g_free0 (cprefix);
}


static void vala_gir_parser_parse_alias (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	ValaGirParserNode* _tmp2_;
	ValaGirComment* _tmp3_;
	gboolean no_array_length = FALSE;
	gboolean array_null_terminated = FALSE;
	ValaGirParserNode* _tmp8_;
	ValaDataType* _tmp9_;
	ValaDataType* _tmp10_;
	ValaDataType* _tmp11_;
	ValaGirParserMetadata* _tmp12_;
	gboolean _tmp13_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "alias");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	vala_gir_parser_push_node (self, _tmp1_, TRUE);
	_g_free0 (_tmp1_);
	vala_gir_parser_next (self);
	_tmp2_ = self->priv->current;
	_tmp3_ = _tmp2_->comment;
	if (_tmp3_ == NULL) {
		ValaGirParserNode* _tmp4_;
		ValaGirComment* _tmp5_;
		_tmp4_ = self->priv->current;
		_tmp5_ = vala_gir_parser_parse_symbol_doc (self);
		_vala_comment_unref0 (_tmp4_->comment);
		_tmp4_->comment = _tmp5_;
	} else {
		ValaGirComment* _tmp6_;
		ValaGirComment* _tmp7_;
		_tmp6_ = vala_gir_parser_parse_symbol_doc (self);
		_tmp7_ = _tmp6_;
		_vala_comment_unref0 (_tmp7_);
	}
	no_array_length = FALSE;
	array_null_terminated = FALSE;
	_tmp8_ = self->priv->current;
	_tmp9_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_gir_parser_element_get_type (self, _tmp10_, TRUE, &no_array_length, &array_null_terminated, NULL);
	_vala_code_node_unref0 (_tmp8_->base_type);
	_tmp8_->base_type = _tmp11_;
	_vala_code_node_unref0 (_tmp10_);
	_tmp12_ = self->priv->metadata;
	_tmp13_ = vala_gir_parser_metadata_has_argument (_tmp12_, VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE);
	if (_tmp13_) {
		ValaGirParserNode* _tmp14_;
		ValaGirParserMetadata* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		ValaGirParserMetadata* _tmp18_;
		ValaSourceReference* _tmp19_;
		ValaSourceReference* _tmp20_;
		ValaDataType* _tmp21_;
		_tmp14_ = self->priv->current;
		_tmp15_ = self->priv->metadata;
		_tmp16_ = vala_gir_parser_metadata_get_string (_tmp15_, VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE);
		_tmp17_ = _tmp16_;
		_tmp18_ = self->priv->metadata;
		_tmp19_ = vala_gir_parser_metadata_get_source_reference (_tmp18_, VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE);
		_tmp20_ = _tmp19_;
		_tmp21_ = vala_gir_parser_parse_type_from_string (self, _tmp17_, TRUE, _tmp20_);
		_vala_code_node_unref0 (_tmp14_->base_type);
		_tmp14_->base_type = _tmp21_;
		_vala_source_reference_unref0 (_tmp20_);
		_g_free0 (_tmp17_);
	}
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "alias");
}


static gunichar string_get_char (const gchar* self, glong index) {
	gunichar result = 0U;
	glong _tmp0_;
	gunichar _tmp1_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = index;
	_tmp1_ = g_utf8_get_char (((gchar*) self) + _tmp0_);
	result = _tmp1_;
	return result;
}


static void vala_gir_parser_calculate_common_prefix (ValaGirParser* self, gchar* * common_prefix, const gchar* cname) {
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cname != NULL);
	_tmp0_ = *common_prefix;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = cname;
		_tmp2_ = g_strdup (_tmp1_);
		_g_free0 (*common_prefix);
		*common_prefix = _tmp2_;
		while (TRUE) {
			gboolean _tmp3_ = FALSE;
			const gchar* _tmp4_;
			gint _tmp5_;
			gint _tmp6_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			gchar* _tmp13_;
			_tmp4_ = *common_prefix;
			_tmp5_ = strlen (_tmp4_);
			_tmp6_ = _tmp5_;
			if (_tmp6_ > 0) {
				const gchar* _tmp7_;
				gboolean _tmp8_;
				_tmp7_ = *common_prefix;
				_tmp8_ = g_str_has_suffix (_tmp7_, "_");
				_tmp3_ = !_tmp8_;
			} else {
				_tmp3_ = FALSE;
			}
			if (!_tmp3_) {
				break;
			}
			_tmp9_ = *common_prefix;
			_tmp10_ = *common_prefix;
			_tmp11_ = strlen (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = string_substring (_tmp9_, (glong) 0, (glong) (_tmp12_ - 1));
			_g_free0 (*common_prefix);
			*common_prefix = _tmp13_;
		}
	} else {
		while (TRUE) {
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			gboolean _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gchar* _tmp21_;
			_tmp14_ = cname;
			_tmp15_ = *common_prefix;
			_tmp16_ = g_str_has_prefix (_tmp14_, _tmp15_);
			if (!(!_tmp16_)) {
				break;
			}
			_tmp17_ = *common_prefix;
			_tmp18_ = *common_prefix;
			_tmp19_ = strlen (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = string_substring (_tmp17_, (glong) 0, (glong) (_tmp20_ - 1));
			_g_free0 (*common_prefix);
			*common_prefix = _tmp21_;
		}
	}
	while (TRUE) {
		gboolean _tmp22_ = FALSE;
		const gchar* _tmp23_;
		gint _tmp24_;
		gint _tmp25_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		gint _tmp44_;
		gint _tmp45_;
		gchar* _tmp46_;
		_tmp23_ = *common_prefix;
		_tmp24_ = strlen (_tmp23_);
		_tmp25_ = _tmp24_;
		if (_tmp25_ > 0) {
			gboolean _tmp26_ = FALSE;
			const gchar* _tmp27_;
			gboolean _tmp28_;
			_tmp27_ = *common_prefix;
			_tmp28_ = g_str_has_suffix (_tmp27_, "_");
			if (!_tmp28_) {
				_tmp26_ = TRUE;
			} else {
				gboolean _tmp29_ = FALSE;
				const gchar* _tmp30_;
				const gchar* _tmp31_;
				gint _tmp32_;
				gint _tmp33_;
				gunichar _tmp34_;
				gboolean _tmp35_;
				_tmp30_ = cname;
				_tmp31_ = *common_prefix;
				_tmp32_ = strlen (_tmp31_);
				_tmp33_ = _tmp32_;
				_tmp34_ = string_get_char (_tmp30_, (glong) _tmp33_);
				_tmp35_ = g_unichar_isdigit (_tmp34_);
				if (_tmp35_) {
					const gchar* _tmp36_;
					gint _tmp37_;
					gint _tmp38_;
					const gchar* _tmp39_;
					gint _tmp40_;
					gint _tmp41_;
					_tmp36_ = cname;
					_tmp37_ = strlen (_tmp36_);
					_tmp38_ = _tmp37_;
					_tmp39_ = *common_prefix;
					_tmp40_ = strlen (_tmp39_);
					_tmp41_ = _tmp40_;
					_tmp29_ = (_tmp38_ - _tmp41_) <= 1;
				} else {
					_tmp29_ = FALSE;
				}
				_tmp26_ = _tmp29_;
			}
			_tmp22_ = _tmp26_;
		} else {
			_tmp22_ = FALSE;
		}
		if (!_tmp22_) {
			break;
		}
		_tmp42_ = *common_prefix;
		_tmp43_ = *common_prefix;
		_tmp44_ = strlen (_tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = string_substring (_tmp42_, (glong) 0, (glong) (_tmp45_ - 1));
		_g_free0 (*common_prefix);
		*common_prefix = _tmp46_;
	}
}


static ValaGirComment* vala_gir_parser_parse_symbol_doc (ValaGirParser* self) {
	ValaGirComment* result = NULL;
	ValaGirComment* comment = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	comment = NULL;
	while (TRUE) {
		ValaMarkupTokenType _tmp0_;
		const gchar* reader_name = NULL;
		ValaMarkupReader* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp0_ = self->priv->current_token;
		if (!(_tmp0_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp1_ = self->priv->reader;
		_tmp2_ = vala_markup_reader_get_name (_tmp1_);
		_tmp3_ = _tmp2_;
		reader_name = _tmp3_;
		_tmp4_ = reader_name;
		if (g_strcmp0 (_tmp4_, "doc") == 0) {
			ValaMarkupTokenType _tmp5_;
			vala_gir_parser_start_element (self, "doc");
			vala_gir_parser_next (self);
			_tmp5_ = self->priv->current_token;
			if (_tmp5_ == VALA_MARKUP_TOKEN_TYPE_TEXT) {
				ValaMarkupReader* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				ValaGirParserNode* _tmp9_;
				ValaSourceReference* _tmp10_;
				ValaGirComment* _tmp11_;
				_tmp6_ = self->priv->reader;
				_tmp7_ = vala_markup_reader_get_content (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp9_ = self->priv->current;
				_tmp10_ = _tmp9_->source_reference;
				_tmp11_ = vala_gir_comment_new (_tmp8_, _tmp10_);
				_vala_comment_unref0 (comment);
				comment = _tmp11_;
				vala_gir_parser_next (self);
			}
			vala_gir_parser_end_element (self, "doc");
		} else {
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
			const gchar* _tmp14_;
			_tmp14_ = reader_name;
			if (g_strcmp0 (_tmp14_, "doc-version") == 0) {
				_tmp13_ = TRUE;
			} else {
				const gchar* _tmp15_;
				_tmp15_ = reader_name;
				_tmp13_ = g_strcmp0 (_tmp15_, "doc-deprecated") == 0;
			}
			if (_tmp13_) {
				_tmp12_ = TRUE;
			} else {
				const gchar* _tmp16_;
				_tmp16_ = reader_name;
				_tmp12_ = g_strcmp0 (_tmp16_, "doc-stability") == 0;
			}
			if (_tmp12_) {
				vala_gir_parser_skip_element (self);
			} else {
				break;
			}
		}
	}
	result = comment;
	return result;
}


static ValaComment* vala_gir_parser_parse_doc (ValaGirParser* self) {
	ValaComment* result = NULL;
	ValaComment* comment = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	comment = NULL;
	while (TRUE) {
		ValaMarkupTokenType _tmp0_;
		const gchar* reader_name = NULL;
		ValaMarkupReader* _tmp1_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		_tmp0_ = self->priv->current_token;
		if (!(_tmp0_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp1_ = self->priv->reader;
		_tmp2_ = vala_markup_reader_get_name (_tmp1_);
		_tmp3_ = _tmp2_;
		reader_name = _tmp3_;
		_tmp4_ = reader_name;
		if (g_strcmp0 (_tmp4_, "doc") == 0) {
			ValaMarkupTokenType _tmp5_;
			vala_gir_parser_start_element (self, "doc");
			vala_gir_parser_next (self);
			_tmp5_ = self->priv->current_token;
			if (_tmp5_ == VALA_MARKUP_TOKEN_TYPE_TEXT) {
				ValaMarkupReader* _tmp6_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				ValaGirParserNode* _tmp9_;
				ValaSourceReference* _tmp10_;
				ValaComment* _tmp11_;
				_tmp6_ = self->priv->reader;
				_tmp7_ = vala_markup_reader_get_content (_tmp6_);
				_tmp8_ = _tmp7_;
				_tmp9_ = self->priv->current;
				_tmp10_ = _tmp9_->source_reference;
				_tmp11_ = vala_comment_new (_tmp8_, _tmp10_);
				_vala_comment_unref0 (comment);
				comment = _tmp11_;
				vala_gir_parser_next (self);
			}
			vala_gir_parser_end_element (self, "doc");
		} else {
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
			const gchar* _tmp14_;
			_tmp14_ = reader_name;
			if (g_strcmp0 (_tmp14_, "doc-version") == 0) {
				_tmp13_ = TRUE;
			} else {
				const gchar* _tmp15_;
				_tmp15_ = reader_name;
				_tmp13_ = g_strcmp0 (_tmp15_, "doc-deprecated") == 0;
			}
			if (_tmp13_) {
				_tmp12_ = TRUE;
			} else {
				const gchar* _tmp16_;
				_tmp16_ = reader_name;
				_tmp12_ = g_strcmp0 (_tmp16_, "doc-stability") == 0;
			}
			if (_tmp12_) {
				vala_gir_parser_skip_element (self);
			} else {
				break;
			}
		}
	}
	result = comment;
	return result;
}


static void vala_gir_parser_parse_enumeration (ValaGirParser* self, const gchar* element_name, gboolean error_domain) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	ValaSymbol* sym = NULL;
	ValaGirParserNode* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp26_;
	ValaSymbol* _tmp28_;
	ValaSymbol* _tmp29_;
	gchar* common_prefix = NULL;
	gboolean has_member = FALSE;
	ValaSymbol* _tmp30_;
	ValaGirComment* _tmp31_;
	ValaGirComment* _tmp32_;
	gboolean _tmp56_;
	const gchar* _tmp64_;
	const gchar* _tmp67_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element_name != NULL);
	_tmp0_ = element_name;
	vala_gir_parser_start_element (self, _tmp0_);
	_tmp1_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp2_ = _tmp1_;
	vala_gir_parser_push_node (self, _tmp2_, TRUE);
	_g_free0 (_tmp2_);
	_tmp3_ = self->priv->current;
	_tmp4_ = _tmp3_->new_symbol;
	if (_tmp4_) {
		gboolean _tmp5_;
		ValaGirParserNode* _tmp20_;
		ValaSymbol* _tmp21_;
		ValaSymbol* _tmp22_;
		_tmp5_ = error_domain;
		if (_tmp5_) {
			ValaGirParserNode* _tmp6_;
			const gchar* _tmp7_;
			ValaGirParserNode* _tmp8_;
			ValaSourceReference* _tmp9_;
			ValaErrorDomain* _tmp10_;
			_tmp6_ = self->priv->current;
			_tmp7_ = _tmp6_->name;
			_tmp8_ = self->priv->current;
			_tmp9_ = _tmp8_->source_reference;
			_tmp10_ = vala_error_domain_new (_tmp7_, _tmp9_, NULL);
			_vala_code_node_unref0 (sym);
			sym = (ValaSymbol*) _tmp10_;
		} else {
			ValaEnum* en = NULL;
			ValaGirParserNode* _tmp11_;
			const gchar* _tmp12_;
			ValaGirParserNode* _tmp13_;
			ValaSourceReference* _tmp14_;
			ValaEnum* _tmp15_;
			const gchar* _tmp16_;
			ValaEnum* _tmp18_;
			ValaSymbol* _tmp19_;
			_tmp11_ = self->priv->current;
			_tmp12_ = _tmp11_->name;
			_tmp13_ = self->priv->current;
			_tmp14_ = _tmp13_->source_reference;
			_tmp15_ = vala_enum_new (_tmp12_, _tmp14_, NULL);
			en = _tmp15_;
			_tmp16_ = element_name;
			if (g_strcmp0 (_tmp16_, "bitfield") == 0) {
				ValaEnum* _tmp17_;
				_tmp17_ = en;
				vala_code_node_set_attribute ((ValaCodeNode*) _tmp17_, "Flags", TRUE, NULL);
			}
			_tmp18_ = en;
			_tmp19_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp18_);
			_vala_code_node_unref0 (sym);
			sym = _tmp19_;
			_vala_code_node_unref0 (en);
		}
		_tmp20_ = self->priv->current;
		_tmp21_ = sym;
		_tmp22_ = _vala_code_node_ref0 (_tmp21_);
		_vala_code_node_unref0 (_tmp20_->symbol);
		_tmp20_->symbol = _tmp22_;
	} else {
		ValaGirParserNode* _tmp23_;
		ValaSymbol* _tmp24_;
		ValaSymbol* _tmp25_;
		_tmp23_ = self->priv->current;
		_tmp24_ = _tmp23_->symbol;
		_tmp25_ = _vala_code_node_ref0 (_tmp24_);
		_vala_code_node_unref0 (sym);
		sym = _tmp25_;
	}
	_tmp26_ = error_domain;
	if (!_tmp26_) {
		ValaSymbol* _tmp27_;
		_tmp27_ = sym;
		vala_gir_parser_set_type_id_ccode (self, _tmp27_);
	}
	_tmp28_ = sym;
	vala_symbol_set_external (_tmp28_, TRUE);
	_tmp29_ = sym;
	vala_symbol_set_access (_tmp29_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	common_prefix = NULL;
	has_member = FALSE;
	vala_gir_parser_next (self);
	_tmp30_ = sym;
	_tmp31_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp32_ = _tmp31_;
	vala_symbol_set_comment (_tmp30_, (ValaComment*) _tmp32_);
	_vala_comment_unref0 (_tmp32_);
	while (TRUE) {
		ValaMarkupTokenType _tmp33_;
		gboolean _tmp34_;
		ValaMarkupReader* _tmp35_;
		const gchar* _tmp36_;
		const gchar* _tmp37_;
		_tmp33_ = self->priv->current_token;
		if (!(_tmp33_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp34_ = vala_gir_parser_push_metadata (self);
		if (!_tmp34_) {
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp35_ = self->priv->reader;
		_tmp36_ = vala_markup_reader_get_name (_tmp35_);
		_tmp37_ = _tmp36_;
		if (g_strcmp0 (_tmp37_, "member") == 0) {
			gboolean _tmp38_;
			has_member = TRUE;
			_tmp38_ = error_domain;
			if (_tmp38_) {
				ValaGirParserNode* _tmp39_;
				gchar* _tmp40_;
				gchar* _tmp41_;
				vala_gir_parser_parse_error_member (self);
				_tmp39_ = self->priv->old_current;
				_tmp40_ = vala_gir_parser_node_get_cname (_tmp39_);
				_tmp41_ = _tmp40_;
				vala_gir_parser_calculate_common_prefix (self, &common_prefix, _tmp41_);
				_g_free0 (_tmp41_);
			} else {
				ValaGirParserNode* _tmp42_;
				gchar* _tmp43_;
				gchar* _tmp44_;
				vala_gir_parser_parse_enumeration_member (self);
				_tmp42_ = self->priv->old_current;
				_tmp43_ = vala_gir_parser_node_get_cname (_tmp42_);
				_tmp44_ = _tmp43_;
				vala_gir_parser_calculate_common_prefix (self, &common_prefix, _tmp44_);
				_g_free0 (_tmp44_);
			}
		} else {
			ValaMarkupReader* _tmp45_;
			const gchar* _tmp46_;
			const gchar* _tmp47_;
			_tmp45_ = self->priv->reader;
			_tmp46_ = vala_markup_reader_get_name (_tmp45_);
			_tmp47_ = _tmp46_;
			if (g_strcmp0 (_tmp47_, "function") == 0) {
				vala_gir_parser_skip_element (self);
			} else {
				ValaSourceReference* _tmp48_;
				ValaSourceReference* _tmp49_;
				ValaMarkupReader* _tmp50_;
				const gchar* _tmp51_;
				const gchar* _tmp52_;
				const gchar* _tmp53_;
				gchar* _tmp54_;
				gchar* _tmp55_;
				_tmp48_ = vala_gir_parser_get_current_src (self);
				_tmp49_ = _tmp48_;
				_tmp50_ = self->priv->reader;
				_tmp51_ = vala_markup_reader_get_name (_tmp50_);
				_tmp52_ = _tmp51_;
				_tmp53_ = element_name;
				_tmp54_ = g_strdup_printf ("unknown child element `%s' in `%s'", _tmp52_, _tmp53_);
				_tmp55_ = _tmp54_;
				vala_report_error (_tmp49_, _tmp55_);
				_g_free0 (_tmp55_);
				_vala_source_reference_unref0 (_tmp49_);
				vala_gir_parser_skip_element (self);
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	_tmp56_ = has_member;
	if (!_tmp56_) {
		ValaSourceReference* _tmp57_;
		ValaSourceReference* _tmp58_;
		const gchar* _tmp59_;
		ValaGirParserNode* _tmp60_;
		const gchar* _tmp61_;
		gchar* _tmp62_;
		gchar* _tmp63_;
		_tmp57_ = vala_gir_parser_get_current_src (self);
		_tmp58_ = _tmp57_;
		_tmp59_ = element_name;
		_tmp60_ = self->priv->current;
		_tmp61_ = _tmp60_->name;
		_tmp62_ = g_strdup_printf ("%s `%s' has no members", _tmp59_, _tmp61_);
		_tmp63_ = _tmp62_;
		vala_report_error (_tmp58_, _tmp63_);
		_g_free0 (_tmp63_);
		_vala_source_reference_unref0 (_tmp58_);
	}
	_tmp64_ = common_prefix;
	if (_tmp64_ != NULL) {
		ValaSymbol* _tmp65_;
		const gchar* _tmp66_;
		_tmp65_ = sym;
		_tmp66_ = common_prefix;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp65_, "CCode", "cprefix", _tmp66_, NULL);
	}
	vala_gir_parser_pop_node (self);
	_tmp67_ = element_name;
	vala_gir_parser_end_element (self, _tmp67_);
	_g_free0 (common_prefix);
	_vala_code_node_unref0 (sym);
}


static void vala_gir_parser_parse_error_domain (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	vala_gir_parser_parse_enumeration (self, "enumeration", TRUE);
}


static void vala_gir_parser_parse_bitfield (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	vala_gir_parser_parse_enumeration (self, "bitfield", FALSE);
}


static void vala_gir_parser_parse_enumeration_member (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValaEnumValue* ev = NULL;
	ValaGirParserNode* _tmp6_;
	const gchar* _tmp7_;
	ValaGirParserMetadata* _tmp8_;
	ValaExpression* _tmp9_;
	ValaExpression* _tmp10_;
	ValaGirParserNode* _tmp11_;
	ValaSourceReference* _tmp12_;
	ValaEnumValue* _tmp13_;
	ValaEnumValue* _tmp14_;
	ValaGirParserNode* _tmp15_;
	ValaSymbol* _tmp16_;
	ValaGirComment* _tmp17_;
	ValaGirComment* _tmp18_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "member");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_ascii_strup (_tmp1_, (gssize) -1);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_replace (_tmp3_, "-", "_");
	_tmp5_ = _tmp4_;
	vala_gir_parser_push_node (self, _tmp5_, FALSE);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	_tmp6_ = self->priv->current;
	_tmp7_ = _tmp6_->name;
	_tmp8_ = self->priv->metadata;
	_tmp9_ = vala_gir_parser_metadata_get_expression (_tmp8_, VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT);
	_tmp10_ = _tmp9_;
	_tmp11_ = self->priv->current;
	_tmp12_ = _tmp11_->source_reference;
	_tmp13_ = vala_enum_value_new (_tmp7_, _tmp10_, _tmp12_, NULL);
	_tmp14_ = _tmp13_;
	_vala_code_node_unref0 (_tmp10_);
	ev = _tmp14_;
	_tmp15_ = self->priv->current;
	_tmp16_ = _vala_code_node_ref0 ((ValaSymbol*) ev);
	_vala_code_node_unref0 (_tmp15_->symbol);
	_tmp15_->symbol = _tmp16_;
	vala_gir_parser_next (self);
	_tmp17_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp18_ = _tmp17_;
	vala_symbol_set_comment ((ValaSymbol*) ev, (ValaComment*) _tmp18_);
	_vala_comment_unref0 (_tmp18_);
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "member");
	_vala_code_node_unref0 (ev);
}


static void vala_gir_parser_parse_error_member (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	ValaErrorCode* ec = NULL;
	gchar* value = NULL;
	ValaMarkupReader* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	ValaGirParserNode* _tmp18_;
	ValaErrorCode* _tmp19_;
	ValaSymbol* _tmp20_;
	ValaErrorCode* _tmp21_;
	ValaGirComment* _tmp22_;
	ValaGirComment* _tmp23_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "member");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_ascii_strup (_tmp1_, (gssize) -1);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_replace (_tmp3_, "-", "_");
	_tmp5_ = _tmp4_;
	vala_gir_parser_push_node (self, _tmp5_, FALSE);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	_tmp6_ = self->priv->reader;
	_tmp7_ = vala_markup_reader_get_attribute (_tmp6_, "value");
	value = _tmp7_;
	_tmp8_ = value;
	if (_tmp8_ != NULL) {
		ValaGirParserNode* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		ValaIntegerLiteral* _tmp12_;
		ValaIntegerLiteral* _tmp13_;
		ValaErrorCode* _tmp14_;
		_tmp9_ = self->priv->current;
		_tmp10_ = _tmp9_->name;
		_tmp11_ = value;
		_tmp12_ = vala_integer_literal_new (_tmp11_, NULL);
		_tmp13_ = _tmp12_;
		_tmp14_ = vala_error_code_new_with_value (_tmp10_, (ValaExpression*) _tmp13_, NULL);
		_vala_code_node_unref0 (ec);
		ec = _tmp14_;
		_vala_code_node_unref0 (_tmp13_);
	} else {
		ValaGirParserNode* _tmp15_;
		const gchar* _tmp16_;
		ValaErrorCode* _tmp17_;
		_tmp15_ = self->priv->current;
		_tmp16_ = _tmp15_->name;
		_tmp17_ = vala_error_code_new (_tmp16_, NULL, NULL);
		_vala_code_node_unref0 (ec);
		ec = _tmp17_;
	}
	_tmp18_ = self->priv->current;
	_tmp19_ = ec;
	_tmp20_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp19_);
	_vala_code_node_unref0 (_tmp18_->symbol);
	_tmp18_->symbol = _tmp20_;
	vala_gir_parser_next (self);
	_tmp21_ = ec;
	_tmp22_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp23_ = _tmp22_;
	vala_symbol_set_comment ((ValaSymbol*) _tmp21_, (ValaComment*) _tmp23_);
	_vala_comment_unref0 (_tmp23_);
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "member");
	_g_free0 (value);
	_vala_code_node_unref0 (ec);
}


static ValaDataType* vala_gir_parser_parse_return_value (ValaGirParser* self, gchar* * ctype, gint* array_length_idx, gboolean* no_array_length, gboolean* array_null_terminated, ValaComment* * comment) {
	gchar* _vala_ctype = NULL;
	gint _vala_array_length_idx = 0;
	gboolean _vala_no_array_length = FALSE;
	gboolean _vala_array_null_terminated = FALSE;
	ValaComment* _vala_comment = NULL;
	ValaDataType* result = NULL;
	gchar* transfer = NULL;
	ValaMarkupReader* _tmp0_;
	gchar* _tmp1_;
	gchar* nullable = NULL;
	ValaMarkupReader* _tmp2_;
	gchar* _tmp3_;
	gchar* allow_none = NULL;
	ValaMarkupReader* _tmp4_;
	gchar* _tmp5_;
	ValaComment* _tmp6_;
	gboolean transfer_elements = FALSE;
	const gchar* _tmp7_;
	ValaDataType* type = NULL;
	gboolean _tmp8_;
	gchar* _tmp9_ = NULL;
	gint _tmp10_ = 0;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	ValaDataType* _tmp13_;
	gboolean _tmp14_ = FALSE;
	const gchar* _tmp15_;
	gboolean _tmp18_ = FALSE;
	const gchar* _tmp19_;
	ValaDataType* _tmp22_;
	ValaDataType* _tmp23_;
	ValaArrayType* array_type = NULL;
	ValaDataType* _tmp24_;
	ValaArrayType* _tmp25_;
	gboolean _tmp26_ = FALSE;
	ValaArrayType* _tmp27_;
	g_return_val_if_fail (self != NULL, NULL);
	vala_gir_parser_start_element (self, "return-value");
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_attribute (_tmp0_, "transfer-ownership");
	transfer = _tmp1_;
	_tmp2_ = self->priv->reader;
	_tmp3_ = vala_markup_reader_get_attribute (_tmp2_, "nullable");
	nullable = _tmp3_;
	_tmp4_ = self->priv->reader;
	_tmp5_ = vala_markup_reader_get_attribute (_tmp4_, "allow-none");
	allow_none = _tmp5_;
	vala_gir_parser_next (self);
	_tmp6_ = vala_gir_parser_parse_doc (self);
	_vala_comment_unref0 (_vala_comment);
	_vala_comment = _tmp6_;
	_tmp7_ = transfer;
	transfer_elements = g_strcmp0 (_tmp7_, "container") != 0;
	_tmp8_ = transfer_elements;
	_tmp13_ = vala_gir_parser_parse_type (self, &_tmp9_, &_tmp10_, _tmp8_, &_tmp11_, &_tmp12_);
	_g_free0 (_vala_ctype);
	_vala_ctype = _tmp9_;
	_vala_array_length_idx = _tmp10_;
	_vala_no_array_length = _tmp11_;
	_vala_array_null_terminated = _tmp12_;
	type = _tmp13_;
	_tmp15_ = transfer;
	if (g_strcmp0 (_tmp15_, "full") == 0) {
		_tmp14_ = TRUE;
	} else {
		const gchar* _tmp16_;
		_tmp16_ = transfer;
		_tmp14_ = g_strcmp0 (_tmp16_, "container") == 0;
	}
	if (_tmp14_) {
		ValaDataType* _tmp17_;
		_tmp17_ = type;
		vala_data_type_set_value_owned (_tmp17_, TRUE);
	}
	_tmp19_ = nullable;
	if (g_strcmp0 (_tmp19_, "1") == 0) {
		_tmp18_ = TRUE;
	} else {
		const gchar* _tmp20_;
		_tmp20_ = allow_none;
		_tmp18_ = g_strcmp0 (_tmp20_, "1") == 0;
	}
	if (_tmp18_) {
		ValaDataType* _tmp21_;
		_tmp21_ = type;
		vala_data_type_set_nullable (_tmp21_, TRUE);
	}
	_tmp22_ = type;
	_tmp23_ = vala_gir_parser_element_get_type (self, _tmp22_, TRUE, &_vala_no_array_length, &_vala_array_null_terminated, NULL);
	_vala_code_node_unref0 (type);
	type = _tmp23_;
	_tmp24_ = type;
	_tmp25_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, VALA_TYPE_ARRAY_TYPE) ? ((ValaArrayType*) _tmp24_) : NULL);
	array_type = _tmp25_;
	_tmp27_ = array_type;
	if (_tmp27_ != NULL) {
		ValaArrayType* _tmp28_;
		gboolean _tmp29_;
		gboolean _tmp30_;
		_tmp28_ = array_type;
		_tmp29_ = vala_array_type_get_fixed_length (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp26_ = _tmp30_;
	} else {
		_tmp26_ = FALSE;
	}
	if (_tmp26_) {
		ValaArrayType* _tmp31_;
		ValaArrayType* _tmp32_;
		_tmp31_ = array_type;
		vala_array_type_set_fixed_length (_tmp31_, FALSE);
		_tmp32_ = array_type;
		vala_array_type_set_length (_tmp32_, NULL);
	}
	vala_gir_parser_end_element (self, "return-value");
	result = type;
	_vala_code_node_unref0 (array_type);
	_g_free0 (allow_none);
	_g_free0 (nullable);
	_g_free0 (transfer);
	if (ctype) {
		*ctype = _vala_ctype;
	} else {
		_g_free0 (_vala_ctype);
	}
	if (array_length_idx) {
		*array_length_idx = _vala_array_length_idx;
	}
	if (no_array_length) {
		*no_array_length = _vala_no_array_length;
	}
	if (array_null_terminated) {
		*array_null_terminated = _vala_array_null_terminated;
	}
	if (comment) {
		*comment = _vala_comment;
	} else {
		_vala_comment_unref0 (_vala_comment);
	}
	return result;
}


static ValaParameter* vala_gir_parser_parse_parameter (ValaGirParser* self, gint* array_length_idx, gint* closure_idx, gint* destroy_idx, gchar* * scope, ValaComment* * comment, const gchar* default_name) {
	gint _vala_array_length_idx = 0;
	gint _vala_closure_idx = 0;
	gint _vala_destroy_idx = 0;
	gchar* _vala_scope = NULL;
	ValaComment* _vala_comment = NULL;
	ValaParameter* result = NULL;
	ValaParameter* param = NULL;
	gchar* element_type = NULL;
	ValaMarkupReader* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaMarkupTokenType _tmp5_;
	const gchar* _tmp11_;
	gchar* name = NULL;
	ValaGirParserMetadata* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp17_;
	gchar* direction = NULL;
	ValaGirParserMetadata* _tmp20_;
	gboolean _tmp21_;
	gchar* transfer = NULL;
	ValaMarkupReader* _tmp32_;
	gchar* _tmp33_;
	gchar* nullable = NULL;
	ValaMarkupReader* _tmp34_;
	gchar* _tmp35_;
	gchar* allow_none = NULL;
	ValaMarkupReader* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* closure = NULL;
	ValaMarkupReader* _tmp39_;
	gchar* _tmp40_;
	gchar* destroy = NULL;
	ValaMarkupReader* _tmp41_;
	gchar* _tmp42_;
	gboolean _tmp43_ = FALSE;
	const gchar* _tmp44_;
	gboolean _tmp47_ = FALSE;
	const gchar* _tmp48_;
	ValaGirParserMetadata* _tmp51_;
	gboolean _tmp52_;
	ValaGirParserMetadata* _tmp55_;
	gboolean _tmp56_;
	ValaComment* _tmp59_;
	ValaMarkupReader* _tmp60_;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp124_;
	g_return_val_if_fail (self != NULL, NULL);
	_vala_array_length_idx = -1;
	_vala_closure_idx = -1;
	_vala_destroy_idx = -1;
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_name (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	element_type = _tmp3_;
	_tmp5_ = self->priv->current_token;
	if (_tmp5_ != VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
		_tmp4_ = TRUE;
	} else {
		gboolean _tmp6_ = FALSE;
		const gchar* _tmp7_;
		_tmp7_ = element_type;
		if (g_strcmp0 (_tmp7_, "parameter") != 0) {
			const gchar* _tmp8_;
			_tmp8_ = element_type;
			_tmp6_ = g_strcmp0 (_tmp8_, "instance-parameter") != 0;
		} else {
			_tmp6_ = FALSE;
		}
		_tmp4_ = _tmp6_;
	}
	if (_tmp4_) {
		ValaSourceReference* _tmp9_;
		ValaSourceReference* _tmp10_;
		_tmp9_ = vala_gir_parser_get_current_src (self);
		_tmp10_ = _tmp9_;
		vala_report_error (_tmp10_, "expected start element of `parameter' or `instance-parameter'");
		_vala_source_reference_unref0 (_tmp10_);
	}
	_tmp11_ = element_type;
	vala_gir_parser_start_element (self, _tmp11_);
	_tmp12_ = self->priv->metadata;
	_tmp13_ = vala_gir_parser_metadata_get_string (_tmp12_, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
	name = _tmp13_;
	_tmp14_ = name;
	if (_tmp14_ == NULL) {
		ValaMarkupReader* _tmp15_;
		gchar* _tmp16_;
		_tmp15_ = self->priv->reader;
		_tmp16_ = vala_markup_reader_get_attribute (_tmp15_, "name");
		_g_free0 (name);
		name = _tmp16_;
	}
	_tmp17_ = name;
	if (_tmp17_ == NULL) {
		const gchar* _tmp18_;
		gchar* _tmp19_;
		_tmp18_ = default_name;
		_tmp19_ = g_strdup (_tmp18_);
		_g_free0 (name);
		name = _tmp19_;
	}
	direction = NULL;
	_tmp20_ = self->priv->metadata;
	_tmp21_ = vala_gir_parser_metadata_has_argument (_tmp20_, VALA_GIR_PARSER_ARGUMENT_TYPE_OUT);
	if (_tmp21_) {
		ValaGirParserMetadata* _tmp22_;
		gboolean _tmp23_;
		_tmp22_ = self->priv->metadata;
		_tmp23_ = vala_gir_parser_metadata_get_bool (_tmp22_, VALA_GIR_PARSER_ARGUMENT_TYPE_OUT, FALSE);
		if (_tmp23_) {
			gchar* _tmp24_;
			_tmp24_ = g_strdup ("out");
			_g_free0 (direction);
			direction = _tmp24_;
		}
	} else {
		ValaGirParserMetadata* _tmp25_;
		gboolean _tmp26_;
		_tmp25_ = self->priv->metadata;
		_tmp26_ = vala_gir_parser_metadata_has_argument (_tmp25_, VALA_GIR_PARSER_ARGUMENT_TYPE_REF);
		if (_tmp26_) {
			ValaGirParserMetadata* _tmp27_;
			gboolean _tmp28_;
			_tmp27_ = self->priv->metadata;
			_tmp28_ = vala_gir_parser_metadata_get_bool (_tmp27_, VALA_GIR_PARSER_ARGUMENT_TYPE_REF, FALSE);
			if (_tmp28_) {
				gchar* _tmp29_;
				_tmp29_ = g_strdup ("inout");
				_g_free0 (direction);
				direction = _tmp29_;
			}
		} else {
			ValaMarkupReader* _tmp30_;
			gchar* _tmp31_;
			_tmp30_ = self->priv->reader;
			_tmp31_ = vala_markup_reader_get_attribute (_tmp30_, "direction");
			_g_free0 (direction);
			direction = _tmp31_;
		}
	}
	_tmp32_ = self->priv->reader;
	_tmp33_ = vala_markup_reader_get_attribute (_tmp32_, "transfer-ownership");
	transfer = _tmp33_;
	_tmp34_ = self->priv->reader;
	_tmp35_ = vala_markup_reader_get_attribute (_tmp34_, "nullable");
	nullable = _tmp35_;
	_tmp36_ = self->priv->reader;
	_tmp37_ = vala_markup_reader_get_attribute (_tmp36_, "allow-none");
	allow_none = _tmp37_;
	_tmp38_ = vala_gir_parser_element_get_string (self, "scope", VALA_GIR_PARSER_ARGUMENT_TYPE_SCOPE);
	_g_free0 (_vala_scope);
	_vala_scope = _tmp38_;
	_tmp39_ = self->priv->reader;
	_tmp40_ = vala_markup_reader_get_attribute (_tmp39_, "closure");
	closure = _tmp40_;
	_tmp41_ = self->priv->reader;
	_tmp42_ = vala_markup_reader_get_attribute (_tmp41_, "destroy");
	destroy = _tmp42_;
	_tmp44_ = closure;
	if (_tmp44_ != NULL) {
		_tmp43_ = (&_vala_closure_idx) != NULL;
	} else {
		_tmp43_ = FALSE;
	}
	if (_tmp43_) {
		const gchar* _tmp45_;
		gint _tmp46_;
		_tmp45_ = closure;
		_tmp46_ = atoi (_tmp45_);
		_vala_closure_idx = _tmp46_;
	}
	_tmp48_ = destroy;
	if (_tmp48_ != NULL) {
		_tmp47_ = (&_vala_destroy_idx) != NULL;
	} else {
		_tmp47_ = FALSE;
	}
	if (_tmp47_) {
		const gchar* _tmp49_;
		gint _tmp50_;
		_tmp49_ = destroy;
		_tmp50_ = atoi (_tmp49_);
		_vala_destroy_idx = _tmp50_;
	}
	_tmp51_ = self->priv->metadata;
	_tmp52_ = vala_gir_parser_metadata_has_argument (_tmp51_, VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE);
	if (_tmp52_) {
		ValaGirParserMetadata* _tmp53_;
		gint _tmp54_;
		_tmp53_ = self->priv->metadata;
		_tmp54_ = vala_gir_parser_metadata_get_integer (_tmp53_, VALA_GIR_PARSER_ARGUMENT_TYPE_CLOSURE);
		_vala_closure_idx = _tmp54_;
	}
	_tmp55_ = self->priv->metadata;
	_tmp56_ = vala_gir_parser_metadata_has_argument (_tmp55_, VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROY);
	if (_tmp56_) {
		ValaGirParserMetadata* _tmp57_;
		gint _tmp58_;
		_tmp57_ = self->priv->metadata;
		_tmp58_ = vala_gir_parser_metadata_get_integer (_tmp57_, VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROY);
		_vala_destroy_idx = _tmp58_;
	}
	vala_gir_parser_next (self);
	_tmp59_ = vala_gir_parser_parse_doc (self);
	_vala_comment_unref0 (_vala_comment);
	_vala_comment = _tmp59_;
	_tmp60_ = self->priv->reader;
	_tmp61_ = vala_markup_reader_get_name (_tmp60_);
	_tmp62_ = _tmp61_;
	if (g_strcmp0 (_tmp62_, "varargs") == 0) {
		ValaSourceReference* _tmp63_;
		ValaSourceReference* _tmp64_;
		ValaParameter* _tmp65_;
		vala_gir_parser_start_element (self, "varargs");
		vala_gir_parser_next (self);
		_tmp63_ = vala_gir_parser_get_current_src (self);
		_tmp64_ = _tmp63_;
		_tmp65_ = vala_parameter_new_with_ellipsis (_tmp64_);
		_vala_code_node_unref0 (param);
		param = _tmp65_;
		_vala_source_reference_unref0 (_tmp64_);
		vala_gir_parser_end_element (self, "varargs");
	} else {
		gchar* ctype = NULL;
		gboolean no_array_length = FALSE;
		gboolean array_null_terminated = FALSE;
		ValaDataType* type = NULL;
		const gchar* _tmp66_;
		gchar* _tmp67_ = NULL;
		gint _tmp68_ = 0;
		gboolean _tmp69_ = FALSE;
		gboolean _tmp70_ = FALSE;
		ValaDataType* _tmp71_;
		gboolean _tmp72_ = FALSE;
		gboolean _tmp73_ = FALSE;
		const gchar* _tmp74_;
		gboolean _tmp78_ = FALSE;
		const gchar* _tmp79_;
		gboolean changed = FALSE;
		gboolean _tmp84_ = FALSE;
		const gchar* _tmp85_;
		ValaDataType* _tmp87_;
		gboolean _tmp88_ = FALSE;
		ValaDataType* _tmp89_;
		gboolean _tmp90_;
		const gchar* _tmp91_;
		ValaDataType* _tmp92_;
		ValaSourceReference* _tmp93_;
		ValaSourceReference* _tmp94_;
		ValaParameter* _tmp95_;
		const gchar* _tmp96_;
		const gchar* _tmp99_;
		ValaDataType* _tmp103_;
		ValaParameter* _tmp116_;
		ValaGirParserMetadata* _tmp117_;
		ValaExpression* _tmp118_;
		ValaExpression* _tmp119_;
		ValaParameter* _tmp120_;
		ValaExpression* _tmp121_;
		ValaExpression* _tmp122_;
		_tmp66_ = transfer;
		_tmp71_ = vala_gir_parser_parse_type (self, &_tmp67_, &_tmp68_, g_strcmp0 (_tmp66_, "container") != 0, &_tmp69_, &_tmp70_);
		_g_free0 (ctype);
		ctype = _tmp67_;
		_vala_array_length_idx = _tmp68_;
		no_array_length = _tmp69_;
		array_null_terminated = _tmp70_;
		type = _tmp71_;
		_tmp74_ = transfer;
		if (g_strcmp0 (_tmp74_, "full") == 0) {
			_tmp73_ = TRUE;
		} else {
			const gchar* _tmp75_;
			_tmp75_ = transfer;
			_tmp73_ = g_strcmp0 (_tmp75_, "container") == 0;
		}
		if (_tmp73_) {
			_tmp72_ = TRUE;
		} else {
			const gchar* _tmp76_;
			_tmp76_ = destroy;
			_tmp72_ = _tmp76_ != NULL;
		}
		if (_tmp72_) {
			ValaDataType* _tmp77_;
			_tmp77_ = type;
			vala_data_type_set_value_owned (_tmp77_, TRUE);
		}
		_tmp79_ = nullable;
		if (g_strcmp0 (_tmp79_, "1") == 0) {
			_tmp78_ = TRUE;
		} else {
			gboolean _tmp80_ = FALSE;
			const gchar* _tmp81_;
			_tmp81_ = allow_none;
			if (g_strcmp0 (_tmp81_, "1") == 0) {
				const gchar* _tmp82_;
				_tmp82_ = direction;
				_tmp80_ = g_strcmp0 (_tmp82_, "out") != 0;
			} else {
				_tmp80_ = FALSE;
			}
			_tmp78_ = _tmp80_;
		}
		if (_tmp78_) {
			ValaDataType* _tmp83_;
			_tmp83_ = type;
			vala_data_type_set_nullable (_tmp83_, TRUE);
		}
		_tmp85_ = direction;
		if (g_strcmp0 (_tmp85_, "out") == 0) {
			_tmp84_ = TRUE;
		} else {
			const gchar* _tmp86_;
			_tmp86_ = direction;
			_tmp84_ = g_strcmp0 (_tmp86_, "inout") == 0;
		}
		_tmp87_ = type;
		_tmp89_ = vala_gir_parser_element_get_type (self, _tmp87_, _tmp84_, &no_array_length, &array_null_terminated, &_tmp88_);
		changed = _tmp88_;
		_vala_code_node_unref0 (type);
		type = _tmp89_;
		_tmp90_ = changed;
		if (!_tmp90_) {
			_g_free0 (ctype);
			ctype = NULL;
		}
		_tmp91_ = name;
		_tmp92_ = type;
		_tmp93_ = vala_gir_parser_get_current_src (self);
		_tmp94_ = _tmp93_;
		_tmp95_ = vala_parameter_new (_tmp91_, _tmp92_, _tmp94_);
		_vala_code_node_unref0 (param);
		param = _tmp95_;
		_vala_source_reference_unref0 (_tmp94_);
		_tmp96_ = ctype;
		if (_tmp96_ != NULL) {
			ValaParameter* _tmp97_;
			const gchar* _tmp98_;
			_tmp97_ = param;
			_tmp98_ = ctype;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp97_, "CCode", "type", _tmp98_, NULL);
		}
		_tmp99_ = direction;
		if (g_strcmp0 (_tmp99_, "out") == 0) {
			ValaParameter* _tmp100_;
			_tmp100_ = param;
			vala_parameter_set_direction (_tmp100_, VALA_PARAMETER_DIRECTION_OUT);
		} else {
			const gchar* _tmp101_;
			_tmp101_ = direction;
			if (g_strcmp0 (_tmp101_, "inout") == 0) {
				ValaParameter* _tmp102_;
				_tmp102_ = param;
				vala_parameter_set_direction (_tmp102_, VALA_PARAMETER_DIRECTION_REF);
			}
		}
		_tmp103_ = type;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp103_, VALA_TYPE_ARRAY_TYPE)) {
			ValaGirParserMetadata* _tmp104_;
			gboolean _tmp105_;
			_tmp104_ = self->priv->metadata;
			_tmp105_ = vala_gir_parser_metadata_has_argument (_tmp104_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
			if (_tmp105_) {
				ValaGirParserMetadata* _tmp106_;
				gint _tmp107_;
				_tmp106_ = self->priv->metadata;
				_tmp107_ = vala_gir_parser_metadata_get_integer (_tmp106_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
				_vala_array_length_idx = _tmp107_;
			} else {
				gboolean _tmp108_ = FALSE;
				gboolean _tmp109_;
				gboolean _tmp113_;
				_tmp109_ = no_array_length;
				if (_tmp109_) {
					_tmp108_ = TRUE;
				} else {
					gboolean _tmp110_;
					_tmp110_ = array_null_terminated;
					_tmp108_ = _tmp110_;
				}
				if (_tmp108_) {
					ValaParameter* _tmp111_;
					gboolean _tmp112_;
					_tmp111_ = param;
					_tmp112_ = no_array_length;
					vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp111_, "CCode", "array_length", !_tmp112_, NULL);
				}
				_tmp113_ = array_null_terminated;
				if (_tmp113_) {
					ValaParameter* _tmp114_;
					gboolean _tmp115_;
					_tmp114_ = param;
					_tmp115_ = array_null_terminated;
					vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp114_, "CCode", "array_null_terminated", _tmp115_, NULL);
				}
			}
		}
		_tmp116_ = param;
		_tmp117_ = self->priv->metadata;
		_tmp118_ = vala_gir_parser_metadata_get_expression (_tmp117_, VALA_GIR_PARSER_ARGUMENT_TYPE_DEFAULT);
		_tmp119_ = _tmp118_;
		vala_variable_set_initializer ((ValaVariable*) _tmp116_, _tmp119_);
		_vala_code_node_unref0 (_tmp119_);
		_tmp120_ = param;
		_tmp121_ = vala_variable_get_initializer ((ValaVariable*) _tmp120_);
		_tmp122_ = _tmp121_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp122_, VALA_TYPE_TUPLE)) {
			ValaParameter* _tmp123_;
			_tmp123_ = param;
			vala_variable_set_initializer ((ValaVariable*) _tmp123_, NULL);
		}
		_vala_code_node_unref0 (type);
		_g_free0 (ctype);
	}
	_tmp124_ = element_type;
	vala_gir_parser_end_element (self, _tmp124_);
	result = param;
	_g_free0 (destroy);
	_g_free0 (closure);
	_g_free0 (allow_none);
	_g_free0 (nullable);
	_g_free0 (transfer);
	_g_free0 (direction);
	_g_free0 (name);
	_g_free0 (element_type);
	if (array_length_idx) {
		*array_length_idx = _vala_array_length_idx;
	}
	if (closure_idx) {
		*closure_idx = _vala_closure_idx;
	}
	if (destroy_idx) {
		*destroy_idx = _vala_destroy_idx;
	}
	if (scope) {
		*scope = _vala_scope;
	} else {
		_g_free0 (_vala_scope);
	}
	if (comment) {
		*comment = _vala_comment;
	} else {
		_vala_comment_unref0 (_vala_comment);
	}
	return result;
}


static ValaDataType* vala_gir_parser_parse_type (ValaGirParser* self, gchar* * ctype, gint* array_length_idx, gboolean transfer_elements, gboolean* no_array_length, gboolean* array_null_terminated) {
	gchar* _vala_ctype = NULL;
	gint _vala_array_length_idx = 0;
	gboolean _vala_no_array_length = FALSE;
	gboolean _vala_array_null_terminated = FALSE;
	ValaDataType* result = NULL;
	gboolean is_array = FALSE;
	gchar* type_name = NULL;
	ValaMarkupReader* _tmp0_;
	gchar* _tmp1_;
	gint fixed_length = 0;
	ValaMarkupReader* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	ValaMarkupReader* _tmp55_;
	gchar* _tmp56_;
	gboolean _tmp57_ = FALSE;
	const gchar* _tmp58_;
	ValaDataType* type = NULL;
	const gchar* _tmp61_;
	const gchar* _tmp62_;
	gboolean _tmp63_ = FALSE;
	gboolean _tmp64_ = FALSE;
	ValaDataType* _tmp65_;
	const gchar* _tmp75_ = NULL;
	gboolean _tmp76_;
	g_return_val_if_fail (self != NULL, NULL);
	is_array = FALSE;
	_tmp0_ = self->priv->reader;
	_tmp1_ = vala_markup_reader_get_attribute (_tmp0_, "name");
	type_name = _tmp1_;
	_g_free0 (_vala_ctype);
	_vala_ctype = NULL;
	fixed_length = -1;
	_vala_array_length_idx = -1;
	_vala_no_array_length = TRUE;
	_vala_array_null_terminated = TRUE;
	_tmp2_ = self->priv->reader;
	_tmp3_ = vala_markup_reader_get_name (_tmp2_);
	_tmp4_ = _tmp3_;
	if (g_strcmp0 (_tmp4_, "array") == 0) {
		ValaSourceReference* src = NULL;
		ValaSourceReference* _tmp5_;
		const gchar* _tmp6_;
		is_array = TRUE;
		vala_gir_parser_start_element (self, "array");
		_tmp5_ = vala_gir_parser_get_current_src (self);
		src = _tmp5_;
		_tmp6_ = type_name;
		if (_tmp6_ == NULL) {
			ValaMarkupReader* _tmp7_;
			gchar* _tmp8_;
			gchar* _tmp9_;
			gboolean _tmp10_;
			ValaMarkupReader* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			gboolean _tmp18_;
			ValaMarkupReader* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gboolean _tmp26_;
			ValaMarkupReader* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			gboolean _tmp30_;
			ValaDataType* element_type = NULL;
			ValaDataType* _tmp35_;
			ValaDataType* _tmp36_;
			gboolean _tmp37_;
			ValaArrayType* array_type = NULL;
			ValaDataType* _tmp38_;
			ValaSourceReference* _tmp39_;
			ValaArrayType* _tmp40_;
			gint _tmp41_;
			_tmp7_ = self->priv->reader;
			_tmp8_ = vala_markup_reader_get_attribute (_tmp7_, "length");
			_tmp9_ = _tmp8_;
			_tmp10_ = _tmp9_ != NULL;
			_g_free0 (_tmp9_);
			if (_tmp10_) {
				ValaMarkupReader* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				gint _tmp14_;
				_tmp11_ = self->priv->reader;
				_tmp12_ = vala_markup_reader_get_attribute (_tmp11_, "length");
				_tmp13_ = _tmp12_;
				_tmp14_ = atoi (_tmp13_);
				_vala_array_length_idx = _tmp14_;
				_g_free0 (_tmp13_);
				_vala_no_array_length = FALSE;
				_vala_array_null_terminated = FALSE;
			}
			_tmp15_ = self->priv->reader;
			_tmp16_ = vala_markup_reader_get_attribute (_tmp15_, "fixed-size");
			_tmp17_ = _tmp16_;
			_tmp18_ = _tmp17_ != NULL;
			_g_free0 (_tmp17_);
			if (_tmp18_) {
				ValaMarkupReader* _tmp19_;
				gchar* _tmp20_;
				gchar* _tmp21_;
				gint _tmp22_;
				_tmp19_ = self->priv->reader;
				_tmp20_ = vala_markup_reader_get_attribute (_tmp19_, "fixed-size");
				_tmp21_ = _tmp20_;
				_tmp22_ = atoi (_tmp21_);
				fixed_length = _tmp22_;
				_g_free0 (_tmp21_);
				_vala_array_null_terminated = FALSE;
			}
			_tmp23_ = self->priv->reader;
			_tmp24_ = vala_markup_reader_get_attribute (_tmp23_, "c:type");
			_tmp25_ = _tmp24_;
			_tmp26_ = g_strcmp0 (_tmp25_, "GStrv") == 0;
			_g_free0 (_tmp25_);
			if (_tmp26_) {
				_vala_no_array_length = TRUE;
				_vala_array_null_terminated = TRUE;
			}
			_tmp27_ = self->priv->reader;
			_tmp28_ = vala_markup_reader_get_attribute (_tmp27_, "zero-terminated");
			_tmp29_ = _tmp28_;
			_tmp30_ = _tmp29_ != NULL;
			_g_free0 (_tmp29_);
			if (_tmp30_) {
				ValaMarkupReader* _tmp31_;
				gchar* _tmp32_;
				gchar* _tmp33_;
				gint _tmp34_;
				_tmp31_ = self->priv->reader;
				_tmp32_ = vala_markup_reader_get_attribute (_tmp31_, "zero-terminated");
				_tmp33_ = _tmp32_;
				_tmp34_ = atoi (_tmp33_);
				_vala_array_null_terminated = _tmp34_ != 0;
				_g_free0 (_tmp33_);
			}
			vala_gir_parser_next (self);
			_tmp35_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
			element_type = _tmp35_;
			_tmp36_ = element_type;
			_tmp37_ = transfer_elements;
			vala_data_type_set_value_owned (_tmp36_, _tmp37_);
			vala_gir_parser_end_element (self, "array");
			_tmp38_ = element_type;
			_tmp39_ = src;
			_tmp40_ = vala_array_type_new (_tmp38_, 1, _tmp39_);
			array_type = _tmp40_;
			_tmp41_ = fixed_length;
			if (_tmp41_ > 0) {
				ValaArrayType* _tmp42_;
				ValaArrayType* _tmp43_;
				gint _tmp44_;
				gchar* _tmp45_;
				gchar* _tmp46_;
				ValaIntegerLiteral* _tmp47_;
				ValaIntegerLiteral* _tmp48_;
				_tmp42_ = array_type;
				vala_array_type_set_fixed_length (_tmp42_, TRUE);
				_tmp43_ = array_type;
				_tmp44_ = fixed_length;
				_tmp45_ = g_strdup_printf ("%i", _tmp44_);
				_tmp46_ = _tmp45_;
				_tmp47_ = vala_integer_literal_new (_tmp46_, NULL);
				_tmp48_ = _tmp47_;
				vala_array_type_set_length (_tmp43_, (ValaExpression*) _tmp48_);
				_vala_code_node_unref0 (_tmp48_);
				_g_free0 (_tmp46_);
			}
			result = (ValaDataType*) array_type;
			_vala_code_node_unref0 (element_type);
			_vala_source_reference_unref0 (src);
			_g_free0 (type_name);
			if (ctype) {
				*ctype = _vala_ctype;
			} else {
				_g_free0 (_vala_ctype);
			}
			if (array_length_idx) {
				*array_length_idx = _vala_array_length_idx;
			}
			if (no_array_length) {
				*no_array_length = _vala_no_array_length;
			}
			if (array_null_terminated) {
				*array_null_terminated = _vala_array_null_terminated;
			}
			return result;
		}
		_vala_source_reference_unref0 (src);
	} else {
		ValaMarkupReader* _tmp49_;
		const gchar* _tmp50_;
		const gchar* _tmp51_;
		_tmp49_ = self->priv->reader;
		_tmp50_ = vala_markup_reader_get_name (_tmp49_);
		_tmp51_ = _tmp50_;
		if (g_strcmp0 (_tmp51_, "callback") == 0) {
			ValaGirParserNode* _tmp52_;
			ValaSymbol* _tmp53_;
			ValaDelegateType* _tmp54_;
			vala_gir_parser_parse_callback (self);
			_tmp52_ = self->priv->old_current;
			_tmp53_ = _tmp52_->symbol;
			_tmp54_ = vala_delegate_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, VALA_TYPE_DELEGATE, ValaDelegate));
			result = (ValaDataType*) _tmp54_;
			_g_free0 (type_name);
			if (ctype) {
				*ctype = _vala_ctype;
			} else {
				_g_free0 (_vala_ctype);
			}
			if (array_length_idx) {
				*array_length_idx = _vala_array_length_idx;
			}
			if (no_array_length) {
				*no_array_length = _vala_no_array_length;
			}
			if (array_null_terminated) {
				*array_null_terminated = _vala_array_null_terminated;
			}
			return result;
		} else {
			vala_gir_parser_start_element (self, "type");
		}
	}
	_tmp55_ = self->priv->reader;
	_tmp56_ = vala_markup_reader_get_attribute (_tmp55_, "c:type");
	_g_free0 (_vala_ctype);
	_vala_ctype = _tmp56_;
	vala_gir_parser_next (self);
	_tmp58_ = type_name;
	if (g_strcmp0 (_tmp58_, "GLib.PtrArray") == 0) {
		ValaMarkupTokenType _tmp59_;
		_tmp59_ = self->priv->current_token;
		_tmp57_ = _tmp59_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT;
	} else {
		_tmp57_ = FALSE;
	}
	if (_tmp57_) {
		gchar* _tmp60_;
		_tmp60_ = g_strdup ("GLib.GenericArray");
		_g_free0 (type_name);
		type_name = _tmp60_;
	}
	_tmp61_ = type_name;
	_tmp62_ = _vala_ctype;
	_tmp65_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp61_, &_tmp63_, &_tmp64_, _tmp62_);
	_vala_no_array_length = _tmp63_;
	_vala_array_null_terminated = _tmp64_;
	type = _tmp65_;
	while (TRUE) {
		ValaMarkupTokenType _tmp66_;
		const gchar* _tmp67_;
		ValaDataType* element_type = NULL;
		ValaDataType* _tmp68_;
		ValaDataType* _tmp69_;
		gboolean _tmp70_;
		ValaDataType* _tmp71_;
		ValaDataType* _tmp72_;
		ValaArrayList* _tmp73_;
		ValaDataType* _tmp74_;
		_tmp66_ = self->priv->current_token;
		if (!(_tmp66_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp67_ = type_name;
		if (g_strcmp0 (_tmp67_, "GLib.ByteArray") == 0) {
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp68_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
		element_type = _tmp68_;
		_tmp69_ = element_type;
		_tmp70_ = transfer_elements;
		vala_data_type_set_value_owned (_tmp69_, _tmp70_);
		_tmp71_ = type;
		_tmp72_ = element_type;
		vala_data_type_add_type_argument (_tmp71_, _tmp72_);
		_tmp73_ = self->priv->unresolved_type_arguments;
		_tmp74_ = element_type;
		vala_collection_add ((ValaCollection*) _tmp73_, _tmp74_);
		_vala_code_node_unref0 (element_type);
	}
	_tmp76_ = is_array;
	if (_tmp76_) {
		_tmp75_ = "array";
	} else {
		_tmp75_ = "type";
	}
	vala_gir_parser_end_element (self, _tmp75_);
	result = type;
	_g_free0 (type_name);
	if (ctype) {
		*ctype = _vala_ctype;
	} else {
		_g_free0 (_vala_ctype);
	}
	if (array_length_idx) {
		*array_length_idx = _vala_array_length_idx;
	}
	if (no_array_length) {
		*no_array_length = _vala_no_array_length;
	}
	if (array_null_terminated) {
		*array_null_terminated = _vala_array_null_terminated;
	}
	return result;
}


static ValaDataType* vala_gir_parser_parse_type_from_gir_name (ValaGirParser* self, const gchar* type_name, gboolean* no_array_length, gboolean* array_null_terminated, const gchar* ctype) {
	gboolean _vala_no_array_length = FALSE;
	gboolean _vala_array_null_terminated = FALSE;
	ValaDataType* result = NULL;
	ValaDataType* type = NULL;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (type_name != NULL, NULL);
	_vala_no_array_length = FALSE;
	_vala_array_null_terminated = FALSE;
	type = NULL;
	_tmp0_ = type_name;
	if (g_strcmp0 (_tmp0_, "none") == 0) {
		ValaSourceReference* _tmp1_;
		ValaSourceReference* _tmp2_;
		ValaVoidType* _tmp3_;
		_tmp1_ = vala_gir_parser_get_current_src (self);
		_tmp2_ = _tmp1_;
		_tmp3_ = vala_void_type_new (_tmp2_);
		_vala_code_node_unref0 (type);
		type = (ValaDataType*) _tmp3_;
		_vala_source_reference_unref0 (_tmp2_);
	} else {
		const gchar* _tmp4_;
		_tmp4_ = type_name;
		if (g_strcmp0 (_tmp4_, "gpointer") == 0) {
			ValaSourceReference* _tmp5_;
			ValaSourceReference* _tmp6_;
			ValaVoidType* _tmp7_;
			ValaVoidType* _tmp8_;
			ValaSourceReference* _tmp9_;
			ValaSourceReference* _tmp10_;
			ValaPointerType* _tmp11_;
			_tmp5_ = vala_gir_parser_get_current_src (self);
			_tmp6_ = _tmp5_;
			_tmp7_ = vala_void_type_new (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = vala_gir_parser_get_current_src (self);
			_tmp10_ = _tmp9_;
			_tmp11_ = vala_pointer_type_new ((ValaDataType*) _tmp8_, _tmp10_);
			_vala_code_node_unref0 (type);
			type = (ValaDataType*) _tmp11_;
			_vala_source_reference_unref0 (_tmp10_);
			_vala_code_node_unref0 (_tmp8_);
			_vala_source_reference_unref0 (_tmp6_);
		} else {
			const gchar* _tmp12_;
			_tmp12_ = type_name;
			if (g_strcmp0 (_tmp12_, "GObject.Strv") == 0) {
				ValaUnresolvedType* element_type = NULL;
				ValaUnresolvedSymbol* _tmp13_;
				ValaUnresolvedSymbol* _tmp14_;
				ValaUnresolvedType* _tmp15_;
				ValaUnresolvedType* _tmp16_;
				ValaUnresolvedType* _tmp17_;
				ValaUnresolvedType* _tmp18_;
				ValaSourceReference* _tmp19_;
				ValaSourceReference* _tmp20_;
				ValaArrayType* _tmp21_;
				_tmp13_ = vala_unresolved_symbol_new (NULL, "string", NULL);
				_tmp14_ = _tmp13_;
				_tmp15_ = vala_unresolved_type_new_from_symbol (_tmp14_, NULL);
				_tmp16_ = _tmp15_;
				_vala_code_node_unref0 (_tmp14_);
				element_type = _tmp16_;
				_tmp17_ = element_type;
				vala_data_type_set_value_owned ((ValaDataType*) _tmp17_, TRUE);
				_tmp18_ = element_type;
				_tmp19_ = vala_gir_parser_get_current_src (self);
				_tmp20_ = _tmp19_;
				_tmp21_ = vala_array_type_new ((ValaDataType*) _tmp18_, 1, _tmp20_);
				_vala_code_node_unref0 (type);
				type = (ValaDataType*) _tmp21_;
				_vala_source_reference_unref0 (_tmp20_);
				_vala_no_array_length = TRUE;
				_vala_array_null_terminated = TRUE;
				_vala_code_node_unref0 (element_type);
			} else {
				gboolean known_type = FALSE;
				const gchar* _tmp22_;
				ValaDataType* _tmp77_;
				known_type = TRUE;
				_tmp22_ = type_name;
				if (g_strcmp0 (_tmp22_, "utf8") == 0) {
					type_name = "string";
				} else {
					const gchar* _tmp23_;
					_tmp23_ = type_name;
					if (g_strcmp0 (_tmp23_, "gboolean") == 0) {
						ValaCodeContext* _tmp24_;
						ValaNamespace* _tmp25_;
						ValaNamespace* _tmp26_;
						ValaScope* _tmp27_;
						ValaScope* _tmp28_;
						ValaSymbol* _tmp29_;
						ValaStruct* _tmp30_;
						ValaBooleanType* _tmp31_;
						_tmp24_ = self->priv->context;
						_tmp25_ = vala_code_context_get_root (_tmp24_);
						_tmp26_ = _tmp25_;
						_tmp27_ = vala_symbol_get_scope ((ValaSymbol*) _tmp26_);
						_tmp28_ = _tmp27_;
						_tmp29_ = vala_scope_lookup (_tmp28_, "bool");
						_tmp30_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, VALA_TYPE_STRUCT, ValaStruct);
						_tmp31_ = vala_boolean_type_new (_tmp30_);
						_vala_code_node_unref0 (type);
						type = (ValaDataType*) _tmp31_;
						_vala_code_node_unref0 (_tmp30_);
					} else {
						const gchar* _tmp32_;
						_tmp32_ = type_name;
						if (g_strcmp0 (_tmp32_, "gchar") == 0) {
							type_name = "char";
						} else {
							const gchar* _tmp33_;
							_tmp33_ = type_name;
							if (g_strcmp0 (_tmp33_, "gshort") == 0) {
								type_name = "short";
							} else {
								const gchar* _tmp34_;
								_tmp34_ = type_name;
								if (g_strcmp0 (_tmp34_, "gushort") == 0) {
									type_name = "ushort";
								} else {
									const gchar* _tmp35_;
									_tmp35_ = type_name;
									if (g_strcmp0 (_tmp35_, "gint") == 0) {
										type_name = "int";
									} else {
										const gchar* _tmp36_;
										_tmp36_ = type_name;
										if (g_strcmp0 (_tmp36_, "guint") == 0) {
											type_name = "uint";
										} else {
											const gchar* _tmp37_;
											_tmp37_ = type_name;
											if (g_strcmp0 (_tmp37_, "glong") == 0) {
												gboolean _tmp38_ = FALSE;
												const gchar* _tmp39_;
												_tmp39_ = ctype;
												if (_tmp39_ != NULL) {
													const gchar* _tmp40_;
													gboolean _tmp41_;
													_tmp40_ = ctype;
													_tmp41_ = g_str_has_prefix (_tmp40_, "gssize");
													_tmp38_ = _tmp41_;
												} else {
													_tmp38_ = FALSE;
												}
												if (_tmp38_) {
													type_name = "ssize_t";
												} else {
													gboolean _tmp42_ = FALSE;
													const gchar* _tmp43_;
													_tmp43_ = ctype;
													if (_tmp43_ != NULL) {
														const gchar* _tmp44_;
														gboolean _tmp45_;
														_tmp44_ = ctype;
														_tmp45_ = g_str_has_prefix (_tmp44_, "gintptr");
														_tmp42_ = _tmp45_;
													} else {
														_tmp42_ = FALSE;
													}
													if (_tmp42_) {
														type_name = "intptr";
													} else {
														type_name = "long";
													}
												}
											} else {
												const gchar* _tmp46_;
												_tmp46_ = type_name;
												if (g_strcmp0 (_tmp46_, "gulong") == 0) {
													gboolean _tmp47_ = FALSE;
													const gchar* _tmp48_;
													_tmp48_ = ctype;
													if (_tmp48_ != NULL) {
														const gchar* _tmp49_;
														gboolean _tmp50_;
														_tmp49_ = ctype;
														_tmp50_ = g_str_has_prefix (_tmp49_, "gsize");
														_tmp47_ = _tmp50_;
													} else {
														_tmp47_ = FALSE;
													}
													if (_tmp47_) {
														type_name = "size_t";
													} else {
														gboolean _tmp51_ = FALSE;
														const gchar* _tmp52_;
														_tmp52_ = ctype;
														if (_tmp52_ != NULL) {
															const gchar* _tmp53_;
															gboolean _tmp54_;
															_tmp53_ = ctype;
															_tmp54_ = g_str_has_prefix (_tmp53_, "guintptr");
															_tmp51_ = _tmp54_;
														} else {
															_tmp51_ = FALSE;
														}
														if (_tmp51_) {
															type_name = "uintptr";
														} else {
															type_name = "ulong";
														}
													}
												} else {
													const gchar* _tmp55_;
													_tmp55_ = type_name;
													if (g_strcmp0 (_tmp55_, "gint8") == 0) {
														type_name = "int8";
													} else {
														const gchar* _tmp56_;
														_tmp56_ = type_name;
														if (g_strcmp0 (_tmp56_, "guint8") == 0) {
															type_name = "uint8";
														} else {
															const gchar* _tmp57_;
															_tmp57_ = type_name;
															if (g_strcmp0 (_tmp57_, "gint16") == 0) {
																type_name = "int16";
															} else {
																const gchar* _tmp58_;
																_tmp58_ = type_name;
																if (g_strcmp0 (_tmp58_, "guint16") == 0) {
																	type_name = "uint16";
																} else {
																	const gchar* _tmp59_;
																	_tmp59_ = type_name;
																	if (g_strcmp0 (_tmp59_, "gint32") == 0) {
																		type_name = "int32";
																	} else {
																		const gchar* _tmp60_;
																		_tmp60_ = type_name;
																		if (g_strcmp0 (_tmp60_, "guint32") == 0) {
																			type_name = "uint32";
																		} else {
																			const gchar* _tmp61_;
																			_tmp61_ = type_name;
																			if (g_strcmp0 (_tmp61_, "gint64") == 0) {
																				type_name = "int64";
																			} else {
																				const gchar* _tmp62_;
																				_tmp62_ = type_name;
																				if (g_strcmp0 (_tmp62_, "guint64") == 0) {
																					type_name = "uint64";
																				} else {
																					const gchar* _tmp63_;
																					_tmp63_ = type_name;
																					if (g_strcmp0 (_tmp63_, "gfloat") == 0) {
																						type_name = "float";
																					} else {
																						const gchar* _tmp64_;
																						_tmp64_ = type_name;
																						if (g_strcmp0 (_tmp64_, "gdouble") == 0) {
																							type_name = "double";
																						} else {
																							const gchar* _tmp65_;
																							_tmp65_ = type_name;
																							if (g_strcmp0 (_tmp65_, "filename") == 0) {
																								type_name = "string";
																							} else {
																								const gchar* _tmp66_;
																								_tmp66_ = type_name;
																								if (g_strcmp0 (_tmp66_, "GLib.offset") == 0) {
																									type_name = "int64";
																								} else {
																									const gchar* _tmp67_;
																									_tmp67_ = type_name;
																									if (g_strcmp0 (_tmp67_, "gsize") == 0) {
																										type_name = "size_t";
																									} else {
																										const gchar* _tmp68_;
																										_tmp68_ = type_name;
																										if (g_strcmp0 (_tmp68_, "gssize") == 0) {
																											type_name = "ssize_t";
																										} else {
																											const gchar* _tmp69_;
																											_tmp69_ = type_name;
																											if (g_strcmp0 (_tmp69_, "guintptr") == 0) {
																												type_name = "uintptr";
																											} else {
																												const gchar* _tmp70_;
																												_tmp70_ = type_name;
																												if (g_strcmp0 (_tmp70_, "gintptr") == 0) {
																													type_name = "intptr";
																												} else {
																													const gchar* _tmp71_;
																													_tmp71_ = type_name;
																													if (g_strcmp0 (_tmp71_, "GType") == 0) {
																														type_name = "GLib.Type";
																													} else {
																														const gchar* _tmp72_;
																														_tmp72_ = type_name;
																														if (g_strcmp0 (_tmp72_, "GLib.String") == 0) {
																															type_name = "GLib.StringBuilder";
																														} else {
																															const gchar* _tmp73_;
																															_tmp73_ = type_name;
																															if (g_strcmp0 (_tmp73_, "GObject.Class") == 0) {
																																type_name = "GLib.ObjectClass";
																															} else {
																																const gchar* _tmp74_;
																																_tmp74_ = type_name;
																																if (g_strcmp0 (_tmp74_, "gunichar") == 0) {
																																	type_name = "unichar";
																																} else {
																																	const gchar* _tmp75_;
																																	_tmp75_ = type_name;
																																	if (g_strcmp0 (_tmp75_, "GLib.Data") == 0) {
																																		type_name = "GLib.Datalist";
																																	} else {
																																		const gchar* _tmp76_;
																																		_tmp76_ = type_name;
																																		if (g_strcmp0 (_tmp76_, "Atk.ImplementorIface") == 0) {
																																			type_name = "Atk.Implementor";
																																		} else {
																																			known_type = FALSE;
																																		}
																																	}
																																}
																															}
																														}
																													}
																												}
																											}
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
				_tmp77_ = type;
				if (_tmp77_ == NULL) {
					ValaUnresolvedSymbol* sym = NULL;
					const gchar* _tmp78_;
					ValaSourceReference* _tmp79_;
					ValaSourceReference* _tmp80_;
					ValaUnresolvedSymbol* _tmp81_;
					ValaUnresolvedSymbol* _tmp82_;
					ValaUnresolvedSymbol* _tmp83_;
					ValaSourceReference* _tmp84_;
					ValaSourceReference* _tmp85_;
					ValaUnresolvedType* _tmp86_;
					gboolean _tmp87_;
					_tmp78_ = type_name;
					_tmp79_ = vala_gir_parser_get_current_src (self);
					_tmp80_ = _tmp79_;
					_tmp81_ = vala_gir_parser_parse_symbol_from_string (self, _tmp78_, _tmp80_);
					_tmp82_ = _tmp81_;
					_vala_source_reference_unref0 (_tmp80_);
					sym = _tmp82_;
					_tmp83_ = sym;
					_tmp84_ = vala_gir_parser_get_current_src (self);
					_tmp85_ = _tmp84_;
					_tmp86_ = vala_unresolved_type_new_from_symbol (_tmp83_, _tmp85_);
					_vala_code_node_unref0 (type);
					type = (ValaDataType*) _tmp86_;
					_vala_source_reference_unref0 (_tmp85_);
					_tmp87_ = known_type;
					if (!_tmp87_) {
						ValaArrayList* _tmp88_;
						ValaUnresolvedSymbol* _tmp89_;
						_tmp88_ = self->priv->unresolved_gir_symbols;
						_tmp89_ = sym;
						vala_collection_add ((ValaCollection*) _tmp88_, _tmp89_);
					}
					_vala_code_node_unref0 (sym);
				}
			}
		}
	}
	result = type;
	if (no_array_length) {
		*no_array_length = _vala_no_array_length;
	}
	if (array_null_terminated) {
		*array_null_terminated = _vala_array_null_terminated;
	}
	return result;
}


static void vala_gir_parser_parse_record (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	ValaStruct* st = NULL;
	ValaGirParserNode* _tmp2_;
	gboolean _tmp3_;
	ValaStruct* _tmp15_;
	ValaStruct* _tmp16_;
	ValaStruct* _tmp17_;
	gchar* gtype_struct_for = NULL;
	ValaMarkupReader* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_;
	gboolean first_field = FALSE;
	ValaStruct* _tmp29_;
	ValaGirComment* _tmp30_;
	ValaGirComment* _tmp31_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "record");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	vala_gir_parser_push_node (self, _tmp1_, TRUE);
	_g_free0 (_tmp1_);
	_tmp2_ = self->priv->current;
	_tmp3_ = _tmp2_->new_symbol;
	if (_tmp3_) {
		gchar* _tmp4_;
		gchar* _tmp5_;
		ValaGirParserNode* _tmp6_;
		ValaSourceReference* _tmp7_;
		ValaStruct* _tmp8_;
		ValaGirParserNode* _tmp9_;
		ValaStruct* _tmp10_;
		ValaSymbol* _tmp11_;
		_tmp4_ = vala_gir_parser_element_get_name (self, NULL);
		_tmp5_ = _tmp4_;
		_tmp6_ = self->priv->current;
		_tmp7_ = _tmp6_->source_reference;
		_tmp8_ = vala_struct_new (_tmp5_, _tmp7_, NULL);
		_vala_code_node_unref0 (st);
		st = _tmp8_;
		_g_free0 (_tmp5_);
		_tmp9_ = self->priv->current;
		_tmp10_ = st;
		_tmp11_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp10_);
		_vala_code_node_unref0 (_tmp9_->symbol);
		_tmp9_->symbol = _tmp11_;
	} else {
		ValaGirParserNode* _tmp12_;
		ValaSymbol* _tmp13_;
		ValaStruct* _tmp14_;
		_tmp12_ = self->priv->current;
		_tmp13_ = _tmp12_->symbol;
		_tmp14_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALA_TYPE_STRUCT, ValaStruct));
		_vala_code_node_unref0 (st);
		st = _tmp14_;
	}
	_tmp15_ = st;
	vala_gir_parser_set_type_id_ccode (self, (ValaSymbol*) _tmp15_);
	_tmp16_ = st;
	vala_symbol_set_external ((ValaSymbol*) _tmp16_, TRUE);
	_tmp17_ = st;
	vala_symbol_set_access ((ValaSymbol*) _tmp17_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp18_ = self->priv->reader;
	_tmp19_ = vala_markup_reader_get_attribute (_tmp18_, "glib:is-gtype-struct-for");
	gtype_struct_for = _tmp19_;
	_tmp20_ = gtype_struct_for;
	if (_tmp20_ != NULL) {
		ValaGirParserNode* _tmp21_;
		const gchar* _tmp22_;
		ValaGirParserNode* _tmp23_;
		ValaSourceReference* _tmp24_;
		ValaUnresolvedSymbol* _tmp25_;
		ValaArrayList* _tmp26_;
		ValaGirParserNode* _tmp27_;
		ValaUnresolvedSymbol* _tmp28_;
		_tmp21_ = self->priv->current;
		_tmp22_ = gtype_struct_for;
		_tmp23_ = self->priv->current;
		_tmp24_ = _tmp23_->source_reference;
		_tmp25_ = vala_gir_parser_parse_symbol_from_string (self, _tmp22_, _tmp24_);
		_vala_code_node_unref0 (_tmp21_->gtype_struct_for);
		_tmp21_->gtype_struct_for = _tmp25_;
		_tmp26_ = self->priv->unresolved_gir_symbols;
		_tmp27_ = self->priv->current;
		_tmp28_ = _tmp27_->gtype_struct_for;
		vala_collection_add ((ValaCollection*) _tmp26_, _tmp28_);
	}
	first_field = TRUE;
	vala_gir_parser_next (self);
	_tmp29_ = st;
	_tmp30_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp31_ = _tmp30_;
	vala_symbol_set_comment ((ValaSymbol*) _tmp29_, (ValaComment*) _tmp31_);
	_vala_comment_unref0 (_tmp31_);
	while (TRUE) {
		ValaMarkupTokenType _tmp32_;
		gboolean _tmp33_;
		ValaMarkupReader* _tmp39_;
		const gchar* _tmp40_;
		const gchar* _tmp41_;
		_tmp32_ = self->priv->current_token;
		if (!(_tmp32_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp33_ = vala_gir_parser_push_metadata (self);
		if (!_tmp33_) {
			gboolean _tmp34_ = FALSE;
			gboolean _tmp35_;
			_tmp35_ = first_field;
			if (_tmp35_) {
				ValaMarkupReader* _tmp36_;
				const gchar* _tmp37_;
				const gchar* _tmp38_;
				_tmp36_ = self->priv->reader;
				_tmp37_ = vala_markup_reader_get_name (_tmp36_);
				_tmp38_ = _tmp37_;
				_tmp34_ = g_strcmp0 (_tmp38_, "field") == 0;
			} else {
				_tmp34_ = FALSE;
			}
			if (_tmp34_) {
				first_field = FALSE;
			}
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp39_ = self->priv->reader;
		_tmp40_ = vala_markup_reader_get_name (_tmp39_);
		_tmp41_ = _tmp40_;
		if (g_strcmp0 (_tmp41_, "field") == 0) {
			gboolean _tmp42_ = FALSE;
			ValaMarkupReader* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			gboolean _tmp46_;
			_tmp43_ = self->priv->reader;
			_tmp44_ = vala_markup_reader_get_attribute (_tmp43_, "name");
			_tmp45_ = _tmp44_;
			_tmp46_ = g_strcmp0 (_tmp45_, "priv") != 0;
			_g_free0 (_tmp45_);
			if (_tmp46_) {
				gboolean _tmp47_ = FALSE;
				gboolean _tmp48_;
				_tmp48_ = first_field;
				if (_tmp48_) {
					const gchar* _tmp49_;
					_tmp49_ = gtype_struct_for;
					_tmp47_ = _tmp49_ != NULL;
				} else {
					_tmp47_ = FALSE;
				}
				_tmp42_ = !_tmp47_;
			} else {
				_tmp42_ = FALSE;
			}
			if (_tmp42_) {
				vala_gir_parser_parse_field (self);
			} else {
				vala_gir_parser_skip_element (self);
			}
			first_field = FALSE;
		} else {
			ValaMarkupReader* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			_tmp50_ = self->priv->reader;
			_tmp51_ = vala_markup_reader_get_name (_tmp50_);
			_tmp52_ = _tmp51_;
			if (g_strcmp0 (_tmp52_, "constructor") == 0) {
				vala_gir_parser_parse_constructor (self);
			} else {
				ValaMarkupReader* _tmp53_;
				const gchar* _tmp54_;
				const gchar* _tmp55_;
				_tmp53_ = self->priv->reader;
				_tmp54_ = vala_markup_reader_get_name (_tmp53_);
				_tmp55_ = _tmp54_;
				if (g_strcmp0 (_tmp55_, "method") == 0) {
					vala_gir_parser_parse_method (self, "method");
				} else {
					ValaMarkupReader* _tmp56_;
					const gchar* _tmp57_;
					const gchar* _tmp58_;
					_tmp56_ = self->priv->reader;
					_tmp57_ = vala_markup_reader_get_name (_tmp56_);
					_tmp58_ = _tmp57_;
					if (g_strcmp0 (_tmp58_, "function") == 0) {
						vala_gir_parser_skip_element (self);
					} else {
						ValaMarkupReader* _tmp59_;
						const gchar* _tmp60_;
						const gchar* _tmp61_;
						_tmp59_ = self->priv->reader;
						_tmp60_ = vala_markup_reader_get_name (_tmp59_);
						_tmp61_ = _tmp60_;
						if (g_strcmp0 (_tmp61_, "union") == 0) {
							vala_gir_parser_parse_union (self);
						} else {
							ValaSourceReference* _tmp62_;
							ValaSourceReference* _tmp63_;
							ValaMarkupReader* _tmp64_;
							const gchar* _tmp65_;
							const gchar* _tmp66_;
							gchar* _tmp67_;
							gchar* _tmp68_;
							_tmp62_ = vala_gir_parser_get_current_src (self);
							_tmp63_ = _tmp62_;
							_tmp64_ = self->priv->reader;
							_tmp65_ = vala_markup_reader_get_name (_tmp64_);
							_tmp66_ = _tmp65_;
							_tmp67_ = g_strdup_printf ("unknown child element `%s' in `record'", _tmp66_);
							_tmp68_ = _tmp67_;
							vala_report_error (_tmp63_, _tmp68_);
							_g_free0 (_tmp68_);
							_vala_source_reference_unref0 (_tmp63_);
							vala_gir_parser_skip_element (self);
						}
					}
				}
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "record");
	_g_free0 (gtype_struct_for);
	_vala_code_node_unref0 (st);
}


static void vala_gir_parser_parse_class (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	ValaClass* cl = NULL;
	gchar* parent = NULL;
	ValaMarkupReader* _tmp2_;
	gchar* _tmp3_;
	ValaGirParserNode* _tmp4_;
	gboolean _tmp5_;
	ValaClass* _tmp28_;
	ValaClass* _tmp29_;
	ValaClass* _tmp30_;
	ValaClass* _tmp31_;
	ValaGirComment* _tmp32_;
	ValaGirComment* _tmp33_;
	gboolean first_field = FALSE;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "class");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	vala_gir_parser_push_node (self, _tmp1_, TRUE);
	_g_free0 (_tmp1_);
	_tmp2_ = self->priv->reader;
	_tmp3_ = vala_markup_reader_get_attribute (_tmp2_, "parent");
	parent = _tmp3_;
	_tmp4_ = self->priv->current;
	_tmp5_ = _tmp4_->new_symbol;
	if (_tmp5_) {
		ValaGirParserNode* _tmp6_;
		const gchar* _tmp7_;
		ValaGirParserNode* _tmp8_;
		ValaSourceReference* _tmp9_;
		ValaClass* _tmp10_;
		ValaClass* _tmp11_;
		ValaGirParserMetadata* _tmp12_;
		ValaMarkupReader* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		gboolean _tmp16_;
		const gchar* _tmp17_;
		ValaGirParserNode* _tmp22_;
		ValaClass* _tmp23_;
		ValaSymbol* _tmp24_;
		_tmp6_ = self->priv->current;
		_tmp7_ = _tmp6_->name;
		_tmp8_ = self->priv->current;
		_tmp9_ = _tmp8_->source_reference;
		_tmp10_ = vala_class_new (_tmp7_, _tmp9_, NULL);
		_vala_code_node_unref0 (cl);
		cl = _tmp10_;
		_tmp11_ = cl;
		_tmp12_ = self->priv->metadata;
		_tmp13_ = self->priv->reader;
		_tmp14_ = vala_markup_reader_get_attribute (_tmp13_, "abstract");
		_tmp15_ = _tmp14_;
		_tmp16_ = vala_gir_parser_metadata_get_bool (_tmp12_, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT, g_strcmp0 (_tmp15_, "1") == 0);
		vala_class_set_is_abstract (_tmp11_, _tmp16_);
		_g_free0 (_tmp15_);
		_tmp17_ = parent;
		if (_tmp17_ != NULL) {
			ValaClass* _tmp18_;
			const gchar* _tmp19_;
			ValaDataType* _tmp20_;
			ValaDataType* _tmp21_;
			_tmp18_ = cl;
			_tmp19_ = parent;
			_tmp20_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp19_, NULL, NULL, NULL);
			_tmp21_ = _tmp20_;
			vala_class_add_base_type (_tmp18_, _tmp21_);
			_vala_code_node_unref0 (_tmp21_);
		}
		_tmp22_ = self->priv->current;
		_tmp23_ = cl;
		_tmp24_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp23_);
		_vala_code_node_unref0 (_tmp22_->symbol);
		_tmp22_->symbol = _tmp24_;
	} else {
		ValaGirParserNode* _tmp25_;
		ValaSymbol* _tmp26_;
		ValaClass* _tmp27_;
		_tmp25_ = self->priv->current;
		_tmp26_ = _tmp25_->symbol;
		_tmp27_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, VALA_TYPE_CLASS, ValaClass));
		_vala_code_node_unref0 (cl);
		cl = _tmp27_;
	}
	_tmp28_ = cl;
	vala_gir_parser_set_type_id_ccode (self, (ValaSymbol*) _tmp28_);
	_tmp29_ = cl;
	vala_symbol_set_access ((ValaSymbol*) _tmp29_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp30_ = cl;
	vala_symbol_set_external ((ValaSymbol*) _tmp30_, TRUE);
	vala_gir_parser_next (self);
	_tmp31_ = cl;
	_tmp32_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp33_ = _tmp32_;
	vala_symbol_set_comment ((ValaSymbol*) _tmp31_, (ValaComment*) _tmp33_);
	_vala_comment_unref0 (_tmp33_);
	first_field = TRUE;
	while (TRUE) {
		ValaMarkupTokenType _tmp34_;
		gboolean _tmp35_;
		ValaMarkupReader* _tmp41_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		_tmp34_ = self->priv->current_token;
		if (!(_tmp34_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp35_ = vala_gir_parser_push_metadata (self);
		if (!_tmp35_) {
			gboolean _tmp36_ = FALSE;
			gboolean _tmp37_;
			_tmp37_ = first_field;
			if (_tmp37_) {
				ValaMarkupReader* _tmp38_;
				const gchar* _tmp39_;
				const gchar* _tmp40_;
				_tmp38_ = self->priv->reader;
				_tmp39_ = vala_markup_reader_get_name (_tmp38_);
				_tmp40_ = _tmp39_;
				_tmp36_ = g_strcmp0 (_tmp40_, "field") == 0;
			} else {
				_tmp36_ = FALSE;
			}
			if (_tmp36_) {
				first_field = FALSE;
			}
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp41_ = self->priv->reader;
		_tmp42_ = vala_markup_reader_get_name (_tmp41_);
		_tmp43_ = _tmp42_;
		if (g_strcmp0 (_tmp43_, "implements") == 0) {
			ValaClass* _tmp44_;
			ValaMarkupReader* _tmp45_;
			gchar* _tmp46_;
			gchar* _tmp47_;
			ValaDataType* _tmp48_;
			ValaDataType* _tmp49_;
			vala_gir_parser_start_element (self, "implements");
			_tmp44_ = cl;
			_tmp45_ = self->priv->reader;
			_tmp46_ = vala_markup_reader_get_attribute (_tmp45_, "name");
			_tmp47_ = _tmp46_;
			_tmp48_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp47_, NULL, NULL, NULL);
			_tmp49_ = _tmp48_;
			vala_class_add_base_type (_tmp44_, _tmp49_);
			_vala_code_node_unref0 (_tmp49_);
			_g_free0 (_tmp47_);
			vala_gir_parser_next (self);
			vala_gir_parser_end_element (self, "implements");
		} else {
			ValaMarkupReader* _tmp50_;
			const gchar* _tmp51_;
			const gchar* _tmp52_;
			_tmp50_ = self->priv->reader;
			_tmp51_ = vala_markup_reader_get_name (_tmp50_);
			_tmp52_ = _tmp51_;
			if (g_strcmp0 (_tmp52_, "constant") == 0) {
				vala_gir_parser_parse_constant (self);
			} else {
				ValaMarkupReader* _tmp53_;
				const gchar* _tmp54_;
				const gchar* _tmp55_;
				_tmp53_ = self->priv->reader;
				_tmp54_ = vala_markup_reader_get_name (_tmp53_);
				_tmp55_ = _tmp54_;
				if (g_strcmp0 (_tmp55_, "field") == 0) {
					gboolean _tmp56_ = FALSE;
					gboolean _tmp57_;
					_tmp57_ = first_field;
					if (_tmp57_) {
						const gchar* _tmp58_;
						_tmp58_ = parent;
						_tmp56_ = _tmp58_ != NULL;
					} else {
						_tmp56_ = FALSE;
					}
					if (_tmp56_) {
						vala_gir_parser_skip_element (self);
					} else {
						ValaMarkupReader* _tmp59_;
						gchar* _tmp60_;
						gchar* _tmp61_;
						gboolean _tmp62_;
						_tmp59_ = self->priv->reader;
						_tmp60_ = vala_markup_reader_get_attribute (_tmp59_, "name");
						_tmp61_ = _tmp60_;
						_tmp62_ = g_strcmp0 (_tmp61_, "priv") != 0;
						_g_free0 (_tmp61_);
						if (_tmp62_) {
							vala_gir_parser_parse_field (self);
						} else {
							vala_gir_parser_skip_element (self);
						}
					}
					first_field = FALSE;
				} else {
					ValaMarkupReader* _tmp63_;
					const gchar* _tmp64_;
					const gchar* _tmp65_;
					_tmp63_ = self->priv->reader;
					_tmp64_ = vala_markup_reader_get_name (_tmp63_);
					_tmp65_ = _tmp64_;
					if (g_strcmp0 (_tmp65_, "property") == 0) {
						ValaProperty* _tmp66_;
						ValaProperty* _tmp67_;
						_tmp66_ = vala_gir_parser_parse_property (self);
						_tmp67_ = _tmp66_;
						_vala_code_node_unref0 (_tmp67_);
					} else {
						ValaMarkupReader* _tmp68_;
						const gchar* _tmp69_;
						const gchar* _tmp70_;
						_tmp68_ = self->priv->reader;
						_tmp69_ = vala_markup_reader_get_name (_tmp68_);
						_tmp70_ = _tmp69_;
						if (g_strcmp0 (_tmp70_, "constructor") == 0) {
							vala_gir_parser_parse_constructor (self);
						} else {
							ValaMarkupReader* _tmp71_;
							const gchar* _tmp72_;
							const gchar* _tmp73_;
							_tmp71_ = self->priv->reader;
							_tmp72_ = vala_markup_reader_get_name (_tmp71_);
							_tmp73_ = _tmp72_;
							if (g_strcmp0 (_tmp73_, "function") == 0) {
								vala_gir_parser_parse_method (self, "function");
							} else {
								ValaMarkupReader* _tmp74_;
								const gchar* _tmp75_;
								const gchar* _tmp76_;
								_tmp74_ = self->priv->reader;
								_tmp75_ = vala_markup_reader_get_name (_tmp74_);
								_tmp76_ = _tmp75_;
								if (g_strcmp0 (_tmp76_, "method") == 0) {
									vala_gir_parser_parse_method (self, "method");
								} else {
									ValaMarkupReader* _tmp77_;
									const gchar* _tmp78_;
									const gchar* _tmp79_;
									_tmp77_ = self->priv->reader;
									_tmp78_ = vala_markup_reader_get_name (_tmp77_);
									_tmp79_ = _tmp78_;
									if (g_strcmp0 (_tmp79_, "virtual-method") == 0) {
										vala_gir_parser_parse_method (self, "virtual-method");
									} else {
										ValaMarkupReader* _tmp80_;
										const gchar* _tmp81_;
										const gchar* _tmp82_;
										_tmp80_ = self->priv->reader;
										_tmp81_ = vala_markup_reader_get_name (_tmp80_);
										_tmp82_ = _tmp81_;
										if (g_strcmp0 (_tmp82_, "union") == 0) {
											vala_gir_parser_parse_union (self);
										} else {
											ValaMarkupReader* _tmp83_;
											const gchar* _tmp84_;
											const gchar* _tmp85_;
											_tmp83_ = self->priv->reader;
											_tmp84_ = vala_markup_reader_get_name (_tmp83_);
											_tmp85_ = _tmp84_;
											if (g_strcmp0 (_tmp85_, "glib:signal") == 0) {
												vala_gir_parser_parse_signal (self);
											} else {
												ValaSourceReference* _tmp86_;
												ValaSourceReference* _tmp87_;
												ValaMarkupReader* _tmp88_;
												const gchar* _tmp89_;
												const gchar* _tmp90_;
												gchar* _tmp91_;
												gchar* _tmp92_;
												_tmp86_ = vala_gir_parser_get_current_src (self);
												_tmp87_ = _tmp86_;
												_tmp88_ = self->priv->reader;
												_tmp89_ = vala_markup_reader_get_name (_tmp88_);
												_tmp90_ = _tmp89_;
												_tmp91_ = g_strdup_printf ("unknown child element `%s' in `class'", _tmp90_);
												_tmp92_ = _tmp91_;
												vala_report_error (_tmp87_, _tmp92_);
												_g_free0 (_tmp92_);
												_vala_source_reference_unref0 (_tmp87_);
												vala_gir_parser_skip_element (self);
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "class");
	_g_free0 (parent);
	_vala_code_node_unref0 (cl);
}


static void vala_gir_parser_parse_interface (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	ValaInterface* iface = NULL;
	ValaGirParserNode* _tmp2_;
	gboolean _tmp3_;
	ValaInterface* _tmp15_;
	ValaInterface* _tmp16_;
	ValaInterface* _tmp17_;
	ValaInterface* _tmp18_;
	ValaGirComment* _tmp19_;
	ValaGirComment* _tmp20_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "interface");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	vala_gir_parser_push_node (self, _tmp1_, TRUE);
	_g_free0 (_tmp1_);
	_tmp2_ = self->priv->current;
	_tmp3_ = _tmp2_->new_symbol;
	if (_tmp3_) {
		ValaGirParserNode* _tmp4_;
		const gchar* _tmp5_;
		ValaGirParserNode* _tmp6_;
		ValaSourceReference* _tmp7_;
		ValaInterface* _tmp8_;
		ValaGirParserNode* _tmp9_;
		ValaInterface* _tmp10_;
		ValaSymbol* _tmp11_;
		_tmp4_ = self->priv->current;
		_tmp5_ = _tmp4_->name;
		_tmp6_ = self->priv->current;
		_tmp7_ = _tmp6_->source_reference;
		_tmp8_ = vala_interface_new (_tmp5_, _tmp7_, NULL);
		_vala_code_node_unref0 (iface);
		iface = _tmp8_;
		_tmp9_ = self->priv->current;
		_tmp10_ = iface;
		_tmp11_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp10_);
		_vala_code_node_unref0 (_tmp9_->symbol);
		_tmp9_->symbol = _tmp11_;
	} else {
		ValaGirParserNode* _tmp12_;
		ValaSymbol* _tmp13_;
		ValaInterface* _tmp14_;
		_tmp12_ = self->priv->current;
		_tmp13_ = _tmp12_->symbol;
		_tmp14_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALA_TYPE_INTERFACE, ValaInterface));
		_vala_code_node_unref0 (iface);
		iface = _tmp14_;
	}
	_tmp15_ = iface;
	vala_gir_parser_set_type_id_ccode (self, (ValaSymbol*) _tmp15_);
	_tmp16_ = iface;
	vala_symbol_set_access ((ValaSymbol*) _tmp16_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp17_ = iface;
	vala_symbol_set_external ((ValaSymbol*) _tmp17_, TRUE);
	vala_gir_parser_next (self);
	_tmp18_ = iface;
	_tmp19_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp20_ = _tmp19_;
	vala_symbol_set_comment ((ValaSymbol*) _tmp18_, (ValaComment*) _tmp20_);
	_vala_comment_unref0 (_tmp20_);
	while (TRUE) {
		ValaMarkupTokenType _tmp21_;
		gboolean _tmp22_;
		ValaMarkupReader* _tmp23_;
		const gchar* _tmp24_;
		const gchar* _tmp25_;
		_tmp21_ = self->priv->current_token;
		if (!(_tmp21_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp22_ = vala_gir_parser_push_metadata (self);
		if (!_tmp22_) {
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp23_ = self->priv->reader;
		_tmp24_ = vala_markup_reader_get_name (_tmp23_);
		_tmp25_ = _tmp24_;
		if (g_strcmp0 (_tmp25_, "prerequisite") == 0) {
			ValaInterface* _tmp26_;
			ValaMarkupReader* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			ValaDataType* _tmp30_;
			ValaDataType* _tmp31_;
			vala_gir_parser_start_element (self, "prerequisite");
			_tmp26_ = iface;
			_tmp27_ = self->priv->reader;
			_tmp28_ = vala_markup_reader_get_attribute (_tmp27_, "name");
			_tmp29_ = _tmp28_;
			_tmp30_ = vala_gir_parser_parse_type_from_gir_name (self, _tmp29_, NULL, NULL, NULL);
			_tmp31_ = _tmp30_;
			vala_interface_add_prerequisite (_tmp26_, _tmp31_);
			_vala_code_node_unref0 (_tmp31_);
			_g_free0 (_tmp29_);
			vala_gir_parser_next (self);
			vala_gir_parser_end_element (self, "prerequisite");
		} else {
			ValaMarkupReader* _tmp32_;
			const gchar* _tmp33_;
			const gchar* _tmp34_;
			_tmp32_ = self->priv->reader;
			_tmp33_ = vala_markup_reader_get_name (_tmp32_);
			_tmp34_ = _tmp33_;
			if (g_strcmp0 (_tmp34_, "field") == 0) {
				vala_gir_parser_parse_field (self);
			} else {
				ValaMarkupReader* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				_tmp35_ = self->priv->reader;
				_tmp36_ = vala_markup_reader_get_name (_tmp35_);
				_tmp37_ = _tmp36_;
				if (g_strcmp0 (_tmp37_, "property") == 0) {
					ValaProperty* _tmp38_;
					ValaProperty* _tmp39_;
					_tmp38_ = vala_gir_parser_parse_property (self);
					_tmp39_ = _tmp38_;
					_vala_code_node_unref0 (_tmp39_);
				} else {
					ValaMarkupReader* _tmp40_;
					const gchar* _tmp41_;
					const gchar* _tmp42_;
					_tmp40_ = self->priv->reader;
					_tmp41_ = vala_markup_reader_get_name (_tmp40_);
					_tmp42_ = _tmp41_;
					if (g_strcmp0 (_tmp42_, "virtual-method") == 0) {
						vala_gir_parser_parse_method (self, "virtual-method");
					} else {
						ValaMarkupReader* _tmp43_;
						const gchar* _tmp44_;
						const gchar* _tmp45_;
						_tmp43_ = self->priv->reader;
						_tmp44_ = vala_markup_reader_get_name (_tmp43_);
						_tmp45_ = _tmp44_;
						if (g_strcmp0 (_tmp45_, "function") == 0) {
							vala_gir_parser_parse_method (self, "function");
						} else {
							ValaMarkupReader* _tmp46_;
							const gchar* _tmp47_;
							const gchar* _tmp48_;
							_tmp46_ = self->priv->reader;
							_tmp47_ = vala_markup_reader_get_name (_tmp46_);
							_tmp48_ = _tmp47_;
							if (g_strcmp0 (_tmp48_, "method") == 0) {
								vala_gir_parser_parse_method (self, "method");
							} else {
								ValaMarkupReader* _tmp49_;
								const gchar* _tmp50_;
								const gchar* _tmp51_;
								_tmp49_ = self->priv->reader;
								_tmp50_ = vala_markup_reader_get_name (_tmp49_);
								_tmp51_ = _tmp50_;
								if (g_strcmp0 (_tmp51_, "glib:signal") == 0) {
									vala_gir_parser_parse_signal (self);
								} else {
									ValaSourceReference* _tmp52_;
									ValaSourceReference* _tmp53_;
									ValaMarkupReader* _tmp54_;
									const gchar* _tmp55_;
									const gchar* _tmp56_;
									gchar* _tmp57_;
									gchar* _tmp58_;
									_tmp52_ = vala_gir_parser_get_current_src (self);
									_tmp53_ = _tmp52_;
									_tmp54_ = self->priv->reader;
									_tmp55_ = vala_markup_reader_get_name (_tmp54_);
									_tmp56_ = _tmp55_;
									_tmp57_ = g_strdup_printf ("unknown child element `%s' in `interface'", _tmp56_);
									_tmp58_ = _tmp57_;
									vala_report_error (_tmp53_, _tmp58_);
									_g_free0 (_tmp58_);
									_vala_source_reference_unref0 (_tmp53_);
									vala_gir_parser_skip_element (self);
								}
							}
						}
					}
				}
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "interface");
	_vala_code_node_unref0 (iface);
}


static void vala_gir_parser_parse_field (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* nullable = NULL;
	ValaMarkupReader* _tmp2_;
	gchar* _tmp3_;
	gchar* allow_none = NULL;
	ValaMarkupReader* _tmp4_;
	gchar* _tmp5_;
	ValaGirComment* comment = NULL;
	ValaGirComment* _tmp6_;
	gboolean no_array_length = FALSE;
	gboolean array_null_terminated = FALSE;
	gint array_length_idx = 0;
	ValaDataType* type = NULL;
	gint _tmp7_ = 0;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	ValaDataType* _tmp10_;
	ValaDataType* _tmp11_;
	ValaDataType* _tmp12_;
	gchar* name = NULL;
	ValaGirParserNode* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* cname = NULL;
	ValaGirParserNode* _tmp16_;
	ValaMap* _tmp17_;
	gpointer _tmp18_;
	ValaField* field = NULL;
	const gchar* _tmp19_;
	ValaDataType* _tmp20_;
	ValaGirParserNode* _tmp21_;
	ValaSourceReference* _tmp22_;
	ValaField* _tmp23_;
	ValaField* _tmp24_;
	ValaField* _tmp25_;
	ValaGirComment* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	ValaDataType* _tmp31_;
	gboolean _tmp44_ = FALSE;
	const gchar* _tmp45_;
	ValaGirParserNode* _tmp48_;
	ValaField* _tmp49_;
	ValaSymbol* _tmp50_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "field");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	vala_gir_parser_push_node (self, _tmp1_, FALSE);
	_g_free0 (_tmp1_);
	_tmp2_ = self->priv->reader;
	_tmp3_ = vala_markup_reader_get_attribute (_tmp2_, "nullable");
	nullable = _tmp3_;
	_tmp4_ = self->priv->reader;
	_tmp5_ = vala_markup_reader_get_attribute (_tmp4_, "allow-none");
	allow_none = _tmp5_;
	vala_gir_parser_next (self);
	_tmp6_ = vala_gir_parser_parse_symbol_doc (self);
	comment = _tmp6_;
	_tmp10_ = vala_gir_parser_parse_type (self, NULL, &_tmp7_, TRUE, &_tmp8_, &_tmp9_);
	array_length_idx = _tmp7_;
	no_array_length = _tmp8_;
	array_null_terminated = _tmp9_;
	type = _tmp10_;
	_tmp11_ = type;
	_tmp12_ = vala_gir_parser_element_get_type (self, _tmp11_, TRUE, &no_array_length, &array_null_terminated, NULL);
	_vala_code_node_unref0 (type);
	type = _tmp12_;
	_tmp13_ = self->priv->current;
	_tmp14_ = _tmp13_->name;
	_tmp15_ = g_strdup (_tmp14_);
	name = _tmp15_;
	_tmp16_ = self->priv->current;
	_tmp17_ = _tmp16_->girdata;
	_tmp18_ = vala_map_get (_tmp17_, "name");
	cname = (gchar*) _tmp18_;
	_tmp19_ = name;
	_tmp20_ = type;
	_tmp21_ = self->priv->current;
	_tmp22_ = _tmp21_->source_reference;
	_tmp23_ = vala_field_new (_tmp19_, _tmp20_, NULL, _tmp22_, NULL);
	field = _tmp23_;
	_tmp24_ = field;
	vala_symbol_set_access ((ValaSymbol*) _tmp24_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp25_ = field;
	_tmp26_ = comment;
	vala_symbol_set_comment ((ValaSymbol*) _tmp25_, (ValaComment*) _tmp26_);
	_tmp27_ = name;
	_tmp28_ = cname;
	if (g_strcmp0 (_tmp27_, _tmp28_) != 0) {
		ValaField* _tmp29_;
		const gchar* _tmp30_;
		_tmp29_ = field;
		_tmp30_ = cname;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp29_, "CCode", "cname", _tmp30_, NULL);
	}
	_tmp31_ = type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp31_, VALA_TYPE_ARRAY_TYPE)) {
		gboolean _tmp32_ = FALSE;
		gboolean _tmp33_;
		gboolean _tmp37_ = FALSE;
		gboolean _tmp38_;
		gboolean _tmp42_;
		_tmp33_ = no_array_length;
		if (!_tmp33_) {
			gint _tmp34_;
			_tmp34_ = array_length_idx;
			_tmp32_ = _tmp34_ > -1;
		} else {
			_tmp32_ = FALSE;
		}
		if (_tmp32_) {
			ValaGirParserNode* _tmp35_;
			gint _tmp36_;
			_tmp35_ = self->priv->current;
			_tmp36_ = array_length_idx;
			_tmp35_->array_length_idx = _tmp36_;
		}
		_tmp38_ = no_array_length;
		if (_tmp38_) {
			_tmp37_ = TRUE;
		} else {
			gboolean _tmp39_;
			_tmp39_ = array_null_terminated;
			_tmp37_ = _tmp39_;
		}
		if (_tmp37_) {
			ValaField* _tmp40_;
			gboolean _tmp41_;
			_tmp40_ = field;
			_tmp41_ = no_array_length;
			vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp40_, "CCode", "array_length", !_tmp41_, NULL);
		}
		_tmp42_ = array_null_terminated;
		if (_tmp42_) {
			ValaField* _tmp43_;
			_tmp43_ = field;
			vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp43_, "CCode", "array_null_terminated", TRUE, NULL);
		}
	}
	_tmp45_ = nullable;
	if (g_strcmp0 (_tmp45_, "1") == 0) {
		_tmp44_ = TRUE;
	} else {
		const gchar* _tmp46_;
		_tmp46_ = allow_none;
		_tmp44_ = g_strcmp0 (_tmp46_, "1") == 0;
	}
	if (_tmp44_) {
		ValaDataType* _tmp47_;
		_tmp47_ = type;
		vala_data_type_set_nullable (_tmp47_, TRUE);
	}
	_tmp48_ = self->priv->current;
	_tmp49_ = field;
	_tmp50_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp49_);
	_vala_code_node_unref0 (_tmp48_->symbol);
	_tmp48_->symbol = _tmp50_;
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "field");
	_vala_code_node_unref0 (field);
	_g_free0 (cname);
	_g_free0 (name);
	_vala_code_node_unref0 (type);
	_vala_comment_unref0 (comment);
	_g_free0 (allow_none);
	_g_free0 (nullable);
}


static ValaProperty* vala_gir_parser_parse_property (ValaGirParser* self) {
	ValaProperty* result = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean is_abstract = FALSE;
	ValaGirParserMetadata* _tmp4_;
	ValaGirParserNode* _tmp5_;
	ValaGirParserNode* _tmp6_;
	ValaSymbol* _tmp7_;
	gboolean _tmp8_;
	gchar* transfer = NULL;
	ValaMarkupReader* _tmp9_;
	gchar* _tmp10_;
	ValaGirComment* comment = NULL;
	ValaGirComment* _tmp11_;
	gboolean no_array_length = FALSE;
	gboolean array_null_terminated = FALSE;
	ValaDataType* type = NULL;
	const gchar* _tmp12_;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	ValaDataType* _tmp15_;
	ValaDataType* _tmp16_;
	ValaDataType* _tmp17_;
	ValaProperty* prop = NULL;
	ValaGirParserNode* _tmp18_;
	const gchar* _tmp19_;
	ValaDataType* _tmp20_;
	ValaGirParserNode* _tmp21_;
	ValaSourceReference* _tmp22_;
	ValaProperty* _tmp23_;
	ValaProperty* _tmp24_;
	ValaGirComment* _tmp25_;
	ValaProperty* _tmp26_;
	ValaProperty* _tmp27_;
	ValaProperty* _tmp28_;
	gboolean _tmp29_;
	gboolean _tmp30_ = FALSE;
	gboolean _tmp31_;
	gboolean _tmp35_;
	ValaGirParserNode* _tmp37_;
	ValaProperty* _tmp38_;
	ValaSymbol* _tmp39_;
	g_return_val_if_fail (self != NULL, NULL);
	vala_gir_parser_start_element (self, "property");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_replace (_tmp1_, "-", "_");
	_tmp3_ = _tmp2_;
	vala_gir_parser_push_node (self, _tmp3_, FALSE);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	_tmp4_ = self->priv->metadata;
	_tmp5_ = self->priv->current;
	_tmp6_ = _tmp5_->parent;
	_tmp7_ = _tmp6_->symbol;
	_tmp8_ = vala_gir_parser_metadata_get_bool (_tmp4_, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT, G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, VALA_TYPE_INTERFACE));
	is_abstract = _tmp8_;
	_tmp9_ = self->priv->reader;
	_tmp10_ = vala_markup_reader_get_attribute (_tmp9_, "transfer-ownership");
	transfer = _tmp10_;
	vala_gir_parser_next (self);
	_tmp11_ = vala_gir_parser_parse_symbol_doc (self);
	comment = _tmp11_;
	_tmp12_ = transfer;
	_tmp15_ = vala_gir_parser_parse_type (self, NULL, NULL, g_strcmp0 (_tmp12_, "container") != 0, &_tmp13_, &_tmp14_);
	no_array_length = _tmp13_;
	array_null_terminated = _tmp14_;
	type = _tmp15_;
	_tmp16_ = type;
	_tmp17_ = vala_gir_parser_element_get_type (self, _tmp16_, TRUE, &no_array_length, &array_null_terminated, NULL);
	_vala_code_node_unref0 (type);
	type = _tmp17_;
	_tmp18_ = self->priv->current;
	_tmp19_ = _tmp18_->name;
	_tmp20_ = type;
	_tmp21_ = self->priv->current;
	_tmp22_ = _tmp21_->source_reference;
	_tmp23_ = vala_property_new (_tmp19_, _tmp20_, NULL, NULL, _tmp22_, NULL);
	prop = _tmp23_;
	_tmp24_ = prop;
	_tmp25_ = comment;
	vala_symbol_set_comment ((ValaSymbol*) _tmp24_, (ValaComment*) _tmp25_);
	_tmp26_ = prop;
	vala_symbol_set_access ((ValaSymbol*) _tmp26_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp27_ = prop;
	vala_symbol_set_external ((ValaSymbol*) _tmp27_, TRUE);
	_tmp28_ = prop;
	_tmp29_ = is_abstract;
	vala_property_set_is_abstract (_tmp28_, _tmp29_);
	_tmp31_ = no_array_length;
	if (_tmp31_) {
		_tmp30_ = TRUE;
	} else {
		gboolean _tmp32_;
		_tmp32_ = array_null_terminated;
		_tmp30_ = _tmp32_;
	}
	if (_tmp30_) {
		ValaProperty* _tmp33_;
		gboolean _tmp34_;
		_tmp33_ = prop;
		_tmp34_ = no_array_length;
		vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp33_, "CCode", "array_length", !_tmp34_, NULL);
	}
	_tmp35_ = array_null_terminated;
	if (_tmp35_) {
		ValaProperty* _tmp36_;
		_tmp36_ = prop;
		vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp36_, "CCode", "array_null_terminated", TRUE, NULL);
	}
	_tmp37_ = self->priv->current;
	_tmp38_ = prop;
	_tmp39_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp38_);
	_vala_code_node_unref0 (_tmp37_->symbol);
	_tmp37_->symbol = _tmp39_;
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "property");
	result = prop;
	_vala_code_node_unref0 (type);
	_vala_comment_unref0 (comment);
	_g_free0 (transfer);
	return result;
}


static void vala_gir_parser_parse_callback (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	vala_gir_parser_parse_function (self, "callback");
}


static void vala_gir_parser_parse_constructor (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	vala_gir_parser_parse_function (self, "constructor");
}


static void vala_gir_parser_parse_function (ValaGirParser* self, const gchar* element_name) {
	const gchar* _tmp0_;
	ValaMarkupReader* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* symbol_type = NULL;
	ValaGirParserMetadata* _tmp8_;
	gboolean _tmp9_;
	gchar* name = NULL;
	ValaGirParserNode* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* throws_string = NULL;
	ValaMarkupReader* _tmp17_;
	gchar* _tmp18_;
	gchar* invoker = NULL;
	ValaMarkupReader* _tmp19_;
	gchar* _tmp20_;
	ValaGirComment* comment = NULL;
	ValaGirComment* _tmp21_;
	ValaDataType* return_type = NULL;
	gchar* return_ctype = NULL;
	gint return_array_length_idx = 0;
	gboolean return_no_array_length = FALSE;
	gboolean return_array_null_terminated = FALSE;
	gboolean _tmp22_ = FALSE;
	ValaMarkupTokenType _tmp23_;
	ValaSymbol* s = NULL;
	const gchar* _tmp41_;
	ValaSymbol* _tmp100_;
	ValaSymbol* _tmp101_;
	ValaGirComment* _tmp102_;
	ValaSymbol* _tmp103_;
	ValaSymbol* _tmp104_;
	ValaSymbol* _tmp118_;
	gboolean _tmp158_ = FALSE;
	ValaSymbol* _tmp159_;
	ValaGirParserMetadata* _tmp189_;
	ValaExpression* _tmp190_;
	ValaExpression* _tmp191_;
	gboolean _tmp192_;
	ValaSymbol* _tmp214_;
	gboolean _tmp226_ = FALSE;
	ValaDataType* _tmp227_;
	ValaGirParserNode* _tmp239_;
	gint _tmp240_;
	ValaGirParserNode* _tmp241_;
	ValaSymbol* _tmp242_;
	ValaSymbol* _tmp243_;
	ValaGirParserMetadata* _tmp244_;
	gboolean _tmp245_;
	ValaGirParserMetadata* _tmp250_;
	gboolean _tmp251_;
	gint instance_idx = 0;
	gboolean _tmp255_ = FALSE;
	const gchar* _tmp256_;
	ValaArrayList* parameters = NULL;
	GEqualFunc _tmp267_;
	ValaArrayList* _tmp268_;
	ValaGirParserNode* _tmp269_;
	GEqualFunc _tmp270_;
	ValaArrayList* _tmp271_;
	ValaGirParserNode* _tmp272_;
	GEqualFunc _tmp273_;
	ValaArrayList* _tmp274_;
	ValaGirParserNode* _tmp275_;
	GEqualFunc _tmp276_;
	ValaArrayList* _tmp277_;
	gboolean _tmp278_ = FALSE;
	ValaMarkupTokenType _tmp279_;
	ValaGirParserNode* _tmp384_;
	ValaArrayList* _tmp385_;
	ValaList* _tmp386_;
	const gchar* _tmp415_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element_name != NULL);
	_tmp0_ = element_name;
	vala_gir_parser_start_element (self, _tmp0_);
	_tmp1_ = self->priv->reader;
	_tmp2_ = vala_markup_reader_get_attribute (_tmp1_, "invoker");
	_tmp3_ = _tmp2_;
	_tmp4_ = vala_gir_parser_element_get_name (self, _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = string_replace (_tmp5_, "-", "_");
	_tmp7_ = _tmp6_;
	vala_gir_parser_push_node (self, _tmp7_, FALSE);
	_g_free0 (_tmp7_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp3_);
	_tmp8_ = self->priv->metadata;
	_tmp9_ = vala_gir_parser_metadata_has_argument (_tmp8_, VALA_GIR_PARSER_ARGUMENT_TYPE_SYMBOL_TYPE);
	if (_tmp9_) {
		ValaGirParserMetadata* _tmp10_;
		gchar* _tmp11_;
		_tmp10_ = self->priv->metadata;
		_tmp11_ = vala_gir_parser_metadata_get_string (_tmp10_, VALA_GIR_PARSER_ARGUMENT_TYPE_SYMBOL_TYPE);
		_g_free0 (symbol_type);
		symbol_type = _tmp11_;
	} else {
		const gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp12_ = element_name;
		_tmp13_ = g_strdup (_tmp12_);
		_g_free0 (symbol_type);
		symbol_type = _tmp13_;
	}
	_tmp14_ = self->priv->current;
	_tmp15_ = _tmp14_->name;
	_tmp16_ = g_strdup (_tmp15_);
	name = _tmp16_;
	_tmp17_ = self->priv->reader;
	_tmp18_ = vala_markup_reader_get_attribute (_tmp17_, "throws");
	throws_string = _tmp18_;
	_tmp19_ = self->priv->reader;
	_tmp20_ = vala_markup_reader_get_attribute (_tmp19_, "invoker");
	invoker = _tmp20_;
	vala_gir_parser_next (self);
	_tmp21_ = vala_gir_parser_parse_symbol_doc (self);
	comment = _tmp21_;
	return_ctype = NULL;
	return_array_length_idx = -1;
	return_no_array_length = FALSE;
	return_array_null_terminated = FALSE;
	_tmp23_ = self->priv->current_token;
	if (_tmp23_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
		ValaMarkupReader* _tmp24_;
		const gchar* _tmp25_;
		const gchar* _tmp26_;
		_tmp24_ = self->priv->reader;
		_tmp25_ = vala_markup_reader_get_name (_tmp24_);
		_tmp26_ = _tmp25_;
		_tmp22_ = g_strcmp0 (_tmp26_, "return-value") == 0;
	} else {
		_tmp22_ = FALSE;
	}
	if (_tmp22_) {
		ValaComment* return_comment = NULL;
		gchar* _tmp27_ = NULL;
		gint _tmp28_ = 0;
		gboolean _tmp29_ = FALSE;
		gboolean _tmp30_ = FALSE;
		ValaComment* _tmp31_ = NULL;
		ValaDataType* _tmp32_;
		ValaComment* _tmp33_;
		_tmp32_ = vala_gir_parser_parse_return_value (self, &_tmp27_, &_tmp28_, &_tmp29_, &_tmp30_, &_tmp31_);
		_g_free0 (return_ctype);
		return_ctype = _tmp27_;
		return_array_length_idx = _tmp28_;
		return_no_array_length = _tmp29_;
		return_array_null_terminated = _tmp30_;
		_vala_comment_unref0 (return_comment);
		return_comment = _tmp31_;
		_vala_code_node_unref0 (return_type);
		return_type = _tmp32_;
		_tmp33_ = return_comment;
		if (_tmp33_ != NULL) {
			ValaGirComment* _tmp34_;
			ValaGirComment* _tmp38_;
			ValaComment* _tmp39_;
			_tmp34_ = comment;
			if (_tmp34_ == NULL) {
				ValaGirParserNode* _tmp35_;
				ValaSourceReference* _tmp36_;
				ValaGirComment* _tmp37_;
				_tmp35_ = self->priv->current;
				_tmp36_ = _tmp35_->source_reference;
				_tmp37_ = vala_gir_comment_new (NULL, _tmp36_);
				_vala_comment_unref0 (comment);
				comment = _tmp37_;
			}
			_tmp38_ = comment;
			_tmp39_ = return_comment;
			vala_gir_comment_set_return_content (_tmp38_, _tmp39_);
		}
		_vala_comment_unref0 (return_comment);
	} else {
		ValaVoidType* _tmp40_;
		_tmp40_ = vala_void_type_new (NULL);
		_vala_code_node_unref0 (return_type);
		return_type = (ValaDataType*) _tmp40_;
	}
	_tmp41_ = symbol_type;
	if (g_strcmp0 (_tmp41_, "callback") == 0) {
		const gchar* _tmp42_;
		ValaDataType* _tmp43_;
		ValaGirParserNode* _tmp44_;
		ValaSourceReference* _tmp45_;
		ValaDelegate* _tmp46_;
		ValaSymbol* _tmp47_;
		_tmp42_ = name;
		_tmp43_ = return_type;
		_tmp44_ = self->priv->current;
		_tmp45_ = _tmp44_->source_reference;
		_tmp46_ = vala_delegate_new (_tmp42_, _tmp43_, _tmp45_, NULL);
		_vala_code_node_unref0 (s);
		s = (ValaSymbol*) _tmp46_;
		_tmp47_ = s;
		vala_delegate_set_has_target (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, VALA_TYPE_DELEGATE, ValaDelegate), FALSE);
	} else {
		const gchar* _tmp48_;
		_tmp48_ = symbol_type;
		if (g_strcmp0 (_tmp48_, "constructor") == 0) {
			const gchar* _tmp49_;
			ValaCreationMethod* m = NULL;
			const gchar* _tmp56_;
			ValaGirParserNode* _tmp57_;
			ValaSourceReference* _tmp58_;
			ValaCreationMethod* _tmp59_;
			ValaCreationMethod* _tmp60_;
			gboolean _tmp61_ = FALSE;
			const gchar* _tmp62_;
			gchar* parent_ctype = NULL;
			ValaGirParserNode* _tmp71_;
			ValaGirParserNode* _tmp72_;
			ValaSymbol* _tmp73_;
			gboolean _tmp77_ = FALSE;
			const gchar* _tmp78_;
			ValaCreationMethod* _tmp87_;
			ValaSymbol* _tmp88_;
			_tmp49_ = name;
			if (g_strcmp0 (_tmp49_, "new") == 0) {
				_g_free0 (name);
				name = NULL;
			} else {
				const gchar* _tmp50_;
				gboolean _tmp51_;
				_tmp50_ = name;
				_tmp51_ = g_str_has_prefix (_tmp50_, "new_");
				if (_tmp51_) {
					const gchar* _tmp52_;
					gint _tmp53_;
					gint _tmp54_;
					gchar* _tmp55_;
					_tmp52_ = name;
					_tmp53_ = strlen ("new_");
					_tmp54_ = _tmp53_;
					_tmp55_ = string_substring (_tmp52_, (glong) _tmp54_, (glong) -1);
					_g_free0 (name);
					name = _tmp55_;
				}
			}
			_tmp56_ = name;
			_tmp57_ = self->priv->current;
			_tmp58_ = _tmp57_->source_reference;
			_tmp59_ = vala_creation_method_new (NULL, _tmp56_, _tmp58_, NULL);
			m = _tmp59_;
			_tmp60_ = m;
			vala_method_set_has_construct_function ((ValaMethod*) _tmp60_, FALSE);
			_tmp62_ = name;
			if (_tmp62_ != NULL) {
				ValaGirParserNode* _tmp63_;
				const gchar* _tmp64_;
				gboolean _tmp65_;
				_tmp63_ = self->priv->current;
				_tmp64_ = _tmp63_->name;
				_tmp65_ = g_str_has_prefix (_tmp64_, "new_");
				_tmp61_ = !_tmp65_;
			} else {
				_tmp61_ = FALSE;
			}
			if (_tmp61_) {
				ValaCreationMethod* _tmp66_;
				ValaGirParserNode* _tmp67_;
				ValaMap* _tmp68_;
				gpointer _tmp69_;
				gchar* _tmp70_;
				_tmp66_ = m;
				_tmp67_ = self->priv->current;
				_tmp68_ = _tmp67_->girdata;
				_tmp69_ = vala_map_get (_tmp68_, "c:identifier");
				_tmp70_ = (gchar*) _tmp69_;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp66_, "CCode", "cname", _tmp70_, NULL);
				_g_free0 (_tmp70_);
			}
			parent_ctype = NULL;
			_tmp71_ = self->priv->current;
			_tmp72_ = _tmp71_->parent;
			_tmp73_ = _tmp72_->symbol;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp73_, VALA_TYPE_CLASS)) {
				ValaGirParserNode* _tmp74_;
				ValaGirParserNode* _tmp75_;
				gchar* _tmp76_;
				_tmp74_ = self->priv->current;
				_tmp75_ = _tmp74_->parent;
				_tmp76_ = vala_gir_parser_node_get_cname (_tmp75_);
				_g_free0 (parent_ctype);
				parent_ctype = _tmp76_;
			}
			_tmp78_ = return_ctype;
			if (_tmp78_ != NULL) {
				gboolean _tmp79_ = FALSE;
				const gchar* _tmp80_;
				_tmp80_ = parent_ctype;
				if (_tmp80_ == NULL) {
					_tmp79_ = TRUE;
				} else {
					const gchar* _tmp81_;
					const gchar* _tmp82_;
					gchar* _tmp83_;
					gchar* _tmp84_;
					_tmp81_ = return_ctype;
					_tmp82_ = parent_ctype;
					_tmp83_ = g_strconcat (_tmp82_, "*", NULL);
					_tmp84_ = _tmp83_;
					_tmp79_ = g_strcmp0 (_tmp81_, _tmp84_) != 0;
					_g_free0 (_tmp84_);
				}
				_tmp77_ = _tmp79_;
			} else {
				_tmp77_ = FALSE;
			}
			if (_tmp77_) {
				ValaCreationMethod* _tmp85_;
				const gchar* _tmp86_;
				_tmp85_ = m;
				_tmp86_ = return_ctype;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp85_, "CCode", "type", _tmp86_, NULL);
			}
			_tmp87_ = m;
			_tmp88_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp87_);
			_vala_code_node_unref0 (s);
			s = _tmp88_;
			_g_free0 (parent_ctype);
			_vala_code_node_unref0 (m);
		} else {
			const gchar* _tmp89_;
			_tmp89_ = symbol_type;
			if (g_strcmp0 (_tmp89_, "glib:signal") == 0) {
				const gchar* _tmp90_;
				ValaDataType* _tmp91_;
				ValaGirParserNode* _tmp92_;
				ValaSourceReference* _tmp93_;
				ValaSignal* _tmp94_;
				_tmp90_ = name;
				_tmp91_ = return_type;
				_tmp92_ = self->priv->current;
				_tmp93_ = _tmp92_->source_reference;
				_tmp94_ = vala_signal_new (_tmp90_, _tmp91_, _tmp93_, NULL);
				_vala_code_node_unref0 (s);
				s = (ValaSymbol*) _tmp94_;
			} else {
				const gchar* _tmp95_;
				ValaDataType* _tmp96_;
				ValaGirParserNode* _tmp97_;
				ValaSourceReference* _tmp98_;
				ValaMethod* _tmp99_;
				_tmp95_ = name;
				_tmp96_ = return_type;
				_tmp97_ = self->priv->current;
				_tmp98_ = _tmp97_->source_reference;
				_tmp99_ = vala_method_new (_tmp95_, _tmp96_, _tmp98_, NULL);
				_vala_code_node_unref0 (s);
				s = (ValaSymbol*) _tmp99_;
			}
		}
	}
	_tmp100_ = s;
	vala_symbol_set_access (_tmp100_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp101_ = s;
	_tmp102_ = comment;
	vala_symbol_set_comment (_tmp101_, (ValaComment*) _tmp102_);
	_tmp103_ = s;
	vala_symbol_set_external (_tmp103_, TRUE);
	_tmp104_ = s;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp104_, VALA_TYPE_SIGNAL)) {
		ValaGirParserNode* _tmp105_;
		ValaMap* _tmp106_;
		gpointer _tmp107_;
		gchar* _tmp108_;
		const gchar* _tmp109_;
		gchar* _tmp110_;
		gchar* _tmp111_;
		gboolean _tmp112_;
		_tmp105_ = self->priv->current;
		_tmp106_ = _tmp105_->girdata;
		_tmp107_ = vala_map_get (_tmp106_, "name");
		_tmp108_ = (gchar*) _tmp107_;
		_tmp109_ = name;
		_tmp110_ = string_replace (_tmp109_, "_", "-");
		_tmp111_ = _tmp110_;
		_tmp112_ = g_strcmp0 (_tmp108_, _tmp111_) != 0;
		_g_free0 (_tmp111_);
		_g_free0 (_tmp108_);
		if (_tmp112_) {
			ValaSymbol* _tmp113_;
			ValaGirParserNode* _tmp114_;
			ValaMap* _tmp115_;
			gpointer _tmp116_;
			gchar* _tmp117_;
			_tmp113_ = s;
			_tmp114_ = self->priv->current;
			_tmp115_ = _tmp114_->girdata;
			_tmp116_ = vala_map_get (_tmp115_, "name");
			_tmp117_ = (gchar*) _tmp116_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp113_, "CCode", "cname", _tmp117_, NULL);
			_g_free0 (_tmp117_);
		}
	}
	_tmp118_ = s;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp118_, VALA_TYPE_METHOD)) {
		ValaMethod* m = NULL;
		ValaSymbol* _tmp119_;
		ValaMethod* _tmp120_;
		gboolean _tmp121_ = FALSE;
		const gchar* _tmp122_;
		ValaGirParserMetadata* _tmp150_;
		gboolean _tmp151_;
		_tmp119_ = s;
		_tmp120_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp119_, VALA_TYPE_METHOD, ValaMethod));
		m = _tmp120_;
		_tmp122_ = symbol_type;
		if (g_strcmp0 (_tmp122_, "virtual-method") == 0) {
			_tmp121_ = TRUE;
		} else {
			const gchar* _tmp123_;
			_tmp123_ = symbol_type;
			_tmp121_ = g_strcmp0 (_tmp123_, "callback") == 0;
		}
		if (_tmp121_) {
			ValaGirParserNode* _tmp124_;
			ValaGirParserNode* _tmp125_;
			ValaSymbol* _tmp126_;
			gboolean _tmp129_ = FALSE;
			const gchar* _tmp130_;
			ValaGirParserNode* _tmp137_;
			ValaMap* _tmp138_;
			gpointer _tmp139_;
			gchar* _tmp140_;
			const gchar* _tmp141_;
			gboolean _tmp142_;
			_tmp124_ = self->priv->current;
			_tmp125_ = _tmp124_->parent;
			_tmp126_ = _tmp125_->symbol;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp126_, VALA_TYPE_INTERFACE)) {
				ValaMethod* _tmp127_;
				_tmp127_ = m;
				vala_method_set_is_abstract (_tmp127_, TRUE);
			} else {
				ValaMethod* _tmp128_;
				_tmp128_ = m;
				vala_method_set_is_virtual (_tmp128_, TRUE);
			}
			_tmp130_ = invoker;
			if (_tmp130_ == NULL) {
				ValaGirParserMetadata* _tmp131_;
				gboolean _tmp132_;
				_tmp131_ = self->priv->metadata;
				_tmp132_ = vala_gir_parser_metadata_has_argument (_tmp131_, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
				_tmp129_ = !_tmp132_;
			} else {
				_tmp129_ = FALSE;
			}
			if (_tmp129_) {
				ValaSymbol* _tmp133_;
				ValaSymbol* _tmp134_;
				ValaSourceReference* _tmp135_;
				ValaSourceReference* _tmp136_;
				_tmp133_ = s;
				_tmp134_ = s;
				_tmp135_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp134_);
				_tmp136_ = _tmp135_;
				vala_code_node_set_attribute ((ValaCodeNode*) _tmp133_, "NoWrapper", TRUE, _tmp136_);
			}
			_tmp137_ = self->priv->current;
			_tmp138_ = _tmp137_->girdata;
			_tmp139_ = vala_map_get (_tmp138_, "name");
			_tmp140_ = (gchar*) _tmp139_;
			_tmp141_ = name;
			_tmp142_ = g_strcmp0 (_tmp140_, _tmp141_) != 0;
			_g_free0 (_tmp140_);
			if (_tmp142_) {
				ValaMethod* _tmp143_;
				ValaGirParserNode* _tmp144_;
				ValaMap* _tmp145_;
				gpointer _tmp146_;
				gchar* _tmp147_;
				_tmp143_ = m;
				_tmp144_ = self->priv->current;
				_tmp145_ = _tmp144_->girdata;
				_tmp146_ = vala_map_get (_tmp145_, "name");
				_tmp147_ = (gchar*) _tmp146_;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp143_, "CCode", "vfunc_name", _tmp147_, NULL);
				_g_free0 (_tmp147_);
			}
		} else {
			const gchar* _tmp148_;
			_tmp148_ = symbol_type;
			if (g_strcmp0 (_tmp148_, "function") == 0) {
				ValaMethod* _tmp149_;
				_tmp149_ = m;
				vala_method_set_binding (_tmp149_, VALA_MEMBER_BINDING_STATIC);
			}
		}
		_tmp150_ = self->priv->metadata;
		_tmp151_ = vala_gir_parser_metadata_has_argument (_tmp150_, VALA_GIR_PARSER_ARGUMENT_TYPE_FLOATING);
		if (_tmp151_) {
			ValaMethod* _tmp152_;
			ValaGirParserMetadata* _tmp153_;
			gboolean _tmp154_;
			ValaMethod* _tmp155_;
			ValaDataType* _tmp156_;
			ValaDataType* _tmp157_;
			_tmp152_ = m;
			_tmp153_ = self->priv->metadata;
			_tmp154_ = vala_gir_parser_metadata_get_bool (_tmp153_, VALA_GIR_PARSER_ARGUMENT_TYPE_FLOATING, FALSE);
			vala_method_set_returns_floating_reference (_tmp152_, _tmp154_);
			_tmp155_ = m;
			_tmp156_ = vala_callable_get_return_type ((ValaCallable*) _tmp155_);
			_tmp157_ = _tmp156_;
			vala_data_type_set_value_owned (_tmp157_, TRUE);
		}
		_vala_code_node_unref0 (m);
	}
	_tmp159_ = s;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp159_, VALA_TYPE_METHOD)) {
		ValaSymbol* _tmp160_;
		_tmp160_ = s;
		_tmp158_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp160_, VALA_TYPE_CREATION_METHOD);
	} else {
		_tmp158_ = FALSE;
	}
	if (_tmp158_) {
		ValaMethod* method = NULL;
		ValaSymbol* _tmp161_;
		ValaMethod* _tmp162_;
		ValaGirParserMetadata* _tmp163_;
		gboolean _tmp164_;
		ValaGirParserMetadata* _tmp175_;
		gboolean _tmp176_;
		ValaGirParserMetadata* _tmp182_;
		gboolean _tmp183_;
		_tmp161_ = s;
		_tmp162_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp161_, VALA_TYPE_METHOD, ValaMethod));
		method = _tmp162_;
		_tmp163_ = self->priv->metadata;
		_tmp164_ = vala_gir_parser_metadata_has_argument (_tmp163_, VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL);
		if (_tmp164_) {
			ValaMethod* _tmp165_;
			ValaGirParserMetadata* _tmp166_;
			gboolean _tmp167_;
			ValaMethod* _tmp168_;
			_tmp165_ = method;
			_tmp166_ = self->priv->metadata;
			_tmp167_ = vala_gir_parser_metadata_get_bool (_tmp166_, VALA_GIR_PARSER_ARGUMENT_TYPE_VIRTUAL, FALSE);
			vala_method_set_is_virtual (_tmp165_, _tmp167_);
			_tmp168_ = method;
			vala_method_set_is_abstract (_tmp168_, FALSE);
		} else {
			ValaGirParserMetadata* _tmp169_;
			gboolean _tmp170_;
			_tmp169_ = self->priv->metadata;
			_tmp170_ = vala_gir_parser_metadata_has_argument (_tmp169_, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT);
			if (_tmp170_) {
				ValaMethod* _tmp171_;
				ValaGirParserMetadata* _tmp172_;
				gboolean _tmp173_;
				ValaMethod* _tmp174_;
				_tmp171_ = method;
				_tmp172_ = self->priv->metadata;
				_tmp173_ = vala_gir_parser_metadata_get_bool (_tmp172_, VALA_GIR_PARSER_ARGUMENT_TYPE_ABSTRACT, FALSE);
				vala_method_set_is_abstract (_tmp171_, _tmp173_);
				_tmp174_ = method;
				vala_method_set_is_virtual (_tmp174_, FALSE);
			}
		}
		_tmp175_ = self->priv->metadata;
		_tmp176_ = vala_gir_parser_metadata_has_argument (_tmp175_, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
		if (_tmp176_) {
			ValaMethod* _tmp177_;
			ValaGirParserMetadata* _tmp178_;
			gchar* _tmp179_;
			gchar* _tmp180_;
			ValaMethod* _tmp181_;
			_tmp177_ = method;
			_tmp178_ = self->priv->metadata;
			_tmp179_ = vala_gir_parser_metadata_get_string (_tmp178_, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
			_tmp180_ = _tmp179_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp177_, "CCode", "vfunc_name", _tmp180_, NULL);
			_g_free0 (_tmp180_);
			_tmp181_ = method;
			vala_method_set_is_virtual (_tmp181_, TRUE);
		}
		_tmp182_ = self->priv->metadata;
		_tmp183_ = vala_gir_parser_metadata_has_argument (_tmp182_, VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_VFUNC_NAME);
		if (_tmp183_) {
			ValaMethod* _tmp184_;
			ValaGirParserMetadata* _tmp185_;
			gchar* _tmp186_;
			gchar* _tmp187_;
			ValaMethod* _tmp188_;
			_tmp184_ = method;
			_tmp185_ = self->priv->metadata;
			_tmp186_ = vala_gir_parser_metadata_get_string (_tmp185_, VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_VFUNC_NAME);
			_tmp187_ = _tmp186_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp184_, "CCode", "finish_vfunc_name", _tmp187_, NULL);
			_g_free0 (_tmp187_);
			_tmp188_ = method;
			vala_method_set_is_virtual (_tmp188_, TRUE);
		}
		_vala_code_node_unref0 (method);
	}
	_tmp189_ = self->priv->metadata;
	_tmp190_ = vala_gir_parser_metadata_get_expression (_tmp189_, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
	_tmp191_ = _tmp190_;
	_tmp192_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp191_, VALA_TYPE_NULL_LITERAL);
	_vala_code_node_unref0 (_tmp191_);
	if (_tmp192_) {
		ValaGirParserMetadata* _tmp193_;
		gboolean _tmp194_;
		_tmp193_ = self->priv->metadata;
		_tmp194_ = vala_gir_parser_metadata_has_argument (_tmp193_, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
		if (_tmp194_) {
			gchar** error_types = NULL;
			ValaGirParserMetadata* _tmp195_;
			gchar* _tmp196_;
			gchar* _tmp197_;
			gchar** _tmp198_;
			gchar** _tmp199_;
			gchar** _tmp200_;
			gint _tmp200__length1;
			gint error_types_length1;
			gint _error_types_size_;
			gchar** _tmp201_;
			gint _tmp201__length1;
			_tmp195_ = self->priv->metadata;
			_tmp196_ = vala_gir_parser_metadata_get_string (_tmp195_, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
			_tmp197_ = _tmp196_;
			_tmp199_ = _tmp198_ = g_strsplit (_tmp197_, ",", 0);
			_tmp200_ = _tmp199_;
			_tmp200__length1 = _vala_array_length (_tmp198_);
			_g_free0 (_tmp197_);
			error_types = _tmp200_;
			error_types_length1 = _tmp200__length1;
			_error_types_size_ = error_types_length1;
			_tmp201_ = error_types;
			_tmp201__length1 = error_types_length1;
			{
				gchar** error_type_collection = NULL;
				gint error_type_collection_length1 = 0;
				gint _error_type_collection_size_ = 0;
				gint error_type_it = 0;
				error_type_collection = _tmp201_;
				error_type_collection_length1 = _tmp201__length1;
				for (error_type_it = 0; error_type_it < _tmp201__length1; error_type_it = error_type_it + 1) {
					gchar* _tmp202_;
					gchar* error_type = NULL;
					_tmp202_ = g_strdup (error_type_collection[error_type_it]);
					error_type = _tmp202_;
					{
						ValaSymbol* _tmp203_;
						const gchar* _tmp204_;
						ValaGirParserMetadata* _tmp205_;
						ValaSourceReference* _tmp206_;
						ValaSourceReference* _tmp207_;
						ValaDataType* _tmp208_;
						ValaDataType* _tmp209_;
						_tmp203_ = s;
						_tmp204_ = error_type;
						_tmp205_ = self->priv->metadata;
						_tmp206_ = vala_gir_parser_metadata_get_source_reference (_tmp205_, VALA_GIR_PARSER_ARGUMENT_TYPE_THROWS);
						_tmp207_ = _tmp206_;
						_tmp208_ = vala_gir_parser_parse_type_from_string (self, _tmp204_, TRUE, _tmp207_);
						_tmp209_ = _tmp208_;
						vala_code_node_add_error_type ((ValaCodeNode*) _tmp203_, _tmp209_);
						_vala_code_node_unref0 (_tmp209_);
						_vala_source_reference_unref0 (_tmp207_);
						_g_free0 (error_type);
					}
				}
			}
			error_types = (_vala_array_free (error_types, error_types_length1, (GDestroyNotify) g_free), NULL);
		} else {
			const gchar* _tmp210_;
			_tmp210_ = throws_string;
			if (g_strcmp0 (_tmp210_, "1") == 0) {
				ValaSymbol* _tmp211_;
				ValaErrorType* _tmp212_;
				ValaErrorType* _tmp213_;
				_tmp211_ = s;
				_tmp212_ = vala_error_type_new (NULL, NULL, NULL);
				_tmp213_ = _tmp212_;
				vala_code_node_add_error_type ((ValaCodeNode*) _tmp211_, (ValaDataType*) _tmp213_);
				_vala_code_node_unref0 (_tmp213_);
			}
		}
	}
	_tmp214_ = s;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp214_, VALA_TYPE_METHOD)) {
		ValaMethod* m = NULL;
		ValaSymbol* _tmp215_;
		ValaMethod* _tmp216_;
		ValaMethod* _tmp217_;
		ValaGirParserMetadata* _tmp218_;
		gboolean _tmp219_;
		ValaGirParserMetadata* _tmp220_;
		gboolean _tmp221_;
		_tmp215_ = s;
		_tmp216_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp215_, VALA_TYPE_METHOD, ValaMethod));
		m = _tmp216_;
		_tmp217_ = m;
		_tmp218_ = self->priv->metadata;
		_tmp219_ = vala_gir_parser_metadata_get_bool (_tmp218_, VALA_GIR_PARSER_ARGUMENT_TYPE_PRINTF_FORMAT, FALSE);
		vala_code_node_set_attribute ((ValaCodeNode*) _tmp217_, "PrintfFormat", _tmp219_, NULL);
		_tmp220_ = self->priv->metadata;
		_tmp221_ = vala_gir_parser_metadata_has_argument (_tmp220_, VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL);
		if (_tmp221_) {
			ValaMethod* _tmp222_;
			ValaGirParserMetadata* _tmp223_;
			gchar* _tmp224_;
			gchar* _tmp225_;
			_tmp222_ = m;
			_tmp223_ = self->priv->metadata;
			_tmp224_ = vala_gir_parser_metadata_get_string (_tmp223_, VALA_GIR_PARSER_ARGUMENT_TYPE_SENTINEL);
			_tmp225_ = _tmp224_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp222_, "CCode", "sentinel", _tmp225_, NULL);
			_g_free0 (_tmp225_);
		}
		_vala_code_node_unref0 (m);
	}
	_tmp227_ = return_type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp227_, VALA_TYPE_ARRAY_TYPE)) {
		ValaGirParserMetadata* _tmp228_;
		gboolean _tmp229_;
		_tmp228_ = self->priv->metadata;
		_tmp229_ = vala_gir_parser_metadata_has_argument (_tmp228_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
		_tmp226_ = _tmp229_;
	} else {
		_tmp226_ = FALSE;
	}
	if (_tmp226_) {
		ValaGirParserMetadata* _tmp230_;
		gint _tmp231_;
		_tmp230_ = self->priv->metadata;
		_tmp231_ = vala_gir_parser_metadata_get_integer (_tmp230_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_IDX);
		return_array_length_idx = _tmp231_;
	} else {
		gboolean _tmp232_ = FALSE;
		gboolean _tmp233_;
		gboolean _tmp237_;
		_tmp233_ = return_no_array_length;
		if (_tmp233_) {
			_tmp232_ = TRUE;
		} else {
			gboolean _tmp234_;
			_tmp234_ = return_array_null_terminated;
			_tmp232_ = _tmp234_;
		}
		if (_tmp232_) {
			ValaSymbol* _tmp235_;
			gboolean _tmp236_;
			_tmp235_ = s;
			_tmp236_ = return_no_array_length;
			vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp235_, "CCode", "array_length", !_tmp236_, NULL);
		}
		_tmp237_ = return_array_null_terminated;
		if (_tmp237_) {
			ValaSymbol* _tmp238_;
			_tmp238_ = s;
			vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp238_, "CCode", "array_null_terminated", TRUE, NULL);
		}
	}
	_tmp239_ = self->priv->current;
	_tmp240_ = return_array_length_idx;
	_tmp239_->return_array_length_idx = _tmp240_;
	_tmp241_ = self->priv->current;
	_tmp242_ = s;
	_tmp243_ = _vala_code_node_ref0 (_tmp242_);
	_vala_code_node_unref0 (_tmp241_->symbol);
	_tmp241_->symbol = _tmp243_;
	_tmp244_ = self->priv->metadata;
	_tmp245_ = vala_gir_parser_metadata_has_argument (_tmp244_, VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_NAME);
	if (_tmp245_) {
		ValaSymbol* _tmp246_;
		ValaGirParserMetadata* _tmp247_;
		gchar* _tmp248_;
		gchar* _tmp249_;
		_tmp246_ = s;
		_tmp247_ = self->priv->metadata;
		_tmp248_ = vala_gir_parser_metadata_get_string (_tmp247_, VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_NAME);
		_tmp249_ = _tmp248_;
		vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp246_, "CCode", "finish_name", _tmp249_, NULL);
		_g_free0 (_tmp249_);
	}
	_tmp250_ = self->priv->metadata;
	_tmp251_ = vala_gir_parser_metadata_has_argument (_tmp250_, VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_INSTANCE);
	if (_tmp251_) {
		ValaSymbol* _tmp252_;
		ValaGirParserMetadata* _tmp253_;
		gboolean _tmp254_;
		_tmp252_ = s;
		_tmp253_ = self->priv->metadata;
		_tmp254_ = vala_gir_parser_metadata_get_bool (_tmp253_, VALA_GIR_PARSER_ARGUMENT_TYPE_FINISH_INSTANCE, FALSE);
		vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp252_, "CCode", "finish_instance", _tmp254_, NULL);
	}
	instance_idx = -2;
	_tmp256_ = element_name;
	if (g_strcmp0 (_tmp256_, "function") == 0) {
		const gchar* _tmp257_;
		_tmp257_ = symbol_type;
		_tmp255_ = g_strcmp0 (_tmp257_, "method") == 0;
	} else {
		_tmp255_ = FALSE;
	}
	if (_tmp255_) {
		ValaGirParserMetadata* _tmp258_;
		gboolean _tmp259_;
		_tmp258_ = self->priv->metadata;
		_tmp259_ = vala_gir_parser_metadata_has_argument (_tmp258_, VALA_GIR_PARSER_ARGUMENT_TYPE_INSTANCE_IDX);
		if (_tmp259_) {
			ValaGirParserMetadata* _tmp260_;
			gint _tmp261_;
			gint _tmp262_;
			_tmp260_ = self->priv->metadata;
			_tmp261_ = vala_gir_parser_metadata_get_integer (_tmp260_, VALA_GIR_PARSER_ARGUMENT_TYPE_INSTANCE_IDX);
			instance_idx = _tmp261_;
			_tmp262_ = instance_idx;
			if (_tmp262_ != 0) {
				ValaSymbol* _tmp263_;
				gint _tmp264_;
				_tmp263_ = s;
				_tmp264_ = instance_idx;
				vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp263_, "CCode", "instance_pos", _tmp264_ + 0.5, NULL);
			}
		} else {
			ValaSourceReference* _tmp265_;
			ValaSourceReference* _tmp266_;
			_tmp265_ = vala_gir_parser_get_current_src (self);
			_tmp266_ = _tmp265_;
			vala_report_error (_tmp266_, "instance_idx required when converting function to method");
			_vala_source_reference_unref0 (_tmp266_);
		}
	}
	_tmp267_ = g_direct_equal;
	_tmp268_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_PARAMETER_INFO, (GBoxedCopyFunc) vala_gir_parser_parameter_info_ref, (GDestroyNotify) vala_gir_parser_parameter_info_unref, _tmp267_);
	parameters = _tmp268_;
	_tmp269_ = self->priv->current;
	_tmp270_ = g_direct_equal;
	_tmp271_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, _tmp270_);
	_vala_iterable_unref0 (_tmp269_->array_length_parameters);
	_tmp269_->array_length_parameters = _tmp271_;
	_tmp272_ = self->priv->current;
	_tmp273_ = g_direct_equal;
	_tmp274_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, _tmp273_);
	_vala_iterable_unref0 (_tmp272_->closure_parameters);
	_tmp272_->closure_parameters = _tmp274_;
	_tmp275_ = self->priv->current;
	_tmp276_ = g_direct_equal;
	_tmp277_ = vala_array_list_new (G_TYPE_INT, NULL, NULL, _tmp276_);
	_vala_iterable_unref0 (_tmp275_->destroy_parameters);
	_tmp275_->destroy_parameters = _tmp277_;
	_tmp279_ = self->priv->current_token;
	if (_tmp279_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
		ValaMarkupReader* _tmp280_;
		const gchar* _tmp281_;
		const gchar* _tmp282_;
		_tmp280_ = self->priv->reader;
		_tmp281_ = vala_markup_reader_get_name (_tmp280_);
		_tmp282_ = _tmp281_;
		_tmp278_ = g_strcmp0 (_tmp282_, "parameters") == 0;
	} else {
		_tmp278_ = FALSE;
	}
	if (_tmp278_) {
		gint current_parameter_idx = 0;
		vala_gir_parser_start_element (self, "parameters");
		vala_gir_parser_next (self);
		current_parameter_idx = -1;
		while (TRUE) {
			ValaMarkupTokenType _tmp283_;
			gint _tmp284_;
			gboolean _tmp285_ = FALSE;
			ValaMarkupReader* _tmp286_;
			const gchar* _tmp287_;
			const gchar* _tmp288_;
			gboolean _tmp292_ = FALSE;
			gint _tmp293_;
			gboolean _tmp296_;
			gint array_length_idx = 0;
			gint closure_idx = 0;
			gint destroy_idx = 0;
			gchar* scope = NULL;
			gchar* default_param_name = NULL;
			ValaComment* param_comment = NULL;
			ValaArrayList* _tmp297_;
			gint _tmp298_;
			gint _tmp299_;
			gchar* _tmp300_;
			ValaParameter* param = NULL;
			const gchar* _tmp301_;
			gint _tmp302_ = 0;
			gint _tmp303_ = 0;
			gint _tmp304_ = 0;
			gchar* _tmp305_ = NULL;
			ValaComment* _tmp306_ = NULL;
			ValaParameter* _tmp307_;
			gint _tmp308_;
			gint _tmp317_;
			gint _tmp330_;
			ValaComment* _tmp343_;
			ValaGirParserParameterInfo* info = NULL;
			ValaParameter* _tmp360_;
			gint _tmp361_;
			gint _tmp362_;
			gint _tmp363_;
			const gchar* _tmp364_;
			ValaGirParserParameterInfo* _tmp365_;
			gboolean _tmp366_ = FALSE;
			ValaSymbol* _tmp367_;
			ValaArrayList* _tmp382_;
			ValaGirParserParameterInfo* _tmp383_;
			_tmp283_ = self->priv->current_token;
			if (!(_tmp283_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
				break;
			}
			_tmp284_ = current_parameter_idx;
			current_parameter_idx = _tmp284_ + 1;
			_tmp286_ = self->priv->reader;
			_tmp287_ = vala_markup_reader_get_name (_tmp286_);
			_tmp288_ = _tmp287_;
			if (g_strcmp0 (_tmp288_, "instance-parameter") == 0) {
				gboolean _tmp289_ = FALSE;
				const gchar* _tmp290_;
				_tmp290_ = symbol_type;
				if (g_strcmp0 (_tmp290_, "function") == 0) {
					_tmp289_ = TRUE;
				} else {
					const gchar* _tmp291_;
					_tmp291_ = symbol_type;
					_tmp289_ = g_strcmp0 (_tmp291_, "constructor") == 0;
				}
				_tmp285_ = !_tmp289_;
			} else {
				_tmp285_ = FALSE;
			}
			if (_tmp285_) {
				vala_gir_parser_skip_element (self);
				continue;
			}
			_tmp293_ = instance_idx;
			if (_tmp293_ > -2) {
				gint _tmp294_;
				gint _tmp295_;
				_tmp294_ = instance_idx;
				_tmp295_ = current_parameter_idx;
				_tmp292_ = _tmp294_ == _tmp295_;
			} else {
				_tmp292_ = FALSE;
			}
			if (_tmp292_) {
				vala_gir_parser_skip_element (self);
				continue;
			}
			_tmp296_ = vala_gir_parser_push_metadata (self);
			if (!_tmp296_) {
				vala_gir_parser_skip_element (self);
				continue;
			}
			default_param_name = NULL;
			_tmp297_ = parameters;
			_tmp298_ = vala_collection_get_size ((ValaCollection*) _tmp297_);
			_tmp299_ = _tmp298_;
			_tmp300_ = g_strdup_printf ("arg%d", _tmp299_);
			_g_free0 (default_param_name);
			default_param_name = _tmp300_;
			_tmp301_ = default_param_name;
			_tmp307_ = vala_gir_parser_parse_parameter (self, &_tmp302_, &_tmp303_, &_tmp304_, &_tmp305_, &_tmp306_, _tmp301_);
			array_length_idx = _tmp302_;
			closure_idx = _tmp303_;
			destroy_idx = _tmp304_;
			_g_free0 (scope);
			scope = _tmp305_;
			_vala_comment_unref0 (param_comment);
			param_comment = _tmp306_;
			param = _tmp307_;
			_tmp308_ = array_length_idx;
			if (_tmp308_ != -1) {
				gboolean _tmp309_ = FALSE;
				gint _tmp310_;
				ValaGirParserNode* _tmp314_;
				ValaArrayList* _tmp315_;
				gint _tmp316_;
				_tmp310_ = instance_idx;
				if (_tmp310_ > -2) {
					gint _tmp311_;
					gint _tmp312_;
					_tmp311_ = instance_idx;
					_tmp312_ = array_length_idx;
					_tmp309_ = _tmp311_ < _tmp312_;
				} else {
					_tmp309_ = FALSE;
				}
				if (_tmp309_) {
					gint _tmp313_;
					_tmp313_ = array_length_idx;
					array_length_idx = _tmp313_ - 1;
				}
				_tmp314_ = self->priv->current;
				_tmp315_ = _tmp314_->array_length_parameters;
				_tmp316_ = array_length_idx;
				vala_collection_add ((ValaCollection*) _tmp315_, (gpointer) ((gintptr) _tmp316_));
			}
			_tmp317_ = closure_idx;
			if (_tmp317_ != -1) {
				gboolean _tmp318_ = FALSE;
				gint _tmp319_;
				ValaGirParserNode* _tmp323_;
				ValaArrayList* _tmp324_;
				gint _tmp325_;
				gint _tmp326_;
				_tmp319_ = instance_idx;
				if (_tmp319_ > -2) {
					gint _tmp320_;
					gint _tmp321_;
					_tmp320_ = instance_idx;
					_tmp321_ = closure_idx;
					_tmp318_ = _tmp320_ < _tmp321_;
				} else {
					_tmp318_ = FALSE;
				}
				if (_tmp318_) {
					gint _tmp322_;
					_tmp322_ = closure_idx;
					closure_idx = _tmp322_ - 1;
				}
				_tmp323_ = self->priv->current;
				_tmp324_ = _tmp323_->closure_parameters;
				_tmp325_ = current_parameter_idx;
				_tmp326_ = vala_list_index_of ((ValaList*) _tmp324_, (gpointer) ((gintptr) _tmp325_));
				if (_tmp326_ < 0) {
					ValaGirParserNode* _tmp327_;
					ValaArrayList* _tmp328_;
					gint _tmp329_;
					_tmp327_ = self->priv->current;
					_tmp328_ = _tmp327_->closure_parameters;
					_tmp329_ = closure_idx;
					vala_collection_add ((ValaCollection*) _tmp328_, (gpointer) ((gintptr) _tmp329_));
				}
			}
			_tmp330_ = destroy_idx;
			if (_tmp330_ != -1) {
				gboolean _tmp331_ = FALSE;
				gint _tmp332_;
				ValaGirParserNode* _tmp336_;
				ValaArrayList* _tmp337_;
				gint _tmp338_;
				gint _tmp339_;
				_tmp332_ = instance_idx;
				if (_tmp332_ > -2) {
					gint _tmp333_;
					gint _tmp334_;
					_tmp333_ = instance_idx;
					_tmp334_ = destroy_idx;
					_tmp331_ = _tmp333_ < _tmp334_;
				} else {
					_tmp331_ = FALSE;
				}
				if (_tmp331_) {
					gint _tmp335_;
					_tmp335_ = destroy_idx;
					destroy_idx = _tmp335_ - 1;
				}
				_tmp336_ = self->priv->current;
				_tmp337_ = _tmp336_->destroy_parameters;
				_tmp338_ = current_parameter_idx;
				_tmp339_ = vala_list_index_of ((ValaList*) _tmp337_, (gpointer) ((gintptr) _tmp338_));
				if (_tmp339_ < 0) {
					ValaGirParserNode* _tmp340_;
					ValaArrayList* _tmp341_;
					gint _tmp342_;
					_tmp340_ = self->priv->current;
					_tmp341_ = _tmp340_->destroy_parameters;
					_tmp342_ = destroy_idx;
					vala_collection_add ((ValaCollection*) _tmp341_, (gpointer) ((gintptr) _tmp342_));
				}
			}
			_tmp343_ = param_comment;
			if (_tmp343_ != NULL) {
				ValaGirComment* _tmp344_;
				const gchar* _tmp351_ = NULL;
				ValaParameter* _tmp352_;
				gboolean _tmp353_;
				gboolean _tmp354_;
				ValaGirComment* _tmp358_;
				ValaComment* _tmp359_;
				_tmp344_ = comment;
				if (_tmp344_ == NULL) {
					ValaSymbol* _tmp345_;
					ValaSourceReference* _tmp346_;
					ValaSourceReference* _tmp347_;
					ValaGirComment* _tmp348_;
					ValaSymbol* _tmp349_;
					ValaGirComment* _tmp350_;
					_tmp345_ = s;
					_tmp346_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp345_);
					_tmp347_ = _tmp346_;
					_tmp348_ = vala_gir_comment_new (NULL, _tmp347_);
					_vala_comment_unref0 (comment);
					comment = _tmp348_;
					_tmp349_ = s;
					_tmp350_ = comment;
					vala_symbol_set_comment (_tmp349_, (ValaComment*) _tmp350_);
				}
				_tmp352_ = param;
				_tmp353_ = vala_parameter_get_ellipsis (_tmp352_);
				_tmp354_ = _tmp353_;
				if (_tmp354_) {
					_tmp351_ = "...";
				} else {
					ValaParameter* _tmp355_;
					const gchar* _tmp356_;
					const gchar* _tmp357_;
					_tmp355_ = param;
					_tmp356_ = vala_symbol_get_name ((ValaSymbol*) _tmp355_);
					_tmp357_ = _tmp356_;
					_tmp351_ = _tmp357_;
				}
				_tmp358_ = comment;
				_tmp359_ = param_comment;
				vala_gir_comment_add_content_for_parameter (_tmp358_, _tmp351_, _tmp359_);
			}
			_tmp360_ = param;
			_tmp361_ = array_length_idx;
			_tmp362_ = closure_idx;
			_tmp363_ = destroy_idx;
			_tmp364_ = scope;
			_tmp365_ = vala_gir_parser_parameter_info_new (_tmp360_, _tmp361_, _tmp362_, _tmp363_, g_strcmp0 (_tmp364_, "async") == 0);
			info = _tmp365_;
			_tmp367_ = s;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp367_, VALA_TYPE_METHOD)) {
				const gchar* _tmp368_;
				_tmp368_ = scope;
				_tmp366_ = g_strcmp0 (_tmp368_, "async") == 0;
			} else {
				_tmp366_ = FALSE;
			}
			if (_tmp366_) {
				ValaUnresolvedType* unresolved_type = NULL;
				ValaParameter* _tmp369_;
				ValaDataType* _tmp370_;
				ValaDataType* _tmp371_;
				ValaUnresolvedType* _tmp372_;
				gboolean _tmp373_ = FALSE;
				ValaUnresolvedType* _tmp374_;
				_tmp369_ = param;
				_tmp370_ = vala_variable_get_variable_type ((ValaVariable*) _tmp369_);
				_tmp371_ = _tmp370_;
				_tmp372_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp371_, VALA_TYPE_UNRESOLVED_TYPE) ? ((ValaUnresolvedType*) _tmp371_) : NULL);
				unresolved_type = _tmp372_;
				_tmp374_ = unresolved_type;
				if (_tmp374_ != NULL) {
					ValaUnresolvedType* _tmp375_;
					ValaUnresolvedSymbol* _tmp376_;
					ValaUnresolvedSymbol* _tmp377_;
					const gchar* _tmp378_;
					const gchar* _tmp379_;
					_tmp375_ = unresolved_type;
					_tmp376_ = vala_unresolved_type_get_unresolved_symbol (_tmp375_);
					_tmp377_ = _tmp376_;
					_tmp378_ = vala_symbol_get_name ((ValaSymbol*) _tmp377_);
					_tmp379_ = _tmp378_;
					_tmp373_ = g_strcmp0 (_tmp379_, "AsyncReadyCallback") == 0;
				} else {
					_tmp373_ = FALSE;
				}
				if (_tmp373_) {
					ValaSymbol* _tmp380_;
					ValaGirParserParameterInfo* _tmp381_;
					_tmp380_ = s;
					vala_method_set_coroutine (G_TYPE_CHECK_INSTANCE_CAST (_tmp380_, VALA_TYPE_METHOD, ValaMethod), TRUE);
					_tmp381_ = info;
					_tmp381_->keep = FALSE;
				}
				_vala_code_node_unref0 (unresolved_type);
			}
			_tmp382_ = parameters;
			_tmp383_ = info;
			vala_collection_add ((ValaCollection*) _tmp382_, _tmp383_);
			vala_gir_parser_pop_metadata (self);
			_vala_gir_parser_parameter_info_unref0 (info);
			_vala_code_node_unref0 (param);
			_vala_comment_unref0 (param_comment);
			_g_free0 (default_param_name);
			_g_free0 (scope);
		}
		vala_gir_parser_end_element (self, "parameters");
	}
	_tmp384_ = self->priv->current;
	_tmp385_ = parameters;
	_tmp386_ = _vala_iterable_ref0 ((ValaList*) _tmp385_);
	_vala_iterable_unref0 (_tmp384_->parameters);
	_tmp384_->parameters = _tmp386_;
	{
		gint param_n = 0;
		ValaArrayList* _tmp387_;
		gint _tmp388_;
		gint _tmp389_;
		_tmp387_ = parameters;
		_tmp388_ = vala_collection_get_size ((ValaCollection*) _tmp387_);
		_tmp389_ = _tmp388_;
		param_n = _tmp389_ - 1;
		{
			gboolean _tmp390_ = FALSE;
			_tmp390_ = TRUE;
			while (TRUE) {
				gint _tmp392_;
				ValaGirParserParameterInfo* pi = NULL;
				ValaArrayList* _tmp393_;
				gint _tmp394_;
				gpointer _tmp395_;
				gboolean _tmp396_ = FALSE;
				ValaGirParserParameterInfo* _tmp397_;
				ValaParameter* _tmp398_;
				gboolean _tmp399_;
				gboolean _tmp400_;
				if (!_tmp390_) {
					gint _tmp391_;
					_tmp391_ = param_n;
					param_n = _tmp391_ - 1;
				}
				_tmp390_ = FALSE;
				_tmp392_ = param_n;
				if (!(_tmp392_ >= 0)) {
					break;
				}
				_tmp393_ = parameters;
				_tmp394_ = param_n;
				_tmp395_ = vala_list_get ((ValaList*) _tmp393_, _tmp394_);
				pi = (ValaGirParserParameterInfo*) _tmp395_;
				_tmp397_ = pi;
				_tmp398_ = _tmp397_->param;
				_tmp399_ = vala_parameter_get_ellipsis (_tmp398_);
				_tmp400_ = _tmp399_;
				if (!_tmp400_) {
					ValaGirParserParameterInfo* _tmp401_;
					ValaParameter* _tmp402_;
					ValaExpression* _tmp403_;
					ValaExpression* _tmp404_;
					_tmp401_ = pi;
					_tmp402_ = _tmp401_->param;
					_tmp403_ = vala_variable_get_initializer ((ValaVariable*) _tmp402_);
					_tmp404_ = _tmp403_;
					_tmp396_ = _tmp404_ == NULL;
				} else {
					_tmp396_ = FALSE;
				}
				if (_tmp396_) {
					gchar* type_string = NULL;
					ValaGirParserParameterInfo* _tmp405_;
					ValaParameter* _tmp406_;
					ValaDataType* _tmp407_;
					ValaDataType* _tmp408_;
					gchar* _tmp409_;
					const gchar* _tmp410_;
					_tmp405_ = pi;
					_tmp406_ = _tmp405_->param;
					_tmp407_ = vala_variable_get_variable_type ((ValaVariable*) _tmp406_);
					_tmp408_ = _tmp407_;
					_tmp409_ = vala_code_node_to_string ((ValaCodeNode*) _tmp408_);
					type_string = _tmp409_;
					_tmp410_ = type_string;
					if (g_strcmp0 (_tmp410_, "Gio.Cancellable?") == 0) {
						ValaGirParserParameterInfo* _tmp411_;
						ValaParameter* _tmp412_;
						ValaNullLiteral* _tmp413_;
						ValaNullLiteral* _tmp414_;
						_tmp411_ = pi;
						_tmp412_ = _tmp411_->param;
						_tmp413_ = vala_null_literal_new (NULL);
						_tmp414_ = _tmp413_;
						vala_variable_set_initializer ((ValaVariable*) _tmp412_, (ValaExpression*) _tmp414_);
						_vala_code_node_unref0 (_tmp414_);
					} else {
						_g_free0 (type_string);
						_vala_gir_parser_parameter_info_unref0 (pi);
						break;
					}
					_g_free0 (type_string);
				}
				_vala_gir_parser_parameter_info_unref0 (pi);
			}
		}
	}
	vala_gir_parser_pop_node (self);
	_tmp415_ = element_name;
	vala_gir_parser_end_element (self, _tmp415_);
	_vala_iterable_unref0 (parameters);
	_vala_code_node_unref0 (s);
	_g_free0 (return_ctype);
	_vala_code_node_unref0 (return_type);
	_vala_comment_unref0 (comment);
	_g_free0 (invoker);
	_g_free0 (throws_string);
	_g_free0 (name);
	_g_free0 (symbol_type);
}


static void vala_gir_parser_parse_method (ValaGirParser* self, const gchar* element_name) {
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element_name != NULL);
	_tmp0_ = element_name;
	vala_gir_parser_parse_function (self, _tmp0_);
}


static void vala_gir_parser_parse_signal (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	vala_gir_parser_parse_function (self, "glib:signal");
}


static void vala_gir_parser_parse_boxed (ValaGirParser* self, const gchar* element_name) {
	const gchar* _tmp0_;
	gchar* name = NULL;
	ValaMarkupReader* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	ValaClass* cl = NULL;
	gboolean require_copy_free = FALSE;
	ValaGirParserNode* _tmp9_;
	gboolean _tmp10_;
	ValaClass* _tmp23_;
	ValaClass* _tmp24_;
	gboolean _tmp25_;
	ValaClass* _tmp26_;
	ValaClass* _tmp27_;
	ValaGirParserMetadata* _tmp28_;
	gboolean _tmp29_;
	ValaClass* _tmp39_;
	ValaGirComment* _tmp40_;
	ValaGirComment* _tmp41_;
	ValaGirParserNode* ref_method = NULL;
	ValaGirParserNode* unref_method = NULL;
	gboolean _tmp86_ = FALSE;
	gboolean _tmp87_ = FALSE;
	gboolean _tmp88_ = FALSE;
	ValaClass* _tmp89_;
	gboolean _tmp90_;
	const gchar* _tmp111_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (element_name != NULL);
	_tmp0_ = element_name;
	vala_gir_parser_start_element (self, _tmp0_);
	_tmp1_ = self->priv->reader;
	_tmp2_ = vala_markup_reader_get_attribute (_tmp1_, "name");
	name = _tmp2_;
	_tmp3_ = name;
	if (_tmp3_ == NULL) {
		ValaMarkupReader* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->priv->reader;
		_tmp5_ = vala_markup_reader_get_attribute (_tmp4_, "glib:name");
		_g_free0 (name);
		name = _tmp5_;
	}
	_tmp6_ = name;
	_tmp7_ = vala_gir_parser_element_get_name (self, _tmp6_);
	_tmp8_ = _tmp7_;
	vala_gir_parser_push_node (self, _tmp8_, TRUE);
	_g_free0 (_tmp8_);
	require_copy_free = FALSE;
	_tmp9_ = self->priv->current;
	_tmp10_ = _tmp9_->new_symbol;
	if (_tmp10_) {
		ValaGirParserNode* _tmp11_;
		const gchar* _tmp12_;
		ValaGirParserNode* _tmp13_;
		ValaSourceReference* _tmp14_;
		ValaClass* _tmp15_;
		ValaClass* _tmp16_;
		ValaGirParserNode* _tmp17_;
		ValaClass* _tmp18_;
		ValaSymbol* _tmp19_;
		_tmp11_ = self->priv->current;
		_tmp12_ = _tmp11_->name;
		_tmp13_ = self->priv->current;
		_tmp14_ = _tmp13_->source_reference;
		_tmp15_ = vala_class_new (_tmp12_, _tmp14_, NULL);
		_vala_code_node_unref0 (cl);
		cl = _tmp15_;
		_tmp16_ = cl;
		vala_class_set_is_compact (_tmp16_, TRUE);
		_tmp17_ = self->priv->current;
		_tmp18_ = cl;
		_tmp19_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp18_);
		_vala_code_node_unref0 (_tmp17_->symbol);
		_tmp17_->symbol = _tmp19_;
	} else {
		ValaGirParserNode* _tmp20_;
		ValaSymbol* _tmp21_;
		ValaClass* _tmp22_;
		_tmp20_ = self->priv->current;
		_tmp21_ = _tmp20_->symbol;
		_tmp22_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, VALA_TYPE_CLASS, ValaClass));
		_vala_code_node_unref0 (cl);
		cl = _tmp22_;
	}
	_tmp23_ = cl;
	vala_gir_parser_set_type_id_ccode (self, (ValaSymbol*) _tmp23_);
	_tmp24_ = cl;
	_tmp25_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp24_, "CCode", "type_id");
	require_copy_free = _tmp25_;
	_tmp26_ = cl;
	vala_symbol_set_access ((ValaSymbol*) _tmp26_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp27_ = cl;
	vala_symbol_set_external ((ValaSymbol*) _tmp27_, TRUE);
	_tmp28_ = self->priv->metadata;
	_tmp29_ = vala_gir_parser_metadata_has_argument (_tmp28_, VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE);
	if (_tmp29_) {
		ValaClass* _tmp30_;
		ValaGirParserMetadata* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		ValaGirParserMetadata* _tmp34_;
		ValaSourceReference* _tmp35_;
		ValaSourceReference* _tmp36_;
		ValaDataType* _tmp37_;
		ValaDataType* _tmp38_;
		_tmp30_ = cl;
		_tmp31_ = self->priv->metadata;
		_tmp32_ = vala_gir_parser_metadata_get_string (_tmp31_, VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE);
		_tmp33_ = _tmp32_;
		_tmp34_ = self->priv->metadata;
		_tmp35_ = vala_gir_parser_metadata_get_source_reference (_tmp34_, VALA_GIR_PARSER_ARGUMENT_TYPE_BASE_TYPE);
		_tmp36_ = _tmp35_;
		_tmp37_ = vala_gir_parser_parse_type_from_string (self, _tmp33_, TRUE, _tmp36_);
		_tmp38_ = _tmp37_;
		vala_class_add_base_type (_tmp30_, _tmp38_);
		_vala_code_node_unref0 (_tmp38_);
		_vala_source_reference_unref0 (_tmp36_);
		_g_free0 (_tmp33_);
	}
	vala_gir_parser_next (self);
	_tmp39_ = cl;
	_tmp40_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp41_ = _tmp40_;
	vala_symbol_set_comment ((ValaSymbol*) _tmp39_, (ValaComment*) _tmp41_);
	_vala_comment_unref0 (_tmp41_);
	ref_method = NULL;
	unref_method = NULL;
	while (TRUE) {
		ValaMarkupTokenType _tmp42_;
		gboolean _tmp43_;
		ValaMarkupReader* _tmp44_;
		const gchar* _tmp45_;
		const gchar* _tmp46_;
		_tmp42_ = self->priv->current_token;
		if (!(_tmp42_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp43_ = vala_gir_parser_push_metadata (self);
		if (!_tmp43_) {
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp44_ = self->priv->reader;
		_tmp45_ = vala_markup_reader_get_name (_tmp44_);
		_tmp46_ = _tmp45_;
		if (g_strcmp0 (_tmp46_, "field") == 0) {
			vala_gir_parser_parse_field (self);
		} else {
			ValaMarkupReader* _tmp47_;
			const gchar* _tmp48_;
			const gchar* _tmp49_;
			_tmp47_ = self->priv->reader;
			_tmp48_ = vala_markup_reader_get_name (_tmp47_);
			_tmp49_ = _tmp48_;
			if (g_strcmp0 (_tmp49_, "constructor") == 0) {
				vala_gir_parser_parse_constructor (self);
			} else {
				ValaMarkupReader* _tmp50_;
				const gchar* _tmp51_;
				const gchar* _tmp52_;
				_tmp50_ = self->priv->reader;
				_tmp51_ = vala_markup_reader_get_name (_tmp50_);
				_tmp52_ = _tmp51_;
				if (g_strcmp0 (_tmp52_, "method") == 0) {
					gchar* cname = NULL;
					ValaGirParserNode* _tmp53_;
					gchar* _tmp54_;
					gboolean _tmp55_ = FALSE;
					const gchar* _tmp56_;
					gboolean _tmp57_;
					vala_gir_parser_parse_method (self, "method");
					_tmp53_ = self->priv->old_current;
					_tmp54_ = vala_gir_parser_node_get_cname (_tmp53_);
					cname = _tmp54_;
					_tmp56_ = cname;
					_tmp57_ = g_str_has_suffix (_tmp56_, "_ref");
					if (_tmp57_) {
						gboolean _tmp58_ = FALSE;
						ValaGirParserNode* _tmp59_;
						_tmp59_ = ref_method;
						if (_tmp59_ == NULL) {
							_tmp58_ = TRUE;
						} else {
							ValaGirParserNode* _tmp60_;
							const gchar* _tmp61_;
							_tmp60_ = self->priv->old_current;
							_tmp61_ = _tmp60_->name;
							_tmp58_ = g_strcmp0 (_tmp61_, "ref") == 0;
						}
						_tmp55_ = _tmp58_;
					} else {
						_tmp55_ = FALSE;
					}
					if (_tmp55_) {
						ValaGirParserNode* _tmp62_;
						ValaGirParserNode* _tmp63_;
						_tmp62_ = self->priv->old_current;
						_tmp63_ = _vala_gir_parser_node_ref0 (_tmp62_);
						_vala_gir_parser_node_unref0 (ref_method);
						ref_method = _tmp63_;
					} else {
						gboolean _tmp64_ = FALSE;
						const gchar* _tmp65_;
						gboolean _tmp66_;
						_tmp65_ = cname;
						_tmp66_ = g_str_has_suffix (_tmp65_, "_unref");
						if (_tmp66_) {
							gboolean _tmp67_ = FALSE;
							ValaGirParserNode* _tmp68_;
							_tmp68_ = unref_method;
							if (_tmp68_ == NULL) {
								_tmp67_ = TRUE;
							} else {
								ValaGirParserNode* _tmp69_;
								const gchar* _tmp70_;
								_tmp69_ = self->priv->old_current;
								_tmp70_ = _tmp69_->name;
								_tmp67_ = g_strcmp0 (_tmp70_, "unref") == 0;
							}
							_tmp64_ = _tmp67_;
						} else {
							_tmp64_ = FALSE;
						}
						if (_tmp64_) {
							ValaGirParserNode* _tmp71_;
							ValaGirParserNode* _tmp72_;
							_tmp71_ = self->priv->old_current;
							_tmp72_ = _vala_gir_parser_node_ref0 (_tmp71_);
							_vala_gir_parser_node_unref0 (unref_method);
							unref_method = _tmp72_;
						}
					}
					_g_free0 (cname);
				} else {
					ValaMarkupReader* _tmp73_;
					const gchar* _tmp74_;
					const gchar* _tmp75_;
					_tmp73_ = self->priv->reader;
					_tmp74_ = vala_markup_reader_get_name (_tmp73_);
					_tmp75_ = _tmp74_;
					if (g_strcmp0 (_tmp75_, "function") == 0) {
						vala_gir_parser_skip_element (self);
					} else {
						ValaMarkupReader* _tmp76_;
						const gchar* _tmp77_;
						const gchar* _tmp78_;
						_tmp76_ = self->priv->reader;
						_tmp77_ = vala_markup_reader_get_name (_tmp76_);
						_tmp78_ = _tmp77_;
						if (g_strcmp0 (_tmp78_, "union") == 0) {
							vala_gir_parser_parse_union (self);
						} else {
							ValaSourceReference* _tmp79_;
							ValaSourceReference* _tmp80_;
							ValaMarkupReader* _tmp81_;
							const gchar* _tmp82_;
							const gchar* _tmp83_;
							gchar* _tmp84_;
							gchar* _tmp85_;
							_tmp79_ = vala_gir_parser_get_current_src (self);
							_tmp80_ = _tmp79_;
							_tmp81_ = self->priv->reader;
							_tmp82_ = vala_markup_reader_get_name (_tmp81_);
							_tmp83_ = _tmp82_;
							_tmp84_ = g_strdup_printf ("unknown child element `%s' in `class'", _tmp83_);
							_tmp85_ = _tmp84_;
							vala_report_error (_tmp80_, _tmp85_);
							_g_free0 (_tmp85_);
							_vala_source_reference_unref0 (_tmp80_);
							vala_gir_parser_skip_element (self);
						}
					}
				}
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	_tmp89_ = cl;
	_tmp90_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp89_, "CCode", "ref_function");
	if (_tmp90_) {
		_tmp88_ = TRUE;
	} else {
		ValaClass* _tmp91_;
		gboolean _tmp92_;
		_tmp91_ = cl;
		_tmp92_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp91_, "CCode", "unref_function");
		_tmp88_ = _tmp92_;
	}
	if (_tmp88_) {
		_tmp87_ = TRUE;
	} else {
		ValaClass* _tmp93_;
		gboolean _tmp94_;
		_tmp93_ = cl;
		_tmp94_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp93_, "CCode", "copy_function");
		_tmp87_ = _tmp94_;
	}
	if (_tmp87_) {
		_tmp86_ = TRUE;
	} else {
		ValaClass* _tmp95_;
		gboolean _tmp96_;
		_tmp95_ = cl;
		_tmp96_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp95_, "CCode", "free_function");
		_tmp86_ = _tmp96_;
	}
	if (_tmp86_) {
	} else {
		gboolean _tmp97_ = FALSE;
		ValaGirParserNode* _tmp98_;
		_tmp98_ = ref_method;
		if (_tmp98_ != NULL) {
			ValaGirParserNode* _tmp99_;
			_tmp99_ = unref_method;
			_tmp97_ = _tmp99_ != NULL;
		} else {
			_tmp97_ = FALSE;
		}
		if (_tmp97_) {
			ValaClass* _tmp100_;
			ValaGirParserNode* _tmp101_;
			gchar* _tmp102_;
			gchar* _tmp103_;
			ValaClass* _tmp104_;
			ValaGirParserNode* _tmp105_;
			gchar* _tmp106_;
			gchar* _tmp107_;
			_tmp100_ = cl;
			_tmp101_ = ref_method;
			_tmp102_ = vala_gir_parser_node_get_cname (_tmp101_);
			_tmp103_ = _tmp102_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp100_, "CCode", "ref_function", _tmp103_, NULL);
			_g_free0 (_tmp103_);
			_tmp104_ = cl;
			_tmp105_ = unref_method;
			_tmp106_ = vala_gir_parser_node_get_cname (_tmp105_);
			_tmp107_ = _tmp106_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp104_, "CCode", "unref_function", _tmp107_, NULL);
			_g_free0 (_tmp107_);
		} else {
			gboolean _tmp108_;
			_tmp108_ = require_copy_free;
			if (_tmp108_) {
				ValaClass* _tmp109_;
				ValaClass* _tmp110_;
				_tmp109_ = cl;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp109_, "CCode", "copy_function", "g_boxed_copy", NULL);
				_tmp110_ = cl;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp110_, "CCode", "free_function", "g_boxed_free", NULL);
			}
		}
	}
	vala_gir_parser_pop_node (self);
	_tmp111_ = element_name;
	vala_gir_parser_end_element (self, _tmp111_);
	_vala_gir_parser_node_unref0 (unref_method);
	_vala_gir_parser_node_unref0 (ref_method);
	_vala_code_node_unref0 (cl);
	_g_free0 (name);
}


static void vala_gir_parser_parse_union (ValaGirParser* self) {
	gchar* element_name = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp14_;
	ValaStruct* st = NULL;
	ValaGirParserNode* _tmp15_;
	gboolean _tmp16_;
	ValaStruct* _tmp29_;
	ValaStruct* _tmp30_;
	ValaStruct* _tmp31_;
	ValaGirComment* _tmp32_;
	ValaGirComment* _tmp33_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "union");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	element_name = _tmp0_;
	_tmp1_ = element_name;
	if (_tmp1_ == NULL) {
		vala_gir_parser_next (self);
		while (TRUE) {
			ValaMarkupTokenType _tmp2_;
			gboolean _tmp3_;
			ValaMarkupReader* _tmp4_;
			const gchar* _tmp5_;
			const gchar* _tmp6_;
			_tmp2_ = self->priv->current_token;
			if (!(_tmp2_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
				break;
			}
			_tmp3_ = vala_gir_parser_push_metadata (self);
			if (!_tmp3_) {
				vala_gir_parser_skip_element (self);
				continue;
			}
			_tmp4_ = self->priv->reader;
			_tmp5_ = vala_markup_reader_get_name (_tmp4_);
			_tmp6_ = _tmp5_;
			if (g_strcmp0 (_tmp6_, "field") == 0) {
				vala_gir_parser_parse_field (self);
			} else {
				ValaSourceReference* _tmp7_;
				ValaSourceReference* _tmp8_;
				ValaMarkupReader* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				gchar* _tmp12_;
				gchar* _tmp13_;
				_tmp7_ = vala_gir_parser_get_current_src (self);
				_tmp8_ = _tmp7_;
				_tmp9_ = self->priv->reader;
				_tmp10_ = vala_markup_reader_get_name (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp12_ = g_strdup_printf ("unknown child element `%s' in `transparent union'", _tmp11_);
				_tmp13_ = _tmp12_;
				vala_report_error (_tmp8_, _tmp13_);
				_g_free0 (_tmp13_);
				_vala_source_reference_unref0 (_tmp8_);
				vala_gir_parser_skip_element (self);
			}
			vala_gir_parser_pop_metadata (self);
		}
		vala_gir_parser_end_element (self, "union");
		_g_free0 (element_name);
		return;
	}
	_tmp14_ = element_name;
	vala_gir_parser_push_node (self, _tmp14_, TRUE);
	_tmp15_ = self->priv->current;
	_tmp16_ = _tmp15_->new_symbol;
	if (_tmp16_) {
		ValaMarkupReader* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		ValaGirParserNode* _tmp20_;
		ValaSourceReference* _tmp21_;
		ValaStruct* _tmp22_;
		ValaGirParserNode* _tmp23_;
		ValaStruct* _tmp24_;
		ValaSymbol* _tmp25_;
		_tmp17_ = self->priv->reader;
		_tmp18_ = vala_markup_reader_get_attribute (_tmp17_, "name");
		_tmp19_ = _tmp18_;
		_tmp20_ = self->priv->current;
		_tmp21_ = _tmp20_->source_reference;
		_tmp22_ = vala_struct_new (_tmp19_, _tmp21_, NULL);
		_vala_code_node_unref0 (st);
		st = _tmp22_;
		_g_free0 (_tmp19_);
		_tmp23_ = self->priv->current;
		_tmp24_ = st;
		_tmp25_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp24_);
		_vala_code_node_unref0 (_tmp23_->symbol);
		_tmp23_->symbol = _tmp25_;
	} else {
		ValaGirParserNode* _tmp26_;
		ValaSymbol* _tmp27_;
		ValaStruct* _tmp28_;
		_tmp26_ = self->priv->current;
		_tmp27_ = _tmp26_->symbol;
		_tmp28_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, VALA_TYPE_STRUCT, ValaStruct));
		_vala_code_node_unref0 (st);
		st = _tmp28_;
	}
	_tmp29_ = st;
	vala_symbol_set_access ((ValaSymbol*) _tmp29_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	_tmp30_ = st;
	vala_symbol_set_external ((ValaSymbol*) _tmp30_, TRUE);
	vala_gir_parser_next (self);
	_tmp31_ = st;
	_tmp32_ = vala_gir_parser_parse_symbol_doc (self);
	_tmp33_ = _tmp32_;
	vala_symbol_set_comment ((ValaSymbol*) _tmp31_, (ValaComment*) _tmp33_);
	_vala_comment_unref0 (_tmp33_);
	while (TRUE) {
		ValaMarkupTokenType _tmp34_;
		gboolean _tmp35_;
		ValaMarkupReader* _tmp36_;
		const gchar* _tmp37_;
		const gchar* _tmp38_;
		_tmp34_ = self->priv->current_token;
		if (!(_tmp34_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT)) {
			break;
		}
		_tmp35_ = vala_gir_parser_push_metadata (self);
		if (!_tmp35_) {
			vala_gir_parser_skip_element (self);
			continue;
		}
		_tmp36_ = self->priv->reader;
		_tmp37_ = vala_markup_reader_get_name (_tmp36_);
		_tmp38_ = _tmp37_;
		if (g_strcmp0 (_tmp38_, "field") == 0) {
			vala_gir_parser_parse_field (self);
		} else {
			ValaMarkupReader* _tmp39_;
			const gchar* _tmp40_;
			const gchar* _tmp41_;
			_tmp39_ = self->priv->reader;
			_tmp40_ = vala_markup_reader_get_name (_tmp39_);
			_tmp41_ = _tmp40_;
			if (g_strcmp0 (_tmp41_, "constructor") == 0) {
				vala_gir_parser_parse_constructor (self);
			} else {
				ValaMarkupReader* _tmp42_;
				const gchar* _tmp43_;
				const gchar* _tmp44_;
				_tmp42_ = self->priv->reader;
				_tmp43_ = vala_markup_reader_get_name (_tmp42_);
				_tmp44_ = _tmp43_;
				if (g_strcmp0 (_tmp44_, "method") == 0) {
					vala_gir_parser_parse_method (self, "method");
				} else {
					ValaMarkupReader* _tmp45_;
					const gchar* _tmp46_;
					const gchar* _tmp47_;
					_tmp45_ = self->priv->reader;
					_tmp46_ = vala_markup_reader_get_name (_tmp45_);
					_tmp47_ = _tmp46_;
					if (g_strcmp0 (_tmp47_, "function") == 0) {
						vala_gir_parser_skip_element (self);
					} else {
						ValaMarkupReader* _tmp48_;
						const gchar* _tmp49_;
						const gchar* _tmp50_;
						_tmp48_ = self->priv->reader;
						_tmp49_ = vala_markup_reader_get_name (_tmp48_);
						_tmp50_ = _tmp49_;
						if (g_strcmp0 (_tmp50_, "record") == 0) {
							vala_gir_parser_parse_record (self);
						} else {
							ValaSourceReference* _tmp51_;
							ValaSourceReference* _tmp52_;
							ValaMarkupReader* _tmp53_;
							const gchar* _tmp54_;
							const gchar* _tmp55_;
							gchar* _tmp56_;
							gchar* _tmp57_;
							_tmp51_ = vala_gir_parser_get_current_src (self);
							_tmp52_ = _tmp51_;
							_tmp53_ = self->priv->reader;
							_tmp54_ = vala_markup_reader_get_name (_tmp53_);
							_tmp55_ = _tmp54_;
							_tmp56_ = g_strdup_printf ("unknown child element `%s' in `union'", _tmp55_);
							_tmp57_ = _tmp56_;
							vala_report_error (_tmp52_, _tmp57_);
							_g_free0 (_tmp57_);
							_vala_source_reference_unref0 (_tmp52_);
							vala_gir_parser_skip_element (self);
						}
					}
				}
			}
		}
		vala_gir_parser_pop_metadata (self);
	}
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "union");
	_vala_code_node_unref0 (st);
	_g_free0 (element_name);
}


static void vala_gir_parser_parse_constant (ValaGirParser* self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	ValaGirComment* comment = NULL;
	ValaGirComment* _tmp2_;
	ValaDataType* type = NULL;
	ValaDataType* _tmp3_;
	ValaConstant* c = NULL;
	ValaGirParserNode* _tmp4_;
	const gchar* _tmp5_;
	ValaGirParserNode* _tmp6_;
	ValaSourceReference* _tmp7_;
	ValaConstant* _tmp8_;
	ValaGirParserNode* _tmp9_;
	ValaSymbol* _tmp10_;
	g_return_if_fail (self != NULL);
	vala_gir_parser_start_element (self, "constant");
	_tmp0_ = vala_gir_parser_element_get_name (self, NULL);
	_tmp1_ = _tmp0_;
	vala_gir_parser_push_node (self, _tmp1_, FALSE);
	_g_free0 (_tmp1_);
	vala_gir_parser_next (self);
	_tmp2_ = vala_gir_parser_parse_symbol_doc (self);
	comment = _tmp2_;
	_tmp3_ = vala_gir_parser_parse_type (self, NULL, NULL, TRUE, NULL, NULL);
	type = _tmp3_;
	_tmp4_ = self->priv->current;
	_tmp5_ = _tmp4_->name;
	_tmp6_ = self->priv->current;
	_tmp7_ = _tmp6_->source_reference;
	_tmp8_ = vala_constant_new (_tmp5_, type, NULL, _tmp7_, NULL);
	c = _tmp8_;
	_tmp9_ = self->priv->current;
	_tmp10_ = _vala_code_node_ref0 ((ValaSymbol*) c);
	_vala_code_node_unref0 (_tmp9_->symbol);
	_tmp9_->symbol = _tmp10_;
	vala_symbol_set_access ((ValaSymbol*) c, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
	vala_symbol_set_comment ((ValaSymbol*) c, (ValaComment*) comment);
	vala_symbol_set_external ((ValaSymbol*) c, TRUE);
	vala_gir_parser_pop_node (self);
	vala_gir_parser_end_element (self, "constant");
	_vala_code_node_unref0 (c);
	_vala_code_node_unref0 (type);
	_vala_comment_unref0 (comment);
}


static void vala_gir_parser_report_unused_metadata (ValaGirParser* self, ValaGirParserMetadata* metadata) {
	ValaGirParserMetadata* _tmp0_;
	ValaGirParserMetadata* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaGirParserMetadata* _tmp4_;
	ValaMap* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (metadata != NULL);
	_tmp0_ = metadata;
	_tmp1_ = vala_gir_parser_metadata_get_empty ();
	_tmp2_ = _tmp1_;
	if (_tmp0_ == _tmp2_) {
		return;
	}
	_tmp4_ = metadata;
	_tmp5_ = _tmp4_->args;
	_tmp6_ = vala_map_get_size (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp7_ == 0) {
		ValaGirParserMetadata* _tmp8_;
		ValaArrayList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp8_ = metadata;
		_tmp9_ = _tmp8_->children;
		_tmp10_ = vala_collection_get_size ((ValaCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp3_ = _tmp11_ == 0;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaGirParserMetadata* _tmp12_;
		ValaSourceReference* _tmp13_;
		_tmp12_ = metadata;
		_tmp13_ = _tmp12_->source_reference;
		vala_report_warning (_tmp13_, "empty metadata");
		return;
	}
	{
		ValaIterator* _arg_type_it = NULL;
		ValaGirParserMetadata* _tmp14_;
		ValaMap* _tmp15_;
		ValaSet* _tmp16_;
		ValaSet* _tmp17_;
		ValaIterator* _tmp18_;
		ValaIterator* _tmp19_;
		_tmp14_ = metadata;
		_tmp15_ = _tmp14_->args;
		_tmp16_ = vala_map_get_keys (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = vala_iterable_iterator ((ValaIterable*) _tmp17_);
		_tmp19_ = _tmp18_;
		_vala_iterable_unref0 (_tmp17_);
		_arg_type_it = _tmp19_;
		while (TRUE) {
			ValaIterator* _tmp20_;
			gboolean _tmp21_;
			ValaGirParserArgumentType arg_type = 0;
			ValaIterator* _tmp22_;
			gpointer _tmp23_;
			ValaGirParserArgument* arg = NULL;
			ValaGirParserMetadata* _tmp24_;
			ValaMap* _tmp25_;
			ValaGirParserArgumentType _tmp26_;
			gpointer _tmp27_;
			ValaGirParserArgument* _tmp28_;
			gboolean _tmp29_;
			_tmp20_ = _arg_type_it;
			_tmp21_ = vala_iterator_next (_tmp20_);
			if (!_tmp21_) {
				break;
			}
			_tmp22_ = _arg_type_it;
			_tmp23_ = vala_iterator_get (_tmp22_);
			arg_type = (ValaGirParserArgumentType) ((gintptr) _tmp23_);
			_tmp24_ = metadata;
			_tmp25_ = _tmp24_->args;
			_tmp26_ = arg_type;
			_tmp27_ = vala_map_get (_tmp25_, (gpointer) ((gintptr) _tmp26_));
			arg = (ValaGirParserArgument*) _tmp27_;
			_tmp28_ = arg;
			_tmp29_ = _tmp28_->used;
			if (!_tmp29_) {
				ValaGirParserArgument* _tmp30_;
				ValaSourceReference* _tmp31_;
				_tmp30_ = arg;
				_tmp31_ = _tmp30_->source_reference;
				vala_report_warning (_tmp31_, "argument never used");
			}
			_vala_gir_parser_argument_unref0 (arg);
		}
		_vala_iterator_unref0 (_arg_type_it);
	}
	{
		ValaArrayList* _child_list = NULL;
		ValaGirParserMetadata* _tmp32_;
		ValaArrayList* _tmp33_;
		ValaArrayList* _tmp34_;
		gint _child_size = 0;
		ValaArrayList* _tmp35_;
		gint _tmp36_;
		gint _tmp37_;
		gint _child_index = 0;
		_tmp32_ = metadata;
		_tmp33_ = _tmp32_->children;
		_tmp34_ = _vala_iterable_ref0 (_tmp33_);
		_child_list = _tmp34_;
		_tmp35_ = _child_list;
		_tmp36_ = vala_collection_get_size ((ValaCollection*) _tmp35_);
		_tmp37_ = _tmp36_;
		_child_size = _tmp37_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			ValaGirParserMetadata* child = NULL;
			ValaArrayList* _tmp41_;
			gint _tmp42_;
			gpointer _tmp43_;
			ValaGirParserMetadata* _tmp44_;
			gboolean _tmp45_;
			_tmp38_ = _child_index;
			_child_index = _tmp38_ + 1;
			_tmp39_ = _child_index;
			_tmp40_ = _child_size;
			if (!(_tmp39_ < _tmp40_)) {
				break;
			}
			_tmp41_ = _child_list;
			_tmp42_ = _child_index;
			_tmp43_ = vala_list_get ((ValaList*) _tmp41_, _tmp42_);
			child = (ValaGirParserMetadata*) _tmp43_;
			_tmp44_ = child;
			_tmp45_ = _tmp44_->used;
			if (!_tmp45_) {
				ValaGirParserMetadata* _tmp46_;
				ValaSourceReference* _tmp47_;
				_tmp46_ = child;
				_tmp47_ = _tmp46_->source_reference;
				vala_report_warning (_tmp47_, "metadata never used");
			} else {
				ValaGirParserMetadata* _tmp48_;
				_tmp48_ = child;
				vala_gir_parser_report_unused_metadata (self, _tmp48_);
			}
			_vala_gir_parser_metadata_unref0 (child);
		}
		_vala_iterable_unref0 (_child_list);
	}
}


static void vala_gir_parser_resolve_gir_symbols (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	{
		ValaArrayList* _map_from_list = NULL;
		ValaArrayList* _tmp0_;
		ValaArrayList* _tmp1_;
		gint _map_from_size = 0;
		ValaArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _map_from_index = 0;
		_tmp0_ = self->priv->unresolved_gir_symbols;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_map_from_list = _tmp1_;
		_tmp2_ = _map_from_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_map_from_size = _tmp4_;
		_map_from_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaUnresolvedSymbol* map_from = NULL;
			ValaArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			_tmp5_ = _map_from_index;
			_map_from_index = _tmp5_ + 1;
			_tmp6_ = _map_from_index;
			_tmp7_ = _map_from_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _map_from_list;
			_tmp9_ = _map_from_index;
			_tmp10_ = vala_list_get ((ValaList*) _tmp8_, _tmp9_);
			map_from = (ValaUnresolvedSymbol*) _tmp10_;
			while (TRUE) {
				ValaUnresolvedSymbol* _tmp11_;
				ValaSymbol* map_to = NULL;
				ValaHashMap* _tmp12_;
				ValaUnresolvedSymbol* _tmp13_;
				gpointer _tmp14_;
				ValaSymbol* _tmp15_;
				ValaUnresolvedSymbol* _tmp65_;
				ValaUnresolvedSymbol* _tmp66_;
				ValaUnresolvedSymbol* _tmp67_;
				ValaUnresolvedSymbol* _tmp68_;
				_tmp11_ = map_from;
				if (!(_tmp11_ != NULL)) {
					break;
				}
				_tmp12_ = self->priv->unresolved_symbols_map;
				_tmp13_ = map_from;
				_tmp14_ = vala_map_get ((ValaMap*) _tmp12_, _tmp13_);
				map_to = (ValaSymbol*) _tmp14_;
				_tmp15_ = map_to;
				if (_tmp15_ != NULL) {
					ValaUnresolvedSymbol* _tmp16_;
					ValaUnresolvedSymbol* _tmp17_;
					ValaSymbol* _tmp18_;
					const gchar* _tmp19_;
					const gchar* _tmp20_;
					ValaSymbol* _tmp21_;
					_tmp16_ = map_from;
					vala_unresolved_symbol_set_inner (_tmp16_, NULL);
					_tmp17_ = map_from;
					_tmp18_ = map_to;
					_tmp19_ = vala_symbol_get_name (_tmp18_);
					_tmp20_ = _tmp19_;
					vala_symbol_set_name ((ValaSymbol*) _tmp17_, _tmp20_);
					_tmp21_ = map_to;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_UNRESOLVED_SYMBOL)) {
						ValaUnresolvedSymbol* umap_to = NULL;
						ValaSymbol* _tmp22_;
						ValaUnresolvedSymbol* _tmp23_;
						_tmp22_ = map_to;
						_tmp23_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, VALA_TYPE_UNRESOLVED_SYMBOL, ValaUnresolvedSymbol));
						umap_to = _tmp23_;
						while (TRUE) {
							ValaUnresolvedSymbol* _tmp24_;
							ValaUnresolvedSymbol* _tmp25_;
							ValaUnresolvedSymbol* _tmp26_;
							ValaUnresolvedSymbol* _tmp27_;
							ValaUnresolvedSymbol* _tmp28_;
							ValaUnresolvedSymbol* _tmp29_;
							ValaUnresolvedSymbol* _tmp30_;
							ValaUnresolvedSymbol* _tmp31_;
							ValaUnresolvedSymbol* _tmp32_;
							const gchar* _tmp33_;
							const gchar* _tmp34_;
							ValaUnresolvedSymbol* _tmp35_;
							ValaUnresolvedSymbol* _tmp36_;
							ValaUnresolvedSymbol* _tmp37_;
							ValaUnresolvedSymbol* _tmp38_;
							ValaUnresolvedSymbol* _tmp39_;
							ValaUnresolvedSymbol* _tmp40_;
							_tmp24_ = umap_to;
							_tmp25_ = vala_unresolved_symbol_get_inner (_tmp24_);
							_tmp26_ = _tmp25_;
							if (!(_tmp26_ != NULL)) {
								break;
							}
							_tmp27_ = umap_to;
							_tmp28_ = vala_unresolved_symbol_get_inner (_tmp27_);
							_tmp29_ = _tmp28_;
							_tmp30_ = _vala_code_node_ref0 (_tmp29_);
							_vala_code_node_unref0 (umap_to);
							umap_to = _tmp30_;
							_tmp31_ = map_from;
							_tmp32_ = umap_to;
							_tmp33_ = vala_symbol_get_name ((ValaSymbol*) _tmp32_);
							_tmp34_ = _tmp33_;
							_tmp35_ = vala_unresolved_symbol_new (NULL, _tmp34_, NULL);
							_tmp36_ = _tmp35_;
							vala_unresolved_symbol_set_inner (_tmp31_, _tmp36_);
							_vala_code_node_unref0 (_tmp36_);
							_tmp37_ = map_from;
							_tmp38_ = vala_unresolved_symbol_get_inner (_tmp37_);
							_tmp39_ = _tmp38_;
							_tmp40_ = _vala_code_node_ref0 (_tmp39_);
							_vala_code_node_unref0 (map_from);
							map_from = _tmp40_;
						}
						_vala_code_node_unref0 (umap_to);
					} else {
						while (TRUE) {
							gboolean _tmp41_ = FALSE;
							ValaSymbol* _tmp42_;
							ValaSymbol* _tmp43_;
							ValaSymbol* _tmp44_;
							ValaSymbol* _tmp51_;
							ValaSymbol* _tmp52_;
							ValaSymbol* _tmp53_;
							ValaSymbol* _tmp54_;
							ValaUnresolvedSymbol* _tmp55_;
							ValaSymbol* _tmp56_;
							const gchar* _tmp57_;
							const gchar* _tmp58_;
							ValaUnresolvedSymbol* _tmp59_;
							ValaUnresolvedSymbol* _tmp60_;
							ValaUnresolvedSymbol* _tmp61_;
							ValaUnresolvedSymbol* _tmp62_;
							ValaUnresolvedSymbol* _tmp63_;
							ValaUnresolvedSymbol* _tmp64_;
							_tmp42_ = map_to;
							_tmp43_ = vala_symbol_get_parent_symbol (_tmp42_);
							_tmp44_ = _tmp43_;
							if (_tmp44_ != NULL) {
								ValaSymbol* _tmp45_;
								ValaSymbol* _tmp46_;
								ValaSymbol* _tmp47_;
								ValaCodeContext* _tmp48_;
								ValaNamespace* _tmp49_;
								ValaNamespace* _tmp50_;
								_tmp45_ = map_to;
								_tmp46_ = vala_symbol_get_parent_symbol (_tmp45_);
								_tmp47_ = _tmp46_;
								_tmp48_ = self->priv->context;
								_tmp49_ = vala_code_context_get_root (_tmp48_);
								_tmp50_ = _tmp49_;
								_tmp41_ = _tmp47_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, VALA_TYPE_SYMBOL, ValaSymbol);
							} else {
								_tmp41_ = FALSE;
							}
							if (!_tmp41_) {
								break;
							}
							_tmp51_ = map_to;
							_tmp52_ = vala_symbol_get_parent_symbol (_tmp51_);
							_tmp53_ = _tmp52_;
							_tmp54_ = _vala_code_node_ref0 (_tmp53_);
							_vala_code_node_unref0 (map_to);
							map_to = _tmp54_;
							_tmp55_ = map_from;
							_tmp56_ = map_to;
							_tmp57_ = vala_symbol_get_name (_tmp56_);
							_tmp58_ = _tmp57_;
							_tmp59_ = vala_unresolved_symbol_new (NULL, _tmp58_, NULL);
							_tmp60_ = _tmp59_;
							vala_unresolved_symbol_set_inner (_tmp55_, _tmp60_);
							_vala_code_node_unref0 (_tmp60_);
							_tmp61_ = map_from;
							_tmp62_ = vala_unresolved_symbol_get_inner (_tmp61_);
							_tmp63_ = _tmp62_;
							_tmp64_ = _vala_code_node_ref0 (_tmp63_);
							_vala_code_node_unref0 (map_from);
							map_from = _tmp64_;
						}
					}
					_vala_code_node_unref0 (map_to);
					break;
				}
				_tmp65_ = map_from;
				_tmp66_ = vala_unresolved_symbol_get_inner (_tmp65_);
				_tmp67_ = _tmp66_;
				_tmp68_ = _vala_code_node_ref0 (_tmp67_);
				_vala_code_node_unref0 (map_from);
				map_from = _tmp68_;
				_vala_code_node_unref0 (map_to);
			}
			_vala_code_node_unref0 (map_from);
		}
		_vala_iterable_unref0 (_map_from_list);
	}
}


static void vala_gir_parser_create_new_namespaces (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	{
		ValaArrayList* _node_list = NULL;
		ValaArrayList* _tmp0_;
		ValaArrayList* _tmp1_;
		gint _node_size = 0;
		ValaArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _node_index = 0;
		_tmp0_ = vala_gir_parser_node_new_namespaces;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_node_list = _tmp1_;
		_tmp2_ = _node_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_node_size = _tmp4_;
		_node_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaGirParserNode* node = NULL;
			ValaArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaGirParserNode* _tmp11_;
			ValaSymbol* _tmp12_;
			_tmp5_ = _node_index;
			_node_index = _tmp5_ + 1;
			_tmp6_ = _node_index;
			_tmp7_ = _node_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _node_list;
			_tmp9_ = _node_index;
			_tmp10_ = vala_list_get ((ValaList*) _tmp8_, _tmp9_);
			node = (ValaGirParserNode*) _tmp10_;
			_tmp11_ = node;
			_tmp12_ = _tmp11_->symbol;
			if (_tmp12_ == NULL) {
				ValaGirParserNode* _tmp13_;
				ValaGirParserNode* _tmp14_;
				const gchar* _tmp15_;
				ValaGirParserNode* _tmp16_;
				ValaSourceReference* _tmp17_;
				ValaNamespace* _tmp18_;
				_tmp13_ = node;
				_tmp14_ = node;
				_tmp15_ = _tmp14_->name;
				_tmp16_ = node;
				_tmp17_ = _tmp16_->source_reference;
				_tmp18_ = vala_namespace_new (_tmp15_, _tmp17_);
				_vala_code_node_unref0 (_tmp13_->symbol);
				_tmp13_->symbol = (ValaSymbol*) _tmp18_;
			}
			_vala_gir_parser_node_unref0 (node);
		}
		_vala_iterable_unref0 (_node_list);
	}
}


static void vala_gir_parser_resolve_type_arguments (ValaGirParser* self) {
	g_return_if_fail (self != NULL);
	{
		ValaArrayList* _element_type_list = NULL;
		ValaArrayList* _tmp0_;
		ValaArrayList* _tmp1_;
		gint _element_type_size = 0;
		ValaArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _element_type_index = 0;
		_tmp0_ = self->priv->unresolved_type_arguments;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_element_type_list = _tmp1_;
		_tmp2_ = _element_type_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_element_type_size = _tmp4_;
		_element_type_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaDataType* element_type = NULL;
			ValaArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaTypeSymbol* sym = NULL;
			ValaDataType* _tmp11_;
			ValaStruct* st = NULL;
			ValaTypeSymbol* _tmp24_;
			ValaStruct* _tmp25_;
			gboolean _tmp26_ = FALSE;
			gboolean _tmp27_ = FALSE;
			ValaStruct* _tmp28_;
			_tmp5_ = _element_type_index;
			_element_type_index = _tmp5_ + 1;
			_tmp6_ = _element_type_index;
			_tmp7_ = _element_type_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _element_type_list;
			_tmp9_ = _element_type_index;
			_tmp10_ = vala_list_get ((ValaList*) _tmp8_, _tmp9_);
			element_type = (ValaDataType*) _tmp10_;
			sym = NULL;
			_tmp11_ = element_type;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, VALA_TYPE_UNRESOLVED_TYPE)) {
				ValaGirParserNode* _tmp12_;
				ValaDataType* _tmp13_;
				ValaUnresolvedSymbol* _tmp14_;
				ValaUnresolvedSymbol* _tmp15_;
				ValaSymbol* _tmp16_;
				_tmp12_ = self->priv->root;
				_tmp13_ = element_type;
				_tmp14_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
				_tmp15_ = _tmp14_;
				_tmp16_ = vala_gir_parser_resolve_symbol (self, _tmp12_, _tmp15_);
				_vala_code_node_unref0 (sym);
				sym = G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol);
			} else {
				ValaDataType* _tmp17_;
				ValaTypeSymbol* _tmp18_;
				ValaTypeSymbol* _tmp19_;
				_tmp17_ = element_type;
				_tmp18_ = vala_data_type_get_data_type (_tmp17_);
				_tmp19_ = _tmp18_;
				if (_tmp19_ != NULL) {
					ValaDataType* _tmp20_;
					ValaTypeSymbol* _tmp21_;
					ValaTypeSymbol* _tmp22_;
					ValaTypeSymbol* _tmp23_;
					_tmp20_ = element_type;
					_tmp21_ = vala_data_type_get_data_type (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = _vala_code_node_ref0 (_tmp22_);
					_vala_code_node_unref0 (sym);
					sym = _tmp23_;
				}
			}
			_tmp24_ = sym;
			_tmp25_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp24_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp24_) : NULL);
			st = _tmp25_;
			_tmp28_ = st;
			if (_tmp28_ != NULL) {
				ValaStruct* _tmp29_;
				gboolean _tmp30_;
				_tmp29_ = st;
				_tmp30_ = vala_struct_is_integer_type (_tmp29_);
				_tmp27_ = !_tmp30_;
			} else {
				_tmp27_ = FALSE;
			}
			if (_tmp27_) {
				ValaStruct* _tmp31_;
				gboolean _tmp32_;
				_tmp31_ = st;
				_tmp32_ = vala_struct_is_floating_type (_tmp31_);
				_tmp26_ = !_tmp32_;
			} else {
				_tmp26_ = FALSE;
			}
			if (_tmp26_) {
				ValaDataType* _tmp33_;
				_tmp33_ = element_type;
				vala_data_type_set_nullable (_tmp33_, TRUE);
			}
			_vala_code_node_unref0 (st);
			_vala_code_node_unref0 (sym);
			_vala_code_node_unref0 (element_type);
		}
		_vala_iterable_unref0 (_element_type_list);
	}
}


static void vala_gir_parser_process_interface (ValaGirParser* self, ValaGirParserNode* iface_node) {
	ValaInterface* iface = NULL;
	ValaGirParserNode* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaInterface* _tmp2_;
	gboolean has_instantiable_prereq = FALSE;
	gboolean _tmp28_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (iface_node != NULL);
	_tmp0_ = iface_node;
	_tmp1_ = _tmp0_->symbol;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_INTERFACE, ValaInterface));
	iface = _tmp2_;
	has_instantiable_prereq = FALSE;
	{
		ValaList* _prereq_list = NULL;
		ValaInterface* _tmp3_;
		ValaList* _tmp4_;
		gint _prereq_size = 0;
		ValaList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _prereq_index = 0;
		_tmp3_ = iface;
		_tmp4_ = vala_interface_get_prerequisites (_tmp3_);
		_prereq_list = _tmp4_;
		_tmp5_ = _prereq_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_prereq_size = _tmp7_;
		_prereq_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaDataType* prereq = NULL;
			ValaList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			ValaSymbol* sym = NULL;
			ValaDataType* _tmp14_;
			ValaSymbol* _tmp27_;
			_tmp8_ = _prereq_index;
			_prereq_index = _tmp8_ + 1;
			_tmp9_ = _prereq_index;
			_tmp10_ = _prereq_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _prereq_list;
			_tmp12_ = _prereq_index;
			_tmp13_ = vala_list_get (_tmp11_, _tmp12_);
			prereq = (ValaDataType*) _tmp13_;
			sym = NULL;
			_tmp14_ = prereq;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, VALA_TYPE_UNRESOLVED_TYPE)) {
				ValaUnresolvedSymbol* unresolved_symbol = NULL;
				ValaDataType* _tmp15_;
				ValaUnresolvedSymbol* _tmp16_;
				ValaUnresolvedSymbol* _tmp17_;
				ValaUnresolvedSymbol* _tmp18_;
				ValaGirParserNode* _tmp19_;
				ValaGirParserNode* _tmp20_;
				ValaUnresolvedSymbol* _tmp21_;
				ValaSymbol* _tmp22_;
				_tmp15_ = prereq;
				_tmp16_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
				_tmp17_ = _tmp16_;
				_tmp18_ = _vala_code_node_ref0 (_tmp17_);
				unresolved_symbol = _tmp18_;
				_tmp19_ = iface_node;
				_tmp20_ = _tmp19_->parent;
				_tmp21_ = unresolved_symbol;
				_tmp22_ = vala_gir_parser_resolve_symbol (self, _tmp20_, _tmp21_);
				_vala_code_node_unref0 (sym);
				sym = _tmp22_;
				_vala_code_node_unref0 (unresolved_symbol);
			} else {
				ValaDataType* _tmp23_;
				ValaTypeSymbol* _tmp24_;
				ValaTypeSymbol* _tmp25_;
				ValaSymbol* _tmp26_;
				_tmp23_ = prereq;
				_tmp24_ = vala_data_type_get_data_type (_tmp23_);
				_tmp25_ = _tmp24_;
				_tmp26_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp25_);
				_vala_code_node_unref0 (sym);
				sym = _tmp26_;
			}
			_tmp27_ = sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp27_, VALA_TYPE_CLASS)) {
				has_instantiable_prereq = TRUE;
				_vala_code_node_unref0 (sym);
				_vala_code_node_unref0 (prereq);
				break;
			}
			_vala_code_node_unref0 (sym);
			_vala_code_node_unref0 (prereq);
		}
		_vala_iterable_unref0 (_prereq_list);
	}
	_tmp28_ = has_instantiable_prereq;
	if (!_tmp28_) {
		ValaInterface* _tmp29_;
		ValaNamespace* _tmp30_;
		ValaScope* _tmp31_;
		ValaScope* _tmp32_;
		ValaSymbol* _tmp33_;
		ValaObjectTypeSymbol* _tmp34_;
		ValaObjectType* _tmp35_;
		ValaObjectType* _tmp36_;
		_tmp29_ = iface;
		_tmp30_ = self->priv->glib_ns;
		_tmp31_ = vala_symbol_get_scope ((ValaSymbol*) _tmp30_);
		_tmp32_ = _tmp31_;
		_tmp33_ = vala_scope_lookup (_tmp32_, "Object");
		_tmp34_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, VALA_TYPE_OBJECT_TYPE_SYMBOL, ValaObjectTypeSymbol);
		_tmp35_ = vala_object_type_new (_tmp34_);
		_tmp36_ = _tmp35_;
		vala_interface_add_prerequisite (_tmp29_, (ValaDataType*) _tmp36_);
		_vala_code_node_unref0 (_tmp36_);
		_vala_code_node_unref0 (_tmp34_);
	}
	_vala_code_node_unref0 (iface);
}


static void vala_gir_parser_process_alias (ValaGirParser* self, ValaGirParserNode* alias) {
	ValaDataType* base_type = NULL;
	ValaSymbol* type_sym = NULL;
	ValaGirParserNode* base_node = NULL;
	gboolean simple_type = FALSE;
	ValaGirParserNode* _tmp0_;
	ValaDataType* _tmp1_;
	gboolean _tmp40_ = FALSE;
	ValaSymbol* _tmp41_;
	gboolean _tmp44_ = FALSE;
	gboolean _tmp45_ = FALSE;
	ValaDataType* _tmp46_;
	gboolean _tmp168_ = FALSE;
	ValaSymbol* _tmp169_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (alias != NULL);
	base_type = NULL;
	type_sym = NULL;
	base_node = NULL;
	simple_type = FALSE;
	_tmp0_ = alias;
	_tmp1_ = _tmp0_->base_type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_UNRESOLVED_TYPE)) {
		ValaGirParserNode* _tmp2_;
		ValaDataType* _tmp3_;
		ValaDataType* _tmp4_;
		ValaGirParserNode* _tmp5_;
		ValaGirParserNode* _tmp6_;
		ValaDataType* _tmp7_;
		ValaUnresolvedSymbol* _tmp8_;
		ValaUnresolvedSymbol* _tmp9_;
		ValaGirParserNode* _tmp10_;
		ValaGirParserNode* _tmp11_;
		_tmp2_ = alias;
		_tmp3_ = _tmp2_->base_type;
		_tmp4_ = _vala_code_node_ref0 (_tmp3_);
		_vala_code_node_unref0 (base_type);
		base_type = _tmp4_;
		_tmp5_ = alias;
		_tmp6_ = _tmp5_->parent;
		_tmp7_ = base_type;
		_tmp8_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
		_tmp9_ = _tmp8_;
		_tmp10_ = vala_gir_parser_resolve_node (self, _tmp6_, _tmp9_, FALSE);
		_vala_gir_parser_node_unref0 (base_node);
		base_node = _tmp10_;
		_tmp11_ = base_node;
		if (_tmp11_ != NULL) {
			ValaGirParserNode* _tmp12_;
			ValaSymbol* _tmp13_;
			ValaSymbol* _tmp14_;
			_tmp12_ = base_node;
			_tmp13_ = _tmp12_->symbol;
			_tmp14_ = _vala_code_node_ref0 (_tmp13_);
			_vala_code_node_unref0 (type_sym);
			type_sym = _tmp14_;
		}
	} else {
		gboolean _tmp15_ = FALSE;
		ValaGirParserNode* _tmp16_;
		ValaDataType* _tmp17_;
		_tmp16_ = alias;
		_tmp17_ = _tmp16_->base_type;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, VALA_TYPE_POINTER_TYPE)) {
			ValaGirParserNode* _tmp18_;
			ValaDataType* _tmp19_;
			ValaDataType* _tmp20_;
			ValaDataType* _tmp21_;
			_tmp18_ = alias;
			_tmp19_ = _tmp18_->base_type;
			_tmp20_ = vala_pointer_type_get_base_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, VALA_TYPE_POINTER_TYPE, ValaPointerType));
			_tmp21_ = _tmp20_;
			_tmp15_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_VOID_TYPE);
		} else {
			_tmp15_ = FALSE;
		}
		if (_tmp15_) {
			simple_type = TRUE;
		} else {
			ValaGirParserNode* _tmp22_;
			ValaDataType* _tmp23_;
			ValaDataType* _tmp24_;
			ValaDataType* _tmp25_;
			ValaTypeSymbol* _tmp26_;
			ValaTypeSymbol* _tmp27_;
			ValaSymbol* _tmp28_;
			ValaSymbol* _tmp29_;
			_tmp22_ = alias;
			_tmp23_ = _tmp22_->base_type;
			_tmp24_ = _vala_code_node_ref0 (_tmp23_);
			_vala_code_node_unref0 (base_type);
			base_type = _tmp24_;
			_tmp25_ = base_type;
			_tmp26_ = vala_data_type_get_data_type (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp27_);
			_vala_code_node_unref0 (type_sym);
			type_sym = _tmp28_;
			_tmp29_ = type_sym;
			if (_tmp29_ != NULL) {
				ValaGirParserNode* _tmp30_;
				ValaGirParserNode* _tmp31_;
				ValaSymbol* _tmp32_;
				gchar* _tmp33_;
				gchar* _tmp34_;
				ValaGirParserNode* _tmp35_;
				ValaSourceReference* _tmp36_;
				ValaUnresolvedSymbol* _tmp37_;
				ValaUnresolvedSymbol* _tmp38_;
				ValaGirParserNode* _tmp39_;
				_tmp30_ = alias;
				_tmp31_ = _tmp30_->parent;
				_tmp32_ = type_sym;
				_tmp33_ = vala_symbol_get_full_name (_tmp32_);
				_tmp34_ = _tmp33_;
				_tmp35_ = alias;
				_tmp36_ = _tmp35_->source_reference;
				_tmp37_ = vala_gir_parser_parse_symbol_from_string (self, _tmp34_, _tmp36_);
				_tmp38_ = _tmp37_;
				_tmp39_ = vala_gir_parser_resolve_node (self, _tmp31_, _tmp38_, FALSE);
				_vala_gir_parser_node_unref0 (base_node);
				base_node = _tmp39_;
				_vala_code_node_unref0 (_tmp38_);
				_g_free0 (_tmp34_);
			}
		}
	}
	_tmp41_ = type_sym;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp41_, VALA_TYPE_STRUCT)) {
		ValaSymbol* _tmp42_;
		gboolean _tmp43_;
		_tmp42_ = type_sym;
		_tmp43_ = vala_struct_is_simple_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, VALA_TYPE_STRUCT, ValaStruct));
		_tmp40_ = _tmp43_;
	} else {
		_tmp40_ = FALSE;
	}
	if (_tmp40_) {
		simple_type = TRUE;
	}
	_tmp46_ = base_type;
	if (_tmp46_ == NULL) {
		_tmp45_ = TRUE;
	} else {
		ValaSymbol* _tmp47_;
		_tmp47_ = type_sym;
		_tmp45_ = _tmp47_ == NULL;
	}
	if (_tmp45_) {
		_tmp44_ = TRUE;
	} else {
		ValaSymbol* _tmp48_;
		_tmp48_ = type_sym;
		_tmp44_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp48_, VALA_TYPE_STRUCT);
	}
	if (_tmp44_) {
		ValaStruct* st = NULL;
		ValaGirParserNode* _tmp49_;
		const gchar* _tmp50_;
		ValaGirParserNode* _tmp51_;
		ValaSourceReference* _tmp52_;
		ValaStruct* _tmp53_;
		ValaStruct* _tmp54_;
		ValaDataType* _tmp55_;
		ValaStruct* _tmp58_;
		ValaGirParserNode* _tmp59_;
		ValaGirComment* _tmp60_;
		ValaStruct* _tmp61_;
		ValaStruct* _tmp62_;
		gboolean _tmp63_;
		ValaGirParserNode* _tmp64_;
		ValaStruct* _tmp65_;
		ValaSymbol* _tmp66_;
		_tmp49_ = alias;
		_tmp50_ = _tmp49_->name;
		_tmp51_ = alias;
		_tmp52_ = _tmp51_->source_reference;
		_tmp53_ = vala_struct_new (_tmp50_, _tmp52_, NULL);
		st = _tmp53_;
		_tmp54_ = st;
		vala_symbol_set_access ((ValaSymbol*) _tmp54_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
		_tmp55_ = base_type;
		if (_tmp55_ != NULL) {
			ValaStruct* _tmp56_;
			ValaDataType* _tmp57_;
			_tmp56_ = st;
			_tmp57_ = base_type;
			vala_struct_set_base_type (_tmp56_, _tmp57_);
		}
		_tmp58_ = st;
		_tmp59_ = alias;
		_tmp60_ = _tmp59_->comment;
		vala_symbol_set_comment ((ValaSymbol*) _tmp58_, (ValaComment*) _tmp60_);
		_tmp61_ = st;
		vala_symbol_set_external ((ValaSymbol*) _tmp61_, TRUE);
		_tmp62_ = st;
		_tmp63_ = simple_type;
		vala_struct_set_simple_type (_tmp62_, _tmp63_);
		_tmp64_ = alias;
		_tmp65_ = st;
		_tmp66_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp65_);
		_vala_code_node_unref0 (_tmp64_->symbol);
		_tmp64_->symbol = _tmp66_;
		_vala_code_node_unref0 (st);
	} else {
		ValaSymbol* _tmp67_;
		_tmp67_ = type_sym;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp67_, VALA_TYPE_CLASS)) {
			ValaClass* cl = NULL;
			ValaGirParserNode* _tmp68_;
			const gchar* _tmp69_;
			ValaGirParserNode* _tmp70_;
			ValaSourceReference* _tmp71_;
			ValaClass* _tmp72_;
			ValaClass* _tmp73_;
			ValaDataType* _tmp74_;
			ValaClass* _tmp77_;
			ValaGirParserNode* _tmp78_;
			ValaGirComment* _tmp79_;
			ValaClass* _tmp80_;
			ValaClass* _tmp81_;
			ValaSymbol* _tmp82_;
			gboolean _tmp83_;
			gboolean _tmp84_;
			ValaGirParserNode* _tmp85_;
			ValaClass* _tmp86_;
			ValaSymbol* _tmp87_;
			_tmp68_ = alias;
			_tmp69_ = _tmp68_->name;
			_tmp70_ = alias;
			_tmp71_ = _tmp70_->source_reference;
			_tmp72_ = vala_class_new (_tmp69_, _tmp71_, NULL);
			cl = _tmp72_;
			_tmp73_ = cl;
			vala_symbol_set_access ((ValaSymbol*) _tmp73_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
			_tmp74_ = base_type;
			if (_tmp74_ != NULL) {
				ValaClass* _tmp75_;
				ValaDataType* _tmp76_;
				_tmp75_ = cl;
				_tmp76_ = base_type;
				vala_class_add_base_type (_tmp75_, _tmp76_);
			}
			_tmp77_ = cl;
			_tmp78_ = alias;
			_tmp79_ = _tmp78_->comment;
			vala_symbol_set_comment ((ValaSymbol*) _tmp77_, (ValaComment*) _tmp79_);
			_tmp80_ = cl;
			vala_symbol_set_external ((ValaSymbol*) _tmp80_, TRUE);
			_tmp81_ = cl;
			_tmp82_ = type_sym;
			_tmp83_ = vala_class_get_is_compact (G_TYPE_CHECK_INSTANCE_CAST (_tmp82_, VALA_TYPE_CLASS, ValaClass));
			_tmp84_ = _tmp83_;
			vala_class_set_is_compact (_tmp81_, _tmp84_);
			_tmp85_ = alias;
			_tmp86_ = cl;
			_tmp87_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp86_);
			_vala_code_node_unref0 (_tmp85_->symbol);
			_tmp85_->symbol = _tmp87_;
			_vala_code_node_unref0 (cl);
		} else {
			ValaSymbol* _tmp88_;
			_tmp88_ = type_sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp88_, VALA_TYPE_INTERFACE)) {
				ValaInterface* iface = NULL;
				ValaGirParserNode* _tmp89_;
				const gchar* _tmp90_;
				ValaGirParserNode* _tmp91_;
				ValaSourceReference* _tmp92_;
				ValaInterface* _tmp93_;
				ValaInterface* _tmp94_;
				ValaDataType* _tmp95_;
				ValaInterface* _tmp98_;
				ValaGirParserNode* _tmp99_;
				ValaGirComment* _tmp100_;
				ValaInterface* _tmp101_;
				ValaGirParserNode* _tmp102_;
				ValaInterface* _tmp103_;
				ValaSymbol* _tmp104_;
				_tmp89_ = alias;
				_tmp90_ = _tmp89_->name;
				_tmp91_ = alias;
				_tmp92_ = _tmp91_->source_reference;
				_tmp93_ = vala_interface_new (_tmp90_, _tmp92_, NULL);
				iface = _tmp93_;
				_tmp94_ = iface;
				vala_symbol_set_access ((ValaSymbol*) _tmp94_, VALA_SYMBOL_ACCESSIBILITY_PUBLIC);
				_tmp95_ = base_type;
				if (_tmp95_ != NULL) {
					ValaInterface* _tmp96_;
					ValaDataType* _tmp97_;
					_tmp96_ = iface;
					_tmp97_ = base_type;
					vala_interface_add_prerequisite (_tmp96_, _tmp97_);
				}
				_tmp98_ = iface;
				_tmp99_ = alias;
				_tmp100_ = _tmp99_->comment;
				vala_symbol_set_comment ((ValaSymbol*) _tmp98_, (ValaComment*) _tmp100_);
				_tmp101_ = iface;
				vala_symbol_set_external ((ValaSymbol*) _tmp101_, TRUE);
				_tmp102_ = alias;
				_tmp103_ = iface;
				_tmp104_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp103_);
				_vala_code_node_unref0 (_tmp102_->symbol);
				_tmp102_->symbol = _tmp104_;
				_vala_code_node_unref0 (iface);
			} else {
				ValaSymbol* _tmp105_;
				_tmp105_ = type_sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp105_, VALA_TYPE_DELEGATE)) {
					ValaDelegate* orig = NULL;
					ValaSymbol* _tmp106_;
					ValaDelegate* _tmp107_;
					ValaGirParserNode* _tmp108_;
					ValaDelegate* deleg = NULL;
					ValaGirParserNode* _tmp113_;
					const gchar* _tmp114_;
					ValaDelegate* _tmp115_;
					ValaDataType* _tmp116_;
					ValaDataType* _tmp117_;
					ValaDataType* _tmp118_;
					ValaDataType* _tmp119_;
					ValaGirParserNode* _tmp120_;
					ValaSourceReference* _tmp121_;
					ValaDelegate* _tmp122_;
					ValaDelegate* _tmp123_;
					ValaDelegate* _tmp124_;
					ValaDelegate* _tmp125_;
					ValaSymbolAccessibility _tmp126_;
					ValaSymbolAccessibility _tmp127_;
					ValaDelegate* _tmp158_;
					GList* _tmp159_;
					ValaDelegate* _tmp164_;
					ValaGirParserNode* _tmp165_;
					ValaDelegate* _tmp166_;
					ValaSymbol* _tmp167_;
					_tmp106_ = type_sym;
					_tmp107_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp106_, VALA_TYPE_DELEGATE, ValaDelegate));
					orig = _tmp107_;
					_tmp108_ = base_node;
					if (_tmp108_ != NULL) {
						ValaGirParserNode* _tmp109_;
						ValaGirParserNode* _tmp110_;
						ValaSymbol* _tmp111_;
						ValaDelegate* _tmp112_;
						_tmp109_ = base_node;
						vala_gir_parser_node_process (_tmp109_, self);
						_tmp110_ = base_node;
						_tmp111_ = _tmp110_->symbol;
						_tmp112_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp111_, VALA_TYPE_DELEGATE, ValaDelegate));
						_vala_code_node_unref0 (orig);
						orig = _tmp112_;
					}
					_tmp113_ = alias;
					_tmp114_ = _tmp113_->name;
					_tmp115_ = orig;
					_tmp116_ = vala_callable_get_return_type ((ValaCallable*) _tmp115_);
					_tmp117_ = _tmp116_;
					_tmp118_ = vala_data_type_copy (_tmp117_);
					_tmp119_ = _tmp118_;
					_tmp120_ = alias;
					_tmp121_ = _tmp120_->source_reference;
					_tmp122_ = vala_delegate_new (_tmp114_, _tmp119_, _tmp121_, NULL);
					_tmp123_ = _tmp122_;
					_vala_code_node_unref0 (_tmp119_);
					deleg = _tmp123_;
					_tmp124_ = deleg;
					_tmp125_ = orig;
					_tmp126_ = vala_symbol_get_access ((ValaSymbol*) _tmp125_);
					_tmp127_ = _tmp126_;
					vala_symbol_set_access ((ValaSymbol*) _tmp124_, _tmp127_);
					{
						ValaList* _param_list = NULL;
						ValaDelegate* _tmp128_;
						ValaList* _tmp129_;
						gint _param_size = 0;
						ValaList* _tmp130_;
						gint _tmp131_;
						gint _tmp132_;
						gint _param_index = 0;
						_tmp128_ = orig;
						_tmp129_ = vala_callable_get_parameters ((ValaCallable*) _tmp128_);
						_param_list = _tmp129_;
						_tmp130_ = _param_list;
						_tmp131_ = vala_collection_get_size ((ValaCollection*) _tmp130_);
						_tmp132_ = _tmp131_;
						_param_size = _tmp132_;
						_param_index = -1;
						while (TRUE) {
							gint _tmp133_;
							gint _tmp134_;
							gint _tmp135_;
							ValaParameter* param = NULL;
							ValaList* _tmp136_;
							gint _tmp137_;
							gpointer _tmp138_;
							ValaDelegate* _tmp139_;
							ValaParameter* _tmp140_;
							ValaParameter* _tmp141_;
							ValaParameter* _tmp142_;
							_tmp133_ = _param_index;
							_param_index = _tmp133_ + 1;
							_tmp134_ = _param_index;
							_tmp135_ = _param_size;
							if (!(_tmp134_ < _tmp135_)) {
								break;
							}
							_tmp136_ = _param_list;
							_tmp137_ = _param_index;
							_tmp138_ = vala_list_get (_tmp136_, _tmp137_);
							param = (ValaParameter*) _tmp138_;
							_tmp139_ = deleg;
							_tmp140_ = param;
							_tmp141_ = vala_parameter_copy (_tmp140_);
							_tmp142_ = _tmp141_;
							vala_callable_add_parameter ((ValaCallable*) _tmp139_, _tmp142_);
							_vala_code_node_unref0 (_tmp142_);
							_vala_code_node_unref0 (param);
						}
						_vala_iterable_unref0 (_param_list);
					}
					{
						ValaList* _error_type_list = NULL;
						ValaDelegate* _tmp143_;
						ValaList* _tmp144_;
						gint _error_type_size = 0;
						ValaList* _tmp145_;
						gint _tmp146_;
						gint _tmp147_;
						gint _error_type_index = 0;
						_tmp143_ = orig;
						_tmp144_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp143_);
						_error_type_list = _tmp144_;
						_tmp145_ = _error_type_list;
						_tmp146_ = vala_collection_get_size ((ValaCollection*) _tmp145_);
						_tmp147_ = _tmp146_;
						_error_type_size = _tmp147_;
						_error_type_index = -1;
						while (TRUE) {
							gint _tmp148_;
							gint _tmp149_;
							gint _tmp150_;
							ValaDataType* error_type = NULL;
							ValaList* _tmp151_;
							gint _tmp152_;
							gpointer _tmp153_;
							ValaDelegate* _tmp154_;
							ValaDataType* _tmp155_;
							ValaDataType* _tmp156_;
							ValaDataType* _tmp157_;
							_tmp148_ = _error_type_index;
							_error_type_index = _tmp148_ + 1;
							_tmp149_ = _error_type_index;
							_tmp150_ = _error_type_size;
							if (!(_tmp149_ < _tmp150_)) {
								break;
							}
							_tmp151_ = _error_type_list;
							_tmp152_ = _error_type_index;
							_tmp153_ = vala_list_get (_tmp151_, _tmp152_);
							error_type = (ValaDataType*) _tmp153_;
							_tmp154_ = deleg;
							_tmp155_ = error_type;
							_tmp156_ = vala_data_type_copy (_tmp155_);
							_tmp157_ = _tmp156_;
							vala_code_node_add_error_type ((ValaCodeNode*) _tmp154_, _tmp157_);
							_vala_code_node_unref0 (_tmp157_);
							_vala_code_node_unref0 (error_type);
						}
						_vala_iterable_unref0 (_error_type_list);
					}
					_tmp158_ = orig;
					_tmp159_ = ((ValaCodeNode*) _tmp158_)->attributes;
					{
						GList* attribute_collection = NULL;
						GList* attribute_it = NULL;
						attribute_collection = _tmp159_;
						for (attribute_it = attribute_collection; attribute_it != NULL; attribute_it = attribute_it->next) {
							ValaAttribute* _tmp160_;
							ValaAttribute* attribute = NULL;
							_tmp160_ = _vala_code_node_ref0 ((ValaAttribute*) attribute_it->data);
							attribute = _tmp160_;
							{
								ValaDelegate* _tmp161_;
								ValaAttribute* _tmp162_;
								ValaAttribute* _tmp163_;
								_tmp161_ = deleg;
								_tmp162_ = attribute;
								_tmp163_ = _vala_code_node_ref0 (_tmp162_);
								((ValaCodeNode*) _tmp161_)->attributes = g_list_append (((ValaCodeNode*) _tmp161_)->attributes, _tmp163_);
								_vala_code_node_unref0 (attribute);
							}
						}
					}
					_tmp164_ = deleg;
					vala_symbol_set_external ((ValaSymbol*) _tmp164_, TRUE);
					_tmp165_ = alias;
					_tmp166_ = deleg;
					_tmp167_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp166_);
					_vala_code_node_unref0 (_tmp165_->symbol);
					_tmp165_->symbol = _tmp167_;
					_vala_code_node_unref0 (deleg);
					_vala_code_node_unref0 (orig);
				}
			}
		}
	}
	_tmp169_ = type_sym;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp169_, VALA_TYPE_CLASS)) {
		_tmp168_ = TRUE;
	} else {
		gboolean _tmp170_ = FALSE;
		ValaSymbol* _tmp171_;
		_tmp171_ = type_sym;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp171_, VALA_TYPE_STRUCT)) {
			gboolean _tmp172_;
			_tmp172_ = simple_type;
			_tmp170_ = !_tmp172_;
		} else {
			_tmp170_ = FALSE;
		}
		_tmp168_ = _tmp170_;
	}
	if (_tmp168_) {
		ValaSymbol* _tmp173_;
		gboolean _tmp174_;
		_tmp173_ = type_sym;
		_tmp174_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp173_, "CCode", "has_type_id");
		if (_tmp174_) {
			ValaGirParserNode* _tmp175_;
			ValaSymbol* _tmp176_;
			ValaSymbol* _tmp177_;
			gboolean _tmp178_;
			_tmp175_ = alias;
			_tmp176_ = _tmp175_->symbol;
			_tmp177_ = type_sym;
			_tmp178_ = vala_code_node_get_attribute_bool ((ValaCodeNode*) _tmp177_, "CCode", "has_type_id", FALSE);
			vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp176_, "CCode", "has_type_id", _tmp178_, NULL);
		} else {
			ValaSymbol* _tmp179_;
			gboolean _tmp180_;
			_tmp179_ = type_sym;
			_tmp180_ = vala_code_node_has_attribute_argument ((ValaCodeNode*) _tmp179_, "CCode", "type_id");
			if (_tmp180_) {
				ValaGirParserNode* _tmp181_;
				ValaSymbol* _tmp182_;
				ValaSymbol* _tmp183_;
				gchar* _tmp184_;
				gchar* _tmp185_;
				_tmp181_ = alias;
				_tmp182_ = _tmp181_->symbol;
				_tmp183_ = type_sym;
				_tmp184_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp183_, "CCode", "type_id", NULL);
				_tmp185_ = _tmp184_;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp182_, "CCode", "type_id", _tmp185_, NULL);
				_g_free0 (_tmp185_);
			}
		}
	}
	_vala_gir_parser_node_unref0 (base_node);
	_vala_code_node_unref0 (type_sym);
	_vala_code_node_unref0 (base_type);
}


static void vala_gir_parser_process_callable (ValaGirParser* self, ValaGirParserNode* node) {
	gboolean _tmp0_ = FALSE;
	ValaGirParserNode* _tmp1_;
	const gchar* _tmp2_;
	ValaSymbol* s = NULL;
	ValaGirParserNode* _tmp5_;
	ValaSymbol* _tmp6_;
	ValaSymbol* _tmp7_;
	ValaList* parameters = NULL;
	ValaGirParserNode* _tmp8_;
	ValaList* _tmp9_;
	ValaList* _tmp10_;
	ValaDataType* return_type = NULL;
	ValaSymbol* _tmp11_;
	gboolean _tmp16_ = FALSE;
	ValaDataType* _tmp17_;
	ValaList* _tmp180_;
	gint _tmp181_;
	gint _tmp182_;
	gint i = 0;
	gint j = 0;
	gint last = 0;
	gboolean _tmp431_ = FALSE;
	ValaDataType* _tmp432_;
	ValaSymbol* _tmp441_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp1_ = node;
	_tmp2_ = _tmp1_->element_type;
	if (g_strcmp0 (_tmp2_, "alias") == 0) {
		ValaGirParserNode* _tmp3_;
		ValaSymbol* _tmp4_;
		_tmp3_ = node;
		_tmp4_ = _tmp3_->symbol;
		_tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, VALA_TYPE_DELEGATE);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		return;
	}
	_tmp5_ = node;
	_tmp6_ = _tmp5_->symbol;
	_tmp7_ = _vala_code_node_ref0 (_tmp6_);
	s = _tmp7_;
	_tmp8_ = node;
	_tmp9_ = _tmp8_->parameters;
	_tmp10_ = _vala_iterable_ref0 (_tmp9_);
	parameters = _tmp10_;
	return_type = NULL;
	_tmp11_ = s;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, VALA_TYPE_CALLABLE)) {
		ValaSymbol* _tmp12_;
		ValaDataType* _tmp13_;
		ValaDataType* _tmp14_;
		ValaDataType* _tmp15_;
		_tmp12_ = s;
		_tmp13_ = vala_callable_get_return_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, VALA_TYPE_CALLABLE, ValaCallable));
		_tmp14_ = _tmp13_;
		_tmp15_ = _vala_code_node_ref0 (_tmp14_);
		_vala_code_node_unref0 (return_type);
		return_type = _tmp15_;
	}
	_tmp17_ = return_type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp17_, VALA_TYPE_ARRAY_TYPE)) {
		ValaGirParserNode* _tmp18_;
		gint _tmp19_;
		_tmp18_ = node;
		_tmp19_ = _tmp18_->return_array_length_idx;
		_tmp16_ = _tmp19_ >= 0;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		ValaGirParserNode* _tmp20_;
		gint _tmp21_;
		ValaList* _tmp22_;
		gint _tmp23_;
		gint _tmp24_;
		_tmp20_ = node;
		_tmp21_ = _tmp20_->return_array_length_idx;
		_tmp22_ = parameters;
		_tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_);
		_tmp24_ = _tmp23_;
		if (_tmp21_ >= _tmp24_) {
			ValaDataType* _tmp25_;
			ValaSourceReference* _tmp26_;
			ValaSourceReference* _tmp27_;
			_tmp25_ = return_type;
			_tmp26_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp25_);
			_tmp27_ = _tmp26_;
			vala_report_error (_tmp27_, "invalid array length index");
		} else {
			ValaList* _tmp28_;
			ValaGirParserNode* _tmp29_;
			gint _tmp30_;
			gpointer _tmp31_;
			ValaGirParserParameterInfo* _tmp32_;
			ValaGirParserNode* _tmp33_;
			ValaArrayList* _tmp34_;
			ValaGirParserNode* _tmp35_;
			gint _tmp36_;
			_tmp28_ = parameters;
			_tmp29_ = node;
			_tmp30_ = _tmp29_->return_array_length_idx;
			_tmp31_ = vala_list_get (_tmp28_, _tmp30_);
			_tmp32_ = (ValaGirParserParameterInfo*) _tmp31_;
			_tmp32_->keep = FALSE;
			_vala_gir_parser_parameter_info_unref0 (_tmp32_);
			_tmp33_ = node;
			_tmp34_ = _tmp33_->array_length_parameters;
			_tmp35_ = node;
			_tmp36_ = _tmp35_->return_array_length_idx;
			vala_collection_add ((ValaCollection*) _tmp34_, (gpointer) ((gintptr) _tmp36_));
		}
	} else {
		gboolean _tmp37_ = FALSE;
		ValaDataType* _tmp38_;
		_tmp38_ = return_type;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp38_, VALA_TYPE_VOID_TYPE)) {
			ValaList* _tmp39_;
			gint _tmp40_;
			gint _tmp41_;
			_tmp39_ = parameters;
			_tmp40_ = vala_collection_get_size ((ValaCollection*) _tmp39_);
			_tmp41_ = _tmp40_;
			_tmp37_ = _tmp41_ > 0;
		} else {
			_tmp37_ = FALSE;
		}
		if (_tmp37_) {
			gint n_out_parameters = 0;
			gint _tmp58_;
			n_out_parameters = 0;
			{
				ValaList* _info_list = NULL;
				ValaList* _tmp42_;
				ValaList* _tmp43_;
				gint _info_size = 0;
				ValaList* _tmp44_;
				gint _tmp45_;
				gint _tmp46_;
				gint _info_index = 0;
				_tmp42_ = parameters;
				_tmp43_ = _vala_iterable_ref0 (_tmp42_);
				_info_list = _tmp43_;
				_tmp44_ = _info_list;
				_tmp45_ = vala_collection_get_size ((ValaCollection*) _tmp44_);
				_tmp46_ = _tmp45_;
				_info_size = _tmp46_;
				_info_index = -1;
				while (TRUE) {
					gint _tmp47_;
					gint _tmp48_;
					gint _tmp49_;
					ValaGirParserParameterInfo* info = NULL;
					ValaList* _tmp50_;
					gint _tmp51_;
					gpointer _tmp52_;
					ValaGirParserParameterInfo* _tmp53_;
					ValaParameter* _tmp54_;
					ValaParameterDirection _tmp55_;
					ValaParameterDirection _tmp56_;
					_tmp47_ = _info_index;
					_info_index = _tmp47_ + 1;
					_tmp48_ = _info_index;
					_tmp49_ = _info_size;
					if (!(_tmp48_ < _tmp49_)) {
						break;
					}
					_tmp50_ = _info_list;
					_tmp51_ = _info_index;
					_tmp52_ = vala_list_get (_tmp50_, _tmp51_);
					info = (ValaGirParserParameterInfo*) _tmp52_;
					_tmp53_ = info;
					_tmp54_ = _tmp53_->param;
					_tmp55_ = vala_parameter_get_direction (_tmp54_);
					_tmp56_ = _tmp55_;
					if (_tmp56_ == VALA_PARAMETER_DIRECTION_OUT) {
						gint _tmp57_;
						_tmp57_ = n_out_parameters;
						n_out_parameters = _tmp57_ + 1;
					}
					_vala_gir_parser_parameter_info_unref0 (info);
				}
				_vala_iterable_unref0 (_info_list);
			}
			_tmp58_ = n_out_parameters;
			if (_tmp58_ == 1) {
				ValaGirParserParameterInfo* last_param = NULL;
				ValaList* _tmp59_;
				ValaList* _tmp60_;
				gint _tmp61_;
				gint _tmp62_;
				gpointer _tmp63_;
				ValaGirParserParameterInfo* _tmp64_;
				ValaParameter* _tmp65_;
				ValaParameterDirection _tmp66_;
				ValaParameterDirection _tmp67_;
				_tmp59_ = parameters;
				_tmp60_ = parameters;
				_tmp61_ = vala_collection_get_size ((ValaCollection*) _tmp60_);
				_tmp62_ = _tmp61_;
				_tmp63_ = vala_list_get (_tmp59_, _tmp62_ - 1);
				last_param = (ValaGirParserParameterInfo*) _tmp63_;
				_tmp64_ = last_param;
				_tmp65_ = _tmp64_->param;
				_tmp66_ = vala_parameter_get_direction (_tmp65_);
				_tmp67_ = _tmp66_;
				if (_tmp67_ == VALA_PARAMETER_DIRECTION_OUT) {
					ValaGirParserParameterInfo* _tmp68_;
					ValaParameter* _tmp69_;
					ValaDataType* _tmp70_;
					ValaDataType* _tmp71_;
					_tmp68_ = last_param;
					_tmp69_ = _tmp68_->param;
					_tmp70_ = vala_variable_get_variable_type ((ValaVariable*) _tmp69_);
					_tmp71_ = _tmp70_;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp71_, VALA_TYPE_UNRESOLVED_TYPE)) {
						ValaStruct* st = NULL;
						ValaGirParserNode* _tmp72_;
						ValaGirParserNode* _tmp73_;
						ValaGirParserParameterInfo* _tmp74_;
						ValaParameter* _tmp75_;
						ValaDataType* _tmp76_;
						ValaDataType* _tmp77_;
						ValaUnresolvedSymbol* _tmp78_;
						ValaUnresolvedSymbol* _tmp79_;
						ValaSymbol* _tmp80_;
						ValaStruct* _tmp81_;
						gboolean _tmp82_ = FALSE;
						gboolean _tmp83_ = FALSE;
						ValaStruct* _tmp84_;
						_tmp72_ = node;
						_tmp73_ = _tmp72_->parent;
						_tmp74_ = last_param;
						_tmp75_ = _tmp74_->param;
						_tmp76_ = vala_variable_get_variable_type ((ValaVariable*) _tmp75_);
						_tmp77_ = _tmp76_;
						_tmp78_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp77_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
						_tmp79_ = _tmp78_;
						_tmp80_ = vala_gir_parser_resolve_symbol (self, _tmp73_, _tmp79_);
						_tmp81_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp80_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp80_) : NULL;
						if (_tmp81_ == NULL) {
							_vala_code_node_unref0 (_tmp80_);
						}
						st = _tmp81_;
						_tmp84_ = st;
						if (_tmp84_ != NULL) {
							ValaStruct* _tmp85_;
							gboolean _tmp86_;
							_tmp85_ = st;
							_tmp86_ = vala_struct_is_simple_type (_tmp85_);
							_tmp83_ = !_tmp86_;
						} else {
							_tmp83_ = FALSE;
						}
						if (_tmp83_) {
							ValaGirParserParameterInfo* _tmp87_;
							ValaParameter* _tmp88_;
							ValaDataType* _tmp89_;
							ValaDataType* _tmp90_;
							gboolean _tmp91_;
							gboolean _tmp92_;
							_tmp87_ = last_param;
							_tmp88_ = _tmp87_->param;
							_tmp89_ = vala_variable_get_variable_type ((ValaVariable*) _tmp88_);
							_tmp90_ = _tmp89_;
							_tmp91_ = vala_data_type_get_nullable (_tmp90_);
							_tmp92_ = _tmp91_;
							_tmp82_ = !_tmp92_;
						} else {
							_tmp82_ = FALSE;
						}
						if (_tmp82_) {
							ValaGirParserNode* _tmp93_;
							ValaGirParserMetadata* _tmp94_;
							gboolean _tmp95_;
							_tmp93_ = node;
							_tmp94_ = _tmp93_->metadata;
							_tmp95_ = vala_gir_parser_metadata_get_bool (_tmp94_, VALA_GIR_PARSER_ARGUMENT_TYPE_RETURN_VOID, FALSE);
							if (!_tmp95_) {
								ValaGirParserParameterInfo* _tmp96_;
								ValaGirParserParameterInfo* _tmp97_;
								ValaParameter* _tmp98_;
								ValaDataType* _tmp99_;
								ValaDataType* _tmp100_;
								ValaDataType* _tmp101_;
								_tmp96_ = last_param;
								_tmp96_->keep = FALSE;
								_tmp97_ = last_param;
								_tmp98_ = _tmp97_->param;
								_tmp99_ = vala_variable_get_variable_type ((ValaVariable*) _tmp98_);
								_tmp100_ = _tmp99_;
								_tmp101_ = vala_data_type_copy (_tmp100_);
								_vala_code_node_unref0 (return_type);
								return_type = _tmp101_;
							}
						}
						_vala_code_node_unref0 (st);
					}
				}
				_vala_gir_parser_parameter_info_unref0 (last_param);
			}
		} else {
			gboolean _tmp102_ = FALSE;
			ValaDataType* _tmp103_;
			_tmp103_ = return_type;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp103_, VALA_TYPE_UNRESOLVED_TYPE)) {
				ValaDataType* _tmp104_;
				gboolean _tmp105_;
				gboolean _tmp106_;
				_tmp104_ = return_type;
				_tmp105_ = vala_data_type_get_nullable (_tmp104_);
				_tmp106_ = _tmp105_;
				_tmp102_ = !_tmp106_;
			} else {
				_tmp102_ = FALSE;
			}
			if (_tmp102_) {
				ValaStruct* st = NULL;
				ValaGirParserNode* _tmp107_;
				ValaGirParserNode* _tmp108_;
				ValaDataType* _tmp109_;
				ValaUnresolvedSymbol* _tmp110_;
				ValaUnresolvedSymbol* _tmp111_;
				ValaSymbol* _tmp112_;
				ValaStruct* _tmp113_;
				ValaStruct* _tmp114_;
				_tmp107_ = node;
				_tmp108_ = _tmp107_->parent;
				_tmp109_ = return_type;
				_tmp110_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp109_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
				_tmp111_ = _tmp110_;
				_tmp112_ = vala_gir_parser_resolve_symbol (self, _tmp108_, _tmp111_);
				_tmp113_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp112_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp112_) : NULL;
				if (_tmp113_ == NULL) {
					_vala_code_node_unref0 (_tmp112_);
				}
				st = _tmp113_;
				_tmp114_ = st;
				if (_tmp114_ != NULL) {
					gboolean is_simple_type = FALSE;
					ValaStruct* base_st = NULL;
					ValaStruct* _tmp115_;
					ValaStruct* _tmp116_;
					gboolean _tmp136_;
					is_simple_type = FALSE;
					_tmp115_ = st;
					_tmp116_ = _vala_code_node_ref0 (_tmp115_);
					base_st = _tmp116_;
					while (TRUE) {
						ValaStruct* _tmp117_;
						ValaStruct* _tmp118_;
						gboolean _tmp119_;
						ValaStruct* _tmp120_;
						ValaDataType* _tmp121_;
						ValaDataType* _tmp122_;
						_tmp117_ = base_st;
						if (!(_tmp117_ != NULL)) {
							break;
						}
						_tmp118_ = base_st;
						_tmp119_ = vala_struct_is_simple_type (_tmp118_);
						if (_tmp119_) {
							is_simple_type = TRUE;
							break;
						}
						_tmp120_ = base_st;
						_tmp121_ = vala_struct_get_base_type (_tmp120_);
						_tmp122_ = _tmp121_;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp122_, VALA_TYPE_UNRESOLVED_TYPE)) {
							ValaGirParserNode* _tmp123_;
							ValaGirParserNode* _tmp124_;
							ValaStruct* _tmp125_;
							ValaDataType* _tmp126_;
							ValaDataType* _tmp127_;
							ValaUnresolvedSymbol* _tmp128_;
							ValaUnresolvedSymbol* _tmp129_;
							ValaSymbol* _tmp130_;
							ValaStruct* _tmp131_;
							_tmp123_ = node;
							_tmp124_ = _tmp123_->parent;
							_tmp125_ = base_st;
							_tmp126_ = vala_struct_get_base_type (_tmp125_);
							_tmp127_ = _tmp126_;
							_tmp128_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp127_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
							_tmp129_ = _tmp128_;
							_tmp130_ = vala_gir_parser_resolve_symbol (self, _tmp124_, _tmp129_);
							_tmp131_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp130_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp130_) : NULL;
							if (_tmp131_ == NULL) {
								_vala_code_node_unref0 (_tmp130_);
							}
							_vala_code_node_unref0 (base_st);
							base_st = _tmp131_;
						} else {
							ValaStruct* _tmp132_;
							ValaStruct* _tmp133_;
							ValaStruct* _tmp134_;
							ValaStruct* _tmp135_;
							_tmp132_ = base_st;
							_tmp133_ = vala_struct_get_base_struct (_tmp132_);
							_tmp134_ = _tmp133_;
							_tmp135_ = _vala_code_node_ref0 (_tmp134_);
							_vala_code_node_unref0 (base_st);
							base_st = _tmp135_;
						}
					}
					_tmp136_ = is_simple_type;
					if (!_tmp136_) {
						ValaDataType* _tmp137_;
						_tmp137_ = return_type;
						vala_data_type_set_nullable (_tmp137_, TRUE);
					}
					_vala_code_node_unref0 (base_st);
				}
				_vala_code_node_unref0 (st);
			}
		}
	}
	{
		ValaList* _info_list = NULL;
		ValaList* _tmp138_;
		ValaList* _tmp139_;
		gint _info_size = 0;
		ValaList* _tmp140_;
		gint _tmp141_;
		gint _tmp142_;
		gint _info_index = 0;
		_tmp138_ = parameters;
		_tmp139_ = _vala_iterable_ref0 (_tmp138_);
		_info_list = _tmp139_;
		_tmp140_ = _info_list;
		_tmp141_ = vala_collection_get_size ((ValaCollection*) _tmp140_);
		_tmp142_ = _tmp141_;
		_info_size = _tmp142_;
		_info_index = -1;
		while (TRUE) {
			gint _tmp143_;
			gint _tmp144_;
			gint _tmp145_;
			ValaGirParserParameterInfo* info = NULL;
			ValaList* _tmp146_;
			gint _tmp147_;
			gpointer _tmp148_;
			ValaDataType* type = NULL;
			ValaGirParserParameterInfo* _tmp149_;
			ValaParameter* _tmp150_;
			ValaDataType* _tmp151_;
			ValaDataType* _tmp152_;
			ValaDataType* _tmp153_;
			gboolean _tmp154_ = FALSE;
			ValaGirParserParameterInfo* _tmp155_;
			ValaParameter* _tmp156_;
			ValaParameterDirection _tmp157_;
			ValaParameterDirection _tmp158_;
			_tmp143_ = _info_index;
			_info_index = _tmp143_ + 1;
			_tmp144_ = _info_index;
			_tmp145_ = _info_size;
			if (!(_tmp144_ < _tmp145_)) {
				break;
			}
			_tmp146_ = _info_list;
			_tmp147_ = _info_index;
			_tmp148_ = vala_list_get (_tmp146_, _tmp147_);
			info = (ValaGirParserParameterInfo*) _tmp148_;
			_tmp149_ = info;
			_tmp150_ = _tmp149_->param;
			_tmp151_ = vala_variable_get_variable_type ((ValaVariable*) _tmp150_);
			_tmp152_ = _tmp151_;
			_tmp153_ = _vala_code_node_ref0 (_tmp152_);
			type = _tmp153_;
			_tmp155_ = info;
			_tmp156_ = _tmp155_->param;
			_tmp157_ = vala_parameter_get_direction (_tmp156_);
			_tmp158_ = _tmp157_;
			if (_tmp158_ == VALA_PARAMETER_DIRECTION_OUT) {
				ValaDataType* _tmp159_;
				gboolean _tmp160_;
				gboolean _tmp161_;
				_tmp159_ = type;
				_tmp160_ = vala_data_type_get_nullable (_tmp159_);
				_tmp161_ = _tmp160_;
				_tmp154_ = _tmp161_;
			} else {
				_tmp154_ = FALSE;
			}
			if (_tmp154_) {
				ValaStruct* st = NULL;
				ValaDataType* _tmp162_;
				gboolean _tmp175_ = FALSE;
				ValaStruct* _tmp176_;
				st = NULL;
				_tmp162_ = type;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp162_, VALA_TYPE_UNRESOLVED_TYPE)) {
					ValaGirParserNode* _tmp163_;
					ValaGirParserNode* _tmp164_;
					ValaDataType* _tmp165_;
					ValaUnresolvedSymbol* _tmp166_;
					ValaUnresolvedSymbol* _tmp167_;
					ValaSymbol* _tmp168_;
					ValaStruct* _tmp169_;
					_tmp163_ = node;
					_tmp164_ = _tmp163_->parent;
					_tmp165_ = type;
					_tmp166_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp165_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
					_tmp167_ = _tmp166_;
					_tmp168_ = vala_gir_parser_resolve_symbol (self, _tmp164_, _tmp167_);
					_tmp169_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp168_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp168_) : NULL;
					if (_tmp169_ == NULL) {
						_vala_code_node_unref0 (_tmp168_);
					}
					_vala_code_node_unref0 (st);
					st = _tmp169_;
				} else {
					ValaDataType* _tmp170_;
					_tmp170_ = type;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp170_, VALA_TYPE_VALUE_TYPE)) {
						ValaDataType* _tmp171_;
						ValaTypeSymbol* _tmp172_;
						ValaTypeSymbol* _tmp173_;
						ValaStruct* _tmp174_;
						_tmp171_ = type;
						_tmp172_ = vala_data_type_get_data_type (_tmp171_);
						_tmp173_ = _tmp172_;
						_tmp174_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp173_, VALA_TYPE_STRUCT) ? ((ValaStruct*) _tmp173_) : NULL);
						_vala_code_node_unref0 (st);
						st = _tmp174_;
					}
				}
				_tmp176_ = st;
				if (_tmp176_ != NULL) {
					ValaStruct* _tmp177_;
					gboolean _tmp178_;
					_tmp177_ = st;
					_tmp178_ = vala_struct_is_simple_type (_tmp177_);
					_tmp175_ = _tmp178_;
				} else {
					_tmp175_ = FALSE;
				}
				if (_tmp175_) {
					ValaDataType* _tmp179_;
					_tmp179_ = type;
					vala_data_type_set_nullable (_tmp179_, FALSE);
				}
				_vala_code_node_unref0 (st);
			}
			_vala_code_node_unref0 (type);
			_vala_gir_parser_parameter_info_unref0 (info);
		}
		_vala_iterable_unref0 (_info_list);
	}
	_tmp180_ = parameters;
	_tmp181_ = vala_collection_get_size ((ValaCollection*) _tmp180_);
	_tmp182_ = _tmp181_;
	if (_tmp182_ > 1) {
		ValaGirParserParameterInfo* last_param = NULL;
		ValaList* _tmp183_;
		ValaList* _tmp184_;
		gint _tmp185_;
		gint _tmp186_;
		gpointer _tmp187_;
		ValaGirParserParameterInfo* _tmp188_;
		ValaParameter* _tmp189_;
		gboolean _tmp190_;
		gboolean _tmp191_;
		_tmp183_ = parameters;
		_tmp184_ = parameters;
		_tmp185_ = vala_collection_get_size ((ValaCollection*) _tmp184_);
		_tmp186_ = _tmp185_;
		_tmp187_ = vala_list_get (_tmp183_, _tmp186_ - 1);
		last_param = (ValaGirParserParameterInfo*) _tmp187_;
		_tmp188_ = last_param;
		_tmp189_ = _tmp188_->param;
		_tmp190_ = vala_parameter_get_ellipsis (_tmp189_);
		_tmp191_ = _tmp190_;
		if (_tmp191_) {
			ValaGirParserParameterInfo* first_vararg_param = NULL;
			ValaList* _tmp192_;
			ValaList* _tmp193_;
			gint _tmp194_;
			gint _tmp195_;
			gpointer _tmp196_;
			ValaGirParserParameterInfo* _tmp197_;
			ValaParameter* _tmp198_;
			const gchar* _tmp199_;
			const gchar* _tmp200_;
			gboolean _tmp201_;
			_tmp192_ = parameters;
			_tmp193_ = parameters;
			_tmp194_ = vala_collection_get_size ((ValaCollection*) _tmp193_);
			_tmp195_ = _tmp194_;
			_tmp196_ = vala_list_get (_tmp192_, _tmp195_ - 2);
			first_vararg_param = (ValaGirParserParameterInfo*) _tmp196_;
			_tmp197_ = first_vararg_param;
			_tmp198_ = _tmp197_->param;
			_tmp199_ = vala_symbol_get_name ((ValaSymbol*) _tmp198_);
			_tmp200_ = _tmp199_;
			_tmp201_ = g_str_has_prefix (_tmp200_, "first_");
			if (_tmp201_) {
				ValaGirParserParameterInfo* _tmp202_;
				_tmp202_ = first_vararg_param;
				_tmp202_->keep = FALSE;
			}
			_vala_gir_parser_parameter_info_unref0 (first_vararg_param);
		}
		_vala_gir_parser_parameter_info_unref0 (last_param);
	}
	i = 0;
	j = 1;
	last = -1;
	{
		ValaList* _info_list = NULL;
		ValaList* _tmp203_;
		ValaList* _tmp204_;
		gint _info_size = 0;
		ValaList* _tmp205_;
		gint _tmp206_;
		gint _tmp207_;
		gint _info_index = 0;
		_tmp203_ = parameters;
		_tmp204_ = _vala_iterable_ref0 (_tmp203_);
		_info_list = _tmp204_;
		_tmp205_ = _info_list;
		_tmp206_ = vala_collection_get_size ((ValaCollection*) _tmp205_);
		_tmp207_ = _tmp206_;
		_info_size = _tmp207_;
		_info_index = -1;
		while (TRUE) {
			gint _tmp208_;
			gint _tmp209_;
			gint _tmp210_;
			ValaGirParserParameterInfo* info = NULL;
			ValaList* _tmp211_;
			gint _tmp212_;
			gpointer _tmp213_;
			gboolean _tmp214_ = FALSE;
			ValaSymbol* _tmp215_;
			gint _tmp274_;
			_tmp208_ = _info_index;
			_info_index = _tmp208_ + 1;
			_tmp209_ = _info_index;
			_tmp210_ = _info_size;
			if (!(_tmp209_ < _tmp210_)) {
				break;
			}
			_tmp211_ = _info_list;
			_tmp212_ = _info_index;
			_tmp213_ = vala_list_get (_tmp211_, _tmp212_);
			info = (ValaGirParserParameterInfo*) _tmp213_;
			_tmp215_ = s;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp215_, VALA_TYPE_DELEGATE)) {
				ValaGirParserParameterInfo* _tmp216_;
				gint _tmp217_;
				gint _tmp218_;
				_tmp216_ = info;
				_tmp217_ = _tmp216_->closure_idx;
				_tmp218_ = i;
				_tmp214_ = _tmp217_ == _tmp218_;
			} else {
				_tmp214_ = FALSE;
			}
			if (_tmp214_) {
				ValaDelegate* d = NULL;
				ValaSymbol* _tmp219_;
				ValaDelegate* _tmp220_;
				ValaDelegate* _tmp221_;
				ValaDelegate* _tmp222_;
				gint _tmp223_;
				ValaGirParserParameterInfo* _tmp224_;
				_tmp219_ = s;
				_tmp220_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp219_, VALA_TYPE_DELEGATE, ValaDelegate));
				d = _tmp220_;
				_tmp221_ = d;
				vala_delegate_set_has_target (_tmp221_, TRUE);
				_tmp222_ = d;
				_tmp223_ = j;
				vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp222_, "CCode", "instance_pos", _tmp223_ - 0.1, NULL);
				_tmp224_ = info;
				_tmp224_->keep = FALSE;
				_vala_code_node_unref0 (d);
			} else {
				gboolean _tmp225_ = FALSE;
				gboolean _tmp226_ = FALSE;
				gboolean _tmp227_ = FALSE;
				ValaGirParserParameterInfo* _tmp228_;
				gboolean _tmp229_;
				_tmp228_ = info;
				_tmp229_ = _tmp228_->keep;
				if (_tmp229_) {
					ValaGirParserNode* _tmp230_;
					ValaArrayList* _tmp231_;
					gint _tmp232_;
					gboolean _tmp233_;
					_tmp230_ = node;
					_tmp231_ = _tmp230_->array_length_parameters;
					_tmp232_ = i;
					_tmp233_ = vala_collection_contains ((ValaCollection*) _tmp231_, (gpointer) ((gintptr) _tmp232_));
					_tmp227_ = !_tmp233_;
				} else {
					_tmp227_ = FALSE;
				}
				if (_tmp227_) {
					ValaGirParserNode* _tmp234_;
					ValaArrayList* _tmp235_;
					gint _tmp236_;
					gboolean _tmp237_;
					_tmp234_ = node;
					_tmp235_ = _tmp234_->closure_parameters;
					_tmp236_ = i;
					_tmp237_ = vala_collection_contains ((ValaCollection*) _tmp235_, (gpointer) ((gintptr) _tmp236_));
					_tmp226_ = !_tmp237_;
				} else {
					_tmp226_ = FALSE;
				}
				if (_tmp226_) {
					ValaGirParserNode* _tmp238_;
					ValaArrayList* _tmp239_;
					gint _tmp240_;
					gboolean _tmp241_;
					_tmp238_ = node;
					_tmp239_ = _tmp238_->destroy_parameters;
					_tmp240_ = i;
					_tmp241_ = vala_collection_contains ((ValaCollection*) _tmp239_, (gpointer) ((gintptr) _tmp240_));
					_tmp225_ = !_tmp241_;
				} else {
					_tmp225_ = FALSE;
				}
				if (_tmp225_) {
					ValaGirParserParameterInfo* _tmp242_;
					gint _tmp243_;
					ValaGirParserParameterInfo* _tmp244_;
					gfloat last_idx = 0.0F;
					gint _tmp245_;
					gint _tmp267_;
					gint _tmp268_;
					_tmp242_ = info;
					_tmp243_ = j;
					_tmp242_->vala_idx = (gfloat) _tmp243_;
					_tmp244_ = info;
					_tmp244_->keep = TRUE;
					last_idx = 0.0F;
					_tmp245_ = last;
					if (_tmp245_ != -1) {
						ValaList* _tmp246_;
						gint _tmp247_;
						gpointer _tmp248_;
						ValaGirParserParameterInfo* _tmp249_;
						gfloat _tmp250_;
						_tmp246_ = parameters;
						_tmp247_ = last;
						_tmp248_ = vala_list_get (_tmp246_, _tmp247_);
						_tmp249_ = (ValaGirParserParameterInfo*) _tmp248_;
						_tmp250_ = _tmp249_->vala_idx;
						last_idx = _tmp250_;
						_vala_gir_parser_parameter_info_unref0 (_tmp249_);
					}
					{
						gint k = 0;
						gint _tmp251_;
						_tmp251_ = last;
						k = _tmp251_ + 1;
						{
							gboolean _tmp252_ = FALSE;
							_tmp252_ = TRUE;
							while (TRUE) {
								gint _tmp254_;
								gint _tmp255_;
								ValaList* _tmp256_;
								gint _tmp257_;
								gpointer _tmp258_;
								ValaGirParserParameterInfo* _tmp259_;
								gfloat _tmp260_;
								gint _tmp261_;
								gfloat _tmp262_;
								gint _tmp263_;
								gint _tmp264_;
								gint _tmp265_;
								gint _tmp266_;
								if (!_tmp252_) {
									gint _tmp253_;
									_tmp253_ = k;
									k = _tmp253_ + 1;
								}
								_tmp252_ = FALSE;
								_tmp254_ = k;
								_tmp255_ = i;
								if (!(_tmp254_ < _tmp255_)) {
									break;
								}
								_tmp256_ = parameters;
								_tmp257_ = k;
								_tmp258_ = vala_list_get (_tmp256_, _tmp257_);
								_tmp259_ = (ValaGirParserParameterInfo*) _tmp258_;
								_tmp260_ = last_idx;
								_tmp261_ = j;
								_tmp262_ = last_idx;
								_tmp263_ = i;
								_tmp264_ = last;
								_tmp265_ = k;
								_tmp266_ = last;
								_tmp259_->vala_idx = _tmp260_ + (((_tmp261_ - _tmp262_) / (_tmp263_ - _tmp264_)) * (_tmp265_ - _tmp266_));
								_vala_gir_parser_parameter_info_unref0 (_tmp259_);
							}
						}
					}
					_tmp267_ = i;
					last = _tmp267_;
					_tmp268_ = j;
					j = _tmp268_ + 1;
				} else {
					ValaGirParserParameterInfo* _tmp269_;
					ValaGirParserParameterInfo* _tmp270_;
					gint _tmp271_;
					gint _tmp272_;
					gint _tmp273_;
					_tmp269_ = info;
					_tmp269_->keep = FALSE;
					_tmp270_ = info;
					_tmp271_ = j;
					_tmp272_ = i;
					_tmp273_ = last;
					_tmp270_->vala_idx = (_tmp271_ - 1) + ((_tmp272_ - _tmp273_) * 0.1F);
				}
			}
			_tmp274_ = i;
			i = _tmp274_ + 1;
			_vala_gir_parser_parameter_info_unref0 (info);
		}
		_vala_iterable_unref0 (_info_list);
	}
	{
		ValaList* _info_list = NULL;
		ValaList* _tmp275_;
		ValaList* _tmp276_;
		gint _info_size = 0;
		ValaList* _tmp277_;
		gint _tmp278_;
		gint _tmp279_;
		gint _info_index = 0;
		_tmp275_ = parameters;
		_tmp276_ = _vala_iterable_ref0 (_tmp275_);
		_info_list = _tmp276_;
		_tmp277_ = _info_list;
		_tmp278_ = vala_collection_get_size ((ValaCollection*) _tmp277_);
		_tmp279_ = _tmp278_;
		_info_size = _tmp279_;
		_info_index = -1;
		while (TRUE) {
			gint _tmp280_;
			gint _tmp281_;
			gint _tmp282_;
			ValaGirParserParameterInfo* info = NULL;
			ValaList* _tmp283_;
			gint _tmp284_;
			gpointer _tmp285_;
			ValaGirParserParameterInfo* _tmp286_;
			gboolean _tmp287_;
			ValaSymbol* _tmp288_;
			ValaGirParserParameterInfo* _tmp292_;
			gint _tmp293_;
			ValaGirParserParameterInfo* _tmp310_;
			gint _tmp311_;
			ValaGirParserParameterInfo* _tmp342_;
			gint _tmp343_;
			ValaGirParserParameterInfo* _tmp374_;
			gboolean _tmp375_;
			_tmp280_ = _info_index;
			_info_index = _tmp280_ + 1;
			_tmp281_ = _info_index;
			_tmp282_ = _info_size;
			if (!(_tmp281_ < _tmp282_)) {
				break;
			}
			_tmp283_ = _info_list;
			_tmp284_ = _info_index;
			_tmp285_ = vala_list_get (_tmp283_, _tmp284_);
			info = (ValaGirParserParameterInfo*) _tmp285_;
			_tmp286_ = info;
			_tmp287_ = _tmp286_->keep;
			if (!_tmp287_) {
				_vala_gir_parser_parameter_info_unref0 (info);
				continue;
			}
			_tmp288_ = s;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp288_, VALA_TYPE_CALLABLE)) {
				ValaSymbol* _tmp289_;
				ValaGirParserParameterInfo* _tmp290_;
				ValaParameter* _tmp291_;
				_tmp289_ = s;
				_tmp290_ = info;
				_tmp291_ = _tmp290_->param;
				vala_callable_add_parameter (G_TYPE_CHECK_INSTANCE_CAST (_tmp289_, VALA_TYPE_CALLABLE, ValaCallable), _tmp291_);
			}
			_tmp292_ = info;
			_tmp293_ = _tmp292_->array_length_idx;
			if (_tmp293_ != -1) {
				ValaGirParserParameterInfo* _tmp294_;
				gint _tmp295_;
				ValaList* _tmp296_;
				gint _tmp297_;
				gint _tmp298_;
				ValaGirParserParameterInfo* _tmp303_;
				ValaParameter* _tmp304_;
				ValaList* _tmp305_;
				ValaGirParserParameterInfo* _tmp306_;
				gint _tmp307_;
				gpointer _tmp308_;
				ValaGirParserParameterInfo* _tmp309_;
				_tmp294_ = info;
				_tmp295_ = _tmp294_->array_length_idx;
				_tmp296_ = parameters;
				_tmp297_ = vala_collection_get_size ((ValaCollection*) _tmp296_);
				_tmp298_ = _tmp297_;
				if (_tmp295_ >= _tmp298_) {
					ValaGirParserParameterInfo* _tmp299_;
					ValaParameter* _tmp300_;
					ValaSourceReference* _tmp301_;
					ValaSourceReference* _tmp302_;
					_tmp299_ = info;
					_tmp300_ = _tmp299_->param;
					_tmp301_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp300_);
					_tmp302_ = _tmp301_;
					vala_report_error (_tmp302_, "invalid array_length index");
					_vala_gir_parser_parameter_info_unref0 (info);
					continue;
				}
				_tmp303_ = info;
				_tmp304_ = _tmp303_->param;
				_tmp305_ = parameters;
				_tmp306_ = info;
				_tmp307_ = _tmp306_->array_length_idx;
				_tmp308_ = vala_list_get (_tmp305_, _tmp307_);
				_tmp309_ = (ValaGirParserParameterInfo*) _tmp308_;
				vala_gir_parser_set_array_ccode (self, (ValaSymbol*) _tmp304_, _tmp309_);
				_vala_gir_parser_parameter_info_unref0 (_tmp309_);
			}
			_tmp310_ = info;
			_tmp311_ = _tmp310_->closure_idx;
			if (_tmp311_ != -1) {
				ValaGirParserParameterInfo* _tmp312_;
				gint _tmp313_;
				ValaList* _tmp314_;
				gint _tmp315_;
				gint _tmp316_;
				ValaList* _tmp321_;
				ValaGirParserParameterInfo* _tmp322_;
				gint _tmp323_;
				gpointer _tmp324_;
				ValaGirParserParameterInfo* _tmp325_;
				gfloat _tmp326_;
				gchar* _tmp327_;
				gchar* _tmp328_;
				ValaGirParserParameterInfo* _tmp329_;
				gfloat _tmp330_;
				gchar* _tmp331_;
				gchar* _tmp332_;
				gboolean _tmp333_;
				_tmp312_ = info;
				_tmp313_ = _tmp312_->closure_idx;
				_tmp314_ = parameters;
				_tmp315_ = vala_collection_get_size ((ValaCollection*) _tmp314_);
				_tmp316_ = _tmp315_;
				if (_tmp313_ >= _tmp316_) {
					ValaGirParserParameterInfo* _tmp317_;
					ValaParameter* _tmp318_;
					ValaSourceReference* _tmp319_;
					ValaSourceReference* _tmp320_;
					_tmp317_ = info;
					_tmp318_ = _tmp317_->param;
					_tmp319_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp318_);
					_tmp320_ = _tmp319_;
					vala_report_error (_tmp320_, "invalid closure index");
					_vala_gir_parser_parameter_info_unref0 (info);
					continue;
				}
				_tmp321_ = parameters;
				_tmp322_ = info;
				_tmp323_ = _tmp322_->closure_idx;
				_tmp324_ = vala_list_get (_tmp321_, _tmp323_);
				_tmp325_ = (ValaGirParserParameterInfo*) _tmp324_;
				_tmp326_ = _tmp325_->vala_idx;
				_tmp327_ = g_strdup_printf ("%g", (gdouble) _tmp326_);
				_tmp328_ = _tmp327_;
				_tmp329_ = info;
				_tmp330_ = _tmp329_->vala_idx;
				_tmp331_ = g_strdup_printf ("%g", _tmp330_ + 0.1);
				_tmp332_ = _tmp331_;
				_tmp333_ = g_strcmp0 (_tmp328_, _tmp332_) != 0;
				_g_free0 (_tmp332_);
				_g_free0 (_tmp328_);
				_vala_gir_parser_parameter_info_unref0 (_tmp325_);
				if (_tmp333_) {
					ValaGirParserParameterInfo* _tmp334_;
					ValaParameter* _tmp335_;
					ValaList* _tmp336_;
					ValaGirParserParameterInfo* _tmp337_;
					gint _tmp338_;
					gpointer _tmp339_;
					ValaGirParserParameterInfo* _tmp340_;
					gfloat _tmp341_;
					_tmp334_ = info;
					_tmp335_ = _tmp334_->param;
					_tmp336_ = parameters;
					_tmp337_ = info;
					_tmp338_ = _tmp337_->closure_idx;
					_tmp339_ = vala_list_get (_tmp336_, _tmp338_);
					_tmp340_ = (ValaGirParserParameterInfo*) _tmp339_;
					_tmp341_ = _tmp340_->vala_idx;
					vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp335_, "CCode", "delegate_target_pos", (gdouble) _tmp341_, NULL);
					_vala_gir_parser_parameter_info_unref0 (_tmp340_);
				}
			}
			_tmp342_ = info;
			_tmp343_ = _tmp342_->destroy_idx;
			if (_tmp343_ != -1) {
				ValaGirParserParameterInfo* _tmp344_;
				gint _tmp345_;
				ValaList* _tmp346_;
				gint _tmp347_;
				gint _tmp348_;
				ValaList* _tmp353_;
				ValaGirParserParameterInfo* _tmp354_;
				gint _tmp355_;
				gpointer _tmp356_;
				ValaGirParserParameterInfo* _tmp357_;
				gfloat _tmp358_;
				gchar* _tmp359_;
				gchar* _tmp360_;
				ValaGirParserParameterInfo* _tmp361_;
				gfloat _tmp362_;
				gchar* _tmp363_;
				gchar* _tmp364_;
				gboolean _tmp365_;
				_tmp344_ = info;
				_tmp345_ = _tmp344_->destroy_idx;
				_tmp346_ = parameters;
				_tmp347_ = vala_collection_get_size ((ValaCollection*) _tmp346_);
				_tmp348_ = _tmp347_;
				if (_tmp345_ >= _tmp348_) {
					ValaGirParserParameterInfo* _tmp349_;
					ValaParameter* _tmp350_;
					ValaSourceReference* _tmp351_;
					ValaSourceReference* _tmp352_;
					_tmp349_ = info;
					_tmp350_ = _tmp349_->param;
					_tmp351_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp350_);
					_tmp352_ = _tmp351_;
					vala_report_error (_tmp352_, "invalid destroy index");
					_vala_gir_parser_parameter_info_unref0 (info);
					continue;
				}
				_tmp353_ = parameters;
				_tmp354_ = info;
				_tmp355_ = _tmp354_->destroy_idx;
				_tmp356_ = vala_list_get (_tmp353_, _tmp355_);
				_tmp357_ = (ValaGirParserParameterInfo*) _tmp356_;
				_tmp358_ = _tmp357_->vala_idx;
				_tmp359_ = g_strdup_printf ("%g", (gdouble) _tmp358_);
				_tmp360_ = _tmp359_;
				_tmp361_ = info;
				_tmp362_ = _tmp361_->vala_idx;
				_tmp363_ = g_strdup_printf ("%g", _tmp362_ + 0.2);
				_tmp364_ = _tmp363_;
				_tmp365_ = g_strcmp0 (_tmp360_, _tmp364_) != 0;
				_g_free0 (_tmp364_);
				_g_free0 (_tmp360_);
				_vala_gir_parser_parameter_info_unref0 (_tmp357_);
				if (_tmp365_) {
					ValaGirParserParameterInfo* _tmp366_;
					ValaParameter* _tmp367_;
					ValaList* _tmp368_;
					ValaGirParserParameterInfo* _tmp369_;
					gint _tmp370_;
					gpointer _tmp371_;
					ValaGirParserParameterInfo* _tmp372_;
					gfloat _tmp373_;
					_tmp366_ = info;
					_tmp367_ = _tmp366_->param;
					_tmp368_ = parameters;
					_tmp369_ = info;
					_tmp370_ = _tmp369_->destroy_idx;
					_tmp371_ = vala_list_get (_tmp368_, _tmp370_);
					_tmp372_ = (ValaGirParserParameterInfo*) _tmp371_;
					_tmp373_ = _tmp372_->vala_idx;
					vala_code_node_set_attribute_double ((ValaCodeNode*) _tmp367_, "CCode", "destroy_notify_pos", (gdouble) _tmp373_, NULL);
					_vala_gir_parser_parameter_info_unref0 (_tmp372_);
				}
			}
			_tmp374_ = info;
			_tmp375_ = _tmp374_->is_async;
			if (_tmp375_) {
				ValaDataType* resolved_type = NULL;
				ValaGirParserParameterInfo* _tmp376_;
				ValaParameter* _tmp377_;
				ValaDataType* _tmp378_;
				ValaDataType* _tmp379_;
				ValaDataType* _tmp380_;
				ValaDataType* _tmp381_;
				ValaDataType* _tmp391_;
				_tmp376_ = info;
				_tmp377_ = _tmp376_->param;
				_tmp378_ = vala_variable_get_variable_type ((ValaVariable*) _tmp377_);
				_tmp379_ = _tmp378_;
				_tmp380_ = _vala_code_node_ref0 (_tmp379_);
				resolved_type = _tmp380_;
				_tmp381_ = resolved_type;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp381_, VALA_TYPE_UNRESOLVED_TYPE)) {
					ValaSymbol* resolved_symbol = NULL;
					ValaGirParserNode* _tmp382_;
					ValaGirParserNode* _tmp383_;
					ValaDataType* _tmp384_;
					ValaUnresolvedSymbol* _tmp385_;
					ValaUnresolvedSymbol* _tmp386_;
					ValaSymbol* _tmp387_;
					ValaSymbol* _tmp388_;
					_tmp382_ = node;
					_tmp383_ = _tmp382_->parent;
					_tmp384_ = resolved_type;
					_tmp385_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp384_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
					_tmp386_ = _tmp385_;
					_tmp387_ = vala_gir_parser_resolve_symbol (self, _tmp383_, _tmp386_);
					resolved_symbol = _tmp387_;
					_tmp388_ = resolved_symbol;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp388_, VALA_TYPE_DELEGATE)) {
						ValaSymbol* _tmp389_;
						ValaDelegateType* _tmp390_;
						_tmp389_ = resolved_symbol;
						_tmp390_ = vala_delegate_type_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp389_, VALA_TYPE_DELEGATE, ValaDelegate));
						_vala_code_node_unref0 (resolved_type);
						resolved_type = (ValaDataType*) _tmp390_;
					}
					_vala_code_node_unref0 (resolved_symbol);
				}
				_tmp391_ = resolved_type;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp391_, VALA_TYPE_DELEGATE_TYPE)) {
					ValaDelegate* d = NULL;
					ValaDataType* _tmp392_;
					ValaDelegate* _tmp393_;
					ValaDelegate* _tmp394_;
					ValaDelegate* _tmp395_;
					gboolean _tmp396_ = FALSE;
					ValaDelegate* _tmp397_;
					const gchar* _tmp398_;
					const gchar* _tmp399_;
					_tmp392_ = resolved_type;
					_tmp393_ = vala_delegate_type_get_delegate_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp392_, VALA_TYPE_DELEGATE_TYPE, ValaDelegateType));
					_tmp394_ = _tmp393_;
					_tmp395_ = _vala_code_node_ref0 (_tmp394_);
					d = _tmp395_;
					_tmp397_ = d;
					_tmp398_ = vala_symbol_get_name ((ValaSymbol*) _tmp397_);
					_tmp399_ = _tmp398_;
					if (g_strcmp0 (_tmp399_, "DestroyNotify") == 0) {
						ValaDelegate* _tmp400_;
						ValaSymbol* _tmp401_;
						ValaSymbol* _tmp402_;
						const gchar* _tmp403_;
						const gchar* _tmp404_;
						_tmp400_ = d;
						_tmp401_ = vala_symbol_get_parent_symbol ((ValaSymbol*) _tmp400_);
						_tmp402_ = _tmp401_;
						_tmp403_ = vala_symbol_get_name (_tmp402_);
						_tmp404_ = _tmp403_;
						_tmp396_ = g_strcmp0 (_tmp404_, "GLib") == 0;
					} else {
						_tmp396_ = FALSE;
					}
					if (!_tmp396_) {
						ValaGirParserParameterInfo* _tmp405_;
						ValaParameter* _tmp406_;
						gboolean _tmp407_ = FALSE;
						ValaGirParserParameterInfo* _tmp408_;
						gint _tmp409_;
						ValaGirParserParameterInfo* _tmp412_;
						ValaParameter* _tmp413_;
						ValaDataType* _tmp414_;
						ValaDataType* _tmp415_;
						_tmp405_ = info;
						_tmp406_ = _tmp405_->param;
						vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp406_, "CCode", "scope", "async", NULL);
						_tmp408_ = info;
						_tmp409_ = _tmp408_->closure_idx;
						if (_tmp409_ != -1) {
							ValaGirParserParameterInfo* _tmp410_;
							gint _tmp411_;
							_tmp410_ = info;
							_tmp411_ = _tmp410_->destroy_idx;
							_tmp407_ = _tmp411_ != -1;
						} else {
							_tmp407_ = FALSE;
						}
						_tmp412_ = info;
						_tmp413_ = _tmp412_->param;
						_tmp414_ = vala_variable_get_variable_type ((ValaVariable*) _tmp413_);
						_tmp415_ = _tmp414_;
						vala_data_type_set_value_owned (_tmp415_, _tmp407_);
					}
					_vala_code_node_unref0 (d);
				}
				_vala_code_node_unref0 (resolved_type);
			} else {
				ValaDataType* resolved_type = NULL;
				ValaGirParserParameterInfo* _tmp416_;
				ValaParameter* _tmp417_;
				ValaDataType* _tmp418_;
				ValaDataType* _tmp419_;
				ValaDataType* _tmp420_;
				ValaDataType* _tmp421_;
				_tmp416_ = info;
				_tmp417_ = _tmp416_->param;
				_tmp418_ = vala_variable_get_variable_type ((ValaVariable*) _tmp417_);
				_tmp419_ = _tmp418_;
				_tmp420_ = _vala_code_node_ref0 (_tmp419_);
				resolved_type = _tmp420_;
				_tmp421_ = resolved_type;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp421_, VALA_TYPE_DELEGATE_TYPE)) {
					gboolean _tmp422_ = FALSE;
					ValaGirParserParameterInfo* _tmp423_;
					gint _tmp424_;
					ValaGirParserParameterInfo* _tmp427_;
					ValaParameter* _tmp428_;
					ValaDataType* _tmp429_;
					ValaDataType* _tmp430_;
					_tmp423_ = info;
					_tmp424_ = _tmp423_->closure_idx;
					if (_tmp424_ != -1) {
						ValaGirParserParameterInfo* _tmp425_;
						gint _tmp426_;
						_tmp425_ = info;
						_tmp426_ = _tmp425_->destroy_idx;
						_tmp422_ = _tmp426_ != -1;
					} else {
						_tmp422_ = FALSE;
					}
					_tmp427_ = info;
					_tmp428_ = _tmp427_->param;
					_tmp429_ = vala_variable_get_variable_type ((ValaVariable*) _tmp428_);
					_tmp430_ = _tmp429_;
					vala_data_type_set_value_owned (_tmp430_, _tmp422_);
				}
				_vala_code_node_unref0 (resolved_type);
			}
			_vala_gir_parser_parameter_info_unref0 (info);
		}
		_vala_iterable_unref0 (_info_list);
	}
	_tmp432_ = return_type;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp432_, VALA_TYPE_ARRAY_TYPE)) {
		ValaGirParserNode* _tmp433_;
		gint _tmp434_;
		_tmp433_ = node;
		_tmp434_ = _tmp433_->return_array_length_idx;
		_tmp431_ = _tmp434_ >= 0;
	} else {
		_tmp431_ = FALSE;
	}
	if (_tmp431_) {
		ValaSymbol* _tmp435_;
		ValaList* _tmp436_;
		ValaGirParserNode* _tmp437_;
		gint _tmp438_;
		gpointer _tmp439_;
		ValaGirParserParameterInfo* _tmp440_;
		_tmp435_ = s;
		_tmp436_ = parameters;
		_tmp437_ = node;
		_tmp438_ = _tmp437_->return_array_length_idx;
		_tmp439_ = vala_list_get (_tmp436_, _tmp438_);
		_tmp440_ = (ValaGirParserParameterInfo*) _tmp439_;
		vala_gir_parser_set_array_ccode (self, _tmp435_, _tmp440_);
		_vala_gir_parser_parameter_info_unref0 (_tmp440_);
	}
	_tmp441_ = s;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp441_, VALA_TYPE_CALLABLE)) {
		ValaSymbol* _tmp442_;
		ValaDataType* _tmp443_;
		_tmp442_ = s;
		_tmp443_ = return_type;
		vala_callable_set_return_type (G_TYPE_CHECK_INSTANCE_CAST (_tmp442_, VALA_TYPE_CALLABLE, ValaCallable), _tmp443_);
	}
	_vala_code_node_unref0 (return_type);
	_vala_iterable_unref0 (parameters);
	_vala_code_node_unref0 (s);
}


static void vala_gir_parser_find_parent (ValaGirParser* self, const gchar* cname, ValaGirParserNode* current, ValaGirParserNode* * best, gint* match) {
	ValaGirParserNode* old_best = NULL;
	ValaGirParserNode* _tmp0_;
	ValaGirParserNode* _tmp1_;
	ValaGirParserNode* _tmp2_;
	ValaSymbol* _tmp3_;
	ValaGirParserNode* _tmp30_;
	ValaGirParserNode* _tmp31_;
	gint current_match = 0;
	ValaGirParserNode* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	gint _tmp37_;
	gint _tmp38_;
	gint _tmp39_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cname != NULL);
	g_return_if_fail (current != NULL);
	g_return_if_fail (*best != NULL);
	_tmp0_ = *best;
	_tmp1_ = _vala_gir_parser_node_ref0 (_tmp0_);
	old_best = _tmp1_;
	_tmp2_ = current;
	_tmp3_ = _tmp2_->symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, VALA_TYPE_NAMESPACE)) {
		{
			ValaArrayList* _child_list = NULL;
			ValaGirParserNode* _tmp4_;
			ValaArrayList* _tmp5_;
			ValaArrayList* _tmp6_;
			gint _child_size = 0;
			ValaArrayList* _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			gint _child_index = 0;
			_tmp4_ = current;
			_tmp5_ = _tmp4_->members;
			_tmp6_ = _vala_iterable_ref0 (_tmp5_);
			_child_list = _tmp6_;
			_tmp7_ = _child_list;
			_tmp8_ = vala_collection_get_size ((ValaCollection*) _tmp7_);
			_tmp9_ = _tmp8_;
			_child_size = _tmp9_;
			_child_index = -1;
			while (TRUE) {
				gint _tmp10_;
				gint _tmp11_;
				gint _tmp12_;
				ValaGirParserNode* child = NULL;
				ValaArrayList* _tmp13_;
				gint _tmp14_;
				gpointer _tmp15_;
				gboolean _tmp16_ = FALSE;
				gboolean _tmp17_ = FALSE;
				ValaGirParserNode* _tmp18_;
				ValaSymbol* _tmp19_;
				_tmp10_ = _child_index;
				_child_index = _tmp10_ + 1;
				_tmp11_ = _child_index;
				_tmp12_ = _child_size;
				if (!(_tmp11_ < _tmp12_)) {
					break;
				}
				_tmp13_ = _child_list;
				_tmp14_ = _child_index;
				_tmp15_ = vala_list_get ((ValaList*) _tmp13_, _tmp14_);
				child = (ValaGirParserNode*) _tmp15_;
				_tmp18_ = child;
				_tmp19_ = _tmp18_->symbol;
				if (_tmp19_ == NULL) {
					_tmp17_ = TRUE;
				} else {
					ValaGirParserNode* _tmp20_;
					ValaSymbol* _tmp21_;
					gboolean _tmp22_;
					_tmp20_ = child;
					_tmp21_ = _tmp20_->symbol;
					_tmp22_ = vala_gir_parser_is_container (_tmp21_);
					_tmp17_ = _tmp22_;
				}
				if (_tmp17_) {
					const gchar* _tmp23_;
					ValaGirParserNode* _tmp24_;
					gchar* _tmp25_;
					gchar* _tmp26_;
					gboolean _tmp27_;
					_tmp23_ = cname;
					_tmp24_ = child;
					_tmp25_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp24_);
					_tmp26_ = _tmp25_;
					_tmp27_ = g_str_has_prefix (_tmp23_, _tmp26_);
					_tmp16_ = _tmp27_;
					_g_free0 (_tmp26_);
				} else {
					_tmp16_ = FALSE;
				}
				if (_tmp16_) {
					const gchar* _tmp28_;
					ValaGirParserNode* _tmp29_;
					_tmp28_ = cname;
					_tmp29_ = child;
					vala_gir_parser_find_parent (self, _tmp28_, _tmp29_, best, match);
				}
				_vala_gir_parser_node_unref0 (child);
			}
			_vala_iterable_unref0 (_child_list);
		}
	}
	_tmp30_ = *best;
	_tmp31_ = old_best;
	if (_tmp30_ != _tmp31_) {
		_vala_gir_parser_node_unref0 (old_best);
		return;
	}
	_tmp32_ = current;
	_tmp33_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp32_);
	_tmp34_ = _tmp33_;
	_tmp35_ = strlen (_tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = _tmp36_;
	_g_free0 (_tmp34_);
	current_match = _tmp37_;
	_tmp38_ = current_match;
	_tmp39_ = *match;
	if (_tmp38_ > _tmp39_) {
		gint _tmp40_;
		ValaGirParserNode* _tmp41_;
		ValaGirParserNode* _tmp42_;
		_tmp40_ = current_match;
		*match = _tmp40_;
		_tmp41_ = current;
		_tmp42_ = _vala_gir_parser_node_ref0 (_tmp41_);
		_vala_gir_parser_node_unref0 (*best);
		*best = _tmp42_;
	}
	_vala_gir_parser_node_unref0 (old_best);
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = needle;
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
	result = _tmp1_ != NULL;
	return result;
}


static gboolean vala_gir_parser_same_gir (ValaGirParser* self, ValaSymbol* gir_component, ValaSymbol* sym) {
	gboolean result = FALSE;
	gchar* gir_name = NULL;
	ValaSymbol* _tmp0_;
	ValaSourceReference* _tmp1_;
	ValaSourceReference* _tmp2_;
	ValaSourceFile* _tmp3_;
	ValaSourceFile* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* gir_version = NULL;
	ValaSymbol* _tmp8_;
	ValaSourceReference* _tmp9_;
	ValaSourceReference* _tmp10_;
	ValaSourceFile* _tmp11_;
	ValaSourceFile* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	ValaSymbol* _tmp16_;
	ValaSourceReference* _tmp17_;
	ValaSourceReference* _tmp18_;
	ValaSourceFile* _tmp19_;
	ValaSourceFile* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (gir_component != NULL, FALSE);
	g_return_val_if_fail (sym != NULL, FALSE);
	_tmp0_ = gir_component;
	_tmp1_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_source_reference_get_file (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = vala_source_file_get_gir_namespace (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strdup (_tmp6_);
	gir_name = _tmp7_;
	_tmp8_ = gir_component;
	_tmp9_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = vala_source_reference_get_file (_tmp10_);
	_tmp12_ = _tmp11_;
	_tmp13_ = vala_source_file_get_gir_version (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strdup (_tmp14_);
	gir_version = _tmp15_;
	_tmp16_ = sym;
	_tmp17_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = vala_source_reference_get_file (_tmp18_);
	_tmp20_ = _tmp19_;
	_tmp21_ = vala_source_file_get_filename (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = g_strdup_printf ("%s-%s", gir_name, gir_version);
	_tmp24_ = _tmp23_;
	_tmp25_ = string_contains (_tmp22_, _tmp24_);
	_tmp26_ = _tmp25_;
	_g_free0 (_tmp24_);
	result = _tmp26_;
	_g_free0 (gir_version);
	_g_free0 (gir_name);
	return result;
}


static void vala_gir_parser_process_namespace_method (ValaGirParser* self, ValaGirParserNode* ns, ValaGirParserNode* node) {
	gchar* ns_cprefix = NULL;
	ValaGirParserNode* _tmp0_;
	gchar* _tmp1_;
	ValaMethod* method = NULL;
	ValaGirParserNode* _tmp2_;
	ValaSymbol* _tmp3_;
	ValaMethod* _tmp4_;
	gchar* cname = NULL;
	ValaGirParserNode* _tmp5_;
	gchar* _tmp6_;
	ValaParameter* first_param = NULL;
	ValaMethod* _tmp7_;
	ValaList* _tmp8_;
	ValaList* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp17_ = FALSE;
	ValaParameter* _tmp18_;
	gint match = 0;
	ValaGirParserNode* parent = NULL;
	ValaGirParserNode* _tmp84_;
	ValaGirParserNode* _tmp85_;
	const gchar* _tmp86_;
	ValaGirParserNode* _tmp87_;
	gchar* new_name = NULL;
	ValaMethod* _tmp88_;
	const gchar* _tmp89_;
	const gchar* _tmp90_;
	ValaGirParserNode* _tmp91_;
	gchar* _tmp92_;
	gchar* _tmp93_;
	gint _tmp94_;
	gint _tmp95_;
	const gchar* _tmp96_;
	gint _tmp97_;
	gint _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	gboolean _tmp101_ = FALSE;
	ValaMethod* _tmp102_;
	ValaGirParserNode* _tmp103_;
	ValaSymbol* _tmp104_;
	gboolean _tmp105_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ns != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = ns;
	_tmp1_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp0_);
	ns_cprefix = _tmp1_;
	_tmp2_ = node;
	_tmp3_ = _tmp2_->symbol;
	_tmp4_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALA_TYPE_METHOD, ValaMethod));
	method = _tmp4_;
	_tmp5_ = node;
	_tmp6_ = vala_gir_parser_node_get_cname (_tmp5_);
	cname = _tmp6_;
	first_param = NULL;
	_tmp7_ = method;
	_tmp8_ = vala_callable_get_parameters ((ValaCallable*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = vala_collection_get_size ((ValaCollection*) _tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_ > 0;
	_vala_iterable_unref0 (_tmp9_);
	if (_tmp12_) {
		ValaMethod* _tmp13_;
		ValaList* _tmp14_;
		ValaList* _tmp15_;
		gpointer _tmp16_;
		_tmp13_ = method;
		_tmp14_ = vala_callable_get_parameters ((ValaCallable*) _tmp13_);
		_tmp15_ = _tmp14_;
		_tmp16_ = vala_list_get (_tmp15_, 0);
		_vala_code_node_unref0 (first_param);
		first_param = (ValaParameter*) _tmp16_;
		_vala_iterable_unref0 (_tmp15_);
	}
	_tmp18_ = first_param;
	if (_tmp18_ != NULL) {
		ValaParameter* _tmp19_;
		ValaDataType* _tmp20_;
		ValaDataType* _tmp21_;
		_tmp19_ = first_param;
		_tmp20_ = vala_variable_get_variable_type ((ValaVariable*) _tmp19_);
		_tmp21_ = _tmp20_;
		_tmp17_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, VALA_TYPE_UNRESOLVED_TYPE);
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		ValaUnresolvedSymbol* sym = NULL;
		ValaParameter* _tmp22_;
		ValaDataType* _tmp23_;
		ValaDataType* _tmp24_;
		ValaUnresolvedSymbol* _tmp25_;
		ValaUnresolvedSymbol* _tmp26_;
		ValaUnresolvedSymbol* _tmp27_;
		ValaGirParserNode* parent = NULL;
		ValaGirParserNode* _tmp28_;
		ValaUnresolvedSymbol* _tmp29_;
		ValaGirParserNode* _tmp30_;
		gboolean _tmp31_ = FALSE;
		gboolean _tmp32_ = FALSE;
		gboolean _tmp33_ = FALSE;
		gboolean _tmp34_ = FALSE;
		ValaGirParserNode* _tmp35_;
		_tmp22_ = first_param;
		_tmp23_ = vala_variable_get_variable_type ((ValaVariable*) _tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
		_tmp26_ = _tmp25_;
		_tmp27_ = _vala_code_node_ref0 (_tmp26_);
		sym = _tmp27_;
		_tmp28_ = ns;
		_tmp29_ = sym;
		_tmp30_ = vala_gir_parser_resolve_node (self, _tmp28_, _tmp29_, FALSE);
		parent = _tmp30_;
		_tmp35_ = parent;
		if (_tmp35_ != NULL) {
			ValaMethod* _tmp36_;
			ValaGirParserNode* _tmp37_;
			ValaSymbol* _tmp38_;
			gboolean _tmp39_;
			_tmp36_ = method;
			_tmp37_ = parent;
			_tmp38_ = _tmp37_->symbol;
			_tmp39_ = vala_gir_parser_same_gir (self, (ValaSymbol*) _tmp36_, _tmp38_);
			_tmp34_ = _tmp39_;
		} else {
			_tmp34_ = FALSE;
		}
		if (_tmp34_) {
			ValaGirParserNode* _tmp40_;
			ValaGirParserNode* _tmp41_;
			ValaGirParserNode* _tmp42_;
			_tmp40_ = parent;
			_tmp41_ = _tmp40_->parent;
			_tmp42_ = ns;
			_tmp33_ = _tmp41_ == _tmp42_;
		} else {
			_tmp33_ = FALSE;
		}
		if (_tmp33_) {
			ValaGirParserNode* _tmp43_;
			ValaSymbol* _tmp44_;
			gboolean _tmp45_;
			_tmp43_ = parent;
			_tmp44_ = _tmp43_->symbol;
			_tmp45_ = vala_gir_parser_is_container (_tmp44_);
			_tmp32_ = _tmp45_;
		} else {
			_tmp32_ = FALSE;
		}
		if (_tmp32_) {
			const gchar* _tmp46_;
			ValaGirParserNode* _tmp47_;
			gchar* _tmp48_;
			gchar* _tmp49_;
			gboolean _tmp50_;
			_tmp46_ = cname;
			_tmp47_ = parent;
			_tmp48_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp47_);
			_tmp49_ = _tmp48_;
			_tmp50_ = g_str_has_prefix (_tmp46_, _tmp49_);
			_tmp31_ = _tmp50_;
			_g_free0 (_tmp49_);
		} else {
			_tmp31_ = FALSE;
		}
		if (_tmp31_) {
			gchar* new_name = NULL;
			ValaMethod* _tmp51_;
			const gchar* _tmp52_;
			const gchar* _tmp53_;
			ValaGirParserNode* _tmp54_;
			gchar* _tmp55_;
			gchar* _tmp56_;
			gint _tmp57_;
			gint _tmp58_;
			const gchar* _tmp59_;
			gint _tmp60_;
			gint _tmp61_;
			gchar* _tmp62_;
			gchar* _tmp63_;
			ValaGirParserNode* _tmp64_;
			const gchar* _tmp65_;
			ValaGirParserNode* _tmp66_;
			ValaGirParserNode* _tmp67_;
			gboolean _tmp68_;
			_tmp51_ = method;
			_tmp52_ = vala_symbol_get_name ((ValaSymbol*) _tmp51_);
			_tmp53_ = _tmp52_;
			_tmp54_ = parent;
			_tmp55_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp54_);
			_tmp56_ = _tmp55_;
			_tmp57_ = strlen (_tmp56_);
			_tmp58_ = _tmp57_;
			_tmp59_ = ns_cprefix;
			_tmp60_ = strlen (_tmp59_);
			_tmp61_ = _tmp60_;
			_tmp62_ = string_substring (_tmp53_, (glong) (_tmp58_ - _tmp61_), (glong) -1);
			_tmp63_ = _tmp62_;
			_g_free0 (_tmp56_);
			new_name = _tmp63_;
			_tmp64_ = parent;
			_tmp65_ = new_name;
			_tmp66_ = vala_gir_parser_node_lookup (_tmp64_, _tmp65_, FALSE, NULL);
			_tmp67_ = _tmp66_;
			_tmp68_ = _tmp67_ == NULL;
			_vala_gir_parser_node_unref0 (_tmp67_);
			if (_tmp68_) {
				ValaGirParserNode* _tmp69_;
				ValaGirParserNode* _tmp70_;
				ValaGirParserNode* _tmp71_;
				const gchar* _tmp72_;
				gchar* _tmp73_;
				ValaMethod* _tmp74_;
				const gchar* _tmp75_;
				ValaMethod* _tmp76_;
				ValaList* _tmp77_;
				ValaList* _tmp78_;
				gpointer _tmp79_;
				ValaParameter* _tmp80_;
				ValaMethod* _tmp81_;
				ValaGirParserNode* _tmp82_;
				ValaGirParserNode* _tmp83_;
				_tmp69_ = ns;
				_tmp70_ = node;
				vala_gir_parser_node_remove_member (_tmp69_, _tmp70_);
				_tmp71_ = node;
				_tmp72_ = new_name;
				_tmp73_ = g_strdup (_tmp72_);
				_g_free0 (_tmp71_->name);
				_tmp71_->name = _tmp73_;
				_tmp74_ = method;
				_tmp75_ = new_name;
				vala_symbol_set_name ((ValaSymbol*) _tmp74_, _tmp75_);
				_tmp76_ = method;
				_tmp77_ = vala_callable_get_parameters ((ValaCallable*) _tmp76_);
				_tmp78_ = _tmp77_;
				_tmp79_ = vala_list_remove_at (_tmp78_, 0);
				_tmp80_ = (ValaParameter*) _tmp79_;
				_vala_code_node_unref0 (_tmp80_);
				_vala_iterable_unref0 (_tmp78_);
				_tmp81_ = method;
				vala_method_set_binding (_tmp81_, VALA_MEMBER_BINDING_INSTANCE);
				_tmp82_ = parent;
				_tmp83_ = node;
				vala_gir_parser_node_add_member (_tmp82_, _tmp83_);
			}
			_g_free0 (new_name);
			_vala_gir_parser_node_unref0 (parent);
			_vala_code_node_unref0 (sym);
			_vala_code_node_unref0 (first_param);
			_g_free0 (cname);
			_vala_code_node_unref0 (method);
			_g_free0 (ns_cprefix);
			return;
		}
		_vala_gir_parser_node_unref0 (parent);
		_vala_code_node_unref0 (sym);
	}
	match = 0;
	_tmp84_ = ns;
	_tmp85_ = _vala_gir_parser_node_ref0 (_tmp84_);
	parent = _tmp85_;
	_tmp86_ = cname;
	_tmp87_ = ns;
	vala_gir_parser_find_parent (self, _tmp86_, _tmp87_, &parent, &match);
	_tmp88_ = method;
	_tmp89_ = vala_symbol_get_name ((ValaSymbol*) _tmp88_);
	_tmp90_ = _tmp89_;
	_tmp91_ = parent;
	_tmp92_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp91_);
	_tmp93_ = _tmp92_;
	_tmp94_ = strlen (_tmp93_);
	_tmp95_ = _tmp94_;
	_tmp96_ = ns_cprefix;
	_tmp97_ = strlen (_tmp96_);
	_tmp98_ = _tmp97_;
	_tmp99_ = string_substring (_tmp90_, (glong) (_tmp95_ - _tmp98_), (glong) -1);
	_tmp100_ = _tmp99_;
	_g_free0 (_tmp93_);
	new_name = _tmp100_;
	_tmp102_ = method;
	_tmp103_ = parent;
	_tmp104_ = _tmp103_->symbol;
	_tmp105_ = vala_gir_parser_same_gir (self, (ValaSymbol*) _tmp102_, _tmp104_);
	if (_tmp105_) {
		ValaGirParserNode* _tmp106_;
		const gchar* _tmp107_;
		ValaGirParserNode* _tmp108_;
		ValaGirParserNode* _tmp109_;
		_tmp106_ = parent;
		_tmp107_ = new_name;
		_tmp108_ = vala_gir_parser_node_lookup (_tmp106_, _tmp107_, FALSE, NULL);
		_tmp109_ = _tmp108_;
		_tmp101_ = _tmp109_ == NULL;
		_vala_gir_parser_node_unref0 (_tmp109_);
	} else {
		_tmp101_ = FALSE;
	}
	if (_tmp101_) {
		ValaGirParserNode* _tmp110_;
		ValaGirParserNode* _tmp111_;
		ValaGirParserNode* _tmp112_;
		const gchar* _tmp113_;
		gchar* _tmp114_;
		ValaMethod* _tmp115_;
		const gchar* _tmp116_;
		ValaGirParserNode* _tmp117_;
		ValaGirParserNode* _tmp118_;
		_tmp110_ = ns;
		_tmp111_ = node;
		vala_gir_parser_node_remove_member (_tmp110_, _tmp111_);
		_tmp112_ = node;
		_tmp113_ = new_name;
		_tmp114_ = g_strdup (_tmp113_);
		_g_free0 (_tmp112_->name);
		_tmp112_->name = _tmp114_;
		_tmp115_ = method;
		_tmp116_ = new_name;
		vala_symbol_set_name ((ValaSymbol*) _tmp115_, _tmp116_);
		_tmp117_ = parent;
		_tmp118_ = node;
		vala_gir_parser_node_add_member (_tmp117_, _tmp118_);
	}
	_g_free0 (new_name);
	_vala_gir_parser_node_unref0 (parent);
	_vala_code_node_unref0 (first_param);
	_g_free0 (cname);
	_vala_code_node_unref0 (method);
	_g_free0 (ns_cprefix);
}


static void vala_gir_parser_process_virtual_method_field (ValaGirParser* self, ValaGirParserNode* node, ValaDelegate* d, ValaUnresolvedSymbol* gtype_struct_for) {
	ValaGirParserNode* gtype_node = NULL;
	ValaGirParserNode* _tmp0_;
	ValaGirParserNode* _tmp1_;
	ValaUnresolvedSymbol* _tmp2_;
	ValaGirParserNode* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaGirParserNode* _tmp5_;
	ValaArrayList* nodes = NULL;
	ValaGirParserNode* _tmp19_;
	ValaDelegate* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	ValaArrayList* _tmp23_;
	ValaArrayList* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	g_return_if_fail (d != NULL);
	g_return_if_fail (gtype_struct_for != NULL);
	_tmp0_ = node;
	_tmp1_ = _tmp0_->parent;
	_tmp2_ = gtype_struct_for;
	_tmp3_ = vala_gir_parser_resolve_node (self, _tmp1_, _tmp2_, FALSE);
	gtype_node = _tmp3_;
	_tmp5_ = gtype_node;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		ValaGirParserNode* _tmp6_;
		ValaSymbol* _tmp7_;
		_tmp6_ = gtype_node;
		_tmp7_ = _tmp6_->symbol;
		_tmp4_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, VALA_TYPE_OBJECT_TYPE_SYMBOL);
	}
	if (_tmp4_) {
		ValaUnresolvedSymbol* _tmp8_;
		ValaSourceReference* _tmp9_;
		ValaSourceReference* _tmp10_;
		ValaUnresolvedSymbol* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		ValaGirParserNode* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp8_ = gtype_struct_for;
		_tmp9_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = gtype_struct_for;
		_tmp12_ = vala_code_node_to_string ((ValaCodeNode*) _tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = node;
		_tmp15_ = vala_gir_parser_node_to_string (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = g_strdup_printf ("Unknown symbol `%s' for virtual method field `%s'", _tmp13_, _tmp16_);
		_tmp18_ = _tmp17_;
		vala_report_error (_tmp10_, _tmp18_);
		_g_free0 (_tmp18_);
		_g_free0 (_tmp16_);
		_g_free0 (_tmp13_);
	}
	_tmp19_ = gtype_node;
	_tmp20_ = d;
	_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = vala_gir_parser_node_lookup_all (_tmp19_, _tmp22_);
	nodes = _tmp23_;
	_tmp24_ = nodes;
	if (_tmp24_ == NULL) {
		_vala_iterable_unref0 (nodes);
		_vala_gir_parser_node_unref0 (gtype_node);
		return;
	}
	{
		ValaArrayList* _n_list = NULL;
		ValaArrayList* _tmp25_;
		ValaArrayList* _tmp26_;
		gint _n_size = 0;
		ValaArrayList* _tmp27_;
		gint _tmp28_;
		gint _tmp29_;
		gint _n_index = 0;
		_tmp25_ = nodes;
		_tmp26_ = _vala_iterable_ref0 (_tmp25_);
		_n_list = _tmp26_;
		_tmp27_ = _n_list;
		_tmp28_ = vala_collection_get_size ((ValaCollection*) _tmp27_);
		_tmp29_ = _tmp28_;
		_n_size = _tmp29_;
		_n_index = -1;
		while (TRUE) {
			gint _tmp30_;
			gint _tmp31_;
			gint _tmp32_;
			ValaGirParserNode* n = NULL;
			ValaArrayList* _tmp33_;
			gint _tmp34_;
			gpointer _tmp35_;
			ValaGirParserNode* _tmp36_;
			ValaGirParserNode* _tmp37_;
			_tmp30_ = _n_index;
			_n_index = _tmp30_ + 1;
			_tmp31_ = _n_index;
			_tmp32_ = _n_size;
			if (!(_tmp31_ < _tmp32_)) {
				break;
			}
			_tmp33_ = _n_list;
			_tmp34_ = _n_index;
			_tmp35_ = vala_list_get ((ValaList*) _tmp33_, _tmp34_);
			n = (ValaGirParserNode*) _tmp35_;
			_tmp36_ = node;
			_tmp37_ = n;
			if (_tmp36_ != _tmp37_) {
				ValaGirParserNode* _tmp38_;
				_tmp38_ = n;
				vala_gir_parser_node_process (_tmp38_, self);
			}
			_vala_gir_parser_node_unref0 (n);
		}
		_vala_iterable_unref0 (_n_list);
	}
	{
		ValaArrayList* _n_list = NULL;
		ValaArrayList* _tmp39_;
		ValaArrayList* _tmp40_;
		gint _n_size = 0;
		ValaArrayList* _tmp41_;
		gint _tmp42_;
		gint _tmp43_;
		gint _n_index = 0;
		_tmp39_ = nodes;
		_tmp40_ = _vala_iterable_ref0 (_tmp39_);
		_n_list = _tmp40_;
		_tmp41_ = _n_list;
		_tmp42_ = vala_collection_get_size ((ValaCollection*) _tmp41_);
		_tmp43_ = _tmp42_;
		_n_size = _tmp43_;
		_n_index = -1;
		while (TRUE) {
			gint _tmp44_;
			gint _tmp45_;
			gint _tmp46_;
			ValaGirParserNode* n = NULL;
			ValaArrayList* _tmp47_;
			gint _tmp48_;
			gpointer _tmp49_;
			ValaGirParserNode* _tmp50_;
			gboolean _tmp51_;
			ValaSymbol* sym = NULL;
			ValaGirParserNode* _tmp52_;
			ValaSymbol* _tmp53_;
			ValaSymbol* _tmp54_;
			ValaSymbol* _tmp55_;
			_tmp44_ = _n_index;
			_n_index = _tmp44_ + 1;
			_tmp45_ = _n_index;
			_tmp46_ = _n_size;
			if (!(_tmp45_ < _tmp46_)) {
				break;
			}
			_tmp47_ = _n_list;
			_tmp48_ = _n_index;
			_tmp49_ = vala_list_get ((ValaList*) _tmp47_, _tmp48_);
			n = (ValaGirParserNode*) _tmp49_;
			_tmp50_ = n;
			_tmp51_ = _tmp50_->merged;
			if (_tmp51_) {
				_vala_gir_parser_node_unref0 (n);
				continue;
			}
			_tmp52_ = n;
			_tmp53_ = _tmp52_->symbol;
			_tmp54_ = _vala_code_node_ref0 (_tmp53_);
			sym = _tmp54_;
			_tmp55_ = sym;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp55_, VALA_TYPE_SIGNAL)) {
				ValaSignal* sig = NULL;
				ValaSymbol* _tmp56_;
				ValaSignal* _tmp57_;
				ValaSignal* _tmp58_;
				ValaSignal* _tmp59_;
				ValaDelegate* _tmp60_;
				_tmp56_ = sym;
				_tmp57_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, VALA_TYPE_SIGNAL, ValaSignal));
				sig = _tmp57_;
				_tmp58_ = sig;
				vala_signal_set_is_virtual (_tmp58_, TRUE);
				_tmp59_ = sig;
				_tmp60_ = d;
				vala_gir_parser_assume_parameter_names (self, _tmp59_, (ValaSymbol*) _tmp60_, TRUE);
				_vala_code_node_unref0 (sig);
			} else {
				ValaSymbol* _tmp61_;
				_tmp61_ = sym;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp61_, VALA_TYPE_PROPERTY)) {
					ValaProperty* prop = NULL;
					ValaSymbol* _tmp62_;
					ValaProperty* _tmp63_;
					ValaProperty* _tmp64_;
					_tmp62_ = sym;
					_tmp63_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp62_, VALA_TYPE_PROPERTY, ValaProperty));
					prop = _tmp63_;
					_tmp64_ = prop;
					vala_property_set_is_virtual (_tmp64_, TRUE);
					_vala_code_node_unref0 (prop);
				}
			}
			_vala_code_node_unref0 (sym);
			_vala_gir_parser_node_unref0 (n);
		}
		_vala_iterable_unref0 (_n_list);
	}
	_vala_iterable_unref0 (nodes);
	_vala_gir_parser_node_unref0 (gtype_node);
}


static void vala_gir_parser_process_async_method (ValaGirParser* self, ValaGirParserNode* node) {
	ValaMethod* m = NULL;
	ValaGirParserNode* _tmp0_;
	ValaSymbol* _tmp1_;
	ValaMethod* _tmp2_;
	gchar* finish_method_base = NULL;
	ValaMethod* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	ValaGirParserNode* finish_method_node = NULL;
	ValaGirParserNode* _tmp27_;
	ValaGirParserNode* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	ValaGirParserNode* _tmp32_;
	ValaGirParserNode* _tmp33_;
	ValaGirParserNode* _tmp34_;
	ValaMethod* method = NULL;
	ValaMethod* _tmp59_;
	ValaMethod* _tmp60_;
	gboolean _tmp61_ = FALSE;
	ValaGirParserNode* _tmp62_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = node;
	_tmp1_ = _tmp0_->symbol;
	_tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, VALA_TYPE_METHOD, ValaMethod));
	m = _tmp2_;
	_tmp3_ = m;
	_tmp4_ = vala_symbol_get_name ((ValaSymbol*) _tmp3_);
	_tmp5_ = _tmp4_;
	if (_tmp5_ == NULL) {
		ValaMethod* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = m;
		_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, VALA_TYPE_CREATION_METHOD), "m is CreationMethod");
		_tmp7_ = g_strdup ("new");
		_g_free0 (finish_method_base);
		finish_method_base = _tmp7_;
	} else {
		ValaMethod* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		gboolean _tmp11_;
		_tmp8_ = m;
		_tmp9_ = vala_symbol_get_name ((ValaSymbol*) _tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = g_str_has_suffix (_tmp10_, "_async");
		if (_tmp11_) {
			ValaMethod* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			ValaMethod* _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			gint _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gint _tmp21_;
			gchar* _tmp22_;
			_tmp12_ = m;
			_tmp13_ = vala_symbol_get_name ((ValaSymbol*) _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = m;
			_tmp16_ = vala_symbol_get_name ((ValaSymbol*) _tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = strlen (_tmp17_);
			_tmp19_ = _tmp18_;
			_tmp20_ = strlen ("_async");
			_tmp21_ = _tmp20_;
			_tmp22_ = string_substring (_tmp14_, (glong) 0, (glong) (_tmp19_ - _tmp21_));
			_g_free0 (finish_method_base);
			finish_method_base = _tmp22_;
		} else {
			ValaMethod* _tmp23_;
			const gchar* _tmp24_;
			const gchar* _tmp25_;
			gchar* _tmp26_;
			_tmp23_ = m;
			_tmp24_ = vala_symbol_get_name ((ValaSymbol*) _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = g_strdup (_tmp25_);
			_g_free0 (finish_method_base);
			finish_method_base = _tmp26_;
		}
	}
	_tmp27_ = node;
	_tmp28_ = _tmp27_->parent;
	_tmp29_ = finish_method_base;
	_tmp30_ = g_strconcat (_tmp29_, "_finish", NULL);
	_tmp31_ = _tmp30_;
	_tmp32_ = vala_gir_parser_node_lookup (_tmp28_, _tmp31_, FALSE, NULL);
	_tmp33_ = _tmp32_;
	_g_free0 (_tmp31_);
	finish_method_node = _tmp33_;
	_tmp34_ = finish_method_node;
	if (_tmp34_ == NULL) {
		gchar* method_cname = NULL;
		ValaGirParserNode* _tmp35_;
		gchar* _tmp36_;
		_tmp35_ = node;
		_tmp36_ = vala_gir_parser_node_get_finish_cname (_tmp35_);
		method_cname = _tmp36_;
		{
			ValaArrayList* _n_list = NULL;
			ValaGirParserNode* _tmp37_;
			ValaGirParserNode* _tmp38_;
			ValaArrayList* _tmp39_;
			ValaArrayList* _tmp40_;
			gint _n_size = 0;
			ValaArrayList* _tmp41_;
			gint _tmp42_;
			gint _tmp43_;
			gint _n_index = 0;
			_tmp37_ = node;
			_tmp38_ = _tmp37_->parent;
			_tmp39_ = _tmp38_->members;
			_tmp40_ = _vala_iterable_ref0 (_tmp39_);
			_n_list = _tmp40_;
			_tmp41_ = _n_list;
			_tmp42_ = vala_collection_get_size ((ValaCollection*) _tmp41_);
			_tmp43_ = _tmp42_;
			_n_size = _tmp43_;
			_n_index = -1;
			while (TRUE) {
				gint _tmp44_;
				gint _tmp45_;
				gint _tmp46_;
				ValaGirParserNode* n = NULL;
				ValaArrayList* _tmp47_;
				gint _tmp48_;
				gpointer _tmp49_;
				gboolean _tmp50_ = FALSE;
				ValaGirParserNode* _tmp51_;
				ValaSymbol* _tmp52_;
				_tmp44_ = _n_index;
				_n_index = _tmp44_ + 1;
				_tmp45_ = _n_index;
				_tmp46_ = _n_size;
				if (!(_tmp45_ < _tmp46_)) {
					break;
				}
				_tmp47_ = _n_list;
				_tmp48_ = _n_index;
				_tmp49_ = vala_list_get ((ValaList*) _tmp47_, _tmp48_);
				n = (ValaGirParserNode*) _tmp49_;
				_tmp51_ = n;
				_tmp52_ = _tmp51_->symbol;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp52_, VALA_TYPE_METHOD)) {
					ValaGirParserNode* _tmp53_;
					gchar* _tmp54_;
					gchar* _tmp55_;
					const gchar* _tmp56_;
					_tmp53_ = n;
					_tmp54_ = vala_gir_parser_node_get_cname (_tmp53_);
					_tmp55_ = _tmp54_;
					_tmp56_ = method_cname;
					_tmp50_ = g_strcmp0 (_tmp55_, _tmp56_) == 0;
					_g_free0 (_tmp55_);
				} else {
					_tmp50_ = FALSE;
				}
				if (_tmp50_) {
					ValaGirParserNode* _tmp57_;
					ValaGirParserNode* _tmp58_;
					_tmp57_ = n;
					_tmp58_ = _vala_gir_parser_node_ref0 (_tmp57_);
					_vala_gir_parser_node_unref0 (finish_method_node);
					finish_method_node = _tmp58_;
					_vala_gir_parser_node_unref0 (n);
					break;
				}
				_vala_gir_parser_node_unref0 (n);
			}
			_vala_iterable_unref0 (_n_list);
		}
		_g_free0 (method_cname);
	}
	_tmp59_ = m;
	_tmp60_ = _vala_code_node_ref0 (_tmp59_);
	method = _tmp60_;
	_tmp62_ = finish_method_node;
	if (_tmp62_ != NULL) {
		ValaGirParserNode* _tmp63_;
		ValaSymbol* _tmp64_;
		_tmp63_ = finish_method_node;
		_tmp64_ = _tmp63_->symbol;
		_tmp61_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp64_, VALA_TYPE_METHOD);
	} else {
		_tmp61_ = FALSE;
	}
	if (_tmp61_) {
		ValaGirParserNode* _tmp65_;
		ValaMethod* finish_method = NULL;
		ValaGirParserNode* _tmp66_;
		ValaSymbol* _tmp67_;
		ValaMethod* _tmp68_;
		ValaMethod* _tmp69_;
		ValaGirParserNode* _tmp199_;
		ValaGirParserNode* _tmp200_;
		_tmp65_ = finish_method_node;
		vala_gir_parser_node_process (_tmp65_, self);
		_tmp66_ = finish_method_node;
		_tmp67_ = _tmp66_->symbol;
		_tmp68_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, VALA_TYPE_METHOD, ValaMethod));
		finish_method = _tmp68_;
		_tmp69_ = finish_method;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp69_, VALA_TYPE_CREATION_METHOD)) {
			ValaMethod* _tmp70_;
			const gchar* _tmp71_;
			const gchar* _tmp72_;
			ValaMethod* _tmp73_;
			ValaSourceReference* _tmp74_;
			ValaSourceReference* _tmp75_;
			ValaCreationMethod* _tmp76_;
			ValaMethod* _tmp77_;
			ValaMethod* _tmp78_;
			ValaSymbolAccessibility _tmp79_;
			ValaSymbolAccessibility _tmp80_;
			ValaMethod* _tmp81_;
			ValaMethod* _tmp82_;
			ValaMemberBinding _tmp83_;
			ValaMemberBinding _tmp84_;
			ValaMethod* _tmp85_;
			ValaMethod* _tmp86_;
			ValaMethod* _tmp87_;
			ValaMethod* _tmp88_;
			gboolean _tmp89_;
			gboolean _tmp90_;
			ValaMethod* _tmp91_;
			GList* _tmp92_;
			ValaMethod* _tmp97_;
			ValaGirParserNode* _tmp98_;
			gchar* _tmp99_;
			gchar* _tmp100_;
			const gchar* _tmp101_;
			ValaGirParserNode* _tmp126_;
			ValaMethod* _tmp127_;
			ValaSymbol* _tmp128_;
			_tmp70_ = finish_method;
			_tmp71_ = vala_creation_method_get_class_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, VALA_TYPE_CREATION_METHOD, ValaCreationMethod));
			_tmp72_ = _tmp71_;
			_tmp73_ = m;
			_tmp74_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp73_);
			_tmp75_ = _tmp74_;
			_tmp76_ = vala_creation_method_new (_tmp72_, NULL, _tmp75_, NULL);
			_vala_code_node_unref0 (method);
			method = (ValaMethod*) _tmp76_;
			_tmp77_ = method;
			_tmp78_ = m;
			_tmp79_ = vala_symbol_get_access ((ValaSymbol*) _tmp78_);
			_tmp80_ = _tmp79_;
			vala_symbol_set_access ((ValaSymbol*) _tmp77_, _tmp80_);
			_tmp81_ = method;
			_tmp82_ = m;
			_tmp83_ = vala_method_get_binding (_tmp82_);
			_tmp84_ = _tmp83_;
			vala_method_set_binding (_tmp81_, _tmp84_);
			_tmp85_ = method;
			vala_symbol_set_external ((ValaSymbol*) _tmp85_, TRUE);
			_tmp86_ = method;
			vala_method_set_coroutine (_tmp86_, TRUE);
			_tmp87_ = method;
			_tmp88_ = finish_method;
			_tmp89_ = vala_method_get_has_construct_function (_tmp88_);
			_tmp90_ = _tmp89_;
			vala_method_set_has_construct_function (_tmp87_, _tmp90_);
			_tmp91_ = m;
			_tmp92_ = ((ValaCodeNode*) _tmp91_)->attributes;
			{
				GList* a_collection = NULL;
				GList* a_it = NULL;
				a_collection = _tmp92_;
				for (a_it = a_collection; a_it != NULL; a_it = a_it->next) {
					ValaAttribute* _tmp93_;
					ValaAttribute* a = NULL;
					_tmp93_ = _vala_code_node_ref0 ((ValaAttribute*) a_it->data);
					a = _tmp93_;
					{
						ValaMethod* _tmp94_;
						ValaAttribute* _tmp95_;
						ValaAttribute* _tmp96_;
						_tmp94_ = method;
						_tmp95_ = a;
						_tmp96_ = _vala_code_node_ref0 (_tmp95_);
						((ValaCodeNode*) _tmp94_)->attributes = g_list_append (((ValaCodeNode*) _tmp94_)->attributes, _tmp96_);
						_vala_code_node_unref0 (a);
					}
				}
			}
			_tmp97_ = method;
			_tmp98_ = node;
			_tmp99_ = vala_gir_parser_node_get_cname (_tmp98_);
			_tmp100_ = _tmp99_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp97_, "CCode", "cname", _tmp100_, NULL);
			_g_free0 (_tmp100_);
			_tmp101_ = finish_method_base;
			if (g_strcmp0 (_tmp101_, "new") == 0) {
				ValaMethod* _tmp102_;
				_tmp102_ = method;
				vala_symbol_set_name ((ValaSymbol*) _tmp102_, NULL);
			} else {
				const gchar* _tmp103_;
				gboolean _tmp104_;
				_tmp103_ = finish_method_base;
				_tmp104_ = g_str_has_prefix (_tmp103_, "new_");
				if (_tmp104_) {
					ValaMethod* _tmp105_;
					ValaMethod* _tmp106_;
					const gchar* _tmp107_;
					const gchar* _tmp108_;
					gint _tmp109_;
					gint _tmp110_;
					gchar* _tmp111_;
					gchar* _tmp112_;
					_tmp105_ = method;
					_tmp106_ = m;
					_tmp107_ = vala_symbol_get_name ((ValaSymbol*) _tmp106_);
					_tmp108_ = _tmp107_;
					_tmp109_ = strlen ("new_");
					_tmp110_ = _tmp109_;
					_tmp111_ = string_substring (_tmp108_, (glong) _tmp110_, (glong) -1);
					_tmp112_ = _tmp111_;
					vala_symbol_set_name ((ValaSymbol*) _tmp105_, _tmp112_);
					_g_free0 (_tmp112_);
				}
			}
			{
				ValaList* _param_list = NULL;
				ValaMethod* _tmp113_;
				ValaList* _tmp114_;
				gint _param_size = 0;
				ValaList* _tmp115_;
				gint _tmp116_;
				gint _tmp117_;
				gint _param_index = 0;
				_tmp113_ = m;
				_tmp114_ = vala_callable_get_parameters ((ValaCallable*) _tmp113_);
				_param_list = _tmp114_;
				_tmp115_ = _param_list;
				_tmp116_ = vala_collection_get_size ((ValaCollection*) _tmp115_);
				_tmp117_ = _tmp116_;
				_param_size = _tmp117_;
				_param_index = -1;
				while (TRUE) {
					gint _tmp118_;
					gint _tmp119_;
					gint _tmp120_;
					ValaParameter* param = NULL;
					ValaList* _tmp121_;
					gint _tmp122_;
					gpointer _tmp123_;
					ValaMethod* _tmp124_;
					ValaParameter* _tmp125_;
					_tmp118_ = _param_index;
					_param_index = _tmp118_ + 1;
					_tmp119_ = _param_index;
					_tmp120_ = _param_size;
					if (!(_tmp119_ < _tmp120_)) {
						break;
					}
					_tmp121_ = _param_list;
					_tmp122_ = _param_index;
					_tmp123_ = vala_list_get (_tmp121_, _tmp122_);
					param = (ValaParameter*) _tmp123_;
					_tmp124_ = method;
					_tmp125_ = param;
					vala_callable_add_parameter ((ValaCallable*) _tmp124_, _tmp125_);
					_vala_code_node_unref0 (param);
				}
				_vala_iterable_unref0 (_param_list);
			}
			_tmp126_ = node;
			_tmp127_ = method;
			_tmp128_ = _vala_code_node_ref0 ((ValaSymbol*) _tmp127_);
			_vala_code_node_unref0 (_tmp126_->symbol);
			_tmp126_->symbol = _tmp128_;
		} else {
			ValaMethod* _tmp129_;
			ValaMethod* _tmp130_;
			ValaDataType* _tmp131_;
			ValaDataType* _tmp132_;
			ValaDataType* _tmp133_;
			ValaDataType* _tmp134_;
			ValaAttribute* a = NULL;
			ValaMethod* _tmp135_;
			ValaAttribute* _tmp136_;
			gboolean _tmp137_ = FALSE;
			ValaAttribute* _tmp138_;
			gboolean _tmp144_ = FALSE;
			ValaAttribute* _tmp145_;
			_tmp129_ = method;
			_tmp130_ = finish_method;
			_tmp131_ = vala_callable_get_return_type ((ValaCallable*) _tmp130_);
			_tmp132_ = _tmp131_;
			_tmp133_ = vala_data_type_copy (_tmp132_);
			_tmp134_ = _tmp133_;
			vala_callable_set_return_type ((ValaCallable*) _tmp129_, _tmp134_);
			_vala_code_node_unref0 (_tmp134_);
			_tmp135_ = finish_method;
			_tmp136_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp135_, "CCode");
			a = _tmp136_;
			_tmp138_ = a;
			if (_tmp138_ != NULL) {
				ValaAttribute* _tmp139_;
				gboolean _tmp140_;
				_tmp139_ = a;
				_tmp140_ = vala_attribute_has_argument (_tmp139_, "array_length");
				_tmp137_ = _tmp140_;
			} else {
				_tmp137_ = FALSE;
			}
			if (_tmp137_) {
				ValaMethod* _tmp141_;
				ValaAttribute* _tmp142_;
				gboolean _tmp143_;
				_tmp141_ = method;
				_tmp142_ = a;
				_tmp143_ = vala_attribute_get_bool (_tmp142_, "array_length", FALSE);
				vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp141_, "CCode", "array_length", _tmp143_, NULL);
			}
			_tmp145_ = a;
			if (_tmp145_ != NULL) {
				ValaAttribute* _tmp146_;
				gboolean _tmp147_;
				_tmp146_ = a;
				_tmp147_ = vala_attribute_has_argument (_tmp146_, "array_null_terminated");
				_tmp144_ = _tmp147_;
			} else {
				_tmp144_ = FALSE;
			}
			if (_tmp144_) {
				ValaMethod* _tmp148_;
				ValaAttribute* _tmp149_;
				gboolean _tmp150_;
				_tmp148_ = method;
				_tmp149_ = a;
				_tmp150_ = vala_attribute_get_bool (_tmp149_, "array_null_terminated", FALSE);
				vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp148_, "CCode", "array_null_terminated", _tmp150_, NULL);
			}
			_vala_code_node_unref0 (a);
		}
		{
			ValaList* _param_list = NULL;
			ValaMethod* _tmp151_;
			ValaList* _tmp152_;
			gint _param_size = 0;
			ValaList* _tmp153_;
			gint _tmp154_;
			gint _tmp155_;
			gint _param_index = 0;
			_tmp151_ = finish_method;
			_tmp152_ = vala_callable_get_parameters ((ValaCallable*) _tmp151_);
			_param_list = _tmp152_;
			_tmp153_ = _param_list;
			_tmp154_ = vala_collection_get_size ((ValaCollection*) _tmp153_);
			_tmp155_ = _tmp154_;
			_param_size = _tmp155_;
			_param_index = -1;
			while (TRUE) {
				gint _tmp156_;
				gint _tmp157_;
				gint _tmp158_;
				ValaParameter* param = NULL;
				ValaList* _tmp159_;
				gint _tmp160_;
				gpointer _tmp161_;
				ValaParameter* _tmp162_;
				ValaParameterDirection _tmp163_;
				ValaParameterDirection _tmp164_;
				_tmp156_ = _param_index;
				_param_index = _tmp156_ + 1;
				_tmp157_ = _param_index;
				_tmp158_ = _param_size;
				if (!(_tmp157_ < _tmp158_)) {
					break;
				}
				_tmp159_ = _param_list;
				_tmp160_ = _param_index;
				_tmp161_ = vala_list_get (_tmp159_, _tmp160_);
				param = (ValaParameter*) _tmp161_;
				_tmp162_ = param;
				_tmp163_ = vala_parameter_get_direction (_tmp162_);
				_tmp164_ = _tmp163_;
				if (_tmp164_ == VALA_PARAMETER_DIRECTION_OUT) {
					ValaParameter* async_param = NULL;
					ValaParameter* _tmp165_;
					ValaParameter* _tmp166_;
					ValaMethod* _tmp167_;
					ValaScope* _tmp168_;
					ValaScope* _tmp169_;
					ValaParameter* _tmp170_;
					const gchar* _tmp171_;
					const gchar* _tmp172_;
					ValaSymbol* _tmp173_;
					ValaSymbol* _tmp174_;
					gboolean _tmp175_;
					ValaMethod* _tmp182_;
					ValaParameter* _tmp183_;
					_tmp165_ = param;
					_tmp166_ = vala_parameter_copy (_tmp165_);
					async_param = _tmp166_;
					_tmp167_ = method;
					_tmp168_ = vala_symbol_get_scope ((ValaSymbol*) _tmp167_);
					_tmp169_ = _tmp168_;
					_tmp170_ = param;
					_tmp171_ = vala_symbol_get_name ((ValaSymbol*) _tmp170_);
					_tmp172_ = _tmp171_;
					_tmp173_ = vala_scope_lookup (_tmp169_, _tmp172_);
					_tmp174_ = _tmp173_;
					_tmp175_ = _tmp174_ != NULL;
					_vala_code_node_unref0 (_tmp174_);
					if (_tmp175_) {
						ValaParameter* _tmp176_;
						ValaParameter* _tmp177_;
						const gchar* _tmp178_;
						const gchar* _tmp179_;
						gchar* _tmp180_;
						gchar* _tmp181_;
						_tmp176_ = async_param;
						_tmp177_ = async_param;
						_tmp178_ = vala_symbol_get_name ((ValaSymbol*) _tmp177_);
						_tmp179_ = _tmp178_;
						_tmp180_ = g_strconcat (_tmp179_, "_out", NULL);
						_tmp181_ = _tmp180_;
						vala_symbol_set_name ((ValaSymbol*) _tmp177_, _tmp181_);
						_g_free0 (_tmp181_);
					}
					_tmp182_ = method;
					_tmp183_ = async_param;
					vala_callable_add_parameter ((ValaCallable*) _tmp182_, _tmp183_);
					_vala_code_node_unref0 (async_param);
				}
				_vala_code_node_unref0 (param);
			}
			_vala_iterable_unref0 (_param_list);
		}
		{
			ValaList* _error_type_list = NULL;
			ValaMethod* _tmp184_;
			ValaList* _tmp185_;
			gint _error_type_size = 0;
			ValaList* _tmp186_;
			gint _tmp187_;
			gint _tmp188_;
			gint _error_type_index = 0;
			_tmp184_ = finish_method;
			_tmp185_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp184_);
			_error_type_list = _tmp185_;
			_tmp186_ = _error_type_list;
			_tmp187_ = vala_collection_get_size ((ValaCollection*) _tmp186_);
			_tmp188_ = _tmp187_;
			_error_type_size = _tmp188_;
			_error_type_index = -1;
			while (TRUE) {
				gint _tmp189_;
				gint _tmp190_;
				gint _tmp191_;
				ValaDataType* error_type = NULL;
				ValaList* _tmp192_;
				gint _tmp193_;
				gpointer _tmp194_;
				ValaMethod* _tmp195_;
				ValaDataType* _tmp196_;
				ValaDataType* _tmp197_;
				ValaDataType* _tmp198_;
				_tmp189_ = _error_type_index;
				_error_type_index = _tmp189_ + 1;
				_tmp190_ = _error_type_index;
				_tmp191_ = _error_type_size;
				if (!(_tmp190_ < _tmp191_)) {
					break;
				}
				_tmp192_ = _error_type_list;
				_tmp193_ = _error_type_index;
				_tmp194_ = vala_list_get (_tmp192_, _tmp193_);
				error_type = (ValaDataType*) _tmp194_;
				_tmp195_ = method;
				_tmp196_ = error_type;
				_tmp197_ = vala_data_type_copy (_tmp196_);
				_tmp198_ = _tmp197_;
				vala_code_node_add_error_type ((ValaCodeNode*) _tmp195_, _tmp198_);
				_vala_code_node_unref0 (_tmp198_);
				_vala_code_node_unref0 (error_type);
			}
			_vala_iterable_unref0 (_error_type_list);
		}
		_tmp199_ = finish_method_node;
		_tmp199_->processed = TRUE;
		_tmp200_ = finish_method_node;
		_tmp200_->merged = TRUE;
		_vala_code_node_unref0 (finish_method);
	}
	_vala_code_node_unref0 (method);
	_vala_gir_parser_node_unref0 (finish_method_node);
	_g_free0 (finish_method_base);
	_vala_code_node_unref0 (m);
}


static guint vala_gir_parser_unresolved_symbol_hash (ValaUnresolvedSymbol* sym) {
	guint result = 0U;
	GString* builder = NULL;
	GString* _tmp0_;
	GString* _tmp9_;
	const gchar* _tmp10_;
	guint _tmp11_;
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	while (TRUE) {
		ValaUnresolvedSymbol* _tmp1_;
		GString* _tmp2_;
		ValaUnresolvedSymbol* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		ValaUnresolvedSymbol* _tmp6_;
		ValaUnresolvedSymbol* _tmp7_;
		ValaUnresolvedSymbol* _tmp8_;
		_tmp1_ = sym;
		if (!(_tmp1_ != NULL)) {
			break;
		}
		_tmp2_ = builder;
		_tmp3_ = sym;
		_tmp4_ = vala_symbol_get_name ((ValaSymbol*) _tmp3_);
		_tmp5_ = _tmp4_;
		g_string_append (_tmp2_, _tmp5_);
		_tmp6_ = sym;
		_tmp7_ = vala_unresolved_symbol_get_inner (_tmp6_);
		_tmp8_ = _tmp7_;
		sym = _tmp8_;
	}
	_tmp9_ = builder;
	_tmp10_ = _tmp9_->str;
	_tmp11_ = g_str_hash (_tmp10_);
	result = _tmp11_;
	_g_string_free0 (builder);
	return result;
}


static gboolean vala_gir_parser_unresolved_symbol_equal (ValaUnresolvedSymbol* sym1, ValaUnresolvedSymbol* sym2) {
	gboolean result = FALSE;
	while (TRUE) {
		ValaUnresolvedSymbol* _tmp0_;
		ValaUnresolvedSymbol* _tmp1_;
		gboolean _tmp2_ = FALSE;
		ValaUnresolvedSymbol* _tmp3_;
		ValaUnresolvedSymbol* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		ValaUnresolvedSymbol* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		ValaUnresolvedSymbol* _tmp11_;
		ValaUnresolvedSymbol* _tmp12_;
		ValaUnresolvedSymbol* _tmp13_;
		ValaUnresolvedSymbol* _tmp14_;
		ValaUnresolvedSymbol* _tmp15_;
		ValaUnresolvedSymbol* _tmp16_;
		_tmp0_ = sym1;
		_tmp1_ = sym2;
		if (!(_tmp0_ != _tmp1_)) {
			break;
		}
		_tmp3_ = sym1;
		if (_tmp3_ == NULL) {
			_tmp2_ = TRUE;
		} else {
			ValaUnresolvedSymbol* _tmp4_;
			_tmp4_ = sym2;
			_tmp2_ = _tmp4_ == NULL;
		}
		if (_tmp2_) {
			result = FALSE;
			return result;
		}
		_tmp5_ = sym1;
		_tmp6_ = vala_symbol_get_name ((ValaSymbol*) _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = sym2;
		_tmp9_ = vala_symbol_get_name ((ValaSymbol*) _tmp8_);
		_tmp10_ = _tmp9_;
		if (g_strcmp0 (_tmp7_, _tmp10_) != 0) {
			result = FALSE;
			return result;
		}
		_tmp11_ = sym1;
		_tmp12_ = vala_unresolved_symbol_get_inner (_tmp11_);
		_tmp13_ = _tmp12_;
		sym1 = _tmp13_;
		_tmp14_ = sym2;
		_tmp15_ = vala_unresolved_symbol_get_inner (_tmp14_);
		_tmp16_ = _tmp15_;
		sym2 = _tmp16_;
	}
	result = TRUE;
	return result;
}


static ValaGirParserNode* vala_gir_parser_base_interface_property (ValaGirParser* self, ValaGirParserNode* prop_node) {
	ValaGirParserNode* result = NULL;
	ValaClass* cl = NULL;
	ValaGirParserNode* _tmp0_;
	ValaGirParserNode* _tmp1_;
	ValaSymbol* _tmp2_;
	ValaClass* _tmp3_;
	ValaClass* _tmp4_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (prop_node != NULL, NULL);
	_tmp0_ = prop_node;
	_tmp1_ = _tmp0_->parent;
	_tmp2_ = _tmp1_->symbol;
	_tmp3_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp2_) : NULL);
	cl = _tmp3_;
	_tmp4_ = cl;
	if (_tmp4_ == NULL) {
		result = NULL;
		_vala_code_node_unref0 (cl);
		return result;
	}
	{
		ValaList* _type_list = NULL;
		ValaClass* _tmp5_;
		ValaList* _tmp6_;
		gint _type_size = 0;
		ValaList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _type_index = 0;
		_tmp5_ = cl;
		_tmp6_ = vala_class_get_base_types (_tmp5_);
		_type_list = _tmp6_;
		_tmp7_ = _type_list;
		_tmp8_ = vala_collection_get_size ((ValaCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_type_size = _tmp9_;
		_type_index = -1;
		while (TRUE) {
			gint _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			ValaDataType* type = NULL;
			ValaList* _tmp13_;
			gint _tmp14_;
			gpointer _tmp15_;
			ValaDataType* _tmp16_;
			ValaGirParserNode* base_node = NULL;
			ValaGirParserNode* _tmp17_;
			ValaGirParserNode* _tmp18_;
			ValaDataType* _tmp19_;
			ValaUnresolvedSymbol* _tmp20_;
			ValaUnresolvedSymbol* _tmp21_;
			ValaGirParserNode* _tmp22_;
			gboolean _tmp23_ = FALSE;
			ValaGirParserNode* _tmp24_;
			_tmp10_ = _type_index;
			_type_index = _tmp10_ + 1;
			_tmp11_ = _type_index;
			_tmp12_ = _type_size;
			if (!(_tmp11_ < _tmp12_)) {
				break;
			}
			_tmp13_ = _type_list;
			_tmp14_ = _type_index;
			_tmp15_ = vala_list_get (_tmp13_, _tmp14_);
			type = (ValaDataType*) _tmp15_;
			_tmp16_ = type;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, VALA_TYPE_UNRESOLVED_TYPE)) {
				_vala_code_node_unref0 (type);
				continue;
			}
			_tmp17_ = prop_node;
			_tmp18_ = _tmp17_->parent;
			_tmp19_ = type;
			_tmp20_ = vala_unresolved_type_get_unresolved_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, VALA_TYPE_UNRESOLVED_TYPE, ValaUnresolvedType));
			_tmp21_ = _tmp20_;
			_tmp22_ = vala_gir_parser_resolve_node (self, _tmp18_, _tmp21_, FALSE);
			base_node = _tmp22_;
			_tmp24_ = base_node;
			if (_tmp24_ != NULL) {
				ValaGirParserNode* _tmp25_;
				ValaSymbol* _tmp26_;
				_tmp25_ = base_node;
				_tmp26_ = _tmp25_->symbol;
				_tmp23_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, VALA_TYPE_INTERFACE);
			} else {
				_tmp23_ = FALSE;
			}
			if (_tmp23_) {
				ValaGirParserNode* base_prop_node = NULL;
				ValaGirParserNode* _tmp27_;
				ValaGirParserNode* _tmp28_;
				const gchar* _tmp29_;
				ValaGirParserNode* _tmp30_;
				gboolean _tmp31_ = FALSE;
				ValaGirParserNode* _tmp32_;
				_tmp27_ = base_node;
				_tmp28_ = prop_node;
				_tmp29_ = _tmp28_->name;
				_tmp30_ = vala_gir_parser_node_lookup (_tmp27_, _tmp29_, FALSE, NULL);
				base_prop_node = _tmp30_;
				_tmp32_ = base_prop_node;
				if (_tmp32_ != NULL) {
					ValaGirParserNode* _tmp33_;
					ValaSymbol* _tmp34_;
					_tmp33_ = base_prop_node;
					_tmp34_ = _tmp33_->symbol;
					_tmp31_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, VALA_TYPE_PROPERTY);
				} else {
					_tmp31_ = FALSE;
				}
				if (_tmp31_) {
					ValaProperty* base_property = NULL;
					ValaGirParserNode* _tmp35_;
					ValaSymbol* _tmp36_;
					ValaProperty* _tmp37_;
					gboolean _tmp38_ = FALSE;
					ValaProperty* _tmp39_;
					gboolean _tmp40_;
					gboolean _tmp41_;
					_tmp35_ = base_prop_node;
					_tmp36_ = _tmp35_->symbol;
					_tmp37_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, VALA_TYPE_PROPERTY, ValaProperty));
					base_property = _tmp37_;
					_tmp39_ = base_property;
					_tmp40_ = vala_property_get_is_abstract (_tmp39_);
					_tmp41_ = _tmp40_;
					if (_tmp41_) {
						_tmp38_ = TRUE;
					} else {
						ValaProperty* _tmp42_;
						gboolean _tmp43_;
						gboolean _tmp44_;
						_tmp42_ = base_property;
						_tmp43_ = vala_property_get_is_virtual (_tmp42_);
						_tmp44_ = _tmp43_;
						_tmp38_ = _tmp44_;
					}
					if (_tmp38_) {
						result = base_prop_node;
						_vala_code_node_unref0 (base_property);
						_vala_gir_parser_node_unref0 (base_node);
						_vala_code_node_unref0 (type);
						_vala_iterable_unref0 (_type_list);
						_vala_code_node_unref0 (cl);
						return result;
					}
					_vala_code_node_unref0 (base_property);
				}
				_vala_gir_parser_node_unref0 (base_prop_node);
			}
			_vala_gir_parser_node_unref0 (base_node);
			_vala_code_node_unref0 (type);
		}
		_vala_iterable_unref0 (_type_list);
	}
	result = NULL;
	_vala_code_node_unref0 (cl);
	return result;
}


ValaGirParser* vala_gir_parser_construct (GType object_type) {
	ValaGirParser* self = NULL;
	self = (ValaGirParser*) vala_code_visitor_construct (object_type);
	return self;
}


ValaGirParser* vala_gir_parser_new (void) {
	return vala_gir_parser_construct (VALA_TYPE_GIR_PARSER);
}


static gpointer _vala_source_reference_ref0 (gpointer self) {
	return self ? vala_source_reference_ref (self) : NULL;
}


static ValaGirParserArgument* vala_gir_parser_argument_construct (GType object_type, ValaExpression* expression, ValaSourceReference* source_reference) {
	ValaGirParserArgument* self = NULL;
	ValaExpression* _tmp0_;
	ValaExpression* _tmp1_;
	ValaSourceReference* _tmp2_;
	ValaSourceReference* _tmp3_;
	g_return_val_if_fail (expression != NULL, NULL);
	self = (ValaGirParserArgument*) g_type_create_instance (object_type);
	_tmp0_ = expression;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->expression);
	self->expression = _tmp1_;
	_tmp2_ = source_reference;
	_tmp3_ = _vala_source_reference_ref0 (_tmp2_);
	_vala_source_reference_unref0 (self->source_reference);
	self->source_reference = _tmp3_;
	return self;
}


static ValaGirParserArgument* vala_gir_parser_argument_new (ValaExpression* expression, ValaSourceReference* source_reference) {
	return vala_gir_parser_argument_construct (VALA_GIR_PARSER_TYPE_ARGUMENT, expression, source_reference);
}


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


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


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


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


static gchar* vala_gir_parser_value_argument_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		ValaGirParserArgument * 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 = vala_gir_parser_argument_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* vala_gir_parser_value_argument_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ValaGirParserArgument ** 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 = vala_gir_parser_argument_ref (value->data[0].v_pointer);
	}
	return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_argument (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaGirParserParamSpecArgument* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_ARGUMENT), 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 vala_gir_parser_value_get_argument (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ARGUMENT), NULL);
	return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_argument (GValue* value, gpointer v_object) {
	ValaGirParserArgument * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ARGUMENT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_ARGUMENT));
		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;
		vala_gir_parser_argument_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_gir_parser_argument_unref (old);
	}
}


static void vala_gir_parser_value_take_argument (GValue* value, gpointer v_object) {
	ValaGirParserArgument * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_ARGUMENT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_ARGUMENT));
		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) {
		vala_gir_parser_argument_unref (old);
	}
}


static void vala_gir_parser_argument_class_init (ValaGirParserArgumentClass * klass) {
	vala_gir_parser_argument_parent_class = g_type_class_peek_parent (klass);
	((ValaGirParserArgumentClass *) klass)->finalize = vala_gir_parser_argument_finalize;
}


static void vala_gir_parser_argument_instance_init (ValaGirParserArgument * self) {
	self->used = FALSE;
	self->ref_count = 1;
}


static void vala_gir_parser_argument_finalize (ValaGirParserArgument * obj) {
	ValaGirParserArgument * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_GIR_PARSER_TYPE_ARGUMENT, ValaGirParserArgument);
	g_signal_handlers_destroy (self);
	_vala_code_node_unref0 (self->expression);
	_vala_source_reference_unref0 (self->source_reference);
}


static GType vala_gir_parser_argument_get_type (void) {
	static volatile gsize vala_gir_parser_argument_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_argument_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_argument_init, vala_gir_parser_value_argument_free_value, vala_gir_parser_value_argument_copy_value, vala_gir_parser_value_argument_peek_pointer, "p", vala_gir_parser_value_argument_collect_value, "p", vala_gir_parser_value_argument_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserArgumentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_argument_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserArgument), 0, (GInstanceInitFunc) vala_gir_parser_argument_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 vala_gir_parser_argument_type_id;
		vala_gir_parser_argument_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserArgument", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&vala_gir_parser_argument_type_id__volatile, vala_gir_parser_argument_type_id);
	}
	return vala_gir_parser_argument_type_id__volatile;
}


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


static void vala_gir_parser_argument_unref (gpointer instance) {
	ValaGirParserArgument * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_GIR_PARSER_ARGUMENT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_construct (GType object_type, const gchar* selector) {
	ValaGirParserMetadataSet* self = NULL;
	const gchar* _tmp0_;
	_tmp0_ = selector;
	self = (ValaGirParserMetadataSet*) vala_gir_parser_metadata_construct (object_type, "", _tmp0_, NULL);
	return self;
}


static ValaGirParserMetadataSet* vala_gir_parser_metadata_set_new (const gchar* selector) {
	return vala_gir_parser_metadata_set_construct (VALA_GIR_PARSER_TYPE_METADATA_SET, selector);
}


static void vala_gir_parser_metadata_set_add_sibling (ValaGirParserMetadataSet* self, ValaGirParserMetadata* metadata) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (metadata != NULL);
	{
		ValaArrayList* _child_list = NULL;
		ValaGirParserMetadata* _tmp0_;
		ValaArrayList* _tmp1_;
		ValaArrayList* _tmp2_;
		gint _child_size = 0;
		ValaArrayList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _child_index = 0;
		_tmp0_ = metadata;
		_tmp1_ = _tmp0_->children;
		_tmp2_ = _vala_iterable_ref0 (_tmp1_);
		_child_list = _tmp2_;
		_tmp3_ = _child_list;
		_tmp4_ = vala_collection_get_size ((ValaCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_child_size = _tmp5_;
		_child_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			ValaGirParserMetadata* child = NULL;
			ValaArrayList* _tmp9_;
			gint _tmp10_;
			gpointer _tmp11_;
			ValaGirParserMetadata* _tmp12_;
			_tmp6_ = _child_index;
			_child_index = _tmp6_ + 1;
			_tmp7_ = _child_index;
			_tmp8_ = _child_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _child_list;
			_tmp10_ = _child_index;
			_tmp11_ = vala_list_get ((ValaList*) _tmp9_, _tmp10_);
			child = (ValaGirParserMetadata*) _tmp11_;
			_tmp12_ = child;
			vala_gir_parser_metadata_add_child ((ValaGirParserMetadata*) self, _tmp12_);
			_vala_gir_parser_metadata_unref0 (child);
		}
		_vala_iterable_unref0 (_child_list);
	}
	{
		ValaIterator* _key_it = NULL;
		ValaGirParserMetadata* _tmp13_;
		ValaMap* _tmp14_;
		ValaSet* _tmp15_;
		ValaSet* _tmp16_;
		ValaIterator* _tmp17_;
		ValaIterator* _tmp18_;
		_tmp13_ = metadata;
		_tmp14_ = _tmp13_->args;
		_tmp15_ = vala_map_get_keys (_tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = vala_iterable_iterator ((ValaIterable*) _tmp16_);
		_tmp18_ = _tmp17_;
		_vala_iterable_unref0 (_tmp16_);
		_key_it = _tmp18_;
		while (TRUE) {
			ValaIterator* _tmp19_;
			gboolean _tmp20_;
			ValaGirParserArgumentType key = 0;
			ValaIterator* _tmp21_;
			gpointer _tmp22_;
			ValaMap* _tmp23_;
			ValaGirParserArgumentType _tmp24_;
			ValaGirParserMetadata* _tmp25_;
			ValaMap* _tmp26_;
			ValaGirParserArgumentType _tmp27_;
			gpointer _tmp28_;
			ValaGirParserArgument* _tmp29_;
			_tmp19_ = _key_it;
			_tmp20_ = vala_iterator_next (_tmp19_);
			if (!_tmp20_) {
				break;
			}
			_tmp21_ = _key_it;
			_tmp22_ = vala_iterator_get (_tmp21_);
			key = (ValaGirParserArgumentType) ((gintptr) _tmp22_);
			_tmp23_ = ((ValaGirParserMetadata*) self)->args;
			_tmp24_ = key;
			_tmp25_ = metadata;
			_tmp26_ = _tmp25_->args;
			_tmp27_ = key;
			_tmp28_ = vala_map_get (_tmp26_, (gpointer) ((gintptr) _tmp27_));
			_tmp29_ = (ValaGirParserArgument*) _tmp28_;
			vala_map_set (_tmp23_, (gpointer) ((gintptr) _tmp24_), _tmp29_);
			_vala_gir_parser_argument_unref0 (_tmp29_);
		}
		_vala_iterator_unref0 (_key_it);
	}
}


static void vala_gir_parser_metadata_set_class_init (ValaGirParserMetadataSetClass * klass) {
	vala_gir_parser_metadata_set_parent_class = g_type_class_peek_parent (klass);
}


static void vala_gir_parser_metadata_set_instance_init (ValaGirParserMetadataSet * self) {
}


static GType vala_gir_parser_metadata_set_get_type (void) {
	static volatile gsize vala_gir_parser_metadata_set_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_metadata_set_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserMetadataSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_metadata_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserMetadataSet), 0, (GInstanceInitFunc) vala_gir_parser_metadata_set_instance_init, NULL };
		GType vala_gir_parser_metadata_set_type_id;
		vala_gir_parser_metadata_set_type_id = g_type_register_static (VALA_GIR_PARSER_TYPE_METADATA, "ValaGirParserMetadataSet", &g_define_type_info, 0);
		g_once_init_leave (&vala_gir_parser_metadata_set_type_id__volatile, vala_gir_parser_metadata_set_type_id);
	}
	return vala_gir_parser_metadata_set_type_id__volatile;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_construct (GType object_type, const gchar* pattern, const gchar* selector, ValaSourceReference* source_reference) {
	ValaGirParserMetadata* self = NULL;
	const gchar* _tmp0_;
	GPatternSpec* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	ValaSourceReference* _tmp4_;
	ValaSourceReference* _tmp5_;
	g_return_val_if_fail (pattern != NULL, NULL);
	self = (ValaGirParserMetadata*) g_type_create_instance (object_type);
	_tmp0_ = pattern;
	_tmp1_ = g_pattern_spec_new (_tmp0_);
	_g_pattern_spec_free0 (self->pattern_spec);
	self->pattern_spec = _tmp1_;
	_tmp2_ = selector;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->selector);
	self->selector = _tmp3_;
	_tmp4_ = source_reference;
	_tmp5_ = _vala_source_reference_ref0 (_tmp4_);
	_vala_source_reference_unref0 (self->source_reference);
	self->source_reference = _tmp5_;
	return self;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_new (const gchar* pattern, const gchar* selector, ValaSourceReference* source_reference) {
	return vala_gir_parser_metadata_construct (VALA_GIR_PARSER_TYPE_METADATA, pattern, selector, source_reference);
}


static void vala_gir_parser_metadata_add_child (ValaGirParserMetadata* self, ValaGirParserMetadata* metadata) {
	ValaArrayList* _tmp0_;
	ValaGirParserMetadata* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (metadata != NULL);
	_tmp0_ = self->children;
	_tmp1_ = metadata;
	vala_collection_add ((ValaCollection*) _tmp0_, _tmp1_);
}


static ValaGirParserMetadata* vala_gir_parser_metadata_match_child (ValaGirParserMetadata* self, const gchar* name, const gchar* selector) {
	ValaGirParserMetadata* result = NULL;
	ValaGirParserMetadata* _result_ = NULL;
	ValaGirParserMetadata* _tmp0_;
	ValaGirParserMetadata* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = vala_gir_parser_metadata_get_empty ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_gir_parser_metadata_ref0 (_tmp1_);
	_result_ = _tmp2_;
	{
		ValaArrayList* _metadata_list = NULL;
		ValaArrayList* _tmp3_;
		ValaArrayList* _tmp4_;
		gint _metadata_size = 0;
		ValaArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _metadata_index = 0;
		_tmp3_ = self->children;
		_tmp4_ = _vala_iterable_ref0 (_tmp3_);
		_metadata_list = _tmp4_;
		_tmp5_ = _metadata_list;
		_tmp6_ = vala_collection_get_size ((ValaCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_metadata_size = _tmp7_;
		_metadata_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			ValaGirParserMetadata* metadata = NULL;
			ValaArrayList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_;
			gboolean _tmp14_ = FALSE;
			gboolean _tmp15_ = FALSE;
			gboolean _tmp16_ = FALSE;
			const gchar* _tmp17_;
			_tmp8_ = _metadata_index;
			_metadata_index = _tmp8_ + 1;
			_tmp9_ = _metadata_index;
			_tmp10_ = _metadata_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _metadata_list;
			_tmp12_ = _metadata_index;
			_tmp13_ = vala_list_get ((ValaList*) _tmp11_, _tmp12_);
			metadata = (ValaGirParserMetadata*) _tmp13_;
			_tmp17_ = selector;
			if (_tmp17_ == NULL) {
				_tmp16_ = TRUE;
			} else {
				ValaGirParserMetadata* _tmp18_;
				const gchar* _tmp19_;
				_tmp18_ = metadata;
				_tmp19_ = _tmp18_->selector;
				_tmp16_ = _tmp19_ == NULL;
			}
			if (_tmp16_) {
				_tmp15_ = TRUE;
			} else {
				ValaGirParserMetadata* _tmp20_;
				const gchar* _tmp21_;
				const gchar* _tmp22_;
				_tmp20_ = metadata;
				_tmp21_ = _tmp20_->selector;
				_tmp22_ = selector;
				_tmp15_ = g_strcmp0 (_tmp21_, _tmp22_) == 0;
			}
			if (_tmp15_) {
				ValaGirParserMetadata* _tmp23_;
				GPatternSpec* _tmp24_;
				const gchar* _tmp25_;
				gboolean _tmp26_;
				_tmp23_ = metadata;
				_tmp24_ = _tmp23_->pattern_spec;
				_tmp25_ = name;
				_tmp26_ = g_pattern_match_string (_tmp24_, _tmp25_);
				_tmp14_ = _tmp26_;
			} else {
				_tmp14_ = FALSE;
			}
			if (_tmp14_) {
				ValaGirParserMetadata* _tmp27_;
				ValaGirParserMetadata* _tmp28_;
				ValaGirParserMetadata* _tmp29_;
				ValaGirParserMetadata* _tmp30_;
				_tmp27_ = metadata;
				_tmp27_->used = TRUE;
				_tmp28_ = _result_;
				_tmp29_ = vala_gir_parser_metadata_get_empty ();
				_tmp30_ = _tmp29_;
				if (_tmp28_ == _tmp30_) {
					ValaGirParserMetadata* _tmp31_;
					ValaGirParserMetadata* _tmp32_;
					_tmp31_ = metadata;
					_tmp32_ = _vala_gir_parser_metadata_ref0 (_tmp31_);
					_vala_gir_parser_metadata_unref0 (_result_);
					_result_ = _tmp32_;
				} else {
					ValaGirParserMetadataSet* ms = NULL;
					ValaGirParserMetadata* _tmp33_;
					ValaGirParserMetadataSet* _tmp34_;
					ValaGirParserMetadataSet* _tmp35_;
					ValaGirParserMetadataSet* _tmp40_;
					ValaGirParserMetadata* _tmp41_;
					ValaGirParserMetadataSet* _tmp42_;
					ValaGirParserMetadata* _tmp43_;
					_tmp33_ = _result_;
					_tmp34_ = _vala_gir_parser_metadata_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, VALA_GIR_PARSER_TYPE_METADATA_SET) ? ((ValaGirParserMetadataSet*) _tmp33_) : NULL);
					ms = _tmp34_;
					_tmp35_ = ms;
					if (_tmp35_ == NULL) {
						const gchar* _tmp36_;
						ValaGirParserMetadataSet* _tmp37_;
						ValaGirParserMetadataSet* _tmp38_;
						ValaGirParserMetadata* _tmp39_;
						_tmp36_ = selector;
						_tmp37_ = vala_gir_parser_metadata_set_new (_tmp36_);
						_vala_gir_parser_metadata_unref0 (ms);
						ms = _tmp37_;
						_tmp38_ = ms;
						_tmp39_ = _result_;
						vala_gir_parser_metadata_set_add_sibling (_tmp38_, _tmp39_);
					}
					_tmp40_ = ms;
					_tmp41_ = metadata;
					vala_gir_parser_metadata_set_add_sibling (_tmp40_, _tmp41_);
					_tmp42_ = ms;
					_tmp43_ = _vala_gir_parser_metadata_ref0 ((ValaGirParserMetadata*) _tmp42_);
					_vala_gir_parser_metadata_unref0 (_result_);
					_result_ = _tmp43_;
					_vala_gir_parser_metadata_unref0 (ms);
				}
			}
			_vala_gir_parser_metadata_unref0 (metadata);
		}
		_vala_iterable_unref0 (_metadata_list);
	}
	result = _result_;
	return result;
}


static void vala_gir_parser_metadata_add_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key, ValaGirParserArgument* value) {
	ValaMap* _tmp0_;
	ValaGirParserArgumentType _tmp1_;
	ValaGirParserArgument* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = self->args;
	_tmp1_ = key;
	_tmp2_ = value;
	vala_map_set (_tmp0_, (gpointer) ((gintptr) _tmp1_), _tmp2_);
}


static gboolean vala_gir_parser_metadata_has_argument (ValaGirParserMetadata* self, ValaGirParserArgumentType key) {
	gboolean result = FALSE;
	ValaMap* _tmp0_;
	ValaGirParserArgumentType _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->args;
	_tmp1_ = key;
	_tmp2_ = vala_map_contains (_tmp0_, (gpointer) ((gintptr) _tmp1_));
	result = _tmp2_;
	return result;
}


static ValaExpression* vala_gir_parser_metadata_get_expression (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
	ValaExpression* result = NULL;
	ValaGirParserArgument* val = NULL;
	ValaMap* _tmp0_;
	ValaGirParserArgumentType _tmp1_;
	gpointer _tmp2_;
	ValaGirParserArgument* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->args;
	_tmp1_ = arg;
	_tmp2_ = vala_map_get (_tmp0_, (gpointer) ((gintptr) _tmp1_));
	val = (ValaGirParserArgument*) _tmp2_;
	_tmp3_ = val;
	if (_tmp3_ != NULL) {
		ValaGirParserArgument* _tmp4_;
		ValaGirParserArgument* _tmp5_;
		ValaExpression* _tmp6_;
		ValaExpression* _tmp7_;
		_tmp4_ = val;
		_tmp4_->used = TRUE;
		_tmp5_ = val;
		_tmp6_ = _tmp5_->expression;
		_tmp7_ = _vala_code_node_ref0 (_tmp6_);
		result = _tmp7_;
		_vala_gir_parser_argument_unref0 (val);
		return result;
	}
	result = NULL;
	_vala_gir_parser_argument_unref0 (val);
	return result;
}


static gchar* vala_gir_parser_metadata_get_string (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
	gchar* result = NULL;
	ValaStringLiteral* lit = NULL;
	ValaGirParserArgumentType _tmp0_;
	ValaExpression* _tmp1_;
	ValaStringLiteral* _tmp2_;
	ValaStringLiteral* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = arg;
	_tmp1_ = vala_gir_parser_metadata_get_expression (self, _tmp0_);
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_STRING_LITERAL) ? ((ValaStringLiteral*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_vala_code_node_unref0 (_tmp1_);
	}
	lit = _tmp2_;
	_tmp3_ = lit;
	if (_tmp3_ != NULL) {
		ValaStringLiteral* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = lit;
		_tmp5_ = vala_string_literal_eval (_tmp4_);
		result = _tmp5_;
		_vala_code_node_unref0 (lit);
		return result;
	}
	result = NULL;
	_vala_code_node_unref0 (lit);
	return result;
}


static gint vala_gir_parser_metadata_get_integer (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
	gint result = 0;
	ValaUnaryExpression* unary = NULL;
	ValaGirParserArgumentType _tmp0_;
	ValaExpression* _tmp1_;
	ValaUnaryExpression* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaUnaryExpression* _tmp4_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = arg;
	_tmp1_ = vala_gir_parser_metadata_get_expression (self, _tmp0_);
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_UNARY_EXPRESSION) ? ((ValaUnaryExpression*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_vala_code_node_unref0 (_tmp1_);
	}
	unary = _tmp2_;
	_tmp4_ = unary;
	if (_tmp4_ != NULL) {
		ValaUnaryExpression* _tmp5_;
		ValaUnaryOperator _tmp6_;
		ValaUnaryOperator _tmp7_;
		_tmp5_ = unary;
		_tmp6_ = vala_unary_expression_get_operator (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp3_ = _tmp7_ == VALA_UNARY_OPERATOR_MINUS;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaIntegerLiteral* lit = NULL;
		ValaUnaryExpression* _tmp8_;
		ValaExpression* _tmp9_;
		ValaExpression* _tmp10_;
		ValaIntegerLiteral* _tmp11_;
		ValaIntegerLiteral* _tmp12_;
		_tmp8_ = unary;
		_tmp9_ = vala_unary_expression_get_inner (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp10_, VALA_TYPE_INTEGER_LITERAL) ? ((ValaIntegerLiteral*) _tmp10_) : NULL);
		lit = _tmp11_;
		_tmp12_ = lit;
		if (_tmp12_ != NULL) {
			ValaIntegerLiteral* _tmp13_;
			const gchar* _tmp14_;
			const gchar* _tmp15_;
			gint _tmp16_;
			_tmp13_ = lit;
			_tmp14_ = vala_integer_literal_get_value (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = atoi (_tmp15_);
			result = -_tmp16_;
			_vala_code_node_unref0 (lit);
			_vala_code_node_unref0 (unary);
			return result;
		}
		_vala_code_node_unref0 (lit);
	} else {
		ValaIntegerLiteral* lit = NULL;
		ValaGirParserArgumentType _tmp17_;
		ValaExpression* _tmp18_;
		ValaIntegerLiteral* _tmp19_;
		ValaIntegerLiteral* _tmp20_;
		_tmp17_ = arg;
		_tmp18_ = vala_gir_parser_metadata_get_expression (self, _tmp17_);
		_tmp19_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, VALA_TYPE_INTEGER_LITERAL) ? ((ValaIntegerLiteral*) _tmp18_) : NULL;
		if (_tmp19_ == NULL) {
			_vala_code_node_unref0 (_tmp18_);
		}
		lit = _tmp19_;
		_tmp20_ = lit;
		if (_tmp20_ != NULL) {
			ValaIntegerLiteral* _tmp21_;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			gint _tmp24_;
			_tmp21_ = lit;
			_tmp22_ = vala_integer_literal_get_value (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = atoi (_tmp23_);
			result = _tmp24_;
			_vala_code_node_unref0 (lit);
			_vala_code_node_unref0 (unary);
			return result;
		}
		_vala_code_node_unref0 (lit);
	}
	result = 0;
	_vala_code_node_unref0 (unary);
	return result;
}


static gboolean vala_gir_parser_metadata_get_bool (ValaGirParserMetadata* self, ValaGirParserArgumentType arg, gboolean default_value) {
	gboolean result = FALSE;
	ValaBooleanLiteral* lit = NULL;
	ValaGirParserArgumentType _tmp0_;
	ValaExpression* _tmp1_;
	ValaBooleanLiteral* _tmp2_;
	ValaBooleanLiteral* _tmp3_;
	gboolean _tmp7_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = arg;
	_tmp1_ = vala_gir_parser_metadata_get_expression (self, _tmp0_);
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_BOOLEAN_LITERAL) ? ((ValaBooleanLiteral*) _tmp1_) : NULL;
	if (_tmp2_ == NULL) {
		_vala_code_node_unref0 (_tmp1_);
	}
	lit = _tmp2_;
	_tmp3_ = lit;
	if (_tmp3_ != NULL) {
		ValaBooleanLiteral* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp4_ = lit;
		_tmp5_ = vala_boolean_literal_get_value (_tmp4_);
		_tmp6_ = _tmp5_;
		result = _tmp6_;
		_vala_code_node_unref0 (lit);
		return result;
	}
	_tmp7_ = default_value;
	result = _tmp7_;
	_vala_code_node_unref0 (lit);
	return result;
}


static ValaSourceReference* vala_gir_parser_metadata_get_source_reference (ValaGirParserMetadata* self, ValaGirParserArgumentType arg) {
	ValaSourceReference* result = NULL;
	ValaGirParserArgument* val = NULL;
	ValaMap* _tmp0_;
	ValaGirParserArgumentType _tmp1_;
	gpointer _tmp2_;
	ValaGirParserArgument* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->args;
	_tmp1_ = arg;
	_tmp2_ = vala_map_get (_tmp0_, (gpointer) ((gintptr) _tmp1_));
	val = (ValaGirParserArgument*) _tmp2_;
	_tmp3_ = val;
	if (_tmp3_ != NULL) {
		ValaGirParserArgument* _tmp4_;
		ValaSourceReference* _tmp5_;
		ValaSourceReference* _tmp6_;
		_tmp4_ = val;
		_tmp5_ = _tmp4_->source_reference;
		_tmp6_ = _vala_source_reference_ref0 (_tmp5_);
		result = _tmp6_;
		_vala_gir_parser_argument_unref0 (val);
		return result;
	}
	result = NULL;
	_vala_gir_parser_argument_unref0 (val);
	return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_get_empty (void) {
	ValaGirParserMetadata* result;
	ValaGirParserMetadata* _tmp0_;
	ValaGirParserMetadata* _tmp2_;
	_tmp0_ = vala_gir_parser_metadata__empty;
	if (_tmp0_ == NULL) {
		ValaGirParserMetadata* _tmp1_;
		_tmp1_ = vala_gir_parser_metadata_new ("", NULL, NULL);
		_vala_gir_parser_metadata_unref0 (vala_gir_parser_metadata__empty);
		vala_gir_parser_metadata__empty = _tmp1_;
	}
	_tmp2_ = vala_gir_parser_metadata__empty;
	result = _tmp2_;
	return result;
}


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


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


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


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


static gchar* vala_gir_parser_value_metadata_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		ValaGirParserMetadata * 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 = vala_gir_parser_metadata_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* vala_gir_parser_value_metadata_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ValaGirParserMetadata ** 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 = vala_gir_parser_metadata_ref (value->data[0].v_pointer);
	}
	return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaGirParserParamSpecMetadata* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_METADATA), 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 vala_gir_parser_value_get_metadata (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA), NULL);
	return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_metadata (GValue* value, gpointer v_object) {
	ValaGirParserMetadata * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA));
		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;
		vala_gir_parser_metadata_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_gir_parser_metadata_unref (old);
	}
}


static void vala_gir_parser_value_take_metadata (GValue* value, gpointer v_object) {
	ValaGirParserMetadata * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA));
		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) {
		vala_gir_parser_metadata_unref (old);
	}
}


static void vala_gir_parser_metadata_class_init (ValaGirParserMetadataClass * klass) {
	vala_gir_parser_metadata_parent_class = g_type_class_peek_parent (klass);
	((ValaGirParserMetadataClass *) klass)->finalize = vala_gir_parser_metadata_finalize;
}


static void vala_gir_parser_metadata_instance_init (ValaGirParserMetadata * self) {
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GEqualFunc _tmp2_;
	ValaHashMap* _tmp3_;
	GEqualFunc _tmp4_;
	ValaArrayList* _tmp5_;
	self->used = FALSE;
	_tmp0_ = g_direct_hash;
	_tmp1_ = g_direct_equal;
	_tmp2_ = g_direct_equal;
	_tmp3_ = vala_hash_map_new (VALA_GIR_PARSER_TYPE_ARGUMENT_TYPE, NULL, NULL, VALA_GIR_PARSER_TYPE_ARGUMENT, (GBoxedCopyFunc) vala_gir_parser_argument_ref, (GDestroyNotify) vala_gir_parser_argument_unref, _tmp0_, _tmp1_, _tmp2_);
	self->args = (ValaMap*) _tmp3_;
	_tmp4_ = g_direct_equal;
	_tmp5_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_METADATA, (GBoxedCopyFunc) vala_gir_parser_metadata_ref, (GDestroyNotify) vala_gir_parser_metadata_unref, _tmp4_);
	self->children = _tmp5_;
	self->ref_count = 1;
}


static void vala_gir_parser_metadata_finalize (ValaGirParserMetadata * obj) {
	ValaGirParserMetadata * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_GIR_PARSER_TYPE_METADATA, ValaGirParserMetadata);
	g_signal_handlers_destroy (self);
	_g_pattern_spec_free0 (self->pattern_spec);
	_g_free0 (self->selector);
	_vala_source_reference_unref0 (self->source_reference);
	_vala_map_unref0 (self->args);
	_vala_iterable_unref0 (self->children);
}


static GType vala_gir_parser_metadata_get_type (void) {
	static volatile gsize vala_gir_parser_metadata_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_metadata_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_metadata_init, vala_gir_parser_value_metadata_free_value, vala_gir_parser_value_metadata_copy_value, vala_gir_parser_value_metadata_peek_pointer, "p", vala_gir_parser_value_metadata_collect_value, "p", vala_gir_parser_value_metadata_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserMetadataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_metadata_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserMetadata), 0, (GInstanceInitFunc) vala_gir_parser_metadata_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 vala_gir_parser_metadata_type_id;
		vala_gir_parser_metadata_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserMetadata", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&vala_gir_parser_metadata_type_id__volatile, vala_gir_parser_metadata_type_id);
	}
	return vala_gir_parser_metadata_type_id__volatile;
}


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


static void vala_gir_parser_metadata_unref (gpointer instance) {
	ValaGirParserMetadata * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_GIR_PARSER_METADATA_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_construct (GType object_type) {
	ValaGirParserMetadataParser* self = NULL;
	ValaGirParserMetadata* _tmp0_;
	self = (ValaGirParserMetadataParser*) g_type_create_instance (object_type);
	_tmp0_ = self->priv->tree;
	_tmp0_->used = TRUE;
	return self;
}


static ValaGirParserMetadataParser* vala_gir_parser_metadata_parser_new (void) {
	return vala_gir_parser_metadata_parser_construct (VALA_GIR_PARSER_TYPE_METADATA_PARSER);
}


static ValaSourceReference* vala_gir_parser_metadata_parser_get_current_src (ValaGirParserMetadataParser* self) {
	ValaSourceReference* result = NULL;
	ValaScanner* _tmp0_;
	ValaSourceFile* _tmp1_;
	ValaSourceFile* _tmp2_;
	ValaSourceLocation _tmp3_;
	ValaSourceLocation _tmp4_;
	ValaSourceReference* _tmp5_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->scanner;
	_tmp1_ = vala_scanner_get_source_file (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->begin;
	_tmp4_ = self->priv->end;
	_tmp5_ = vala_source_reference_new (_tmp2_, &_tmp3_, &_tmp4_);
	result = _tmp5_;
	return result;
}


static ValaSourceReference* vala_gir_parser_metadata_parser_get_src (ValaGirParserMetadataParser* self, ValaSourceLocation* begin, ValaSourceLocation* end) {
	ValaSourceReference* result = NULL;
	ValaSourceLocation e = {0};
	ValaSourceLocation _tmp0_;
	ValaSourceLocation* _tmp1_;
	ValaScanner* _tmp3_;
	ValaSourceFile* _tmp4_;
	ValaSourceFile* _tmp5_;
	ValaSourceLocation _tmp6_;
	ValaSourceLocation _tmp7_;
	ValaSourceReference* _tmp8_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (begin != NULL, NULL);
	_tmp0_ = self->priv->end;
	e = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ != NULL) {
		ValaSourceLocation* _tmp2_;
		_tmp2_ = end;
		e = *_tmp2_;
	}
	_tmp3_ = self->priv->scanner;
	_tmp4_ = vala_scanner_get_source_file (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = *begin;
	_tmp7_ = e;
	_tmp8_ = vala_source_reference_new (_tmp5_, &_tmp6_, &_tmp7_);
	result = _tmp8_;
	return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_metadata (ValaGirParserMetadataParser* self, ValaSourceFile* metadata_file) {
	ValaGirParserMetadata* result = NULL;
	ValaSourceFile* _tmp0_;
	ValaScanner* _tmp1_;
	ValaGirParserMetadata* _tmp7_;
	ValaGirParserMetadata* _tmp8_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (metadata_file != NULL, NULL);
	_tmp0_ = metadata_file;
	_tmp1_ = vala_scanner_new (_tmp0_);
	_vala_scanner_unref0 (self->priv->scanner);
	self->priv->scanner = _tmp1_;
	vala_gir_parser_metadata_parser_next (self);
	while (TRUE) {
		ValaTokenType _tmp2_;
		gboolean _tmp3_;
		_tmp2_ = self->priv->current;
		if (!(_tmp2_ != VALA_TOKEN_TYPE_EOF)) {
			break;
		}
		_tmp3_ = vala_gir_parser_metadata_parser_parse_rule (self);
		if (!_tmp3_) {
			ValaGirParserMetadata* _tmp4_;
			ValaGirParserMetadata* _tmp5_;
			ValaGirParserMetadata* _tmp6_;
			_tmp4_ = vala_gir_parser_metadata_get_empty ();
			_tmp5_ = _tmp4_;
			_tmp6_ = _vala_gir_parser_metadata_ref0 (_tmp5_);
			result = _tmp6_;
			return result;
		}
	}
	_tmp7_ = self->priv->tree;
	_tmp8_ = _vala_gir_parser_metadata_ref0 (_tmp7_);
	result = _tmp8_;
	return result;
}


static ValaTokenType vala_gir_parser_metadata_parser_next (ValaGirParserMetadataParser* self) {
	ValaTokenType result = 0;
	ValaSourceLocation _tmp0_;
	ValaScanner* _tmp1_;
	ValaSourceLocation _tmp2_ = {0};
	ValaSourceLocation _tmp3_ = {0};
	ValaTokenType _tmp4_;
	ValaTokenType _tmp5_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->end;
	self->priv->old_end = _tmp0_;
	_tmp1_ = self->priv->scanner;
	_tmp4_ = vala_scanner_read_token (_tmp1_, &_tmp2_, &_tmp3_);
	self->priv->begin = _tmp2_;
	self->priv->end = _tmp3_;
	self->priv->current = _tmp4_;
	_tmp5_ = self->priv->current;
	result = _tmp5_;
	return result;
}


static gboolean vala_gir_parser_metadata_parser_has_space (ValaGirParserMetadataParser* self) {
	gboolean result = FALSE;
	ValaSourceLocation _tmp0_;
	gchar* _tmp1_;
	ValaSourceLocation _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->old_end;
	_tmp1_ = _tmp0_.pos;
	_tmp2_ = self->priv->begin;
	_tmp3_ = _tmp2_.pos;
	result = _tmp1_ != _tmp3_;
	return result;
}


static gboolean vala_gir_parser_metadata_parser_has_newline (ValaGirParserMetadataParser* self) {
	gboolean result = FALSE;
	ValaSourceLocation _tmp0_;
	gint _tmp1_;
	ValaSourceLocation _tmp2_;
	gint _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->old_end;
	_tmp1_ = _tmp0_.line;
	_tmp2_ = self->priv->begin;
	_tmp3_ = _tmp2_.line;
	result = _tmp1_ != _tmp3_;
	return result;
}


static gchar* vala_gir_parser_metadata_parser_get_string (ValaGirParserMetadataParser* self, ValaSourceLocation* begin, ValaSourceLocation* end) {
	gchar* result = NULL;
	ValaSourceLocation b = {0};
	ValaSourceLocation _tmp0_;
	ValaSourceLocation e = {0};
	ValaSourceLocation _tmp1_;
	ValaSourceLocation* _tmp2_;
	ValaSourceLocation* _tmp4_;
	ValaSourceLocation _tmp6_;
	gchar* _tmp7_;
	ValaSourceLocation _tmp8_;
	gchar* _tmp9_;
	ValaSourceLocation _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->begin;
	b = _tmp0_;
	_tmp1_ = self->priv->end;
	e = _tmp1_;
	_tmp2_ = begin;
	if (_tmp2_ != NULL) {
		ValaSourceLocation* _tmp3_;
		_tmp3_ = begin;
		b = *_tmp3_;
	}
	_tmp4_ = end;
	if (_tmp4_ != NULL) {
		ValaSourceLocation* _tmp5_;
		_tmp5_ = end;
		e = *_tmp5_;
	}
	_tmp6_ = b;
	_tmp7_ = _tmp6_.pos;
	_tmp8_ = e;
	_tmp9_ = _tmp8_.pos;
	_tmp10_ = b;
	_tmp11_ = _tmp10_.pos;
	_tmp12_ = string_substring ((const gchar*) _tmp7_, (glong) 0, (glong) ((gint) (_tmp9_ - _tmp11_)));
	result = _tmp12_;
	return result;
}


static gchar* vala_gir_parser_metadata_parser_parse_identifier (ValaGirParserMetadataParser* self, gboolean is_glob) {
	gchar* result = NULL;
	ValaSourceLocation begin = {0};
	ValaSourceLocation _tmp0_;
	gboolean _tmp1_ = FALSE;
	ValaTokenType _tmp2_;
	gboolean _tmp11_;
	ValaSourceLocation _tmp18_;
	ValaSourceLocation _tmp19_;
	gchar* _tmp20_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->begin;
	begin = _tmp0_;
	_tmp2_ = self->priv->current;
	if (_tmp2_ == VALA_TOKEN_TYPE_DOT) {
		_tmp1_ = TRUE;
	} else {
		ValaTokenType _tmp3_;
		_tmp3_ = self->priv->current;
		_tmp1_ = _tmp3_ == VALA_TOKEN_TYPE_HASH;
	}
	if (_tmp1_) {
		gboolean _tmp4_;
		_tmp4_ = is_glob;
		if (_tmp4_) {
			ValaSourceLocation _tmp5_;
			ValaSourceReference* _tmp6_;
			ValaSourceReference* _tmp7_;
			_tmp5_ = begin;
			_tmp6_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp5_, NULL);
			_tmp7_ = _tmp6_;
			vala_report_error (_tmp7_, "expected glob-style pattern");
			_vala_source_reference_unref0 (_tmp7_);
		} else {
			ValaSourceLocation _tmp8_;
			ValaSourceReference* _tmp9_;
			ValaSourceReference* _tmp10_;
			_tmp8_ = begin;
			_tmp9_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp8_, NULL);
			_tmp10_ = _tmp9_;
			vala_report_error (_tmp10_, "expected identifier");
			_vala_source_reference_unref0 (_tmp10_);
		}
		result = NULL;
		return result;
	}
	_tmp11_ = is_glob;
	if (_tmp11_) {
		while (TRUE) {
			gboolean _tmp12_ = FALSE;
			gboolean _tmp13_ = FALSE;
			ValaTokenType _tmp14_;
			gboolean _tmp17_;
			_tmp14_ = self->priv->current;
			if (_tmp14_ != VALA_TOKEN_TYPE_EOF) {
				ValaTokenType _tmp15_;
				_tmp15_ = self->priv->current;
				_tmp13_ = _tmp15_ != VALA_TOKEN_TYPE_DOT;
			} else {
				_tmp13_ = FALSE;
			}
			if (_tmp13_) {
				ValaTokenType _tmp16_;
				_tmp16_ = self->priv->current;
				_tmp12_ = _tmp16_ != VALA_TOKEN_TYPE_HASH;
			} else {
				_tmp12_ = FALSE;
			}
			if (!_tmp12_) {
				break;
			}
			vala_gir_parser_metadata_parser_next (self);
			_tmp17_ = vala_gir_parser_metadata_parser_has_space (self);
			if (_tmp17_) {
				break;
			}
		}
	} else {
		vala_gir_parser_metadata_parser_next (self);
	}
	_tmp18_ = begin;
	_tmp19_ = self->priv->old_end;
	_tmp20_ = vala_gir_parser_metadata_parser_get_string (self, &_tmp18_, &_tmp19_);
	result = _tmp20_;
	return result;
}


static gchar* vala_gir_parser_metadata_parser_parse_selector (ValaGirParserMetadataParser* self) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	ValaTokenType _tmp1_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->current;
	if (_tmp1_ != VALA_TOKEN_TYPE_HASH) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp2_;
		_tmp2_ = vala_gir_parser_metadata_parser_has_space (self);
		_tmp0_ = _tmp2_;
	}
	if (_tmp0_) {
		result = NULL;
		return result;
	}
	vala_gir_parser_metadata_parser_next (self);
	_tmp3_ = vala_gir_parser_metadata_parser_parse_identifier (self, FALSE);
	result = _tmp3_;
	return result;
}


static ValaGirParserMetadata* vala_gir_parser_metadata_parser_parse_pattern (ValaGirParserMetadataParser* self) {
	ValaGirParserMetadata* result = NULL;
	ValaGirParserMetadata* metadata = NULL;
	gboolean is_relative = FALSE;
	gboolean _tmp0_ = FALSE;
	ValaTokenType _tmp1_;
	ValaGirParserMetadata* _tmp12_;
	ValaSourceLocation begin = {0};
	ValaSourceLocation _tmp15_;
	gchar* pattern = NULL;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	ValaSourceLocation _tmp21_;
	ValaSourceReference* _tmp22_;
	ValaSourceReference* _tmp23_;
	ValaGirParserMetadata* _tmp24_;
	ValaGirParserMetadata* _tmp25_;
	ValaGirParserMetadata* _tmp26_;
	gboolean _tmp53_;
	g_return_val_if_fail (self != NULL, NULL);
	is_relative = FALSE;
	_tmp1_ = self->priv->current;
	if (_tmp1_ == VALA_TOKEN_TYPE_IDENTIFIER) {
		_tmp0_ = TRUE;
	} else {
		ValaTokenType _tmp2_;
		_tmp2_ = self->priv->current;
		_tmp0_ = _tmp2_ == VALA_TOKEN_TYPE_STAR;
	}
	if (_tmp0_) {
		ValaGirParserMetadata* _tmp3_;
		ValaGirParserMetadata* _tmp4_;
		_tmp3_ = self->priv->tree;
		_tmp4_ = _vala_gir_parser_metadata_ref0 (_tmp3_);
		_vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
		self->priv->parent_metadata = _tmp4_;
	} else {
		ValaTokenType _tmp5_;
		_tmp5_ = self->priv->current;
		if (_tmp5_ != VALA_TOKEN_TYPE_DOT) {
			ValaSourceReference* _tmp6_;
			ValaSourceReference* _tmp7_;
			ValaTokenType _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp6_ = vala_gir_parser_metadata_parser_get_current_src (self);
			_tmp7_ = _tmp6_;
			_tmp8_ = self->priv->current;
			_tmp9_ = vala_token_type_to_string (_tmp8_);
			_tmp10_ = g_strdup_printf ("expected pattern or `.', got %s", _tmp9_);
			_tmp11_ = _tmp10_;
			vala_report_error (_tmp7_, _tmp11_);
			_g_free0 (_tmp11_);
			_vala_source_reference_unref0 (_tmp7_);
			result = NULL;
			_vala_gir_parser_metadata_unref0 (metadata);
			return result;
		}
		vala_gir_parser_metadata_parser_next (self);
		is_relative = TRUE;
	}
	_tmp12_ = self->priv->parent_metadata;
	if (_tmp12_ == NULL) {
		ValaSourceReference* _tmp13_;
		ValaSourceReference* _tmp14_;
		_tmp13_ = vala_gir_parser_metadata_parser_get_current_src (self);
		_tmp14_ = _tmp13_;
		vala_report_error (_tmp14_, "cannot determinate parent metadata");
		_vala_source_reference_unref0 (_tmp14_);
		result = NULL;
		_vala_gir_parser_metadata_unref0 (metadata);
		return result;
	}
	_tmp15_ = self->priv->begin;
	begin = _tmp15_;
	_tmp16_ = vala_gir_parser_metadata_parser_parse_identifier (self, TRUE);
	pattern = _tmp16_;
	_tmp17_ = pattern;
	if (_tmp17_ == NULL) {
		result = NULL;
		_g_free0 (pattern);
		_vala_gir_parser_metadata_unref0 (metadata);
		return result;
	}
	_tmp18_ = pattern;
	_tmp19_ = vala_gir_parser_metadata_parser_parse_selector (self);
	_tmp20_ = _tmp19_;
	_tmp21_ = begin;
	_tmp22_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp21_, NULL);
	_tmp23_ = _tmp22_;
	_tmp24_ = vala_gir_parser_metadata_new (_tmp18_, _tmp20_, _tmp23_);
	_vala_gir_parser_metadata_unref0 (metadata);
	metadata = _tmp24_;
	_vala_source_reference_unref0 (_tmp23_);
	_g_free0 (_tmp20_);
	_tmp25_ = self->priv->parent_metadata;
	_tmp26_ = metadata;
	vala_gir_parser_metadata_add_child (_tmp25_, _tmp26_);
	while (TRUE) {
		gboolean _tmp27_ = FALSE;
		ValaTokenType _tmp28_;
		ValaTokenType _tmp30_;
		ValaSourceLocation _tmp37_;
		gchar* _tmp38_;
		const gchar* _tmp39_;
		ValaGirParserMetadata* child = NULL;
		const gchar* _tmp40_;
		gchar* _tmp41_;
		gchar* _tmp42_;
		ValaSourceLocation _tmp43_;
		ValaSourceLocation _tmp44_;
		ValaSourceReference* _tmp45_;
		ValaSourceReference* _tmp46_;
		ValaGirParserMetadata* _tmp47_;
		ValaGirParserMetadata* _tmp48_;
		ValaGirParserMetadata* _tmp49_;
		ValaGirParserMetadata* _tmp50_;
		ValaGirParserMetadata* _tmp51_;
		ValaGirParserMetadata* _tmp52_;
		_tmp28_ = self->priv->current;
		if (_tmp28_ != VALA_TOKEN_TYPE_EOF) {
			gboolean _tmp29_;
			_tmp29_ = vala_gir_parser_metadata_parser_has_space (self);
			_tmp27_ = !_tmp29_;
		} else {
			_tmp27_ = FALSE;
		}
		if (!_tmp27_) {
			break;
		}
		_tmp30_ = self->priv->current;
		if (_tmp30_ != VALA_TOKEN_TYPE_DOT) {
			ValaSourceReference* _tmp31_;
			ValaSourceReference* _tmp32_;
			ValaTokenType _tmp33_;
			const gchar* _tmp34_;
			gchar* _tmp35_;
			gchar* _tmp36_;
			_tmp31_ = vala_gir_parser_metadata_parser_get_current_src (self);
			_tmp32_ = _tmp31_;
			_tmp33_ = self->priv->current;
			_tmp34_ = vala_token_type_to_string (_tmp33_);
			_tmp35_ = g_strdup_printf ("expected `.' got %s", _tmp34_);
			_tmp36_ = _tmp35_;
			vala_report_error (_tmp32_, _tmp36_);
			_g_free0 (_tmp36_);
			_vala_source_reference_unref0 (_tmp32_);
			break;
		}
		vala_gir_parser_metadata_parser_next (self);
		_tmp37_ = self->priv->begin;
		begin = _tmp37_;
		_tmp38_ = vala_gir_parser_metadata_parser_parse_identifier (self, TRUE);
		_g_free0 (pattern);
		pattern = _tmp38_;
		_tmp39_ = pattern;
		if (_tmp39_ == NULL) {
			result = NULL;
			_g_free0 (pattern);
			_vala_gir_parser_metadata_unref0 (metadata);
			return result;
		}
		_tmp40_ = pattern;
		_tmp41_ = vala_gir_parser_metadata_parser_parse_selector (self);
		_tmp42_ = _tmp41_;
		_tmp43_ = begin;
		_tmp44_ = self->priv->old_end;
		_tmp45_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp43_, &_tmp44_);
		_tmp46_ = _tmp45_;
		_tmp47_ = vala_gir_parser_metadata_new (_tmp40_, _tmp42_, _tmp46_);
		_tmp48_ = _tmp47_;
		_vala_source_reference_unref0 (_tmp46_);
		_g_free0 (_tmp42_);
		child = _tmp48_;
		_tmp49_ = metadata;
		_tmp50_ = child;
		vala_gir_parser_metadata_add_child (_tmp49_, _tmp50_);
		_tmp51_ = child;
		_tmp52_ = _vala_gir_parser_metadata_ref0 (_tmp51_);
		_vala_gir_parser_metadata_unref0 (metadata);
		metadata = _tmp52_;
		_vala_gir_parser_metadata_unref0 (child);
	}
	_tmp53_ = is_relative;
	if (!_tmp53_) {
		ValaGirParserMetadata* _tmp54_;
		ValaGirParserMetadata* _tmp55_;
		_tmp54_ = metadata;
		_tmp55_ = _vala_gir_parser_metadata_ref0 (_tmp54_);
		_vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
		self->priv->parent_metadata = _tmp55_;
	}
	result = metadata;
	_g_free0 (pattern);
	return result;
}


static ValaExpression* vala_gir_parser_metadata_parser_parse_expression (ValaGirParserMetadataParser* self) {
	ValaExpression* result = NULL;
	ValaSourceLocation begin = {0};
	ValaSourceLocation _tmp0_;
	ValaSourceReference* src = NULL;
	ValaSourceReference* _tmp1_;
	ValaExpression* expr = NULL;
	ValaTokenType _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->begin;
	begin = _tmp0_;
	_tmp1_ = vala_gir_parser_metadata_parser_get_current_src (self);
	src = _tmp1_;
	expr = NULL;
	_tmp2_ = self->priv->current;
	switch (_tmp2_) {
		case VALA_TOKEN_TYPE_NULL:
		{
			ValaSourceReference* _tmp3_;
			ValaNullLiteral* _tmp4_;
			_tmp3_ = src;
			_tmp4_ = vala_null_literal_new (_tmp3_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp4_;
			break;
		}
		case VALA_TOKEN_TYPE_TRUE:
		{
			ValaSourceReference* _tmp5_;
			ValaBooleanLiteral* _tmp6_;
			_tmp5_ = src;
			_tmp6_ = vala_boolean_literal_new (TRUE, _tmp5_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp6_;
			break;
		}
		case VALA_TOKEN_TYPE_FALSE:
		{
			ValaSourceReference* _tmp7_;
			ValaBooleanLiteral* _tmp8_;
			_tmp7_ = src;
			_tmp8_ = vala_boolean_literal_new (FALSE, _tmp7_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp8_;
			break;
		}
		case VALA_TOKEN_TYPE_MINUS:
		{
			ValaExpression* inner = NULL;
			ValaExpression* _tmp9_;
			ValaExpression* _tmp10_;
			vala_gir_parser_metadata_parser_next (self);
			_tmp9_ = vala_gir_parser_metadata_parser_parse_expression (self);
			inner = _tmp9_;
			_tmp10_ = inner;
			if (_tmp10_ == NULL) {
				ValaSourceReference* _tmp11_;
				ValaTokenType _tmp12_;
				const gchar* _tmp13_;
				gchar* _tmp14_;
				gchar* _tmp15_;
				_tmp11_ = src;
				_tmp12_ = self->priv->current;
				_tmp13_ = vala_token_type_to_string (_tmp12_);
				_tmp14_ = g_strdup_printf ("expected expression after `-', got %s", _tmp13_);
				_tmp15_ = _tmp14_;
				vala_report_error (_tmp11_, _tmp15_);
				_g_free0 (_tmp15_);
			} else {
				ValaExpression* _tmp16_;
				ValaSourceLocation _tmp17_;
				ValaSourceReference* _tmp18_;
				ValaSourceReference* _tmp19_;
				ValaUnaryExpression* _tmp20_;
				_tmp16_ = inner;
				_tmp17_ = begin;
				_tmp18_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp17_, NULL);
				_tmp19_ = _tmp18_;
				_tmp20_ = vala_unary_expression_new (VALA_UNARY_OPERATOR_MINUS, _tmp16_, _tmp19_);
				_vala_code_node_unref0 (expr);
				expr = (ValaExpression*) _tmp20_;
				_vala_source_reference_unref0 (_tmp19_);
			}
			result = expr;
			_vala_code_node_unref0 (inner);
			_vala_source_reference_unref0 (src);
			return result;
		}
		case VALA_TOKEN_TYPE_INTEGER_LITERAL:
		{
			gchar* _tmp21_;
			gchar* _tmp22_;
			ValaSourceReference* _tmp23_;
			ValaIntegerLiteral* _tmp24_;
			_tmp21_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
			_tmp22_ = _tmp21_;
			_tmp23_ = src;
			_tmp24_ = vala_integer_literal_new (_tmp22_, _tmp23_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp24_;
			_g_free0 (_tmp22_);
			break;
		}
		case VALA_TOKEN_TYPE_REAL_LITERAL:
		{
			gchar* _tmp25_;
			gchar* _tmp26_;
			ValaSourceReference* _tmp27_;
			ValaRealLiteral* _tmp28_;
			_tmp25_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
			_tmp26_ = _tmp25_;
			_tmp27_ = src;
			_tmp28_ = vala_real_literal_new (_tmp26_, _tmp27_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp28_;
			_g_free0 (_tmp26_);
			break;
		}
		case VALA_TOKEN_TYPE_STRING_LITERAL:
		{
			gchar* _tmp29_;
			gchar* _tmp30_;
			ValaSourceReference* _tmp31_;
			ValaStringLiteral* _tmp32_;
			_tmp29_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
			_tmp30_ = _tmp29_;
			_tmp31_ = src;
			_tmp32_ = vala_string_literal_new (_tmp30_, _tmp31_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp32_;
			_g_free0 (_tmp30_);
			break;
		}
		case VALA_TOKEN_TYPE_IDENTIFIER:
		{
			gchar* _tmp33_;
			gchar* _tmp34_;
			ValaSourceReference* _tmp35_;
			ValaMemberAccess* _tmp36_;
			_tmp33_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
			_tmp34_ = _tmp33_;
			_tmp35_ = src;
			_tmp36_ = vala_member_access_new (NULL, _tmp34_, _tmp35_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp36_;
			_g_free0 (_tmp34_);
			while (TRUE) {
				ValaTokenType _tmp37_;
				ValaTokenType _tmp38_;
				ValaExpression* _tmp45_;
				gchar* _tmp46_;
				gchar* _tmp47_;
				ValaSourceReference* _tmp48_;
				ValaSourceReference* _tmp49_;
				ValaMemberAccess* _tmp50_;
				_tmp37_ = vala_gir_parser_metadata_parser_next (self);
				if (!(_tmp37_ == VALA_TOKEN_TYPE_DOT)) {
					break;
				}
				_tmp38_ = vala_gir_parser_metadata_parser_next (self);
				if (_tmp38_ != VALA_TOKEN_TYPE_IDENTIFIER) {
					ValaSourceReference* _tmp39_;
					ValaSourceReference* _tmp40_;
					ValaTokenType _tmp41_;
					const gchar* _tmp42_;
					gchar* _tmp43_;
					gchar* _tmp44_;
					_tmp39_ = vala_gir_parser_metadata_parser_get_current_src (self);
					_tmp40_ = _tmp39_;
					_tmp41_ = self->priv->current;
					_tmp42_ = vala_token_type_to_string (_tmp41_);
					_tmp43_ = g_strdup_printf ("expected identifier got %s", _tmp42_);
					_tmp44_ = _tmp43_;
					vala_report_error (_tmp40_, _tmp44_);
					_g_free0 (_tmp44_);
					_vala_source_reference_unref0 (_tmp40_);
					break;
				}
				_tmp45_ = expr;
				_tmp46_ = vala_gir_parser_metadata_parser_get_string (self, NULL, NULL);
				_tmp47_ = _tmp46_;
				_tmp48_ = vala_gir_parser_metadata_parser_get_current_src (self);
				_tmp49_ = _tmp48_;
				_tmp50_ = vala_member_access_new (_tmp45_, _tmp47_, _tmp49_);
				_vala_code_node_unref0 (expr);
				expr = (ValaExpression*) _tmp50_;
				_vala_source_reference_unref0 (_tmp49_);
				_g_free0 (_tmp47_);
			}
			result = expr;
			_vala_source_reference_unref0 (src);
			return result;
		}
		case VALA_TOKEN_TYPE_OPEN_PARENS:
		{
			ValaTokenType _tmp51_;
			ValaSourceReference* _tmp58_;
			ValaTuple* _tmp59_;
			_tmp51_ = vala_gir_parser_metadata_parser_next (self);
			if (_tmp51_ != VALA_TOKEN_TYPE_CLOSE_PARENS) {
				ValaSourceReference* _tmp52_;
				ValaSourceReference* _tmp53_;
				ValaTokenType _tmp54_;
				const gchar* _tmp55_;
				gchar* _tmp56_;
				gchar* _tmp57_;
				_tmp52_ = vala_gir_parser_metadata_parser_get_current_src (self);
				_tmp53_ = _tmp52_;
				_tmp54_ = self->priv->current;
				_tmp55_ = vala_token_type_to_string (_tmp54_);
				_tmp56_ = g_strdup_printf ("expected `)', got %s", _tmp55_);
				_tmp57_ = _tmp56_;
				vala_report_error (_tmp53_, _tmp57_);
				_g_free0 (_tmp57_);
				_vala_source_reference_unref0 (_tmp53_);
				break;
			}
			_tmp58_ = src;
			_tmp59_ = vala_tuple_new (_tmp58_);
			_vala_code_node_unref0 (expr);
			expr = (ValaExpression*) _tmp59_;
			break;
		}
		default:
		{
			ValaSourceReference* _tmp60_;
			ValaTokenType _tmp61_;
			const gchar* _tmp62_;
			gchar* _tmp63_;
			gchar* _tmp64_;
			_tmp60_ = src;
			_tmp61_ = self->priv->current;
			_tmp62_ = vala_token_type_to_string (_tmp61_);
			_tmp63_ = g_strdup_printf ("expected literal or symbol got %s", _tmp62_);
			_tmp64_ = _tmp63_;
			vala_report_error (_tmp60_, _tmp64_);
			_g_free0 (_tmp64_);
			break;
		}
	}
	vala_gir_parser_metadata_parser_next (self);
	result = expr;
	_vala_source_reference_unref0 (src);
	return result;
}


static gboolean vala_gir_parser_metadata_parser_parse_args (ValaGirParserMetadataParser* self, ValaGirParserMetadata* metadata) {
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (metadata != NULL, FALSE);
	while (TRUE) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_ = FALSE;
		ValaTokenType _tmp2_;
		ValaSourceLocation begin = {0};
		ValaSourceLocation _tmp5_;
		gchar* id = NULL;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		ValaGirParserArgumentType* arg_type = NULL;
		const gchar* _tmp8_;
		ValaGirParserArgumentType* _tmp9_;
		ValaGirParserArgumentType* _tmp10_;
		ValaTokenType _tmp18_;
		ValaExpression* expr = NULL;
		ValaExpression* _tmp31_;
		ValaExpression* _tmp32_;
		ValaGirParserMetadata* _tmp33_;
		ValaGirParserArgumentType* _tmp34_;
		ValaExpression* _tmp35_;
		ValaSourceLocation _tmp36_;
		ValaSourceReference* _tmp37_;
		ValaSourceReference* _tmp38_;
		ValaGirParserArgument* _tmp39_;
		ValaGirParserArgument* _tmp40_;
		_tmp2_ = self->priv->current;
		if (_tmp2_ != VALA_TOKEN_TYPE_EOF) {
			gboolean _tmp3_;
			_tmp3_ = vala_gir_parser_metadata_parser_has_space (self);
			_tmp1_ = _tmp3_;
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			gboolean _tmp4_;
			_tmp4_ = vala_gir_parser_metadata_parser_has_newline (self);
			_tmp0_ = !_tmp4_;
		} else {
			_tmp0_ = FALSE;
		}
		if (!_tmp0_) {
			break;
		}
		_tmp5_ = self->priv->begin;
		begin = _tmp5_;
		_tmp6_ = vala_gir_parser_metadata_parser_parse_identifier (self, FALSE);
		id = _tmp6_;
		_tmp7_ = id;
		if (_tmp7_ == NULL) {
			result = FALSE;
			_g_free0 (id);
			return result;
		}
		_tmp8_ = id;
		_tmp9_ = vala_gir_parser_argument_type_from_string (_tmp8_);
		arg_type = _tmp9_;
		_tmp10_ = arg_type;
		if (_tmp10_ == NULL) {
			ValaSourceLocation _tmp11_;
			ValaSourceLocation _tmp12_;
			ValaSourceReference* _tmp13_;
			ValaSourceReference* _tmp14_;
			const gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			_tmp11_ = begin;
			_tmp12_ = self->priv->old_end;
			_tmp13_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp11_, &_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = id;
			_tmp16_ = g_strdup_printf ("unknown argument `%s'", _tmp15_);
			_tmp17_ = _tmp16_;
			vala_report_warning (_tmp14_, _tmp17_);
			_g_free0 (_tmp17_);
			_vala_source_reference_unref0 (_tmp14_);
			_g_free0 (arg_type);
			_g_free0 (id);
			continue;
		}
		_tmp18_ = self->priv->current;
		if (_tmp18_ != VALA_TOKEN_TYPE_ASSIGN) {
			ValaGirParserMetadata* _tmp19_;
			ValaGirParserArgumentType* _tmp20_;
			ValaSourceLocation _tmp21_;
			ValaSourceReference* _tmp22_;
			ValaSourceReference* _tmp23_;
			ValaBooleanLiteral* _tmp24_;
			ValaBooleanLiteral* _tmp25_;
			ValaSourceLocation _tmp26_;
			ValaSourceReference* _tmp27_;
			ValaSourceReference* _tmp28_;
			ValaGirParserArgument* _tmp29_;
			ValaGirParserArgument* _tmp30_;
			_tmp19_ = metadata;
			_tmp20_ = arg_type;
			_tmp21_ = begin;
			_tmp22_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp21_, NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = vala_boolean_literal_new (TRUE, _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = begin;
			_tmp27_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp26_, NULL);
			_tmp28_ = _tmp27_;
			_tmp29_ = vala_gir_parser_argument_new ((ValaExpression*) _tmp25_, _tmp28_);
			_tmp30_ = _tmp29_;
			vala_gir_parser_metadata_add_argument (_tmp19_, *_tmp20_, _tmp30_);
			_vala_gir_parser_argument_unref0 (_tmp30_);
			_vala_source_reference_unref0 (_tmp28_);
			_vala_code_node_unref0 (_tmp25_);
			_vala_source_reference_unref0 (_tmp23_);
			_g_free0 (arg_type);
			_g_free0 (id);
			continue;
		}
		vala_gir_parser_metadata_parser_next (self);
		_tmp31_ = vala_gir_parser_metadata_parser_parse_expression (self);
		expr = _tmp31_;
		_tmp32_ = expr;
		if (_tmp32_ == NULL) {
			result = FALSE;
			_vala_code_node_unref0 (expr);
			_g_free0 (arg_type);
			_g_free0 (id);
			return result;
		}
		_tmp33_ = metadata;
		_tmp34_ = arg_type;
		_tmp35_ = expr;
		_tmp36_ = begin;
		_tmp37_ = vala_gir_parser_metadata_parser_get_src (self, &_tmp36_, NULL);
		_tmp38_ = _tmp37_;
		_tmp39_ = vala_gir_parser_argument_new (_tmp35_, _tmp38_);
		_tmp40_ = _tmp39_;
		vala_gir_parser_metadata_add_argument (_tmp33_, *_tmp34_, _tmp40_);
		_vala_gir_parser_argument_unref0 (_tmp40_);
		_vala_source_reference_unref0 (_tmp38_);
		_vala_code_node_unref0 (expr);
		_g_free0 (arg_type);
		_g_free0 (id);
	}
	result = TRUE;
	return result;
}


static gboolean vala_gir_parser_metadata_parser_parse_rule (ValaGirParserMetadataParser* self) {
	gboolean result = FALSE;
	ValaSourceLocation old_end = {0};
	ValaSourceLocation _tmp0_;
	ValaGirParserMetadata* metadata = NULL;
	ValaGirParserMetadata* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	gboolean _tmp3_ = FALSE;
	ValaTokenType _tmp4_;
	ValaGirParserMetadata* _tmp9_;
	gboolean _tmp10_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->end;
	old_end = _tmp0_;
	_tmp1_ = vala_gir_parser_metadata_parser_parse_pattern (self);
	metadata = _tmp1_;
	_tmp2_ = metadata;
	if (_tmp2_ == NULL) {
		result = FALSE;
		_vala_gir_parser_metadata_unref0 (metadata);
		return result;
	}
	_tmp4_ = self->priv->current;
	if (_tmp4_ == VALA_TOKEN_TYPE_EOF) {
		_tmp3_ = TRUE;
	} else {
		ValaSourceLocation _tmp5_;
		gint _tmp6_;
		ValaSourceLocation _tmp7_;
		gint _tmp8_;
		_tmp5_ = old_end;
		_tmp6_ = _tmp5_.line;
		_tmp7_ = self->priv->end;
		_tmp8_ = _tmp7_.line;
		_tmp3_ = _tmp6_ != _tmp8_;
	}
	if (_tmp3_) {
		result = TRUE;
		_vala_gir_parser_metadata_unref0 (metadata);
		return result;
	}
	_tmp9_ = metadata;
	_tmp10_ = vala_gir_parser_metadata_parser_parse_args (self, _tmp9_);
	result = _tmp10_;
	_vala_gir_parser_metadata_unref0 (metadata);
	return result;
}


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


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


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


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


static gchar* vala_gir_parser_value_metadata_parser_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		ValaGirParserMetadataParser * 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 = vala_gir_parser_metadata_parser_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* vala_gir_parser_value_metadata_parser_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ValaGirParserMetadataParser ** 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 = vala_gir_parser_metadata_parser_ref (value->data[0].v_pointer);
	}
	return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_metadata_parser (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaGirParserParamSpecMetadataParser* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_METADATA_PARSER), 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 vala_gir_parser_value_get_metadata_parser (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA_PARSER), NULL);
	return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_metadata_parser (GValue* value, gpointer v_object) {
	ValaGirParserMetadataParser * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
		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;
		vala_gir_parser_metadata_parser_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_gir_parser_metadata_parser_unref (old);
	}
}


static void vala_gir_parser_value_take_metadata_parser (GValue* value, gpointer v_object) {
	ValaGirParserMetadataParser * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_METADATA_PARSER));
		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) {
		vala_gir_parser_metadata_parser_unref (old);
	}
}


static void vala_gir_parser_metadata_parser_class_init (ValaGirParserMetadataParserClass * klass) {
	vala_gir_parser_metadata_parser_parent_class = g_type_class_peek_parent (klass);
	((ValaGirParserMetadataParserClass *) klass)->finalize = vala_gir_parser_metadata_parser_finalize;
	g_type_class_add_private (klass, sizeof (ValaGirParserMetadataParserPrivate));
}


static void vala_gir_parser_metadata_parser_instance_init (ValaGirParserMetadataParser * self) {
	ValaGirParserMetadata* _tmp0_;
	self->priv = VALA_GIR_PARSER_METADATA_PARSER_GET_PRIVATE (self);
	_tmp0_ = vala_gir_parser_metadata_new ("", NULL, NULL);
	self->priv->tree = _tmp0_;
	self->ref_count = 1;
}


static void vala_gir_parser_metadata_parser_finalize (ValaGirParserMetadataParser * obj) {
	ValaGirParserMetadataParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_GIR_PARSER_TYPE_METADATA_PARSER, ValaGirParserMetadataParser);
	g_signal_handlers_destroy (self);
	_vala_gir_parser_metadata_unref0 (self->priv->tree);
	_vala_scanner_unref0 (self->priv->scanner);
	_vala_gir_parser_metadata_unref0 (self->priv->parent_metadata);
}


static GType vala_gir_parser_metadata_parser_get_type (void) {
	static volatile gsize vala_gir_parser_metadata_parser_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_metadata_parser_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_metadata_parser_init, vala_gir_parser_value_metadata_parser_free_value, vala_gir_parser_value_metadata_parser_copy_value, vala_gir_parser_value_metadata_parser_peek_pointer, "p", vala_gir_parser_value_metadata_parser_collect_value, "p", vala_gir_parser_value_metadata_parser_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserMetadataParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_metadata_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserMetadataParser), 0, (GInstanceInitFunc) vala_gir_parser_metadata_parser_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 vala_gir_parser_metadata_parser_type_id;
		vala_gir_parser_metadata_parser_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserMetadataParser", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&vala_gir_parser_metadata_parser_type_id__volatile, vala_gir_parser_metadata_parser_type_id);
	}
	return vala_gir_parser_metadata_parser_type_id__volatile;
}


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


static void vala_gir_parser_metadata_parser_unref (gpointer instance) {
	ValaGirParserMetadataParser * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_GIR_PARSER_METADATA_PARSER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static ValaGirParserNode* vala_gir_parser_node_construct (GType object_type, const gchar* name) {
	ValaGirParserNode* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	self = (ValaGirParserNode*) g_type_create_instance (object_type);
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	return self;
}


static ValaGirParserNode* vala_gir_parser_node_new (const gchar* name) {
	return vala_gir_parser_node_construct (VALA_GIR_PARSER_TYPE_NODE, name);
}


static void vala_gir_parser_node_add_member (ValaGirParserNode* self, ValaGirParserNode* node) {
	ValaArrayList* nodes = NULL;
	ValaHashMap* _tmp0_;
	ValaGirParserNode* _tmp1_;
	const gchar* _tmp2_;
	gpointer _tmp3_;
	ValaArrayList* _tmp4_;
	ValaArrayList* _tmp11_;
	ValaGirParserNode* _tmp12_;
	ValaArrayList* _tmp13_;
	ValaGirParserNode* _tmp14_;
	ValaGirParserNode* _tmp15_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->scope;
	_tmp1_ = node;
	_tmp2_ = _tmp1_->name;
	_tmp3_ = vala_map_get ((ValaMap*) _tmp0_, _tmp2_);
	nodes = (ValaArrayList*) _tmp3_;
	_tmp4_ = nodes;
	if (_tmp4_ == NULL) {
		GEqualFunc _tmp5_;
		ValaArrayList* _tmp6_;
		ValaHashMap* _tmp7_;
		ValaGirParserNode* _tmp8_;
		const gchar* _tmp9_;
		ValaArrayList* _tmp10_;
		_tmp5_ = g_direct_equal;
		_tmp6_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, (GDestroyNotify) vala_gir_parser_node_unref, _tmp5_);
		_vala_iterable_unref0 (nodes);
		nodes = _tmp6_;
		_tmp7_ = self->scope;
		_tmp8_ = node;
		_tmp9_ = _tmp8_->name;
		_tmp10_ = nodes;
		vala_map_set ((ValaMap*) _tmp7_, _tmp9_, _tmp10_);
	}
	_tmp11_ = nodes;
	_tmp12_ = node;
	vala_collection_add ((ValaCollection*) _tmp11_, _tmp12_);
	_tmp13_ = self->members;
	_tmp14_ = node;
	vala_collection_add ((ValaCollection*) _tmp13_, _tmp14_);
	_tmp15_ = node;
	_tmp15_->parent = self;
	_vala_iterable_unref0 (nodes);
}


static void vala_gir_parser_node_remove_member (ValaGirParserNode* self, ValaGirParserNode* node) {
	ValaArrayList* nodes = NULL;
	ValaHashMap* _tmp0_;
	ValaGirParserNode* _tmp1_;
	const gchar* _tmp2_;
	gpointer _tmp3_;
	ValaArrayList* _tmp4_;
	ValaGirParserNode* _tmp5_;
	ValaArrayList* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	ValaArrayList* _tmp12_;
	ValaGirParserNode* _tmp13_;
	ValaGirParserNode* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = self->scope;
	_tmp1_ = node;
	_tmp2_ = _tmp1_->name;
	_tmp3_ = vala_map_get ((ValaMap*) _tmp0_, _tmp2_);
	nodes = (ValaArrayList*) _tmp3_;
	_tmp4_ = nodes;
	_tmp5_ = node;
	vala_collection_remove ((ValaCollection*) _tmp4_, _tmp5_);
	_tmp6_ = nodes;
	_tmp7_ = vala_collection_get_size ((ValaCollection*) _tmp6_);
	_tmp8_ = _tmp7_;
	if (_tmp8_ == 0) {
		ValaHashMap* _tmp9_;
		ValaGirParserNode* _tmp10_;
		const gchar* _tmp11_;
		_tmp9_ = self->scope;
		_tmp10_ = node;
		_tmp11_ = _tmp10_->name;
		vala_map_remove ((ValaMap*) _tmp9_, _tmp11_);
	}
	_tmp12_ = self->members;
	_tmp13_ = node;
	vala_collection_remove ((ValaCollection*) _tmp12_, _tmp13_);
	_tmp14_ = node;
	_tmp14_->parent = NULL;
	_vala_iterable_unref0 (nodes);
}


static ValaGirParserNode* vala_gir_parser_node_lookup (ValaGirParserNode* self, const gchar* name, gboolean create_namespace, ValaSourceReference* source_reference) {
	ValaGirParserNode* result = NULL;
	ValaArrayList* nodes = NULL;
	ValaHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_;
	ValaGirParserNode* node = NULL;
	ValaArrayList* _tmp3_;
	ValaGirParserNode* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->scope;
	_tmp1_ = name;
	_tmp2_ = vala_map_get ((ValaMap*) _tmp0_, _tmp1_);
	nodes = (ValaArrayList*) _tmp2_;
	node = NULL;
	_tmp3_ = nodes;
	if (_tmp3_ != NULL) {
		ValaArrayList* _tmp4_;
		gpointer _tmp5_;
		_tmp4_ = nodes;
		_tmp5_ = vala_list_get ((ValaList*) _tmp4_, 0);
		_vala_gir_parser_node_unref0 (node);
		node = (ValaGirParserNode*) _tmp5_;
	}
	_tmp6_ = node;
	if (_tmp6_ == NULL) {
		ValaSymbol* sym = NULL;
		ValaSymbol* _tmp7_;
		gboolean _tmp13_ = FALSE;
		ValaSymbol* _tmp14_;
		sym = NULL;
		_tmp7_ = self->symbol;
		if (_tmp7_ != NULL) {
			ValaSymbol* _tmp8_;
			ValaScope* _tmp9_;
			ValaScope* _tmp10_;
			const gchar* _tmp11_;
			ValaSymbol* _tmp12_;
			_tmp8_ = self->symbol;
			_tmp9_ = vala_symbol_get_scope (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = name;
			_tmp12_ = vala_scope_lookup (_tmp10_, _tmp11_);
			_vala_code_node_unref0 (sym);
			sym = _tmp12_;
		}
		_tmp14_ = sym;
		if (_tmp14_ != NULL) {
			_tmp13_ = TRUE;
		} else {
			gboolean _tmp15_;
			_tmp15_ = create_namespace;
			_tmp13_ = _tmp15_;
		}
		if (_tmp13_) {
			const gchar* _tmp16_;
			ValaGirParserNode* _tmp17_;
			ValaGirParserNode* _tmp18_;
			ValaSymbol* _tmp19_;
			ValaSymbol* _tmp20_;
			ValaGirParserNode* _tmp21_;
			ValaGirParserNode* _tmp22_;
			ValaSymbol* _tmp23_;
			ValaGirParserNode* _tmp24_;
			ValaSourceReference* _tmp25_;
			ValaSourceReference* _tmp26_;
			ValaGirParserNode* _tmp27_;
			ValaSymbol* _tmp28_;
			_tmp16_ = name;
			_tmp17_ = vala_gir_parser_node_new (_tmp16_);
			_vala_gir_parser_node_unref0 (node);
			node = _tmp17_;
			_tmp18_ = node;
			_tmp19_ = sym;
			_tmp20_ = _vala_code_node_ref0 (_tmp19_);
			_vala_code_node_unref0 (_tmp18_->symbol);
			_tmp18_->symbol = _tmp20_;
			_tmp21_ = node;
			_tmp22_ = node;
			_tmp23_ = _tmp22_->symbol;
			_tmp21_->new_symbol = _tmp23_ == NULL;
			_tmp24_ = node;
			_tmp25_ = source_reference;
			_tmp26_ = _vala_source_reference_ref0 (_tmp25_);
			_vala_source_reference_unref0 (_tmp24_->source_reference);
			_tmp24_->source_reference = _tmp26_;
			_tmp27_ = node;
			vala_gir_parser_node_add_member (self, _tmp27_);
			_tmp28_ = sym;
			if (_tmp28_ == NULL) {
				ValaArrayList* _tmp29_;
				ValaGirParserNode* _tmp30_;
				_tmp29_ = vala_gir_parser_node_new_namespaces;
				_tmp30_ = node;
				vala_collection_add ((ValaCollection*) _tmp29_, _tmp30_);
			}
		}
		_vala_code_node_unref0 (sym);
	}
	result = node;
	_vala_iterable_unref0 (nodes);
	return result;
}


static ValaArrayList* vala_gir_parser_node_lookup_all (ValaGirParserNode* self, const gchar* name) {
	ValaArrayList* result = NULL;
	ValaHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = self->scope;
	_tmp1_ = name;
	_tmp2_ = vala_map_get ((ValaMap*) _tmp0_, _tmp1_);
	result = (ValaArrayList*) _tmp2_;
	return result;
}


static ValaUnresolvedSymbol* vala_gir_parser_node_get_unresolved_symbol (ValaGirParserNode* self) {
	ValaUnresolvedSymbol* result = NULL;
	ValaGirParserNode* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->parent;
	_tmp1_ = _tmp0_->name;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_;
		ValaUnresolvedSymbol* _tmp3_;
		_tmp2_ = self->name;
		_tmp3_ = vala_unresolved_symbol_new (NULL, _tmp2_, NULL);
		result = _tmp3_;
		return result;
	} else {
		ValaGirParserNode* _tmp4_;
		ValaUnresolvedSymbol* _tmp5_;
		ValaUnresolvedSymbol* _tmp6_;
		const gchar* _tmp7_;
		ValaUnresolvedSymbol* _tmp8_;
		ValaUnresolvedSymbol* _tmp9_;
		_tmp4_ = self->parent;
		_tmp5_ = vala_gir_parser_node_get_unresolved_symbol (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->name;
		_tmp8_ = vala_unresolved_symbol_new (_tmp6_, _tmp7_, NULL);
		_tmp9_ = _tmp8_;
		_vala_code_node_unref0 (_tmp6_);
		result = _tmp9_;
		return result;
	}
}


static gchar* vala_gir_parser_node_get_full_name (ValaGirParserNode* self) {
	gchar* result = NULL;
	ValaGirParserNode* _tmp0_;
	const gchar* _tmp3_;
	ValaGirParserNode* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	ValaGirParserNode* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->parent;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = self->name;
		_tmp2_ = g_strdup (_tmp1_);
		result = _tmp2_;
		return result;
	}
	_tmp3_ = self->name;
	if (_tmp3_ == NULL) {
		ValaGirParserNode* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->parent;
		_tmp5_ = vala_gir_parser_node_get_full_name (_tmp4_);
		result = _tmp5_;
		return result;
	}
	_tmp6_ = self->parent;
	_tmp7_ = vala_gir_parser_node_get_full_name (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = _tmp8_ == NULL;
	_g_free0 (_tmp8_);
	if (_tmp9_) {
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp10_ = self->name;
		_tmp11_ = g_strdup (_tmp10_);
		result = _tmp11_;
		return result;
	}
	_tmp12_ = self->parent;
	_tmp13_ = vala_gir_parser_node_get_full_name (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = self->name;
	_tmp16_ = g_strdup_printf ("%s.%s", _tmp14_, _tmp15_);
	_tmp17_ = _tmp16_;
	_g_free0 (_tmp14_);
	result = _tmp17_;
	return result;
}


static gchar* vala_gir_parser_node_get_default_gir_name (ValaGirParserNode* self) {
	gchar* result = NULL;
	GString* default_name = NULL;
	GString* _tmp0_;
	GString* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_string_new ("");
	default_name = _tmp0_;
	{
		ValaGirParserNode* node = NULL;
		node = self;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				ValaGirParserNode* _tmp4_;
				ValaGirParserNode* _tmp5_;
				ValaSymbol* _tmp6_;
				GString* _tmp12_;
				ValaGirParserNode* _tmp13_;
				const gchar* _tmp14_;
				if (!_tmp1_) {
					ValaGirParserNode* _tmp2_;
					ValaGirParserNode* _tmp3_;
					_tmp2_ = node;
					_tmp3_ = _tmp2_->parent;
					node = _tmp3_;
				}
				_tmp1_ = FALSE;
				_tmp4_ = node;
				if (!(_tmp4_ != NULL)) {
					break;
				}
				_tmp5_ = node;
				_tmp6_ = _tmp5_->symbol;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp6_, VALA_TYPE_NAMESPACE)) {
					ValaGirParserNode* _tmp7_;
					ValaSymbol* _tmp8_;
					gchar* _tmp9_;
					gchar* _tmp10_;
					gboolean _tmp11_;
					_tmp7_ = node;
					_tmp8_ = _tmp7_->symbol;
					_tmp9_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp8_, "CCode", "gir_namespace", NULL);
					_tmp10_ = _tmp9_;
					_tmp11_ = _tmp10_ != NULL;
					_g_free0 (_tmp10_);
					if (_tmp11_) {
						break;
					}
				}
				_tmp12_ = default_name;
				_tmp13_ = node;
				_tmp14_ = _tmp13_->name;
				g_string_prepend (_tmp12_, _tmp14_);
			}
		}
	}
	_tmp15_ = default_name;
	_tmp16_ = _tmp15_->str;
	_tmp17_ = g_strdup (_tmp16_);
	result = _tmp17_;
	_g_string_free0 (default_name);
	return result;
}


static gchar* vala_gir_parser_node_get_gir_name (ValaGirParserNode* self) {
	gchar* result = NULL;
	gchar* gir_name = NULL;
	ValaMap* _tmp0_;
	gpointer _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->girdata;
	_tmp1_ = vala_map_get (_tmp0_, "name");
	gir_name = (gchar*) _tmp1_;
	_tmp2_ = gir_name;
	if (_tmp2_ == NULL) {
		ValaMap* _tmp3_;
		gpointer _tmp4_;
		_tmp3_ = self->girdata;
		_tmp4_ = vala_map_get (_tmp3_, "glib:name");
		_g_free0 (gir_name);
		gir_name = (gchar*) _tmp4_;
	}
	result = gir_name;
	return result;
}


static gchar* vala_gir_parser_node_get_lower_case_cprefix (ValaGirParserNode* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* prefix = NULL;
	ValaSymbol* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_;
	gboolean _tmp19_ = FALSE;
	gboolean _tmp20_ = FALSE;
	const gchar* _tmp21_;
	const gchar* _tmp53_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->symbol;
	_tmp3_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp2_, "CCode", "lower_case_cprefix", NULL);
	prefix = _tmp3_;
	_tmp5_ = prefix;
	if (_tmp5_ == NULL) {
		gboolean _tmp6_ = FALSE;
		ValaSymbol* _tmp7_;
		_tmp7_ = self->symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
			_tmp6_ = TRUE;
		} else {
			ValaSymbol* _tmp8_;
			_tmp8_ = self->symbol;
			_tmp6_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp8_, VALA_TYPE_STRUCT);
		}
		_tmp4_ = _tmp6_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaGirParserMetadata* _tmp9_;
		gboolean _tmp10_;
		_tmp9_ = self->metadata;
		_tmp10_ = vala_gir_parser_metadata_has_argument (_tmp9_, VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX);
		if (_tmp10_) {
			ValaGirParserMetadata* _tmp11_;
			gchar* _tmp12_;
			_tmp11_ = self->metadata;
			_tmp12_ = vala_gir_parser_metadata_get_string (_tmp11_, VALA_GIR_PARSER_ARGUMENT_TYPE_LOWER_CASE_CPREFIX);
			_g_free0 (prefix);
			prefix = _tmp12_;
		} else {
			ValaGirParserMetadata* _tmp13_;
			gboolean _tmp14_;
			_tmp13_ = self->metadata;
			_tmp14_ = vala_gir_parser_metadata_has_argument (_tmp13_, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
			if (_tmp14_) {
				ValaGirParserMetadata* _tmp15_;
				gchar* _tmp16_;
				_tmp15_ = self->metadata;
				_tmp16_ = vala_gir_parser_metadata_get_string (_tmp15_, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
				_g_free0 (prefix);
				prefix = _tmp16_;
			} else {
				ValaSymbol* _tmp17_;
				gchar* _tmp18_;
				_tmp17_ = self->symbol;
				_tmp18_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp17_, "CCode", "cprefix", NULL);
				_g_free0 (prefix);
				prefix = _tmp18_;
			}
		}
	}
	_tmp21_ = prefix;
	if (_tmp21_ == NULL) {
		ValaMap* _tmp22_;
		_tmp22_ = self->girdata;
		_tmp20_ = _tmp22_ != NULL;
	} else {
		_tmp20_ = FALSE;
	}
	if (_tmp20_) {
		gboolean _tmp23_ = FALSE;
		ValaMap* _tmp24_;
		gboolean _tmp25_;
		_tmp24_ = self->girdata;
		_tmp25_ = vala_map_contains (_tmp24_, "c:symbol-prefix");
		if (_tmp25_) {
			_tmp23_ = TRUE;
		} else {
			ValaMap* _tmp26_;
			gboolean _tmp27_;
			_tmp26_ = self->girdata;
			_tmp27_ = vala_map_contains (_tmp26_, "c:symbol-prefixes");
			_tmp23_ = _tmp27_;
		}
		_tmp19_ = _tmp23_;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		ValaGirParserNode* cur = NULL;
		cur = self;
		{
			gboolean _tmp28_ = FALSE;
			_tmp28_ = TRUE;
			while (TRUE) {
				ValaGirParserNode* _tmp30_;
				ValaMap* _tmp31_;
				ValaGirParserNode* _tmp51_;
				ValaGirParserNode* _tmp52_;
				if (!_tmp28_) {
					ValaGirParserNode* _tmp29_;
					_tmp29_ = cur;
					if (!(_tmp29_ != NULL)) {
						break;
					}
				}
				_tmp28_ = FALSE;
				_tmp30_ = cur;
				_tmp31_ = _tmp30_->girdata;
				if (_tmp31_ != NULL) {
					gchar* p = NULL;
					ValaGirParserNode* _tmp32_;
					ValaMap* _tmp33_;
					gpointer _tmp34_;
					const gchar* _tmp35_;
					const gchar* _tmp46_;
					_tmp32_ = cur;
					_tmp33_ = _tmp32_->girdata;
					_tmp34_ = vala_map_get (_tmp33_, "c:symbol-prefix");
					p = (gchar*) _tmp34_;
					_tmp35_ = p;
					if (_tmp35_ == NULL) {
						ValaGirParserNode* _tmp36_;
						ValaMap* _tmp37_;
						gpointer _tmp38_;
						const gchar* _tmp39_;
						_tmp36_ = cur;
						_tmp37_ = _tmp36_->girdata;
						_tmp38_ = vala_map_get (_tmp37_, "c:symbol-prefixes");
						_g_free0 (p);
						p = (gchar*) _tmp38_;
						_tmp39_ = p;
						if (_tmp39_ != NULL) {
							gint idx = 0;
							const gchar* _tmp40_;
							gint _tmp41_;
							gint _tmp42_;
							_tmp40_ = p;
							_tmp41_ = string_index_of (_tmp40_, ",", 0);
							idx = _tmp41_;
							_tmp42_ = idx;
							if (_tmp42_ >= 0) {
								const gchar* _tmp43_;
								gint _tmp44_;
								gchar* _tmp45_;
								_tmp43_ = p;
								_tmp44_ = idx;
								_tmp45_ = string_substring (_tmp43_, (glong) 0, (glong) _tmp44_);
								_g_free0 (p);
								p = _tmp45_;
							}
						}
					}
					_tmp46_ = p;
					if (_tmp46_ != NULL) {
						const gchar* _tmp47_ = NULL;
						const gchar* _tmp48_;
						const gchar* _tmp49_;
						gchar* _tmp50_;
						_tmp48_ = prefix;
						_tmp47_ = _tmp48_;
						if (_tmp47_ == NULL) {
							_tmp47_ = "";
						}
						_tmp49_ = p;
						_tmp50_ = g_strdup_printf ("%s_%s", _tmp49_, _tmp47_);
						_g_free0 (prefix);
						prefix = _tmp50_;
					}
					_g_free0 (p);
				}
				_tmp51_ = cur;
				_tmp52_ = _tmp51_->parent;
				cur = _tmp52_;
			}
		}
	}
	_tmp53_ = prefix;
	if (_tmp53_ == NULL) {
		gchar* _tmp54_;
		_tmp54_ = vala_gir_parser_node_get_default_lower_case_cprefix (self);
		_g_free0 (prefix);
		prefix = _tmp54_;
	}
	result = prefix;
	return result;
}


static gchar* vala_gir_parser_node_get_default_lower_case_cprefix (ValaGirParserNode* self) {
	gchar* result = NULL;
	ValaGirParserNode* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->parent;
	_tmp1_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = vala_gir_parser_node_get_lower_case_csuffix (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strdup_printf ("%s%s_", _tmp2_, _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	_g_free0 (_tmp2_);
	result = _tmp6_;
	return result;
}


static gchar* vala_gir_parser_node_get_lower_case_csuffix (ValaGirParserNode* self) {
	gchar* result = NULL;
	gchar* suffix = NULL;
	ValaSymbol* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	const gchar* _tmp5_;
	const gchar* _tmp14_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->symbol;
	_tmp1_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp0_, "CCode", "lower_case_csuffix", NULL);
	suffix = _tmp1_;
	_tmp5_ = suffix;
	if (_tmp5_ == NULL) {
		ValaMap* _tmp6_;
		_tmp6_ = self->girdata;
		_tmp4_ = _tmp6_ != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ValaMap* _tmp7_;
		gpointer _tmp8_;
		gchar* _tmp9_;
		_tmp7_ = self->girdata;
		_tmp8_ = vala_map_get (_tmp7_, "c:symbol-prefix");
		_tmp9_ = (gchar*) _tmp8_;
		_tmp3_ = _tmp9_ != NULL;
		_g_free0 (_tmp9_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ValaGirParserMetadata* _tmp10_;
		gboolean _tmp11_;
		_tmp10_ = self->metadata;
		_tmp11_ = vala_gir_parser_metadata_has_argument (_tmp10_, VALA_GIR_PARSER_ARGUMENT_TYPE_NAME);
		_tmp2_ = !_tmp11_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ValaMap* _tmp12_;
		gpointer _tmp13_;
		_tmp12_ = self->girdata;
		_tmp13_ = vala_map_get (_tmp12_, "c:symbol-prefix");
		_g_free0 (suffix);
		suffix = (gchar*) _tmp13_;
	}
	_tmp14_ = suffix;
	if (_tmp14_ == NULL) {
		gchar* _tmp15_;
		_tmp15_ = vala_gir_parser_node_get_default_lower_case_csuffix (self);
		_g_free0 (suffix);
		suffix = _tmp15_;
	}
	result = suffix;
	return result;
}


static gchar* vala_gir_parser_node_get_default_lower_case_csuffix (ValaGirParserNode* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	_tmp1_ = vala_symbol_camel_case_to_lower_case (_tmp0_);
	result = _tmp1_;
	return result;
}


static gchar* vala_gir_parser_node_get_cprefix (ValaGirParserNode* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* prefix = NULL;
	ValaGirParserMetadata* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	const gchar* _tmp10_;
	const gchar* _tmp23_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->metadata;
	_tmp3_ = vala_gir_parser_metadata_has_argument (_tmp2_, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
	if (_tmp3_) {
		ValaGirParserMetadata* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->metadata;
		_tmp5_ = vala_gir_parser_metadata_get_string (_tmp4_, VALA_GIR_PARSER_ARGUMENT_TYPE_CPREFIX);
		_g_free0 (prefix);
		prefix = _tmp5_;
	} else {
		ValaSymbol* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = self->symbol;
		_tmp7_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp6_, "CCode", "cprefix", NULL);
		_g_free0 (prefix);
		prefix = _tmp7_;
	}
	_tmp10_ = prefix;
	if (_tmp10_ == NULL) {
		ValaMap* _tmp11_;
		_tmp11_ = self->girdata;
		_tmp9_ = _tmp11_ != NULL;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		ValaMap* _tmp12_;
		gpointer _tmp13_;
		gchar* _tmp14_;
		_tmp12_ = self->girdata;
		_tmp13_ = vala_map_get (_tmp12_, "c:identifier-prefixes");
		_tmp14_ = (gchar*) _tmp13_;
		_tmp8_ = _tmp14_ != NULL;
		_g_free0 (_tmp14_);
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		ValaMap* _tmp15_;
		gpointer _tmp16_;
		gint idx = 0;
		const gchar* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		_tmp15_ = self->girdata;
		_tmp16_ = vala_map_get (_tmp15_, "c:identifier-prefixes");
		_g_free0 (prefix);
		prefix = (gchar*) _tmp16_;
		_tmp17_ = prefix;
		_tmp18_ = string_index_of (_tmp17_, ",", 0);
		idx = _tmp18_;
		_tmp19_ = idx;
		if (_tmp19_ != -1) {
			const gchar* _tmp20_;
			gint _tmp21_;
			gchar* _tmp22_;
			_tmp20_ = prefix;
			_tmp21_ = idx;
			_tmp22_ = string_substring (_tmp20_, (glong) 0, (glong) _tmp21_);
			_g_free0 (prefix);
			prefix = _tmp22_;
		}
	}
	_tmp23_ = prefix;
	if (_tmp23_ == NULL) {
		gboolean _tmp24_ = FALSE;
		ValaSymbol* _tmp25_;
		_tmp25_ = self->symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp25_, VALA_TYPE_ENUM)) {
			_tmp24_ = TRUE;
		} else {
			ValaSymbol* _tmp26_;
			_tmp26_ = self->symbol;
			_tmp24_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp26_, VALA_TYPE_ERROR_DOMAIN);
		}
		if (_tmp24_) {
			ValaGirParserNode* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			gchar* _tmp30_;
			gchar* _tmp31_;
			const gchar* _tmp32_;
			gchar* _tmp33_;
			_tmp27_ = self->parent;
			_tmp28_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = g_ascii_strup (_tmp29_, (gssize) -1);
			_tmp31_ = _tmp30_;
			_tmp32_ = self->name;
			_tmp33_ = g_strdup_printf ("%s%s", _tmp31_, _tmp32_);
			_g_free0 (prefix);
			prefix = _tmp33_;
			_g_free0 (_tmp31_);
			_g_free0 (_tmp29_);
		} else {
			gchar* _tmp34_;
			_tmp34_ = vala_gir_parser_node_get_cname (self);
			_g_free0 (prefix);
			prefix = _tmp34_;
		}
	}
	result = prefix;
	return result;
}


static gchar* vala_gir_parser_node_get_cname (ValaGirParserNode* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* cname = NULL;
	ValaGirParserMetadata* _tmp2_;
	gboolean _tmp3_;
	ValaMap* _tmp8_;
	const gchar* _tmp15_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->metadata;
	_tmp3_ = vala_gir_parser_metadata_has_argument (_tmp2_, VALA_GIR_PARSER_ARGUMENT_TYPE_CNAME);
	if (_tmp3_) {
		ValaGirParserMetadata* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->metadata;
		_tmp5_ = vala_gir_parser_metadata_get_string (_tmp4_, VALA_GIR_PARSER_ARGUMENT_TYPE_CNAME);
		_g_free0 (cname);
		cname = _tmp5_;
	} else {
		ValaSymbol* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = self->symbol;
		_tmp7_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp6_, "CCode", "cname", NULL);
		_g_free0 (cname);
		cname = _tmp7_;
	}
	_tmp8_ = self->girdata;
	if (_tmp8_ != NULL) {
		const gchar* _tmp9_;
		const gchar* _tmp12_;
		_tmp9_ = cname;
		if (_tmp9_ == NULL) {
			ValaMap* _tmp10_;
			gpointer _tmp11_;
			_tmp10_ = self->girdata;
			_tmp11_ = vala_map_get (_tmp10_, "c:identifier");
			_g_free0 (cname);
			cname = (gchar*) _tmp11_;
		}
		_tmp12_ = cname;
		if (_tmp12_ == NULL) {
			ValaMap* _tmp13_;
			gpointer _tmp14_;
			_tmp13_ = self->girdata;
			_tmp14_ = vala_map_get (_tmp13_, "c:type");
			_g_free0 (cname);
			cname = (gchar*) _tmp14_;
		}
	}
	_tmp15_ = cname;
	if (_tmp15_ == NULL) {
		gchar* _tmp16_;
		_tmp16_ = vala_gir_parser_node_get_default_cname (self);
		_g_free0 (cname);
		cname = _tmp16_;
	}
	result = cname;
	return result;
}


static gchar* vala_gir_parser_node_get_default_cname (ValaGirParserNode* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	ValaSymbol* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_FIELD)) {
		ValaSymbol* _tmp3_;
		ValaMemberBinding _tmp4_;
		ValaMemberBinding _tmp5_;
		_tmp3_ = self->symbol;
		_tmp4_ = vala_field_get_binding (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, VALA_TYPE_FIELD, ValaField));
		_tmp5_ = _tmp4_;
		if (_tmp5_ == VALA_MEMBER_BINDING_STATIC) {
			ValaGirParserNode* _tmp6_;
			gchar* _tmp7_;
			gchar* _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			gchar* _tmp11_;
			_tmp6_ = self->parent;
			_tmp7_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = self->name;
			_tmp10_ = g_strconcat (_tmp8_, _tmp9_, NULL);
			_tmp11_ = _tmp10_;
			_g_free0 (_tmp8_);
			result = _tmp11_;
			return result;
		} else {
			const gchar* _tmp12_;
			gchar* _tmp13_;
			_tmp12_ = self->name;
			_tmp13_ = g_strdup (_tmp12_);
			result = _tmp13_;
			return result;
		}
	} else {
		ValaSymbol* _tmp14_;
		_tmp14_ = self->symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, VALA_TYPE_METHOD)) {
			ValaGirParserNode* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			_tmp15_ = self->parent;
			_tmp16_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = self->name;
			_tmp19_ = g_strdup_printf ("%s%s", _tmp17_, _tmp18_);
			_tmp20_ = _tmp19_;
			_g_free0 (_tmp17_);
			result = _tmp20_;
			return result;
		} else {
			ValaGirParserNode* _tmp21_;
			gchar* _tmp22_;
			gchar* _tmp23_;
			const gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			_tmp21_ = self->parent;
			_tmp22_ = vala_gir_parser_node_get_cprefix (_tmp21_);
			_tmp23_ = _tmp22_;
			_tmp24_ = self->name;
			_tmp25_ = g_strdup_printf ("%s%s", _tmp23_, _tmp24_);
			_tmp26_ = _tmp25_;
			_g_free0 (_tmp23_);
			result = _tmp26_;
			return result;
		}
	}
}


static gchar* vala_gir_parser_node_get_finish_cname (ValaGirParserNode* self) {
	gchar* result = NULL;
	gchar* finish_cname = NULL;
	ValaSymbol* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->symbol;
	_tmp1_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp0_, "CCode", "finish_name", NULL);
	finish_cname = _tmp1_;
	_tmp2_ = finish_cname;
	if (_tmp2_ == NULL) {
		gchar* _tmp3_;
		const gchar* _tmp4_;
		gboolean _tmp5_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp3_ = vala_gir_parser_node_get_cname (self);
		_g_free0 (finish_cname);
		finish_cname = _tmp3_;
		_tmp4_ = finish_cname;
		_tmp5_ = g_str_has_suffix (_tmp4_, "_async");
		if (_tmp5_) {
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			gchar* _tmp12_;
			_tmp6_ = finish_cname;
			_tmp7_ = finish_cname;
			_tmp8_ = strlen (_tmp7_);
			_tmp9_ = _tmp8_;
			_tmp10_ = strlen ("_async");
			_tmp11_ = _tmp10_;
			_tmp12_ = string_substring (_tmp6_, (glong) 0, (glong) (_tmp9_ - _tmp11_));
			_g_free0 (finish_cname);
			finish_cname = _tmp12_;
		}
		_tmp13_ = finish_cname;
		_tmp14_ = g_strdup_printf ("%s_finish", _tmp13_);
		_g_free0 (finish_cname);
		finish_cname = _tmp14_;
	}
	result = finish_cname;
	return result;
}


static gchar* vala_gir_parser_node_get_cheader_filename (ValaGirParserNode* self) {
	gchar* result = NULL;
	ValaGirParserMetadata* _tmp0_;
	gboolean _tmp1_;
	gchar* cheader_filename = NULL;
	ValaSymbol* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	ValaGirParserNode* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp20_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->metadata;
	_tmp1_ = vala_gir_parser_metadata_has_argument (_tmp0_, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
	if (_tmp1_) {
		ValaGirParserMetadata* _tmp2_;
		gchar* _tmp3_;
		_tmp2_ = self->metadata;
		_tmp3_ = vala_gir_parser_metadata_get_string (_tmp2_, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
		result = _tmp3_;
		return result;
	}
	_tmp4_ = self->symbol;
	_tmp5_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp4_, "CCode", "cheader_filename", NULL);
	cheader_filename = _tmp5_;
	_tmp6_ = cheader_filename;
	if (_tmp6_ != NULL) {
		result = cheader_filename;
		return result;
	}
	_tmp7_ = self->parent;
	_tmp8_ = _tmp7_->name;
	if (_tmp8_ != NULL) {
		ValaGirParserNode* _tmp9_;
		gchar* _tmp10_;
		_tmp9_ = self->parent;
		_tmp10_ = vala_gir_parser_node_get_cheader_filename (_tmp9_);
		result = _tmp10_;
		_g_free0 (cheader_filename);
		return result;
	} else {
		ValaSymbol* _tmp11_;
		ValaSourceReference* _tmp12_;
		ValaSourceReference* _tmp13_;
		_tmp11_ = self->symbol;
		_tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp11_);
		_tmp13_ = _tmp12_;
		if (_tmp13_ != NULL) {
			ValaSymbol* _tmp14_;
			ValaSourceReference* _tmp15_;
			ValaSourceReference* _tmp16_;
			ValaSourceFile* _tmp17_;
			ValaSourceFile* _tmp18_;
			gchar* _tmp19_;
			_tmp14_ = self->symbol;
			_tmp15_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = vala_source_reference_get_file (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = vala_source_file_get_cinclude_filename (_tmp18_);
			result = _tmp19_;
			_g_free0 (cheader_filename);
			return result;
		}
	}
	_tmp20_ = g_strdup ("");
	result = _tmp20_;
	_g_free0 (cheader_filename);
	return result;
}


static gboolean int64_try_parse (const gchar* str, gint64* _result_) {
	gint64 _vala_result = 0LL;
	gboolean result = FALSE;
	gchar* endptr = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gint64 _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	g_return_val_if_fail (str != NULL, FALSE);
	_tmp0_ = str;
	_tmp2_ = g_ascii_strtoll (_tmp0_, &_tmp1_, (guint) 0);
	endptr = _tmp1_;
	_vala_result = _tmp2_;
	_tmp3_ = endptr;
	_tmp4_ = str;
	_tmp5_ = str;
	_tmp6_ = strlen (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp3_ == (((gchar*) _tmp4_) + _tmp7_)) {
		result = TRUE;
		if (_result_) {
			*_result_ = _vala_result;
		}
		return result;
	} else {
		result = FALSE;
		if (_result_) {
			*_result_ = _vala_result;
		}
		return result;
	}
	if (_result_) {
		*_result_ = _vala_result;
	}
}


static guint64 vala_gir_parser_node_parse_version_string (const gchar* version) {
	guint64 result = 0ULL;
	gint64 res = 0LL;
	gint shift = 0;
	gchar** tokens = NULL;
	const gchar* _tmp0_;
	gchar** _tmp1_;
	gchar** _tmp2_;
	gint tokens_length1;
	gint _tokens_size_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	g_return_val_if_fail (version != NULL, 0ULL);
	res = (gint64) 0;
	shift = 16;
	_tmp0_ = version;
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, ".", 3);
	tokens = _tmp2_;
	tokens_length1 = _vala_array_length (_tmp1_);
	_tokens_size_ = tokens_length1;
	_tmp3_ = tokens;
	_tmp3__length1 = tokens_length1;
	{
		gchar** token_collection = NULL;
		gint token_collection_length1 = 0;
		gint _token_collection_size_ = 0;
		gint token_it = 0;
		token_collection = _tmp3_;
		token_collection_length1 = _tmp3__length1;
		for (token_it = 0; token_it < _tmp3__length1; token_it = token_it + 1) {
			const gchar* token = NULL;
			token = token_collection[token_it];
			{
				gint64 t = 0LL;
				const gchar* _tmp4_;
				gint64 _tmp5_ = 0LL;
				gboolean _tmp6_;
				gint64 _tmp7_;
				gint64 _tmp8_;
				gint64 _tmp9_;
				gint _tmp10_;
				gint _tmp11_;
				_tmp4_ = token;
				_tmp6_ = int64_try_parse (_tmp4_, &_tmp5_);
				t = _tmp5_;
				if (!_tmp6_) {
					result = (guint64) 0;
					tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
					return result;
				}
				_tmp7_ = t;
				if (_tmp7_ > ((gint64) 0xffff)) {
					result = (guint64) 0;
					tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
					return result;
				}
				_tmp8_ = res;
				_tmp9_ = t;
				_tmp10_ = shift;
				res = _tmp8_ | (_tmp9_ << _tmp10_);
				_tmp11_ = shift;
				shift = _tmp11_ - 8;
			}
		}
	}
	result = (guint64) res;
	tokens = (_vala_array_free (tokens, tokens_length1, (GDestroyNotify) g_free), NULL);
	return result;
}


static void vala_gir_parser_node_process (ValaGirParserNode* self, ValaGirParser* parser) {
	gboolean _tmp0_;
	gboolean _tmp1_ = FALSE;
	ValaSymbol* _tmp2_;
	gboolean _tmp48_ = FALSE;
	ValaSymbol* _tmp49_;
	ValaMap* _tmp96_;
	gboolean _tmp860_ = FALSE;
	gboolean _tmp861_ = FALSE;
	gboolean _tmp862_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parser != NULL);
	_tmp0_ = self->processed;
	if (_tmp0_) {
		return;
	}
	_tmp2_ = self->symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, VALA_TYPE_NAMESPACE)) {
		ValaGirParserNode* _tmp3_;
		ValaGirParser* _tmp4_;
		ValaGirParserNode* _tmp5_;
		_tmp3_ = self->parent;
		_tmp4_ = parser;
		_tmp5_ = _tmp4_->priv->root;
		_tmp1_ = _tmp3_ == _tmp5_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		{
			ValaArrayList* _node_list = NULL;
			ValaArrayList* _tmp6_;
			ValaArrayList* _tmp7_;
			gint _node_size = 0;
			ValaArrayList* _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			gint _node_index = 0;
			_tmp6_ = self->members;
			_tmp7_ = _vala_iterable_ref0 (_tmp6_);
			_node_list = _tmp7_;
			_tmp8_ = _node_list;
			_tmp9_ = vala_collection_get_size ((ValaCollection*) _tmp8_);
			_tmp10_ = _tmp9_;
			_node_size = _tmp10_;
			_node_index = -1;
			while (TRUE) {
				gint _tmp11_;
				gint _tmp12_;
				gint _tmp13_;
				ValaGirParserNode* node = NULL;
				ValaArrayList* _tmp14_;
				gint _tmp15_;
				gpointer _tmp16_;
				ValaGirParserNode* _tmp17_;
				const gchar* _tmp18_;
				_tmp11_ = _node_index;
				_node_index = _tmp11_ + 1;
				_tmp12_ = _node_index;
				_tmp13_ = _node_size;
				if (!(_tmp12_ < _tmp13_)) {
					break;
				}
				_tmp14_ = _node_list;
				_tmp15_ = _node_index;
				_tmp16_ = vala_list_get ((ValaList*) _tmp14_, _tmp15_);
				node = (ValaGirParserNode*) _tmp16_;
				_tmp17_ = node;
				_tmp18_ = _tmp17_->element_type;
				if (g_strcmp0 (_tmp18_, "alias") == 0) {
					ValaGirParser* _tmp19_;
					ValaGirParserNode* _tmp20_;
					_tmp19_ = parser;
					_tmp20_ = node;
					vala_gir_parser_process_alias (_tmp19_, _tmp20_);
				}
				_vala_gir_parser_node_unref0 (node);
			}
			_vala_iterable_unref0 (_node_list);
		}
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp21_ = FALSE;
				_tmp21_ = TRUE;
				while (TRUE) {
					gint _tmp23_;
					ValaArrayList* _tmp24_;
					gint _tmp25_;
					gint _tmp26_;
					ValaGirParserNode* node = NULL;
					ValaArrayList* _tmp27_;
					gint _tmp28_;
					gpointer _tmp29_;
					gboolean _tmp30_ = FALSE;
					ValaGirParserNode* _tmp31_;
					ValaSymbol* _tmp32_;
					if (!_tmp21_) {
						gint _tmp22_;
						_tmp22_ = i;
						i = _tmp22_ + 1;
					}
					_tmp21_ = FALSE;
					_tmp23_ = i;
					_tmp24_ = self->members;
					_tmp25_ = vala_collection_get_size ((ValaCollection*) _tmp24_);
					_tmp26_ = _tmp25_;
					if (!(_tmp23_ < _tmp26_)) {
						break;
					}
					_tmp27_ = self->members;
					_tmp28_ = i;
					_tmp29_ = vala_list_get ((ValaList*) _tmp27_, _tmp28_);
					node = (ValaGirParserNode*) _tmp29_;
					_tmp31_ = node;
					_tmp32_ = _tmp31_->symbol;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp32_, VALA_TYPE_METHOD)) {
						ValaGirParserNode* _tmp33_;
						gboolean _tmp34_;
						_tmp33_ = node;
						_tmp34_ = _tmp33_->new_symbol;
						_tmp30_ = _tmp34_;
					} else {
						_tmp30_ = FALSE;
					}
					if (_tmp30_) {
						ValaGirParser* _tmp35_;
						ValaGirParserNode* _tmp36_;
						gboolean _tmp37_ = FALSE;
						gint _tmp38_;
						ValaArrayList* _tmp39_;
						gint _tmp40_;
						gint _tmp41_;
						_tmp35_ = parser;
						_tmp36_ = node;
						vala_gir_parser_process_namespace_method (_tmp35_, self, _tmp36_);
						_tmp38_ = i;
						_tmp39_ = self->members;
						_tmp40_ = vala_collection_get_size ((ValaCollection*) _tmp39_);
						_tmp41_ = _tmp40_;
						if (_tmp38_ < _tmp41_) {
							ValaArrayList* _tmp42_;
							gint _tmp43_;
							gpointer _tmp44_;
							ValaGirParserNode* _tmp45_;
							ValaGirParserNode* _tmp46_;
							_tmp42_ = self->members;
							_tmp43_ = i;
							_tmp44_ = vala_list_get ((ValaList*) _tmp42_, _tmp43_);
							_tmp45_ = (ValaGirParserNode*) _tmp44_;
							_tmp46_ = node;
							_tmp37_ = _tmp45_ != _tmp46_;
							_vala_gir_parser_node_unref0 (_tmp45_);
						} else {
							_tmp37_ = FALSE;
						}
						if (_tmp37_) {
							gint _tmp47_;
							_tmp47_ = i;
							i = _tmp47_ - 1;
						}
					}
					_vala_gir_parser_node_unref0 (node);
				}
			}
		}
	}
	_tmp49_ = self->symbol;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp49_, VALA_TYPE_CLASS)) {
		ValaMap* _tmp50_;
		_tmp50_ = self->girdata;
		_tmp48_ = _tmp50_ != NULL;
	} else {
		_tmp48_ = FALSE;
	}
	if (_tmp48_) {
		gchar* class_struct = NULL;
		ValaMap* _tmp51_;
		gpointer _tmp52_;
		const gchar* _tmp53_;
		_tmp51_ = self->girdata;
		_tmp52_ = vala_map_get (_tmp51_, "glib:type-struct");
		class_struct = (gchar*) _tmp52_;
		_tmp53_ = class_struct;
		if (_tmp53_ != NULL) {
			ValaGirParserNode* klass = NULL;
			ValaGirParser* _tmp54_;
			ValaGirParserNode* _tmp55_;
			ValaGirParser* _tmp56_;
			const gchar* _tmp57_;
			ValaSourceReference* _tmp58_;
			ValaUnresolvedSymbol* _tmp59_;
			ValaUnresolvedSymbol* _tmp60_;
			ValaGirParserNode* _tmp61_;
			ValaGirParserNode* _tmp62_;
			ValaGirParserNode* _tmp63_;
			_tmp54_ = parser;
			_tmp55_ = self->parent;
			_tmp56_ = parser;
			_tmp57_ = class_struct;
			_tmp58_ = self->source_reference;
			_tmp59_ = vala_gir_parser_parse_symbol_from_string (_tmp56_, _tmp57_, _tmp58_);
			_tmp60_ = _tmp59_;
			_tmp61_ = vala_gir_parser_resolve_node (_tmp54_, _tmp55_, _tmp60_, FALSE);
			_tmp62_ = _tmp61_;
			_vala_code_node_unref0 (_tmp60_);
			klass = _tmp62_;
			_tmp63_ = klass;
			if (_tmp63_ != NULL) {
				gint i = 0;
				i = 0;
				while (TRUE) {
					gint _tmp64_;
					ValaGirParserNode* _tmp65_;
					ValaArrayList* _tmp66_;
					gint _tmp67_;
					gint _tmp68_;
					ValaGirParserNode* node = NULL;
					ValaGirParserNode* _tmp69_;
					ValaArrayList* _tmp70_;
					gint _tmp71_;
					gpointer _tmp72_;
					ValaGirParserNode* _tmp73_;
					ValaSymbol* _tmp74_;
					_tmp64_ = i;
					_tmp65_ = klass;
					_tmp66_ = _tmp65_->members;
					_tmp67_ = vala_collection_get_size ((ValaCollection*) _tmp66_);
					_tmp68_ = _tmp67_;
					if (!(_tmp64_ < _tmp68_)) {
						break;
					}
					_tmp69_ = klass;
					_tmp70_ = _tmp69_->members;
					_tmp71_ = i;
					_tmp72_ = vala_list_get ((ValaList*) _tmp70_, _tmp71_);
					node = (ValaGirParserNode*) _tmp72_;
					_tmp73_ = node;
					_tmp74_ = _tmp73_->symbol;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp74_, VALA_TYPE_METHOD)) {
						ValaGirParserNode* _tmp75_;
						ValaGirParserNode* _tmp76_;
						ValaGirParserNode* _tmp77_;
						ValaMethod* m = NULL;
						ValaGirParserNode* _tmp78_;
						ValaSymbol* _tmp79_;
						ValaMethod* _tmp80_;
						ValaMethod* _tmp81_;
						_tmp75_ = klass;
						_tmp76_ = node;
						vala_gir_parser_node_remove_member (_tmp75_, _tmp76_);
						_tmp77_ = node;
						vala_gir_parser_node_add_member (self, _tmp77_);
						_tmp78_ = node;
						_tmp79_ = _tmp78_->symbol;
						_tmp80_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp79_, VALA_TYPE_METHOD, ValaMethod));
						m = _tmp80_;
						_tmp81_ = m;
						vala_method_set_binding (_tmp81_, VALA_MEMBER_BINDING_CLASS);
						_vala_code_node_unref0 (m);
					} else {
						gint _tmp82_;
						_tmp82_ = i;
						i = _tmp82_ + 1;
					}
					_vala_gir_parser_node_unref0 (node);
				}
			}
			_vala_gir_parser_node_unref0 (klass);
		}
		_g_free0 (class_struct);
	}
	{
		ValaArrayList* _node_list = NULL;
		ValaArrayList* _tmp83_;
		ValaArrayList* _tmp84_;
		gint _node_size = 0;
		ValaArrayList* _tmp85_;
		gint _tmp86_;
		gint _tmp87_;
		gint _node_index = 0;
		_tmp83_ = self->members;
		_tmp84_ = _vala_iterable_ref0 (_tmp83_);
		_node_list = _tmp84_;
		_tmp85_ = _node_list;
		_tmp86_ = vala_collection_get_size ((ValaCollection*) _tmp85_);
		_tmp87_ = _tmp86_;
		_node_size = _tmp87_;
		_node_index = -1;
		while (TRUE) {
			gint _tmp88_;
			gint _tmp89_;
			gint _tmp90_;
			ValaGirParserNode* node = NULL;
			ValaArrayList* _tmp91_;
			gint _tmp92_;
			gpointer _tmp93_;
			ValaGirParserNode* _tmp94_;
			ValaGirParser* _tmp95_;
			_tmp88_ = _node_index;
			_node_index = _tmp88_ + 1;
			_tmp89_ = _node_index;
			_tmp90_ = _node_size;
			if (!(_tmp89_ < _tmp90_)) {
				break;
			}
			_tmp91_ = _node_list;
			_tmp92_ = _node_index;
			_tmp93_ = vala_list_get ((ValaList*) _tmp91_, _tmp92_);
			node = (ValaGirParserNode*) _tmp93_;
			_tmp94_ = node;
			_tmp95_ = parser;
			vala_gir_parser_node_process (_tmp94_, _tmp95_);
			_vala_gir_parser_node_unref0 (node);
		}
		_vala_iterable_unref0 (_node_list);
	}
	_tmp96_ = self->girdata;
	if (_tmp96_ != NULL) {
		ValaSymbol* _tmp97_;
		ValaGirParserMetadata* _tmp761_;
		gboolean _tmp762_;
		ValaGirParserMetadata* _tmp765_;
		gboolean _tmp766_;
		ValaGirParserMetadata* _tmp775_;
		gboolean _tmp776_;
		const gchar* _tmp784_;
		ValaGirParserMetadata* _tmp787_;
		gboolean _tmp788_;
		ValaGirParserMetadata* _tmp792_;
		gboolean _tmp793_;
		ValaGirParserNode* _tmp811_;
		ValaSymbol* _tmp812_;
		gchar* _tmp822_;
		gchar* _tmp823_;
		gchar* _tmp824_;
		gchar* _tmp825_;
		gboolean _tmp826_;
		gchar* _tmp830_;
		gchar* _tmp831_;
		gchar* _tmp832_;
		gchar* _tmp833_;
		gboolean _tmp834_;
		gchar* _tmp838_;
		gchar* _tmp839_;
		gchar* _tmp840_;
		gchar* _tmp841_;
		gboolean _tmp842_;
		gchar* gir_name = NULL;
		gchar* _tmp846_;
		gchar* default_gir_name = NULL;
		gchar* _tmp847_;
		gboolean _tmp848_ = FALSE;
		gboolean _tmp849_ = FALSE;
		ValaSymbol* _tmp850_;
		gboolean _tmp851_;
		_tmp97_ = self->symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp97_, VALA_TYPE_METHOD)) {
			ValaMethod* m = NULL;
			ValaSymbol* _tmp98_;
			ValaMethod* _tmp99_;
			ValaGirParser* _tmp100_;
			ValaArrayList* colliding = NULL;
			ValaGirParserNode* _tmp101_;
			const gchar* _tmp102_;
			ValaArrayList* _tmp103_;
			ValaMethod* _tmp203_;
			ValaMethod* _tmp227_;
			gboolean _tmp228_;
			gboolean _tmp229_;
			_tmp98_ = self->symbol;
			_tmp99_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp98_, VALA_TYPE_METHOD, ValaMethod));
			m = _tmp99_;
			_tmp100_ = parser;
			vala_gir_parser_process_callable (_tmp100_, self);
			_tmp101_ = self->parent;
			_tmp102_ = self->name;
			_tmp103_ = vala_gir_parser_node_lookup_all (_tmp101_, _tmp102_);
			colliding = _tmp103_;
			{
				ValaArrayList* _node_list = NULL;
				ValaArrayList* _tmp104_;
				ValaArrayList* _tmp105_;
				gint _node_size = 0;
				ValaArrayList* _tmp106_;
				gint _tmp107_;
				gint _tmp108_;
				gint _node_index = 0;
				_tmp104_ = colliding;
				_tmp105_ = _vala_iterable_ref0 (_tmp104_);
				_node_list = _tmp105_;
				_tmp106_ = _node_list;
				_tmp107_ = vala_collection_get_size ((ValaCollection*) _tmp106_);
				_tmp108_ = _tmp107_;
				_node_size = _tmp108_;
				_node_index = -1;
				while (TRUE) {
					gint _tmp109_;
					gint _tmp110_;
					gint _tmp111_;
					ValaGirParserNode* node = NULL;
					ValaArrayList* _tmp112_;
					gint _tmp113_;
					gpointer _tmp114_;
					ValaSymbol* sym = NULL;
					ValaGirParserNode* _tmp115_;
					ValaSymbol* _tmp116_;
					ValaSymbol* _tmp117_;
					gboolean _tmp118_ = FALSE;
					gboolean _tmp119_ = FALSE;
					ValaSymbol* _tmp120_;
					_tmp109_ = _node_index;
					_node_index = _tmp109_ + 1;
					_tmp110_ = _node_index;
					_tmp111_ = _node_size;
					if (!(_tmp110_ < _tmp111_)) {
						break;
					}
					_tmp112_ = _node_list;
					_tmp113_ = _node_index;
					_tmp114_ = vala_list_get ((ValaList*) _tmp112_, _tmp113_);
					node = (ValaGirParserNode*) _tmp114_;
					_tmp115_ = node;
					_tmp116_ = _tmp115_->symbol;
					_tmp117_ = _vala_code_node_ref0 (_tmp116_);
					sym = _tmp117_;
					_tmp120_ = sym;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp120_, VALA_TYPE_FIELD)) {
						ValaMethod* _tmp121_;
						ValaDataType* _tmp122_;
						ValaDataType* _tmp123_;
						_tmp121_ = m;
						_tmp122_ = vala_callable_get_return_type ((ValaCallable*) _tmp121_);
						_tmp123_ = _tmp122_;
						_tmp119_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp123_, VALA_TYPE_VOID_TYPE);
					} else {
						_tmp119_ = FALSE;
					}
					if (_tmp119_) {
						ValaMethod* _tmp124_;
						ValaList* _tmp125_;
						ValaList* _tmp126_;
						gint _tmp127_;
						gint _tmp128_;
						_tmp124_ = m;
						_tmp125_ = vala_callable_get_parameters ((ValaCallable*) _tmp124_);
						_tmp126_ = _tmp125_;
						_tmp127_ = vala_collection_get_size ((ValaCollection*) _tmp126_);
						_tmp128_ = _tmp127_;
						_tmp118_ = _tmp128_ == 0;
						_vala_iterable_unref0 (_tmp126_);
					} else {
						_tmp118_ = FALSE;
					}
					if (_tmp118_) {
						self->merged = TRUE;
					} else {
						ValaSymbol* _tmp129_;
						_tmp129_ = sym;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp129_, VALA_TYPE_SIGNAL)) {
							ValaGirParserNode* _tmp130_;
							ValaGirParser* _tmp131_;
							ValaSignal* sig = NULL;
							ValaSymbol* _tmp132_;
							ValaSignal* _tmp133_;
							gboolean _tmp134_ = FALSE;
							ValaMethod* _tmp135_;
							gboolean _tmp136_;
							gboolean _tmp137_;
							ValaGirParser* _tmp143_;
							ValaSignal* _tmp144_;
							ValaMethod* _tmp145_;
							ValaMethod* _tmp146_;
							ValaList* _tmp147_;
							ValaList* _tmp148_;
							gint _tmp149_;
							gint _tmp150_;
							ValaSignal* _tmp151_;
							ValaList* _tmp152_;
							ValaList* _tmp153_;
							gint _tmp154_;
							gint _tmp155_;
							gboolean _tmp156_;
							_tmp130_ = node;
							_tmp131_ = parser;
							vala_gir_parser_node_process (_tmp130_, _tmp131_);
							_tmp132_ = sym;
							_tmp133_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp132_, VALA_TYPE_SIGNAL, ValaSignal));
							sig = _tmp133_;
							_tmp135_ = m;
							_tmp136_ = vala_method_get_is_virtual (_tmp135_);
							_tmp137_ = _tmp136_;
							if (_tmp137_) {
								_tmp134_ = TRUE;
							} else {
								ValaMethod* _tmp138_;
								gboolean _tmp139_;
								gboolean _tmp140_;
								_tmp138_ = m;
								_tmp139_ = vala_method_get_is_abstract (_tmp138_);
								_tmp140_ = _tmp139_;
								_tmp134_ = _tmp140_;
							}
							if (_tmp134_) {
								ValaSignal* _tmp141_;
								_tmp141_ = sig;
								vala_signal_set_is_virtual (_tmp141_, TRUE);
							} else {
								ValaSignal* _tmp142_;
								_tmp142_ = sig;
								vala_code_node_set_attribute ((ValaCodeNode*) _tmp142_, "HasEmitter", TRUE, NULL);
							}
							_tmp143_ = parser;
							_tmp144_ = sig;
							_tmp145_ = m;
							vala_gir_parser_assume_parameter_names (_tmp143_, _tmp144_, (ValaSymbol*) _tmp145_, FALSE);
							_tmp146_ = m;
							_tmp147_ = vala_callable_get_parameters ((ValaCallable*) _tmp146_);
							_tmp148_ = _tmp147_;
							_tmp149_ = vala_collection_get_size ((ValaCollection*) _tmp148_);
							_tmp150_ = _tmp149_;
							_tmp151_ = sig;
							_tmp152_ = vala_callable_get_parameters ((ValaCallable*) _tmp151_);
							_tmp153_ = _tmp152_;
							_tmp154_ = vala_collection_get_size ((ValaCollection*) _tmp153_);
							_tmp155_ = _tmp154_;
							_tmp156_ = _tmp150_ != _tmp155_;
							_vala_iterable_unref0 (_tmp153_);
							_vala_iterable_unref0 (_tmp148_);
							if (_tmp156_) {
								ValaSymbol* _tmp157_;
								ValaSourceReference* _tmp158_;
								ValaSourceReference* _tmp159_;
								gchar* _tmp160_;
								gchar* _tmp161_;
								gchar* _tmp162_;
								gchar* _tmp163_;
								_tmp157_ = self->symbol;
								_tmp158_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp157_);
								_tmp159_ = _tmp158_;
								_tmp160_ = vala_gir_parser_node_get_full_name (self);
								_tmp161_ = _tmp160_;
								_tmp162_ = g_strdup_printf ("Signal `%s' conflicts with method of the same name", _tmp161_);
								_tmp163_ = _tmp162_;
								vala_report_warning (_tmp159_, _tmp163_);
								_g_free0 (_tmp163_);
								_g_free0 (_tmp161_);
							}
							self->merged = TRUE;
							_vala_code_node_unref0 (sig);
						} else {
							gboolean _tmp164_ = FALSE;
							gboolean _tmp165_ = FALSE;
							ValaSymbol* _tmp166_;
							_tmp166_ = sym;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp166_, VALA_TYPE_METHOD)) {
								ValaSymbol* _tmp167_;
								_tmp167_ = sym;
								_tmp165_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp167_, VALA_TYPE_CREATION_METHOD);
							} else {
								_tmp165_ = FALSE;
							}
							if (_tmp165_) {
								ValaGirParserNode* _tmp168_;
								_tmp168_ = node;
								_tmp164_ = _tmp168_ != self;
							} else {
								_tmp164_ = FALSE;
							}
							if (_tmp164_) {
								gboolean _tmp169_ = FALSE;
								ValaMethod* _tmp170_;
								gboolean _tmp171_;
								gboolean _tmp172_;
								_tmp170_ = m;
								_tmp171_ = vala_method_get_is_virtual (_tmp170_);
								_tmp172_ = _tmp171_;
								if (_tmp172_) {
									_tmp169_ = TRUE;
								} else {
									ValaMethod* _tmp173_;
									gboolean _tmp174_;
									gboolean _tmp175_;
									_tmp173_ = m;
									_tmp174_ = vala_method_get_is_abstract (_tmp173_);
									_tmp175_ = _tmp174_;
									_tmp169_ = _tmp175_;
								}
								if (_tmp169_) {
									gboolean different_invoker = FALSE;
									ValaAttribute* attr = NULL;
									ValaMethod* _tmp176_;
									ValaAttribute* _tmp177_;
									ValaAttribute* _tmp178_;
									gboolean _tmp193_;
									different_invoker = FALSE;
									_tmp176_ = m;
									_tmp177_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp176_, "NoWrapper");
									attr = _tmp177_;
									_tmp178_ = attr;
									if (_tmp178_ != NULL) {
										ValaGirParserNode* invoker = NULL;
										ValaGirParser* _tmp179_;
										ValaGirParserNode* _tmp180_;
										ValaGirParserNode* _tmp181_;
										_tmp179_ = parser;
										_tmp180_ = vala_gir_parser_find_invoker (_tmp179_, self);
										invoker = _tmp180_;
										_tmp181_ = invoker;
										if (_tmp181_ != NULL) {
											ValaMethod* _tmp182_;
											ValaMethod* _tmp183_;
											const gchar* _tmp184_;
											const gchar* _tmp185_;
											ValaMethod* _tmp186_;
											ValaGirParserNode* _tmp187_;
											ValaSymbol* _tmp188_;
											const gchar* _tmp189_;
											const gchar* _tmp190_;
											ValaMethod* _tmp191_;
											ValaGirParserNode* _tmp192_;
											_tmp182_ = m;
											_tmp183_ = m;
											_tmp184_ = vala_symbol_get_name ((ValaSymbol*) _tmp183_);
											_tmp185_ = _tmp184_;
											vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp182_, "CCode", "vfunc_name", _tmp185_, NULL);
											_tmp186_ = m;
											_tmp187_ = invoker;
											_tmp188_ = _tmp187_->symbol;
											_tmp189_ = vala_symbol_get_name (_tmp188_);
											_tmp190_ = _tmp189_;
											vala_symbol_set_name ((ValaSymbol*) _tmp186_, _tmp190_);
											_tmp191_ = m;
											vala_code_node_set_attribute ((ValaCodeNode*) _tmp191_, "NoWrapper", FALSE, NULL);
											_tmp192_ = invoker;
											_tmp192_->merged = TRUE;
											different_invoker = TRUE;
										}
										_vala_gir_parser_node_unref0 (invoker);
									}
									_tmp193_ = different_invoker;
									if (!_tmp193_) {
										ValaAttribute* _tmp194_;
										ValaGirParserNode* _tmp202_;
										_tmp194_ = attr;
										if (_tmp194_ != NULL) {
											ValaSymbol* _tmp195_;
											ValaSourceReference* _tmp196_;
											ValaSourceReference* _tmp197_;
											gchar* _tmp198_;
											gchar* _tmp199_;
											gchar* _tmp200_;
											gchar* _tmp201_;
											_tmp195_ = self->symbol;
											_tmp196_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp195_);
											_tmp197_ = _tmp196_;
											_tmp198_ = vala_gir_parser_node_get_full_name (self);
											_tmp199_ = _tmp198_;
											_tmp200_ = g_strdup_printf ("Virtual method `%s' conflicts with method of the same name", _tmp199_);
											_tmp201_ = _tmp200_;
											vala_report_warning (_tmp197_, _tmp201_);
											_g_free0 (_tmp201_);
											_g_free0 (_tmp199_);
										}
										_tmp202_ = node;
										_tmp202_->merged = TRUE;
									}
									_vala_code_node_unref0 (attr);
								}
							}
						}
					}
					_vala_code_node_unref0 (sym);
					_vala_gir_parser_node_unref0 (node);
				}
				_vala_iterable_unref0 (_node_list);
			}
			_tmp203_ = m;
			if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp203_, VALA_TYPE_CREATION_METHOD)) {
				ValaGirParserMetadata* _tmp204_;
				gboolean _tmp205_;
				ValaGirParserMetadata* _tmp209_;
				gboolean _tmp210_;
				ValaGirParserMetadata* _tmp214_;
				gboolean _tmp215_;
				_tmp204_ = self->metadata;
				_tmp205_ = vala_gir_parser_metadata_has_argument (_tmp204_, VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROYS_INSTANCE);
				if (_tmp205_) {
					ValaMethod* _tmp206_;
					ValaGirParserMetadata* _tmp207_;
					gboolean _tmp208_;
					_tmp206_ = m;
					_tmp207_ = self->metadata;
					_tmp208_ = vala_gir_parser_metadata_get_bool (_tmp207_, VALA_GIR_PARSER_ARGUMENT_TYPE_DESTROYS_INSTANCE, FALSE);
					vala_code_node_set_attribute ((ValaCodeNode*) _tmp206_, "DestroysInstance", _tmp208_, NULL);
				}
				_tmp209_ = self->metadata;
				_tmp210_ = vala_gir_parser_metadata_has_argument (_tmp209_, VALA_GIR_PARSER_ARGUMENT_TYPE_RETURNS_MODIFIED_POINTER);
				if (_tmp210_) {
					ValaMethod* _tmp211_;
					ValaGirParserMetadata* _tmp212_;
					gboolean _tmp213_;
					_tmp211_ = m;
					_tmp212_ = self->metadata;
					_tmp213_ = vala_gir_parser_metadata_get_bool (_tmp212_, VALA_GIR_PARSER_ARGUMENT_TYPE_RETURNS_MODIFIED_POINTER, FALSE);
					vala_code_node_set_attribute ((ValaCodeNode*) _tmp211_, "ReturnsModifiedPointer", _tmp213_, NULL);
				}
				_tmp214_ = self->metadata;
				_tmp215_ = vala_gir_parser_metadata_has_argument (_tmp214_, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
				if (_tmp215_) {
					ValaGirParserNode* vfunc = NULL;
					ValaGirParserNode* _tmp216_;
					ValaGirParserMetadata* _tmp217_;
					gchar* _tmp218_;
					gchar* _tmp219_;
					ValaGirParserNode* _tmp220_;
					ValaGirParserNode* _tmp221_;
					gboolean _tmp222_ = FALSE;
					ValaGirParserNode* _tmp223_;
					_tmp216_ = self->parent;
					_tmp217_ = self->metadata;
					_tmp218_ = vala_gir_parser_metadata_get_string (_tmp217_, VALA_GIR_PARSER_ARGUMENT_TYPE_VFUNC_NAME);
					_tmp219_ = _tmp218_;
					_tmp220_ = vala_gir_parser_node_lookup (_tmp216_, _tmp219_, FALSE, NULL);
					_tmp221_ = _tmp220_;
					_g_free0 (_tmp219_);
					vfunc = _tmp221_;
					_tmp223_ = vfunc;
					if (_tmp223_ != NULL) {
						ValaGirParserNode* _tmp224_;
						_tmp224_ = vfunc;
						_tmp222_ = _tmp224_ != self;
					} else {
						_tmp222_ = FALSE;
					}
					if (_tmp222_) {
						ValaGirParserNode* _tmp225_;
						ValaGirParserNode* _tmp226_;
						_tmp225_ = vfunc;
						_tmp225_->processed = TRUE;
						_tmp226_ = vfunc;
						_tmp226_->merged = TRUE;
					}
					_vala_gir_parser_node_unref0 (vfunc);
				}
			}
			_tmp227_ = m;
			_tmp228_ = vala_method_get_coroutine (_tmp227_);
			_tmp229_ = _tmp228_;
			if (_tmp229_) {
				ValaGirParser* _tmp230_;
				_tmp230_ = parser;
				vala_gir_parser_process_async_method (_tmp230_, self);
			}
			_vala_iterable_unref0 (colliding);
			_vala_code_node_unref0 (m);
		} else {
			ValaSymbol* _tmp231_;
			_tmp231_ = self->symbol;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp231_, VALA_TYPE_PROPERTY)) {
				ValaArrayList* colliding = NULL;
				ValaGirParserNode* _tmp232_;
				const gchar* _tmp233_;
				ValaArrayList* _tmp234_;
				ValaProperty* prop = NULL;
				ValaSymbol* _tmp253_;
				ValaProperty* _tmp254_;
				gchar* readable = NULL;
				ValaMap* _tmp255_;
				gpointer _tmp256_;
				gchar* writable = NULL;
				ValaMap* _tmp257_;
				gpointer _tmp258_;
				gchar* construct_ = NULL;
				ValaMap* _tmp259_;
				gpointer _tmp260_;
				gchar* construct_only = NULL;
				ValaMap* _tmp261_;
				gpointer _tmp262_;
				const gchar* _tmp263_;
				gboolean _tmp272_ = FALSE;
				const gchar* _tmp273_;
				ValaGirParserNode* getter = NULL;
				ValaArrayList* getters = NULL;
				ValaGirParserNode* _tmp289_;
				const gchar* _tmp290_;
				gchar* _tmp291_;
				gchar* _tmp292_;
				ValaArrayList* _tmp293_;
				ValaArrayList* _tmp294_;
				ValaArrayList* _tmp295_;
				ValaGirParserNode* setter = NULL;
				ValaArrayList* setters = NULL;
				ValaGirParserNode* _tmp323_;
				const gchar* _tmp324_;
				gchar* _tmp325_;
				gchar* _tmp326_;
				ValaArrayList* _tmp327_;
				ValaArrayList* _tmp328_;
				ValaArrayList* _tmp329_;
				gboolean _tmp357_ = FALSE;
				const gchar* _tmp358_;
				ValaProperty* _tmp360_;
				ValaProperty* _tmp361_;
				ValaPropertyAccessor* _tmp362_;
				ValaPropertyAccessor* _tmp363_;
				gboolean _tmp428_ = FALSE;
				gboolean _tmp429_ = FALSE;
				ValaProperty* _tmp430_;
				ValaAttribute* _tmp431_;
				ValaAttribute* _tmp432_;
				gboolean _tmp433_;
				ValaProperty* _tmp505_;
				ValaAttribute* _tmp506_;
				ValaAttribute* _tmp507_;
				gboolean _tmp508_;
				ValaProperty* _tmp558_;
				ValaAttribute* _tmp559_;
				ValaAttribute* _tmp560_;
				gboolean _tmp561_;
				_tmp232_ = self->parent;
				_tmp233_ = self->name;
				_tmp234_ = vala_gir_parser_node_lookup_all (_tmp232_, _tmp233_);
				colliding = _tmp234_;
				{
					ValaArrayList* _node_list = NULL;
					ValaArrayList* _tmp235_;
					ValaArrayList* _tmp236_;
					gint _node_size = 0;
					ValaArrayList* _tmp237_;
					gint _tmp238_;
					gint _tmp239_;
					gint _node_index = 0;
					_tmp235_ = colliding;
					_tmp236_ = _vala_iterable_ref0 (_tmp235_);
					_node_list = _tmp236_;
					_tmp237_ = _node_list;
					_tmp238_ = vala_collection_get_size ((ValaCollection*) _tmp237_);
					_tmp239_ = _tmp238_;
					_node_size = _tmp239_;
					_node_index = -1;
					while (TRUE) {
						gint _tmp240_;
						gint _tmp241_;
						gint _tmp242_;
						ValaGirParserNode* node = NULL;
						ValaArrayList* _tmp243_;
						gint _tmp244_;
						gpointer _tmp245_;
						ValaGirParserNode* _tmp246_;
						ValaSymbol* _tmp247_;
						_tmp240_ = _node_index;
						_node_index = _tmp240_ + 1;
						_tmp241_ = _node_index;
						_tmp242_ = _node_size;
						if (!(_tmp241_ < _tmp242_)) {
							break;
						}
						_tmp243_ = _node_list;
						_tmp244_ = _node_index;
						_tmp245_ = vala_list_get ((ValaList*) _tmp243_, _tmp244_);
						node = (ValaGirParserNode*) _tmp245_;
						_tmp246_ = node;
						_tmp247_ = _tmp246_->symbol;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp247_, VALA_TYPE_SIGNAL)) {
							ValaGirParserNode* _tmp248_;
							ValaGirParserNode* _tmp249_;
							_tmp248_ = node;
							_tmp248_->processed = TRUE;
							_tmp249_ = node;
							_tmp249_->merged = TRUE;
						} else {
							ValaGirParserNode* _tmp250_;
							ValaSymbol* _tmp251_;
							_tmp250_ = node;
							_tmp251_ = _tmp250_->symbol;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp251_, VALA_TYPE_METHOD)) {
								ValaGirParserNode* _tmp252_;
								_tmp252_ = node;
								_tmp252_->merged = TRUE;
							}
						}
						_vala_gir_parser_node_unref0 (node);
					}
					_vala_iterable_unref0 (_node_list);
				}
				_tmp253_ = self->symbol;
				_tmp254_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp253_, VALA_TYPE_PROPERTY, ValaProperty));
				prop = _tmp254_;
				_tmp255_ = self->girdata;
				_tmp256_ = vala_map_get (_tmp255_, "readable");
				readable = (gchar*) _tmp256_;
				_tmp257_ = self->girdata;
				_tmp258_ = vala_map_get (_tmp257_, "writable");
				writable = (gchar*) _tmp258_;
				_tmp259_ = self->girdata;
				_tmp260_ = vala_map_get (_tmp259_, "construct");
				construct_ = (gchar*) _tmp260_;
				_tmp261_ = self->girdata;
				_tmp262_ = vala_map_get (_tmp261_, "construct-only");
				construct_only = (gchar*) _tmp262_;
				_tmp263_ = readable;
				if (g_strcmp0 (_tmp263_, "0") != 0) {
					ValaProperty* _tmp264_;
					ValaProperty* _tmp265_;
					ValaDataType* _tmp266_;
					ValaDataType* _tmp267_;
					ValaDataType* _tmp268_;
					ValaDataType* _tmp269_;
					ValaPropertyAccessor* _tmp270_;
					ValaPropertyAccessor* _tmp271_;
					_tmp264_ = prop;
					_tmp265_ = prop;
					_tmp266_ = vala_property_get_property_type (_tmp265_);
					_tmp267_ = _tmp266_;
					_tmp268_ = vala_data_type_copy (_tmp267_);
					_tmp269_ = _tmp268_;
					_tmp270_ = vala_property_accessor_new (TRUE, FALSE, FALSE, _tmp269_, NULL, NULL, NULL);
					_tmp271_ = _tmp270_;
					vala_property_set_get_accessor (_tmp264_, _tmp271_);
					_vala_code_node_unref0 (_tmp271_);
					_vala_code_node_unref0 (_tmp269_);
				}
				_tmp273_ = writable;
				if (g_strcmp0 (_tmp273_, "1") == 0) {
					_tmp272_ = TRUE;
				} else {
					const gchar* _tmp274_;
					_tmp274_ = construct_only;
					_tmp272_ = g_strcmp0 (_tmp274_, "1") == 0;
				}
				if (_tmp272_) {
					gboolean _tmp275_ = FALSE;
					const gchar* _tmp276_;
					gboolean _tmp278_ = FALSE;
					const gchar* _tmp279_;
					ValaProperty* _tmp281_;
					ValaProperty* _tmp282_;
					ValaDataType* _tmp283_;
					ValaDataType* _tmp284_;
					ValaDataType* _tmp285_;
					ValaDataType* _tmp286_;
					ValaPropertyAccessor* _tmp287_;
					ValaPropertyAccessor* _tmp288_;
					_tmp276_ = construct_only;
					if (g_strcmp0 (_tmp276_, "1") != 0) {
						const gchar* _tmp277_;
						_tmp277_ = writable;
						_tmp275_ = g_strcmp0 (_tmp277_, "1") == 0;
					} else {
						_tmp275_ = FALSE;
					}
					_tmp279_ = construct_only;
					if (g_strcmp0 (_tmp279_, "1") == 0) {
						_tmp278_ = TRUE;
					} else {
						const gchar* _tmp280_;
						_tmp280_ = construct_;
						_tmp278_ = g_strcmp0 (_tmp280_, "1") == 0;
					}
					_tmp281_ = prop;
					_tmp282_ = prop;
					_tmp283_ = vala_property_get_property_type (_tmp282_);
					_tmp284_ = _tmp283_;
					_tmp285_ = vala_data_type_copy (_tmp284_);
					_tmp286_ = _tmp285_;
					_tmp287_ = vala_property_accessor_new (FALSE, _tmp275_, _tmp278_, _tmp286_, NULL, NULL, NULL);
					_tmp288_ = _tmp287_;
					vala_property_set_set_accessor (_tmp281_, _tmp288_);
					_vala_code_node_unref0 (_tmp288_);
					_vala_code_node_unref0 (_tmp286_);
				}
				getter = NULL;
				_tmp289_ = self->parent;
				_tmp290_ = self->name;
				_tmp291_ = g_strdup_printf ("get_%s", _tmp290_);
				_tmp292_ = _tmp291_;
				_tmp293_ = vala_gir_parser_node_lookup_all (_tmp289_, _tmp292_);
				_tmp294_ = _tmp293_;
				_g_free0 (_tmp292_);
				getters = _tmp294_;
				_tmp295_ = getters;
				if (_tmp295_ != NULL) {
					{
						ValaArrayList* _g_list = NULL;
						ValaArrayList* _tmp296_;
						ValaArrayList* _tmp297_;
						gint _g_size = 0;
						ValaArrayList* _tmp298_;
						gint _tmp299_;
						gint _tmp300_;
						gint _g_index = 0;
						_tmp296_ = getters;
						_tmp297_ = _vala_iterable_ref0 (_tmp296_);
						_g_list = _tmp297_;
						_tmp298_ = _g_list;
						_tmp299_ = vala_collection_get_size ((ValaCollection*) _tmp298_);
						_tmp300_ = _tmp299_;
						_g_size = _tmp300_;
						_g_index = -1;
						while (TRUE) {
							gint _tmp301_;
							gint _tmp302_;
							gint _tmp303_;
							ValaGirParserNode* g = NULL;
							ValaArrayList* _tmp304_;
							gint _tmp305_;
							gpointer _tmp306_;
							gboolean _tmp307_ = FALSE;
							gboolean _tmp308_ = FALSE;
							ValaGirParserNode* _tmp309_;
							_tmp301_ = _g_index;
							_g_index = _tmp301_ + 1;
							_tmp302_ = _g_index;
							_tmp303_ = _g_size;
							if (!(_tmp302_ < _tmp303_)) {
								break;
							}
							_tmp304_ = _g_list;
							_tmp305_ = _g_index;
							_tmp306_ = vala_list_get ((ValaList*) _tmp304_, _tmp305_);
							g = (ValaGirParserNode*) _tmp306_;
							_tmp309_ = getter;
							if (_tmp309_ == NULL) {
								_tmp308_ = TRUE;
							} else {
								ValaGirParserNode* _tmp310_;
								gboolean _tmp311_;
								_tmp310_ = g;
								_tmp311_ = _tmp310_->merged;
								_tmp308_ = !_tmp311_;
							}
							if (_tmp308_) {
								ValaGirParserNode* _tmp312_;
								gchar* _tmp313_;
								gchar* _tmp314_;
								ValaGirParserNode* _tmp315_;
								gchar* _tmp316_;
								gchar* _tmp317_;
								const gchar* _tmp318_;
								gchar* _tmp319_;
								gchar* _tmp320_;
								_tmp312_ = g;
								_tmp313_ = vala_gir_parser_node_get_cname (_tmp312_);
								_tmp314_ = _tmp313_;
								_tmp315_ = self->parent;
								_tmp316_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp315_);
								_tmp317_ = _tmp316_;
								_tmp318_ = self->name;
								_tmp319_ = g_strdup_printf ("%sget_%s", _tmp317_, _tmp318_);
								_tmp320_ = _tmp319_;
								_tmp307_ = g_strcmp0 (_tmp314_, _tmp320_) == 0;
								_g_free0 (_tmp320_);
								_g_free0 (_tmp317_);
								_g_free0 (_tmp314_);
							} else {
								_tmp307_ = FALSE;
							}
							if (_tmp307_) {
								ValaGirParserNode* _tmp321_;
								ValaGirParserNode* _tmp322_;
								_tmp321_ = g;
								_tmp322_ = _vala_gir_parser_node_ref0 (_tmp321_);
								_vala_gir_parser_node_unref0 (getter);
								getter = _tmp322_;
							}
							_vala_gir_parser_node_unref0 (g);
						}
						_vala_iterable_unref0 (_g_list);
					}
				}
				setter = NULL;
				_tmp323_ = self->parent;
				_tmp324_ = self->name;
				_tmp325_ = g_strdup_printf ("set_%s", _tmp324_);
				_tmp326_ = _tmp325_;
				_tmp327_ = vala_gir_parser_node_lookup_all (_tmp323_, _tmp326_);
				_tmp328_ = _tmp327_;
				_g_free0 (_tmp326_);
				setters = _tmp328_;
				_tmp329_ = setters;
				if (_tmp329_ != NULL) {
					{
						ValaArrayList* _s_list = NULL;
						ValaArrayList* _tmp330_;
						ValaArrayList* _tmp331_;
						gint _s_size = 0;
						ValaArrayList* _tmp332_;
						gint _tmp333_;
						gint _tmp334_;
						gint _s_index = 0;
						_tmp330_ = setters;
						_tmp331_ = _vala_iterable_ref0 (_tmp330_);
						_s_list = _tmp331_;
						_tmp332_ = _s_list;
						_tmp333_ = vala_collection_get_size ((ValaCollection*) _tmp332_);
						_tmp334_ = _tmp333_;
						_s_size = _tmp334_;
						_s_index = -1;
						while (TRUE) {
							gint _tmp335_;
							gint _tmp336_;
							gint _tmp337_;
							ValaGirParserNode* s = NULL;
							ValaArrayList* _tmp338_;
							gint _tmp339_;
							gpointer _tmp340_;
							gboolean _tmp341_ = FALSE;
							gboolean _tmp342_ = FALSE;
							ValaGirParserNode* _tmp343_;
							_tmp335_ = _s_index;
							_s_index = _tmp335_ + 1;
							_tmp336_ = _s_index;
							_tmp337_ = _s_size;
							if (!(_tmp336_ < _tmp337_)) {
								break;
							}
							_tmp338_ = _s_list;
							_tmp339_ = _s_index;
							_tmp340_ = vala_list_get ((ValaList*) _tmp338_, _tmp339_);
							s = (ValaGirParserNode*) _tmp340_;
							_tmp343_ = setter;
							if (_tmp343_ == NULL) {
								_tmp342_ = TRUE;
							} else {
								ValaGirParserNode* _tmp344_;
								gboolean _tmp345_;
								_tmp344_ = s;
								_tmp345_ = _tmp344_->merged;
								_tmp342_ = !_tmp345_;
							}
							if (_tmp342_) {
								ValaGirParserNode* _tmp346_;
								gchar* _tmp347_;
								gchar* _tmp348_;
								ValaGirParserNode* _tmp349_;
								gchar* _tmp350_;
								gchar* _tmp351_;
								const gchar* _tmp352_;
								gchar* _tmp353_;
								gchar* _tmp354_;
								_tmp346_ = s;
								_tmp347_ = vala_gir_parser_node_get_cname (_tmp346_);
								_tmp348_ = _tmp347_;
								_tmp349_ = self->parent;
								_tmp350_ = vala_gir_parser_node_get_lower_case_cprefix (_tmp349_);
								_tmp351_ = _tmp350_;
								_tmp352_ = self->name;
								_tmp353_ = g_strdup_printf ("%sset_%s", _tmp351_, _tmp352_);
								_tmp354_ = _tmp353_;
								_tmp341_ = g_strcmp0 (_tmp348_, _tmp354_) == 0;
								_g_free0 (_tmp354_);
								_g_free0 (_tmp351_);
								_g_free0 (_tmp348_);
							} else {
								_tmp341_ = FALSE;
							}
							if (_tmp341_) {
								ValaGirParserNode* _tmp355_;
								ValaGirParserNode* _tmp356_;
								_tmp355_ = s;
								_tmp356_ = _vala_gir_parser_node_ref0 (_tmp355_);
								_vala_gir_parser_node_unref0 (setter);
								setter = _tmp356_;
							}
							_vala_gir_parser_node_unref0 (s);
						}
						_vala_iterable_unref0 (_s_list);
					}
				}
				_tmp358_ = readable;
				if (g_strcmp0 (_tmp358_, "0") == 0) {
					const gchar* _tmp359_;
					_tmp359_ = construct_only;
					_tmp357_ = g_strcmp0 (_tmp359_, "1") == 0;
				} else {
					_tmp357_ = FALSE;
				}
				_tmp360_ = prop;
				vala_code_node_set_attribute ((ValaCodeNode*) _tmp360_, "NoAccessorMethod", _tmp357_, NULL);
				_tmp361_ = prop;
				_tmp362_ = vala_property_get_get_accessor (_tmp361_);
				_tmp363_ = _tmp362_;
				if (_tmp363_ != NULL) {
					ValaMethod* _tmp364_ = NULL;
					ValaGirParserNode* _tmp365_;
					ValaMethod* m = NULL;
					ValaMethod* _tmp368_;
					ValaMethod* _tmp369_;
					_tmp365_ = getter;
					if (_tmp365_ != NULL) {
						ValaGirParserNode* _tmp366_;
						ValaSymbol* _tmp367_;
						_tmp366_ = getter;
						_tmp367_ = _tmp366_->symbol;
						_tmp364_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp367_, VALA_TYPE_METHOD) ? ((ValaMethod*) _tmp367_) : NULL;
					} else {
						_tmp364_ = NULL;
					}
					_tmp368_ = _vala_code_node_ref0 (_tmp364_);
					m = _tmp368_;
					_tmp369_ = m;
					if (_tmp369_ != NULL) {
						ValaGirParserNode* _tmp370_;
						ValaGirParser* _tmp371_;
						gboolean _tmp372_ = FALSE;
						gboolean _tmp373_ = FALSE;
						ValaMethod* _tmp374_;
						ValaDataType* _tmp375_;
						ValaDataType* _tmp376_;
						_tmp370_ = getter;
						_tmp371_ = parser;
						vala_gir_parser_node_process (_tmp370_, _tmp371_);
						_tmp374_ = m;
						_tmp375_ = vala_callable_get_return_type ((ValaCallable*) _tmp374_);
						_tmp376_ = _tmp375_;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp376_, VALA_TYPE_VOID_TYPE)) {
							_tmp373_ = TRUE;
						} else {
							ValaMethod* _tmp377_;
							ValaList* _tmp378_;
							ValaList* _tmp379_;
							gint _tmp380_;
							gint _tmp381_;
							_tmp377_ = m;
							_tmp378_ = vala_callable_get_parameters ((ValaCallable*) _tmp377_);
							_tmp379_ = _tmp378_;
							_tmp380_ = vala_collection_get_size ((ValaCollection*) _tmp379_);
							_tmp381_ = _tmp380_;
							_tmp373_ = _tmp381_ != 0;
							_vala_iterable_unref0 (_tmp379_);
						}
						if (_tmp373_) {
							_tmp372_ = TRUE;
						} else {
							ValaMethod* _tmp382_;
							ValaList* _tmp383_;
							ValaList* _tmp384_;
							gint _tmp385_;
							gint _tmp386_;
							_tmp382_ = m;
							_tmp383_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp382_);
							_tmp384_ = _tmp383_;
							_tmp385_ = vala_collection_get_size ((ValaCollection*) _tmp384_);
							_tmp386_ = _tmp385_;
							_tmp372_ = _tmp386_ > 0;
							_vala_iterable_unref0 (_tmp384_);
						}
						if (_tmp372_) {
							ValaProperty* _tmp387_;
							_tmp387_ = prop;
							vala_code_node_set_attribute ((ValaCodeNode*) _tmp387_, "NoAccessorMethod", TRUE, NULL);
						} else {
							ValaGirParserNode* _tmp388_;
							const gchar* _tmp389_;
							const gchar* _tmp390_;
							ValaProperty* _tmp405_;
							ValaPropertyAccessor* _tmp406_;
							ValaPropertyAccessor* _tmp407_;
							ValaDataType* _tmp408_;
							ValaDataType* _tmp409_;
							ValaMethod* _tmp410_;
							ValaDataType* _tmp411_;
							ValaDataType* _tmp412_;
							gboolean _tmp413_;
							gboolean _tmp414_;
							gboolean _tmp415_ = FALSE;
							gboolean _tmp416_ = FALSE;
							ValaMethod* _tmp417_;
							gboolean _tmp418_;
							gboolean _tmp419_;
							_tmp388_ = getter;
							_tmp389_ = _tmp388_->name;
							_tmp390_ = self->name;
							if (g_strcmp0 (_tmp389_, _tmp390_) == 0) {
								{
									ValaArrayList* _node_list = NULL;
									ValaArrayList* _tmp391_;
									ValaArrayList* _tmp392_;
									gint _node_size = 0;
									ValaArrayList* _tmp393_;
									gint _tmp394_;
									gint _tmp395_;
									gint _node_index = 0;
									_tmp391_ = colliding;
									_tmp392_ = _vala_iterable_ref0 (_tmp391_);
									_node_list = _tmp392_;
									_tmp393_ = _node_list;
									_tmp394_ = vala_collection_get_size ((ValaCollection*) _tmp393_);
									_tmp395_ = _tmp394_;
									_node_size = _tmp395_;
									_node_index = -1;
									while (TRUE) {
										gint _tmp396_;
										gint _tmp397_;
										gint _tmp398_;
										ValaGirParserNode* node = NULL;
										ValaArrayList* _tmp399_;
										gint _tmp400_;
										gpointer _tmp401_;
										ValaGirParserNode* _tmp402_;
										ValaSymbol* _tmp403_;
										_tmp396_ = _node_index;
										_node_index = _tmp396_ + 1;
										_tmp397_ = _node_index;
										_tmp398_ = _node_size;
										if (!(_tmp397_ < _tmp398_)) {
											break;
										}
										_tmp399_ = _node_list;
										_tmp400_ = _node_index;
										_tmp401_ = vala_list_get ((ValaList*) _tmp399_, _tmp400_);
										node = (ValaGirParserNode*) _tmp401_;
										_tmp402_ = node;
										_tmp403_ = _tmp402_->symbol;
										if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp403_, VALA_TYPE_METHOD)) {
											ValaGirParserNode* _tmp404_;
											_tmp404_ = node;
											_tmp404_->merged = TRUE;
										}
										_vala_gir_parser_node_unref0 (node);
									}
									_vala_iterable_unref0 (_node_list);
								}
							}
							_tmp405_ = prop;
							_tmp406_ = vala_property_get_get_accessor (_tmp405_);
							_tmp407_ = _tmp406_;
							_tmp408_ = vala_property_accessor_get_value_type (_tmp407_);
							_tmp409_ = _tmp408_;
							_tmp410_ = m;
							_tmp411_ = vala_callable_get_return_type ((ValaCallable*) _tmp410_);
							_tmp412_ = _tmp411_;
							_tmp413_ = vala_data_type_get_value_owned (_tmp412_);
							_tmp414_ = _tmp413_;
							vala_data_type_set_value_owned (_tmp409_, _tmp414_);
							_tmp417_ = m;
							_tmp418_ = vala_method_get_is_abstract (_tmp417_);
							_tmp419_ = _tmp418_;
							if (!_tmp419_) {
								ValaMethod* _tmp420_;
								gboolean _tmp421_;
								gboolean _tmp422_;
								_tmp420_ = m;
								_tmp421_ = vala_method_get_is_virtual (_tmp420_);
								_tmp422_ = _tmp421_;
								_tmp416_ = !_tmp422_;
							} else {
								_tmp416_ = FALSE;
							}
							if (_tmp416_) {
								ValaProperty* _tmp423_;
								gboolean _tmp424_;
								gboolean _tmp425_;
								_tmp423_ = prop;
								_tmp424_ = vala_property_get_is_abstract (_tmp423_);
								_tmp425_ = _tmp424_;
								_tmp415_ = _tmp425_;
							} else {
								_tmp415_ = FALSE;
							}
							if (_tmp415_) {
								ValaProperty* _tmp426_;
								_tmp426_ = prop;
								vala_code_node_set_attribute ((ValaCodeNode*) _tmp426_, "ConcreteAccessor", TRUE, NULL);
							}
						}
					} else {
						ValaProperty* _tmp427_;
						_tmp427_ = prop;
						vala_code_node_set_attribute ((ValaCodeNode*) _tmp427_, "NoAccessorMethod", TRUE, NULL);
					}
					_vala_code_node_unref0 (m);
				}
				_tmp430_ = prop;
				_tmp431_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp430_, "NoAccessorMethod");
				_tmp432_ = _tmp431_;
				_tmp433_ = _tmp432_ == NULL;
				_vala_code_node_unref0 (_tmp432_);
				if (_tmp433_) {
					ValaProperty* _tmp434_;
					ValaPropertyAccessor* _tmp435_;
					ValaPropertyAccessor* _tmp436_;
					_tmp434_ = prop;
					_tmp435_ = vala_property_get_set_accessor (_tmp434_);
					_tmp436_ = _tmp435_;
					_tmp429_ = _tmp436_ != NULL;
				} else {
					_tmp429_ = FALSE;
				}
				if (_tmp429_) {
					ValaProperty* _tmp437_;
					ValaPropertyAccessor* _tmp438_;
					ValaPropertyAccessor* _tmp439_;
					gboolean _tmp440_;
					gboolean _tmp441_;
					_tmp437_ = prop;
					_tmp438_ = vala_property_get_set_accessor (_tmp437_);
					_tmp439_ = _tmp438_;
					_tmp440_ = vala_property_accessor_get_writable (_tmp439_);
					_tmp441_ = _tmp440_;
					_tmp428_ = _tmp441_;
				} else {
					_tmp428_ = FALSE;
				}
				if (_tmp428_) {
					ValaMethod* _tmp442_ = NULL;
					ValaGirParserNode* _tmp443_;
					ValaMethod* m = NULL;
					ValaMethod* _tmp446_;
					ValaMethod* _tmp447_;
					_tmp443_ = setter;
					if (_tmp443_ != NULL) {
						ValaGirParserNode* _tmp444_;
						ValaSymbol* _tmp445_;
						_tmp444_ = setter;
						_tmp445_ = _tmp444_->symbol;
						_tmp442_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp445_, VALA_TYPE_METHOD) ? ((ValaMethod*) _tmp445_) : NULL;
					} else {
						_tmp442_ = NULL;
					}
					_tmp446_ = _vala_code_node_ref0 (_tmp442_);
					m = _tmp446_;
					_tmp447_ = m;
					if (_tmp447_ != NULL) {
						ValaGirParserNode* _tmp448_;
						ValaGirParser* _tmp449_;
						gboolean _tmp450_ = FALSE;
						gboolean _tmp451_ = FALSE;
						gboolean _tmp452_ = FALSE;
						ValaMethod* _tmp453_;
						ValaDataType* _tmp454_;
						ValaDataType* _tmp455_;
						_tmp448_ = setter;
						_tmp449_ = parser;
						vala_gir_parser_node_process (_tmp448_, _tmp449_);
						_tmp453_ = m;
						_tmp454_ = vala_callable_get_return_type ((ValaCallable*) _tmp453_);
						_tmp455_ = _tmp454_;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp455_, VALA_TYPE_VOID_TYPE)) {
							_tmp452_ = TRUE;
						} else {
							ValaMethod* _tmp456_;
							ValaDataType* _tmp457_;
							ValaDataType* _tmp458_;
							_tmp456_ = m;
							_tmp457_ = vala_callable_get_return_type ((ValaCallable*) _tmp456_);
							_tmp458_ = _tmp457_;
							_tmp452_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp458_, VALA_TYPE_BOOLEAN_TYPE);
						}
						if (!_tmp452_) {
							_tmp451_ = TRUE;
						} else {
							ValaMethod* _tmp459_;
							ValaList* _tmp460_;
							ValaList* _tmp461_;
							gint _tmp462_;
							gint _tmp463_;
							_tmp459_ = m;
							_tmp460_ = vala_callable_get_parameters ((ValaCallable*) _tmp459_);
							_tmp461_ = _tmp460_;
							_tmp462_ = vala_collection_get_size ((ValaCollection*) _tmp461_);
							_tmp463_ = _tmp462_;
							_tmp451_ = _tmp463_ != 1;
							_vala_iterable_unref0 (_tmp461_);
						}
						if (_tmp451_) {
							_tmp450_ = TRUE;
						} else {
							ValaMethod* _tmp464_;
							ValaList* _tmp465_;
							ValaList* _tmp466_;
							gint _tmp467_;
							gint _tmp468_;
							_tmp464_ = m;
							_tmp465_ = vala_code_node_get_error_types ((ValaCodeNode*) _tmp464_);
							_tmp466_ = _tmp465_;
							_tmp467_ = vala_collection_get_size ((ValaCollection*) _tmp466_);
							_tmp468_ = _tmp467_;
							_tmp450_ = _tmp468_ > 0;
							_vala_iterable_unref0 (_tmp466_);
						}
						if (_tmp450_) {
							ValaProperty* _tmp469_;
							ValaProperty* _tmp470_;
							_tmp469_ = prop;
							vala_code_node_set_attribute ((ValaCodeNode*) _tmp469_, "NoAccessorMethod", TRUE, NULL);
							_tmp470_ = prop;
							vala_code_node_set_attribute ((ValaCodeNode*) _tmp470_, "ConcreteAccessor", FALSE, NULL);
						} else {
							ValaProperty* _tmp471_;
							ValaPropertyAccessor* _tmp472_;
							ValaPropertyAccessor* _tmp473_;
							ValaDataType* _tmp474_;
							ValaDataType* _tmp475_;
							ValaMethod* _tmp476_;
							ValaList* _tmp477_;
							ValaList* _tmp478_;
							gpointer _tmp479_;
							ValaParameter* _tmp480_;
							ValaDataType* _tmp481_;
							ValaDataType* _tmp482_;
							gboolean _tmp483_;
							gboolean _tmp484_;
							gboolean _tmp485_ = FALSE;
							gboolean _tmp486_ = FALSE;
							gboolean _tmp487_ = FALSE;
							ValaProperty* _tmp488_;
							ValaAttribute* _tmp489_;
							ValaAttribute* _tmp490_;
							gboolean _tmp491_;
							_tmp471_ = prop;
							_tmp472_ = vala_property_get_set_accessor (_tmp471_);
							_tmp473_ = _tmp472_;
							_tmp474_ = vala_property_accessor_get_value_type (_tmp473_);
							_tmp475_ = _tmp474_;
							_tmp476_ = m;
							_tmp477_ = vala_callable_get_parameters ((ValaCallable*) _tmp476_);
							_tmp478_ = _tmp477_;
							_tmp479_ = vala_list_get (_tmp478_, 0);
							_tmp480_ = (ValaParameter*) _tmp479_;
							_tmp481_ = vala_variable_get_variable_type ((ValaVariable*) _tmp480_);
							_tmp482_ = _tmp481_;
							_tmp483_ = vala_data_type_get_value_owned (_tmp482_);
							_tmp484_ = _tmp483_;
							vala_data_type_set_value_owned (_tmp475_, _tmp484_);
							_vala_code_node_unref0 (_tmp480_);
							_vala_iterable_unref0 (_tmp478_);
							_tmp488_ = prop;
							_tmp489_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp488_, "ConcreteAccessor");
							_tmp490_ = _tmp489_;
							_tmp491_ = _tmp490_ != NULL;
							_vala_code_node_unref0 (_tmp490_);
							if (_tmp491_) {
								ValaMethod* _tmp492_;
								gboolean _tmp493_;
								gboolean _tmp494_;
								_tmp492_ = m;
								_tmp493_ = vala_method_get_is_abstract (_tmp492_);
								_tmp494_ = _tmp493_;
								_tmp487_ = !_tmp494_;
							} else {
								_tmp487_ = FALSE;
							}
							if (_tmp487_) {
								ValaMethod* _tmp495_;
								gboolean _tmp496_;
								gboolean _tmp497_;
								_tmp495_ = m;
								_tmp496_ = vala_method_get_is_virtual (_tmp495_);
								_tmp497_ = _tmp496_;
								_tmp486_ = !_tmp497_;
							} else {
								_tmp486_ = FALSE;
							}
							if (_tmp486_) {
								ValaProperty* _tmp498_;
								gboolean _tmp499_;
								gboolean _tmp500_;
								_tmp498_ = prop;
								_tmp499_ = vala_property_get_is_abstract (_tmp498_);
								_tmp500_ = _tmp499_;
								_tmp485_ = _tmp500_;
							} else {
								_tmp485_ = FALSE;
							}
							if (_tmp485_) {
								ValaProperty* _tmp501_;
								ValaProperty* _tmp502_;
								_tmp501_ = prop;
								vala_code_node_set_attribute ((ValaCodeNode*) _tmp501_, "ConcreteAccessor", TRUE, NULL);
								_tmp502_ = prop;
								vala_code_node_set_attribute ((ValaCodeNode*) _tmp502_, "NoAccessorMethod", FALSE, NULL);
							}
						}
					} else {
						ValaProperty* _tmp503_;
						ValaProperty* _tmp504_;
						_tmp503_ = prop;
						vala_code_node_set_attribute ((ValaCodeNode*) _tmp503_, "NoAccessorMethod", TRUE, NULL);
						_tmp504_ = prop;
						vala_code_node_set_attribute ((ValaCodeNode*) _tmp504_, "ConcreteAccessor", FALSE, NULL);
					}
					_vala_code_node_unref0 (m);
				}
				_tmp505_ = prop;
				_tmp506_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp505_, "NoAccessorMethod");
				_tmp507_ = _tmp506_;
				_tmp508_ = _tmp507_ != NULL;
				_vala_code_node_unref0 (_tmp507_);
				if (_tmp508_) {
					gboolean _tmp509_ = FALSE;
					ValaProperty* _tmp510_;
					gboolean _tmp511_;
					gboolean _tmp512_;
					_tmp510_ = prop;
					_tmp511_ = vala_property_get_overrides (_tmp510_);
					_tmp512_ = _tmp511_;
					if (!_tmp512_) {
						ValaGirParserNode* _tmp513_;
						ValaSymbol* _tmp514_;
						_tmp513_ = self->parent;
						_tmp514_ = _tmp513_->symbol;
						_tmp509_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp514_, VALA_TYPE_CLASS);
					} else {
						_tmp509_ = FALSE;
					}
					if (_tmp509_) {
						ValaGirParserNode* base_prop_node = NULL;
						ValaGirParser* _tmp515_;
						ValaGirParserNode* _tmp516_;
						ValaGirParserNode* _tmp517_;
						_tmp515_ = parser;
						_tmp516_ = vala_gir_parser_base_interface_property (_tmp515_, self);
						base_prop_node = _tmp516_;
						_tmp517_ = base_prop_node;
						if (_tmp517_ != NULL) {
							ValaGirParserNode* _tmp518_;
							ValaGirParser* _tmp519_;
							ValaProperty* base_property = NULL;
							ValaGirParserNode* _tmp520_;
							ValaSymbol* _tmp521_;
							ValaProperty* _tmp522_;
							ValaProperty* _tmp523_;
							ValaAttribute* _tmp524_;
							ValaAttribute* _tmp525_;
							gboolean _tmp526_;
							_tmp518_ = base_prop_node;
							_tmp519_ = parser;
							vala_gir_parser_node_process (_tmp518_, _tmp519_);
							_tmp520_ = base_prop_node;
							_tmp521_ = _tmp520_->symbol;
							_tmp522_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp521_, VALA_TYPE_PROPERTY, ValaProperty));
							base_property = _tmp522_;
							_tmp523_ = base_property;
							_tmp524_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp523_, "ConcreteAccessor");
							_tmp525_ = _tmp524_;
							_tmp526_ = _tmp525_ != NULL;
							_vala_code_node_unref0 (_tmp525_);
							if (_tmp526_) {
								ValaProperty* _tmp527_;
								ValaProperty* _tmp528_;
								ValaPropertyAccessor* _tmp529_;
								ValaPropertyAccessor* _tmp530_;
								ValaProperty* _tmp543_;
								ValaPropertyAccessor* _tmp544_;
								ValaPropertyAccessor* _tmp545_;
								_tmp527_ = prop;
								vala_code_node_set_attribute ((ValaCodeNode*) _tmp527_, "NoAccessorMethod", FALSE, NULL);
								_tmp528_ = prop;
								_tmp529_ = vala_property_get_get_accessor (_tmp528_);
								_tmp530_ = _tmp529_;
								if (_tmp530_ != NULL) {
									ValaProperty* _tmp531_;
									ValaPropertyAccessor* _tmp532_;
									ValaPropertyAccessor* _tmp533_;
									ValaDataType* _tmp534_;
									ValaDataType* _tmp535_;
									ValaProperty* _tmp536_;
									ValaPropertyAccessor* _tmp537_;
									ValaPropertyAccessor* _tmp538_;
									ValaDataType* _tmp539_;
									ValaDataType* _tmp540_;
									gboolean _tmp541_;
									gboolean _tmp542_;
									_tmp531_ = prop;
									_tmp532_ = vala_property_get_get_accessor (_tmp531_);
									_tmp533_ = _tmp532_;
									_tmp534_ = vala_property_accessor_get_value_type (_tmp533_);
									_tmp535_ = _tmp534_;
									_tmp536_ = base_property;
									_tmp537_ = vala_property_get_get_accessor (_tmp536_);
									_tmp538_ = _tmp537_;
									_tmp539_ = vala_property_accessor_get_value_type (_tmp538_);
									_tmp540_ = _tmp539_;
									_tmp541_ = vala_data_type_get_value_owned (_tmp540_);
									_tmp542_ = _tmp541_;
									vala_data_type_set_value_owned (_tmp535_, _tmp542_);
								}
								_tmp543_ = prop;
								_tmp544_ = vala_property_get_set_accessor (_tmp543_);
								_tmp545_ = _tmp544_;
								if (_tmp545_ != NULL) {
									ValaProperty* _tmp546_;
									ValaPropertyAccessor* _tmp547_;
									ValaPropertyAccessor* _tmp548_;
									ValaDataType* _tmp549_;
									ValaDataType* _tmp550_;
									ValaProperty* _tmp551_;
									ValaPropertyAccessor* _tmp552_;
									ValaPropertyAccessor* _tmp553_;
									ValaDataType* _tmp554_;
									ValaDataType* _tmp555_;
									gboolean _tmp556_;
									gboolean _tmp557_;
									_tmp546_ = prop;
									_tmp547_ = vala_property_get_set_accessor (_tmp546_);
									_tmp548_ = _tmp547_;
									_tmp549_ = vala_property_accessor_get_value_type (_tmp548_);
									_tmp550_ = _tmp549_;
									_tmp551_ = base_property;
									_tmp552_ = vala_property_get_set_accessor (_tmp551_);
									_tmp553_ = _tmp552_;
									_tmp554_ = vala_property_accessor_get_value_type (_tmp553_);
									_tmp555_ = _tmp554_;
									_tmp556_ = vala_data_type_get_value_owned (_tmp555_);
									_tmp557_ = _tmp556_;
									vala_data_type_set_value_owned (_tmp550_, _tmp557_);
								}
							}
							_vala_code_node_unref0 (base_property);
						}
						_vala_gir_parser_node_unref0 (base_prop_node);
					}
				}
				_tmp558_ = prop;
				_tmp559_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp558_, "NoAccessorMethod");
				_tmp560_ = _tmp559_;
				_tmp561_ = _tmp560_ != NULL;
				_vala_code_node_unref0 (_tmp560_);
				if (_tmp561_) {
					ValaProperty* _tmp562_;
					ValaPropertyAccessor* _tmp563_;
					ValaPropertyAccessor* _tmp564_;
					ValaProperty* _tmp570_;
					ValaPropertyAccessor* _tmp571_;
					ValaPropertyAccessor* _tmp572_;
					_tmp562_ = prop;
					_tmp563_ = vala_property_get_get_accessor (_tmp562_);
					_tmp564_ = _tmp563_;
					if (_tmp564_ != NULL) {
						ValaProperty* _tmp565_;
						ValaPropertyAccessor* _tmp566_;
						ValaPropertyAccessor* _tmp567_;
						ValaDataType* _tmp568_;
						ValaDataType* _tmp569_;
						_tmp565_ = prop;
						_tmp566_ = vala_property_get_get_accessor (_tmp565_);
						_tmp567_ = _tmp566_;
						_tmp568_ = vala_property_accessor_get_value_type (_tmp567_);
						_tmp569_ = _tmp568_;
						vala_data_type_set_value_owned (_tmp569_, TRUE);
					}
					_tmp570_ = prop;
					_tmp571_ = vala_property_get_set_accessor (_tmp570_);
					_tmp572_ = _tmp571_;
					if (_tmp572_ != NULL) {
						ValaProperty* _tmp573_;
						ValaPropertyAccessor* _tmp574_;
						ValaPropertyAccessor* _tmp575_;
						ValaDataType* _tmp576_;
						ValaDataType* _tmp577_;
						_tmp573_ = prop;
						_tmp574_ = vala_property_get_set_accessor (_tmp573_);
						_tmp575_ = _tmp574_;
						_tmp576_ = vala_property_accessor_get_value_type (_tmp575_);
						_tmp577_ = _tmp576_;
						vala_data_type_set_value_owned (_tmp577_, FALSE);
					}
				}
				_vala_iterable_unref0 (setters);
				_vala_gir_parser_node_unref0 (setter);
				_vala_iterable_unref0 (getters);
				_vala_gir_parser_node_unref0 (getter);
				_g_free0 (construct_only);
				_g_free0 (construct_);
				_g_free0 (writable);
				_g_free0 (readable);
				_vala_code_node_unref0 (prop);
				_vala_iterable_unref0 (colliding);
			} else {
				ValaSymbol* _tmp578_;
				_tmp578_ = self->symbol;
				if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp578_, VALA_TYPE_FIELD)) {
					ValaField* field = NULL;
					ValaSymbol* _tmp579_;
					ValaField* _tmp580_;
					ValaArrayList* colliding = NULL;
					ValaGirParserNode* _tmp581_;
					const gchar* _tmp582_;
					ValaArrayList* _tmp583_;
					ValaArrayList* _tmp584_;
					gint _tmp585_;
					gint _tmp586_;
					ValaGirParserMetadata* _tmp587_;
					gboolean _tmp588_;
					gboolean _tmp593_ = FALSE;
					ValaField* _tmp594_;
					ValaDataType* _tmp595_;
					ValaDataType* _tmp596_;
					_tmp579_ = self->symbol;
					_tmp580_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp579_, VALA_TYPE_FIELD, ValaField));
					field = _tmp580_;
					_tmp581_ = self->parent;
					_tmp582_ = self->name;
					_tmp583_ = vala_gir_parser_node_lookup_all (_tmp581_, _tmp582_);
					colliding = _tmp583_;
					_tmp584_ = colliding;
					_tmp585_ = vala_collection_get_size ((ValaCollection*) _tmp584_);
					_tmp586_ = _tmp585_;
					if (_tmp586_ > 1) {
						self->merged = TRUE;
					}
					_tmp587_ = self->metadata;
					_tmp588_ = vala_gir_parser_metadata_has_argument (_tmp587_, VALA_GIR_PARSER_ARGUMENT_TYPE_DELEGATE_TARGET_CNAME);
					if (_tmp588_) {
						ValaField* _tmp589_;
						ValaGirParserMetadata* _tmp590_;
						gchar* _tmp591_;
						gchar* _tmp592_;
						_tmp589_ = field;
						_tmp590_ = self->metadata;
						_tmp591_ = vala_gir_parser_metadata_get_string (_tmp590_, VALA_GIR_PARSER_ARGUMENT_TYPE_DELEGATE_TARGET_CNAME);
						_tmp592_ = _tmp591_;
						vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp589_, "CCode", "delegate_target_cname", _tmp592_, NULL);
						_g_free0 (_tmp592_);
					}
					_tmp594_ = field;
					_tmp595_ = vala_variable_get_variable_type ((ValaVariable*) _tmp594_);
					_tmp596_ = _tmp595_;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp596_, VALA_TYPE_DELEGATE_TYPE)) {
						ValaGirParserNode* _tmp597_;
						ValaUnresolvedSymbol* _tmp598_;
						_tmp597_ = self->parent;
						_tmp598_ = _tmp597_->gtype_struct_for;
						_tmp593_ = _tmp598_ != NULL;
					} else {
						_tmp593_ = FALSE;
					}
					if (_tmp593_) {
						ValaDelegate* d = NULL;
						ValaField* _tmp599_;
						ValaDataType* _tmp600_;
						ValaDataType* _tmp601_;
						ValaDelegate* _tmp602_;
						ValaDelegate* _tmp603_;
						ValaDelegate* _tmp604_;
						ValaGirParser* _tmp605_;
						ValaDelegate* _tmp606_;
						ValaGirParserNode* _tmp607_;
						ValaUnresolvedSymbol* _tmp608_;
						_tmp599_ = field;
						_tmp600_ = vala_variable_get_variable_type ((ValaVariable*) _tmp599_);
						_tmp601_ = _tmp600_;
						_tmp602_ = vala_delegate_type_get_delegate_symbol (G_TYPE_CHECK_INSTANCE_CAST (_tmp601_, VALA_TYPE_DELEGATE_TYPE, ValaDelegateType));
						_tmp603_ = _tmp602_;
						_tmp604_ = _vala_code_node_ref0 (_tmp603_);
						d = _tmp604_;
						_tmp605_ = parser;
						_tmp606_ = d;
						_tmp607_ = self->parent;
						_tmp608_ = _tmp607_->gtype_struct_for;
						vala_gir_parser_process_virtual_method_field (_tmp605_, self, _tmp606_, _tmp608_);
						self->merged = TRUE;
						_vala_code_node_unref0 (d);
					} else {
						ValaField* _tmp609_;
						ValaDataType* _tmp610_;
						ValaDataType* _tmp611_;
						_tmp609_ = field;
						_tmp610_ = vala_variable_get_variable_type ((ValaVariable*) _tmp609_);
						_tmp611_ = _tmp610_;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp611_, VALA_TYPE_ARRAY_TYPE)) {
							ValaGirParserNode* array_length = NULL;
							ValaGirParserMetadata* _tmp612_;
							gboolean _tmp613_;
							gboolean _tmp653_ = FALSE;
							ValaGirParserNode* _tmp654_;
							_tmp612_ = self->metadata;
							_tmp613_ = vala_gir_parser_metadata_has_argument (_tmp612_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD);
							if (_tmp613_) {
								ValaGirParserNode* _tmp614_;
								ValaGirParserMetadata* _tmp615_;
								gchar* _tmp616_;
								gchar* _tmp617_;
								ValaGirParserNode* _tmp618_;
								_tmp614_ = self->parent;
								_tmp615_ = self->metadata;
								_tmp616_ = vala_gir_parser_metadata_get_string (_tmp615_, VALA_GIR_PARSER_ARGUMENT_TYPE_ARRAY_LENGTH_FIELD);
								_tmp617_ = _tmp616_;
								_tmp618_ = vala_gir_parser_node_lookup (_tmp614_, _tmp617_, FALSE, NULL);
								_vala_gir_parser_node_unref0 (array_length);
								array_length = _tmp618_;
								_g_free0 (_tmp617_);
							} else {
								gboolean _tmp619_ = FALSE;
								gint _tmp620_;
								_tmp620_ = self->array_length_idx;
								if (_tmp620_ > -1) {
									ValaGirParserNode* _tmp621_;
									ValaArrayList* _tmp622_;
									gint _tmp623_;
									gint _tmp624_;
									gint _tmp625_;
									_tmp621_ = self->parent;
									_tmp622_ = _tmp621_->members;
									_tmp623_ = vala_collection_get_size ((ValaCollection*) _tmp622_);
									_tmp624_ = _tmp623_;
									_tmp625_ = self->array_length_idx;
									_tmp619_ = _tmp624_ > _tmp625_;
								} else {
									_tmp619_ = FALSE;
								}
								if (_tmp619_) {
									ValaGirParserNode* _tmp626_;
									ValaArrayList* _tmp627_;
									gint _tmp628_;
									gpointer _tmp629_;
									_tmp626_ = self->parent;
									_tmp627_ = _tmp626_->members;
									_tmp628_ = self->array_length_idx;
									_tmp629_ = vala_list_get ((ValaList*) _tmp627_, _tmp628_);
									_vala_gir_parser_node_unref0 (array_length);
									array_length = (ValaGirParserNode*) _tmp629_;
								} else {
									ValaGirParserNode* _tmp630_;
									ValaField* _tmp631_;
									const gchar* _tmp632_;
									const gchar* _tmp633_;
									gchar* _tmp634_;
									gchar* _tmp635_;
									ValaGirParserNode* _tmp636_;
									ValaGirParserNode* _tmp637_;
									_tmp630_ = self->parent;
									_tmp631_ = field;
									_tmp632_ = vala_symbol_get_name ((ValaSymbol*) _tmp631_);
									_tmp633_ = _tmp632_;
									_tmp634_ = g_strdup_printf ("n_%s", _tmp633_);
									_tmp635_ = _tmp634_;
									_tmp636_ = vala_gir_parser_node_lookup (_tmp630_, _tmp635_, FALSE, NULL);
									_vala_gir_parser_node_unref0 (array_length);
									array_length = _tmp636_;
									_g_free0 (_tmp635_);
									_tmp637_ = array_length;
									if (_tmp637_ == NULL) {
										ValaGirParserNode* _tmp638_;
										ValaField* _tmp639_;
										const gchar* _tmp640_;
										const gchar* _tmp641_;
										gchar* _tmp642_;
										gchar* _tmp643_;
										ValaGirParserNode* _tmp644_;
										ValaGirParserNode* _tmp645_;
										_tmp638_ = self->parent;
										_tmp639_ = field;
										_tmp640_ = vala_symbol_get_name ((ValaSymbol*) _tmp639_);
										_tmp641_ = _tmp640_;
										_tmp642_ = g_strdup_printf ("num_%s", _tmp641_);
										_tmp643_ = _tmp642_;
										_tmp644_ = vala_gir_parser_node_lookup (_tmp638_, _tmp643_, FALSE, NULL);
										_vala_gir_parser_node_unref0 (array_length);
										array_length = _tmp644_;
										_g_free0 (_tmp643_);
										_tmp645_ = array_length;
										if (_tmp645_ == NULL) {
											ValaGirParserNode* _tmp646_;
											ValaField* _tmp647_;
											const gchar* _tmp648_;
											const gchar* _tmp649_;
											gchar* _tmp650_;
											gchar* _tmp651_;
											ValaGirParserNode* _tmp652_;
											_tmp646_ = self->parent;
											_tmp647_ = field;
											_tmp648_ = vala_symbol_get_name ((ValaSymbol*) _tmp647_);
											_tmp649_ = _tmp648_;
											_tmp650_ = g_strdup_printf ("%s_length", _tmp649_);
											_tmp651_ = _tmp650_;
											_tmp652_ = vala_gir_parser_node_lookup (_tmp646_, _tmp651_, FALSE, NULL);
											_vala_gir_parser_node_unref0 (array_length);
											array_length = _tmp652_;
											_g_free0 (_tmp651_);
										}
									}
								}
							}
							_tmp654_ = array_length;
							if (_tmp654_ != NULL) {
								ValaGirParserNode* _tmp655_;
								ValaSymbol* _tmp656_;
								_tmp655_ = array_length;
								_tmp656_ = _tmp655_->symbol;
								_tmp653_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp656_, VALA_TYPE_FIELD);
							} else {
								_tmp653_ = FALSE;
							}
							if (_tmp653_) {
								ValaField* length_field = NULL;
								ValaGirParserNode* _tmp657_;
								ValaSymbol* _tmp658_;
								ValaField* _tmp659_;
								ValaField* _tmp660_;
								ValaField* _tmp661_;
								const gchar* _tmp662_;
								const gchar* _tmp663_;
								gchar* length_type = NULL;
								ValaField* _tmp664_;
								ValaDataType* _tmp665_;
								ValaDataType* _tmp666_;
								gchar* _tmp667_;
								const gchar* _tmp668_;
								ValaField* _tmp678_;
								ValaField* _tmp679_;
								_tmp657_ = array_length;
								_tmp658_ = _tmp657_->symbol;
								_tmp659_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp658_, VALA_TYPE_FIELD, ValaField));
								length_field = _tmp659_;
								_tmp660_ = field;
								_tmp661_ = length_field;
								_tmp662_ = vala_symbol_get_name ((ValaSymbol*) _tmp661_);
								_tmp663_ = _tmp662_;
								vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp660_, "CCode", "array_length_cname", _tmp663_, NULL);
								_tmp664_ = length_field;
								_tmp665_ = vala_variable_get_variable_type ((ValaVariable*) _tmp664_);
								_tmp666_ = _tmp665_;
								_tmp667_ = vala_data_type_to_qualified_string (_tmp666_, NULL);
								length_type = _tmp667_;
								_tmp668_ = length_type;
								if (g_strcmp0 (_tmp668_, "int") != 0) {
									ValaGirParserNode* st = NULL;
									ValaGirParser* _tmp669_;
									ValaGirParserNode* _tmp670_;
									const gchar* _tmp671_;
									ValaGirParserNode* _tmp672_;
									ValaGirParserNode* _tmp673_;
									_tmp669_ = parser;
									_tmp670_ = _tmp669_->priv->root;
									_tmp671_ = length_type;
									_tmp672_ = vala_gir_parser_node_lookup (_tmp670_, _tmp671_, FALSE, NULL);
									st = _tmp672_;
									_tmp673_ = st;
									if (_tmp673_ != NULL) {
										ValaField* _tmp674_;
										ValaGirParserNode* _tmp675_;
										gchar* _tmp676_;
										gchar* _tmp677_;
										_tmp674_ = field;
										_tmp675_ = st;
										_tmp676_ = vala_gir_parser_node_get_cname (_tmp675_);
										_tmp677_ = _tmp676_;
										vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp674_, "CCode", "array_length_type", _tmp677_, NULL);
										_g_free0 (_tmp677_);
									}
									_vala_gir_parser_node_unref0 (st);
								}
								_tmp678_ = field;
								vala_code_node_remove_attribute_argument ((ValaCodeNode*) _tmp678_, "CCode", "array_length");
								_tmp679_ = field;
								vala_code_node_remove_attribute_argument ((ValaCodeNode*) _tmp679_, "CCode", "array_null_terminated");
								_g_free0 (length_type);
								_vala_code_node_unref0 (length_field);
							}
							_vala_gir_parser_node_unref0 (array_length);
						}
					}
					_vala_iterable_unref0 (colliding);
					_vala_code_node_unref0 (field);
				} else {
					gboolean _tmp680_ = FALSE;
					ValaSymbol* _tmp681_;
					_tmp681_ = self->symbol;
					if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp681_, VALA_TYPE_SIGNAL)) {
						_tmp680_ = TRUE;
					} else {
						ValaSymbol* _tmp682_;
						_tmp682_ = self->symbol;
						_tmp680_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp682_, VALA_TYPE_DELEGATE);
					}
					if (_tmp680_) {
						ValaGirParser* _tmp683_;
						_tmp683_ = parser;
						vala_gir_parser_process_callable (_tmp683_, self);
					} else {
						ValaSymbol* _tmp684_;
						_tmp684_ = self->symbol;
						if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp684_, VALA_TYPE_INTERFACE)) {
							ValaGirParser* _tmp685_;
							_tmp685_ = parser;
							vala_gir_parser_process_interface (_tmp685_, self);
						} else {
							ValaSymbol* _tmp686_;
							_tmp686_ = self->symbol;
							if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp686_, VALA_TYPE_STRUCT)) {
								gboolean _tmp687_ = FALSE;
								ValaGirParserNode* _tmp688_;
								ValaSymbol* _tmp689_;
								_tmp688_ = self->parent;
								_tmp689_ = _tmp688_->symbol;
								if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp689_, VALA_TYPE_OBJECT_TYPE_SYMBOL)) {
									_tmp687_ = TRUE;
								} else {
									ValaGirParserNode* _tmp690_;
									ValaSymbol* _tmp691_;
									_tmp690_ = self->parent;
									_tmp691_ = _tmp690_->symbol;
									_tmp687_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp691_, VALA_TYPE_STRUCT);
								}
								if (_tmp687_) {
									{
										ValaArrayList* _fn_list = NULL;
										ValaArrayList* _tmp692_;
										ValaArrayList* _tmp693_;
										gint _fn_size = 0;
										ValaArrayList* _tmp694_;
										gint _tmp695_;
										gint _tmp696_;
										gint _fn_index = 0;
										_tmp692_ = self->members;
										_tmp693_ = _vala_iterable_ref0 (_tmp692_);
										_fn_list = _tmp693_;
										_tmp694_ = _fn_list;
										_tmp695_ = vala_collection_get_size ((ValaCollection*) _tmp694_);
										_tmp696_ = _tmp695_;
										_fn_size = _tmp696_;
										_fn_index = -1;
										while (TRUE) {
											gint _tmp697_;
											gint _tmp698_;
											gint _tmp699_;
											ValaGirParserNode* fn = NULL;
											ValaArrayList* _tmp700_;
											gint _tmp701_;
											gpointer _tmp702_;
											ValaField* f = NULL;
											ValaGirParserNode* _tmp703_;
											ValaSymbol* _tmp704_;
											ValaField* _tmp705_;
											ValaField* _tmp706_;
											_tmp697_ = _fn_index;
											_fn_index = _tmp697_ + 1;
											_tmp698_ = _fn_index;
											_tmp699_ = _fn_size;
											if (!(_tmp698_ < _tmp699_)) {
												break;
											}
											_tmp700_ = _fn_list;
											_tmp701_ = _fn_index;
											_tmp702_ = vala_list_get ((ValaList*) _tmp700_, _tmp701_);
											fn = (ValaGirParserNode*) _tmp702_;
											_tmp703_ = fn;
											_tmp704_ = _tmp703_->symbol;
											_tmp705_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp704_, VALA_TYPE_FIELD) ? ((ValaField*) _tmp704_) : NULL);
											f = _tmp705_;
											_tmp706_ = f;
											if (_tmp706_ != NULL) {
												ValaField* _tmp707_;
												ValaMemberBinding _tmp708_;
												ValaMemberBinding _tmp709_;
												ValaField* _tmp717_;
												ValaSymbol* _tmp718_;
												const gchar* _tmp719_;
												const gchar* _tmp720_;
												ValaField* _tmp721_;
												const gchar* _tmp722_;
												const gchar* _tmp723_;
												gchar* _tmp724_;
												gchar* _tmp725_;
												ValaGirParserNode* _tmp726_;
												ValaField* _tmp727_;
												const gchar* _tmp728_;
												const gchar* _tmp729_;
												gchar* _tmp730_;
												ValaGirParserNode* _tmp731_;
												ValaGirParserNode* _tmp732_;
												_tmp707_ = f;
												_tmp708_ = vala_field_get_binding (_tmp707_);
												_tmp709_ = _tmp708_;
												if (_tmp709_ == VALA_MEMBER_BINDING_INSTANCE) {
													ValaField* _tmp710_;
													const gchar* _tmp711_;
													ValaGirParserNode* _tmp712_;
													gchar* _tmp713_;
													gchar* _tmp714_;
													gchar* _tmp715_;
													gchar* _tmp716_;
													_tmp710_ = f;
													_tmp711_ = self->name;
													_tmp712_ = fn;
													_tmp713_ = vala_gir_parser_node_get_cname (_tmp712_);
													_tmp714_ = _tmp713_;
													_tmp715_ = g_strdup_printf ("%s.%s", _tmp711_, _tmp714_);
													_tmp716_ = _tmp715_;
													vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp710_, "CCode", "cname", _tmp716_, NULL);
													_g_free0 (_tmp716_);
													_g_free0 (_tmp714_);
												}
												_tmp717_ = f;
												_tmp718_ = self->symbol;
												_tmp719_ = vala_symbol_get_name (_tmp718_);
												_tmp720_ = _tmp719_;
												_tmp721_ = f;
												_tmp722_ = vala_symbol_get_name ((ValaSymbol*) _tmp721_);
												_tmp723_ = _tmp722_;
												_tmp724_ = g_strdup_printf ("%s_%s", _tmp720_, _tmp723_);
												_tmp725_ = _tmp724_;
												vala_symbol_set_name ((ValaSymbol*) _tmp717_, _tmp725_);
												_g_free0 (_tmp725_);
												_tmp726_ = fn;
												_tmp727_ = f;
												_tmp728_ = vala_symbol_get_name ((ValaSymbol*) _tmp727_);
												_tmp729_ = _tmp728_;
												_tmp730_ = g_strdup (_tmp729_);
												_g_free0 (_tmp726_->name);
												_tmp726_->name = _tmp730_;
												_tmp731_ = self->parent;
												_tmp732_ = fn;
												vala_gir_parser_node_add_member (_tmp731_, _tmp732_);
											}
											_vala_code_node_unref0 (f);
											_vala_gir_parser_node_unref0 (fn);
										}
										_vala_iterable_unref0 (_fn_list);
									}
									self->merged = TRUE;
								} else {
									gchar* gtype_struct_for = NULL;
									ValaMap* _tmp733_;
									gpointer _tmp734_;
									const gchar* _tmp735_;
									_tmp733_ = self->girdata;
									_tmp734_ = vala_map_get (_tmp733_, "glib:is-gtype-struct-for");
									gtype_struct_for = (gchar*) _tmp734_;
									_tmp735_ = gtype_struct_for;
									if (_tmp735_ != NULL) {
										ValaGirParserNode* iface = NULL;
										ValaGirParser* _tmp736_;
										ValaGirParserNode* _tmp737_;
										ValaGirParser* _tmp738_;
										const gchar* _tmp739_;
										ValaSourceReference* _tmp740_;
										ValaUnresolvedSymbol* _tmp741_;
										ValaUnresolvedSymbol* _tmp742_;
										ValaGirParserNode* _tmp743_;
										ValaGirParserNode* _tmp744_;
										gboolean _tmp745_ = FALSE;
										gboolean _tmp746_ = FALSE;
										ValaGirParserNode* _tmp747_;
										_tmp736_ = parser;
										_tmp737_ = self->parent;
										_tmp738_ = parser;
										_tmp739_ = gtype_struct_for;
										_tmp740_ = self->source_reference;
										_tmp741_ = vala_gir_parser_parse_symbol_from_string (_tmp738_, _tmp739_, _tmp740_);
										_tmp742_ = _tmp741_;
										_tmp743_ = vala_gir_parser_resolve_node (_tmp736_, _tmp737_, _tmp742_, FALSE);
										_tmp744_ = _tmp743_;
										_vala_code_node_unref0 (_tmp742_);
										iface = _tmp744_;
										_tmp747_ = iface;
										if (_tmp747_ != NULL) {
											ValaGirParserNode* _tmp748_;
											ValaSymbol* _tmp749_;
											_tmp748_ = iface;
											_tmp749_ = _tmp748_->symbol;
											_tmp746_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp749_, VALA_TYPE_INTERFACE);
										} else {
											_tmp746_ = FALSE;
										}
										if (_tmp746_) {
											ValaGirParserNode* _tmp750_;
											gchar* _tmp751_;
											gchar* _tmp752_;
											gchar* _tmp753_;
											gchar* _tmp754_;
											gchar* _tmp755_;
											gchar* _tmp756_;
											_tmp750_ = iface;
											_tmp751_ = vala_gir_parser_node_get_cname (_tmp750_);
											_tmp752_ = _tmp751_;
											_tmp753_ = g_strdup_printf ("%sIface", _tmp752_);
											_tmp754_ = _tmp753_;
											_tmp755_ = vala_gir_parser_node_get_cname (self);
											_tmp756_ = _tmp755_;
											_tmp745_ = g_strcmp0 (_tmp754_, _tmp756_) != 0;
											_g_free0 (_tmp756_);
											_g_free0 (_tmp754_);
											_g_free0 (_tmp752_);
										} else {
											_tmp745_ = FALSE;
										}
										if (_tmp745_) {
											ValaGirParserNode* _tmp757_;
											ValaSymbol* _tmp758_;
											gchar* _tmp759_;
											gchar* _tmp760_;
											_tmp757_ = iface;
											_tmp758_ = _tmp757_->symbol;
											_tmp759_ = vala_gir_parser_node_get_cname (self);
											_tmp760_ = _tmp759_;
											vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp758_, "CCode", "type_cname", _tmp760_, NULL);
											_g_free0 (_tmp760_);
										}
										self->merged = TRUE;
										_vala_gir_parser_node_unref0 (iface);
									}
									_g_free0 (gtype_struct_for);
								}
							}
						}
					}
				}
			}
		}
		_tmp761_ = self->metadata;
		_tmp762_ = vala_gir_parser_metadata_has_argument (_tmp761_, VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT);
		if (_tmp762_) {
			ValaGirParserMetadata* _tmp763_;
			gchar* _tmp764_;
			self->deprecated = TRUE;
			_tmp763_ = self->metadata;
			_tmp764_ = vala_gir_parser_metadata_get_string (_tmp763_, VALA_GIR_PARSER_ARGUMENT_TYPE_REPLACEMENT);
			_g_free0 (self->deprecated_replacement);
			self->deprecated_replacement = _tmp764_;
		}
		_tmp765_ = self->metadata;
		_tmp766_ = vala_gir_parser_metadata_has_argument (_tmp765_, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE);
		if (_tmp766_) {
			ValaGirParserMetadata* _tmp767_;
			gchar* _tmp768_;
			self->deprecated = TRUE;
			_tmp767_ = self->metadata;
			_tmp768_ = vala_gir_parser_metadata_get_string (_tmp767_, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED_SINCE);
			_g_free0 (self->deprecated_since);
			self->deprecated_since = _tmp768_;
		} else {
			ValaMap* _tmp769_;
			gpointer _tmp770_;
			gchar* _tmp771_;
			gboolean _tmp772_;
			_tmp769_ = self->girdata;
			_tmp770_ = vala_map_get (_tmp769_, "deprecated-version");
			_tmp771_ = (gchar*) _tmp770_;
			_tmp772_ = _tmp771_ != NULL;
			_g_free0 (_tmp771_);
			if (_tmp772_) {
				ValaMap* _tmp773_;
				gpointer _tmp774_;
				self->deprecated = TRUE;
				_tmp773_ = self->girdata;
				_tmp774_ = vala_map_get (_tmp773_, "deprecated-version");
				_g_free0 (self->deprecated_since);
				self->deprecated_since = (gchar*) _tmp774_;
			}
		}
		_tmp775_ = self->metadata;
		_tmp776_ = vala_gir_parser_metadata_has_argument (_tmp775_, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED);
		if (_tmp776_) {
			ValaGirParserMetadata* _tmp777_;
			gboolean _tmp778_;
			gboolean _tmp779_;
			_tmp777_ = self->metadata;
			_tmp778_ = vala_gir_parser_metadata_get_bool (_tmp777_, VALA_GIR_PARSER_ARGUMENT_TYPE_DEPRECATED, TRUE);
			self->deprecated = _tmp778_;
			_tmp779_ = self->deprecated;
			if (!_tmp779_) {
				_g_free0 (self->deprecated_since);
				self->deprecated_since = NULL;
				_g_free0 (self->deprecated_replacement);
				self->deprecated_replacement = NULL;
			}
		} else {
			ValaMap* _tmp780_;
			gpointer _tmp781_;
			gchar* _tmp782_;
			gboolean _tmp783_;
			_tmp780_ = self->girdata;
			_tmp781_ = vala_map_get (_tmp780_, "deprecated");
			_tmp782_ = (gchar*) _tmp781_;
			_tmp783_ = _tmp782_ != NULL;
			_g_free0 (_tmp782_);
			if (_tmp783_) {
				self->deprecated = TRUE;
			}
		}
		_tmp784_ = self->deprecated_since;
		if (_tmp784_ != NULL) {
			const gchar* _tmp785_;
			guint64 _tmp786_;
			_tmp785_ = self->deprecated_since;
			_tmp786_ = vala_gir_parser_node_parse_version_string (_tmp785_);
			self->deprecated_version = _tmp786_;
		}
		_tmp787_ = self->metadata;
		_tmp788_ = vala_gir_parser_metadata_has_argument (_tmp787_, VALA_GIR_PARSER_ARGUMENT_TYPE_EXPERIMENTAL);
		if (_tmp788_) {
			ValaSymbol* _tmp789_;
			ValaGirParserMetadata* _tmp790_;
			gboolean _tmp791_;
			_tmp789_ = self->symbol;
			_tmp790_ = self->metadata;
			_tmp791_ = vala_gir_parser_metadata_get_bool (_tmp790_, VALA_GIR_PARSER_ARGUMENT_TYPE_EXPERIMENTAL, FALSE);
			vala_code_node_set_attribute_bool ((ValaCodeNode*) _tmp789_, "Version", "experimental", _tmp791_, NULL);
		}
		_tmp792_ = self->metadata;
		_tmp793_ = vala_gir_parser_metadata_has_argument (_tmp792_, VALA_GIR_PARSER_ARGUMENT_TYPE_SINCE);
		if (_tmp793_) {
			ValaSymbol* _tmp794_;
			ValaVersionAttribute* _tmp795_;
			ValaVersionAttribute* _tmp796_;
			ValaGirParserMetadata* _tmp797_;
			gchar* _tmp798_;
			gchar* _tmp799_;
			_tmp794_ = self->symbol;
			_tmp795_ = vala_symbol_get_version (_tmp794_);
			_tmp796_ = _tmp795_;
			_tmp797_ = self->metadata;
			_tmp798_ = vala_gir_parser_metadata_get_string (_tmp797_, VALA_GIR_PARSER_ARGUMENT_TYPE_SINCE);
			_tmp799_ = _tmp798_;
			vala_version_attribute_set_since (_tmp796_, _tmp799_);
			_g_free0 (_tmp799_);
		} else {
			gboolean _tmp800_ = FALSE;
			ValaSymbol* _tmp801_;
			_tmp801_ = self->symbol;
			if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp801_, VALA_TYPE_NAMESPACE) == FALSE) {
				ValaMap* _tmp802_;
				gpointer _tmp803_;
				gchar* _tmp804_;
				_tmp802_ = self->girdata;
				_tmp803_ = vala_map_get (_tmp802_, "version");
				_tmp804_ = (gchar*) _tmp803_;
				_tmp800_ = _tmp804_ != NULL;
				_g_free0 (_tmp804_);
			} else {
				_tmp800_ = FALSE;
			}
			if (_tmp800_) {
				ValaSymbol* _tmp805_;
				ValaVersionAttribute* _tmp806_;
				ValaVersionAttribute* _tmp807_;
				ValaMap* _tmp808_;
				gpointer _tmp809_;
				gchar* _tmp810_;
				_tmp805_ = self->symbol;
				_tmp806_ = vala_symbol_get_version (_tmp805_);
				_tmp807_ = _tmp806_;
				_tmp808_ = self->girdata;
				_tmp809_ = vala_map_get (_tmp808_, "version");
				_tmp810_ = (gchar*) _tmp809_;
				vala_version_attribute_set_since (_tmp807_, _tmp810_);
				_g_free0 (_tmp810_);
			}
		}
		_tmp811_ = self->parent;
		_tmp812_ = _tmp811_->symbol;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp812_, VALA_TYPE_NAMESPACE)) {
			ValaSymbol* _tmp813_;
			gchar* _tmp814_;
			gchar* _tmp815_;
			_tmp813_ = self->symbol;
			_tmp814_ = vala_gir_parser_node_get_cheader_filename (self);
			_tmp815_ = _tmp814_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp813_, "CCode", "cheader_filename", _tmp815_, NULL);
			_g_free0 (_tmp815_);
		} else {
			ValaGirParserMetadata* _tmp816_;
			gboolean _tmp817_;
			_tmp816_ = self->metadata;
			_tmp817_ = vala_gir_parser_metadata_has_argument (_tmp816_, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
			if (_tmp817_) {
				ValaSymbol* _tmp818_;
				ValaGirParserMetadata* _tmp819_;
				gchar* _tmp820_;
				gchar* _tmp821_;
				_tmp818_ = self->symbol;
				_tmp819_ = self->metadata;
				_tmp820_ = vala_gir_parser_metadata_get_string (_tmp819_, VALA_GIR_PARSER_ARGUMENT_TYPE_CHEADER_FILENAME);
				_tmp821_ = _tmp820_;
				vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp818_, "CCode", "cheader_filename", _tmp821_, NULL);
				_g_free0 (_tmp821_);
			}
		}
		_tmp822_ = vala_gir_parser_node_get_cname (self);
		_tmp823_ = _tmp822_;
		_tmp824_ = vala_gir_parser_node_get_default_cname (self);
		_tmp825_ = _tmp824_;
		_tmp826_ = g_strcmp0 (_tmp823_, _tmp825_) != 0;
		_g_free0 (_tmp825_);
		_g_free0 (_tmp823_);
		if (_tmp826_) {
			ValaSymbol* _tmp827_;
			gchar* _tmp828_;
			gchar* _tmp829_;
			_tmp827_ = self->symbol;
			_tmp828_ = vala_gir_parser_node_get_cname (self);
			_tmp829_ = _tmp828_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp827_, "CCode", "cname", _tmp829_, NULL);
			_g_free0 (_tmp829_);
		}
		_tmp830_ = vala_gir_parser_node_get_lower_case_cprefix (self);
		_tmp831_ = _tmp830_;
		_tmp832_ = vala_gir_parser_node_get_default_lower_case_cprefix (self);
		_tmp833_ = _tmp832_;
		_tmp834_ = g_strcmp0 (_tmp831_, _tmp833_) != 0;
		_g_free0 (_tmp833_);
		_g_free0 (_tmp831_);
		if (_tmp834_) {
			ValaSymbol* _tmp835_;
			gchar* _tmp836_;
			gchar* _tmp837_;
			_tmp835_ = self->symbol;
			_tmp836_ = vala_gir_parser_node_get_lower_case_cprefix (self);
			_tmp837_ = _tmp836_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp835_, "CCode", "lower_case_cprefix", _tmp837_, NULL);
			_g_free0 (_tmp837_);
		}
		_tmp838_ = vala_gir_parser_node_get_lower_case_csuffix (self);
		_tmp839_ = _tmp838_;
		_tmp840_ = vala_gir_parser_node_get_default_lower_case_csuffix (self);
		_tmp841_ = _tmp840_;
		_tmp842_ = g_strcmp0 (_tmp839_, _tmp841_) != 0;
		_g_free0 (_tmp841_);
		_g_free0 (_tmp839_);
		if (_tmp842_) {
			ValaSymbol* _tmp843_;
			gchar* _tmp844_;
			gchar* _tmp845_;
			_tmp843_ = self->symbol;
			_tmp844_ = vala_gir_parser_node_get_lower_case_csuffix (self);
			_tmp845_ = _tmp844_;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp843_, "CCode", "lower_case_csuffix", _tmp845_, NULL);
			_g_free0 (_tmp845_);
		}
		_tmp846_ = vala_gir_parser_node_get_gir_name (self);
		gir_name = _tmp846_;
		_tmp847_ = vala_gir_parser_node_get_default_gir_name (self);
		default_gir_name = _tmp847_;
		_tmp850_ = self->symbol;
		_tmp851_ = vala_gir_parser_is_container (_tmp850_);
		if (_tmp851_) {
			ValaSymbol* _tmp852_;
			_tmp852_ = self->symbol;
			_tmp849_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp852_, VALA_TYPE_NAMESPACE);
		} else {
			_tmp849_ = FALSE;
		}
		if (_tmp849_) {
			gboolean _tmp853_ = FALSE;
			const gchar* _tmp854_;
			const gchar* _tmp855_;
			_tmp854_ = self->name;
			_tmp855_ = gir_name;
			if (g_strcmp0 (_tmp854_, _tmp855_) != 0) {
				_tmp853_ = TRUE;
			} else {
				const gchar* _tmp856_;
				const gchar* _tmp857_;
				_tmp856_ = gir_name;
				_tmp857_ = default_gir_name;
				_tmp853_ = g_strcmp0 (_tmp856_, _tmp857_) != 0;
			}
			_tmp848_ = _tmp853_;
		} else {
			_tmp848_ = FALSE;
		}
		if (_tmp848_) {
			ValaSymbol* _tmp858_;
			const gchar* _tmp859_;
			_tmp858_ = self->symbol;
			_tmp859_ = gir_name;
			vala_code_node_set_attribute_string ((ValaCodeNode*) _tmp858_, "GIR", "name", _tmp859_, NULL);
		}
		_g_free0 (default_gir_name);
		_g_free0 (gir_name);
	}
	_tmp862_ = self->new_symbol;
	if (_tmp862_) {
		gboolean _tmp863_;
		_tmp863_ = self->merged;
		_tmp861_ = _tmp863_;
	} else {
		_tmp861_ = FALSE;
	}
	if (!_tmp861_) {
		ValaSymbol* _tmp864_;
		gboolean _tmp865_;
		_tmp864_ = self->symbol;
		_tmp865_ = vala_gir_parser_is_container (_tmp864_);
		_tmp860_ = _tmp865_;
	} else {
		_tmp860_ = FALSE;
	}
	if (_tmp860_) {
		ValaClass* cl = NULL;
		ValaSymbol* _tmp920_;
		ValaClass* _tmp921_;
		gboolean _tmp922_ = FALSE;
		gboolean _tmp923_ = FALSE;
		ValaClass* _tmp924_;
		{
			ValaArrayList* _node_list = NULL;
			ValaArrayList* _tmp866_;
			ValaArrayList* _tmp867_;
			gint _node_size = 0;
			ValaArrayList* _tmp868_;
			gint _tmp869_;
			gint _tmp870_;
			gint _node_index = 0;
			_tmp866_ = self->members;
			_tmp867_ = _vala_iterable_ref0 (_tmp866_);
			_node_list = _tmp867_;
			_tmp868_ = _node_list;
			_tmp869_ = vala_collection_get_size ((ValaCollection*) _tmp868_);
			_tmp870_ = _tmp869_;
			_node_size = _tmp870_;
			_node_index = -1;
			while (TRUE) {
				gint _tmp871_;
				gint _tmp872_;
				gint _tmp873_;
				ValaGirParserNode* node = NULL;
				ValaArrayList* _tmp874_;
				gint _tmp875_;
				gpointer _tmp876_;
				gboolean _tmp877_ = FALSE;
				guint64 _tmp878_;
				ValaGirParserNode* _tmp887_;
				gboolean _tmp888_;
				ValaGirParserNode* _tmp893_;
				const gchar* _tmp894_;
				ValaGirParserNode* _tmp901_;
				const gchar* _tmp902_;
				gboolean _tmp909_ = FALSE;
				gboolean _tmp910_ = FALSE;
				ValaGirParserNode* _tmp911_;
				gboolean _tmp912_;
				_tmp871_ = _node_index;
				_node_index = _tmp871_ + 1;
				_tmp872_ = _node_index;
				_tmp873_ = _node_size;
				if (!(_tmp872_ < _tmp873_)) {
					break;
				}
				_tmp874_ = _node_list;
				_tmp875_ = _node_index;
				_tmp876_ = vala_list_get ((ValaList*) _tmp874_, _tmp875_);
				node = (ValaGirParserNode*) _tmp876_;
				_tmp878_ = self->deprecated_version;
				if (_tmp878_ > ((guint64) 0)) {
					ValaGirParserNode* _tmp879_;
					guint64 _tmp880_;
					_tmp879_ = node;
					_tmp880_ = _tmp879_->deprecated_version;
					_tmp877_ = _tmp880_ > ((guint64) 0);
				} else {
					_tmp877_ = FALSE;
				}
				if (_tmp877_) {
					guint64 _tmp881_;
					ValaGirParserNode* _tmp882_;
					guint64 _tmp883_;
					_tmp881_ = self->deprecated_version;
					_tmp882_ = node;
					_tmp883_ = _tmp882_->deprecated_version;
					if (_tmp881_ <= _tmp883_) {
						ValaGirParserNode* _tmp884_;
						ValaGirParserNode* _tmp885_;
						ValaGirParserNode* _tmp886_;
						_tmp884_ = node;
						_tmp884_->deprecated = FALSE;
						_tmp885_ = node;
						_g_free0 (_tmp885_->deprecated_since);
						_tmp885_->deprecated_since = NULL;
						_tmp886_ = node;
						_g_free0 (_tmp886_->deprecated_replacement);
						_tmp886_->deprecated_replacement = NULL;
					}
				}
				_tmp887_ = node;
				_tmp888_ = _tmp887_->deprecated;
				if (_tmp888_) {
					ValaGirParserNode* _tmp889_;
					ValaSymbol* _tmp890_;
					ValaVersionAttribute* _tmp891_;
					ValaVersionAttribute* _tmp892_;
					_tmp889_ = node;
					_tmp890_ = _tmp889_->symbol;
					_tmp891_ = vala_symbol_get_version (_tmp890_);
					_tmp892_ = _tmp891_;
					vala_version_attribute_set_deprecated (_tmp892_, TRUE);
				}
				_tmp893_ = node;
				_tmp894_ = _tmp893_->deprecated_since;
				if (_tmp894_ != NULL) {
					ValaGirParserNode* _tmp895_;
					ValaSymbol* _tmp896_;
					ValaVersionAttribute* _tmp897_;
					ValaVersionAttribute* _tmp898_;
					ValaGirParserNode* _tmp899_;
					const gchar* _tmp900_;
					_tmp895_ = node;
					_tmp896_ = _tmp895_->symbol;
					_tmp897_ = vala_symbol_get_version (_tmp896_);
					_tmp898_ = _tmp897_;
					_tmp899_ = node;
					_tmp900_ = _tmp899_->deprecated_since;
					vala_version_attribute_set_deprecated_since (_tmp898_, _tmp900_);
				}
				_tmp901_ = node;
				_tmp902_ = _tmp901_->deprecated_replacement;
				if (_tmp902_ != NULL) {
					ValaGirParserNode* _tmp903_;
					ValaSymbol* _tmp904_;
					ValaVersionAttribute* _tmp905_;
					ValaVersionAttribute* _tmp906_;
					ValaGirParserNode* _tmp907_;
					const gchar* _tmp908_;
					_tmp903_ = node;
					_tmp904_ = _tmp903_->symbol;
					_tmp905_ = vala_symbol_get_version (_tmp904_);
					_tmp906_ = _tmp905_;
					_tmp907_ = node;
					_tmp908_ = _tmp907_->deprecated_replacement;
					vala_version_attribute_set_replacement (_tmp906_, _tmp908_);
				}
				_tmp911_ = node;
				_tmp912_ = _tmp911_->new_symbol;
				if (_tmp912_) {
					ValaGirParserNode* _tmp913_;
					gboolean _tmp914_;
					_tmp913_ = node;
					_tmp914_ = _tmp913_->merged;
					_tmp910_ = !_tmp914_;
				} else {
					_tmp910_ = FALSE;
				}
				if (_tmp910_) {
					ValaGirParserMetadata* _tmp915_;
					gboolean _tmp916_;
					_tmp915_ = self->metadata;
					_tmp916_ = vala_gir_parser_metadata_get_bool (_tmp915_, VALA_GIR_PARSER_ARGUMENT_TYPE_HIDDEN, FALSE);
					_tmp909_ = !_tmp916_;
				} else {
					_tmp909_ = FALSE;
				}
				if (_tmp909_) {
					ValaSymbol* _tmp917_;
					ValaGirParserNode* _tmp918_;
					ValaSymbol* _tmp919_;
					_tmp917_ = self->symbol;
					_tmp918_ = node;
					_tmp919_ = _tmp918_->symbol;
					vala_gir_parser_add_symbol_to_container (_tmp917_, _tmp919_);
				}
				_vala_gir_parser_node_unref0 (node);
			}
			_vala_iterable_unref0 (_node_list);
		}
		_tmp920_ = self->symbol;
		_tmp921_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp920_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp920_) : NULL);
		cl = _tmp921_;
		_tmp924_ = cl;
		if (_tmp924_ != NULL) {
			ValaClass* _tmp925_;
			gboolean _tmp926_;
			gboolean _tmp927_;
			_tmp925_ = cl;
			_tmp926_ = vala_class_get_is_compact (_tmp925_);
			_tmp927_ = _tmp926_;
			_tmp923_ = !_tmp927_;
		} else {
			_tmp923_ = FALSE;
		}
		if (_tmp923_) {
			ValaClass* _tmp928_;
			ValaCreationMethod* _tmp929_;
			ValaCreationMethod* _tmp930_;
			_tmp928_ = cl;
			_tmp929_ = vala_class_get_default_construction_method (_tmp928_);
			_tmp930_ = _tmp929_;
			_tmp922_ = _tmp930_ == NULL;
		} else {
			_tmp922_ = FALSE;
		}
		if (_tmp922_) {
			ValaCreationMethod* cm = NULL;
			ValaClass* _tmp931_;
			ValaSourceReference* _tmp932_;
			ValaSourceReference* _tmp933_;
			ValaCreationMethod* _tmp934_;
			ValaCreationMethod* _tmp935_;
			ValaCreationMethod* _tmp936_;
			ValaClass* _tmp937_;
			ValaCreationMethod* _tmp938_;
			_tmp931_ = cl;
			_tmp932_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp931_);
			_tmp933_ = _tmp932_;
			_tmp934_ = vala_creation_method_new (NULL, NULL, _tmp933_, NULL);
			cm = _tmp934_;
			_tmp935_ = cm;
			vala_method_set_has_construct_function ((ValaMethod*) _tmp935_, FALSE);
			_tmp936_ = cm;
			vala_symbol_set_access ((ValaSymbol*) _tmp936_, VALA_SYMBOL_ACCESSIBILITY_PROTECTED);
			_tmp937_ = cl;
			_tmp938_ = cm;
			vala_symbol_add_method ((ValaSymbol*) _tmp937_, (ValaMethod*) _tmp938_);
			_vala_code_node_unref0 (cm);
		}
		_vala_code_node_unref0 (cl);
	}
	self->processed = TRUE;
}


static gchar* vala_gir_parser_node_to_string (ValaGirParserNode* self) {
	gchar* result = NULL;
	ValaGirParserNode* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->parent;
	_tmp1_ = _tmp0_->name;
	if (_tmp1_ == NULL) {
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp2_ = self->name;
		_tmp3_ = g_strdup (_tmp2_);
		result = _tmp3_;
		return result;
	} else {
		ValaGirParserNode* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp4_ = self->parent;
		_tmp5_ = vala_gir_parser_node_to_string (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->name;
		_tmp8_ = g_strdup_printf ("%s.%s", _tmp6_, _tmp7_);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp6_);
		result = _tmp9_;
		return result;
	}
}


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


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


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


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


static gchar* vala_gir_parser_value_node_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		ValaGirParserNode * 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 = vala_gir_parser_node_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* vala_gir_parser_value_node_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ValaGirParserNode ** 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 = vala_gir_parser_node_ref (value->data[0].v_pointer);
	}
	return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_node (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaGirParserParamSpecNode* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_NODE), 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 vala_gir_parser_value_get_node (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_NODE), NULL);
	return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_node (GValue* value, gpointer v_object) {
	ValaGirParserNode * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_NODE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_NODE));
		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;
		vala_gir_parser_node_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_gir_parser_node_unref (old);
	}
}


static void vala_gir_parser_value_take_node (GValue* value, gpointer v_object) {
	ValaGirParserNode * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_NODE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_NODE));
		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) {
		vala_gir_parser_node_unref (old);
	}
}


static void vala_gir_parser_node_class_init (ValaGirParserNodeClass * klass) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	vala_gir_parser_node_parent_class = g_type_class_peek_parent (klass);
	((ValaGirParserNodeClass *) klass)->finalize = vala_gir_parser_node_finalize;
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, (GDestroyNotify) vala_gir_parser_node_unref, _tmp0_);
	vala_gir_parser_node_new_namespaces = _tmp1_;
}


static void vala_gir_parser_node_instance_init (ValaGirParserNode * self) {
	ValaGirParserMetadata* _tmp0_;
	ValaGirParserMetadata* _tmp1_;
	ValaGirParserMetadata* _tmp2_;
	GEqualFunc _tmp3_;
	ValaArrayList* _tmp4_;
	GHashFunc _tmp5_;
	GEqualFunc _tmp6_;
	GEqualFunc _tmp7_;
	ValaHashMap* _tmp8_;
	self->girdata = NULL;
	_tmp0_ = vala_gir_parser_metadata_get_empty ();
	_tmp1_ = _tmp0_;
	_tmp2_ = _vala_gir_parser_metadata_ref0 (_tmp1_);
	self->metadata = _tmp2_;
	self->source_reference = NULL;
	_tmp3_ = g_direct_equal;
	_tmp4_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_NODE, (GBoxedCopyFunc) vala_gir_parser_node_ref, (GDestroyNotify) vala_gir_parser_node_unref, _tmp3_);
	self->members = _tmp4_;
	_tmp5_ = g_str_hash;
	_tmp6_ = g_str_equal;
	_tmp7_ = g_direct_equal;
	_tmp8_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VALA_TYPE_ARRAY_LIST, (GBoxedCopyFunc) vala_iterable_ref, (GDestroyNotify) vala_iterable_unref, _tmp5_, _tmp6_, _tmp7_);
	self->scope = _tmp8_;
	self->return_array_length_idx = -1;
	self->array_length_idx = -1;
	self->deprecated = FALSE;
	self->deprecated_version = (guint64) 0;
	self->deprecated_since = NULL;
	self->deprecated_replacement = NULL;
	self->ref_count = 1;
}


static void vala_gir_parser_node_finalize (ValaGirParserNode * obj) {
	ValaGirParserNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_GIR_PARSER_TYPE_NODE, ValaGirParserNode);
	g_signal_handlers_destroy (self);
	_g_free0 (self->element_type);
	_g_free0 (self->name);
	_vala_map_unref0 (self->girdata);
	_vala_gir_parser_metadata_unref0 (self->metadata);
	_vala_source_reference_unref0 (self->source_reference);
	_vala_iterable_unref0 (self->members);
	_vala_map_unref0 (self->scope);
	_vala_comment_unref0 (self->comment);
	_vala_code_node_unref0 (self->symbol);
	_vala_iterable_unref0 (self->parameters);
	_vala_iterable_unref0 (self->array_length_parameters);
	_vala_iterable_unref0 (self->closure_parameters);
	_vala_iterable_unref0 (self->destroy_parameters);
	_vala_code_node_unref0 (self->gtype_struct_for);
	_vala_code_node_unref0 (self->base_type);
	_g_free0 (self->deprecated_since);
	_g_free0 (self->deprecated_replacement);
}


static GType vala_gir_parser_node_get_type (void) {
	static volatile gsize vala_gir_parser_node_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_node_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_node_init, vala_gir_parser_value_node_free_value, vala_gir_parser_value_node_copy_value, vala_gir_parser_value_node_peek_pointer, "p", vala_gir_parser_value_node_collect_value, "p", vala_gir_parser_value_node_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserNode), 0, (GInstanceInitFunc) vala_gir_parser_node_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 vala_gir_parser_node_type_id;
		vala_gir_parser_node_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserNode", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&vala_gir_parser_node_type_id__volatile, vala_gir_parser_node_type_id);
	}
	return vala_gir_parser_node_type_id__volatile;
}


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


static void vala_gir_parser_node_unref (gpointer instance) {
	ValaGirParserNode * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_GIR_PARSER_NODE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static ValaGirParserParameterInfo* vala_gir_parser_parameter_info_construct (GType object_type, ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx, gboolean is_async) {
	ValaGirParserParameterInfo* self = NULL;
	ValaParameter* _tmp0_;
	ValaParameter* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gboolean _tmp5_;
	g_return_val_if_fail (param != NULL, NULL);
	self = (ValaGirParserParameterInfo*) g_type_create_instance (object_type);
	_tmp0_ = param;
	_tmp1_ = _vala_code_node_ref0 (_tmp0_);
	_vala_code_node_unref0 (self->param);
	self->param = _tmp1_;
	_tmp2_ = array_length_idx;
	self->array_length_idx = _tmp2_;
	_tmp3_ = closure_idx;
	self->closure_idx = _tmp3_;
	_tmp4_ = destroy_idx;
	self->destroy_idx = _tmp4_;
	self->vala_idx = 0.0F;
	self->keep = TRUE;
	_tmp5_ = is_async;
	self->is_async = _tmp5_;
	return self;
}


static ValaGirParserParameterInfo* vala_gir_parser_parameter_info_new (ValaParameter* param, gint array_length_idx, gint closure_idx, gint destroy_idx, gboolean is_async) {
	return vala_gir_parser_parameter_info_construct (VALA_GIR_PARSER_TYPE_PARAMETER_INFO, param, array_length_idx, closure_idx, destroy_idx, is_async);
}


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


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


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


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


static gchar* vala_gir_parser_value_parameter_info_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		ValaGirParserParameterInfo * 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 = vala_gir_parser_parameter_info_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* vala_gir_parser_value_parameter_info_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ValaGirParserParameterInfo ** 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 = vala_gir_parser_parameter_info_ref (value->data[0].v_pointer);
	}
	return NULL;
}


static GParamSpec* vala_gir_parser_param_spec_parameter_info (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ValaGirParserParamSpecParameterInfo* spec;
	g_return_val_if_fail (g_type_is_a (object_type, VALA_GIR_PARSER_TYPE_PARAMETER_INFO), 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 vala_gir_parser_value_get_parameter_info (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_PARAMETER_INFO), NULL);
	return value->data[0].v_pointer;
}


static void vala_gir_parser_value_set_parameter_info (GValue* value, gpointer v_object) {
	ValaGirParserParameterInfo * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_PARAMETER_INFO));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_PARAMETER_INFO));
		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;
		vala_gir_parser_parameter_info_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		vala_gir_parser_parameter_info_unref (old);
	}
}


static void vala_gir_parser_value_take_parameter_info (GValue* value, gpointer v_object) {
	ValaGirParserParameterInfo * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_GIR_PARSER_TYPE_PARAMETER_INFO));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_GIR_PARSER_TYPE_PARAMETER_INFO));
		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) {
		vala_gir_parser_parameter_info_unref (old);
	}
}


static void vala_gir_parser_parameter_info_class_init (ValaGirParserParameterInfoClass * klass) {
	vala_gir_parser_parameter_info_parent_class = g_type_class_peek_parent (klass);
	((ValaGirParserParameterInfoClass *) klass)->finalize = vala_gir_parser_parameter_info_finalize;
}


static void vala_gir_parser_parameter_info_instance_init (ValaGirParserParameterInfo * self) {
	self->ref_count = 1;
}


static void vala_gir_parser_parameter_info_finalize (ValaGirParserParameterInfo * obj) {
	ValaGirParserParameterInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_GIR_PARSER_TYPE_PARAMETER_INFO, ValaGirParserParameterInfo);
	g_signal_handlers_destroy (self);
	_vala_code_node_unref0 (self->param);
}


static GType vala_gir_parser_parameter_info_get_type (void) {
	static volatile gsize vala_gir_parser_parameter_info_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_parameter_info_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { vala_gir_parser_value_parameter_info_init, vala_gir_parser_value_parameter_info_free_value, vala_gir_parser_value_parameter_info_copy_value, vala_gir_parser_value_parameter_info_peek_pointer, "p", vala_gir_parser_value_parameter_info_collect_value, "p", vala_gir_parser_value_parameter_info_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserParameterInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_parameter_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParserParameterInfo), 0, (GInstanceInitFunc) vala_gir_parser_parameter_info_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 vala_gir_parser_parameter_info_type_id;
		vala_gir_parser_parameter_info_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaGirParserParameterInfo", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&vala_gir_parser_parameter_info_type_id__volatile, vala_gir_parser_parameter_info_type_id);
	}
	return vala_gir_parser_parameter_info_type_id__volatile;
}


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


static void vala_gir_parser_parameter_info_unref (gpointer instance) {
	ValaGirParserParameterInfo * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		VALA_GIR_PARSER_PARAMETER_INFO_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static void vala_gir_parser_class_init (ValaGirParserClass * klass) {
	vala_gir_parser_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->finalize = vala_gir_parser_finalize;
	g_type_class_add_private (klass, sizeof (ValaGirParserPrivate));
	((ValaCodeVisitorClass *) klass)->visit_source_file = (void (*) (ValaCodeVisitor *, ValaSourceFile*)) vala_gir_parser_real_visit_source_file;
}


static void vala_gir_parser_instance_init (ValaGirParser * self) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	GHashFunc _tmp2_;
	GEqualFunc _tmp3_;
	ValaHashSet* _tmp4_;
	GEqualFunc _tmp5_;
	ValaHashMap* _tmp6_;
	GEqualFunc _tmp7_;
	ValaArrayList* _tmp8_;
	GEqualFunc _tmp9_;
	ValaArrayList* _tmp10_;
	self->priv = VALA_GIR_PARSER_GET_PRIVATE (self);
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (VALA_GIR_PARSER_TYPE_METADATA, (GBoxedCopyFunc) vala_gir_parser_metadata_ref, (GDestroyNotify) vala_gir_parser_metadata_unref, _tmp0_);
	self->priv->metadata_roots = _tmp1_;
	_tmp2_ = g_str_hash;
	_tmp3_ = g_str_equal;
	_tmp4_ = vala_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp2_, _tmp3_);
	self->priv->provided_namespaces = (ValaSet*) _tmp4_;
	_tmp5_ = g_direct_equal;
	_tmp6_ = vala_hash_map_new (VALA_TYPE_UNRESOLVED_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _vala_gir_parser_unresolved_symbol_hash_ghash_func, _vala_gir_parser_unresolved_symbol_equal_gequal_func, _tmp5_);
	self->priv->unresolved_symbols_map = _tmp6_;
	_tmp7_ = g_direct_equal;
	_tmp8_ = vala_array_list_new (VALA_TYPE_UNRESOLVED_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp7_);
	self->priv->unresolved_gir_symbols = _tmp8_;
	_tmp9_ = g_direct_equal;
	_tmp10_ = vala_array_list_new (VALA_TYPE_DATA_TYPE, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp9_);
	self->priv->unresolved_type_arguments = _tmp10_;
}


static void vala_gir_parser_finalize (ValaCodeVisitor * obj) {
	ValaGirParser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_GIR_PARSER, ValaGirParser);
	_vala_markup_reader_unref0 (self->priv->reader);
	_vala_code_context_unref0 (self->priv->context);
	_vala_code_node_unref0 (self->priv->glib_ns);
	_vala_source_file_unref0 (self->priv->current_source_file);
	_vala_gir_parser_node_unref0 (self->priv->root);
	_vala_iterable_unref0 (self->priv->metadata_roots);
	self->priv->cheader_filenames = (_vala_array_free (self->priv->cheader_filenames, self->priv->cheader_filenames_length1, (GDestroyNotify) g_free), NULL);
	_vala_iterable_unref0 (self->priv->metadata_stack);
	_vala_gir_parser_metadata_unref0 (self->priv->metadata);
	_vala_iterable_unref0 (self->priv->tree_stack);
	_vala_gir_parser_node_unref0 (self->priv->current);
	_vala_gir_parser_node_unref0 (self->priv->old_current);
	_vala_iterable_unref0 (self->priv->provided_namespaces);
	_vala_map_unref0 (self->priv->unresolved_symbols_map);
	_vala_iterable_unref0 (self->priv->unresolved_gir_symbols);
	_vala_iterable_unref0 (self->priv->unresolved_type_arguments);
	VALA_CODE_VISITOR_CLASS (vala_gir_parser_parent_class)->finalize (obj);
}


/**
 * Code visitor parsing all GIR source files.
 *
 * Pipeline:
 * 1) Parse metadata
 * 2) Parse GIR with metadata, track unresolved GIR symbols, create Vala symbols
 * 3) Reconciliate the tree by mapping tracked symbols
 * 4) Process the tree
 */
GType vala_gir_parser_get_type (void) {
	static volatile gsize vala_gir_parser_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gir_parser_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaGirParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gir_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGirParser), 0, (GInstanceInitFunc) vala_gir_parser_instance_init, NULL };
		GType vala_gir_parser_type_id;
		vala_gir_parser_type_id = g_type_register_static (VALA_TYPE_CODE_VISITOR, "ValaGirParser", &g_define_type_info, 0);
		g_once_init_leave (&vala_gir_parser_type_id__volatile, vala_gir_parser_type_id);
	}
	return vala_gir_parser_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;
}



