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

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

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

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

#include <glib.h>
#include <glib-object.h>
#include <vala.h>
#include <stdlib.h>
#include <string.h>
#include <valaccode.h>
#include <valagee.h>
#include <float.h>
#include <math.h>


#define VALA_TYPE_CCODE_MODULE (vala_ccode_module_get_type ())
#define VALA_CCODE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_MODULE, ValaCCodeModule))
#define VALA_CCODE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_MODULE, ValaCCodeModuleClass))
#define VALA_IS_CCODE_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_MODULE))
#define VALA_IS_CCODE_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_MODULE))
#define VALA_CCODE_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_MODULE, ValaCCodeModuleClass))

typedef struct _ValaCCodeModule ValaCCodeModule;
typedef struct _ValaCCodeModuleClass ValaCCodeModuleClass;
typedef struct _ValaCCodeModulePrivate ValaCCodeModulePrivate;

#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_TYPE_CCODE_DECLARATION_SPACE (vala_ccode_declaration_space_get_type ())
#define VALA_CCODE_DECLARATION_SPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_DECLARATION_SPACE, ValaCCodeDeclarationSpace))
#define VALA_CCODE_DECLARATION_SPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_DECLARATION_SPACE, ValaCCodeDeclarationSpaceClass))
#define VALA_IS_CCODE_DECLARATION_SPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_DECLARATION_SPACE))
#define VALA_IS_CCODE_DECLARATION_SPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_DECLARATION_SPACE))
#define VALA_CCODE_DECLARATION_SPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_DECLARATION_SPACE, ValaCCodeDeclarationSpaceClass))

typedef struct _ValaCCodeDeclarationSpace ValaCCodeDeclarationSpace;
typedef struct _ValaCCodeDeclarationSpaceClass ValaCCodeDeclarationSpaceClass;

#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_GENERATOR (vala_ccode_generator_get_type ())
#define VALA_CCODE_GENERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CCODE_GENERATOR, ValaCCodeGenerator))
#define VALA_CCODE_GENERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CCODE_GENERATOR, ValaCCodeGeneratorClass))
#define VALA_IS_CCODE_GENERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CCODE_GENERATOR))
#define VALA_IS_CCODE_GENERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CCODE_GENERATOR))
#define VALA_CCODE_GENERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CCODE_GENERATOR, ValaCCodeGeneratorClass))

typedef struct _ValaCCodeGenerator ValaCCodeGenerator;
typedef struct _ValaCCodeGeneratorClass ValaCCodeGeneratorClass;
#define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL)))
#define _vala_collection_object_unref0(var) ((var == NULL) ? NULL : (var = (vala_collection_object_unref (var), NULL)))

struct _ValaCCodeModule {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ValaCCodeModulePrivate * priv;
};

struct _ValaCCodeModuleClass {
	GTypeClass parent_class;
	void (*finalize) (ValaCCodeModule *self);
	void (*emit) (ValaCCodeModule* self, ValaCodeContext* context);
	void (*visit_source_file) (ValaCCodeModule* self, ValaSourceFile* source_file);
	void (*visit_class) (ValaCCodeModule* self, ValaClass* cl);
	void (*visit_interface) (ValaCCodeModule* self, ValaInterface* iface);
	void (*visit_struct) (ValaCCodeModule* self, ValaStruct* st);
	void (*visit_enum) (ValaCCodeModule* self, ValaEnum* en);
	void (*visit_error_domain) (ValaCCodeModule* self, ValaErrorDomain* edomain);
	void (*visit_delegate) (ValaCCodeModule* self, ValaDelegate* d);
	void (*visit_member) (ValaCCodeModule* self, ValaMember* m);
	void (*visit_constant) (ValaCCodeModule* self, ValaConstant* c);
	void (*visit_field) (ValaCCodeModule* self, ValaField* f);
	void (*visit_method) (ValaCCodeModule* self, ValaMethod* m);
	void (*visit_creation_method) (ValaCCodeModule* self, ValaCreationMethod* m);
	void (*visit_formal_parameter) (ValaCCodeModule* self, ValaFormalParameter* p);
	void (*visit_property) (ValaCCodeModule* self, ValaProperty* prop);
	void (*visit_property_accessor) (ValaCCodeModule* self, ValaPropertyAccessor* acc);
	void (*visit_signal) (ValaCCodeModule* self, ValaSignal* sig);
	void (*visit_constructor) (ValaCCodeModule* self, ValaConstructor* c);
	void (*visit_destructor) (ValaCCodeModule* self, ValaDestructor* d);
	void (*visit_block) (ValaCCodeModule* self, ValaBlock* b);
	void (*visit_empty_statement) (ValaCCodeModule* self, ValaEmptyStatement* stmt);
	void (*visit_declaration_statement) (ValaCCodeModule* self, ValaDeclarationStatement* stmt);
	void (*visit_local_variable) (ValaCCodeModule* self, ValaLocalVariable* local);
	void (*visit_initializer_list) (ValaCCodeModule* self, ValaInitializerList* list);
	void (*visit_end_full_expression) (ValaCCodeModule* self, ValaExpression* expr);
	void (*visit_expression_statement) (ValaCCodeModule* self, ValaExpressionStatement* stmt);
	void (*visit_if_statement) (ValaCCodeModule* self, ValaIfStatement* stmt);
	void (*visit_switch_statement) (ValaCCodeModule* self, ValaSwitchStatement* stmt);
	void (*visit_switch_section) (ValaCCodeModule* self, ValaSwitchSection* section);
	void (*visit_switch_label) (ValaCCodeModule* self, ValaSwitchLabel* label);
	void (*visit_loop) (ValaCCodeModule* self, ValaLoop* stmt);
	void (*visit_foreach_statement) (ValaCCodeModule* self, ValaForeachStatement* stmt);
	void (*visit_break_statement) (ValaCCodeModule* self, ValaBreakStatement* stmt);
	void (*visit_continue_statement) (ValaCCodeModule* self, ValaContinueStatement* stmt);
	void (*visit_return_statement) (ValaCCodeModule* self, ValaReturnStatement* stmt);
	void (*visit_yield_statement) (ValaCCodeModule* self, ValaYieldStatement* stmt);
	void (*visit_throw_statement) (ValaCCodeModule* self, ValaThrowStatement* stmt);
	void (*visit_try_statement) (ValaCCodeModule* self, ValaTryStatement* stmt);
	void (*visit_catch_clause) (ValaCCodeModule* self, ValaCatchClause* clause);
	void (*visit_lock_statement) (ValaCCodeModule* self, ValaLockStatement* stmt);
	void (*visit_unlock_statement) (ValaCCodeModule* self, ValaUnlockStatement* stmt);
	void (*visit_delete_statement) (ValaCCodeModule* self, ValaDeleteStatement* stmt);
	void (*visit_expression) (ValaCCodeModule* self, ValaExpression* expr);
	void (*visit_array_creation_expression) (ValaCCodeModule* self, ValaArrayCreationExpression* expr);
	void (*visit_boolean_literal) (ValaCCodeModule* self, ValaBooleanLiteral* expr);
	void (*visit_character_literal) (ValaCCodeModule* self, ValaCharacterLiteral* expr);
	void (*visit_integer_literal) (ValaCCodeModule* self, ValaIntegerLiteral* expr);
	void (*visit_real_literal) (ValaCCodeModule* self, ValaRealLiteral* expr);
	void (*visit_string_literal) (ValaCCodeModule* self, ValaStringLiteral* expr);
	void (*visit_list_literal) (ValaCCodeModule* self, ValaListLiteral* expr);
	void (*visit_set_literal) (ValaCCodeModule* self, ValaSetLiteral* expr);
	void (*visit_map_literal) (ValaCCodeModule* self, ValaMapLiteral* expr);
	void (*visit_tuple) (ValaCCodeModule* self, ValaTuple* expr);
	void (*visit_regex_literal) (ValaCCodeModule* self, ValaRegexLiteral* re);
	void (*visit_null_literal) (ValaCCodeModule* self, ValaNullLiteral* expr);
	void (*visit_member_access) (ValaCCodeModule* self, ValaMemberAccess* expr);
	void (*visit_method_call) (ValaCCodeModule* self, ValaMethodCall* expr);
	void (*visit_element_access) (ValaCCodeModule* self, ValaElementAccess* expr);
	void (*visit_slice_expression) (ValaCCodeModule* self, ValaSliceExpression* expr);
	void (*visit_base_access) (ValaCCodeModule* self, ValaBaseAccess* expr);
	void (*visit_postfix_expression) (ValaCCodeModule* self, ValaPostfixExpression* expr);
	void (*visit_object_creation_expression) (ValaCCodeModule* self, ValaObjectCreationExpression* expr);
	void (*visit_sizeof_expression) (ValaCCodeModule* self, ValaSizeofExpression* expr);
	void (*visit_typeof_expression) (ValaCCodeModule* self, ValaTypeofExpression* expr);
	void (*visit_unary_expression) (ValaCCodeModule* self, ValaUnaryExpression* expr);
	void (*visit_cast_expression) (ValaCCodeModule* self, ValaCastExpression* expr);
	void (*visit_named_argument) (ValaCCodeModule* self, ValaNamedArgument* expr);
	void (*visit_pointer_indirection) (ValaCCodeModule* self, ValaPointerIndirection* expr);
	void (*visit_addressof_expression) (ValaCCodeModule* self, ValaAddressofExpression* expr);
	void (*visit_reference_transfer_expression) (ValaCCodeModule* self, ValaReferenceTransferExpression* expr);
	void (*visit_binary_expression) (ValaCCodeModule* self, ValaBinaryExpression* expr);
	void (*visit_type_check) (ValaCCodeModule* self, ValaTypeCheck* expr);
	void (*visit_lambda_expression) (ValaCCodeModule* self, ValaLambdaExpression* l);
	void (*visit_assignment) (ValaCCodeModule* self, ValaAssignment* a);
	char* (*get_custom_creturn_type) (ValaCCodeModule* self, ValaMethod* m);
	void (*generate_dynamic_method_wrapper) (ValaCCodeModule* self, ValaDynamicMethod* method);
	gboolean (*method_has_wrapper) (ValaCCodeModule* self, ValaMethod* method);
	ValaCCodeIdentifier* (*get_value_setter_function) (ValaCCodeModule* self, ValaDataType* type_reference);
	ValaCCodeIdentifier* (*get_value_taker_function) (ValaCCodeModule* self, ValaDataType* type_reference);
	ValaCCodeExpression* (*get_construct_property_assignment) (ValaCCodeModule* self, ValaCCodeConstant* canonical_cconstant, ValaDataType* property_type, ValaCCodeExpression* value);
	ValaCCodeFunctionCall* (*get_param_spec) (ValaCCodeModule* self, ValaProperty* prop);
	ValaCCodeFunctionCall* (*get_signal_creation) (ValaCCodeModule* self, ValaSignal* sig, ValaTypeSymbol* type);
	ValaCCodeFragment* (*register_dbus_info) (ValaCCodeModule* self, ValaObjectTypeSymbol* bindable);
	char* (*get_dynamic_property_getter_cname) (ValaCCodeModule* self, ValaDynamicProperty* node);
	char* (*get_dynamic_property_setter_cname) (ValaCCodeModule* self, ValaDynamicProperty* node);
	char* (*get_dynamic_signal_cname) (ValaCCodeModule* self, ValaDynamicSignal* node);
	char* (*get_dynamic_signal_connect_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
	char* (*get_dynamic_signal_connect_after_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
	char* (*get_dynamic_signal_disconnect_wrapper_name) (ValaCCodeModule* self, ValaDynamicSignal* node);
	void (*generate_marshaller) (ValaCCodeModule* self, ValaList* params, ValaDataType* return_type, gboolean dbus);
	char* (*get_marshaller_function) (ValaCCodeModule* self, ValaList* params, ValaDataType* return_type, const char* prefix, gboolean dbus);
	char* (*get_array_length_cname) (ValaCCodeModule* self, const char* array_cname, gint dim);
	ValaCCodeExpression* (*get_array_length_cexpression) (ValaCCodeModule* self, ValaExpression* array_expr, gint dim);
	char* (*get_array_size_cname) (ValaCCodeModule* self, const char* array_cname);
	ValaCCodeExpression* (*get_array_size_cexpression) (ValaCCodeModule* self, ValaExpression* array_expr);
	void (*add_simple_check) (ValaCCodeModule* self, ValaCodeNode* node, ValaCCodeFragment* cfrag, gboolean always_fails);
};

struct _ValaCCodeBaseModule {
	ValaCCodeModule parent_instance;
	ValaCCodeBaseModulePrivate * priv;
	ValaSymbol* root_symbol;
	ValaSymbol* current_symbol;
	ValaTryStatement* current_try;
	ValaCCodeDeclarationSpace* header_declarations;
	ValaCCodeDeclarationSpace* internal_header_declarations;
	ValaCCodeDeclarationSpace* source_declarations;
	ValaCCodeFragment* source_signal_marshaller_declaration;
	ValaCCodeFragment* source_type_member_definition;
	ValaCCodeFragment* class_init_fragment;
	ValaCCodeFragment* base_init_fragment;
	ValaCCodeFragment* class_finalize_fragment;
	ValaCCodeFragment* base_finalize_fragment;
	ValaCCodeFragment* instance_init_fragment;
	ValaCCodeFragment* instance_finalize_fragment;
	ValaCCodeFragment* source_signal_marshaller_definition;
	ValaCCodeStruct* param_spec_struct;
	ValaCCodeStruct* closure_struct;
	ValaCCodeEnum* prop_enum;
	ValaCCodeFunction* function;
	ValaCCodeFragment* pre_statement_fragment;
	ValaCCodeSwitchStatement* state_switch_statement;
	ValaArrayList* temp_vars;
	ValaArrayList* temp_ref_vars;
	ValaSet* user_marshal_set;
	ValaSet* predefined_marshal_set;
	gint next_temp_var_id;
	gint next_regex_id;
	gboolean in_constructor;
	gboolean in_static_or_class_context;
	gboolean current_method_inner_error;
	gint next_coroutine_state;
	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* gvaluearray_type;
	ValaTypeSymbol* gstringbuilder_type;
	ValaTypeSymbol* garray_type;
	ValaTypeSymbol* gbytearray_type;
	ValaTypeSymbol* gptrarray_type;
	ValaTypeSymbol* gthreadpool_type;
	ValaDataType* gquark_type;
	ValaDataType* genumvalue_type;
	ValaStruct* gvalue_type;
	ValaStruct* mutex_type;
	ValaTypeSymbol* type_module_type;
	ValaTypeSymbol* dbus_object_type;
	gboolean in_plugin;
	char* module_init_param_name;
	gboolean gvaluecollector_h_needed;
	gboolean requires_array_free;
	gboolean requires_array_move;
	gboolean requires_array_length;
	gboolean requires_strcmp0;
	gboolean dbus_glib_h_needed;
	gboolean dbus_glib_h_needed_in_header;
	ValaSet* wrappers;
	ValaMap* variable_name_map;
};

struct _ValaCCodeBaseModuleClass {
	ValaCCodeModuleClass 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, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_class_struct_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_struct_declaration) (ValaCCodeBaseModule* self, ValaStruct* st, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_delegate_declaration) (ValaCCodeBaseModule* self, ValaDelegate* d, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_cparameters) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* 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);
	char* (*append_struct_array_free) (ValaCCodeBaseModule* self, ValaStruct* st);
	ValaCCodeExpression* (*get_unref_expression) (ValaCCodeBaseModule* self, ValaCCodeExpression* cvar, ValaDataType* type, ValaExpression* expr, gboolean is_macro_definition);
	void (*append_local_free) (ValaCCodeBaseModule* self, ValaSymbol* sym, ValaCCodeFragment* cfrag, gboolean stop_at_loop);
	gboolean (*variable_accessible_in_finally) (ValaCCodeBaseModule* self, ValaLocalVariable* local);
	char* (*get_delegate_target_cname) (ValaCCodeBaseModule* self, const char* delegate_cname);
	ValaCCodeExpression* (*get_delegate_target_cexpression) (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify);
	char* (*get_delegate_target_destroy_notify_cname) (ValaCCodeBaseModule* self, const char* delegate_cname);
	ValaCCodeExpression* (*get_ref_cexpression) (ValaCCodeBaseModule* self, ValaDataType* expression_type, ValaCCodeExpression* cexpr, ValaExpression* expr, ValaCodeNode* node);
	void (*generate_class_declaration) (ValaCCodeBaseModule* self, ValaClass* cl, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_interface_declaration) (ValaCCodeBaseModule* self, ValaInterface* iface, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_method_declaration) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space);
	void (*generate_error_domain_declaration) (ValaCCodeBaseModule* self, ValaErrorDomain* edomain, ValaCCodeDeclarationSpace* decl_space);
	ValaCCodeExpression* (*get_implicit_cast_expression) (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
	gboolean (*is_gobject_property) (ValaCCodeBaseModule* self, ValaProperty* prop);
};

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, ValaCCodeDeclarationSpace* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map);
	void (*generate_parameter) (ValaCCodeMethodModule* self, ValaFormalParameter* param, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
};


static gpointer vala_ccode_method_module_parent_class = NULL;

