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

/* valagtkmodule.vala
 *
 * Copyright (C) 2013  Jürg Billeter
 * Copyright (C) 2013-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:
 * 	Luca Bruno <lucabru@src.gnome.org>
 */

#include <glib.h>
#include <glib-object.h>
#include <vala.h>
#include <valaccode.h>
#include <valagee.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>


#define VALA_TYPE_CCODE_BASE_MODULE (vala_ccode_base_module_get_type ())
#define VALA_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModule))
#define VALA_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))
#define VALA_IS_CCODE_BASE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_IS_CCODE_BASE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_BASE_MODULE))
#define VALA_CCODE_BASE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_BASE_MODULE, ValaCCodeBaseModuleClass))

typedef struct _ValaCCodeBaseModule ValaCCodeBaseModule;
typedef struct _ValaCCodeBaseModuleClass ValaCCodeBaseModuleClass;
typedef struct _ValaCCodeBaseModulePrivate ValaCCodeBaseModulePrivate;

#define VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT (vala_ccode_base_module_emit_context_get_type ())
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContext))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_IS_EMIT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT))
#define VALA_CCODE_BASE_MODULE_EMIT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_CCODE_BASE_MODULE_TYPE_EMIT_CONTEXT, ValaCCodeBaseModuleEmitContextClass))

typedef struct _ValaCCodeBaseModuleEmitContext ValaCCodeBaseModuleEmitContext;
typedef struct _ValaCCodeBaseModuleEmitContextClass ValaCCodeBaseModuleEmitContextClass;

#define VALA_TYPE_CCODE_STRUCT_MODULE (vala_ccode_struct_module_get_type ())
#define VALA_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModule))
#define VALA_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))
#define VALA_IS_CCODE_STRUCT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_IS_CCODE_STRUCT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_STRUCT_MODULE))
#define VALA_CCODE_STRUCT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_STRUCT_MODULE, ValaCCodeStructModuleClass))

typedef struct _ValaCCodeStructModule ValaCCodeStructModule;
typedef struct _ValaCCodeStructModuleClass ValaCCodeStructModuleClass;
typedef struct _ValaCCodeStructModulePrivate ValaCCodeStructModulePrivate;

#define VALA_TYPE_CCODE_METHOD_MODULE (vala_ccode_method_module_get_type ())
#define VALA_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModule))
#define VALA_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass))
#define VALA_IS_CCODE_METHOD_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_MODULE))
#define VALA_IS_CCODE_METHOD_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_MODULE))
#define VALA_CCODE_METHOD_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_MODULE, ValaCCodeMethodModuleClass))

typedef struct _ValaCCodeMethodModule ValaCCodeMethodModule;
typedef struct _ValaCCodeMethodModuleClass ValaCCodeMethodModuleClass;
typedef struct _ValaCCodeMethodModulePrivate ValaCCodeMethodModulePrivate;

#define VALA_TYPE_CCODE_CONTROL_FLOW_MODULE (vala_ccode_control_flow_module_get_type ())
#define VALA_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModule))
#define VALA_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_IS_CCODE_CONTROL_FLOW_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE))
#define VALA_CCODE_CONTROL_FLOW_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_CONTROL_FLOW_MODULE, ValaCCodeControlFlowModuleClass))

typedef struct _ValaCCodeControlFlowModule ValaCCodeControlFlowModule;
typedef struct _ValaCCodeControlFlowModuleClass ValaCCodeControlFlowModuleClass;
typedef struct _ValaCCodeControlFlowModulePrivate ValaCCodeControlFlowModulePrivate;

#define VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE (vala_ccode_member_access_module_get_type ())
#define VALA_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModule))
#define VALA_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass))
#define VALA_IS_CCODE_MEMBER_ACCESS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE))
#define VALA_IS_CCODE_MEMBER_ACCESS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE))
#define VALA_CCODE_MEMBER_ACCESS_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_MEMBER_ACCESS_MODULE, ValaCCodeMemberAccessModuleClass))

typedef struct _ValaCCodeMemberAccessModule ValaCCodeMemberAccessModule;
typedef struct _ValaCCodeMemberAccessModuleClass ValaCCodeMemberAccessModuleClass;
typedef struct _ValaCCodeMemberAccessModulePrivate ValaCCodeMemberAccessModulePrivate;

#define VALA_TYPE_CCODE_ASSIGNMENT_MODULE (vala_ccode_assignment_module_get_type ())
#define VALA_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModule))
#define VALA_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass))
#define VALA_IS_CCODE_ASSIGNMENT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE))
#define VALA_IS_CCODE_ASSIGNMENT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ASSIGNMENT_MODULE))
#define VALA_CCODE_ASSIGNMENT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ASSIGNMENT_MODULE, ValaCCodeAssignmentModuleClass))

typedef struct _ValaCCodeAssignmentModule ValaCCodeAssignmentModule;
typedef struct _ValaCCodeAssignmentModuleClass ValaCCodeAssignmentModuleClass;
typedef struct _ValaCCodeAssignmentModulePrivate ValaCCodeAssignmentModulePrivate;

#define VALA_TYPE_CCODE_METHOD_CALL_MODULE (vala_ccode_method_call_module_get_type ())
#define VALA_CCODE_METHOD_CALL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModule))
#define VALA_CCODE_METHOD_CALL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModuleClass))
#define VALA_IS_CCODE_METHOD_CALL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE))
#define VALA_IS_CCODE_METHOD_CALL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_METHOD_CALL_MODULE))
#define VALA_CCODE_METHOD_CALL_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_METHOD_CALL_MODULE, ValaCCodeMethodCallModuleClass))

typedef struct _ValaCCodeMethodCallModule ValaCCodeMethodCallModule;
typedef struct _ValaCCodeMethodCallModuleClass ValaCCodeMethodCallModuleClass;
typedef struct _ValaCCodeMethodCallModulePrivate ValaCCodeMethodCallModulePrivate;

#define VALA_TYPE_CCODE_ARRAY_MODULE (vala_ccode_array_module_get_type ())
#define VALA_CCODE_ARRAY_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModule))
#define VALA_CCODE_ARRAY_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModuleClass))
#define VALA_IS_CCODE_ARRAY_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_ARRAY_MODULE))
#define VALA_IS_CCODE_ARRAY_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_ARRAY_MODULE))
#define VALA_CCODE_ARRAY_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_ARRAY_MODULE, ValaCCodeArrayModuleClass))

typedef struct _ValaCCodeArrayModule ValaCCodeArrayModule;
typedef struct _ValaCCodeArrayModuleClass ValaCCodeArrayModuleClass;
typedef struct _ValaCCodeArrayModulePrivate ValaCCodeArrayModulePrivate;

#define VALA_TYPE_CCODE_DELEGATE_MODULE (vala_ccode_delegate_module_get_type ())
#define VALA_CCODE_DELEGATE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_DELEGATE_MODULE, ValaCCodeDelegateModule))
#define VALA_CCODE_DELEGATE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_DELEGATE_MODULE, ValaCCodeDelegateModuleClass))
#define VALA_IS_CCODE_DELEGATE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_DELEGATE_MODULE))
#define VALA_IS_CCODE_DELEGATE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_DELEGATE_MODULE))
#define VALA_CCODE_DELEGATE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_DELEGATE_MODULE, ValaCCodeDelegateModuleClass))

typedef struct _ValaCCodeDelegateModule ValaCCodeDelegateModule;
typedef struct _ValaCCodeDelegateModuleClass ValaCCodeDelegateModuleClass;
typedef struct _ValaCCodeDelegateModulePrivate ValaCCodeDelegateModulePrivate;

#define VALA_TYPE_GERROR_MODULE (vala_gerror_module_get_type ())
#define VALA_GERROR_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GERROR_MODULE, ValaGErrorModule))
#define VALA_GERROR_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GERROR_MODULE, ValaGErrorModuleClass))
#define VALA_IS_GERROR_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GERROR_MODULE))
#define VALA_IS_GERROR_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GERROR_MODULE))
#define VALA_GERROR_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GERROR_MODULE, ValaGErrorModuleClass))

typedef struct _ValaGErrorModule ValaGErrorModule;
typedef struct _ValaGErrorModuleClass ValaGErrorModuleClass;
typedef struct _ValaGErrorModulePrivate ValaGErrorModulePrivate;

#define VALA_TYPE_GTYPE_MODULE (vala_gtype_module_get_type ())
#define VALA_GTYPE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GTYPE_MODULE, ValaGTypeModule))
#define VALA_GTYPE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GTYPE_MODULE, ValaGTypeModuleClass))
#define VALA_IS_GTYPE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GTYPE_MODULE))
#define VALA_IS_GTYPE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GTYPE_MODULE))
#define VALA_GTYPE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GTYPE_MODULE, ValaGTypeModuleClass))

typedef struct _ValaGTypeModule ValaGTypeModule;
typedef struct _ValaGTypeModuleClass ValaGTypeModuleClass;
typedef struct _ValaGTypeModulePrivate ValaGTypeModulePrivate;

#define VALA_TYPE_GOBJECT_MODULE (vala_gobject_module_get_type ())
#define VALA_GOBJECT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GOBJECT_MODULE, ValaGObjectModule))
#define VALA_GOBJECT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GOBJECT_MODULE, ValaGObjectModuleClass))
#define VALA_IS_GOBJECT_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GOBJECT_MODULE))
#define VALA_IS_GOBJECT_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GOBJECT_MODULE))
#define VALA_GOBJECT_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GOBJECT_MODULE, ValaGObjectModuleClass))

typedef struct _ValaGObjectModule ValaGObjectModule;
typedef struct _ValaGObjectModuleClass ValaGObjectModuleClass;
typedef struct _ValaGObjectModulePrivate ValaGObjectModulePrivate;

#define VALA_TYPE_GSIGNAL_MODULE (vala_gsignal_module_get_type ())
#define VALA_GSIGNAL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModule))
#define VALA_GSIGNAL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModuleClass))
#define VALA_IS_GSIGNAL_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GSIGNAL_MODULE))
#define VALA_IS_GSIGNAL_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GSIGNAL_MODULE))
#define VALA_GSIGNAL_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModuleClass))

typedef struct _ValaGSignalModule ValaGSignalModule;
typedef struct _ValaGSignalModuleClass ValaGSignalModuleClass;
typedef struct _ValaGSignalModulePrivate ValaGSignalModulePrivate;

#define VALA_TYPE_GTK_MODULE (vala_gtk_module_get_type ())
#define VALA_GTK_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_GTK_MODULE, ValaGtkModule))
#define VALA_GTK_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_GTK_MODULE, ValaGtkModuleClass))
#define VALA_IS_GTK_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_GTK_MODULE))
#define VALA_IS_GTK_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_GTK_MODULE))
#define VALA_GTK_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_GTK_MODULE, ValaGtkModuleClass))