gpointer vala_ccode_module_ref (gpointer instance);
void vala_ccode_module_unref (gpointer instance);
GParamSpec* vala_param_spec_ccode_module (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_ccode_module (GValue* value, gpointer v_object);
void vala_value_take_ccode_module (GValue* value, gpointer v_object);
gpointer vala_value_get_ccode_module (const GValue* value);
GType vala_ccode_module_get_type (void);
GType vala_ccode_base_module_get_type (void);
gpointer vala_ccode_declaration_space_ref (gpointer instance);
void vala_ccode_declaration_space_unref (gpointer instance);
GParamSpec* vala_param_spec_ccode_declaration_space (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void vala_value_set_ccode_declaration_space (GValue* value, gpointer v_object);
void vala_value_take_ccode_declaration_space (GValue* value, gpointer v_object);
gpointer vala_value_get_ccode_declaration_space (const GValue* value);
GType vala_ccode_declaration_space_get_type (void);
GType vala_ccode_struct_module_get_type (void);
GType vala_ccode_method_module_get_type (void);
enum  {
	VALA_CCODE_METHOD_MODULE_DUMMY_PROPERTY
};
GType vala_ccode_generator_get_type (void);
ValaCCodeStructModule* vala_ccode_struct_module_new (ValaCCodeGenerator* codegen, ValaCCodeModule* next);
ValaCCodeStructModule* vala_ccode_struct_module_construct (GType object_type, ValaCCodeGenerator* codegen, ValaCCodeModule* next);
ValaCCodeMethodModule* vala_ccode_method_module_new (ValaCCodeGenerator* codegen, ValaCCodeModule* next);
ValaCCodeMethodModule* vala_ccode_method_module_construct (GType object_type, ValaCCodeGenerator* codegen, ValaCCodeModule* next);
static gboolean vala_ccode_method_module_real_method_has_wrapper (ValaCCodeModule* base, ValaMethod* method);
static char* vala_ccode_method_module_real_get_custom_creturn_type (ValaCCodeModule* base, ValaMethod* m);
char* vala_ccode_module_get_custom_creturn_type (ValaCCodeModule* self, ValaMethod* m);
static char* vala_ccode_method_module_get_creturn_type (ValaCCodeMethodModule* self, ValaMethod* m, const char* default_value);
static gboolean vala_ccode_method_module_is_gtypeinstance_creation_method (ValaCCodeMethodModule* self, ValaMethod* m);
void vala_ccode_base_module_generate_type_declaration (ValaCCodeBaseModule* self, ValaDataType* type, ValaCCodeDeclarationSpace* decl_space);
gint vala_ccode_base_module_get_param_pos (ValaCCodeBaseModule* self, double param_pos, gboolean ellipsis);
ValaCCodeExpression* vala_ccode_base_module_get_result_cexpression (ValaCCodeBaseModule* self, const char* cname);
ValaCCodeModule* vala_ccode_module_get_head (ValaCCodeModule* self);
char* vala_ccode_module_get_array_length_cname (ValaCCodeModule* self, const char* array_cname, gint dim);
ValaCCodeExpression* vala_ccode_base_module_get_variable_cexpression (ValaCCodeBaseModule* self, const char* name);
char* vala_ccode_base_module_get_delegate_target_cname (ValaCCodeBaseModule* self, const char* delegate_cname);
char* vala_ccode_base_module_get_delegate_target_destroy_notify_cname (ValaCCodeBaseModule* self, const char* delegate_cname);
void vala_ccode_method_module_generate_method_result_declaration (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map);
static void vala_ccode_method_module_real_generate_method_result_declaration (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map);
ValaCCodeStatement* vala_ccode_method_module_complete_async (ValaCCodeMethodModule* self);
gboolean vala_ccode_declaration_space_add_symbol_declaration (ValaCCodeDeclarationSpace* self, ValaSymbol* sym, const char* name);
void vala_ccode_base_module_generate_cparameters (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
void vala_ccode_declaration_space_add_type_member_declaration (ValaCCodeDeclarationSpace* self, ValaCCodeNode* node);
static void vala_ccode_method_module_real_generate_method_declaration (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space);
static void vala_ccode_method_module_register_plugin_types (ValaCCodeMethodModule* self, ValaCCodeFragment* module_init_fragment, ValaSymbol* sym, ValaSet* registered_types);
static void vala_ccode_method_module_register_plugin_type (ValaCCodeMethodModule* self, ValaCCodeFragment* module_init_fragment, ValaObjectTypeSymbol* type_symbol, ValaSet* registered_types);
void vala_ccode_base_module_check_type (ValaCCodeBaseModule* self, ValaDataType* type);
ValaTypeSymbol* vala_ccode_base_module_get_current_type_symbol (ValaCCodeBaseModule* self);
ValaCCodeGenerator* vala_ccode_module_get_codegen (ValaCCodeModule* self);
ValaClass* vala_ccode_base_module_get_current_class (ValaCCodeBaseModule* self);
static void vala_ccode_method_module_add_object_creation (ValaCCodeMethodModule* self, ValaCCodeBlock* b, gboolean has_params);
gboolean vala_ccode_base_module_requires_destroy (ValaCCodeBaseModule* self, ValaDataType* type);
ValaCCodeExpression* vala_ccode_base_module_get_unref_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* cvar, ValaDataType* type, ValaExpression* expr, gboolean is_macro_definition);
void vala_ccode_base_module_generate_method_declaration (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space);
ValaBlock* vala_ccode_base_module_get_current_closure_block (ValaCCodeBaseModule* self);
gint vala_ccode_base_module_get_block_id (ValaCCodeBaseModule* self, ValaBlock* b);
ValaBlock* vala_ccode_base_module_next_closure_block (ValaCCodeBaseModule* self, ValaSymbol* sym);
ValaCCodeExpression* vala_ccode_base_module_transform_expression (ValaCCodeBaseModule* self, ValaCCodeExpression* source_cexpr, ValaDataType* expression_type, ValaDataType* target_type, ValaExpression* expr);
static ValaCCodeStatement* vala_ccode_method_module_create_method_type_check_statement (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name);
char* vala_ccode_base_module_get_variable_cname (ValaCCodeBaseModule* self, const char* name);
ValaCCodeExpression* vala_ccode_base_module_default_value_for_type (ValaCCodeBaseModule* self, ValaDataType* type, gboolean initializer_expression);
ValaCCodeExpression* vala_ccode_module_get_construct_property_assignment (ValaCCodeModule* self, ValaCCodeConstant* canonical_cconstant, ValaDataType* property_type, ValaCCodeExpression* value);
void vala_ccode_declaration_space_add_include (ValaCCodeDeclarationSpace* self, const char* filename, gboolean local);
ValaCodeContext* vala_ccode_base_module_get_context (ValaCCodeBaseModule* self);
static ValaCCodeStatement* vala_ccode_method_module_create_precondition_statement (ValaCCodeMethodModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaExpression* precondition);
void vala_ccode_method_module_generate_vfunc (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaMap* cparam_map, ValaMap* carg_map, const char* suffix, gint direction);
static void vala_ccode_method_module_real_visit_method (ValaCCodeModule* base, ValaMethod* m);
void vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaFormalParameter* param, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
static void vala_ccode_method_module_real_generate_parameter (ValaCCodeMethodModule* self, ValaFormalParameter* param, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaMap* carg_map);
static ValaTypeSymbol* vala_ccode_method_module_find_parent_type (ValaCCodeMethodModule* self, ValaSymbol* sym);
static void vala_ccode_method_module_real_generate_cparameters (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
ValaCCodeStatement* vala_ccode_base_module_create_postcondition_statement (ValaCCodeBaseModule* self, ValaExpression* postcondition);
ValaCCodeStatement* vala_ccode_base_module_create_type_check_statement (ValaCCodeBaseModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name);
void vala_ccode_module_visit_method (ValaCCodeModule* self, ValaMethod* m);
static void vala_ccode_method_module_real_visit_creation_method (ValaCCodeModule* base, ValaCreationMethod* m);



ValaCCodeMethodModule* vala_ccode_method_module_construct (GType object_type, ValaCCodeGenerator* codegen, ValaCCodeModule* next) {
	ValaCCodeMethodModule* self;
	g_return_val_if_fail (codegen != NULL, NULL);
	self = (ValaCCodeMethodModule*) vala_ccode_struct_module_construct (object_type, codegen, next);
	return self;
}


ValaCCodeMethodModule* vala_ccode_method_module_new (ValaCCodeGenerator* codegen, ValaCCodeModule* next) {
	return vala_ccode_method_module_construct (VALA_TYPE_CCODE_METHOD_MODULE, codegen, next);
}


static gboolean vala_ccode_method_module_real_method_has_wrapper (ValaCCodeModule* base, ValaMethod* method) {
	ValaCCodeMethodModule * self;
	gboolean result = FALSE;
	ValaAttribute* _tmp0_;
	gboolean _tmp1_;
	self = (ValaCCodeMethodModule*) base;
	g_return_val_if_fail (method != NULL, FALSE);
	result = (_tmp1_ = (_tmp0_ = vala_code_node_get_attribute ((ValaCodeNode*) method, "NoWrapper")) == NULL, _vala_code_node_unref0 (_tmp0_), _tmp1_);
	return result;
}


static char* vala_ccode_method_module_real_get_custom_creturn_type (ValaCCodeModule* base, ValaMethod* m) {
	ValaCCodeMethodModule * self;
	char* result = NULL;
	ValaAttribute* attr;
	self = (ValaCCodeMethodModule*) base;
	g_return_val_if_fail (m != NULL, NULL);
	attr = vala_code_node_get_attribute ((ValaCodeNode*) m, "CCode");
	if (attr != NULL) {
		char* type;
		type = vala_attribute_get_string (attr, "type");
		if (type != NULL) {
			result = type;
			_vala_code_node_unref0 (attr);
			return result;
		}
		_g_free0 (type);
	}
	result = NULL;
	_vala_code_node_unref0 (attr);
	return result;
}


static char* vala_ccode_method_module_get_creturn_type (ValaCCodeMethodModule* self, ValaMethod* m, const char* default_value) {
	char* result = NULL;
	char* type;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (m != NULL, NULL);
	g_return_val_if_fail (default_value != NULL, NULL);
	type = vala_ccode_module_get_custom_creturn_type ((ValaCCodeModule*) self, m);
	if (type == NULL) {
		result = g_strdup (default_value);
		_g_free0 (type);
		return result;
	}
	result = type;
	return result;
}


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


static gboolean vala_ccode_method_module_is_gtypeinstance_creation_method (ValaCCodeMethodModule* self, ValaMethod* m) {
	gboolean result = FALSE;
	gboolean _result_;
	ValaSymbol* _tmp0_;
	ValaClass* cl;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (m != NULL, FALSE);
	_result_ = FALSE;
	cl = _vala_code_node_ref0 ((_tmp0_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m), VALA_IS_CLASS (_tmp0_) ? ((ValaClass*) _tmp0_) : NULL));
	if (VALA_IS_CREATION_METHOD (m)) {
		_tmp2_ = cl != NULL;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		_tmp1_ = !vala_class_get_is_compact (cl);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_result_ = TRUE;
	}
	result = _result_;
	_vala_code_node_unref0 (cl);
	return result;
}


static void vala_ccode_method_module_real_generate_method_result_declaration (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map) {
	ValaDataType* creturn_type;
	char* _tmp4_;
	char* _tmp3_;
	gboolean _tmp20_ = FALSE;
	gboolean _tmp21_ = FALSE;
	ValaList* _tmp22_;
	gboolean _tmp23_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (m != NULL);
	g_return_if_fail (decl_space != NULL);
	g_return_if_fail (cfunc != NULL);
	g_return_if_fail (cparam_map != NULL);
	creturn_type = _vala_code_node_ref0 (vala_method_get_return_type (m));
	if (VALA_IS_CREATION_METHOD (m)) {
		ValaSymbol* _tmp0_;
		ValaClass* cl;
		cl = _vala_code_node_ref0 ((_tmp0_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m), VALA_IS_CLASS (_tmp0_) ? ((ValaClass*) _tmp0_) : NULL));
		if (cl != NULL) {
			ValaDataType* _tmp1_;
			creturn_type = (_tmp1_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) cl), _vala_code_node_unref0 (creturn_type), _tmp1_);
		}
		_vala_code_node_unref0 (cl);
	} else {
		if (vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m))) {
			ValaDataType* _tmp2_;
			creturn_type = (_tmp2_ = (ValaDataType*) vala_void_type_new (NULL), _vala_code_node_unref0 (creturn_type), _tmp2_);
		}
	}
	vala_ccode_function_set_return_type (cfunc, _tmp4_ = vala_ccode_method_module_get_creturn_type (self, m, _tmp3_ = vala_data_type_get_cname (creturn_type)));
	_g_free0 (_tmp4_);
	_g_free0 (_tmp3_);
	vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, vala_method_get_return_type (m), decl_space);
	if (vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m))) {
		char* _tmp6_;
		char* _tmp5_;
		ValaCCodeFormalParameter* _tmp7_;
		ValaCCodeFormalParameter* cparam;
		cparam = (_tmp7_ = vala_ccode_formal_parameter_new ("result", _tmp6_ = g_strconcat (_tmp5_ = vala_data_type_get_cname (vala_method_get_return_type (m)), "*", NULL)), _g_free0 (_tmp6_), _g_free0 (_tmp5_), _tmp7_);
		vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-3), FALSE)), cparam);
		if (carg_map != NULL) {
			ValaCCodeExpression* _tmp8_;
			vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-3), FALSE)), _tmp8_ = vala_ccode_base_module_get_result_cexpression ((ValaCCodeBaseModule*) self, "result"));
			_vala_ccode_node_unref0 (_tmp8_);
		}
		_vala_ccode_node_unref0 (cparam);
	} else {
		gboolean _tmp9_ = FALSE;
		if (!vala_method_get_no_array_length (m)) {
			_tmp9_ = VALA_IS_ARRAY_TYPE (vala_method_get_return_type (m));
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			ValaArrayType* array_type;
			array_type = _vala_code_node_ref0 (VALA_ARRAY_TYPE (vala_method_get_return_type (m)));
			{
				gint dim;
				dim = 1;
				{
					gboolean _tmp10_;
					_tmp10_ = TRUE;
					while (TRUE) {
						char* _tmp11_;
						ValaCCodeFormalParameter* _tmp12_;
						ValaCCodeFormalParameter* cparam;
						if (!_tmp10_) {
							dim++;
						}
						_tmp10_ = FALSE;
						if (!(dim <= vala_array_type_get_rank (array_type))) {
							break;
						}
						cparam = (_tmp12_ = vala_ccode_formal_parameter_new (_tmp11_ = vala_ccode_module_get_array_length_cname (vala_ccode_module_get_head ((ValaCCodeModule*) self), "result", dim), "int*"), _g_free0 (_tmp11_), _tmp12_);
						vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_carray_length_parameter_position (m) + (0.01 * dim), FALSE)), cparam);
						if (carg_map != NULL) {
							ValaCCodeExpression* _tmp13_;
							vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_carray_length_parameter_position (m) + (0.01 * dim), FALSE)), _tmp13_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_ccode_formal_parameter_get_name (cparam)));
							_vala_ccode_node_unref0 (_tmp13_);
						}
						_vala_ccode_node_unref0 (cparam);
					}
				}
			}
			_vala_code_node_unref0 (array_type);
		} else {
			if (VALA_IS_DELEGATE_TYPE (vala_method_get_return_type (m))) {
				ValaDelegateType* deleg_type;
				ValaDelegate* d;
				deleg_type = _vala_code_node_ref0 (VALA_DELEGATE_TYPE (vala_method_get_return_type (m)));
				d = _vala_code_node_ref0 (vala_delegate_type_get_delegate_symbol (deleg_type));
				if (vala_delegate_get_has_target (d)) {
					char* _tmp14_;
					ValaCCodeFormalParameter* _tmp15_;
					ValaCCodeFormalParameter* cparam;
					cparam = (_tmp15_ = vala_ccode_formal_parameter_new (_tmp14_ = vala_ccode_base_module_get_delegate_target_cname ((ValaCCodeBaseModule*) self, "result"), "void**"), _g_free0 (_tmp14_), _tmp15_);
					vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cdelegate_target_parameter_position (m), FALSE)), cparam);
					if (carg_map != NULL) {
						ValaCCodeExpression* _tmp16_;
						vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cdelegate_target_parameter_position (m), FALSE)), _tmp16_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_ccode_formal_parameter_get_name (cparam)));
						_vala_ccode_node_unref0 (_tmp16_);
					}
					if (vala_data_type_get_value_owned ((ValaDataType*) deleg_type)) {
						ValaCCodeFormalParameter* _tmp18_;
						char* _tmp17_;
						cparam = (_tmp18_ = vala_ccode_formal_parameter_new (_tmp17_ = vala_ccode_base_module_get_delegate_target_destroy_notify_cname ((ValaCCodeBaseModule*) self, "result"), "GDestroyNotify*"), _vala_ccode_node_unref0 (cparam), _tmp18_);
						_g_free0 (_tmp17_);
						vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cdelegate_target_parameter_position (m) + 0.01, FALSE)), cparam);
						if (carg_map != NULL) {
							ValaCCodeExpression* _tmp19_;
							vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cdelegate_target_parameter_position (m) + 0.01, FALSE)), _tmp19_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_ccode_formal_parameter_get_name (cparam)));
							_vala_ccode_node_unref0 (_tmp19_);
						}
					}
					_vala_ccode_node_unref0 (cparam);
				}
				_vala_code_node_unref0 (deleg_type);
				_vala_code_node_unref0 (d);
			}
		}
	}
	if ((_tmp23_ = vala_collection_get_size ((ValaCollection*) (_tmp22_ = vala_code_node_get_error_types ((ValaCodeNode*) m))) > 0, _vala_collection_object_unref0 (_tmp22_), _tmp23_)) {
		_tmp21_ = TRUE;
	} else {
		gboolean _tmp24_ = FALSE;
		if (vala_method_get_base_method (m) != NULL) {
			ValaList* _tmp25_;
			_tmp24_ = vala_collection_get_size ((ValaCollection*) (_tmp25_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_method_get_base_method (m)))) > 0;
			_vala_collection_object_unref0 (_tmp25_);
		} else {
			_tmp24_ = FALSE;
		}
		_tmp21_ = _tmp24_;
	}
	if (_tmp21_) {
		_tmp20_ = TRUE;
	} else {
		gboolean _tmp26_ = FALSE;
		if (vala_method_get_base_interface_method (m) != NULL) {
			ValaList* _tmp27_;
			_tmp26_ = vala_collection_get_size ((ValaCollection*) (_tmp27_ = vala_code_node_get_error_types ((ValaCodeNode*) vala_method_get_base_interface_method (m)))) > 0;
			_vala_collection_object_unref0 (_tmp27_);
		} else {
			_tmp26_ = FALSE;
		}
		_tmp20_ = _tmp26_;
	}
	if (_tmp20_) {
		ValaCCodeFormalParameter* cparam;
		{
			ValaList* _tmp28_;
			ValaIterator* _tmp29_;
			ValaIterator* _error_type_it;
			_error_type_it = (_tmp29_ = vala_iterable_iterator ((ValaIterable*) (_tmp28_ = vala_code_node_get_error_types ((ValaCodeNode*) m))), _vala_collection_object_unref0 (_tmp28_), _tmp29_);
			while (TRUE) {
				ValaDataType* error_type;
				if (!vala_iterator_next (_error_type_it)) {
					break;
				}
				error_type = (ValaDataType*) vala_iterator_get (_error_type_it);
				vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, error_type, decl_space);
				_vala_code_node_unref0 (error_type);
			}
			_vala_collection_object_unref0 (_error_type_it);
		}
		cparam = vala_ccode_formal_parameter_new ("error", "GError**");
		vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-1), FALSE)), cparam);
		if (carg_map != NULL) {
			ValaCCodeIdentifier* _tmp30_;
			vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (double) (-1), FALSE)), (ValaCCodeExpression*) (_tmp30_ = vala_ccode_identifier_new (vala_ccode_formal_parameter_get_name (cparam))));
			_vala_ccode_node_unref0 (_tmp30_);
		}
		_vala_ccode_node_unref0 (cparam);
	}
	_vala_code_node_unref0 (creturn_type);
}


void vala_ccode_method_module_generate_method_result_declaration (ValaCCodeMethodModule* self, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaCCodeFunction* cfunc, ValaMap* cparam_map, ValaMap* carg_map) {
	VALA_CCODE_METHOD_MODULE_GET_CLASS (self)->generate_method_result_declaration (self, m, decl_space, cfunc, cparam_map, carg_map);
}


ValaCCodeStatement* vala_ccode_method_module_complete_async (ValaCCodeMethodModule* self) {
	ValaCCodeStatement* result = NULL;
	ValaCCodeBlock* complete_block;
	ValaCCodeBlock* direct_block;
	ValaCCodeIdentifier* _tmp0_;
	ValaCCodeFunctionCall* _tmp1_;
	ValaCCodeFunctionCall* direct_call;
	ValaCCodeIdentifier* _tmp2_;
	ValaCCodeMemberAccess* _tmp3_;
	ValaCCodeMemberAccess* async_result_expr;
	ValaCCodeExpressionStatement* _tmp4_;
	ValaCCodeBlock* idle_block;
	ValaCCodeIdentifier* _tmp5_;
	ValaCCodeFunctionCall* _tmp6_;
	ValaCCodeFunctionCall* idle_call;
	ValaCCodeExpressionStatement* _tmp7_;
	ValaCCodeIdentifier* _tmp8_;
	ValaCCodeMemberAccess* _tmp9_;
	ValaCCodeMemberAccess* state;
	ValaCCodeConstant* zero;
	ValaCCodeBinaryExpression* state_is_zero;
	ValaCCodeIfStatement* dispatch;
	ValaCCodeIdentifier* _tmp10_;
	ValaCCodeFunctionCall* _tmp11_;
	ValaCCodeFunctionCall* unref;
	ValaCCodeExpressionStatement* _tmp12_;
	ValaCCodeReturnStatement* _tmp14_;
	ValaCCodeConstant* _tmp13_;
	g_return_val_if_fail (self != NULL, NULL);
	complete_block = vala_ccode_block_new ();
	direct_block = vala_ccode_block_new ();
	direct_call = (_tmp1_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp0_ = vala_ccode_identifier_new ("g_simple_async_result_complete"))), _vala_ccode_node_unref0 (_tmp0_), _tmp1_);
	async_result_expr = (_tmp3_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp2_ = vala_ccode_identifier_new ("data")), "_async_result"), _vala_ccode_node_unref0 (_tmp2_), _tmp3_);
	vala_ccode_function_call_add_argument (direct_call, (ValaCCodeExpression*) async_result_expr);
	vala_ccode_block_add_statement (direct_block, (ValaCCodeNode*) (_tmp4_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) direct_call)));
	_vala_ccode_node_unref0 (_tmp4_);
	idle_block = vala_ccode_block_new ();
	idle_call = (_tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp5_ = vala_ccode_identifier_new ("g_simple_async_result_complete_in_idle"))), _vala_ccode_node_unref0 (_tmp5_), _tmp6_);
	vala_ccode_function_call_add_argument (idle_call, (ValaCCodeExpression*) async_result_expr);
	vala_ccode_block_add_statement (idle_block, (ValaCCodeNode*) (_tmp7_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) idle_call)));
	_vala_ccode_node_unref0 (_tmp7_);
	state = (_tmp9_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new ("data")), "_state_"), _vala_ccode_node_unref0 (_tmp8_), _tmp9_);
	zero = vala_ccode_constant_new ("0");
	state_is_zero = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) state, (ValaCCodeExpression*) zero);
	dispatch = vala_ccode_if_statement_new ((ValaCCodeExpression*) state_is_zero, (ValaCCodeStatement*) idle_block, (ValaCCodeStatement*) direct_block);
	vala_ccode_block_add_statement (complete_block, (ValaCCodeNode*) dispatch);
	unref = (_tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_identifier_new ("g_object_unref"))), _vala_ccode_node_unref0 (_tmp10_), _tmp11_);
	vala_ccode_function_call_add_argument (unref, (ValaCCodeExpression*) async_result_expr);
	vala_ccode_block_add_statement (complete_block, (ValaCCodeNode*) (_tmp12_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) unref)));
	_vala_ccode_node_unref0 (_tmp12_);
	vala_ccode_block_add_statement (complete_block, (ValaCCodeNode*) (_tmp14_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp13_ = vala_ccode_constant_new ("FALSE")))));
	_vala_ccode_node_unref0 (_tmp14_);
	_vala_ccode_node_unref0 (_tmp13_);
	result = (ValaCCodeStatement*) complete_block;
	_vala_ccode_node_unref0 (direct_block);
	_vala_ccode_node_unref0 (direct_call);
	_vala_ccode_node_unref0 (async_result_expr);
	_vala_ccode_node_unref0 (idle_block);
	_vala_ccode_node_unref0 (idle_call);
	_vala_ccode_node_unref0 (state);
	_vala_ccode_node_unref0 (zero);
	_vala_ccode_node_unref0 (state_is_zero);
	_vala_ccode_node_unref0 (dispatch);
	_vala_ccode_node_unref0 (unref);
	return result;
}


static void vala_ccode_method_module_real_generate_method_declaration (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space) {
	ValaCCodeMethodModule * self;
	char* _tmp0_;
	gboolean _tmp1_;
	char* _tmp2_;
	ValaCCodeFunction* _tmp3_;
	ValaCCodeFunction* function;
	gboolean _tmp4_ = FALSE;
	ValaHashMap* cparam_map;
	ValaHashMap* carg_map;
	ValaSymbol* _tmp5_;
	ValaClass* cl;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp10_ = FALSE;
	self = (ValaCCodeMethodModule*) base;
	g_return_if_fail (m != NULL);
	g_return_if_fail (decl_space != NULL);
	if (vala_method_get_is_async_callback (m)) {
		return;
	}
	if ((_tmp1_ = vala_ccode_declaration_space_add_symbol_declaration (decl_space, (ValaSymbol*) m, _tmp0_ = vala_method_get_cname (m)), _g_free0 (_tmp0_), _tmp1_)) {
		return;
	}
	function = (_tmp3_ = vala_ccode_function_new (_tmp2_ = vala_method_get_cname (m), "void"), _g_free0 (_tmp2_), _tmp3_);
	if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
		_tmp4_ = !vala_symbol_get_external ((ValaSymbol*) m);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		vala_ccode_function_set_modifiers (function, vala_ccode_function_get_modifiers (function) | VALA_CCODE_MODIFIERS_STATIC);
		if (vala_method_get_is_inline (m)) {
			vala_ccode_function_set_modifiers (function, vala_ccode_function_get_modifiers (function) | VALA_CCODE_MODIFIERS_INLINE);
		}
	}
	cparam_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
	carg_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
	cl = _vala_code_node_ref0 ((_tmp5_ = vala_symbol_get_parent_symbol ((ValaSymbol*) m), VALA_IS_CLASS (_tmp5_) ? ((ValaClass*) _tmp5_) : NULL));
	if (VALA_IS_CREATION_METHOD (m)) {
		_tmp7_ = cl != NULL;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		_tmp6_ = vala_class_get_is_abstract (cl);
	} else {
		_tmp6_ = FALSE;
	}
	if (!_tmp6_) {
		ValaCCodeFunctionCall* _tmp9_;
		ValaCCodeIdentifier* _tmp8_;
		vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, (ValaMap*) carg_map, _tmp9_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp8_ = vala_ccode_identifier_new ("fake"))), 3);
		_vala_ccode_node_unref0 (_tmp9_);
		_vala_ccode_node_unref0 (_tmp8_);
		vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) function);
	}
	if (VALA_IS_CREATION_METHOD (m)) {
		_tmp10_ = cl != NULL;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		ValaCCodeFunction* _tmp12_;
		char* _tmp11_;
		ValaHashMap* _tmp13_;
		function = (_tmp12_ = vala_ccode_function_new (_tmp11_ = vala_method_get_real_cname (m), "void"), _vala_ccode_node_unref0 (function), _tmp12_);
		_g_free0 (_tmp11_);
		if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
			vala_ccode_function_set_modifiers (function, vala_ccode_function_get_modifiers (function) | VALA_CCODE_MODIFIERS_STATIC);
		}
		cparam_map = (_tmp13_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal), _vala_collection_object_unref0 (cparam_map), _tmp13_);
		vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, decl_space, (ValaMap*) cparam_map, function, NULL, NULL, NULL, 3);
		vala_ccode_declaration_space_add_type_member_declaration (decl_space, (ValaCCodeNode*) function);
	}
	_vala_ccode_node_unref0 (function);
	_vala_collection_object_unref0 (cparam_map);
	_vala_collection_object_unref0 (carg_map);
	_vala_code_node_unref0 (cl);
}


static void vala_ccode_method_module_register_plugin_types (ValaCCodeMethodModule* self, ValaCCodeFragment* module_init_fragment, ValaSymbol* sym, ValaSet* registered_types) {
	ValaSymbol* _tmp0_;
	ValaNamespace* ns;
	ValaSymbol* _tmp1_;
	ValaClass* cl;
	ValaSymbol* _tmp2_;
	ValaInterface* iface;
	g_return_if_fail (self != NULL);
	g_return_if_fail (module_init_fragment != NULL);
	g_return_if_fail (sym != NULL);
	g_return_if_fail (registered_types != NULL);
	ns = _vala_code_node_ref0 ((_tmp0_ = sym, VALA_IS_NAMESPACE (_tmp0_) ? ((ValaNamespace*) _tmp0_) : NULL));
	cl = _vala_code_node_ref0 ((_tmp1_ = sym, VALA_IS_CLASS (_tmp1_) ? ((ValaClass*) _tmp1_) : NULL));
	iface = _vala_code_node_ref0 ((_tmp2_ = sym, VALA_IS_INTERFACE (_tmp2_) ? ((ValaInterface*) _tmp2_) : NULL));
	if (ns != NULL) {
		{
			ValaList* _tmp3_;
			ValaIterator* _tmp4_;
			ValaIterator* _ns_ns_it;
			_ns_ns_it = (_tmp4_ = vala_iterable_iterator ((ValaIterable*) (_tmp3_ = vala_namespace_get_namespaces (ns))), _vala_collection_object_unref0 (_tmp3_), _tmp4_);
			while (TRUE) {
				ValaNamespace* ns_ns;
				if (!vala_iterator_next (_ns_ns_it)) {
					break;
				}
				ns_ns = (ValaNamespace*) vala_iterator_get (_ns_ns_it);
				vala_ccode_method_module_register_plugin_types (self, module_init_fragment, (ValaSymbol*) ns_ns, registered_types);
				_vala_code_node_unref0 (ns_ns);
			}
			_vala_collection_object_unref0 (_ns_ns_it);
		}
		{
			ValaList* _tmp5_;
			ValaIterator* _tmp6_;
			ValaIterator* _ns_cl_it;
			_ns_cl_it = (_tmp6_ = vala_iterable_iterator ((ValaIterable*) (_tmp5_ = vala_namespace_get_classes (ns))), _vala_collection_object_unref0 (_tmp5_), _tmp6_);
			while (TRUE) {
				ValaClass* ns_cl;
				if (!vala_iterator_next (_ns_cl_it)) {
					break;
				}
				ns_cl = (ValaClass*) vala_iterator_get (_ns_cl_it);
				vala_ccode_method_module_register_plugin_types (self, module_init_fragment, (ValaSymbol*) ns_cl, registered_types);
				_vala_code_node_unref0 (ns_cl);
			}
			_vala_collection_object_unref0 (_ns_cl_it);
		}
		{
			ValaList* _tmp7_;
			ValaIterator* _tmp8_;
			ValaIterator* _ns_iface_it;
			_ns_iface_it = (_tmp8_ = vala_iterable_iterator ((ValaIterable*) (_tmp7_ = vala_namespace_get_interfaces (ns))), _vala_collection_object_unref0 (_tmp7_), _tmp8_);
			while (TRUE) {
				ValaInterface* ns_iface;
				if (!vala_iterator_next (_ns_iface_it)) {
					break;
				}
				ns_iface = (ValaInterface*) vala_iterator_get (_ns_iface_it);
				vala_ccode_method_module_register_plugin_types (self, module_init_fragment, (ValaSymbol*) ns_iface, registered_types);
				_vala_code_node_unref0 (ns_iface);
			}
			_vala_collection_object_unref0 (_ns_iface_it);
		}
	} else {
		if (cl != NULL) {
			vala_ccode_method_module_register_plugin_type (self, module_init_fragment, (ValaObjectTypeSymbol*) cl, registered_types);
			{
				ValaList* _tmp9_;
				ValaIterator* _tmp10_;
				ValaIterator* _cl_cl_it;
				_cl_cl_it = (_tmp10_ = vala_iterable_iterator ((ValaIterable*) (_tmp9_ = vala_class_get_classes (cl))), _vala_collection_object_unref0 (_tmp9_), _tmp10_);
				while (TRUE) {
					ValaClass* cl_cl;
					if (!vala_iterator_next (_cl_cl_it)) {
						break;
					}
					cl_cl = (ValaClass*) vala_iterator_get (_cl_cl_it);
					vala_ccode_method_module_register_plugin_types (self, module_init_fragment, (ValaSymbol*) cl_cl, registered_types);
					_vala_code_node_unref0 (cl_cl);
				}
				_vala_collection_object_unref0 (_cl_cl_it);
			}
		} else {
			if (iface != NULL) {
				vala_ccode_method_module_register_plugin_type (self, module_init_fragment, (ValaObjectTypeSymbol*) iface, registered_types);
				{
					ValaList* _tmp11_;
					ValaIterator* _tmp12_;
					ValaIterator* _iface_cl_it;
					_iface_cl_it = (_tmp12_ = vala_iterable_iterator ((ValaIterable*) (_tmp11_ = vala_interface_get_classes (iface))), _vala_collection_object_unref0 (_tmp11_), _tmp12_);
					while (TRUE) {
						ValaClass* iface_cl;
						if (!vala_iterator_next (_iface_cl_it)) {
							break;
						}
						iface_cl = (ValaClass*) vala_iterator_get (_iface_cl_it);
						vala_ccode_method_module_register_plugin_types (self, module_init_fragment, (ValaSymbol*) iface_cl, registered_types);
						_vala_code_node_unref0 (iface_cl);
					}
					_vala_collection_object_unref0 (_iface_cl_it);
				}
			}
		}
	}
	_vala_code_node_unref0 (ns);
	_vala_code_node_unref0 (cl);
	_vala_code_node_unref0 (iface);
}


static void vala_ccode_method_module_register_plugin_type (ValaCCodeMethodModule* self, ValaCCodeFragment* module_init_fragment, ValaObjectTypeSymbol* type_symbol, ValaSet* registered_types) {
	ValaObjectTypeSymbol* _tmp0_;
	ValaClass* cl;
	ValaCCodeIdentifier* _tmp5_;
	char* _tmp4_;
	char* _tmp3_;
	ValaCCodeFunctionCall* _tmp6_;
	ValaCCodeFunctionCall* register_call;
	ValaCCodeIdentifier* _tmp7_;
	ValaCCodeExpressionStatement* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (module_init_fragment != NULL);
	g_return_if_fail (type_symbol != NULL);
	g_return_if_fail (registered_types != NULL);
	if (vala_symbol_get_external_package ((ValaSymbol*) type_symbol)) {
		return;
	}
	if (!vala_collection_add ((ValaCollection*) registered_types, (ValaSymbol*) type_symbol)) {
		return;
	}
	cl = _vala_code_node_ref0 ((_tmp0_ = type_symbol, VALA_IS_CLASS (_tmp0_) ? ((ValaClass*) _tmp0_) : NULL));
	if (cl != NULL) {
		if (vala_class_get_is_compact (cl)) {
			_vala_code_node_unref0 (cl);
			return;
		}
		{
			ValaList* _tmp1_;
			ValaIterator* _tmp2_;
			ValaIterator* _base_type_it;
			_base_type_it = (_tmp2_ = vala_iterable_iterator ((ValaIterable*) (_tmp1_ = vala_class_get_base_types (cl))), _vala_collection_object_unref0 (_tmp1_), _tmp2_);
			while (TRUE) {
				ValaDataType* base_type;
				if (!vala_iterator_next (_base_type_it)) {
					break;
				}
				base_type = (ValaDataType*) vala_iterator_get (_base_type_it);
				vala_ccode_method_module_register_plugin_type (self, module_init_fragment, VALA_OBJECT_TYPE_SYMBOL (vala_data_type_get_data_type (base_type)), registered_types);
				_vala_code_node_unref0 (base_type);
			}
			_vala_collection_object_unref0 (_base_type_it);
		}
	}
	register_call = (_tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp5_ = vala_ccode_identifier_new (_tmp4_ = g_strdup_printf ("%s_register_type", _tmp3_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) type_symbol, NULL))))), _vala_ccode_node_unref0 (_tmp5_), _g_free0 (_tmp4_), _g_free0 (_tmp3_), _tmp6_);
	vala_ccode_function_call_add_argument (register_call, (ValaCCodeExpression*) (_tmp7_ = vala_ccode_identifier_new (((ValaCCodeBaseModule*) self)->module_init_param_name)));
	_vala_ccode_node_unref0 (_tmp7_);
	vala_ccode_fragment_append (module_init_fragment, (ValaCCodeNode*) (_tmp8_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) register_call)));
	_vala_ccode_node_unref0 (_tmp8_);
	_vala_code_node_unref0 (cl);
	_vala_ccode_node_unref0 (register_call);
}


static gpointer _vala_collection_object_ref0 (gpointer self) {
	return self ? vala_collection_object_ref (self) : NULL;
}


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