typedef struct _ValaGtkModule ValaGtkModule;
typedef struct _ValaGtkModuleClass ValaGtkModuleClass;
typedef struct _ValaGtkModulePrivate ValaGtkModulePrivate;
#define _vala_map_unref0(var) ((var == NULL) ? NULL : (var = (vala_map_unref (var), NULL)))
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _vala_markup_reader_unref0(var) ((var == NULL) ? NULL : (var = (vala_markup_reader_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))

struct _ValaCCodeBaseModule {
	ValaCodeGenerator parent_instance;
	ValaCCodeBaseModulePrivate * priv;
	ValaSymbol* root_symbol;
	ValaCCodeBaseModuleEmitContext* emit_context;
	ValaCCodeLineDirective* current_line;
	ValaCCodeFile* header_file;
	ValaCCodeFile* internal_header_file;
	ValaCCodeFile* cfile;
	ValaCCodeBaseModuleEmitContext* class_init_context;
	ValaCCodeBaseModuleEmitContext* base_init_context;
	ValaCCodeBaseModuleEmitContext* class_finalize_context;
	ValaCCodeBaseModuleEmitContext* base_finalize_context;
	ValaCCodeBaseModuleEmitContext* instance_init_context;
	ValaCCodeBaseModuleEmitContext* instance_finalize_context;
	ValaCCodeStruct* param_spec_struct;
	ValaCCodeStruct* closure_struct;
	ValaCCodeEnum* prop_enum;
	ValaCCodeEnum* signal_enum;
	ValaSet* user_marshal_set;
	ValaSet* predefined_marshal_set;
	gint next_regex_id;
	gint next_coroutine_state G_GNUC_DEPRECATED;
	ValaDataType* void_type;
	ValaDataType* bool_type;
	ValaDataType* char_type;
	ValaDataType* uchar_type;
	ValaDataType* unichar_type;
	ValaDataType* short_type;
	ValaDataType* ushort_type;
	ValaDataType* int_type;
	ValaDataType* uint_type;
	ValaDataType* long_type;
	ValaDataType* ulong_type;
	ValaDataType* int8_type;
	ValaDataType* uint8_type;
	ValaDataType* int16_type;
	ValaDataType* uint16_type;
	ValaDataType* int32_type;
	ValaDataType* uint32_type;
	ValaDataType* int64_type;
	ValaDataType* uint64_type;
	ValaDataType* string_type;
	ValaDataType* regex_type;
	ValaDataType* float_type;
	ValaDataType* double_type;
	ValaTypeSymbol* gtype_type;
	ValaTypeSymbol* gobject_type;
	ValaErrorType* gerror_type;
	ValaClass* glist_type;
	ValaClass* gslist_type;
	ValaClass* gnode_type;
	ValaClass* gqueue_type;
	ValaClass* gvaluearray_type;
	ValaTypeSymbol* gstringbuilder_type;
	ValaTypeSymbol* garray_type;
	ValaTypeSymbol* gbytearray_type;
	ValaTypeSymbol* gptrarray_type;
	ValaTypeSymbol* gthreadpool_type;
	ValaDataType* gdestroynotify_type;
	ValaDataType* gquark_type;
	ValaStruct* gvalue_type;
	ValaClass* gvariant_type;
	ValaStruct* mutex_type;
	ValaStruct* gmutex_type;
	ValaStruct* grecmutex_type;
	ValaStruct* grwlock_type;
	ValaStruct* gcond_type;
	ValaClass* gsource_type;
	ValaTypeSymbol* type_module_type;
	ValaTypeSymbol* dbus_proxy_type;
	ValaClass* gtk_widget_type;
	gboolean in_plugin;
	gchar* module_init_param_name;
	gboolean gvaluecollector_h_needed;
	gboolean requires_assert;
	gboolean requires_array_free;
	gboolean requires_array_move;
	gboolean requires_array_length;
	gboolean requires_clear_mutex;
	ValaSet* wrappers;
};

struct _ValaCCodeBaseModuleClass {
	ValaCodeGeneratorClass parent_class;
	void (*append_vala_array_free) (ValaCCodeBaseModule* self);
	void (*append_vala_array_move) (ValaCCodeBaseModule* self);
	void (*append_vala_array_length) (ValaCCodeBaseModule* self);
	gboolean (*generate_enum_declaration) (ValaCCodeBaseModule* self, ValaEnum* en, ValaCCodeFile* decl_space);
	void (*generate_class_struct_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
	void (*generate_struct_declaration) (ValaCCodeBaseModule* self, ValaStruct* st, ValaCCodeFile* decl_space);
	void (*generate_delegate_declaration) (ValaCCodeBaseModule* self, ValaDelegate* d, ValaCCodeFile* decl_space);
	void (*generate_cparameters) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
	ValaCCodeExpression* (*get_dup_func_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
	gchar* (*append_struct_array_free) (ValaCCodeBaseModule* self, ValaStruct* st);
	ValaCCodeExpression* (*destroy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition);
	void (*append_scope_free) (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCodeNode* stop_at);
	ValaTargetValue* (*get_local_cvalue) (ValaCCodeBaseModule* self, ValaLocalVariable* local);
	ValaTargetValue* (*get_parameter_cvalue) (ValaCCodeBaseModule* self, ValaParameter* param);
	ValaTargetValue* (*get_field_cvalue) (ValaCCodeBaseModule* self, ValaField* field, ValaTargetValue* instance);
	ValaTargetValue* (*load_variable) (ValaCCodeBaseModule* self, ValaVariable* variable, ValaTargetValue* value);
	ValaTargetValue* (*load_this_parameter) (ValaCCodeBaseModule* self, ValaTypeSymbol* sym);
	void (*store_value) (ValaCCodeBaseModule* self, ValaTargetValue* lvalue, ValaTargetValue* value);
	gchar* (*get_delegate_target_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
	ValaCCodeExpression* (*get_delegate_target_cexpression) (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression* * delegate_target_destroy_notify);
	ValaCCodeExpression* (*get_delegate_target_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
	ValaCCodeExpression* (*get_delegate_target_destroy_notify_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
	gchar* (*get_delegate_target_destroy_notify_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
	ValaTargetValue* (*copy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, ValaCodeNode* node);
	void (*generate_class_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeFile* decl_space);
	void (*generate_interface_declaration) (ValaCCodeBaseModule* self, ValaInterface* iface, ValaCCodeFile* decl_space);
	void (*generate_method_declaration) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space);
	void (*generate_error_domain_declaration) (ValaCCodeBaseModule* self, ValaErrorDomain* edomain, ValaCCodeFile* decl_space);
	ValaCCodeExpression* (*deserialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr, gboolean* may_fail);
	ValaCCodeExpression* (*serialize_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeExpression* expr);
	ValaCCodeExpression* (*get_implicit_cast_expression) (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaCodeNode* node);
	void (*create_type_check_statement) (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const gchar* var_name);
	gboolean (*is_gobject_property) (ValaCCodeBaseModule* self, ValaProperty* prop);
	void (*generate_dynamic_method_wrapper) (ValaCCodeBaseModule* self, ValaDynamicMethod* method);
	gboolean (*method_has_wrapper) (ValaCCodeBaseModule* self, ValaMethod* method);
	ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeBaseModule* self, ValaProperty* prop);
	ValaCCodeExpression* (*get_signal_creation) (ValaCCodeBaseModule* self, ValaSignal* sig, ValaTypeSymbol* type);
	void (*register_dbus_info) (ValaCCodeBaseModule* self, ValaCCodeBlock* block, ValaObjectTypeSymbol* bindable);
	gchar* (*get_dynamic_property_getter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node);
	gchar* (*get_dynamic_property_setter_cname) (ValaCCodeBaseModule* self, ValaDynamicProperty* node);
	gchar* (*get_dynamic_signal_cname) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeBaseModule* self, ValaDynamicSignal* node);
	gchar* (*get_array_length_cname) (ValaCCodeBaseModule* self, const gchar* array_cname, gint dim);
	gchar* (*get_parameter_array_length_cname) (ValaCCodeBaseModule* self, ValaParameter* param, gint dim);
	ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeBaseModule* self, ValaExpression* array_expr, gint dim);
	ValaCCodeExpression* (*get_array_length_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value, gint dim);
	gchar* (*get_array_size_cname) (ValaCCodeBaseModule* self, const gchar* array_cname);
	void (*add_simple_check) (ValaCCodeBaseModule* self, ValaCodeNode* node, gboolean always_fails);
	gchar* (*generate_ready_function) (ValaCCodeBaseModule* self, ValaMethod* m);
};

struct _ValaCCodeStructModule {
	ValaCCodeBaseModule parent_instance;
	ValaCCodeStructModulePrivate * priv;
};

struct _ValaCCodeStructModuleClass {
	ValaCCodeBaseModuleClass parent_class;
};

struct _ValaCCodeMethodModule {
	ValaCCodeStructModule parent_instance;
	ValaCCodeMethodModulePrivate * priv;
};

struct _ValaCCodeMethodModuleClass {
	ValaCCodeStructModuleClass parent_class;
	void (*generate_method_result_declaration) (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map);
	ValaCCodeParameter* (*generate_parameter) (ValaCCodeMethodModule* self, ValaParameter* param, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
};

struct _ValaCCodeControlFlowModule {
	ValaCCodeMethodModule parent_instance;
	ValaCCodeControlFlowModulePrivate * priv;
};

struct _ValaCCodeControlFlowModuleClass {
	ValaCCodeMethodModuleClass parent_class;
};

struct _ValaCCodeMemberAccessModule {
	ValaCCodeControlFlowModule parent_instance;
	ValaCCodeMemberAccessModulePrivate * priv;
};

struct _ValaCCodeMemberAccessModuleClass {
	ValaCCodeControlFlowModuleClass parent_class;
};

struct _ValaCCodeAssignmentModule {
	ValaCCodeMemberAccessModule parent_instance;
	ValaCCodeAssignmentModulePrivate * priv;
};

struct _ValaCCodeAssignmentModuleClass {
	ValaCCodeMemberAccessModuleClass parent_class;
};

struct _ValaCCodeMethodCallModule {
	ValaCCodeAssignmentModule parent_instance;
	ValaCCodeMethodCallModulePrivate * priv;
};

struct _ValaCCodeMethodCallModuleClass {
	ValaCCodeAssignmentModuleClass parent_class;
};

struct _ValaCCodeArrayModule {
	ValaCCodeMethodCallModule parent_instance;
	ValaCCodeArrayModulePrivate * priv;
};

struct _ValaCCodeArrayModuleClass {
	ValaCCodeMethodCallModuleClass parent_class;
};

struct _ValaCCodeDelegateModule {
	ValaCCodeArrayModule parent_instance;
	ValaCCodeDelegateModulePrivate * priv;
};

struct _ValaCCodeDelegateModuleClass {
	ValaCCodeArrayModuleClass parent_class;
};

struct _ValaGErrorModule {
	ValaCCodeDelegateModule parent_instance;
	ValaGErrorModulePrivate * priv;
};

struct _ValaGErrorModuleClass {
	ValaCCodeDelegateModuleClass parent_class;
	void (*return_with_exception) (ValaGErrorModule* self, ValaCCodeExpression* error_expr);
};

struct _ValaGTypeModule {
	ValaGErrorModule parent_instance;
	ValaGTypeModulePrivate * priv;
};

struct _ValaGTypeModuleClass {
	ValaGErrorModuleClass parent_class;
	void (*generate_virtual_method_declaration) (ValaGTypeModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaCCodeStruct* type_struct);
	void (*generate_class_init) (ValaGTypeModule* self, ValaClass* cl);
	void (*end_instance_init) (ValaGTypeModule* self, ValaClass* cl);
};

struct _ValaGObjectModule {
	ValaGTypeModule parent_instance;
	ValaGObjectModulePrivate * priv;
};

struct _ValaGObjectModuleClass {
	ValaGTypeModuleClass parent_class;
};

struct _ValaGSignalModule {
	ValaGObjectModule parent_instance;
	ValaGSignalModulePrivate * priv;
};

struct _ValaGSignalModuleClass {
	ValaGObjectModuleClass parent_class;
};

struct _ValaGtkModule {
	ValaGSignalModule parent_instance;
	ValaGtkModulePrivate * priv;
};

struct _ValaGtkModuleClass {
	ValaGSignalModuleClass parent_class;
};

struct _ValaGtkModulePrivate {
	ValaHashMap* cclass_to_vala_map;
	ValaHashMap* gresource_to_file_map;
	ValaHashMap* current_handler_to_signal_map;
	ValaHashMap* current_child_to_class_map;
	ValaList* current_required_app_classes;
};


static gpointer vala_gtk_module_parent_class = NULL;

GType vala_ccode_base_module_get_type (void) G_GNUC_CONST;
gpointer vala_ccode_base_module_emit_context_ref (gpointer instance);
void vala_ccode_base_module_emit_context_unref (gpointer instance);
GParamSpec* vala_ccode_base_module_param_spec_emit_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_ccode_base_module_value_set_emit_context (GValue* value, gpointer v_object);
void vala_ccode_base_module_value_take_emit_context (GValue* value, gpointer v_object);
gpointer vala_ccode_base_module_value_get_emit_context (const GValue* value);
GType vala_ccode_base_module_emit_context_get_type (void) G_GNUC_CONST;
GType vala_ccode_struct_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_control_flow_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_member_access_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_assignment_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_method_call_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_array_module_get_type (void) G_GNUC_CONST;
GType vala_ccode_delegate_module_get_type (void) G_GNUC_CONST;
GType vala_gerror_module_get_type (void) G_GNUC_CONST;
GType vala_gtype_module_get_type (void) G_GNUC_CONST;
GType vala_gobject_module_get_type (void) G_GNUC_CONST;
GType vala_gsignal_module_get_type (void) G_GNUC_CONST;
GType vala_gtk_module_get_type (void) G_GNUC_CONST;
#define VALA_GTK_MODULE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_GTK_MODULE, ValaGtkModulePrivate))
enum  {
	VALA_GTK_MODULE_DUMMY_PROPERTY
};
static void vala_gtk_module_ensure_cclass_to_vala_map (ValaGtkModule* self);
static void vala_gtk_module_recurse_cclass_to_vala_map (ValaGtkModule* self, ValaNamespace* ns);
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
gchar* vala_ccode_base_module_get_ccode_name (ValaCodeNode* node);
static void vala_gtk_module_ensure_gresource_to_file_map (ValaGtkModule* self);
static void vala_gtk_module_process_current_ui_resource (ValaGtkModule* self, const gchar* ui_resource, ValaCodeNode* node);
static gboolean vala_gtk_module_is_gtk_template (ValaGtkModule* self, ValaClass* cl);
static void vala_gtk_module_real_generate_class_init (ValaGTypeModule* base, ValaClass* cl);
void vala_gtype_module_generate_class_init (ValaGTypeModule* self, ValaClass* cl);
ValaCCodeFunction* vala_ccode_base_module_get_ccode (ValaCCodeBaseModule* self);
static void vala_gtk_module_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop);
static void vala_gtk_module_real_visit_field (ValaCodeVisitor* base, ValaField* f);
ValaClass* vala_ccode_base_module_get_current_class (ValaCCodeBaseModule* self);
void vala_ccode_base_module_push_context (ValaCCodeBaseModule* self, ValaCCodeBaseModuleEmitContext* emit_context);
void vala_ccode_base_module_pop_context (ValaCCodeBaseModule* self);
static void vala_gtk_module_real_visit_method (ValaCodeVisitor* base, ValaMethod* m);
gchar* vala_ccode_delegate_module_generate_delegate_wrapper (ValaCCodeDelegateModule* self, ValaMethod* m, ValaDelegateType* dt, ValaCodeNode* node);
static void vala_gtk_module_real_end_instance_init (ValaGTypeModule* base, ValaClass* cl);
ValaCCodeExpression* vala_ccode_base_module_get_type_id_expression (ValaCCodeBaseModule* self, ValaDataType* type, gboolean is_chainup);
ValaGtkModule* vala_gtk_module_new (void);
ValaGtkModule* vala_gtk_module_construct (GType object_type);
ValaGSignalModule* vala_gsignal_module_new (void);
ValaGSignalModule* vala_gsignal_module_construct (GType object_type);
static void vala_gtk_module_finalize (ValaCodeVisitor * obj);


static void vala_gtk_module_ensure_cclass_to_vala_map (ValaGtkModule* self) {
	ValaHashMap* _tmp0_;
	GHashFunc _tmp1_;
	GEqualFunc _tmp2_;
	GEqualFunc _tmp3_;
	ValaHashMap* _tmp4_;
	ValaCodeContext* _tmp5_;
	ValaCodeContext* _tmp6_;
	ValaNamespace* _tmp7_;
	ValaNamespace* _tmp8_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->cclass_to_vala_map;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = g_str_hash;
	_tmp2_ = g_str_equal;
	_tmp3_ = g_direct_equal;
	_tmp4_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VALA_TYPE_CLASS, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp1_, _tmp2_, _tmp3_);
	_vala_map_unref0 (self->priv->cclass_to_vala_map);
	self->priv->cclass_to_vala_map = _tmp4_;
	_tmp5_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = vala_code_context_get_root (_tmp6_);
	_tmp8_ = _tmp7_;
	vala_gtk_module_recurse_cclass_to_vala_map (self, _tmp8_);
}


static void vala_gtk_module_recurse_cclass_to_vala_map (ValaGtkModule* self, ValaNamespace* ns) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (ns != NULL);
	{
		ValaList* _cl_list = NULL;
		ValaNamespace* _tmp0_;
		ValaList* _tmp1_;
		gint _cl_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _cl_index = 0;
		_tmp0_ = ns;
		_tmp1_ = vala_namespace_get_classes (_tmp0_);
		_cl_list = _tmp1_;
		_tmp2_ = _cl_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_cl_size = _tmp4_;
		_cl_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			ValaClass* cl = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			ValaClass* _tmp11_;
			gboolean _tmp12_;
			gboolean _tmp13_;
			_tmp5_ = _cl_index;
			_cl_index = _tmp5_ + 1;
			_tmp6_ = _cl_index;
			_tmp7_ = _cl_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _cl_list;
			_tmp9_ = _cl_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			cl = (ValaClass*) _tmp10_;
			_tmp11_ = cl;
			_tmp12_ = vala_class_get_is_compact (_tmp11_);
			_tmp13_ = _tmp12_;
			if (!_tmp13_) {
				ValaHashMap* _tmp14_;
				ValaClass* _tmp15_;
				gchar* _tmp16_;
				gchar* _tmp17_;
				ValaClass* _tmp18_;
				_tmp14_ = self->priv->cclass_to_vala_map;
				_tmp15_ = cl;
				_tmp16_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = cl;
				vala_map_set ((ValaMap*) _tmp14_, _tmp17_, _tmp18_);
				_g_free0 (_tmp17_);
			}
			_vala_code_node_unref0 (cl);
		}
		_vala_iterable_unref0 (_cl_list);
	}
	{
		ValaList* _inner_list = NULL;
		ValaNamespace* _tmp19_;
		ValaList* _tmp20_;
		gint _inner_size = 0;
		ValaList* _tmp21_;
		gint _tmp22_;
		gint _tmp23_;
		gint _inner_index = 0;
		_tmp19_ = ns;
		_tmp20_ = vala_namespace_get_namespaces (_tmp19_);
		_inner_list = _tmp20_;
		_tmp21_ = _inner_list;
		_tmp22_ = vala_collection_get_size ((ValaCollection*) _tmp21_);
		_tmp23_ = _tmp22_;
		_inner_size = _tmp23_;
		_inner_index = -1;
		while (TRUE) {
			gint _tmp24_;
			gint _tmp25_;
			gint _tmp26_;
			ValaNamespace* inner = NULL;
			ValaList* _tmp27_;
			gint _tmp28_;
			gpointer _tmp29_;
			ValaNamespace* _tmp30_;
			_tmp24_ = _inner_index;
			_inner_index = _tmp24_ + 1;
			_tmp25_ = _inner_index;
			_tmp26_ = _inner_size;
			if (!(_tmp25_ < _tmp26_)) {
				break;
			}
			_tmp27_ = _inner_list;
			_tmp28_ = _inner_index;
			_tmp29_ = vala_list_get (_tmp27_, _tmp28_);
			inner = (ValaNamespace*) _tmp29_;
			_tmp30_ = inner;
			vala_gtk_module_recurse_cclass_to_vala_map (self, _tmp30_);
			_vala_code_node_unref0 (inner);
		}
		_vala_iterable_unref0 (_inner_list);
	}
}