static void vala_ccode_method_module_real_visit_method (ValaCCodeModule* base, ValaMethod* m) {
	ValaCCodeMethodModule * self;
	ValaSymbol* old_symbol;
	gboolean old_method_inner_error;
	gint old_next_temp_var_id;
	ValaArrayList* old_temp_vars;
	ValaArrayList* old_temp_ref_vars;
	ValaMap* old_variable_name_map;
	ValaTryStatement* old_try;
	ValaCCodeSwitchStatement* old_state_switch_statement;
	ValaSymbol* _tmp0_;
	ValaArrayList* _tmp1_;
	ValaArrayList* _tmp2_;
	ValaMap* _tmp3_;
	ValaTryStatement* _tmp4_;
	ValaCCodeSwitchStatement* _tmp5_;
	gboolean in_gobject_creation_method;
	gboolean in_fundamental_creation_method;
	ValaCCodeSwitchStatement* current_state_switch;
	ValaDataType* creturn_type;
	gboolean _tmp16_ = FALSE;
	gboolean inner_error;
	ValaSymbol* _tmp45_;
	ValaArrayList* _tmp46_;
	ValaArrayList* _tmp47_;
	ValaMap* _tmp48_;
	ValaTryStatement* _tmp49_;
	ValaCCodeSwitchStatement* _tmp50_;
	gboolean _tmp51_ = FALSE;
	gboolean _tmp52_ = FALSE;
	ValaCCodeFunction* _tmp55_;
	char* _tmp54_;
	ValaHashMap* cparam_map;
	gboolean _tmp56_ = FALSE;
	gboolean _tmp245_ = FALSE;
	gboolean _tmp246_ = FALSE;
	gboolean _tmp247_ = FALSE;
	self = (ValaCCodeMethodModule*) base;
	g_return_if_fail (m != NULL);
	old_symbol = _vala_code_node_ref0 (((ValaCCodeBaseModule*) self)->current_symbol);
	old_method_inner_error = ((ValaCCodeBaseModule*) self)->current_method_inner_error;
	old_next_temp_var_id = ((ValaCCodeBaseModule*) self)->next_temp_var_id;
	old_temp_vars = _vala_collection_object_ref0 (((ValaCCodeBaseModule*) self)->temp_vars);
	old_temp_ref_vars = _vala_collection_object_ref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars);
	old_variable_name_map = _vala_collection_object_ref0 (((ValaCCodeBaseModule*) self)->variable_name_map);
	old_try = _vala_code_node_ref0 (((ValaCCodeBaseModule*) self)->current_try);
	old_state_switch_statement = _vala_ccode_node_ref0 (((ValaCCodeBaseModule*) self)->state_switch_statement);
	((ValaCCodeBaseModule*) self)->current_symbol = (_tmp0_ = _vala_code_node_ref0 ((ValaSymbol*) m), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_symbol), _tmp0_);
	((ValaCCodeBaseModule*) self)->current_method_inner_error = FALSE;
	((ValaCCodeBaseModule*) self)->next_temp_var_id = 0;
	((ValaCCodeBaseModule*) self)->temp_vars = (_tmp1_ = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_vars), _tmp1_);
	((ValaCCodeBaseModule*) self)->temp_ref_vars = (_tmp2_ = vala_array_list_new (VALA_TYPE_LOCAL_VARIABLE, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_equal), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars), _tmp2_);
	((ValaCCodeBaseModule*) self)->variable_name_map = (_tmp3_ = (ValaMap*) vala_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, g_str_hash, g_str_equal, g_direct_equal), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->variable_name_map), _tmp3_);
	((ValaCCodeBaseModule*) self)->current_try = (_tmp4_ = NULL, _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_try), _tmp4_);
	((ValaCCodeBaseModule*) self)->state_switch_statement = (_tmp5_ = NULL, _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->state_switch_statement), _tmp5_);
	in_gobject_creation_method = FALSE;
	in_fundamental_creation_method = FALSE;
	vala_ccode_base_module_check_type ((ValaCCodeBaseModule*) self, vala_method_get_return_type (m));
	if (VALA_IS_CREATION_METHOD (m)) {
		ValaTypeSymbol* _tmp6_;
		ValaClass* cl;
		gboolean _tmp7_ = FALSE;
		cl = _vala_code_node_ref0 ((_tmp6_ = vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self), VALA_IS_CLASS (_tmp6_) ? ((ValaClass*) _tmp6_) : NULL));
		if (cl != NULL) {
			_tmp7_ = !vala_class_get_is_compact (cl);
		} else {
			_tmp7_ = FALSE;
		}
		if (_tmp7_) {
			if (vala_class_get_base_class (cl) == NULL) {
				in_fundamental_creation_method = TRUE;
			} else {
				gboolean _tmp8_ = FALSE;
				if (((ValaCCodeBaseModule*) self)->gobject_type != NULL) {
					_tmp8_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) cl, ((ValaCCodeBaseModule*) self)->gobject_type);
				} else {
					_tmp8_ = FALSE;
				}
				if (_tmp8_) {
					in_gobject_creation_method = TRUE;
				}
			}
		}
		_vala_code_node_unref0 (cl);
	}
	if (vala_method_get_coroutine (m)) {
		ValaCCodeSwitchStatement* _tmp11_;
		ValaCCodeMemberAccess* _tmp10_;
		ValaCCodeIdentifier* _tmp9_;
		ValaCCodeCaseStatement* _tmp13_;
		ValaCCodeConstant* _tmp12_;
		ValaCCodeGotoStatement* _tmp14_;
		((ValaCCodeBaseModule*) self)->state_switch_statement = (_tmp11_ = vala_ccode_switch_statement_new ((ValaCCodeExpression*) (_tmp10_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp9_ = vala_ccode_identifier_new ("data")), "_state_"))), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->state_switch_statement), _tmp11_);
		_vala_ccode_node_unref0 (_tmp10_);
		_vala_ccode_node_unref0 (_tmp9_);
		vala_ccode_block_add_statement ((ValaCCodeBlock*) ((ValaCCodeBaseModule*) self)->state_switch_statement, (ValaCCodeNode*) (_tmp13_ = vala_ccode_case_statement_new ((ValaCCodeExpression*) (_tmp12_ = vala_ccode_constant_new ("0")))));
		_vala_ccode_node_unref0 (_tmp13_);
		_vala_ccode_node_unref0 (_tmp12_);
		vala_ccode_block_add_statement ((ValaCCodeBlock*) ((ValaCCodeBaseModule*) self)->state_switch_statement, (ValaCCodeNode*) (_tmp14_ = vala_ccode_goto_statement_new ("_state_0")));
		_vala_ccode_node_unref0 (_tmp14_);
	}
	current_state_switch = _vala_ccode_node_ref0 (((ValaCCodeBaseModule*) self)->state_switch_statement);
	creturn_type = _vala_code_node_ref0 (vala_method_get_return_type (m));
	if (vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m))) {
		ValaDataType* _tmp15_;
		creturn_type = (_tmp15_ = (ValaDataType*) vala_void_type_new (NULL), _vala_code_node_unref0 (creturn_type), _tmp15_);
	}
	if (vala_method_get_binding (m) == MEMBER_BINDING_CLASS) {
		_tmp16_ = TRUE;
	} else {
		_tmp16_ = vala_method_get_binding (m) == MEMBER_BINDING_STATIC;
	}
	if (_tmp16_) {
		((ValaCCodeBaseModule*) self)->in_static_or_class_context = TRUE;
	}
	vala_code_node_accept_children ((ValaCodeNode*) m, (ValaCodeVisitor*) vala_ccode_module_get_codegen ((ValaCCodeModule*) self));
	((ValaCCodeBaseModule*) self)->in_static_or_class_context = FALSE;
	if (VALA_IS_CREATION_METHOD (m)) {
		gboolean _tmp17_ = FALSE;
		if (in_gobject_creation_method) {
			_tmp17_ = vala_method_get_body (m) != NULL;
		} else {
			_tmp17_ = FALSE;
		}
		if (_tmp17_) {
			if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
				ValaCCodeBlock* cblock;
				ValaCodeNode* last_stmt;
				gboolean _tmp27_ = FALSE;
				if (vala_block_get_captured (vala_method_get_body (m))) {
					vala_report_error (vala_code_node_get_source_reference ((ValaCodeNode*) m), "Closures are not supported in GObject-style creation methods");
				}
				cblock = vala_ccode_block_new ();
				last_stmt = NULL;
				{
					ValaList* _tmp18_;
					ValaIterator* _tmp19_;
					ValaIterator* _stmt_it;
					_stmt_it = (_tmp19_ = vala_iterable_iterator ((ValaIterable*) (_tmp18_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp18_), _tmp19_);
					while (TRUE) {
						ValaCodeNode* stmt;
						ValaCodeNode* _tmp20_;
						ValaExpressionStatement* expr_stmt;
						if (!vala_iterator_next (_stmt_it)) {
							break;
						}
						stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
						expr_stmt = _vala_code_node_ref0 ((_tmp20_ = stmt, VALA_IS_EXPRESSION_STATEMENT (_tmp20_) ? ((ValaExpressionStatement*) _tmp20_) : NULL));
						if (expr_stmt != NULL) {
							ValaProperty* prop;
							gboolean _tmp21_ = FALSE;
							prop = vala_expression_statement_assigned_property (expr_stmt);
							if (prop != NULL) {
								_tmp21_ = vala_property_accessor_get_construction (vala_property_get_set_accessor (prop));
							} else {
								_tmp21_ = FALSE;
							}
							if (_tmp21_) {
								ValaCodeNode* _tmp22_;
								last_stmt = (_tmp22_ = _vala_code_node_ref0 (stmt), _vala_code_node_unref0 (last_stmt), _tmp22_);
							}
							_vala_code_node_unref0 (prop);
						}
						_vala_code_node_unref0 (stmt);
						_vala_code_node_unref0 (expr_stmt);
					}
					_vala_collection_object_unref0 (_stmt_it);
				}
				if (last_stmt != NULL) {
					{
						ValaList* _tmp23_;
						ValaIterator* _tmp24_;
						ValaIterator* _stmt_it;
						_stmt_it = (_tmp24_ = vala_iterable_iterator ((ValaIterable*) (_tmp23_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp23_), _tmp24_);
						while (TRUE) {
							ValaCodeNode* stmt;
							if (!vala_iterator_next (_stmt_it)) {
								break;
							}
							stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
							if (VALA_IS_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))) {
								{
									ValaList* _tmp25_;
									ValaIterator* _tmp26_;
									ValaIterator* _cstmt_it;
									_cstmt_it = (_tmp26_ = vala_iterable_iterator ((ValaIterable*) (_tmp25_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp25_), _tmp26_);
									while (TRUE) {
										ValaCCodeNode* cstmt;
										if (!vala_iterator_next (_cstmt_it)) {
											break;
										}
										cstmt = (ValaCCodeNode*) vala_iterator_get (_cstmt_it);
										vala_ccode_block_add_statement (cblock, cstmt);
										_vala_ccode_node_unref0 (cstmt);
									}
									_vala_collection_object_unref0 (_cstmt_it);
								}
							} else {
								vala_ccode_block_add_statement (cblock, vala_code_node_get_ccodenode (stmt));
							}
							if (last_stmt == stmt) {
								_vala_code_node_unref0 (stmt);
								break;
							}
							_vala_code_node_unref0 (stmt);
						}
						_vala_collection_object_unref0 (_stmt_it);
					}
				}
				if (vala_creation_method_get_n_construction_params (VALA_CREATION_METHOD (m)) > 0) {
					_tmp27_ = TRUE;
				} else {
					ValaList* _tmp28_;
					_tmp27_ = vala_collection_get_size ((ValaCollection*) (_tmp28_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
					_vala_collection_object_unref0 (_tmp28_);
				}
				vala_ccode_method_module_add_object_creation (self, cblock, _tmp27_);
				{
					ValaList* _tmp29_;
					ValaIterator* _tmp30_;
					ValaIterator* _stmt_it;
					_stmt_it = (_tmp30_ = vala_iterable_iterator ((ValaIterable*) (_tmp29_ = vala_block_get_statements (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp29_), _tmp30_);
					while (TRUE) {
						ValaCodeNode* stmt;
						if (!vala_iterator_next (_stmt_it)) {
							break;
						}
						stmt = (ValaCodeNode*) ((ValaStatement*) vala_iterator_get (_stmt_it));
						if (last_stmt != NULL) {
							if (last_stmt == stmt) {
								ValaCodeNode* _tmp31_;
								last_stmt = (_tmp31_ = NULL, _vala_code_node_unref0 (last_stmt), _tmp31_);
							}
							_vala_code_node_unref0 (stmt);
							continue;
						}
						if (VALA_IS_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))) {
							{
								ValaList* _tmp32_;
								ValaIterator* _tmp33_;
								ValaIterator* _cstmt_it;
								_cstmt_it = (_tmp33_ = vala_iterable_iterator ((ValaIterable*) (_tmp32_ = vala_ccode_fragment_get_children (VALA_CCODE_FRAGMENT (vala_code_node_get_ccodenode (stmt))))), _vala_collection_object_unref0 (_tmp32_), _tmp33_);
								while (TRUE) {
									ValaCCodeNode* cstmt;
									if (!vala_iterator_next (_cstmt_it)) {
										break;
									}
									cstmt = (ValaCCodeNode*) vala_iterator_get (_cstmt_it);
									vala_ccode_block_add_statement (cblock, cstmt);
									_vala_ccode_node_unref0 (cstmt);
								}
								_vala_collection_object_unref0 (_cstmt_it);
							}
						} else {
							vala_ccode_block_add_statement (cblock, vala_code_node_get_ccodenode (stmt));
						}
						_vala_code_node_unref0 (stmt);
					}
					_vala_collection_object_unref0 (_stmt_it);
				}
				{
					ValaList* _tmp34_;
					ValaIterator* _tmp35_;
					ValaIterator* _local_it;
					_local_it = (_tmp35_ = vala_iterable_iterator ((ValaIterable*) (_tmp34_ = vala_block_get_local_variables (vala_method_get_body (m)))), _vala_collection_object_unref0 (_tmp34_), _tmp35_);
					while (TRUE) {
						ValaLocalVariable* local;
						gboolean _tmp36_ = FALSE;
						if (!vala_iterator_next (_local_it)) {
							break;
						}
						local = (ValaLocalVariable*) vala_iterator_get (_local_it);
						if (!vala_local_variable_get_floating (local)) {
							_tmp36_ = vala_ccode_base_module_requires_destroy ((ValaCCodeBaseModule*) self, vala_local_variable_get_variable_type (local));
						} else {
							_tmp36_ = FALSE;
						}
						if (_tmp36_) {
							ValaMemberAccess* ma;
							ValaDataType* _tmp37_;
							ValaCCodeExpressionStatement* _tmp40_;
							ValaCCodeExpression* _tmp39_;
							ValaCCodeExpression* _tmp38_;
							ma = vala_member_access_new_simple (vala_symbol_get_name ((ValaSymbol*) local), NULL);
							vala_expression_set_symbol_reference ((ValaExpression*) ma, (ValaSymbol*) local);
							vala_expression_set_value_type ((ValaExpression*) ma, _tmp37_ = vala_data_type_copy (vala_local_variable_get_variable_type (local)));
							_vala_code_node_unref0 (_tmp37_);
							vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp40_ = vala_ccode_expression_statement_new (_tmp39_ = vala_ccode_base_module_get_unref_expression ((ValaCCodeBaseModule*) self, _tmp38_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) local)), vala_local_variable_get_variable_type (local), (ValaExpression*) ma, FALSE))));
							_vala_ccode_node_unref0 (_tmp40_);
							_vala_ccode_node_unref0 (_tmp39_);
							_vala_ccode_node_unref0 (_tmp38_);
							_vala_code_node_unref0 (ma);
						}
						_vala_code_node_unref0 (local);
					}
					_vala_collection_object_unref0 (_local_it);
				}
				vala_code_node_set_ccodenode ((ValaCodeNode*) vala_method_get_body (m), (ValaCCodeNode*) cblock);
				_vala_ccode_node_unref0 (cblock);
				_vala_code_node_unref0 (last_stmt);
			} else {
				ValaCCodeBlock* cblock;
				char* _tmp42_;
				char* _tmp41_;
				ValaCCodeDeclaration* _tmp43_;
				ValaCCodeDeclaration* cdeclaration;
				ValaCCodeVariableDeclarator* _tmp44_;
				cblock = _vala_ccode_node_ref0 (VALA_CCODE_BLOCK (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_method_get_body (m))));
				cdeclaration = (_tmp43_ = vala_ccode_declaration_new (_tmp42_ = g_strdup_printf ("%s *", _tmp41_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) VALA_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self)), FALSE))), _g_free0 (_tmp42_), _g_free0 (_tmp41_), _tmp43_);
				vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) (_tmp44_ = vala_ccode_variable_declarator_new ("self", NULL, NULL)));
				_vala_ccode_node_unref0 (_tmp44_);
				vala_ccode_block_prepend_statement (cblock, (ValaCCodeNode*) cdeclaration);
				_vala_ccode_node_unref0 (cblock);
				_vala_ccode_node_unref0 (cdeclaration);
			}
		}
	}
	inner_error = ((ValaCCodeBaseModule*) self)->current_method_inner_error;
	((ValaCCodeBaseModule*) self)->current_symbol = (_tmp45_ = _vala_code_node_ref0 (old_symbol), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_symbol), _tmp45_);
	((ValaCCodeBaseModule*) self)->current_method_inner_error = old_method_inner_error;
	((ValaCCodeBaseModule*) self)->next_temp_var_id = old_next_temp_var_id;
	((ValaCCodeBaseModule*) self)->temp_vars = (_tmp46_ = _vala_collection_object_ref0 (old_temp_vars), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_vars), _tmp46_);
	((ValaCCodeBaseModule*) self)->temp_ref_vars = (_tmp47_ = _vala_collection_object_ref0 (old_temp_ref_vars), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->temp_ref_vars), _tmp47_);
	((ValaCCodeBaseModule*) self)->variable_name_map = (_tmp48_ = _vala_collection_object_ref0 (old_variable_name_map), _vala_collection_object_unref0 (((ValaCCodeBaseModule*) self)->variable_name_map), _tmp48_);
	((ValaCCodeBaseModule*) self)->current_try = (_tmp49_ = _vala_code_node_ref0 (old_try), _vala_code_node_unref0 (((ValaCCodeBaseModule*) self)->current_try), _tmp49_);
	((ValaCCodeBaseModule*) self)->state_switch_statement = (_tmp50_ = _vala_ccode_node_ref0 (old_state_switch_statement), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->state_switch_statement), _tmp50_);
	if (vala_method_get_is_abstract (m)) {
		_tmp52_ = TRUE;
	} else {
		_tmp52_ = vala_method_get_is_virtual (m);
	}
	if (_tmp52_) {
		_tmp51_ = TRUE;
	} else {
		gboolean _tmp53_ = FALSE;
		if (vala_method_get_base_method (m) == NULL) {
			_tmp53_ = vala_method_get_base_interface_method (m) == NULL;
		} else {
			_tmp53_ = FALSE;
		}
		_tmp51_ = _tmp53_;
	}
	if (_tmp51_) {
		vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->source_declarations);
		if (!vala_symbol_is_internal_symbol ((ValaSymbol*) m)) {
			vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->header_declarations);
		}
		if (!vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
			vala_ccode_base_module_generate_method_declaration ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->internal_header_declarations);
		}
	}
	((ValaCCodeBaseModule*) self)->function = (_tmp55_ = vala_ccode_function_new (_tmp54_ = vala_method_get_real_cname (m), "void"), _vala_ccode_node_unref0 (((ValaCCodeBaseModule*) self)->function), _tmp55_);
	_g_free0 (_tmp54_);
	vala_code_node_set_ccodenode ((ValaCodeNode*) m, (ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function);
	if (vala_method_get_is_inline (m)) {
		vala_ccode_function_set_modifiers (((ValaCCodeBaseModule*) self)->function, vala_ccode_function_get_modifiers (((ValaCCodeBaseModule*) self)->function) | VALA_CCODE_MODIFIERS_INLINE);
	}
	cparam_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
	vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->source_declarations, (ValaMap*) cparam_map, ((ValaCCodeBaseModule*) self)->function, NULL, NULL, NULL, 3);
	if (!vala_method_get_is_abstract (m)) {
		_tmp56_ = TRUE;
	} else {
		gboolean _tmp57_ = FALSE;
		if (vala_method_get_is_abstract (m)) {
			_tmp57_ = VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self));
		} else {
			_tmp57_ = FALSE;
		}
		_tmp56_ = _tmp57_;
	}
	if (_tmp56_) {
		if (!vala_method_get_coroutine (m)) {
			gboolean _tmp58_ = FALSE;
			if (vala_method_get_base_method (m) != NULL) {
				_tmp58_ = TRUE;
			} else {
				_tmp58_ = vala_method_get_base_interface_method (m) != NULL;
			}
			if (_tmp58_) {
				ValaCCodeFunction* _tmp59_;
				vala_ccode_function_set_modifiers (((ValaCCodeBaseModule*) self)->function, vala_ccode_function_get_modifiers (((ValaCCodeBaseModule*) self)->function) | VALA_CCODE_MODIFIERS_STATIC);
				vala_ccode_declaration_space_add_type_member_declaration (((ValaCCodeBaseModule*) self)->source_declarations, (ValaCCodeNode*) (_tmp59_ = vala_ccode_function_copy (((ValaCCodeBaseModule*) self)->function)));
				_vala_ccode_node_unref0 (_tmp59_);
			} else {
				if (vala_symbol_is_private_symbol ((ValaSymbol*) m)) {
					vala_ccode_function_set_modifiers (((ValaCCodeBaseModule*) self)->function, vala_ccode_function_get_modifiers (((ValaCCodeBaseModule*) self)->function) | VALA_CCODE_MODIFIERS_STATIC);
				}
			}
		}
		if (vala_method_get_body (m) != NULL) {
			ValaCCodeFragment* cinit;
			gboolean _tmp121_ = FALSE;
			gboolean _tmp122_ = FALSE;
			gboolean _tmp228_ = FALSE;
			vala_ccode_function_set_block (((ValaCCodeBaseModule*) self)->function, VALA_CCODE_BLOCK (vala_code_node_get_ccodenode ((ValaCodeNode*) vala_method_get_body (m))));
			vala_ccode_node_set_line ((ValaCCodeNode*) vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
			cinit = vala_ccode_fragment_new ();
			vala_ccode_block_prepend_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) cinit);
			if (vala_method_get_coroutine (m)) {
				char* _tmp61_;
				char* _tmp60_;
				ValaCCodeFunction* _tmp62_;
				ValaCCodeFunction* co_function;
				ValaCCodeFormalParameter* _tmp66_;
				char* _tmp65_;
				char* _tmp64_;
				char* _tmp63_;
				ValaCCodeFunction* _tmp67_;
				ValaCCodeLabel* _tmp68_;
				ValaCCodeExpressionStatement* _tmp71_;
				ValaCCodeFunctionCall* _tmp70_;
				ValaCCodeIdentifier* _tmp69_;
				ValaCCodeBlock* _tmp72_;
				ValaCCodeLabel* _tmp73_;
				ValaCCodeStatement* _tmp74_;
				co_function = (_tmp62_ = vala_ccode_function_new (_tmp61_ = g_strconcat (_tmp60_ = vala_method_get_real_cname (m), "_co", NULL), "gboolean"), _g_free0 (_tmp61_), _g_free0 (_tmp60_), _tmp62_);
				vala_ccode_function_add_parameter (co_function, _tmp66_ = vala_ccode_formal_parameter_new ("data", _tmp65_ = g_strconcat (_tmp64_ = vala_symbol_lower_case_to_camel_case (_tmp63_ = vala_method_get_cname (m)), "Data*", NULL)));
				_vala_ccode_node_unref0 (_tmp66_);
				_g_free0 (_tmp65_);
				_g_free0 (_tmp64_);
				_g_free0 (_tmp63_);
				vala_ccode_function_set_modifiers (co_function, vala_ccode_function_get_modifiers (co_function) | VALA_CCODE_MODIFIERS_STATIC);
				vala_ccode_declaration_space_add_type_member_declaration (((ValaCCodeBaseModule*) self)->source_declarations, (ValaCCodeNode*) (_tmp67_ = vala_ccode_function_copy (co_function)));
				_vala_ccode_node_unref0 (_tmp67_);
				vala_ccode_block_add_statement ((ValaCCodeBlock*) current_state_switch, (ValaCCodeNode*) (_tmp68_ = vala_ccode_label_new ("default")));
				_vala_ccode_node_unref0 (_tmp68_);
				vala_ccode_block_add_statement ((ValaCCodeBlock*) current_state_switch, (ValaCCodeNode*) (_tmp71_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp70_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp69_ = vala_ccode_identifier_new ("g_assert_not_reached")))))));
				_vala_ccode_node_unref0 (_tmp71_);
				_vala_ccode_node_unref0 (_tmp70_);
				_vala_ccode_node_unref0 (_tmp69_);
				vala_ccode_function_set_block (co_function, _tmp72_ = vala_ccode_block_new ());
				_vala_ccode_node_unref0 (_tmp72_);
				vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) current_state_switch);
				vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) (_tmp73_ = vala_ccode_label_new ("_state_0")));
				_vala_ccode_node_unref0 (_tmp73_);
				vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function));
				vala_ccode_block_add_statement (vala_ccode_function_get_block (co_function), (ValaCCodeNode*) (_tmp74_ = vala_ccode_method_module_complete_async (self)));
				_vala_ccode_node_unref0 (_tmp74_);
				vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) co_function);
				_vala_ccode_node_unref0 (co_function);
			}
			if (vala_method_get_closure (m)) {
				ValaBlock* closure_block;
				gint block_id;
				closure_block = _vala_code_node_ref0 (vala_ccode_base_module_get_current_closure_block ((ValaCCodeBaseModule*) self));
				block_id = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, closure_block);
				while (TRUE) {
					ValaBlock* parent_closure_block;
					gint parent_block_id;
					char* _tmp77_;
					ValaCCodeIdentifier* _tmp76_;
					char* _tmp75_;
					ValaCCodeMemberAccess* _tmp78_;
					ValaCCodeMemberAccess* parent_data;
					char* _tmp79_;
					ValaCCodeDeclaration* _tmp80_;
					ValaCCodeDeclaration* _cdecl_;
					ValaCCodeVariableDeclarator* _tmp82_;
					char* _tmp81_;
					ValaBlock* _tmp83_;
					parent_closure_block = _vala_code_node_ref0 (vala_ccode_base_module_next_closure_block ((ValaCCodeBaseModule*) self, vala_symbol_get_parent_symbol ((ValaSymbol*) closure_block)));
					if (parent_closure_block == NULL) {
						_vala_code_node_unref0 (parent_closure_block);
						break;
					}
					parent_block_id = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, parent_closure_block);
					parent_data = (_tmp78_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp76_ = vala_ccode_identifier_new (_tmp75_ = g_strdup_printf ("_data%d_", block_id))), _tmp77_ = g_strdup_printf ("_data%d_", parent_block_id)), _g_free0 (_tmp77_), _vala_ccode_node_unref0 (_tmp76_), _g_free0 (_tmp75_), _tmp78_);
					_cdecl_ = (_tmp80_ = vala_ccode_declaration_new (_tmp79_ = g_strdup_printf ("Block%dData*", parent_block_id)), _g_free0 (_tmp79_), _tmp80_);
					vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp82_ = vala_ccode_variable_declarator_new (_tmp81_ = g_strdup_printf ("_data%d_", parent_block_id), (ValaCCodeExpression*) parent_data, NULL)));
					_vala_ccode_node_unref0 (_tmp82_);
					_g_free0 (_tmp81_);
					vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
					closure_block = (_tmp83_ = _vala_code_node_ref0 (parent_closure_block), _vala_code_node_unref0 (closure_block), _tmp83_);
					block_id = parent_block_id;
					_vala_code_node_unref0 (parent_closure_block);
					_vala_ccode_node_unref0 (parent_data);
					_vala_ccode_node_unref0 (_cdecl_);
				}
				if (vala_method_get_binding (m) == MEMBER_BINDING_INSTANCE) {
					ValaCCodeIdentifier* _tmp85_;
					char* _tmp84_;
					ValaCCodeMemberAccess* _tmp86_;
					ValaCCodeMemberAccess* cself;
					char* _tmp88_;
					char* _tmp87_;
					ValaCCodeDeclaration* _tmp89_;
					ValaCCodeDeclaration* _cdecl_;
					ValaCCodeVariableDeclarator* _tmp90_;
					cself = (_tmp86_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp85_ = vala_ccode_identifier_new (_tmp84_ = g_strdup_printf ("_data%d_", block_id))), "self"), _vala_ccode_node_unref0 (_tmp85_), _g_free0 (_tmp84_), _tmp86_);
					_cdecl_ = (_tmp89_ = vala_ccode_declaration_new (_tmp88_ = g_strdup_printf ("%s *", _tmp87_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self), FALSE))), _g_free0 (_tmp88_), _g_free0 (_tmp87_), _tmp89_);
					vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp90_ = vala_ccode_variable_declarator_new ("self", (ValaCCodeExpression*) cself, NULL)));
					_vala_ccode_node_unref0 (_tmp90_);
					vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
					_vala_ccode_node_unref0 (cself);
					_vala_ccode_node_unref0 (_cdecl_);
				}
				_vala_code_node_unref0 (closure_block);
			} else {
				gboolean _tmp91_ = FALSE;
				if (VALA_IS_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m))) {
					_tmp91_ = !vala_method_get_coroutine (m);
				} else {
					_tmp91_ = FALSE;
				}
				if (_tmp91_) {
					ValaClass* cl;
					gboolean _tmp92_ = FALSE;
					cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
					if (vala_method_get_overrides (m)) {
						_tmp92_ = TRUE;
					} else {
						gboolean _tmp93_ = FALSE;
						gboolean _tmp94_ = FALSE;
						if (vala_method_get_base_interface_method (m) != NULL) {
							_tmp94_ = !vala_method_get_is_abstract (m);
						} else {
							_tmp94_ = FALSE;
						}
						if (_tmp94_) {
							_tmp93_ = !vala_method_get_is_virtual (m);
						} else {
							_tmp93_ = FALSE;
						}
						_tmp92_ = _tmp93_;
					}
					if (_tmp92_) {
						ValaMethod* base_method;
						ValaReferenceType* base_expression_type;
						ValaObjectType* self_target_type;
						ValaCCodeIdentifier* _tmp99_;
						ValaCCodeExpression* _tmp100_;
						ValaCCodeExpression* cself;
						char* _tmp102_;
						char* _tmp101_;
						ValaCCodeDeclaration* _tmp103_;
						ValaCCodeDeclaration* _cdecl_;
						ValaCCodeVariableDeclarator* _tmp104_;
						base_method = NULL;
						base_expression_type = NULL;
						if (vala_method_get_overrides (m)) {
							ValaMethod* _tmp95_;
							ValaReferenceType* _tmp96_;
							base_method = (_tmp95_ = _vala_code_node_ref0 (vala_method_get_base_method (m)), _vala_code_node_unref0 (base_method), _tmp95_);
							base_expression_type = (_tmp96_ = (ValaReferenceType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) base_method))), _vala_code_node_unref0 (base_expression_type), _tmp96_);
						} else {
							ValaMethod* _tmp97_;
							ValaReferenceType* _tmp98_;
							base_method = (_tmp97_ = _vala_code_node_ref0 (vala_method_get_base_interface_method (m)), _vala_code_node_unref0 (base_method), _tmp97_);
							base_expression_type = (_tmp98_ = (ValaReferenceType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) base_method))), _vala_code_node_unref0 (base_expression_type), _tmp98_);
						}
						self_target_type = vala_object_type_new ((ValaObjectTypeSymbol*) cl);
						cself = (_tmp100_ = vala_ccode_base_module_transform_expression ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) (_tmp99_ = vala_ccode_identifier_new ("base")), (ValaDataType*) base_expression_type, (ValaDataType*) self_target_type, NULL), _vala_ccode_node_unref0 (_tmp99_), _tmp100_);
						_cdecl_ = (_tmp103_ = vala_ccode_declaration_new (_tmp102_ = g_strdup_printf ("%s *", _tmp101_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))), _g_free0 (_tmp102_), _g_free0 (_tmp101_), _tmp103_);
						vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp104_ = vala_ccode_variable_declarator_new ("self", cself, NULL)));
						_vala_ccode_node_unref0 (_tmp104_);
						vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
						_vala_code_node_unref0 (base_method);
						_vala_code_node_unref0 (base_expression_type);
						_vala_code_node_unref0 (self_target_type);
						_vala_ccode_node_unref0 (cself);
						_vala_ccode_node_unref0 (_cdecl_);
					} else {
						gboolean _tmp105_ = FALSE;
						if (vala_method_get_binding (m) == MEMBER_BINDING_INSTANCE) {
							_tmp105_ = !VALA_IS_CREATION_METHOD (m);
						} else {
							_tmp105_ = FALSE;
						}
						if (_tmp105_) {
							ValaCCodeStatement* ccheckstmt;
							ccheckstmt = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, (ValaTypeSymbol*) cl, TRUE, "self");
							if (ccheckstmt != NULL) {
								vala_ccode_node_set_line ((ValaCCodeNode*) ccheckstmt, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) ccheckstmt);
							}
							_vala_ccode_node_unref0 (ccheckstmt);
						}
					}
					_vala_code_node_unref0 (cl);
				}
			}
			{
				ValaList* _tmp106_;
				ValaIterator* _tmp107_;
				ValaIterator* _param_it;
				_param_it = (_tmp107_ = vala_iterable_iterator ((ValaIterable*) (_tmp106_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp106_), _tmp107_);
				while (TRUE) {
					ValaFormalParameter* param;
					if (!vala_iterator_next (_param_it)) {
						break;
					}
					param = (ValaFormalParameter*) vala_iterator_get (_param_it);
					if (vala_formal_parameter_get_ellipsis (param)) {
						_vala_code_node_unref0 (param);
						break;
					}
					if (vala_formal_parameter_get_direction (param) != VALA_PARAMETER_DIRECTION_OUT) {
						ValaTypeSymbol* t;
						gboolean _tmp108_ = FALSE;
						t = _vala_code_node_ref0 (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)));
						if (t != NULL) {
							_tmp108_ = vala_typesymbol_is_reference_type (t);
						} else {
							_tmp108_ = FALSE;
						}
						if (_tmp108_) {
							char* _tmp109_;
							ValaCCodeStatement* _tmp110_;
							ValaCCodeStatement* type_check;
							type_check = (_tmp110_ = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, t, !vala_data_type_get_nullable (vala_formal_parameter_get_parameter_type (param)), _tmp109_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param))), _g_free0 (_tmp109_), _tmp110_);
							if (type_check != NULL) {
								vala_ccode_node_set_line ((ValaCCodeNode*) type_check, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) type_check);
							}
							_vala_ccode_node_unref0 (type_check);
						}
						_vala_code_node_unref0 (t);
					} else {
						if (!vala_method_get_coroutine (m)) {
							ValaTypeSymbol* t;
							gboolean _tmp111_ = FALSE;
							gboolean _tmp112_ = FALSE;
							t = _vala_code_node_ref0 (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)));
							if (t != NULL) {
								_tmp112_ = vala_typesymbol_is_reference_type (t);
							} else {
								_tmp112_ = FALSE;
							}
							if (_tmp112_) {
								_tmp111_ = TRUE;
							} else {
								_tmp111_ = VALA_IS_ARRAY_TYPE (vala_formal_parameter_get_parameter_type (param));
							}
							if (_tmp111_) {
								ValaCCodeConstant* _tmp115_;
								ValaCCodeUnaryExpression* _tmp114_;
								ValaCCodeExpression* _tmp113_;
								ValaCCodeAssignment* _tmp116_;
								ValaCCodeAssignment* a;
								ValaCCodeBlock* cblock;
								ValaCCodeExpressionStatement* _tmp117_;
								ValaCCodeConstant* _tmp119_;
								ValaCCodeExpression* _tmp118_;
								ValaCCodeBinaryExpression* _tmp120_;
								ValaCCodeBinaryExpression* condition;
								ValaCCodeIfStatement* if_statement;
								a = (_tmp116_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp114_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp113_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)))), (ValaCCodeExpression*) (_tmp115_ = vala_ccode_constant_new ("NULL")), VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (_tmp115_), _vala_ccode_node_unref0 (_tmp114_), _vala_ccode_node_unref0 (_tmp113_), _tmp116_);
								cblock = vala_ccode_block_new ();
								vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp117_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) a)));
								_vala_ccode_node_unref0 (_tmp117_);
								condition = (_tmp120_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, _tmp118_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)), (ValaCCodeExpression*) (_tmp119_ = vala_ccode_constant_new ("NULL"))), _vala_ccode_node_unref0 (_tmp119_), _vala_ccode_node_unref0 (_tmp118_), _tmp120_);
								if_statement = vala_ccode_if_statement_new ((ValaCCodeExpression*) condition, (ValaCCodeStatement*) cblock, NULL);
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) if_statement);
								_vala_ccode_node_unref0 (a);
								_vala_ccode_node_unref0 (cblock);
								_vala_ccode_node_unref0 (condition);
								_vala_ccode_node_unref0 (if_statement);
							}
							_vala_code_node_unref0 (t);
						}
					}
					_vala_code_node_unref0 (param);
				}
				_vala_collection_object_unref0 (_param_it);
			}
			if (!VALA_IS_VOID_TYPE (vala_method_get_return_type (m))) {
				_tmp122_ = !vala_data_type_is_real_non_null_struct_type (vala_method_get_return_type (m));
			} else {
				_tmp122_ = FALSE;
			}
			if (_tmp122_) {
				_tmp121_ = !vala_method_get_coroutine (m);
			} else {
				_tmp121_ = FALSE;
			}
			if (_tmp121_) {
				char* _tmp123_;
				ValaCCodeDeclaration* _tmp124_;
				ValaCCodeDeclaration* _cdecl_;
				ValaCCodeExpression* _tmp125_;
				ValaCCodeVariableDeclarator* _tmp126_;
				ValaCCodeVariableDeclarator* vardecl;
				gboolean _tmp127_ = FALSE;
				_cdecl_ = (_tmp124_ = vala_ccode_declaration_new (_tmp123_ = vala_data_type_get_cname (vala_method_get_return_type (m))), _g_free0 (_tmp123_), _tmp124_);
				vardecl = (_tmp126_ = vala_ccode_variable_declarator_new ("result", _tmp125_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, vala_method_get_return_type (m), TRUE), NULL), _vala_ccode_node_unref0 (_tmp125_), _tmp126_);
				vala_ccode_variable_declarator_set_init0 (vardecl, TRUE);
				vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) vardecl);
				vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
				if (vala_method_get_exit_block (m) != NULL) {
					ValaList* _tmp128_;
					_tmp127_ = vala_collection_get_size ((ValaCollection*) (_tmp128_ = vala_basic_block_get_predecessors (vala_method_get_exit_block (m)))) == 0;
					_vala_collection_object_unref0 (_tmp128_);
				} else {
					_tmp127_ = FALSE;
				}
				if (_tmp127_) {
					ValaCCodeReturnStatement* _tmp130_;
					ValaCCodeIdentifier* _tmp129_;
					vala_ccode_block_add_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) (_tmp130_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp129_ = vala_ccode_identifier_new ("result")))));
					_vala_ccode_node_unref0 (_tmp130_);
					_vala_ccode_node_unref0 (_tmp129_);
				}
				_vala_ccode_node_unref0 (_cdecl_);
				_vala_ccode_node_unref0 (vardecl);
			}
			if (inner_error) {
				if (vala_method_get_coroutine (m)) {
					vala_ccode_struct_add_field (((ValaCCodeBaseModule*) self)->closure_struct, "GError *", "_inner_error_", NULL);
				} else {
					ValaCCodeDeclaration* _cdecl_;
					ValaCCodeVariableDeclarator* _tmp132_;
					ValaCCodeConstant* _tmp131_;
					_cdecl_ = vala_ccode_declaration_new ("GError *");
					vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp132_ = vala_ccode_variable_declarator_new ("_inner_error_", (ValaCCodeExpression*) (_tmp131_ = vala_ccode_constant_new ("NULL")), NULL)));
					_vala_ccode_node_unref0 (_tmp132_);
					_vala_ccode_node_unref0 (_tmp131_);
					vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
					_vala_ccode_node_unref0 (_cdecl_);
				}
			}
			if (!vala_method_get_coroutine (m)) {
				vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function);
			}
			if (VALA_IS_CREATION_METHOD (m)) {
				if (in_gobject_creation_method) {
					gint n_params;
					n_params = vala_creation_method_get_n_construction_params (VALA_CREATION_METHOD (m));
					if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
						gboolean _tmp133_ = FALSE;
						if (n_params > 0) {
							_tmp133_ = TRUE;
						} else {
							ValaList* _tmp134_;
							_tmp133_ = vala_collection_get_size ((ValaCollection*) (_tmp134_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
							_vala_collection_object_unref0 (_tmp134_);
						}
						if (_tmp133_) {
							ValaCCodeIdentifier* _tmp135_;
							ValaCCodeFunctionCall* _tmp136_;
							ValaCCodeFunctionCall* cparamsinit;
							ValaCCodeIdentifier* _tmp137_;
							ValaCCodeConstant* _tmp140_;
							char* _tmp139_;
							ValaList* _tmp138_;
							ValaCCodeDeclaration* _cdecl_;
							ValaCCodeVariableDeclarator* _tmp141_;
							ValaCCodeDeclaration* _tmp142_;
							ValaCCodeVariableDeclarator* _tmp144_;
							ValaCCodeIdentifier* _tmp143_;
							cparamsinit = (_tmp136_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp135_ = vala_ccode_identifier_new ("g_new0"))), _vala_ccode_node_unref0 (_tmp135_), _tmp136_);
							vala_ccode_function_call_add_argument (cparamsinit, (ValaCCodeExpression*) (_tmp137_ = vala_ccode_identifier_new ("GParameter")));
							_vala_ccode_node_unref0 (_tmp137_);
							vala_ccode_function_call_add_argument (cparamsinit, (ValaCCodeExpression*) (_tmp140_ = vala_ccode_constant_new (_tmp139_ = g_strdup_printf ("%i", n_params + (3 * vala_collection_get_size ((ValaCollection*) (_tmp138_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))))))));
							_vala_ccode_node_unref0 (_tmp140_);
							_g_free0 (_tmp139_);
							_vala_collection_object_unref0 (_tmp138_);
							_cdecl_ = vala_ccode_declaration_new ("GParameter *");
							vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp141_ = vala_ccode_variable_declarator_new ("__params", (ValaCCodeExpression*) cparamsinit, NULL)));
							_vala_ccode_node_unref0 (_tmp141_);
							vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
							_cdecl_ = (_tmp142_ = vala_ccode_declaration_new ("GParameter *"), _vala_ccode_node_unref0 (_cdecl_), _tmp142_);
							vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp144_ = vala_ccode_variable_declarator_new ("__params_it", (ValaCCodeExpression*) (_tmp143_ = vala_ccode_identifier_new ("__params")), NULL)));
							_vala_ccode_node_unref0 (_tmp144_);
							_vala_ccode_node_unref0 (_tmp143_);
							vala_ccode_fragment_append (cinit, (ValaCCodeNode*) _cdecl_);
							_vala_ccode_node_unref0 (cparamsinit);
							_vala_ccode_node_unref0 (_cdecl_);
						}
						{
							ValaList* _tmp145_;
							ValaIterator* _tmp146_;
							ValaIterator* _type_param_it;
							_type_param_it = (_tmp146_ = vala_iterable_iterator ((ValaIterable*) (_tmp145_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp145_), _tmp146_);
							while (TRUE) {
								ValaTypeParameter* type_param;
								ValaCCodeConstant* prop_name;
								ValaCCodeIdentifier* param_name;
								ValaCCodeConstant* _tmp149_;
								char* _tmp148_;
								char* _tmp147_;
								ValaCCodeIdentifier* _tmp152_;
								char* _tmp151_;
								char* _tmp150_;
								ValaCCodeExpressionStatement* _tmp155_;
								ValaCCodeExpression* _tmp154_;
								ValaIntegerType* _tmp153_;
								ValaCCodeConstant* _tmp158_;
								char* _tmp157_;
								char* _tmp156_;
								ValaCCodeIdentifier* _tmp161_;
								char* _tmp160_;
								char* _tmp159_;
								ValaCCodeExpressionStatement* _tmp165_;
								ValaCCodeExpression* _tmp164_;
								ValaPointerType* _tmp163_;
								ValaVoidType* _tmp162_;
								ValaCCodeConstant* _tmp168_;
								char* _tmp167_;
								char* _tmp166_;
								ValaCCodeIdentifier* _tmp171_;
								char* _tmp170_;
								char* _tmp169_;
								ValaCCodeExpressionStatement* _tmp175_;
								ValaCCodeExpression* _tmp174_;
								ValaPointerType* _tmp173_;
								ValaVoidType* _tmp172_;
								if (!vala_iterator_next (_type_param_it)) {
									break;
								}
								type_param = (ValaTypeParameter*) vala_iterator_get (_type_param_it);
								prop_name = NULL;
								param_name = NULL;
								prop_name = (_tmp149_ = vala_ccode_constant_new (_tmp148_ = g_strdup_printf ("\"%s-type\"", _tmp147_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp149_);
								_g_free0 (_tmp148_);
								_g_free0 (_tmp147_);
								param_name = (_tmp152_ = vala_ccode_identifier_new (_tmp151_ = g_strdup_printf ("%s_type", _tmp150_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp152_);
								_g_free0 (_tmp151_);
								_g_free0 (_tmp150_);
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp155_ = vala_ccode_expression_statement_new (_tmp154_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp153_ = vala_integer_type_new (VALA_STRUCT (((ValaCCodeBaseModule*) self)->gtype_type), NULL, NULL)), (ValaCCodeExpression*) param_name))));
								_vala_ccode_node_unref0 (_tmp155_);
								_vala_ccode_node_unref0 (_tmp154_);
								_vala_code_node_unref0 (_tmp153_);
								prop_name = (_tmp158_ = vala_ccode_constant_new (_tmp157_ = g_strdup_printf ("\"%s-dup-func\"", _tmp156_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp158_);
								_g_free0 (_tmp157_);
								_g_free0 (_tmp156_);
								param_name = (_tmp161_ = vala_ccode_identifier_new (_tmp160_ = g_strdup_printf ("%s_dup_func", _tmp159_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp161_);
								_g_free0 (_tmp160_);
								_g_free0 (_tmp159_);
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp165_ = vala_ccode_expression_statement_new (_tmp164_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp163_ = vala_pointer_type_new ((ValaDataType*) (_tmp162_ = vala_void_type_new (NULL)), NULL)), (ValaCCodeExpression*) param_name))));
								_vala_ccode_node_unref0 (_tmp165_);
								_vala_ccode_node_unref0 (_tmp164_);
								_vala_code_node_unref0 (_tmp163_);
								_vala_code_node_unref0 (_tmp162_);
								prop_name = (_tmp168_ = vala_ccode_constant_new (_tmp167_ = g_strdup_printf ("\"%s-destroy-func\"", _tmp166_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (prop_name), _tmp168_);
								_g_free0 (_tmp167_);
								_g_free0 (_tmp166_);
								param_name = (_tmp171_ = vala_ccode_identifier_new (_tmp170_ = g_strdup_printf ("%s_destroy_func", _tmp169_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp171_);
								_g_free0 (_tmp170_);
								_g_free0 (_tmp169_);
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp175_ = vala_ccode_expression_statement_new (_tmp174_ = vala_ccode_module_get_construct_property_assignment ((ValaCCodeModule*) self, prop_name, (ValaDataType*) (_tmp173_ = vala_pointer_type_new ((ValaDataType*) (_tmp172_ = vala_void_type_new (NULL)), NULL)), (ValaCCodeExpression*) param_name))));
								_vala_ccode_node_unref0 (_tmp175_);
								_vala_ccode_node_unref0 (_tmp174_);
								_vala_code_node_unref0 (_tmp173_);
								_vala_code_node_unref0 (_tmp172_);
								_vala_code_node_unref0 (type_param);
								_vala_ccode_node_unref0 (prop_name);
								_vala_ccode_node_unref0 (param_name);
							}
							_vala_collection_object_unref0 (_type_param_it);
						}
					}
				} else {
					if (vala_ccode_method_module_is_gtypeinstance_creation_method (self, m)) {
						ValaClass* cl;
						char* _tmp177_;
						char* _tmp176_;
						ValaCCodeDeclaration* _tmp178_;
						ValaCCodeDeclaration* cdeclaration;
						ValaCCodeVariableDeclarator* _cdecl_;
						cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
						cdeclaration = (_tmp178_ = vala_ccode_declaration_new (_tmp177_ = g_strconcat (_tmp176_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL)), _g_free0 (_tmp177_), _g_free0 (_tmp176_), _tmp178_);
						_cdecl_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
						vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) _cdecl_);
						vala_ccode_fragment_append (cinit, (ValaCCodeNode*) cdeclaration);
						if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
							ValaCCodeIdentifier* _tmp179_;
							ValaCCodeFunctionCall* _tmp180_;
							ValaCCodeFunctionCall* ccall;
							ValaCCodeIdentifier* _tmp181_;
							ValaCCodeCastExpression* _tmp184_;
							char* _tmp183_;
							char* _tmp182_;
							ccall = (_tmp180_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp179_ = vala_ccode_identifier_new ("g_type_create_instance"))), _vala_ccode_node_unref0 (_tmp179_), _tmp180_);
							vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp181_ = vala_ccode_identifier_new ("object_type")));
							_vala_ccode_node_unref0 (_tmp181_);
							vala_ccode_variable_declarator_set_initializer (_cdecl_, (ValaCCodeExpression*) (_tmp184_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) ccall, _tmp183_ = g_strconcat (_tmp182_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL))));
							_vala_ccode_node_unref0 (_tmp184_);
							_g_free0 (_tmp183_);
							_g_free0 (_tmp182_);
							{
								ValaList* _tmp185_;
								ValaIterator* _tmp186_;
								ValaIterator* _type_param_it;
								_type_param_it = (_tmp186_ = vala_iterable_iterator ((ValaIterable*) (_tmp185_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))), _vala_collection_object_unref0 (_tmp185_), _tmp186_);
								while (TRUE) {
									ValaTypeParameter* type_param;
									ValaCCodeIdentifier* param_name;
									ValaCCodeAssignment* assign;
									ValaCCodeIdentifier* _tmp187_;
									ValaCCodeMemberAccess* _tmp188_;
									ValaCCodeMemberAccess* priv_access;
									ValaCCodeIdentifier* _tmp191_;
									char* _tmp190_;
									char* _tmp189_;
									ValaCCodeAssignment* _tmp193_;
									ValaCCodeMemberAccess* _tmp192_;
									ValaCCodeExpressionStatement* _tmp194_;
									ValaCCodeIdentifier* _tmp197_;
									char* _tmp196_;
									char* _tmp195_;
									ValaCCodeAssignment* _tmp199_;
									ValaCCodeMemberAccess* _tmp198_;
									ValaCCodeExpressionStatement* _tmp200_;
									ValaCCodeIdentifier* _tmp203_;
									char* _tmp202_;
									char* _tmp201_;
									ValaCCodeAssignment* _tmp205_;
									ValaCCodeMemberAccess* _tmp204_;
									ValaCCodeExpressionStatement* _tmp206_;
									if (!vala_iterator_next (_type_param_it)) {
										break;
									}
									type_param = (ValaTypeParameter*) vala_iterator_get (_type_param_it);
									param_name = NULL;
									assign = NULL;
									priv_access = (_tmp188_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp187_ = vala_ccode_identifier_new ("self")), "priv"), _vala_ccode_node_unref0 (_tmp187_), _tmp188_);
									param_name = (_tmp191_ = vala_ccode_identifier_new (_tmp190_ = g_strdup_printf ("%s_type", _tmp189_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp191_);
									_g_free0 (_tmp190_);
									_g_free0 (_tmp189_);
									assign = (_tmp193_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp192_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp193_);
									_vala_ccode_node_unref0 (_tmp192_);
									vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp194_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
									_vala_ccode_node_unref0 (_tmp194_);
									param_name = (_tmp197_ = vala_ccode_identifier_new (_tmp196_ = g_strdup_printf ("%s_dup_func", _tmp195_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp197_);
									_g_free0 (_tmp196_);
									_g_free0 (_tmp195_);
									assign = (_tmp199_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp198_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp199_);
									_vala_ccode_node_unref0 (_tmp198_);
									vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp200_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
									_vala_ccode_node_unref0 (_tmp200_);
									param_name = (_tmp203_ = vala_ccode_identifier_new (_tmp202_ = g_strdup_printf ("%s_destroy_func", _tmp201_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1))), _vala_ccode_node_unref0 (param_name), _tmp203_);
									_g_free0 (_tmp202_);
									_g_free0 (_tmp201_);
									assign = (_tmp205_ = vala_ccode_assignment_new ((ValaCCodeExpression*) (_tmp204_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) priv_access, vala_ccode_identifier_get_name (param_name))), (ValaCCodeExpression*) param_name, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE), _vala_ccode_node_unref0 (assign), _tmp205_);
									_vala_ccode_node_unref0 (_tmp204_);
									vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp206_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) assign)));
									_vala_ccode_node_unref0 (_tmp206_);
									_vala_code_node_unref0 (type_param);
									_vala_ccode_node_unref0 (param_name);
									_vala_ccode_node_unref0 (assign);
									_vala_ccode_node_unref0 (priv_access);
								}
								_vala_collection_object_unref0 (_type_param_it);
							}
							_vala_ccode_node_unref0 (ccall);
						}
						_vala_code_node_unref0 (cl);
						_vala_ccode_node_unref0 (cdeclaration);
						_vala_ccode_node_unref0 (_cdecl_);
					} else {
						if (VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self))) {
							ValaClass* cl;
							char* _tmp208_;
							char* _tmp207_;
							ValaCCodeDeclaration* _tmp209_;
							ValaCCodeDeclaration* cdeclaration;
							ValaCCodeVariableDeclarator* _cdecl_;
							cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
							cdeclaration = (_tmp209_ = vala_ccode_declaration_new (_tmp208_ = g_strconcat (_tmp207_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE), "*", NULL)), _g_free0 (_tmp208_), _g_free0 (_tmp207_), _tmp209_);
							_cdecl_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
							vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) _cdecl_);
							vala_ccode_fragment_append (cinit, (ValaCCodeNode*) cdeclaration);
							if (!vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m))) {
								ValaCCodeIdentifier* _tmp210_;
								ValaCCodeFunctionCall* _tmp211_;
								ValaCCodeFunctionCall* ccall;
								ValaCCodeIdentifier* _tmp213_;
								char* _tmp212_;
								ccall = (_tmp211_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp210_ = vala_ccode_identifier_new ("g_slice_new0"))), _vala_ccode_node_unref0 (_tmp210_), _tmp211_);
								vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp213_ = vala_ccode_identifier_new (_tmp212_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))));
								_vala_ccode_node_unref0 (_tmp213_);
								_g_free0 (_tmp212_);
								vala_ccode_variable_declarator_set_initializer (_cdecl_, (ValaCCodeExpression*) ccall);
								_vala_ccode_node_unref0 (ccall);
							}
							if (vala_class_get_base_class (cl) == NULL) {
								ValaCCodeIdentifier* _tmp216_;
								char* _tmp215_;
								char* _tmp214_;
								ValaCCodeFunctionCall* _tmp217_;
								ValaCCodeFunctionCall* cinitcall;
								ValaCCodeIdentifier* _tmp218_;
								ValaCCodeExpressionStatement* _tmp219_;
								cinitcall = (_tmp217_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp216_ = vala_ccode_identifier_new (_tmp215_ = g_strdup_printf ("%s_instance_init", _tmp214_ = vala_symbol_get_lower_case_cname ((ValaSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (_tmp216_), _g_free0 (_tmp215_), _g_free0 (_tmp214_), _tmp217_);
								vala_ccode_function_call_add_argument (cinitcall, (ValaCCodeExpression*) (_tmp218_ = vala_ccode_identifier_new ("self")));
								_vala_ccode_node_unref0 (_tmp218_);
								vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp219_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cinitcall)));
								_vala_ccode_node_unref0 (_tmp219_);
								_vala_ccode_node_unref0 (cinitcall);
							}
							_vala_code_node_unref0 (cl);
							_vala_ccode_node_unref0 (cdeclaration);
							_vala_ccode_node_unref0 (_cdecl_);
						} else {
							ValaStruct* st;
							ValaCCodeIdentifier* _tmp220_;
							ValaCCodeFunctionCall* _tmp221_;
							ValaCCodeFunctionCall* czero;
							ValaCCodeIdentifier* _tmp222_;
							ValaCCodeConstant* _tmp223_;
							ValaCCodeIdentifier* _tmp226_;
							char* _tmp225_;
							char* _tmp224_;
							ValaCCodeExpressionStatement* _tmp227_;
							st = _vala_code_node_ref0 (VALA_STRUCT (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
							vala_ccode_declaration_space_add_include (((ValaCCodeBaseModule*) self)->source_declarations, "string.h", FALSE);
							czero = (_tmp221_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp220_ = vala_ccode_identifier_new ("memset"))), _vala_ccode_node_unref0 (_tmp220_), _tmp221_);
							vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp222_ = vala_ccode_identifier_new ("self")));
							_vala_ccode_node_unref0 (_tmp222_);
							vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp223_ = vala_ccode_constant_new ("0")));
							_vala_ccode_node_unref0 (_tmp223_);
							vala_ccode_function_call_add_argument (czero, (ValaCCodeExpression*) (_tmp226_ = vala_ccode_identifier_new (_tmp225_ = g_strdup_printf ("sizeof (%s)", _tmp224_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) st, FALSE)))));
							_vala_ccode_node_unref0 (_tmp226_);
							_g_free0 (_tmp225_);
							_g_free0 (_tmp224_);
							vala_ccode_fragment_append (cinit, (ValaCCodeNode*) (_tmp227_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) czero)));
							_vala_ccode_node_unref0 (_tmp227_);
							_vala_code_node_unref0 (st);
							_vala_ccode_node_unref0 (czero);
						}
					}
				}
			}
			if (vala_code_context_get_module_init_method (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)) == m) {
				_tmp228_ = ((ValaCCodeBaseModule*) self)->in_plugin;
			} else {
				_tmp228_ = FALSE;
			}
			if (_tmp228_) {
				ValaHashSet* _tmp229_;
				vala_ccode_method_module_register_plugin_types (self, cinit, (ValaSymbol*) vala_code_context_get_root (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)), (ValaSet*) (_tmp229_ = vala_hash_set_new (VALA_TYPE_SYMBOL, (GBoxedCopyFunc) vala_code_node_ref, vala_code_node_unref, g_direct_hash, g_direct_equal)));
				_vala_collection_object_unref0 (_tmp229_);
			}
			{
				ValaList* _tmp230_;
				ValaIterator* _tmp231_;
				ValaIterator* _precondition_it;
				_precondition_it = (_tmp231_ = vala_iterable_iterator ((ValaIterable*) (_tmp230_ = vala_method_get_preconditions (m))), _vala_collection_object_unref0 (_tmp230_), _tmp231_);
				while (TRUE) {
					ValaExpression* precondition;
					ValaCCodeStatement* check_stmt;
					if (!vala_iterator_next (_precondition_it)) {
						break;
					}
					precondition = (ValaExpression*) vala_iterator_get (_precondition_it);
					check_stmt = vala_ccode_method_module_create_precondition_statement (self, (ValaCodeNode*) m, creturn_type, precondition);
					if (check_stmt != NULL) {
						vala_ccode_fragment_append (cinit, (ValaCCodeNode*) check_stmt);
					}
					_vala_code_node_unref0 (precondition);
					_vala_ccode_node_unref0 (check_stmt);
				}
				_vala_collection_object_unref0 (_precondition_it);
			}
			_vala_ccode_node_unref0 (cinit);
		} else {
			if (vala_method_get_is_abstract (m)) {
				ValaCCodeBlock* cblock;
				ValaCCodeStatement* check_stmt;
				ValaCCodeIdentifier* _tmp232_;
				ValaCCodeFunctionCall* _tmp233_;
				ValaCCodeFunctionCall* type_from_instance_call;
				ValaCCodeIdentifier* _tmp234_;
				ValaCCodeIdentifier* _tmp235_;
				ValaCCodeFunctionCall* _tmp236_;
				ValaCCodeFunctionCall* type_name_call;
				char* _tmp237_;
				char* _tmp238_;
				char* error_string;
				ValaCCodeIdentifier* _tmp239_;
				ValaCCodeFunctionCall* _tmp240_;
				ValaCCodeFunctionCall* cerrorcall;
				ValaCCodeConstant* _tmp241_;
				ValaCCodeExpressionStatement* _tmp242_;
				ValaCCodeReturnStatement* _tmp244_;
				ValaCCodeExpression* _tmp243_;
				cblock = vala_ccode_block_new ();
				check_stmt = vala_ccode_method_module_create_method_type_check_statement (self, m, creturn_type, vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self), TRUE, "self");
				if (check_stmt != NULL) {
					vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) check_stmt);
				}
				type_from_instance_call = (_tmp233_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp232_ = vala_ccode_identifier_new ("G_TYPE_FROM_INSTANCE"))), _vala_ccode_node_unref0 (_tmp232_), _tmp233_);
				vala_ccode_function_call_add_argument (type_from_instance_call, (ValaCCodeExpression*) (_tmp234_ = vala_ccode_identifier_new ("self")));
				_vala_ccode_node_unref0 (_tmp234_);
				type_name_call = (_tmp236_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp235_ = vala_ccode_identifier_new ("g_type_name"))), _vala_ccode_node_unref0 (_tmp235_), _tmp236_);
				vala_ccode_function_call_add_argument (type_name_call, (ValaCCodeExpression*) type_from_instance_call);
				error_string = (_tmp238_ = g_strdup_printf ("\"Type `%%s' does not implement abstract method `%s'\"", _tmp237_ = vala_method_get_cname (m)), _g_free0 (_tmp237_), _tmp238_);
				cerrorcall = (_tmp240_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp239_ = vala_ccode_identifier_new ("g_critical"))), _vala_ccode_node_unref0 (_tmp239_), _tmp240_);
				vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) (_tmp241_ = vala_ccode_constant_new (error_string)));
				_vala_ccode_node_unref0 (_tmp241_);
				vala_ccode_function_call_add_argument (cerrorcall, (ValaCCodeExpression*) type_name_call);
				vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp242_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cerrorcall)));
				_vala_ccode_node_unref0 (_tmp242_);
				vala_ccode_block_add_statement (cblock, (ValaCCodeNode*) (_tmp244_ = vala_ccode_return_statement_new (_tmp243_ = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, creturn_type, FALSE))));
				_vala_ccode_node_unref0 (_tmp244_);
				_vala_ccode_node_unref0 (_tmp243_);
				vala_ccode_function_set_block (((ValaCCodeBaseModule*) self)->function, cblock);
				vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function);
				_vala_ccode_node_unref0 (cblock);
				_vala_ccode_node_unref0 (check_stmt);
				_vala_ccode_node_unref0 (type_from_instance_call);
				_vala_ccode_node_unref0 (type_name_call);
				_g_free0 (error_string);
				_vala_ccode_node_unref0 (cerrorcall);
			}
		}
	}
	if (vala_method_get_is_abstract (m)) {
		_tmp247_ = TRUE;
	} else {
		_tmp247_ = vala_method_get_is_virtual (m);
	}
	if (_tmp247_) {
		_tmp246_ = !vala_method_get_coroutine (m);
	} else {
		_tmp246_ = FALSE;
	}
	if (_tmp246_) {
		_tmp245_ = vala_method_get_signal_reference (m) == NULL;
	} else {
		_tmp245_ = FALSE;
	}
	if (_tmp245_) {
		ValaHashMap* _tmp248_;
		ValaHashMap* carg_map;
		cparam_map = (_tmp248_ = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal), _vala_collection_object_unref0 (cparam_map), _tmp248_);
		carg_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
		vala_ccode_method_module_generate_vfunc (self, m, creturn_type, (ValaMap*) cparam_map, (ValaMap*) carg_map, "", 3);
		_vala_collection_object_unref0 (carg_map);
	}
	if (vala_method_get_entry_point (m)) {
		ValaCCodeFunction* cmain;
		ValaCCodeFormalParameter* _tmp249_;
		ValaCCodeFormalParameter* _tmp250_;
		ValaCCodeBlock* main_block;
		ValaCCodeIdentifier* _tmp262_;
		ValaCCodeFunctionCall* _tmp263_;
		ValaCCodeFunctionCall* main_call;
		ValaList* _tmp264_;
		gboolean _tmp265_;
		cmain = vala_ccode_function_new ("main", "int");
		vala_ccode_node_set_line ((ValaCCodeNode*) cmain, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
		vala_ccode_function_add_parameter (cmain, _tmp249_ = vala_ccode_formal_parameter_new ("argc", "int"));
		_vala_ccode_node_unref0 (_tmp249_);
		vala_ccode_function_add_parameter (cmain, _tmp250_ = vala_ccode_formal_parameter_new ("argv", "char **"));
		_vala_ccode_node_unref0 (_tmp250_);
		main_block = vala_ccode_block_new ();
		if (vala_code_context_get_profile (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self)) == VALA_PROFILE_GOBJECT) {
			ValaCCodeFunctionCall* _tmp260_;
			ValaCCodeIdentifier* _tmp259_;
			ValaCCodeExpressionStatement* _tmp261_;
			ValaCCodeExpressionStatement* type_init_call;
			if (vala_code_context_get_mem_profiler (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self))) {
				ValaCCodeIdentifier* _tmp251_;
				ValaCCodeFunctionCall* _tmp252_;
				ValaCCodeFunctionCall* mem_profiler_init_call;
				ValaCCodeConstant* _tmp253_;
				ValaCCodeExpressionStatement* _tmp254_;
				mem_profiler_init_call = (_tmp252_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp251_ = vala_ccode_identifier_new ("g_mem_set_vtable"))), _vala_ccode_node_unref0 (_tmp251_), _tmp252_);
				vala_ccode_node_set_line ((ValaCCodeNode*) mem_profiler_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
				vala_ccode_function_call_add_argument (mem_profiler_init_call, (ValaCCodeExpression*) (_tmp253_ = vala_ccode_constant_new ("glib_mem_profiler_table")));
				_vala_ccode_node_unref0 (_tmp253_);
				vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) (_tmp254_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) mem_profiler_init_call)));
				_vala_ccode_node_unref0 (_tmp254_);
				_vala_ccode_node_unref0 (mem_profiler_init_call);
			}
			if (vala_code_context_get_thread (vala_ccode_base_module_get_context ((ValaCCodeBaseModule*) self))) {
				ValaCCodeIdentifier* _tmp255_;
				ValaCCodeFunctionCall* _tmp256_;
				ValaCCodeFunctionCall* thread_init_call;
				ValaCCodeConstant* _tmp257_;
				ValaCCodeExpressionStatement* _tmp258_;
				thread_init_call = (_tmp256_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp255_ = vala_ccode_identifier_new ("g_thread_init"))), _vala_ccode_node_unref0 (_tmp255_), _tmp256_);
				vala_ccode_node_set_line ((ValaCCodeNode*) thread_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
				vala_ccode_function_call_add_argument (thread_init_call, (ValaCCodeExpression*) (_tmp257_ = vala_ccode_constant_new ("NULL")));
				_vala_ccode_node_unref0 (_tmp257_);
				vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) (_tmp258_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) thread_init_call)));
				_vala_ccode_node_unref0 (_tmp258_);
				_vala_ccode_node_unref0 (thread_init_call);
			}
			type_init_call = (_tmp261_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp260_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp259_ = vala_ccode_identifier_new ("g_type_init"))))), _vala_ccode_node_unref0 (_tmp260_), _vala_ccode_node_unref0 (_tmp259_), _tmp261_);
			vala_ccode_node_set_line ((ValaCCodeNode*) type_init_call, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
			vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) type_init_call);
			_vala_ccode_node_unref0 (type_init_call);
		}
		main_call = (_tmp263_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp262_ = vala_ccode_identifier_new (vala_ccode_function_get_name (((ValaCCodeBaseModule*) self)->function)))), _vala_ccode_node_unref0 (_tmp262_), _tmp263_);
		if ((_tmp265_ = vala_collection_get_size ((ValaCollection*) (_tmp264_ = vala_method_get_parameters (m))) == 1, _vala_collection_object_unref0 (_tmp264_), _tmp265_)) {
			ValaCCodeIdentifier* _tmp266_;
			ValaCCodeIdentifier* _tmp267_;
			vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) (_tmp266_ = vala_ccode_identifier_new ("argv")));
			_vala_ccode_node_unref0 (_tmp266_);
			vala_ccode_function_call_add_argument (main_call, (ValaCCodeExpression*) (_tmp267_ = vala_ccode_identifier_new ("argc")));
			_vala_ccode_node_unref0 (_tmp267_);
		}
		if (VALA_IS_VOID_TYPE (vala_method_get_return_type (m))) {
			ValaCCodeExpressionStatement* main_stmt;
			ValaCCodeConstant* _tmp268_;
			ValaCCodeReturnStatement* _tmp269_;
			ValaCCodeReturnStatement* ret_stmt;
			main_stmt = vala_ccode_expression_statement_new ((ValaCCodeExpression*) main_call);
			vala_ccode_node_set_line ((ValaCCodeNode*) main_stmt, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
			vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) main_stmt);
			ret_stmt = (_tmp269_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp268_ = vala_ccode_constant_new ("0"))), _vala_ccode_node_unref0 (_tmp268_), _tmp269_);
			vala_ccode_node_set_line ((ValaCCodeNode*) ret_stmt, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
			vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) ret_stmt);
			_vala_ccode_node_unref0 (main_stmt);
			_vala_ccode_node_unref0 (ret_stmt);
		} else {
			ValaCCodeReturnStatement* main_stmt;
			main_stmt = vala_ccode_return_statement_new ((ValaCCodeExpression*) main_call);
			vala_ccode_node_set_line ((ValaCCodeNode*) main_stmt, vala_ccode_node_get_line ((ValaCCodeNode*) cmain));
			vala_ccode_block_add_statement (main_block, (ValaCCodeNode*) main_stmt);
			_vala_ccode_node_unref0 (main_stmt);
		}
		vala_ccode_function_set_block (cmain, main_block);
		vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) cmain);
		_vala_ccode_node_unref0 (cmain);
		_vala_ccode_node_unref0 (main_block);
		_vala_ccode_node_unref0 (main_call);
	}
	_vala_code_node_unref0 (old_symbol);
	_vala_collection_object_unref0 (old_temp_vars);
	_vala_collection_object_unref0 (old_temp_ref_vars);
	_vala_collection_object_unref0 (old_variable_name_map);
	_vala_code_node_unref0 (old_try);
	_vala_ccode_node_unref0 (old_state_switch_statement);
	_vala_ccode_node_unref0 (current_state_switch);
	_vala_code_node_unref0 (creturn_type);
	_vala_collection_object_unref0 (cparam_map);
}