static void vala_gtk_module_ensure_gresource_to_file_map (ValaGtkModule* self) {
	ValaHashMap* _tmp0_;
	GHashFunc _tmp1_;
	GEqualFunc _tmp2_;
	GEqualFunc _tmp3_;
	ValaHashMap* _tmp4_;
	ValaCodeContext* _tmp5_;
	ValaCodeContext* _tmp6_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->gresource_to_file_map;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = g_str_hash;
	_tmp2_ = g_str_equal;
	_tmp3_ = g_direct_equal;
	_tmp4_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp1_, _tmp2_, _tmp3_);
	_vala_map_unref0 (self->priv->gresource_to_file_map);
	self->priv->gresource_to_file_map = _tmp4_;
	_tmp5_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_->gresources;
	_tmp7__length1 = _tmp6_->gresources_length1;
	{
		gchar** gresource_collection = NULL;
		gint gresource_collection_length1 = 0;
		gint _gresource_collection_size_ = 0;
		gint gresource_it = 0;
		gresource_collection = _tmp7_;
		gresource_collection_length1 = _tmp7__length1;
		for (gresource_it = 0; gresource_it < _tmp7__length1; gresource_it = gresource_it + 1) {
			gchar* _tmp8_;
			gchar* gresource = NULL;
			_tmp8_ = g_strdup (gresource_collection[gresource_it]);
			gresource = _tmp8_;
			{
				const gchar* _tmp9_;
				gboolean _tmp10_;
				ValaMarkupReader* reader = NULL;
				const gchar* _tmp14_;
				ValaMarkupReader* _tmp15_;
				gint state = 0;
				gchar* prefix = NULL;
				gchar* alias = NULL;
				ValaMarkupTokenType current_token = 0;
				ValaMarkupReader* _tmp16_;
				ValaMarkupTokenType _tmp17_;
				_tmp9_ = gresource;
				_tmp10_ = g_file_test (_tmp9_, G_FILE_TEST_EXISTS);
				if (!_tmp10_) {
					const gchar* _tmp11_;
					gchar* _tmp12_;
					gchar* _tmp13_;
					_tmp11_ = gresource;
					_tmp12_ = g_strdup_printf ("GResources file `%s' does not exist", _tmp11_);
					_tmp13_ = _tmp12_;
					vala_report_error (NULL, _tmp13_);
					_g_free0 (_tmp13_);
					_g_free0 (gresource);
					continue;
				}
				_tmp14_ = gresource;
				_tmp15_ = vala_markup_reader_new (_tmp14_);
				reader = _tmp15_;
				state = 0;
				prefix = NULL;
				alias = NULL;
				_tmp16_ = reader;
				_tmp17_ = vala_markup_reader_read_token (_tmp16_, NULL, NULL);
				current_token = _tmp17_;
				while (TRUE) {
					ValaMarkupTokenType _tmp18_;
					gboolean _tmp19_ = FALSE;
					ValaMarkupTokenType _tmp20_;
					ValaMarkupReader* _tmp58_;
					ValaMarkupTokenType _tmp59_;
					_tmp18_ = current_token;
					if (!(_tmp18_ != VALA_MARKUP_TOKEN_TYPE_EOF)) {
						break;
					}
					_tmp20_ = current_token;
					if (_tmp20_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
						ValaMarkupReader* _tmp21_;
						const gchar* _tmp22_;
						const gchar* _tmp23_;
						_tmp21_ = reader;
						_tmp22_ = vala_markup_reader_get_name (_tmp21_);
						_tmp23_ = _tmp22_;
						_tmp19_ = g_strcmp0 (_tmp23_, "gresource") == 0;
					} else {
						_tmp19_ = FALSE;
					}
					if (_tmp19_) {
						ValaMarkupReader* _tmp24_;
						gchar* _tmp25_;
						_tmp24_ = reader;
						_tmp25_ = vala_markup_reader_get_attribute (_tmp24_, "prefix");
						_g_free0 (prefix);
						prefix = _tmp25_;
					} else {
						gboolean _tmp26_ = FALSE;
						ValaMarkupTokenType _tmp27_;
						_tmp27_ = current_token;
						if (_tmp27_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
							ValaMarkupReader* _tmp28_;
							const gchar* _tmp29_;
							const gchar* _tmp30_;
							_tmp28_ = reader;
							_tmp29_ = vala_markup_reader_get_name (_tmp28_);
							_tmp30_ = _tmp29_;
							_tmp26_ = g_strcmp0 (_tmp30_, "file") == 0;
						} else {
							_tmp26_ = FALSE;
						}
						if (_tmp26_) {
							ValaMarkupReader* _tmp31_;
							gchar* _tmp32_;
							_tmp31_ = reader;
							_tmp32_ = vala_markup_reader_get_attribute (_tmp31_, "alias");
							_g_free0 (alias);
							alias = _tmp32_;
							state = 1;
						} else {
							gboolean _tmp33_ = FALSE;
							gint _tmp34_;
							_tmp34_ = state;
							if (_tmp34_ == 1) {
								ValaMarkupTokenType _tmp35_;
								_tmp35_ = current_token;
								_tmp33_ = _tmp35_ == VALA_MARKUP_TOKEN_TYPE_TEXT;
							} else {
								_tmp33_ = FALSE;
							}
							if (_tmp33_) {
								gchar* name = NULL;
								ValaMarkupReader* _tmp36_;
								const gchar* _tmp37_;
								const gchar* _tmp38_;
								gchar* _tmp39_;
								gchar* filename = NULL;
								ValaCodeContext* _tmp40_;
								ValaCodeContext* _tmp41_;
								const gchar* _tmp42_;
								const gchar* _tmp43_;
								gchar* _tmp44_;
								const gchar* _tmp45_;
								ValaHashMap* _tmp52_;
								const gchar* _tmp53_;
								const gchar* _tmp54_;
								gchar* _tmp55_;
								gchar* _tmp56_;
								const gchar* _tmp57_;
								_tmp36_ = reader;
								_tmp37_ = vala_markup_reader_get_content (_tmp36_);
								_tmp38_ = _tmp37_;
								_tmp39_ = g_strdup (_tmp38_);
								name = _tmp39_;
								_tmp40_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
								_tmp41_ = _tmp40_;
								_tmp42_ = gresource;
								_tmp43_ = name;
								_tmp44_ = vala_code_context_get_gresource_path (_tmp41_, _tmp42_, _tmp43_);
								filename = _tmp44_;
								_tmp45_ = alias;
								if (_tmp45_ != NULL) {
									ValaHashMap* _tmp46_;
									const gchar* _tmp47_;
									const gchar* _tmp48_;
									gchar* _tmp49_;
									gchar* _tmp50_;
									const gchar* _tmp51_;
									_tmp46_ = self->priv->gresource_to_file_map;
									_tmp47_ = prefix;
									_tmp48_ = alias;
									_tmp49_ = g_build_filename (_tmp47_, _tmp48_, NULL);
									_tmp50_ = _tmp49_;
									_tmp51_ = filename;
									vala_map_set ((ValaMap*) _tmp46_, _tmp50_, _tmp51_);
									_g_free0 (_tmp50_);
								}
								_tmp52_ = self->priv->gresource_to_file_map;
								_tmp53_ = prefix;
								_tmp54_ = name;
								_tmp55_ = g_build_filename (_tmp53_, _tmp54_, NULL);
								_tmp56_ = _tmp55_;
								_tmp57_ = filename;
								vala_map_set ((ValaMap*) _tmp52_, _tmp56_, _tmp57_);
								_g_free0 (_tmp56_);
								state = 0;
								_g_free0 (filename);
								_g_free0 (name);
							}
						}
					}
					_tmp58_ = reader;
					_tmp59_ = vala_markup_reader_read_token (_tmp58_, NULL, NULL);
					current_token = _tmp59_;
				}
				_g_free0 (alias);
				_g_free0 (prefix);
				_vala_markup_reader_unref0 (reader);
				_g_free0 (gresource);
			}
		}
	}
}


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 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 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 __catch8_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 __catch8_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 __finally8;
	__catch8_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally8:
	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 void vala_gtk_module_process_current_ui_resource (ValaGtkModule* self, const gchar* ui_resource, ValaCodeNode* node) {
	gchar* ui_file = NULL;
	ValaHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	GHashFunc _tmp14_;
	GEqualFunc _tmp15_;
	GEqualFunc _tmp16_;
	ValaHashMap* _tmp17_;
	GHashFunc _tmp18_;
	GEqualFunc _tmp19_;
	GEqualFunc _tmp20_;
	ValaHashMap* _tmp21_;
	ValaMarkupReader* reader = NULL;
	const gchar* _tmp22_;
	ValaMarkupReader* _tmp23_;
	ValaClass* current_class = NULL;
	gboolean template_tag_found = FALSE;
	ValaMarkupTokenType current_token = 0;
	ValaMarkupReader* _tmp24_;
	ValaMarkupTokenType _tmp25_;
	gboolean _tmp93_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (ui_resource != NULL);
	g_return_if_fail (node != NULL);
	vala_gtk_module_ensure_cclass_to_vala_map (self);
	vala_gtk_module_ensure_gresource_to_file_map (self);
	_vala_map_unref0 (self->priv->current_handler_to_signal_map);
	self->priv->current_handler_to_signal_map = NULL;
	_vala_map_unref0 (self->priv->current_child_to_class_map);
	self->priv->current_child_to_class_map = NULL;
	_tmp0_ = self->priv->gresource_to_file_map;
	_tmp1_ = ui_resource;
	_tmp2_ = vala_map_get ((ValaMap*) _tmp0_, _tmp1_);
	ui_file = (gchar*) _tmp2_;
	_tmp4_ = ui_file;
	if (_tmp4_ == NULL) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp5_;
		gboolean _tmp6_;
		_tmp5_ = ui_file;
		_tmp6_ = g_file_test (_tmp5_, G_FILE_TEST_EXISTS);
		_tmp3_ = !_tmp6_;
	}
	if (_tmp3_) {
		ValaCodeNode* _tmp7_;
		ValaCodeNode* _tmp8_;
		ValaSourceReference* _tmp9_;
		ValaSourceReference* _tmp10_;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		_tmp7_ = node;
		vala_code_node_set_error (_tmp7_, TRUE);
		_tmp8_ = node;
		_tmp9_ = vala_code_node_get_source_reference (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp11_ = ui_resource;
		_tmp12_ = g_strdup_printf ("UI resource not found: `%s'. Please make sure to specify the proper GR" \
"esources xml files with --gresources and alternative search locations " \
"with --gresourcesdir.", _tmp11_);
		_tmp13_ = _tmp12_;
		vala_report_error (_tmp10_, _tmp13_);
		_g_free0 (_tmp13_);
		_g_free0 (ui_file);
		return;
	}
	_tmp14_ = g_str_hash;
	_tmp15_ = g_str_equal;
	_tmp16_ = g_direct_equal;
	_tmp17_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VALA_TYPE_SIGNAL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp14_, _tmp15_, _tmp16_);
	_vala_map_unref0 (self->priv->current_handler_to_signal_map);
	self->priv->current_handler_to_signal_map = _tmp17_;
	_tmp18_ = g_str_hash;
	_tmp19_ = g_str_equal;
	_tmp20_ = g_direct_equal;
	_tmp21_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VALA_TYPE_CLASS, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp18_, _tmp19_, _tmp20_);
	_vala_map_unref0 (self->priv->current_child_to_class_map);
	self->priv->current_child_to_class_map = _tmp21_;
	_tmp22_ = ui_file;
	_tmp23_ = vala_markup_reader_new (_tmp22_);
	reader = _tmp23_;
	current_class = NULL;
	template_tag_found = FALSE;
	_tmp24_ = reader;
	_tmp25_ = vala_markup_reader_read_token (_tmp24_, NULL, NULL);
	current_token = _tmp25_;
	while (TRUE) {
		ValaMarkupTokenType _tmp26_;
		gboolean _tmp27_ = FALSE;
		ValaMarkupTokenType _tmp28_;
		ValaMarkupReader* _tmp91_;
		ValaMarkupTokenType _tmp92_;
		_tmp26_ = current_token;
		if (!(_tmp26_ != VALA_MARKUP_TOKEN_TYPE_EOF)) {
			break;
		}
		_tmp28_ = current_token;
		if (_tmp28_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT) {
			gboolean _tmp29_ = FALSE;
			ValaMarkupReader* _tmp30_;
			const gchar* _tmp31_;
			const gchar* _tmp32_;
			_tmp30_ = reader;
			_tmp31_ = vala_markup_reader_get_name (_tmp30_);
			_tmp32_ = _tmp31_;
			if (g_strcmp0 (_tmp32_, "template") == 0) {
				_tmp29_ = TRUE;
			} else {
				ValaMarkupReader* _tmp33_;
				const gchar* _tmp34_;
				const gchar* _tmp35_;
				_tmp33_ = reader;
				_tmp34_ = vala_markup_reader_get_name (_tmp33_);
				_tmp35_ = _tmp34_;
				_tmp29_ = g_strcmp0 (_tmp35_, "object") == 0;
			}
			_tmp27_ = _tmp29_;
		} else {
			_tmp27_ = FALSE;
		}
		if (_tmp27_) {
			ValaMarkupReader* _tmp36_;
			const gchar* _tmp37_;
			const gchar* _tmp38_;
			gchar* class_name = NULL;
			ValaMarkupReader* _tmp39_;
			gchar* _tmp40_;
			const gchar* _tmp41_;
			_tmp36_ = reader;
			_tmp37_ = vala_markup_reader_get_name (_tmp36_);
			_tmp38_ = _tmp37_;
			if (g_strcmp0 (_tmp38_, "template") == 0) {
				template_tag_found = TRUE;
			}
			_tmp39_ = reader;
			_tmp40_ = vala_markup_reader_get_attribute (_tmp39_, "class");
			class_name = _tmp40_;
			_tmp41_ = class_name;
			if (_tmp41_ != NULL) {
				ValaHashMap* _tmp42_;
				const gchar* _tmp43_;
				gpointer _tmp44_;
				gchar* child_name = NULL;
				ValaMarkupReader* _tmp45_;
				gchar* _tmp46_;
				const gchar* _tmp47_;
				_tmp42_ = self->priv->cclass_to_vala_map;
				_tmp43_ = class_name;
				_tmp44_ = vala_map_get ((ValaMap*) _tmp42_, _tmp43_);
				_vala_code_node_unref0 (current_class);
				current_class = (ValaClass*) _tmp44_;
				_tmp45_ = reader;
				_tmp46_ = vala_markup_reader_get_attribute (_tmp45_, "id");
				child_name = _tmp46_;
				_tmp47_ = child_name;
				if (_tmp47_ != NULL) {
					ValaHashMap* _tmp48_;
					const gchar* _tmp49_;
					ValaClass* _tmp50_;
					_tmp48_ = self->priv->current_child_to_class_map;
					_tmp49_ = child_name;
					_tmp50_ = current_class;
					vala_map_set ((ValaMap*) _tmp48_, _tmp49_, _tmp50_);
				}
				_g_free0 (child_name);
			}
			_g_free0 (class_name);
		} else {
			gboolean _tmp51_ = FALSE;
			gboolean _tmp52_ = FALSE;
			ValaClass* _tmp53_;
			_tmp53_ = current_class;
			if (_tmp53_ != NULL) {
				ValaMarkupTokenType _tmp54_;
				_tmp54_ = current_token;
				_tmp52_ = _tmp54_ == VALA_MARKUP_TOKEN_TYPE_START_ELEMENT;
			} else {
				_tmp52_ = FALSE;
			}
			if (_tmp52_) {
				ValaMarkupReader* _tmp55_;
				const gchar* _tmp56_;
				const gchar* _tmp57_;
				_tmp55_ = reader;
				_tmp56_ = vala_markup_reader_get_name (_tmp55_);
				_tmp57_ = _tmp56_;
				_tmp51_ = g_strcmp0 (_tmp57_, "signal") == 0;
			} else {
				_tmp51_ = FALSE;
			}
			if (_tmp51_) {
				gchar* signal_name = NULL;
				ValaMarkupReader* _tmp58_;
				gchar* _tmp59_;
				gchar* handler_name = NULL;
				ValaMarkupReader* _tmp60_;
				gchar* _tmp61_;
				ValaClass* _tmp62_;
				_tmp58_ = reader;
				_tmp59_ = vala_markup_reader_get_attribute (_tmp58_, "name");
				signal_name = _tmp59_;
				_tmp60_ = reader;
				_tmp61_ = vala_markup_reader_get_attribute (_tmp60_, "handler");
				handler_name = _tmp61_;
				_tmp62_ = current_class;
				if (_tmp62_ != NULL) {
					gboolean _tmp63_ = FALSE;
					const gchar* _tmp64_;
					gint sep_idx = 0;
					const gchar* _tmp74_;
					gint _tmp75_;
					gint _tmp76_;
					ValaSignal* sig = NULL;
					ValaClass* _tmp80_;
					const gchar* _tmp81_;
					gchar* _tmp82_;
					gchar* _tmp83_;
					ValaSymbol* _tmp84_;
					ValaSignal* _tmp85_;
					ValaSignal* _tmp86_;
					ValaSignal* _tmp87_;
					_tmp64_ = signal_name;
					if (_tmp64_ == NULL) {
						_tmp63_ = TRUE;
					} else {
						const gchar* _tmp65_;
						_tmp65_ = handler_name;
						_tmp63_ = _tmp65_ == NULL;
					}
					if (_tmp63_) {
						ValaCodeNode* _tmp66_;
						ValaSourceReference* _tmp67_;
						ValaSourceReference* _tmp68_;
						const gchar* _tmp69_;
						gchar* _tmp70_;
						gchar* _tmp71_;
						ValaMarkupReader* _tmp72_;
						ValaMarkupTokenType _tmp73_;
						_tmp66_ = node;
						_tmp67_ = vala_code_node_get_source_reference (_tmp66_);
						_tmp68_ = _tmp67_;
						_tmp69_ = ui_file;
						_tmp70_ = g_strdup_printf ("Invalid signal in ui file `%s'", _tmp69_);
						_tmp71_ = _tmp70_;
						vala_report_error (_tmp68_, _tmp71_);
						_g_free0 (_tmp71_);
						_tmp72_ = reader;
						_tmp73_ = vala_markup_reader_read_token (_tmp72_, NULL, NULL);
						current_token = _tmp73_;
						_g_free0 (handler_name);
						_g_free0 (signal_name);
						continue;
					}
					_tmp74_ = signal_name;
					_tmp75_ = string_index_of (_tmp74_, "::", 0);
					sep_idx = _tmp75_;
					_tmp76_ = sep_idx;
					if (_tmp76_ >= 0) {
						const gchar* _tmp77_;
						gint _tmp78_;
						gchar* _tmp79_;
						_tmp77_ = signal_name;
						_tmp78_ = sep_idx;
						_tmp79_ = string_substring (_tmp77_, (glong) 0, (glong) _tmp78_);
						_g_free0 (signal_name);
						signal_name = _tmp79_;
					}
					_tmp80_ = current_class;
					_tmp81_ = signal_name;
					_tmp82_ = string_replace (_tmp81_, "-", "_");
					_tmp83_ = _tmp82_;
					_tmp84_ = vala_semantic_analyzer_symbol_lookup_inherited ((ValaSymbol*) _tmp80_, _tmp83_);
					_tmp85_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp84_, VALA_TYPE_SIGNAL) ? ((ValaSignal*) _tmp84_) : NULL;
					if (_tmp85_ == NULL) {
						_vala_code_node_unref0 (_tmp84_);
					}
					_tmp86_ = _tmp85_;
					_g_free0 (_tmp83_);
					sig = _tmp86_;
					_tmp87_ = sig;
					if (_tmp87_ != NULL) {
						ValaHashMap* _tmp88_;
						const gchar* _tmp89_;
						ValaSignal* _tmp90_;
						_tmp88_ = self->priv->current_handler_to_signal_map;
						_tmp89_ = handler_name;
						_tmp90_ = sig;
						vala_map_set ((ValaMap*) _tmp88_, _tmp89_, _tmp90_);
					}
					_vala_code_node_unref0 (sig);
				}
				_g_free0 (handler_name);
				_g_free0 (signal_name);
			}
		}
		_tmp91_ = reader;
		_tmp92_ = vala_markup_reader_read_token (_tmp91_, NULL, NULL);
		current_token = _tmp92_;
	}
	_tmp93_ = template_tag_found;
	if (!_tmp93_) {
		ValaCodeNode* _tmp94_;
		ValaSourceReference* _tmp95_;
		ValaSourceReference* _tmp96_;
		const gchar* _tmp97_;
		gchar* _tmp98_;
		gchar* _tmp99_;
		_tmp94_ = node;
		_tmp95_ = vala_code_node_get_source_reference (_tmp94_);
		_tmp96_ = _tmp95_;
		_tmp97_ = ui_resource;
		_tmp98_ = g_strdup_printf ("ui resource `%s' does not describe a valid composite template", _tmp97_);
		_tmp99_ = _tmp98_;
		vala_report_error (_tmp96_, _tmp99_);
		_g_free0 (_tmp99_);
	}
	_vala_code_node_unref0 (current_class);
	_vala_markup_reader_unref0 (reader);
	_g_free0 (ui_file);
}


static gboolean vala_gtk_module_is_gtk_template (ValaGtkModule* self, ValaClass* cl) {
	gboolean result = FALSE;
	ValaAttribute* attr = NULL;
	ValaClass* _tmp0_;
	ValaAttribute* _tmp1_;
	ValaAttribute* _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (cl != NULL, FALSE);
	_tmp0_ = cl;
	_tmp1_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp0_, "GtkTemplate");
	attr = _tmp1_;
	_tmp2_ = attr;
	if (_tmp2_ != NULL) {
		gboolean _tmp3_ = FALSE;
		ValaClass* _tmp4_;
		ValaCodeContext* _tmp15_;
		ValaCodeContext* _tmp16_;
		gboolean _tmp17_;
		_tmp4_ = ((ValaCCodeBaseModule*) self)->gtk_widget_type;
		if (_tmp4_ == NULL) {
			_tmp3_ = TRUE;
		} else {
			ValaClass* _tmp5_;
			ValaClass* _tmp6_;
			gboolean _tmp7_;
			_tmp5_ = cl;
			_tmp6_ = ((ValaCCodeBaseModule*) self)->gtk_widget_type;
			_tmp7_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp5_, (ValaTypeSymbol*) _tmp6_);
			_tmp3_ = !_tmp7_;
		}
		if (_tmp3_) {
			ValaClass* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_tmp8_ = cl;
			_tmp9_ = vala_code_node_get_error ((ValaCodeNode*) _tmp8_);
			_tmp10_ = _tmp9_;
			if (!_tmp10_) {
				ValaAttribute* _tmp11_;
				ValaSourceReference* _tmp12_;
				ValaSourceReference* _tmp13_;
				ValaClass* _tmp14_;
				_tmp11_ = attr;
				_tmp12_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp11_);
				_tmp13_ = _tmp12_;
				vala_report_error (_tmp13_, "subclassing Gtk.Widget is required for using Gtk templates");
				_tmp14_ = cl;
				vala_code_node_set_error ((ValaCodeNode*) _tmp14_, TRUE);
			}
			result = FALSE;
			_vala_code_node_unref0 (attr);
			return result;
		}
		_tmp15_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp16_ = _tmp15_;
		_tmp17_ = vala_code_context_require_glib_version (_tmp16_, 2, 38);
		if (!_tmp17_) {
			ValaClass* _tmp18_;
			gboolean _tmp19_;
			gboolean _tmp20_;
			_tmp18_ = cl;
			_tmp19_ = vala_code_node_get_error ((ValaCodeNode*) _tmp18_);
			_tmp20_ = _tmp19_;
			if (!_tmp20_) {
				ValaAttribute* _tmp21_;
				ValaSourceReference* _tmp22_;
				ValaSourceReference* _tmp23_;
				ValaClass* _tmp24_;
				_tmp21_ = attr;
				_tmp22_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp21_);
				_tmp23_ = _tmp22_;
				vala_report_error (_tmp23_, "glib 2.38 is required for using Gtk templates (with --target-glib=2.38" \
")");
				_tmp24_ = cl;
				vala_code_node_set_error ((ValaCodeNode*) _tmp24_, TRUE);
			}
			result = FALSE;
			_vala_code_node_unref0 (attr);
			return result;
		}
		result = TRUE;
		_vala_code_node_unref0 (attr);
		return result;
	}
	result = FALSE;
	_vala_code_node_unref0 (attr);
	return result;
}