static void vala_ccode_method_module_real_generate_parameter (ValaCCodeMethodModule* self, ValaFormalParameter* param, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaMap* carg_map) {
	gboolean _tmp8_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (param != NULL);
	g_return_if_fail (decl_space != NULL);
	g_return_if_fail (cparam_map != NULL);
	if (!vala_formal_parameter_get_ellipsis (param)) {
		char* ctypename;
		ValaCCodeFormalParameter* _tmp6_;
		char* _tmp5_;
		ctypename = vala_data_type_get_cname (vala_formal_parameter_get_parameter_type (param));
		vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, vala_formal_parameter_get_parameter_type (param), decl_space);
		if (VALA_IS_STRUCT (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param)))) {
			ValaStruct* st;
			gboolean _tmp0_ = FALSE;
			st = _vala_code_node_ref0 (VALA_STRUCT (vala_data_type_get_data_type (vala_formal_parameter_get_parameter_type (param))));
			if (!vala_struct_is_simple_type (st)) {
				_tmp0_ = vala_formal_parameter_get_direction (param) == VALA_PARAMETER_DIRECTION_IN;
			} else {
				_tmp0_ = FALSE;
			}
			if (_tmp0_) {
				gboolean _tmp1_ = FALSE;
				if (vala_struct_get_is_immutable (st)) {
					_tmp1_ = !vala_data_type_get_value_owned (vala_formal_parameter_get_parameter_type (param));
				} else {
					_tmp1_ = FALSE;
				}
				if (_tmp1_) {
					char* _tmp2_;
					ctypename = (_tmp2_ = g_strconcat ("const ", ctypename, NULL), _g_free0 (ctypename), _tmp2_);
				}
				if (!vala_data_type_get_nullable (vala_formal_parameter_get_parameter_type (param))) {
					char* _tmp3_;
					ctypename = (_tmp3_ = g_strconcat (ctypename, "*", NULL), _g_free0 (ctypename), _tmp3_);
				}
			}
			_vala_code_node_unref0 (st);
		}
		if (vala_formal_parameter_get_direction (param) != VALA_PARAMETER_DIRECTION_IN) {
			char* _tmp4_;
			ctypename = (_tmp4_ = g_strconcat (ctypename, "*", NULL), _g_free0 (ctypename), _tmp4_);
		}
		vala_code_node_set_ccodenode ((ValaCodeNode*) param, (ValaCCodeNode*) (_tmp6_ = vala_ccode_formal_parameter_new (_tmp5_ = vala_ccode_base_module_get_variable_cname ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)), ctypename)));
		_vala_ccode_node_unref0 (_tmp6_);
		_g_free0 (_tmp5_);
		_g_free0 (ctypename);
	} else {
		ValaCCodeFormalParameter* _tmp7_;
		vala_code_node_set_ccodenode ((ValaCodeNode*) param, (ValaCCodeNode*) (_tmp7_ = vala_ccode_formal_parameter_new_with_ellipsis ()));
		_vala_ccode_node_unref0 (_tmp7_);
	}
	vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_formal_parameter_get_cparameter_position (param), FALSE)), VALA_CCODE_FORMAL_PARAMETER (vala_code_node_get_ccodenode ((ValaCodeNode*) param)));
	if (carg_map != NULL) {
		_tmp8_ = !vala_formal_parameter_get_ellipsis (param);
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		ValaCCodeExpression* _tmp9_;
		vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_formal_parameter_get_cparameter_position (param), FALSE)), _tmp9_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, vala_symbol_get_name ((ValaSymbol*) param)));
		_vala_ccode_node_unref0 (_tmp9_);
	}
}