static void vala_gtk_module_real_generate_class_init (ValaGTypeModule* base, ValaClass* cl) {
	ValaGtkModule * self;
	ValaClass* _tmp0_;
	gboolean _tmp1_ = FALSE;
	ValaClass* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	ValaClass* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	gchar* ui = NULL;
	ValaClass* _tmp33_;
	gchar* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp40_;
	ValaClass* _tmp41_;
	ValaCCodeFunctionCall* call = NULL;
	ValaCCodeIdentifier* _tmp42_;
	ValaCCodeIdentifier* _tmp43_;
	ValaCCodeFunctionCall* _tmp44_;
	ValaCCodeFunctionCall* _tmp45_;
	ValaCCodeFunctionCall* _tmp46_;
	ValaCCodeIdentifier* _tmp47_;
	ValaCCodeIdentifier* _tmp48_;
	ValaCCodeFunctionCall* _tmp49_;
	ValaClass* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	gchar* _tmp55_;
	gchar* _tmp56_;
	ValaCCodeConstant* _tmp57_;
	ValaCCodeConstant* _tmp58_;
	ValaCCodeFunction* _tmp59_;
	ValaCCodeFunction* _tmp60_;
	ValaCCodeFunctionCall* _tmp61_;
	ValaList* _tmp62_;
	self = (ValaGtkModule*) base;
	g_return_if_fail (cl != NULL);
	_tmp0_ = cl;
	VALA_GTYPE_MODULE_CLASS (vala_gtk_module_parent_class)->generate_class_init ((ValaGTypeModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModule), _tmp0_);
	_tmp2_ = cl;
	_tmp3_ = vala_code_node_get_error ((ValaCodeNode*) _tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		_tmp1_ = TRUE;
	} else {
		ValaClass* _tmp5_;
		gboolean _tmp6_;
		_tmp5_ = cl;
		_tmp6_ = vala_gtk_module_is_gtk_template (self, _tmp5_);
		_tmp1_ = !_tmp6_;
	}
	if (_tmp1_) {
		return;
	}
	_tmp7_ = cl;
	_tmp8_ = vala_class_get_has_private_fields (_tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		gchar* private_offset = NULL;
		ValaClass* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		ValaCCodeFunction* _tmp15_;
		ValaCCodeFunction* _tmp16_;
		const gchar* _tmp17_;
		ValaCCodeVariableDeclarator* _tmp18_;
		ValaCCodeVariableDeclarator* _tmp19_;
		ValaCCodeFunctionCall* cgetprivcall = NULL;
		ValaCCodeIdentifier* _tmp20_;
		ValaCCodeIdentifier* _tmp21_;
		ValaCCodeFunctionCall* _tmp22_;
		ValaCCodeFunctionCall* _tmp23_;
		ValaCCodeFunctionCall* _tmp24_;
		ValaCCodeIdentifier* _tmp25_;
		ValaCCodeIdentifier* _tmp26_;
		ValaCCodeFunction* _tmp27_;
		ValaCCodeFunction* _tmp28_;
		const gchar* _tmp29_;
		ValaCCodeIdentifier* _tmp30_;
		ValaCCodeIdentifier* _tmp31_;
		ValaCCodeFunctionCall* _tmp32_;
		_tmp10_ = cl;
		_tmp11_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup_printf ("%s_private_offset", _tmp12_);
		_tmp14_ = _tmp13_;
		_g_free0 (_tmp12_);
		private_offset = _tmp14_;
		_tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp16_ = _tmp15_;
		_tmp17_ = private_offset;
		_tmp18_ = vala_ccode_variable_declarator_new (_tmp17_, NULL, NULL);
		_tmp19_ = _tmp18_;
		vala_ccode_function_add_declaration (_tmp16_, "gint", (ValaCCodeDeclarator*) _tmp19_, 0);
		_vala_ccode_node_unref0 (_tmp19_);
		_tmp20_ = vala_ccode_identifier_new ("g_type_class_get_instance_private_offset");
		_tmp21_ = _tmp20_;
		_tmp22_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp21_);
		_tmp23_ = _tmp22_;
		_vala_ccode_node_unref0 (_tmp21_);
		cgetprivcall = _tmp23_;
		_tmp24_ = cgetprivcall;
		_tmp25_ = vala_ccode_identifier_new ("klass");
		_tmp26_ = _tmp25_;
		vala_ccode_function_call_add_argument (_tmp24_, (ValaCCodeExpression*) _tmp26_);
		_vala_ccode_node_unref0 (_tmp26_);
		_tmp27_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
		_tmp28_ = _tmp27_;
		_tmp29_ = private_offset;
		_tmp30_ = vala_ccode_identifier_new (_tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = cgetprivcall;
		vala_ccode_function_add_assignment (_tmp28_, (ValaCCodeExpression*) _tmp31_, (ValaCCodeExpression*) _tmp32_);
		_vala_ccode_node_unref0 (_tmp31_);
		_vala_ccode_node_unref0 (cgetprivcall);
		_g_free0 (private_offset);
	}
	_tmp33_ = cl;
	_tmp34_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp33_, "GtkTemplate", "ui", NULL);
	ui = _tmp34_;
	_tmp35_ = ui;
	if (_tmp35_ == NULL) {
		ValaClass* _tmp36_;
		ValaSourceReference* _tmp37_;
		ValaSourceReference* _tmp38_;
		ValaClass* _tmp39_;
		_tmp36_ = cl;
		_tmp37_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp36_);
		_tmp38_ = _tmp37_;
		vala_report_error (_tmp38_, "empty ui resource declaration for Gtk widget template");
		_tmp39_ = cl;
		vala_code_node_set_error ((ValaCodeNode*) _tmp39_, TRUE);
		_g_free0 (ui);
		return;
	}
	_tmp40_ = ui;
	_tmp41_ = cl;
	vala_gtk_module_process_current_ui_resource (self, _tmp40_, (ValaCodeNode*) _tmp41_);
	_tmp42_ = vala_ccode_identifier_new ("gtk_widget_class_set_template_from_resource");
	_tmp43_ = _tmp42_;
	_tmp44_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp43_);
	_tmp45_ = _tmp44_;
	_vala_ccode_node_unref0 (_tmp43_);
	call = _tmp45_;
	_tmp46_ = call;
	_tmp47_ = vala_ccode_identifier_new ("GTK_WIDGET_CLASS (klass)");
	_tmp48_ = _tmp47_;
	vala_ccode_function_call_add_argument (_tmp46_, (ValaCCodeExpression*) _tmp48_);
	_vala_ccode_node_unref0 (_tmp48_);
	_tmp49_ = call;
	_tmp50_ = cl;
	_tmp51_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp50_, "GtkTemplate", "ui", NULL);
	_tmp52_ = _tmp51_;
	_tmp53_ = g_strconcat ("\"", _tmp52_, NULL);
	_tmp54_ = _tmp53_;
	_tmp55_ = g_strconcat (_tmp54_, "\"", NULL);
	_tmp56_ = _tmp55_;
	_tmp57_ = vala_ccode_constant_new (_tmp56_);
	_tmp58_ = _tmp57_;
	vala_ccode_function_call_add_argument (_tmp49_, (ValaCCodeExpression*) _tmp58_);
	_vala_ccode_node_unref0 (_tmp58_);
	_g_free0 (_tmp56_);
	_g_free0 (_tmp54_);
	_g_free0 (_tmp52_);
	_tmp59_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp60_ = _tmp59_;
	_tmp61_ = call;
	vala_ccode_function_add_expression (_tmp60_, (ValaCCodeExpression*) _tmp61_);
	_tmp62_ = self->priv->current_required_app_classes;
	vala_collection_clear ((ValaCollection*) _tmp62_);
	_vala_ccode_node_unref0 (call);
	_g_free0 (ui);
}


static void vala_gtk_module_real_visit_property (ValaCodeVisitor* base, ValaProperty* prop) {
	ValaGtkModule * self;
	ValaProperty* _tmp0_;
	ValaAttribute* _tmp1_;
	ValaAttribute* _tmp2_;
	gboolean _tmp3_;
	ValaProperty* _tmp7_;
	self = (ValaGtkModule*) base;
	g_return_if_fail (prop != NULL);
	_tmp0_ = prop;
	_tmp1_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp0_, "GtkChild");
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_vala_code_node_unref0 (_tmp2_);
	if (_tmp3_) {
		ValaProperty* _tmp4_;
		ValaSourceReference* _tmp5_;
		ValaSourceReference* _tmp6_;
		_tmp4_ = prop;
		_tmp5_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp4_);
		_tmp6_ = _tmp5_;
		vala_report_error (_tmp6_, "Annotating properties with [GtkChild] is not yet supported");
	}
	_tmp7_ = prop;
	VALA_CODE_VISITOR_CLASS (vala_gtk_module_parent_class)->visit_property ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModule), _tmp7_);
}


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


static gpointer _vala_ccode_node_ref0 (gpointer self) {
	return self ? vala_ccode_node_ref (self) : NULL;
}


static void vala_gtk_module_real_visit_field (ValaCodeVisitor* base, ValaField* f) {
	ValaGtkModule * self;
	ValaField* _tmp0_;
	ValaClass* cl = NULL;
	ValaClass* _tmp1_;
	ValaClass* _tmp2_;
	ValaClass* _tmp3_;
	gboolean _tmp4_ = FALSE;
	ValaClass* _tmp5_;
	gboolean _tmp9_ = FALSE;
	ValaField* _tmp10_;
	ValaMemberBinding _tmp11_;
	ValaMemberBinding _tmp12_;
	ValaClass* _tmp16_;
	gboolean _tmp17_;
	ValaCCodeBaseModuleEmitContext* _tmp21_;
	gchar* gtk_name = NULL;
	ValaField* _tmp22_;
	ValaField* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	ValaClass* child_class = NULL;
	ValaHashMap* _tmp27_;
	const gchar* _tmp28_;
	gpointer _tmp29_;
	ValaClass* _tmp30_;
	ValaClass* field_class = NULL;
	ValaField* _tmp37_;
	ValaDataType* _tmp38_;
	ValaDataType* _tmp39_;
	ValaTypeSymbol* _tmp40_;
	ValaTypeSymbol* _tmp41_;
	ValaClass* _tmp42_;
	gboolean _tmp43_ = FALSE;
	ValaClass* _tmp44_;
	gboolean internal_child = FALSE;
	ValaField* _tmp59_;
	gboolean _tmp60_;
	ValaCCodeExpression* offset = NULL;
	ValaField* _tmp61_;
	gboolean _tmp62_;
	ValaCCodeFunctionCall* call = NULL;
	ValaCCodeIdentifier* _tmp108_;
	ValaCCodeIdentifier* _tmp109_;
	ValaCCodeFunctionCall* _tmp110_;
	ValaCCodeFunctionCall* _tmp111_;
	ValaCCodeFunctionCall* _tmp112_;
	ValaCCodeIdentifier* _tmp113_;
	ValaCCodeIdentifier* _tmp114_;
	ValaCCodeFunctionCall* _tmp115_;
	const gchar* _tmp116_;
	gchar* _tmp117_;
	gchar* _tmp118_;
	ValaCCodeConstant* _tmp119_;
	ValaCCodeConstant* _tmp120_;
	const gchar* _tmp121_ = NULL;
	gboolean _tmp122_;
	ValaCCodeFunctionCall* _tmp123_;
	ValaCCodeConstant* _tmp124_;
	ValaCCodeConstant* _tmp125_;
	ValaCCodeFunctionCall* _tmp126_;
	ValaCCodeExpression* _tmp127_;
	ValaCCodeFunction* _tmp128_;
	ValaCCodeFunction* _tmp129_;
	ValaCCodeFunctionCall* _tmp130_;
	gboolean _tmp131_ = FALSE;
	ValaClass* _tmp132_;
	gboolean _tmp133_;
	gboolean _tmp134_;
	self = (ValaGtkModule*) base;
	g_return_if_fail (f != NULL);
	_tmp0_ = f;
	VALA_CODE_VISITOR_CLASS (vala_gtk_module_parent_class)->visit_field ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModule), _tmp0_);
	_tmp1_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (_tmp2_);
	cl = _tmp3_;
	_tmp5_ = cl;
	if (_tmp5_ == NULL) {
		_tmp4_ = TRUE;
	} else {
		ValaClass* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = cl;
		_tmp7_ = vala_code_node_get_error ((ValaCodeNode*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_;
	}
	if (_tmp4_) {
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp10_ = f;
	_tmp11_ = vala_field_get_binding (_tmp10_);
	_tmp12_ = _tmp11_;
	if (_tmp12_ != VALA_MEMBER_BINDING_INSTANCE) {
		_tmp9_ = TRUE;
	} else {
		ValaField* _tmp13_;
		ValaAttribute* _tmp14_;
		ValaAttribute* _tmp15_;
		_tmp13_ = f;
		_tmp14_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp13_, "GtkChild");
		_tmp15_ = _tmp14_;
		_tmp9_ = _tmp15_ == NULL;
		_vala_code_node_unref0 (_tmp15_);
	}
	if (_tmp9_) {
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp16_ = cl;
	_tmp17_ = vala_gtk_module_is_gtk_template (self, _tmp16_);
	if (!_tmp17_) {
		ValaField* _tmp18_;
		ValaSourceReference* _tmp19_;
		ValaSourceReference* _tmp20_;
		_tmp18_ = f;
		_tmp19_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp18_);
		_tmp20_ = _tmp19_;
		vala_report_error (_tmp20_, "[GtkChild] is only allowed in classes with a [GtkTemplate] attribute");
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp21_ = ((ValaCCodeBaseModule*) self)->class_init_context;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp21_);
	_tmp22_ = f;
	_tmp23_ = f;
	_tmp24_ = vala_symbol_get_name ((ValaSymbol*) _tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp22_, "GtkChild", "name", _tmp25_);
	gtk_name = _tmp26_;
	_tmp27_ = self->priv->current_child_to_class_map;
	_tmp28_ = gtk_name;
	_tmp29_ = vala_map_get ((ValaMap*) _tmp27_, _tmp28_);
	child_class = (ValaClass*) _tmp29_;
	_tmp30_ = child_class;
	if (_tmp30_ == NULL) {
		ValaField* _tmp31_;
		ValaSourceReference* _tmp32_;
		ValaSourceReference* _tmp33_;
		const gchar* _tmp34_;
		gchar* _tmp35_;
		gchar* _tmp36_;
		_tmp31_ = f;
		_tmp32_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = gtk_name;
		_tmp35_ = g_strdup_printf ("could not find child `%s'", _tmp34_);
		_tmp36_ = _tmp35_;
		vala_report_error (_tmp33_, _tmp36_);
		_g_free0 (_tmp36_);
		_vala_code_node_unref0 (child_class);
		_g_free0 (gtk_name);
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp37_ = f;
	_tmp38_ = vala_variable_get_variable_type ((ValaVariable*) _tmp37_);
	_tmp39_ = _tmp38_;
	_tmp40_ = vala_data_type_get_data_type (_tmp39_);
	_tmp41_ = _tmp40_;
	_tmp42_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp41_, VALA_TYPE_CLASS) ? ((ValaClass*) _tmp41_) : NULL);
	field_class = _tmp42_;
	_tmp44_ = field_class;
	if (_tmp44_ == NULL) {
		_tmp43_ = TRUE;
	} else {
		ValaClass* _tmp45_;
		ValaClass* _tmp46_;
		gboolean _tmp47_;
		_tmp45_ = child_class;
		_tmp46_ = field_class;
		_tmp47_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) _tmp45_, (ValaTypeSymbol*) _tmp46_);
		_tmp43_ = !_tmp47_;
	}
	if (_tmp43_) {
		ValaField* _tmp48_;
		ValaSourceReference* _tmp49_;
		ValaSourceReference* _tmp50_;
		ValaClass* _tmp51_;
		gchar* _tmp52_;
		gchar* _tmp53_;
		ValaClass* _tmp54_;
		gchar* _tmp55_;
		gchar* _tmp56_;
		gchar* _tmp57_;
		gchar* _tmp58_;
		_tmp48_ = f;
		_tmp49_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp48_);
		_tmp50_ = _tmp49_;
		_tmp51_ = child_class;
		_tmp52_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp51_);
		_tmp53_ = _tmp52_;
		_tmp54_ = field_class;
		_tmp55_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp54_);
		_tmp56_ = _tmp55_;
		_tmp57_ = g_strdup_printf ("cannot convert from Gtk child type `%s' to `%s'", _tmp53_, _tmp56_);
		_tmp58_ = _tmp57_;
		vala_report_error (_tmp50_, _tmp58_);
		_g_free0 (_tmp58_);
		_g_free0 (_tmp56_);
		_g_free0 (_tmp53_);
		_vala_code_node_unref0 (field_class);
		_vala_code_node_unref0 (child_class);
		_g_free0 (gtk_name);
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp59_ = f;
	_tmp60_ = vala_code_node_get_attribute_bool ((ValaCodeNode*) _tmp59_, "GtkChild", "internal", FALSE);
	internal_child = _tmp60_;
	_tmp61_ = f;
	_tmp62_ = vala_symbol_is_private_symbol ((ValaSymbol*) _tmp61_);
	if (_tmp62_) {
		ValaCCodeFunctionCall* private_field_offset = NULL;
		ValaCCodeIdentifier* _tmp63_;
		ValaCCodeIdentifier* _tmp64_;
		ValaCCodeFunctionCall* _tmp65_;
		ValaCCodeFunctionCall* _tmp66_;
		ValaCCodeFunctionCall* _tmp67_;
		ValaClass* _tmp68_;
		gchar* _tmp69_;
		gchar* _tmp70_;
		gchar* _tmp71_;
		gchar* _tmp72_;
		ValaCCodeIdentifier* _tmp73_;
		ValaCCodeIdentifier* _tmp74_;
		ValaCCodeFunctionCall* _tmp75_;
		ValaField* _tmp76_;
		gchar* _tmp77_;
		gchar* _tmp78_;
		ValaCCodeIdentifier* _tmp79_;
		ValaCCodeIdentifier* _tmp80_;
		ValaClass* _tmp81_;
		gchar* _tmp82_;
		gchar* _tmp83_;
		gchar* _tmp84_;
		gchar* _tmp85_;
		ValaCCodeIdentifier* _tmp86_;
		ValaCCodeIdentifier* _tmp87_;
		ValaCCodeFunctionCall* _tmp88_;
		ValaCCodeBinaryExpression* _tmp89_;
		_tmp63_ = vala_ccode_identifier_new ("G_STRUCT_OFFSET");
		_tmp64_ = _tmp63_;
		_tmp65_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp64_);
		_tmp66_ = _tmp65_;
		_vala_ccode_node_unref0 (_tmp64_);
		private_field_offset = _tmp66_;
		_tmp67_ = private_field_offset;
		_tmp68_ = cl;
		_tmp69_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp68_);
		_tmp70_ = _tmp69_;
		_tmp71_ = g_strdup_printf ("%sPrivate", _tmp70_);
		_tmp72_ = _tmp71_;
		_tmp73_ = vala_ccode_identifier_new (_tmp72_);
		_tmp74_ = _tmp73_;
		vala_ccode_function_call_add_argument (_tmp67_, (ValaCCodeExpression*) _tmp74_);
		_vala_ccode_node_unref0 (_tmp74_);
		_g_free0 (_tmp72_);
		_g_free0 (_tmp70_);
		_tmp75_ = private_field_offset;
		_tmp76_ = f;
		_tmp77_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp76_);
		_tmp78_ = _tmp77_;
		_tmp79_ = vala_ccode_identifier_new (_tmp78_);
		_tmp80_ = _tmp79_;
		vala_ccode_function_call_add_argument (_tmp75_, (ValaCCodeExpression*) _tmp80_);
		_vala_ccode_node_unref0 (_tmp80_);
		_g_free0 (_tmp78_);
		_tmp81_ = cl;
		_tmp82_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp81_);
		_tmp83_ = _tmp82_;
		_tmp84_ = g_strdup_printf ("%s_private_offset", _tmp83_);
		_tmp85_ = _tmp84_;
		_tmp86_ = vala_ccode_identifier_new (_tmp85_);
		_tmp87_ = _tmp86_;
		_tmp88_ = private_field_offset;
		_tmp89_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp87_, (ValaCCodeExpression*) _tmp88_);
		_vala_ccode_node_unref0 (offset);
		offset = (ValaCCodeExpression*) _tmp89_;
		_vala_ccode_node_unref0 (_tmp87_);
		_g_free0 (_tmp85_);
		_g_free0 (_tmp83_);
		_vala_ccode_node_unref0 (private_field_offset);
	} else {
		ValaCCodeFunctionCall* offset_call = NULL;
		ValaCCodeIdentifier* _tmp90_;
		ValaCCodeIdentifier* _tmp91_;
		ValaCCodeFunctionCall* _tmp92_;
		ValaCCodeFunctionCall* _tmp93_;
		ValaCCodeFunctionCall* _tmp94_;
		ValaClass* _tmp95_;
		gchar* _tmp96_;
		gchar* _tmp97_;
		ValaCCodeIdentifier* _tmp98_;
		ValaCCodeIdentifier* _tmp99_;
		ValaCCodeFunctionCall* _tmp100_;
		ValaField* _tmp101_;
		gchar* _tmp102_;
		gchar* _tmp103_;
		ValaCCodeIdentifier* _tmp104_;
		ValaCCodeIdentifier* _tmp105_;
		ValaCCodeFunctionCall* _tmp106_;
		ValaCCodeExpression* _tmp107_;
		_tmp90_ = vala_ccode_identifier_new ("G_STRUCT_OFFSET");
		_tmp91_ = _tmp90_;
		_tmp92_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp91_);
		_tmp93_ = _tmp92_;
		_vala_ccode_node_unref0 (_tmp91_);
		offset_call = _tmp93_;
		_tmp94_ = offset_call;
		_tmp95_ = cl;
		_tmp96_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp95_);
		_tmp97_ = _tmp96_;
		_tmp98_ = vala_ccode_identifier_new (_tmp97_);
		_tmp99_ = _tmp98_;
		vala_ccode_function_call_add_argument (_tmp94_, (ValaCCodeExpression*) _tmp99_);
		_vala_ccode_node_unref0 (_tmp99_);
		_g_free0 (_tmp97_);
		_tmp100_ = offset_call;
		_tmp101_ = f;
		_tmp102_ = vala_ccode_base_module_get_ccode_name ((ValaCodeNode*) _tmp101_);
		_tmp103_ = _tmp102_;
		_tmp104_ = vala_ccode_identifier_new (_tmp103_);
		_tmp105_ = _tmp104_;
		vala_ccode_function_call_add_argument (_tmp100_, (ValaCCodeExpression*) _tmp105_);
		_vala_ccode_node_unref0 (_tmp105_);
		_g_free0 (_tmp103_);
		_tmp106_ = offset_call;
		_tmp107_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp106_);
		_vala_ccode_node_unref0 (offset);
		offset = _tmp107_;
		_vala_ccode_node_unref0 (offset_call);
	}
	_tmp108_ = vala_ccode_identifier_new ("gtk_widget_class_bind_template_child_full");
	_tmp109_ = _tmp108_;
	_tmp110_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp109_);
	_tmp111_ = _tmp110_;
	_vala_ccode_node_unref0 (_tmp109_);
	call = _tmp111_;
	_tmp112_ = call;
	_tmp113_ = vala_ccode_identifier_new ("GTK_WIDGET_CLASS (klass)");
	_tmp114_ = _tmp113_;
	vala_ccode_function_call_add_argument (_tmp112_, (ValaCCodeExpression*) _tmp114_);
	_vala_ccode_node_unref0 (_tmp114_);
	_tmp115_ = call;
	_tmp116_ = gtk_name;
	_tmp117_ = g_strdup_printf ("\"%s\"", _tmp116_);
	_tmp118_ = _tmp117_;
	_tmp119_ = vala_ccode_constant_new (_tmp118_);
	_tmp120_ = _tmp119_;
	vala_ccode_function_call_add_argument (_tmp115_, (ValaCCodeExpression*) _tmp120_);
	_vala_ccode_node_unref0 (_tmp120_);
	_g_free0 (_tmp118_);
	_tmp122_ = internal_child;
	if (_tmp122_) {
		_tmp121_ = "TRUE";
	} else {
		_tmp121_ = "FALSE";
	}
	_tmp123_ = call;
	_tmp124_ = vala_ccode_constant_new (_tmp121_);
	_tmp125_ = _tmp124_;
	vala_ccode_function_call_add_argument (_tmp123_, (ValaCCodeExpression*) _tmp125_);
	_vala_ccode_node_unref0 (_tmp125_);
	_tmp126_ = call;
	_tmp127_ = offset;
	vala_ccode_function_call_add_argument (_tmp126_, _tmp127_);
	_tmp128_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp129_ = _tmp128_;
	_tmp130_ = call;
	vala_ccode_function_add_expression (_tmp129_, (ValaCCodeExpression*) _tmp130_);
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_tmp132_ = field_class;
	_tmp133_ = vala_symbol_get_external ((ValaSymbol*) _tmp132_);
	_tmp134_ = _tmp133_;
	if (!_tmp134_) {
		ValaClass* _tmp135_;
		gboolean _tmp136_;
		gboolean _tmp137_;
		_tmp135_ = field_class;
		_tmp136_ = vala_symbol_get_external_package ((ValaSymbol*) _tmp135_);
		_tmp137_ = _tmp136_;
		_tmp131_ = !_tmp137_;
	} else {
		_tmp131_ = FALSE;
	}
	if (_tmp131_) {
		ValaList* _tmp138_;
		ValaClass* _tmp139_;
		_tmp138_ = self->priv->current_required_app_classes;
		_tmp139_ = field_class;
		vala_collection_add ((ValaCollection*) _tmp138_, _tmp139_);
	}
	_vala_ccode_node_unref0 (call);
	_vala_ccode_node_unref0 (offset);
	_vala_code_node_unref0 (field_class);
	_vala_code_node_unref0 (child_class);
	_g_free0 (gtk_name);
	_vala_code_node_unref0 (cl);
}