void vala_ccode_method_module_generate_parameter (ValaCCodeMethodModule* self, ValaFormalParameter* param, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaMap* carg_map) {
	VALA_CCODE_METHOD_MODULE_GET_CLASS (self)->generate_parameter (self, param, decl_space, cparam_map, carg_map);
}


static void vala_ccode_method_module_real_generate_cparameters (ValaCCodeBaseModule* base, ValaMethod* m, ValaCCodeDeclarationSpace* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction) {
	ValaCCodeMethodModule * self;
	gint last_pos;
	gint min_pos = 0;
	self = (ValaCCodeMethodModule*) base;
	g_return_if_fail (m != NULL);
	g_return_if_fail (decl_space != NULL);
	g_return_if_fail (cparam_map != NULL);
	g_return_if_fail (func != NULL);
	if (vala_method_get_closure (m)) {
		ValaBlock* closure_block;
		gint block_id;
		char* _tmp1_;
		char* _tmp0_;
		ValaCCodeFormalParameter* _tmp2_;
		ValaCCodeFormalParameter* instance_param;
		closure_block = _vala_code_node_ref0 (vala_ccode_base_module_get_current_closure_block ((ValaCCodeBaseModule*) self));
		block_id = vala_ccode_base_module_get_block_id ((ValaCCodeBaseModule*) self, closure_block);
		instance_param = (_tmp2_ = vala_ccode_formal_parameter_new (_tmp0_ = g_strdup_printf ("_data%d_", block_id), _tmp1_ = g_strdup_printf ("Block%dData*", block_id)), _g_free0 (_tmp1_), _g_free0 (_tmp0_), _tmp2_);
		vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cinstance_parameter_position (m), FALSE)), instance_param);
		_vala_code_node_unref0 (closure_block);
		_vala_ccode_node_unref0 (instance_param);
	} else {
		gboolean _tmp3_ = FALSE;
		if (VALA_IS_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m))) {
			_tmp3_ = VALA_IS_CREATION_METHOD (m);
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			ValaClass* cl;
			gboolean _tmp4_ = FALSE;
			cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
			if (!vala_class_get_is_compact (cl)) {
				_tmp4_ = vcall == NULL;
			} else {
				_tmp4_ = FALSE;
			}
			if (_tmp4_) {
				ValaCCodeFormalParameter* _tmp5_;
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cinstance_parameter_position (m), FALSE)), _tmp5_ = vala_ccode_formal_parameter_new ("object_type", "GType"));
				_vala_ccode_node_unref0 (_tmp5_);
			}
			_vala_code_node_unref0 (cl);
		} else {
			gboolean _tmp6_ = FALSE;
			if (vala_method_get_binding (m) == MEMBER_BINDING_INSTANCE) {
				_tmp6_ = TRUE;
			} else {
				gboolean _tmp7_ = FALSE;
				if (VALA_IS_STRUCT (vala_symbol_get_parent_symbol ((ValaSymbol*) m))) {
					_tmp7_ = VALA_IS_CREATION_METHOD (m);
				} else {
					_tmp7_ = FALSE;
				}
				_tmp6_ = _tmp7_;
			}
			if (_tmp6_) {
				ValaTypeSymbol* parent_type;
				ValaDataType* this_type;
				ValaCCodeFormalParameter* instance_param;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_ = FALSE;
				parent_type = vala_ccode_method_module_find_parent_type (self, (ValaSymbol*) m);
				this_type = NULL;
				if (VALA_IS_CLASS (parent_type)) {
					ValaDataType* _tmp8_;
					this_type = (_tmp8_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (parent_type)), _vala_code_node_unref0 (this_type), _tmp8_);
				} else {
					if (VALA_IS_INTERFACE (parent_type)) {
						ValaDataType* _tmp9_;
						this_type = (_tmp9_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (parent_type)), _vala_code_node_unref0 (this_type), _tmp9_);
					} else {
						if (VALA_IS_STRUCT (parent_type)) {
							ValaDataType* _tmp10_;
							this_type = (_tmp10_ = (ValaDataType*) vala_struct_value_type_new (VALA_STRUCT (parent_type)), _vala_code_node_unref0 (this_type), _tmp10_);
						} else {
							if (VALA_IS_ENUM (parent_type)) {
								ValaDataType* _tmp11_;
								this_type = (_tmp11_ = (ValaDataType*) vala_enum_value_type_new (VALA_ENUM (parent_type)), _vala_code_node_unref0 (this_type), _tmp11_);
							} else {
								g_assert_not_reached ();
							}
						}
					}
				}
				vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, this_type, decl_space);
				instance_param = NULL;
				if (vala_method_get_base_interface_method (m) != NULL) {
					_tmp13_ = !vala_method_get_is_abstract (m);
				} else {
					_tmp13_ = FALSE;
				}
				if (_tmp13_) {
					_tmp12_ = !vala_method_get_is_virtual (m);
				} else {
					_tmp12_ = FALSE;
				}
				if (_tmp12_) {
					ValaObjectType* base_type;
					ValaCCodeFormalParameter* _tmp15_;
					char* _tmp14_;
					base_type = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_method_get_base_interface_method (m))));
					instance_param = (_tmp15_ = vala_ccode_formal_parameter_new ("base", _tmp14_ = vala_data_type_get_cname ((ValaDataType*) base_type)), _vala_ccode_node_unref0 (instance_param), _tmp15_);
					_g_free0 (_tmp14_);
					_vala_code_node_unref0 (base_type);
				} else {
					if (vala_method_get_overrides (m)) {
						ValaObjectType* base_type;
						ValaCCodeFormalParameter* _tmp17_;
						char* _tmp16_;
						base_type = vala_object_type_new ((ValaObjectTypeSymbol*) VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) vala_method_get_base_method (m))));
						instance_param = (_tmp17_ = vala_ccode_formal_parameter_new ("base", _tmp16_ = vala_data_type_get_cname ((ValaDataType*) base_type)), _vala_ccode_node_unref0 (instance_param), _tmp17_);
						_g_free0 (_tmp16_);
						_vala_code_node_unref0 (base_type);
					} else {
						gboolean _tmp18_ = FALSE;
						if (VALA_IS_STRUCT (vala_symbol_get_parent_symbol ((ValaSymbol*) m))) {
							_tmp18_ = !vala_struct_is_simple_type (VALA_STRUCT (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
						} else {
							_tmp18_ = FALSE;
						}
						if (_tmp18_) {
							ValaCCodeFormalParameter* _tmp20_;
							char* _tmp19_;
							instance_param = (_tmp20_ = vala_ccode_formal_parameter_new ("*self", _tmp19_ = vala_data_type_get_cname (this_type)), _vala_ccode_node_unref0 (instance_param), _tmp20_);
							_g_free0 (_tmp19_);
						} else {
							ValaCCodeFormalParameter* _tmp22_;
							char* _tmp21_;
							instance_param = (_tmp22_ = vala_ccode_formal_parameter_new ("self", _tmp21_ = vala_data_type_get_cname (this_type)), _vala_ccode_node_unref0 (instance_param), _tmp22_);
							_g_free0 (_tmp21_);
						}
					}
				}
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cinstance_parameter_position (m), FALSE)), instance_param);
				_vala_code_node_unref0 (parent_type);
				_vala_code_node_unref0 (this_type);
				_vala_ccode_node_unref0 (instance_param);
			} else {
				if (vala_method_get_binding (m) == MEMBER_BINDING_CLASS) {
					ValaTypeSymbol* parent_type;
					ValaDataType* this_type;
					ValaDataType* _tmp23_;
					char* _tmp24_;
					ValaCCodeFormalParameter* _tmp25_;
					ValaCCodeFormalParameter* class_param;
					parent_type = vala_ccode_method_module_find_parent_type (self, (ValaSymbol*) m);
					this_type = NULL;
					this_type = (_tmp23_ = (ValaDataType*) vala_class_type_new (VALA_CLASS (parent_type)), _vala_code_node_unref0 (this_type), _tmp23_);
					class_param = (_tmp25_ = vala_ccode_formal_parameter_new ("klass", _tmp24_ = vala_data_type_get_cname (this_type)), _g_free0 (_tmp24_), _tmp25_);
					vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cinstance_parameter_position (m), FALSE)), class_param);
					_vala_code_node_unref0 (parent_type);
					_vala_code_node_unref0 (this_type);
					_vala_ccode_node_unref0 (class_param);
				}
			}
		}
	}
	if (vala_ccode_method_module_is_gtypeinstance_creation_method (self, m)) {
		gint type_param_index;
		ValaClass* cl;
		type_param_index = 0;
		cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
		{
			ValaList* _tmp26_;
			ValaIterator* _tmp27_;
			ValaIterator* _type_param_it;
			_type_param_it = (_tmp27_ = vala_iterable_iterator ((ValaIterable*) (_tmp26_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) cl))), _vala_collection_object_unref0 (_tmp26_), _tmp27_);
			while (TRUE) {
				ValaTypeParameter* type_param;
				ValaCCodeFormalParameter* _tmp30_;
				char* _tmp29_;
				char* _tmp28_;
				ValaCCodeFormalParameter* _tmp33_;
				char* _tmp32_;
				char* _tmp31_;
				ValaCCodeFormalParameter* _tmp36_;
				char* _tmp35_;
				char* _tmp34_;
				if (!vala_iterator_next (_type_param_it)) {
					break;
				}
				type_param = (ValaTypeParameter*) vala_iterator_get (_type_param_it);
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE)), _tmp30_ = vala_ccode_formal_parameter_new (_tmp29_ = g_strdup_printf ("%s_type", _tmp28_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)), "GType"));
				_vala_ccode_node_unref0 (_tmp30_);
				_g_free0 (_tmp29_);
				_g_free0 (_tmp28_);
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE)), _tmp33_ = vala_ccode_formal_parameter_new (_tmp32_ = g_strdup_printf ("%s_dup_func", _tmp31_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)), "GBoxedCopyFunc"));
				_vala_ccode_node_unref0 (_tmp33_);
				_g_free0 (_tmp32_);
				_g_free0 (_tmp31_);
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE)), _tmp36_ = vala_ccode_formal_parameter_new (_tmp35_ = g_strdup_printf ("%s_destroy_func", _tmp34_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)), "GDestroyNotify"));
				_vala_ccode_node_unref0 (_tmp36_);
				_g_free0 (_tmp35_);
				_g_free0 (_tmp34_);
				if (carg_map != NULL) {
					ValaCCodeIdentifier* _tmp39_;
					char* _tmp38_;
					char* _tmp37_;
					ValaCCodeIdentifier* _tmp42_;
					char* _tmp41_;
					char* _tmp40_;
					ValaCCodeIdentifier* _tmp45_;
					char* _tmp44_;
					char* _tmp43_;
					vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE)), (ValaCCodeExpression*) (_tmp39_ = vala_ccode_identifier_new (_tmp38_ = g_strdup_printf ("%s_type", _tmp37_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)))));
					_vala_ccode_node_unref0 (_tmp39_);
					_g_free0 (_tmp38_);
					_g_free0 (_tmp37_);
					vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE)), (ValaCCodeExpression*) (_tmp42_ = vala_ccode_identifier_new (_tmp41_ = g_strdup_printf ("%s_dup_func", _tmp40_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)))));
					_vala_ccode_node_unref0 (_tmp42_);
					_g_free0 (_tmp41_);
					_g_free0 (_tmp40_);
					vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE)), (ValaCCodeExpression*) (_tmp45_ = vala_ccode_identifier_new (_tmp44_ = g_strdup_printf ("%s_destroy_func", _tmp43_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)))));
					_vala_ccode_node_unref0 (_tmp45_);
					_g_free0 (_tmp44_);
					_g_free0 (_tmp43_);
				}
				type_param_index++;
				_vala_code_node_unref0 (type_param);
			}
			_vala_collection_object_unref0 (_type_param_it);
		}
		_vala_code_node_unref0 (cl);
	} else {
		gint type_param_index;
		type_param_index = 0;
		{
			ValaList* _tmp46_;
			ValaIterator* _tmp47_;
			ValaIterator* _type_param_it;
			_type_param_it = (_tmp47_ = vala_iterable_iterator ((ValaIterable*) (_tmp46_ = vala_method_get_type_parameters (m))), _vala_collection_object_unref0 (_tmp46_), _tmp47_);
			while (TRUE) {
				ValaTypeParameter* type_param;
				ValaCCodeFormalParameter* _tmp50_;
				char* _tmp49_;
				char* _tmp48_;
				ValaCCodeFormalParameter* _tmp53_;
				char* _tmp52_;
				char* _tmp51_;
				ValaCCodeFormalParameter* _tmp56_;
				char* _tmp55_;
				char* _tmp54_;
				if (!vala_iterator_next (_type_param_it)) {
					break;
				}
				type_param = (ValaTypeParameter*) vala_iterator_get (_type_param_it);
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE)), _tmp50_ = vala_ccode_formal_parameter_new (_tmp49_ = g_strdup_printf ("%s_type", _tmp48_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)), "GType"));
				_vala_ccode_node_unref0 (_tmp50_);
				_g_free0 (_tmp49_);
				_g_free0 (_tmp48_);
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE)), _tmp53_ = vala_ccode_formal_parameter_new (_tmp52_ = g_strdup_printf ("%s_dup_func", _tmp51_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)), "GBoxedCopyFunc"));
				_vala_ccode_node_unref0 (_tmp53_);
				_g_free0 (_tmp52_);
				_g_free0 (_tmp51_);
				vala_map_set (cparam_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE)), _tmp56_ = vala_ccode_formal_parameter_new (_tmp55_ = g_strdup_printf ("%s_destroy_func", _tmp54_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)), "GDestroyNotify"));
				_vala_ccode_node_unref0 (_tmp56_);
				_g_free0 (_tmp55_);
				_g_free0 (_tmp54_);
				if (carg_map != NULL) {
					ValaCCodeIdentifier* _tmp59_;
					char* _tmp58_;
					char* _tmp57_;
					ValaCCodeIdentifier* _tmp62_;
					char* _tmp61_;
					char* _tmp60_;
					ValaCCodeIdentifier* _tmp65_;
					char* _tmp64_;
					char* _tmp63_;
					vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.01, FALSE)), (ValaCCodeExpression*) (_tmp59_ = vala_ccode_identifier_new (_tmp58_ = g_strdup_printf ("%s_type", _tmp57_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)))));
					_vala_ccode_node_unref0 (_tmp59_);
					_g_free0 (_tmp58_);
					_g_free0 (_tmp57_);
					vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.02, FALSE)), (ValaCCodeExpression*) (_tmp62_ = vala_ccode_identifier_new (_tmp61_ = g_strdup_printf ("%s_dup_func", _tmp60_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)))));
					_vala_ccode_node_unref0 (_tmp62_);
					_g_free0 (_tmp61_);
					_g_free0 (_tmp60_);
					vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, (0.1 * type_param_index) + 0.03, FALSE)), (ValaCCodeExpression*) (_tmp65_ = vala_ccode_identifier_new (_tmp64_ = g_strdup_printf ("%s_destroy_func", _tmp63_ = g_utf8_strdown (vala_symbol_get_name ((ValaSymbol*) type_param), -1)))));
					_vala_ccode_node_unref0 (_tmp65_);
					_g_free0 (_tmp64_);
					_g_free0 (_tmp63_);
				}
				type_param_index++;
				_vala_code_node_unref0 (type_param);
			}
			_vala_collection_object_unref0 (_type_param_it);
		}
	}
	{
		ValaList* _tmp66_;
		ValaIterator* _tmp67_;
		ValaIterator* _param_it;
		_param_it = (_tmp67_ = vala_iterable_iterator ((ValaIterable*) (_tmp66_ = vala_method_get_parameters (m))), _vala_collection_object_unref0 (_tmp66_), _tmp67_);
		while (TRUE) {
			ValaFormalParameter* param;
			if (!vala_iterator_next (_param_it)) {
				break;
			}
			param = (ValaFormalParameter*) vala_iterator_get (_param_it);
			if (vala_formal_parameter_get_direction (param) != VALA_PARAMETER_DIRECTION_OUT) {
				if ((direction & 1) == 0) {
					_vala_code_node_unref0 (param);
					continue;
				}
			} else {
				if ((direction & 2) == 0) {
					_vala_code_node_unref0 (param);
					continue;
				}
			}
			vala_ccode_method_module_generate_parameter (self, param, decl_space, cparam_map, carg_map);
			_vala_code_node_unref0 (param);
		}
		_vala_collection_object_unref0 (_param_it);
	}
	if ((direction & 2) != 0) {
		vala_ccode_method_module_generate_method_result_declaration (self, m, decl_space, func, cparam_map, carg_map);
	}
	last_pos = -1;
	while (TRUE) {
		ValaCCodeFormalParameter* _tmp72_;
		min_pos = -1;
		{
			ValaSet* _tmp68_;
			ValaIterator* _tmp69_;
			ValaIterator* _pos_it;
			_pos_it = (_tmp69_ = vala_iterable_iterator ((ValaIterable*) (_tmp68_ = vala_map_get_keys (cparam_map))), _vala_collection_object_unref0 (_tmp68_), _tmp69_);
			while (TRUE) {
				gint pos;
				gboolean _tmp70_ = FALSE;
				if (!vala_iterator_next (_pos_it)) {
					break;
				}
				pos = GPOINTER_TO_INT (vala_iterator_get (_pos_it));
				if (pos > last_pos) {
					gboolean _tmp71_ = FALSE;
					if (min_pos == (-1)) {
						_tmp71_ = TRUE;
					} else {
						_tmp71_ = pos < min_pos;
					}
					_tmp70_ = _tmp71_;
				} else {
					_tmp70_ = FALSE;
				}
				if (_tmp70_) {
					min_pos = pos;
				}
			}
			_vala_collection_object_unref0 (_pos_it);
		}
		if (min_pos == (-1)) {
			break;
		}
		vala_ccode_function_add_parameter (func, _tmp72_ = (ValaCCodeFormalParameter*) vala_map_get (cparam_map, GINT_TO_POINTER (min_pos)));
		_vala_ccode_node_unref0 (_tmp72_);
		if (vdeclarator != NULL) {
			ValaCCodeFormalParameter* _tmp73_;
			vala_ccode_function_declarator_add_parameter (vdeclarator, _tmp73_ = (ValaCCodeFormalParameter*) vala_map_get (cparam_map, GINT_TO_POINTER (min_pos)));
			_vala_ccode_node_unref0 (_tmp73_);
		}
		if (vcall != NULL) {
			ValaCCodeExpression* arg;
			arg = (ValaCCodeExpression*) vala_map_get (carg_map, GINT_TO_POINTER (min_pos));
			if (arg != NULL) {
				vala_ccode_function_call_add_argument (vcall, arg);
			}
			_vala_ccode_node_unref0 (arg);
		}
		last_pos = min_pos;
	}
}