static void vala_gtk_module_real_visit_method (ValaCodeVisitor* base, ValaMethod* m) {
	ValaGtkModule * self;
	ValaMethod* _tmp0_;
	ValaClass* cl = NULL;
	ValaClass* _tmp1_;
	ValaClass* _tmp2_;
	ValaClass* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	ValaClass* _tmp6_;
	gboolean _tmp12_ = FALSE;
	ValaMethod* _tmp13_;
	ValaMemberBinding _tmp14_;
	ValaMemberBinding _tmp15_;
	gchar* handler_name = NULL;
	ValaMethod* _tmp19_;
	ValaMethod* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	ValaSignal* sig = NULL;
	ValaHashMap* _tmp24_;
	const gchar* _tmp25_;
	gpointer _tmp26_;
	ValaSignal* _tmp27_;
	ValaCCodeBaseModuleEmitContext* _tmp34_;
	ValaSignal* _tmp35_;
	self = (ValaGtkModule*) base;
	g_return_if_fail (m != NULL);
	_tmp0_ = m;
	VALA_CODE_VISITOR_CLASS (vala_gtk_module_parent_class)->visit_method ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GSIGNAL_MODULE, ValaGSignalModule), _tmp0_);
	_tmp1_ = vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _vala_code_node_ref0 (_tmp2_);
	cl = _tmp3_;
	_tmp6_ = cl;
	if (_tmp6_ == NULL) {
		_tmp5_ = TRUE;
	} else {
		ValaClass* _tmp7_;
		gboolean _tmp8_;
		gboolean _tmp9_;
		_tmp7_ = cl;
		_tmp8_ = vala_code_node_get_error ((ValaCodeNode*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp5_ = _tmp9_;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		ValaClass* _tmp10_;
		gboolean _tmp11_;
		_tmp10_ = cl;
		_tmp11_ = vala_gtk_module_is_gtk_template (self, _tmp10_);
		_tmp4_ = !_tmp11_;
	}
	if (_tmp4_) {
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp13_ = m;
	_tmp14_ = vala_method_get_binding (_tmp13_);
	_tmp15_ = _tmp14_;
	if (_tmp15_ != VALA_MEMBER_BINDING_INSTANCE) {
		_tmp12_ = TRUE;
	} else {
		ValaMethod* _tmp16_;
		ValaAttribute* _tmp17_;
		ValaAttribute* _tmp18_;
		_tmp16_ = m;
		_tmp17_ = vala_code_node_get_attribute ((ValaCodeNode*) _tmp16_, "GtkCallback");
		_tmp18_ = _tmp17_;
		_tmp12_ = _tmp18_ == NULL;
		_vala_code_node_unref0 (_tmp18_);
	}
	if (_tmp12_) {
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp19_ = m;
	_tmp20_ = m;
	_tmp21_ = vala_symbol_get_name ((ValaSymbol*) _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = vala_code_node_get_attribute_string ((ValaCodeNode*) _tmp19_, "GtkCallback", "name", _tmp22_);
	handler_name = _tmp23_;
	_tmp24_ = self->priv->current_handler_to_signal_map;
	_tmp25_ = handler_name;
	_tmp26_ = vala_map_get ((ValaMap*) _tmp24_, _tmp25_);
	sig = (ValaSignal*) _tmp26_;
	_tmp27_ = sig;
	if (_tmp27_ == NULL) {
		ValaMethod* _tmp28_;
		ValaSourceReference* _tmp29_;
		ValaSourceReference* _tmp30_;
		const gchar* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		_tmp28_ = m;
		_tmp29_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = handler_name;
		_tmp32_ = g_strdup_printf ("could not find signal for handler `%s'", _tmp31_);
		_tmp33_ = _tmp32_;
		vala_report_error (_tmp30_, _tmp33_);
		_g_free0 (_tmp33_);
		_vala_code_node_unref0 (sig);
		_g_free0 (handler_name);
		_vala_code_node_unref0 (cl);
		return;
	}
	_tmp34_ = ((ValaCCodeBaseModule*) self)->class_init_context;
	vala_ccode_base_module_push_context ((ValaCCodeBaseModule*) self, _tmp34_);
	_tmp35_ = sig;
	if (_tmp35_ != NULL) {
		ValaSignal* _tmp36_;
		ValaCodeContext* _tmp37_;
		ValaCodeContext* _tmp38_;
		ValaMethodType* method_type = NULL;
		ValaMethod* _tmp39_;
		ValaMethodType* _tmp40_;
		ValaSignalType* signal_type = NULL;
		ValaSignal* _tmp41_;
		ValaSignalType* _tmp42_;
		ValaDelegateType* delegate_type = NULL;
		ValaSignalType* _tmp43_;
		ValaDelegateType* _tmp44_;
		ValaMethodType* _tmp45_;
		ValaDelegateType* _tmp46_;
		gboolean _tmp47_;
		_tmp36_ = sig;
		_tmp37_ = vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self);
		_tmp38_ = _tmp37_;
		vala_code_node_check ((ValaCodeNode*) _tmp36_, _tmp38_);
		_tmp39_ = m;
		_tmp40_ = vala_method_type_new (_tmp39_);
		method_type = _tmp40_;
		_tmp41_ = sig;
		_tmp42_ = vala_signal_type_new (_tmp41_);
		signal_type = _tmp42_;
		_tmp43_ = signal_type;
		_tmp44_ = vala_signal_type_get_handler_type (_tmp43_);
		delegate_type = _tmp44_;
		_tmp45_ = method_type;
		_tmp46_ = delegate_type;
		_tmp47_ = vala_data_type_compatible ((ValaDataType*) _tmp45_, (ValaDataType*) _tmp46_);
		if (!_tmp47_) {
			ValaMethod* _tmp48_;
			ValaSourceReference* _tmp49_;
			ValaSourceReference* _tmp50_;
			ValaMethodType* _tmp51_;
			gchar* _tmp52_;
			gchar* _tmp53_;
			ValaDelegateType* _tmp54_;
			gchar* _tmp55_;
			gchar* _tmp56_;
			ValaDelegateType* _tmp57_;
			ValaDelegate* _tmp58_;
			ValaDelegate* _tmp59_;
			ValaMethod* _tmp60_;
			const gchar* _tmp61_;
			const gchar* _tmp62_;
			gchar* _tmp63_;
			gchar* _tmp64_;
			gchar* _tmp65_;
			gchar* _tmp66_;
			_tmp48_ = m;
			_tmp49_ = vala_code_node_get_source_reference ((ValaCodeNode*) _tmp48_);
			_tmp50_ = _tmp49_;
			_tmp51_ = method_type;
			_tmp52_ = vala_code_node_to_string ((ValaCodeNode*) _tmp51_);
			_tmp53_ = _tmp52_;
			_tmp54_ = delegate_type;
			_tmp55_ = vala_code_node_to_string ((ValaCodeNode*) _tmp54_);
			_tmp56_ = _tmp55_;
			_tmp57_ = delegate_type;
			_tmp58_ = vala_delegate_type_get_delegate_symbol (_tmp57_);
			_tmp59_ = _tmp58_;
			_tmp60_ = m;
			_tmp61_ = vala_symbol_get_name ((ValaSymbol*) _tmp60_);
			_tmp62_ = _tmp61_;
			_tmp63_ = vala_delegate_get_prototype_string (_tmp59_, _tmp62_);
			_tmp64_ = _tmp63_;
			_tmp65_ = g_strdup_printf ("method `%s' is incompatible with signal `%s', expected `%s'", _tmp53_, _tmp56_, _tmp64_);
			_tmp66_ = _tmp65_;
			vala_report_error (_tmp50_, _tmp66_);
			_g_free0 (_tmp66_);
			_g_free0 (_tmp64_);
			_g_free0 (_tmp56_);
			_g_free0 (_tmp53_);
		} else {
			gchar* wrapper = NULL;
			ValaMethod* _tmp67_;
			ValaSignalType* _tmp68_;
			ValaDelegateType* _tmp69_;
			ValaDelegateType* _tmp70_;
			ValaMethod* _tmp71_;
			gchar* _tmp72_;
			gchar* _tmp73_;
			ValaCCodeFunctionCall* call = NULL;
			ValaCCodeIdentifier* _tmp74_;
			ValaCCodeIdentifier* _tmp75_;
			ValaCCodeFunctionCall* _tmp76_;
			ValaCCodeFunctionCall* _tmp77_;
			ValaCCodeFunctionCall* _tmp78_;
			ValaCCodeIdentifier* _tmp79_;
			ValaCCodeIdentifier* _tmp80_;
			ValaCCodeFunctionCall* _tmp81_;
			const gchar* _tmp82_;
			gchar* _tmp83_;
			gchar* _tmp84_;
			ValaCCodeConstant* _tmp85_;
			ValaCCodeConstant* _tmp86_;
			ValaCCodeFunctionCall* _tmp87_;
			const gchar* _tmp88_;
			gchar* _tmp89_;
			gchar* _tmp90_;
			ValaCCodeIdentifier* _tmp91_;
			ValaCCodeIdentifier* _tmp92_;
			ValaCCodeFunction* _tmp93_;
			ValaCCodeFunction* _tmp94_;
			ValaCCodeFunctionCall* _tmp95_;
			_tmp67_ = m;
			_tmp68_ = signal_type;
			_tmp69_ = vala_signal_type_get_handler_type (_tmp68_);
			_tmp70_ = _tmp69_;
			_tmp71_ = m;
			_tmp72_ = vala_ccode_delegate_module_generate_delegate_wrapper ((ValaCCodeDelegateModule*) self, _tmp67_, _tmp70_, (ValaCodeNode*) _tmp71_);
			_tmp73_ = _tmp72_;
			_vala_code_node_unref0 (_tmp70_);
			wrapper = _tmp73_;
			_tmp74_ = vala_ccode_identifier_new ("gtk_widget_class_bind_template_callback_full");
			_tmp75_ = _tmp74_;
			_tmp76_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp75_);
			_tmp77_ = _tmp76_;
			_vala_ccode_node_unref0 (_tmp75_);
			call = _tmp77_;
			_tmp78_ = call;
			_tmp79_ = vala_ccode_identifier_new ("GTK_WIDGET_CLASS (klass)");
			_tmp80_ = _tmp79_;
			vala_ccode_function_call_add_argument (_tmp78_, (ValaCCodeExpression*) _tmp80_);
			_vala_ccode_node_unref0 (_tmp80_);
			_tmp81_ = call;
			_tmp82_ = handler_name;
			_tmp83_ = g_strdup_printf ("\"%s\"", _tmp82_);
			_tmp84_ = _tmp83_;
			_tmp85_ = vala_ccode_constant_new (_tmp84_);
			_tmp86_ = _tmp85_;
			vala_ccode_function_call_add_argument (_tmp81_, (ValaCCodeExpression*) _tmp86_);
			_vala_ccode_node_unref0 (_tmp86_);
			_g_free0 (_tmp84_);
			_tmp87_ = call;
			_tmp88_ = wrapper;
			_tmp89_ = g_strdup_printf ("G_CALLBACK(%s)", _tmp88_);
			_tmp90_ = _tmp89_;
			_tmp91_ = vala_ccode_identifier_new (_tmp90_);
			_tmp92_ = _tmp91_;
			vala_ccode_function_call_add_argument (_tmp87_, (ValaCCodeExpression*) _tmp92_);
			_vala_ccode_node_unref0 (_tmp92_);
			_g_free0 (_tmp90_);
			_tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp94_ = _tmp93_;
			_tmp95_ = call;
			vala_ccode_function_add_expression (_tmp94_, (ValaCCodeExpression*) _tmp95_);
			_vala_ccode_node_unref0 (call);
			_g_free0 (wrapper);
		}
		_vala_code_node_unref0 (delegate_type);
		_vala_code_node_unref0 (signal_type);
		_vala_code_node_unref0 (method_type);
	}
	vala_ccode_base_module_pop_context ((ValaCCodeBaseModule*) self);
	_vala_code_node_unref0 (sig);
	_g_free0 (handler_name);
	_vala_code_node_unref0 (cl);
}


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


static void vala_gtk_module_real_end_instance_init (ValaGTypeModule* base, ValaClass* cl) {
	ValaGtkModule * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	ValaClass* _tmp2_;
	ValaCCodeFunctionCall* call = NULL;
	ValaCCodeIdentifier* _tmp32_;
	ValaCCodeIdentifier* _tmp33_;
	ValaCCodeFunctionCall* _tmp34_;
	ValaCCodeFunctionCall* _tmp35_;
	ValaCCodeFunctionCall* _tmp36_;
	ValaCCodeIdentifier* _tmp37_;
	ValaCCodeIdentifier* _tmp38_;
	ValaCCodeFunction* _tmp39_;
	ValaCCodeFunction* _tmp40_;
	ValaCCodeFunctionCall* _tmp41_;
	self = (ValaGtkModule*) base;
	g_return_if_fail (cl != NULL);
	_tmp2_ = cl;
	if (_tmp2_ == NULL) {
		_tmp1_ = TRUE;
	} else {
		ValaClass* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		_tmp3_ = cl;
		_tmp4_ = vala_code_node_get_error ((ValaCodeNode*) _tmp3_);
		_tmp5_ = _tmp4_;
		_tmp1_ = _tmp5_;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		ValaClass* _tmp6_;
		gboolean _tmp7_;
		_tmp6_ = cl;
		_tmp7_ = vala_gtk_module_is_gtk_template (self, _tmp6_);
		_tmp0_ = !_tmp7_;
	}
	if (_tmp0_) {
		return;
	}
	{
		ValaList* _req_list = NULL;
		ValaList* _tmp8_;
		ValaList* _tmp9_;
		gint _req_size = 0;
		ValaList* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		gint _req_index = 0;
		_tmp8_ = self->priv->current_required_app_classes;
		_tmp9_ = _vala_iterable_ref0 (_tmp8_);
		_req_list = _tmp9_;
		_tmp10_ = _req_list;
		_tmp11_ = vala_collection_get_size ((ValaCollection*) _tmp10_);
		_tmp12_ = _tmp11_;
		_req_size = _tmp12_;
		_req_index = -1;
		while (TRUE) {
			gint _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			ValaClass* req = NULL;
			ValaList* _tmp16_;
			gint _tmp17_;
			gpointer _tmp18_;
			ValaCCodeFunctionCall* call = NULL;
			ValaCCodeIdentifier* _tmp19_;
			ValaCCodeIdentifier* _tmp20_;
			ValaCCodeFunctionCall* _tmp21_;
			ValaCCodeFunctionCall* _tmp22_;
			ValaCCodeFunctionCall* _tmp23_;
			ValaClass* _tmp24_;
			ValaDataType* _tmp25_;
			ValaDataType* _tmp26_;
			ValaCCodeExpression* _tmp27_;
			ValaCCodeExpression* _tmp28_;
			ValaCCodeFunction* _tmp29_;
			ValaCCodeFunction* _tmp30_;
			ValaCCodeFunctionCall* _tmp31_;
			_tmp13_ = _req_index;
			_req_index = _tmp13_ + 1;
			_tmp14_ = _req_index;
			_tmp15_ = _req_size;
			if (!(_tmp14_ < _tmp15_)) {
				break;
			}
			_tmp16_ = _req_list;
			_tmp17_ = _req_index;
			_tmp18_ = vala_list_get (_tmp16_, _tmp17_);
			req = (ValaClass*) _tmp18_;
			_tmp19_ = vala_ccode_identifier_new ("g_type_ensure");
			_tmp20_ = _tmp19_;
			_tmp21_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp20_);
			_tmp22_ = _tmp21_;
			_vala_ccode_node_unref0 (_tmp20_);
			call = _tmp22_;
			_tmp23_ = call;
			_tmp24_ = req;
			_tmp25_ = vala_semantic_analyzer_get_data_type_for_symbol ((ValaTypeSymbol*) _tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = vala_ccode_base_module_get_type_id_expression ((ValaCCodeBaseModule*) self, _tmp26_, FALSE);
			_tmp28_ = _tmp27_;
			vala_ccode_function_call_add_argument (_tmp23_, _tmp28_);
			_vala_ccode_node_unref0 (_tmp28_);
			_vala_code_node_unref0 (_tmp26_);
			_tmp29_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
			_tmp30_ = _tmp29_;
			_tmp31_ = call;
			vala_ccode_function_add_expression (_tmp30_, (ValaCCodeExpression*) _tmp31_);
			_vala_ccode_node_unref0 (call);
			_vala_code_node_unref0 (req);
		}
		_vala_iterable_unref0 (_req_list);
	}
	_tmp32_ = vala_ccode_identifier_new ("gtk_widget_init_template");
	_tmp33_ = _tmp32_;
	_tmp34_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp33_);
	_tmp35_ = _tmp34_;
	_vala_ccode_node_unref0 (_tmp33_);
	call = _tmp35_;
	_tmp36_ = call;
	_tmp37_ = vala_ccode_identifier_new ("GTK_WIDGET (self)");
	_tmp38_ = _tmp37_;
	vala_ccode_function_call_add_argument (_tmp36_, (ValaCCodeExpression*) _tmp38_);
	_vala_ccode_node_unref0 (_tmp38_);
	_tmp39_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self);
	_tmp40_ = _tmp39_;
	_tmp41_ = call;
	vala_ccode_function_add_expression (_tmp40_, (ValaCCodeExpression*) _tmp41_);
	_vala_ccode_node_unref0 (call);
}


ValaGtkModule* vala_gtk_module_construct (GType object_type) {
	ValaGtkModule* self = NULL;
	self = (ValaGtkModule*) vala_gsignal_module_construct (object_type);
	return self;
}


ValaGtkModule* vala_gtk_module_new (void) {
	return vala_gtk_module_construct (VALA_TYPE_GTK_MODULE);
}


static void vala_gtk_module_class_init (ValaGtkModuleClass * klass) {
	vala_gtk_module_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeVisitorClass *) klass)->finalize = vala_gtk_module_finalize;
	g_type_class_add_private (klass, sizeof (ValaGtkModulePrivate));
	((ValaGTypeModuleClass *) klass)->generate_class_init = (void (*) (ValaGTypeModule *, ValaClass*)) vala_gtk_module_real_generate_class_init;
	((ValaCodeVisitorClass *) klass)->visit_property = (void (*) (ValaCodeVisitor *, ValaProperty*)) vala_gtk_module_real_visit_property;
	((ValaCodeVisitorClass *) klass)->visit_field = (void (*) (ValaCodeVisitor *, ValaField*)) vala_gtk_module_real_visit_field;
	((ValaCodeVisitorClass *) klass)->visit_method = (void (*) (ValaCodeVisitor *, ValaMethod*)) vala_gtk_module_real_visit_method;
	((ValaGTypeModuleClass *) klass)->end_instance_init = (void (*) (ValaGTypeModule *, ValaClass*)) vala_gtk_module_real_end_instance_init;
}


static void vala_gtk_module_instance_init (ValaGtkModule * self) {
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GEqualFunc _tmp2_;
	ValaHashMap* _tmp3_;
	GHashFunc _tmp4_;
	GEqualFunc _tmp5_;
	GEqualFunc _tmp6_;
	ValaHashMap* _tmp7_;
	GEqualFunc _tmp8_;
	ValaArrayList* _tmp9_;
	self->priv = VALA_GTK_MODULE_GET_PRIVATE (self);
	self->priv->cclass_to_vala_map = NULL;
	self->priv->gresource_to_file_map = NULL;
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_direct_equal;
	_tmp3_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VALA_TYPE_SIGNAL, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp0_, _tmp1_, _tmp2_);
	self->priv->current_handler_to_signal_map = _tmp3_;
	_tmp4_ = g_str_hash;
	_tmp5_ = g_str_equal;
	_tmp6_ = g_direct_equal;
	_tmp7_ = vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, VALA_TYPE_CLASS, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp4_, _tmp5_, _tmp6_);
	self->priv->current_child_to_class_map = _tmp7_;
	_tmp8_ = g_direct_equal;
	_tmp9_ = vala_array_list_new (VALA_TYPE_CLASS, (GBoxedCopyFunc) vala_code_node_ref, (GDestroyNotify) vala_code_node_unref, _tmp8_);
	self->priv->current_required_app_classes = (ValaList*) _tmp9_;
}


static void vala_gtk_module_finalize (ValaCodeVisitor * obj) {
	ValaGtkModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_GTK_MODULE, ValaGtkModule);
	_vala_map_unref0 (self->priv->cclass_to_vala_map);
	_vala_map_unref0 (self->priv->gresource_to_file_map);
	_vala_map_unref0 (self->priv->current_handler_to_signal_map);
	_vala_map_unref0 (self->priv->current_child_to_class_map);
	_vala_iterable_unref0 (self->priv->current_required_app_classes);
	VALA_CODE_VISITOR_CLASS (vala_gtk_module_parent_class)->finalize (obj);
}


GType vala_gtk_module_get_type (void) {
	static volatile gsize vala_gtk_module_type_id__volatile = 0;
	if (g_once_init_enter (&vala_gtk_module_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaGtkModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gtk_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGtkModule), 0, (GInstanceInitFunc) vala_gtk_module_instance_init, NULL };
		GType vala_gtk_module_type_id;
		vala_gtk_module_type_id = g_type_register_static (VALA_TYPE_GSIGNAL_MODULE, "ValaGtkModule", &g_define_type_info, 0);
		g_once_init_leave (&vala_gtk_module_type_id__volatile, vala_gtk_module_type_id);
	}
	return vala_gtk_module_type_id__volatile;
}