void vala_ccode_method_module_generate_vfunc (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaMap* cparam_map, ValaMap* carg_map, const char* suffix, gint direction) {
	char* _tmp1_;
	char* _tmp0_;
	ValaCCodeFunction* _tmp2_;
	ValaCCodeFunction* vfunc;
	ValaCCodeBlock* vblock;
	ValaCCodeFunctionCall* vcast;
	ValaCCodeIdentifier* _tmp13_;
	ValaCCodeMemberAccess* _tmp15_;
	char* _tmp14_;
	ValaCCodeFunctionCall* _tmp16_;
	ValaCCodeFunctionCall* vcall;
	ValaCCodeIdentifier* _tmp17_;
	ValaCCodeStatement* cstmt;
	gboolean _tmp18_ = FALSE;
	ValaList* _tmp28_;
	gboolean _tmp29_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (m != NULL);
	g_return_if_fail (return_type != NULL);
	g_return_if_fail (cparam_map != NULL);
	g_return_if_fail (carg_map != NULL);
	g_return_if_fail (suffix != NULL);
	vfunc = (_tmp2_ = vala_ccode_function_new (_tmp1_ = g_strconcat (_tmp0_ = vala_method_get_cname (m), suffix, NULL), "void"), _g_free0 (_tmp1_), _g_free0 (_tmp0_), _tmp2_);
	if (((ValaCCodeBaseModule*) self)->function != NULL) {
		vala_ccode_node_set_line ((ValaCCodeNode*) vfunc, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
	}
	vblock = vala_ccode_block_new ();
	{
		ValaList* _tmp3_;
		ValaIterator* _tmp4_;
		ValaIterator* _precondition_it;
		_precondition_it = (_tmp4_ = vala_iterable_iterator ((ValaIterable*) (_tmp3_ = vala_method_get_preconditions (m))), _vala_collection_object_unref0 (_tmp3_), _tmp4_);
		while (TRUE) {
			ValaExpression* precondition;
			ValaCCodeStatement* check_stmt;
			if (!vala_iterator_next (_precondition_it)) {
				break;
			}
			precondition = (ValaExpression*) vala_iterator_get (_precondition_it);
			check_stmt = vala_ccode_method_module_create_precondition_statement (self, (ValaCodeNode*) m, return_type, precondition);
			if (check_stmt != NULL) {
				vala_ccode_block_add_statement (vblock, (ValaCCodeNode*) check_stmt);
			}
			_vala_code_node_unref0 (precondition);
			_vala_ccode_node_unref0 (check_stmt);
		}
		_vala_collection_object_unref0 (_precondition_it);
	}
	vcast = NULL;
	if (VALA_IS_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) m))) {
		ValaInterface* iface;
		ValaCCodeFunctionCall* _tmp8_;
		ValaCCodeIdentifier* _tmp7_;
		char* _tmp6_;
		char* _tmp5_;
		iface = _vala_code_node_ref0 (VALA_INTERFACE (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
		vcast = (_tmp8_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp7_ = vala_ccode_identifier_new (_tmp6_ = g_strdup_printf ("%s_GET_INTERFACE", _tmp5_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) iface, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp8_);
		_vala_ccode_node_unref0 (_tmp7_);
		_g_free0 (_tmp6_);
		_g_free0 (_tmp5_);
		_vala_code_node_unref0 (iface);
	} else {
		ValaClass* cl;
		ValaCCodeFunctionCall* _tmp12_;
		ValaCCodeIdentifier* _tmp11_;
		char* _tmp10_;
		char* _tmp9_;
		cl = _vala_code_node_ref0 (VALA_CLASS (vala_symbol_get_parent_symbol ((ValaSymbol*) m)));
		vcast = (_tmp12_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp11_ = vala_ccode_identifier_new (_tmp10_ = g_strdup_printf ("%s_GET_CLASS", _tmp9_ = vala_typesymbol_get_upper_case_cname ((ValaTypeSymbol*) cl, NULL))))), _vala_ccode_node_unref0 (vcast), _tmp12_);
		_vala_ccode_node_unref0 (_tmp11_);
		_g_free0 (_tmp10_);
		_g_free0 (_tmp9_);
		_vala_code_node_unref0 (cl);
	}
	vala_ccode_function_call_add_argument (vcast, (ValaCCodeExpression*) (_tmp13_ = vala_ccode_identifier_new ("self")));
	_vala_ccode_node_unref0 (_tmp13_);
	vcall = (_tmp16_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp15_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) vcast, _tmp14_ = g_strconcat (vala_method_get_vfunc_name (m), suffix, NULL)))), _vala_ccode_node_unref0 (_tmp15_), _g_free0 (_tmp14_), _tmp16_);
	vala_map_set (carg_map, GINT_TO_POINTER (vala_ccode_base_module_get_param_pos ((ValaCCodeBaseModule*) self, vala_method_get_cinstance_parameter_position (m), FALSE)), (ValaCCodeExpression*) (_tmp17_ = vala_ccode_identifier_new ("self")));
	_vala_ccode_node_unref0 (_tmp17_);
	vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, m, ((ValaCCodeBaseModule*) self)->source_declarations, cparam_map, vfunc, NULL, carg_map, vcall, direction);
	cstmt = NULL;
	if (VALA_IS_VOID_TYPE (return_type)) {
		_tmp18_ = TRUE;
	} else {
		_tmp18_ = vala_data_type_is_real_non_null_struct_type (return_type);
	}
	if (_tmp18_) {
		ValaCCodeStatement* _tmp19_;
		cstmt = (_tmp19_ = (ValaCCodeStatement*) vala_ccode_expression_statement_new ((ValaCCodeExpression*) vcall), _vala_ccode_node_unref0 (cstmt), _tmp19_);
	} else {
		ValaList* _tmp20_;
		gboolean _tmp21_;
		if ((_tmp21_ = vala_collection_get_size ((ValaCollection*) (_tmp20_ = vala_method_get_postconditions (m))) == 0, _vala_collection_object_unref0 (_tmp20_), _tmp21_)) {
			ValaCCodeStatement* _tmp22_;
			cstmt = (_tmp22_ = (ValaCCodeStatement*) vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall), _vala_ccode_node_unref0 (cstmt), _tmp22_);
		} else {
			char* _tmp24_;
			char* _tmp23_;
			ValaCCodeDeclaration* _tmp25_;
			ValaCCodeDeclaration* _cdecl_;
			ValaCCodeVariableDeclarator* _tmp26_;
			ValaCCodeStatement* _tmp27_;
			_cdecl_ = (_tmp25_ = vala_ccode_declaration_new (_tmp24_ = vala_ccode_method_module_get_creturn_type (self, m, _tmp23_ = vala_data_type_get_cname (return_type))), _g_free0 (_tmp24_), _g_free0 (_tmp23_), _tmp25_);
			vala_ccode_declaration_add_declarator (_cdecl_, (ValaCCodeDeclarator*) (_tmp26_ = vala_ccode_variable_declarator_new ("result", (ValaCCodeExpression*) vcall, NULL)));
			_vala_ccode_node_unref0 (_tmp26_);
			cstmt = (_tmp27_ = _vala_ccode_node_ref0 ((ValaCCodeStatement*) _cdecl_), _vala_ccode_node_unref0 (cstmt), _tmp27_);
			_vala_ccode_node_unref0 (_cdecl_);
		}
	}
	vala_ccode_node_set_line ((ValaCCodeNode*) cstmt, vala_ccode_node_get_line ((ValaCCodeNode*) vfunc));
	vala_ccode_block_add_statement (vblock, (ValaCCodeNode*) cstmt);
	if ((_tmp29_ = vala_collection_get_size ((ValaCollection*) (_tmp28_ = vala_method_get_postconditions (m))) > 0, _vala_collection_object_unref0 (_tmp28_), _tmp29_)) {
		{
			ValaList* _tmp30_;
			ValaIterator* _tmp31_;
			ValaIterator* _postcondition_it;
			_postcondition_it = (_tmp31_ = vala_iterable_iterator ((ValaIterable*) (_tmp30_ = vala_method_get_postconditions (m))), _vala_collection_object_unref0 (_tmp30_), _tmp31_);
			while (TRUE) {
				ValaExpression* postcondition;
				ValaCCodeStatement* _tmp32_;
				if (!vala_iterator_next (_postcondition_it)) {
					break;
				}
				postcondition = (ValaExpression*) vala_iterator_get (_postcondition_it);
				vala_ccode_block_add_statement (vblock, (ValaCCodeNode*) (_tmp32_ = vala_ccode_base_module_create_postcondition_statement ((ValaCCodeBaseModule*) self, postcondition)));
				_vala_ccode_node_unref0 (_tmp32_);
				_vala_code_node_unref0 (postcondition);
			}
			_vala_collection_object_unref0 (_postcondition_it);
		}
		if (!VALA_IS_VOID_TYPE (return_type)) {
			ValaCCodeIdentifier* _tmp33_;
			ValaCCodeReturnStatement* _tmp34_;
			ValaCCodeReturnStatement* cret_stmt;
			cret_stmt = (_tmp34_ = vala_ccode_return_statement_new ((ValaCCodeExpression*) (_tmp33_ = vala_ccode_identifier_new ("result"))), _vala_ccode_node_unref0 (_tmp33_), _tmp34_);
			vala_ccode_node_set_line ((ValaCCodeNode*) cret_stmt, vala_ccode_node_get_line ((ValaCCodeNode*) vfunc));
			vala_ccode_block_add_statement (vblock, (ValaCCodeNode*) cret_stmt);
			_vala_ccode_node_unref0 (cret_stmt);
		}
	}
	vala_ccode_function_set_block (vfunc, vblock);
	vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) vfunc);
	_vala_ccode_node_unref0 (vfunc);
	_vala_ccode_node_unref0 (vblock);
	_vala_ccode_node_unref0 (vcast);
	_vala_ccode_node_unref0 (vcall);
	_vala_ccode_node_unref0 (cstmt);
}


static ValaCCodeStatement* vala_ccode_method_module_create_method_type_check_statement (ValaCCodeMethodModule* self, ValaMethod* m, ValaDataType* return_type, ValaTypeSymbol* t, gboolean non_null, const char* var_name) {
	ValaCCodeStatement* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (m != NULL, NULL);
	g_return_val_if_fail (return_type != NULL, NULL);
	g_return_val_if_fail (t != NULL, NULL);
	g_return_val_if_fail (var_name != NULL, NULL);
	if (vala_method_get_coroutine (m)) {
		result = NULL;
		return result;
	} else {
		result = vala_ccode_base_module_create_type_check_statement ((ValaCCodeBaseModule*) self, (ValaCodeNode*) m, return_type, t, non_null, var_name);
		return result;
	}
}


static ValaCCodeStatement* vala_ccode_method_module_create_precondition_statement (ValaCCodeMethodModule* self, ValaCodeNode* method_node, ValaDataType* ret_type, ValaExpression* precondition) {
	ValaCCodeStatement* result = NULL;
	ValaCCodeFunctionCall* ccheck;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (method_node != NULL, NULL);
	g_return_val_if_fail (ret_type != NULL, NULL);
	g_return_val_if_fail (precondition != NULL, NULL);
	ccheck = vala_ccode_function_call_new (NULL);
	vala_ccode_function_call_add_argument (ccheck, VALA_CCODE_EXPRESSION (vala_code_node_get_ccodenode ((ValaCodeNode*) precondition)));
	if (VALA_IS_CREATION_METHOD (method_node)) {
		ValaCCodeIdentifier* _tmp0_;
		ValaCCodeConstant* _tmp1_;
		vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) (_tmp0_ = vala_ccode_identifier_new ("g_return_val_if_fail")));
		_vala_ccode_node_unref0 (_tmp0_);
		vala_ccode_function_call_add_argument (ccheck, (ValaCCodeExpression*) (_tmp1_ = vala_ccode_constant_new ("NULL")));
		_vala_ccode_node_unref0 (_tmp1_);
	} else {
		if (VALA_IS_VOID_TYPE (ret_type)) {
			ValaCCodeIdentifier* _tmp2_;
			vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) (_tmp2_ = vala_ccode_identifier_new ("g_return_if_fail")));
			_vala_ccode_node_unref0 (_tmp2_);
		} else {
			ValaCCodeIdentifier* _tmp3_;
			ValaCCodeExpression* cdefault;
			vala_ccode_function_call_set_call (ccheck, (ValaCCodeExpression*) (_tmp3_ = vala_ccode_identifier_new ("g_return_val_if_fail")));
			_vala_ccode_node_unref0 (_tmp3_);
			cdefault = vala_ccode_base_module_default_value_for_type ((ValaCCodeBaseModule*) self, ret_type, FALSE);
			if (cdefault != NULL) {
				vala_ccode_function_call_add_argument (ccheck, cdefault);
			} else {
				result = NULL;
				_vala_ccode_node_unref0 (cdefault);
				_vala_ccode_node_unref0 (ccheck);
				return result;
			}
			_vala_ccode_node_unref0 (cdefault);
		}
	}
	result = (ValaCCodeStatement*) vala_ccode_expression_statement_new ((ValaCCodeExpression*) ccheck);
	_vala_ccode_node_unref0 (ccheck);
	return result;
}


static ValaTypeSymbol* vala_ccode_method_module_find_parent_type (ValaCCodeMethodModule* self, ValaSymbol* sym) {
	ValaTypeSymbol* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (sym != NULL, NULL);
	while (TRUE) {
		if (!(sym != NULL)) {
			break;
		}
		if (VALA_IS_TYPESYMBOL (sym)) {
			result = _vala_code_node_ref0 (VALA_TYPESYMBOL (sym));
			return result;
		}
		sym = vala_symbol_get_parent_symbol (sym);
	}
	result = NULL;
	return result;
}


static void vala_ccode_method_module_add_object_creation (ValaCCodeMethodModule* self, ValaCCodeBlock* b, gboolean has_params) {
	ValaClass* cl;
	gboolean _tmp0_ = FALSE;
	ValaCCodeVariableDeclarator* _cdecl_;
	ValaCCodeIdentifier* _tmp1_;
	ValaCCodeFunctionCall* _tmp2_;
	ValaCCodeFunctionCall* ccall;
	ValaCCodeIdentifier* _tmp3_;
	char* _tmp9_;
	char* _tmp8_;
	ValaCCodeDeclaration* _tmp10_;
	ValaCCodeDeclaration* cdeclaration;
	g_return_if_fail (self != NULL);
	g_return_if_fail (b != NULL);
	cl = _vala_code_node_ref0 (VALA_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self)));
	if (!has_params) {
		_tmp0_ = VALA_TYPESYMBOL (vala_class_get_base_class (cl)) != ((ValaCCodeBaseModule*) self)->gobject_type;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
	}
	_cdecl_ = vala_ccode_variable_declarator_new ("self", NULL, NULL);
	ccall = (_tmp2_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp1_ = vala_ccode_identifier_new ("g_object_newv"))), _vala_ccode_node_unref0 (_tmp1_), _tmp2_);
	vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp3_ = vala_ccode_identifier_new ("object_type")));
	_vala_ccode_node_unref0 (_tmp3_);
	if (has_params) {
		ValaCCodeConstant* _tmp4_;
		ValaCCodeConstant* _tmp5_;
		vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp4_ = vala_ccode_constant_new ("__params_it - __params")));
		_vala_ccode_node_unref0 (_tmp4_);
		vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp5_ = vala_ccode_constant_new ("__params")));
		_vala_ccode_node_unref0 (_tmp5_);
	} else {
		ValaCCodeConstant* _tmp6_;
		ValaCCodeConstant* _tmp7_;
		vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp6_ = vala_ccode_constant_new ("0")));
		_vala_ccode_node_unref0 (_tmp6_);
		vala_ccode_function_call_add_argument (ccall, (ValaCCodeExpression*) (_tmp7_ = vala_ccode_constant_new ("NULL")));
		_vala_ccode_node_unref0 (_tmp7_);
	}
	vala_ccode_variable_declarator_set_initializer (_cdecl_, (ValaCCodeExpression*) ccall);
	cdeclaration = (_tmp10_ = vala_ccode_declaration_new (_tmp9_ = g_strdup_printf ("%s *", _tmp8_ = vala_typesymbol_get_cname ((ValaTypeSymbol*) cl, FALSE))), _g_free0 (_tmp9_), _g_free0 (_tmp8_), _tmp10_);
	vala_ccode_declaration_add_declarator (cdeclaration, (ValaCCodeDeclarator*) _cdecl_);
	vala_ccode_block_add_statement (b, (ValaCCodeNode*) cdeclaration);
	_vala_code_node_unref0 (cl);
	_vala_ccode_node_unref0 (_cdecl_);
	_vala_ccode_node_unref0 (ccall);
	_vala_ccode_node_unref0 (cdeclaration);
}


static void vala_ccode_method_module_real_visit_creation_method (ValaCCodeModule* base, ValaCreationMethod* m) {
	ValaCCodeMethodModule * self;
	gboolean visible;
	ValaDataType* creturn_type;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	self = (ValaCCodeMethodModule*) base;
	g_return_if_fail (m != NULL);
	visible = !vala_symbol_is_private_symbol ((ValaSymbol*) m);
	vala_ccode_module_visit_method (vala_ccode_module_get_head ((ValaCCodeModule*) self), (ValaMethod*) m);
	creturn_type = NULL;
	if (VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self))) {
		ValaDataType* _tmp0_;
		creturn_type = (_tmp0_ = (ValaDataType*) vala_object_type_new ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)), _vala_code_node_unref0 (creturn_type), _tmp0_);
	} else {
		ValaDataType* _tmp1_;
		creturn_type = (_tmp1_ = (ValaDataType*) vala_void_type_new (NULL), _vala_code_node_unref0 (creturn_type), _tmp1_);
	}
	if (VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self))) {
		_tmp3_ = !vala_class_get_is_compact (vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self));
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_tmp2_ = !vala_class_get_is_abstract (vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self));
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		char* _tmp4_;
		ValaCCodeFunction* _tmp5_;
		ValaCCodeFunction* vfunc;
		ValaHashMap* cparam_map;
		ValaHashMap* carg_map;
		ValaCCodeBlock* vblock;
		ValaCCodeIdentifier* _tmp7_;
		char* _tmp6_;
		ValaCCodeFunctionCall* _tmp8_;
		ValaCCodeFunctionCall* vcall;
		ValaCCodeIdentifier* _tmp10_;
		char* _tmp9_;
		ValaCCodeStatement* cstmt;
		vfunc = (_tmp5_ = vala_ccode_function_new (_tmp4_ = vala_method_get_cname ((ValaMethod*) m), "void"), _g_free0 (_tmp4_), _tmp5_);
		vala_ccode_node_set_line ((ValaCCodeNode*) vfunc, vala_ccode_node_get_line ((ValaCCodeNode*) ((ValaCCodeBaseModule*) self)->function));
		cparam_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_FORMAL_PARAMETER, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
		carg_map = vala_hash_map_new (G_TYPE_INT, NULL, NULL, VALA_TYPE_CCODE_EXPRESSION, (GBoxedCopyFunc) vala_ccode_node_ref, vala_ccode_node_unref, g_direct_hash, g_direct_equal, g_direct_equal);
		vblock = vala_ccode_block_new ();
		vcall = (_tmp8_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp7_ = vala_ccode_identifier_new (_tmp6_ = vala_method_get_real_cname ((ValaMethod*) m)))), _vala_ccode_node_unref0 (_tmp7_), _g_free0 (_tmp6_), _tmp8_);
		vala_ccode_function_call_add_argument (vcall, (ValaCCodeExpression*) (_tmp10_ = vala_ccode_identifier_new (_tmp9_ = vala_typesymbol_get_type_id ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))));
		_vala_ccode_node_unref0 (_tmp10_);
		_g_free0 (_tmp9_);
		vala_ccode_base_module_generate_cparameters ((ValaCCodeBaseModule*) self, (ValaMethod*) m, ((ValaCCodeBaseModule*) self)->source_declarations, (ValaMap*) cparam_map, vfunc, NULL, (ValaMap*) carg_map, vcall, 3);
		cstmt = (ValaCCodeStatement*) vala_ccode_return_statement_new ((ValaCCodeExpression*) vcall);
		vala_ccode_node_set_line ((ValaCCodeNode*) cstmt, vala_ccode_node_get_line ((ValaCCodeNode*) vfunc));
		vala_ccode_block_add_statement (vblock, (ValaCCodeNode*) cstmt);
		if (!visible) {
			vala_ccode_function_set_modifiers (vfunc, vala_ccode_function_get_modifiers (vfunc) | VALA_CCODE_MODIFIERS_STATIC);
		}
		vala_ccode_function_set_block (vfunc, vblock);
		vala_ccode_fragment_append (((ValaCCodeBaseModule*) self)->source_type_member_definition, (ValaCCodeNode*) vfunc);
		_vala_ccode_node_unref0 (vfunc);
		_vala_collection_object_unref0 (cparam_map);
		_vala_collection_object_unref0 (carg_map);
		_vala_ccode_node_unref0 (vblock);
		_vala_ccode_node_unref0 (vcall);
		_vala_ccode_node_unref0 (cstmt);
	}
	if (VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self))) {
		_tmp14_ = ((ValaCCodeBaseModule*) self)->gobject_type != NULL;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		_tmp13_ = vala_typesymbol_is_subtype_of ((ValaTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self), ((ValaCCodeBaseModule*) self)->gobject_type);
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		gboolean _tmp15_ = FALSE;
		if (vala_creation_method_get_n_construction_params (VALA_CREATION_METHOD (m)) > 0) {
			_tmp15_ = TRUE;
		} else {
			ValaList* _tmp16_;
			_tmp15_ = vala_collection_get_size ((ValaCollection*) (_tmp16_ = vala_object_type_symbol_get_type_parameters ((ValaObjectTypeSymbol*) vala_ccode_base_module_get_current_class ((ValaCCodeBaseModule*) self)))) > 0;
			_vala_collection_object_unref0 (_tmp16_);
		}
		_tmp12_ = _tmp15_;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		_tmp11_ = !vala_creation_method_get_chain_up (VALA_CREATION_METHOD (m));
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		ValaCCodeIdentifier* _tmp18_;
		ValaCCodeIdentifier* _tmp17_;
		ValaCCodeBinaryExpression* _tmp19_;
		ValaCCodeBinaryExpression* ccond;
		ValaCCodeBlock* cdofreeparam;
		ValaCCodeExpressionStatement* _tmp22_;
		ValaCCodeUnaryExpression* _tmp21_;
		ValaCCodeIdentifier* _tmp20_;
		ValaCCodeIdentifier* _tmp23_;
		ValaCCodeFunctionCall* _tmp24_;
		ValaCCodeFunctionCall* cunsetcall;
		ValaCCodeUnaryExpression* _tmp27_;
		ValaCCodeMemberAccess* _tmp26_;
		ValaCCodeIdentifier* _tmp25_;
		ValaCCodeExpressionStatement* _tmp28_;
		ValaCCodeWhileStatement* _tmp29_;
		ValaCCodeIdentifier* _tmp30_;
		ValaCCodeFunctionCall* _tmp31_;
		ValaCCodeFunctionCall* cfreeparams;
		ValaCCodeIdentifier* _tmp32_;
		ValaCCodeExpressionStatement* _tmp33_;
		ccond = (_tmp19_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_GREATER_THAN, (ValaCCodeExpression*) (_tmp17_ = vala_ccode_identifier_new ("__params_it")), (ValaCCodeExpression*) (_tmp18_ = vala_ccode_identifier_new ("__params"))), _vala_ccode_node_unref0 (_tmp18_), _vala_ccode_node_unref0 (_tmp17_), _tmp19_);
		cdofreeparam = vala_ccode_block_new ();
		vala_ccode_block_add_statement (cdofreeparam, (ValaCCodeNode*) (_tmp22_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) (_tmp21_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_PREFIX_DECREMENT, (ValaCCodeExpression*) (_tmp20_ = vala_ccode_identifier_new ("__params_it")))))));
		_vala_ccode_node_unref0 (_tmp22_);
		_vala_ccode_node_unref0 (_tmp21_);
		_vala_ccode_node_unref0 (_tmp20_);
		cunsetcall = (_tmp24_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp23_ = vala_ccode_identifier_new ("g_value_unset"))), _vala_ccode_node_unref0 (_tmp23_), _tmp24_);
		vala_ccode_function_call_add_argument (cunsetcall, (ValaCCodeExpression*) (_tmp27_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) (_tmp26_ = vala_ccode_member_access_new_pointer ((ValaCCodeExpression*) (_tmp25_ = vala_ccode_identifier_new ("__params_it")), "value")))));
		_vala_ccode_node_unref0 (_tmp27_);
		_vala_ccode_node_unref0 (_tmp26_);
		_vala_ccode_node_unref0 (_tmp25_);
		vala_ccode_block_add_statement (cdofreeparam, (ValaCCodeNode*) (_tmp28_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cunsetcall)));
		_vala_ccode_node_unref0 (_tmp28_);
		vala_ccode_block_add_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) (_tmp29_ = vala_ccode_while_statement_new ((ValaCCodeExpression*) ccond, (ValaCCodeStatement*) cdofreeparam)));
		_vala_ccode_node_unref0 (_tmp29_);
		cfreeparams = (_tmp31_ = vala_ccode_function_call_new ((ValaCCodeExpression*) (_tmp30_ = vala_ccode_identifier_new ("g_free"))), _vala_ccode_node_unref0 (_tmp30_), _tmp31_);
		vala_ccode_function_call_add_argument (cfreeparams, (ValaCCodeExpression*) (_tmp32_ = vala_ccode_identifier_new ("__params")));
		_vala_ccode_node_unref0 (_tmp32_);
		vala_ccode_block_add_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) (_tmp33_ = vala_ccode_expression_statement_new ((ValaCCodeExpression*) cfreeparams)));
		_vala_ccode_node_unref0 (_tmp33_);
		_vala_ccode_node_unref0 (ccond);
		_vala_ccode_node_unref0 (cdofreeparam);
		_vala_ccode_node_unref0 (cunsetcall);
		_vala_ccode_node_unref0 (cfreeparams);
	}
	if (VALA_IS_CLASS (vala_ccode_base_module_get_current_type_symbol ((ValaCCodeBaseModule*) self))) {
		ValaCCodeExpression* cresult;
		char* _tmp34_;
		gboolean _tmp35_;
		ValaCCodeReturnStatement* creturn;
		cresult = (ValaCCodeExpression*) vala_ccode_identifier_new ("self");
		if ((_tmp35_ = (_tmp34_ = vala_ccode_module_get_custom_creturn_type ((ValaCCodeModule*) self, (ValaMethod*) m)) != NULL, _g_free0 (_tmp34_), _tmp35_)) {
			ValaCCodeExpression* _tmp37_;
			char* _tmp36_;
			cresult = (_tmp37_ = (ValaCCodeExpression*) vala_ccode_cast_expression_new (cresult, _tmp36_ = vala_ccode_module_get_custom_creturn_type ((ValaCCodeModule*) self, (ValaMethod*) m)), _vala_ccode_node_unref0 (cresult), _tmp37_);
			_g_free0 (_tmp36_);
		}
		creturn = vala_ccode_return_statement_new (NULL);
		vala_ccode_return_statement_set_return_expression (creturn, cresult);
		vala_ccode_block_add_statement (vala_ccode_function_get_block (((ValaCCodeBaseModule*) self)->function), (ValaCCodeNode*) creturn);
		_vala_ccode_node_unref0 (cresult);
		_vala_ccode_node_unref0 (creturn);
	}
	_vala_code_node_unref0 (creturn_type);
}


static void vala_ccode_method_module_class_init (ValaCCodeMethodModuleClass * klass) {
	vala_ccode_method_module_parent_class = g_type_class_peek_parent (klass);
	VALA_CCODE_MODULE_CLASS (klass)->method_has_wrapper = vala_ccode_method_module_real_method_has_wrapper;
	VALA_CCODE_MODULE_CLASS (klass)->get_custom_creturn_type = vala_ccode_method_module_real_get_custom_creturn_type;
	VALA_CCODE_METHOD_MODULE_CLASS (klass)->generate_method_result_declaration = vala_ccode_method_module_real_generate_method_result_declaration;
	VALA_CCODE_BASE_MODULE_CLASS (klass)->generate_method_declaration = vala_ccode_method_module_real_generate_method_declaration;
	VALA_CCODE_MODULE_CLASS (klass)->visit_method = vala_ccode_method_module_real_visit_method;
	VALA_CCODE_METHOD_MODULE_CLASS (klass)->generate_parameter = vala_ccode_method_module_real_generate_parameter;
	VALA_CCODE_BASE_MODULE_CLASS (klass)->generate_cparameters = vala_ccode_method_module_real_generate_cparameters;
	VALA_CCODE_MODULE_CLASS (klass)->visit_creation_method = vala_ccode_method_module_real_visit_creation_method;
}


static void vala_ccode_method_module_instance_init (ValaCCodeMethodModule * self) {
}


GType vala_ccode_method_module_get_type (void) {
	static volatile gsize vala_ccode_method_module_type_id__volatile = 0;
	if (g_once_init_enter (&vala_ccode_method_module_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaCCodeMethodModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_ccode_method_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaCCodeMethodModule), 0, (GInstanceInitFunc) vala_ccode_method_module_instance_init, NULL };
		GType vala_ccode_method_module_type_id;
		vala_ccode_method_module_type_id = g_type_register_static (VALA_TYPE_CCODE_STRUCT_MODULE, "ValaCCodeMethodModule", &g_define_type_info, 0);
		g_once_init_leave (&vala_ccode_method_module_type_id__volatile, vala_ccode_method_module_type_id);
	}
	return vala_ccode_method_module_type_id__volatile;
}




